/* * site-palettina.art の共通スタイル。 * * この CSS は、サイト全体の見た目をまとめて決めています。 * ここで主に扱うのは次の要素です。 * - ベースの色、余白、文字の雰囲気 * - ヘッダーとフッター * - トップページのカテゴリ一覧と Bento レイアウト * - カテゴリ、サブカテゴリ、作品詳細のカード表示 * - スマホ向けの折り返しやレイアウト調整 * * ブロックごとにコメントを入れて、どの部品の見た目か分かるようにしています。 */ * { box-sizing: border-box; } /* 基本の土台。背景色、文字色、リンク色などを決めます。 */ body { margin: 0; background: #101010; color: #eeeeea; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; line-height: 1.6; } a { color: #d8e8ff; text-decoration: none; } a:hover, a:focus-visible { text-decoration: underline; } img { display: block; max-width: 100%; height: auto; background: #202020; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 10px; } /* サイト共通のヘッダーとフッターです。 */ .site-header, .site-footer { padding: 16px 24px; border-bottom: 1px solid #303030; } .site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; } .site-footer { border-top: 1px solid #303030; border-bottom: 0; color: #aaa; text-align: center; } .brand { margin: 0; font-size: 22px; letter-spacing: 0; } .brand a { color: #fff; } .nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; margin-left: auto; } /* ページ全体の横幅と、各セクションの間隔です。 */ .page { width: min(1680px, 100%); margin: 0 auto; padding: 28px 40px; } .breadcrumb, .meta { color: #aaa; font-size: 14px; } .section { margin: 0 0 32px; } .section h2, .section h3, .page-title { margin: 0 0 12px; } .section-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; } .centered-title-row { justify-content: center; } /* トップページと詳細ページで使うグリッド系の土台です。 */ .home-grid, .detail-layout, .category-hero, .profile-layout { display: grid; gap: 24px; } .home-grid, .category-hero { grid-template-columns: minmax(300px, 340px) minmax(0, 1fr); align-items: start; } .detail-layout { grid-template-columns: minmax(0, 1.1fr) minmax(380px, 0.9fr); align-items: start; } .profile-layout { grid-template-columns: minmax(220px, 320px) minmax(0, 1fr); align-items: center; } .profile-media img { width: 100%; max-width: 320px; background: #181818; } .side-column { display: grid; gap: 16px; min-height: 0; } /* カードやパネルの共通した入れ物です。 */ .panel, .card, .art-card { border: 1px solid #333; background: #181818; padding: 16px; } .category-description { max-width: 56em; margin: 16px 0 0; color: #bbb; } /* カテゴリ一覧と絞り込みリンクです。 */ .category-list, .filter-list { display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; } .category-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } .top-category-list { grid-template-columns: 1fr; } .category-list > li > a, .filter-list a { display: flex; justify-content: space-between; gap: 8px; min-height: 42px; border: 1px solid #333; padding: 8px 10px; background: #141414; } .subcategory-filter-list a { font-size: 2rem; line-height: 1.2; } .category-list > li > a { position: relative; overflow: hidden; isolation: isolate; } .category-list > li > a::before { content: ""; position: absolute; inset: 0; z-index: -2; background-image: var(--category-bg); background-position: center; background-size: cover; opacity: 0.16; filter: brightness(0.48) saturate(0.65); } .category-list > li > a::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(0, 0, 0, 0.34), rgba(18, 18, 18, 0.9) 55%, #141414); } .category-list > li:nth-child(3n + 1) > a { --category-bg: url("page_sample/assets/category-bg-1.jpg"); } .category-list > li:nth-child(3n + 2) > a { --category-bg: url("page_sample/assets/category-bg-2.jpg"); } .category-list > li:nth-child(3n) > a { --category-bg: url("page_sample/assets/category-bg-3.jpg"); } .top-category-preview { display: none; } .top-category-preview-art { display: block; min-width: 0; } .top-category-preview-art img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; } /* 入力欄とボタンの基本ルールです。 */ .search-form { display: grid; gap: 10px; } .search-row { display: flex; gap: 10px; align-items: stretch; } .search-row input { flex: 1 1 auto; min-width: 0; width: auto; } .search-row button { flex: 0 0 auto; width: auto; min-width: 7.5em; } label { color: #ccc; font-weight: 700; } input, select, button { width: 100%; border: 1px solid #444; background: #0f0f0f; color: #eee; padding: 10px; font: inherit; } button, .icon-button { cursor: pointer; } .sort-form { width: min(220px, 100%); } .icon-button { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid #444; background: #0f0f0f; color: #eee; font-size: 20px; line-height: 1; } /* トップページの Bento グリッドです。 */ .random-panel { display: grid; grid-template-rows: auto auto; padding: 12px; } /* Bento 内の画像と文字の重ね方です。 */ .mini-bento-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: repeat(7, var(--bento-cell, 1fr)); grid-auto-flow: dense; grid-auto-rows: var(--bento-cell, 1fr); gap: 8px; min-height: 0; } .random-art { position: relative; overflow: hidden; min-height: 0; border: 1px solid #2b2b2b; background: #222; } .random-art img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; } .random-art:hover img, .random-art:focus-visible img { transform: scale(1.04); } .random-art span { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 8px 8px; color: #fff; font-size: 12px; font-weight: 700; line-height: 1.35; background: linear-gradient(transparent, rgba(0, 0, 0, 0.86)); text-shadow: 0 1px 2px #000; } .random-art small { color: #ddd; font-size: 10px; font-weight: 400; } @media (min-width: 761px) { .tile-01 { grid-column: 1 / span 2; grid-row: 1 / span 2; } .tile-02 { grid-column: 3; grid-row: 1 / span 2; } .tile-03 { grid-column: 4 / span 2; grid-row: 1; } .tile-04 { grid-column: 4; grid-row: 2; } .tile-05 { grid-column: 2; grid-row: 3; } .tile-06 { grid-column: 5; grid-row: 2 / span 2; } .tile-07 { grid-column: 3 / span 2; grid-row: 3; } .tile-09 { grid-column: 2 / span 2; grid-row: 4 / span 2; } .tile-10 { grid-column: 1; grid-row: 3 / span 3; } .tile-11 { grid-column: 4; grid-row: 4 / span 3; } .tile-12 { grid-column: 5; grid-row: 4; } .tile-13 { grid-column: 1 / span 2; grid-row: 6; } .tile-14 { grid-column: 3; grid-row: 6 / span 2; } .tile-15 { grid-column: 5; grid-row: 5 / span 3; } .tile-16 { grid-column: 1; grid-row: 7; } .tile-17 { grid-column: 2; grid-row: 7; } .tile-18 { grid-column: 4; grid-row: 7; } } /* 作品一覧やカードの基本配置です。 */ .card-grid, .art-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } .category-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .artwork-list-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .subcategory-card { display: grid; gap: 12px; } .subcategory-card-title { font-size: 2rem; line-height: 1.15; } /* カテゴリページの小さな代表画像列です。 */ .thumb-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; } .thumb-row img { flex: 0 1 var(--thumb-width, 126px); width: var(--thumb-width, 126px); height: auto; object-fit: contain; } .thumb-landscape { width: var(--thumb-width, 154px); } .thumb-portrait { width: var(--thumb-width, 103px); } .thumb-square { width: var(--thumb-width, 126px); } .mixed-art-grid { align-items: start; } /* 作品カードの基本形です。 */ .art-card { position: relative; display: flex; flex-direction: column; align-items: center; overflow: hidden; padding: 0; } .art-card div { display: grid; place-items: center; align-self: stretch; min-height: 62px; padding: 10px; text-align: center; } .art-card-title { font-size: 1.7rem; line-height: 1.2; } .art-card img { width: min(var(--art-width, 245px), calc(100% - 32px)); height: auto; margin: 0 16px 16px; object-fit: contain; } .art-card .art-landscape { width: min(var(--art-width, 300px), calc(100% - 32px)); } .art-card .art-square { width: min(var(--art-width, 245px), calc(100% - 32px)); } .art-card .art-portrait { width: min(var(--art-width, 200px), calc(100% - 32px)); } .hover-label { position: absolute; inset: auto 16px 16px; display: grid; place-items: center; min-height: 42px; opacity: 0; background: rgba(0, 0, 0, 0.72); color: #fff; transition: opacity 0.18s; } .art-card:hover .hover-label, .art-card:focus-visible .hover-label { opacity: 1; } /* 作品詳細ページの左右レイアウトです。 */ .detail-info { display: flex; flex-direction: column; max-height: min(760px, calc(55vw - 80px)); min-height: 0; } .hero-image { width: 100%; border: 1px solid #333; border-radius: 0; } .critique-section { display: flex; flex: 1; flex-direction: column; min-height: 0; } .critique { flex: 1; min-height: 0; margin: 0; overflow: auto; padding-right: 10px; color: #d8d8d2; white-space: pre-line; } .adjacent-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } .similar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } /* 関連作品や前後作品のカードです。 */ .adjacent-nav-card { display: grid; grid-template-columns: var(--link-thumb-width, 83px) minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 8px 12px; align-items: center; border: 1px solid #333; background: #181818; padding: 12px; } .adjacent-nav-card img { grid-row: 1 / span 2; width: var(--link-thumb-width, 83px); height: auto; object-fit: contain; } .adjacent-nav-card.previous { grid-template-columns: auto var(--link-thumb-width, 83px) minmax(0, 1fr); } .adjacent-nav-card.previous::before, .adjacent-nav-card.next::after { align-self: center; color: #aaa; font-size: 22px; line-height: 1; } .adjacent-nav-card.previous::before { content: ""; grid-column: 3; grid-row: 1 / span 2; } .filter-list { display: flex; flex-wrap: wrap; } /* 画面が狭いときの折り返し調整です。 */ @media (max-width: 900px) { .page { padding: 18px; } .home-grid, .detail-layout, .category-hero, .profile-layout { grid-template-columns: 1fr; } .detail-info { max-height: none; } .critique { max-height: 50vh; } .card-grid, .art-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .category-list { grid-template-columns: 1fr; } .top-category-list { gap: 18px; } .top-category-preview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; } .random-panel { display: none; } .mini-bento-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: var(--bento-cell, 1fr); } .random-art { grid-column: auto; grid-row: auto; } } @media (max-width: 560px) { .site-header, .section-title-row { align-items: flex-start; flex-direction: column; } .card-grid, .art-grid, .adjacent-nav, .similar-grid { grid-template-columns: 1fr; } .search-row { flex-direction: column; } .search-row button { width: 100%; } }