テンプレート:エリア/styles.css
提供: 川西図鑑
その他の操作
/* ========================================
エリアページ全体
======================================== */
.area-page {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
display: grid;
gap: 20px;
}
/* ========================================
カテゴリーカードグリッド
======================================== */
.category-cards {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
gap: 20px;
margin: 3em 0;
}
.category-card-item {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
padding: 10px 20px;
background: #fff;
border: 2px solid #e5e7eb;
border-radius: 16px;
box-shadow: 0 2px 8px rgba(0,0,0,0.06);
gap: 12px;
transition: all 0.3s ease;
position: relative;
}
.category-card-item:not(.disabled):hover {
border-color: #f59e0b;
box-shadow: 0 4px 16px rgba(245, 158, 11, 0.15);
transform: translateY(-4px);
}
.category-card-item.disabled {
opacity: 0.5;
cursor: not-allowed;
}
.category-card-item .card-icon {
font-size: 40px;
line-height: 1;
filter: brightness(1.1);
}
.category-card-item .card-content {
display: flex;
flex-direction: column;
gap: 8px;
width: 100%;
}
.category-card-item .card-title {
font-size: 18px;
font-weight: 700;
color: #111827;
line-height: 1.3;
display: block;
}
/* Wikiリンクのスタイル調整 */
.category-card-item .card-title a {
color: #111827;
text-decoration: none;
font-weight: 700;
display: block;
padding: 8px;
margin: -8px;
border-radius: 8px;
transition: all 0.2s ease;
}
.category-card-item .card-title a:hover {
color: #d97706;
background: rgba(245, 158, 11, 0.1);
}
.area-page a::after {
display: none;
}
/* カード全体をクリック可能にする擬似要素 */
.category-card-item:not(.disabled) .card-title a::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 1;
}
.category-card-item .card-status {
font-size: 12px;
color: #9ca3af;
background: #f3f4f6;
padding: 4px 12px;
border-radius: 12px;
display: inline-block;
}
/* ========================================
セクション共通
======================================== */
.area-section {
padding: 2em;
background: #fff;
border-radius: 16px;
border: 1px solid #e5e7eb;
}
.area-page .mw-heading2 {
margin-top: 0;
}
.area-section h2 {
font-size: 24px;
font-weight: 700;
color: #111827;
margin: 0 0 1em 0;
padding-bottom: 12px;
border-bottom: 2px solid #f59e0b;
}
.area-section p {
line-height: 1.8;
color: #374151;
margin: 0.8em 0;
}
.area-section ul {
list-style: none;
padding: 0;
margin: 1em 0;
}
.area-section ul li {
padding: 8px 0 8px 24px;
position: relative;
line-height: 1.6;
color: #374151;
}
.area-section ul li::before {
content: '•';
position: absolute;
left: 8px;
color: #f59e0b;
font-weight: bold;
}
/* ========================================
関連項目
======================================== */
.link-items {
display: flex;
gap: 12px;
flex-wrap: wrap;
margin: 1em 0;
}
.link-items a {
display: inline-block;
padding: 8px 16px;
margin: 3px 1px;
background: #f9fafb;
border: 1px solid #e5e7eb;
border-radius: 8px;
color: #374151;
text-decoration: none;
font-size: 14px;
transition: all 0.2s ease;
}
.link-items a:hover {
background: #fef3c7;
border-color: #f59e0b;
color: #d97706;
}
/* ========================================
画像
======================================== */
.station-image img {
width: 50%;
height: auto;
}
/* ========================================
ダークモード
======================================== */
html.skin-theme-clientpref-night .area-header h1,
html.skin-theme-clientpref-night .area-section h2 {
color: #f9fafb;
}
html.skin-theme-clientpref-night .area-header {
border-bottom-color: #f59e0b;
}
html.skin-theme-clientpref-night .area-header .area-tagline,
html.skin-theme-clientpref-night .area-section p,
html.skin-theme-clientpref-night .area-section ul li {
color: #d1d5db;
}
html.skin-theme-clientpref-night .category-card-item {
background: #1e1e1e;
border-color: #3a3a3a;
}
html.skin-theme-clientpref-night .category-card-item .card-title,
html.skin-theme-clientpref-night .category-card-item .card-title a {
color: #f9fafb;
}
html.skin-theme-clientpref-night .category-card-item .card-status {
background: #374151;
color: #9ca3af;
}
html.skin-theme-clientpref-night .category-card-item:not(.disabled):hover {
border-color: #f59e0b;
background: #2a2a2a;
}
html.skin-theme-clientpref-night .category-card-item .card-title a:hover {
color: #fbbf24;
background: rgba(245, 158, 11, 0.15);
}
html.skin-theme-clientpref-night .area-section {
background: #1e1e1e;
border-color: #3a3a3a;
}
html.skin-theme-clientpref-night .link-items a {
background: #2a2a2a;
border-color: #3a3a3a;
color: #e5e7eb;
}
html.skin-theme-clientpref-night .link-items a:hover {
background: #374151;
border-color: #f59e0b;
color: #fbbf24;
}
/* ========================================
ダークモード(自動)
======================================== */
@media (prefers-color-scheme: dark) {
html.skin-theme-clientpref-os .area-header h1,
html.skin-theme-clientpref-os .area-section h2 {
color: #f9fafb;
}
html.skin-theme-clientpref-os .area-header {
border-bottom-color: #f59e0b;
}
html.skin-theme-clientpref-os .area-header .area-tagline,
html.skin-theme-clientpref-os .area-section p,
html.skin-theme-clientpref-os .area-section ul li {
color: #d1d5db;
}
html.skin-theme-clientpref-os .category-card-item {
background: #1e1e1e;
border-color: #3a3a3a;
}
html.skin-theme-clientpref-os .category-card-item .card-title,
html.skin-theme-clientpref-os .category-card-item .card-title a {
color: #f9fafb;
}
html.skin-theme-clientpref-os .category-card-item .card-status {
background: #374151;
color: #9ca3af;
}
html.skin-theme-clientpref-os .category-card-item:not(.disabled):hover {
border-color: #f59e0b;
background: #2a2a2a;
}
html.skin-theme-clientpref-os .category-card-item .card-title a:hover {
color: #fbbf24;
background: rgba(245, 158, 11, 0.15);
}
html.skin-theme-clientpref-os .area-section {
background: #1e1e1e;
border-color: #3a3a3a;
}
html.skin-theme-clientpref-os .link-items a {
background: #2a2a2a;
border-color: #3a3a3a;
color: #e5e7eb;
}
html.skin-theme-clientpref-os .link-items a:hover {
background: #374151;
border-color: #f59e0b;
color: #fbbf24;
}
}
/* ========================================
レスポンシブ
======================================== */
@media (max-width: 768px) {
.area-page {
padding: 16px;
}
.area-header {
padding: 1.5em 0 2em;
margin-bottom: 2em;
}
.area-header h1 {
font-size: 26px;
}
.area-header .area-tagline {
font-size: 14px;
}
.category-cards {
grid-template-columns: repeat(2, 1fr);
gap: 16px;
margin: 2em 0;
}
.category-card-item {
padding: 5px 10px;
gap: unset;
}
.category-card-item .card-icon {
font-size: 36px;
}
.category-card-item .card-title,
.category-card-item .card-title a {
font-size: 16px;
}
.area-section {
padding: 1.5em;
}
.area-section h2 {
font-size: 20px;
}
.station-image img {
width: 100%;
}
}