:root {
  color-scheme: light;
  --paper: #f8f4ec;
  --ink: #241f1a;
  --muted: #6c6258;
  --line: #d7cbbc;
  --surface: #fffaf2;
  --accent: #8f3f2b;
  --accent-strong: #5f281c;
  --shadow: 0 18px 50px rgba(50, 35, 20, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 48px);
  background: rgba(248, 244, 236, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  font-weight: 700;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 0.95rem;
}

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 70px;
}

.section {
  margin-top: 34px;
}

.panel,
.card,
.art-card,
.adjacent-nav-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel {
  padding: clamp(18px, 3vw, 28px);
}

.home-grid,
.category-hero,
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 26px;
  align-items: start;
}

.side-column {
  display: grid;
  gap: 24px;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h2,
.page-title {
  margin: 0 0 16px;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.25;
}

.page-title {
  font-size: clamp(1.8rem, 3vw, 3rem);
}

.meta,
.breadcrumb {
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumb a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.category-list {
  column-count: 2;
  column-gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.category-list li {
  break-inside: avoid;
  margin: 0 0 8px;
}

.category-list a,
.filter-list a {
  display: block;
  padding: 8px 0;
  border-bottom: 1px solid rgba(215, 203, 188, 0.72);
}

.search-form {
  display: grid;
  gap: 10px;
}

.search-form label {
  font-weight: 700;
}

.search-form input,
.search-form button,
select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

.search-form input,
select {
  width: 100%;
  padding: 8px 12px;
  background: #fffdf8;
  color: var(--ink);
}

.search-form button,
.icon-button {
  cursor: pointer;
  background: var(--accent);
  color: #fffaf2;
  border: 0;
  font-weight: 700;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.centered-title-row {
  justify-content: center;
  text-align: center;
}

.icon-button {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 1.2rem;
}

.mini-bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.random-art {
  position: relative;
  min-height: 150px;
  overflow: hidden;
  border-radius: 8px;
  background: #ddd0c2;
}

.random-art img {
  width: 100%;
  height: 100%;
  min-height: 150px;
  object-fit: cover;
}

.random-art span {
  position: absolute;
  inset: auto 0 0;
  padding: 18px 12px 10px;
  color: white;
  font-size: 0.88rem;
  line-height: 1.45;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
}

.card-grid,
.art-grid,
.adjacent-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.card,
.art-card,
.adjacent-nav-card {
  padding: 14px;
}

.thumb-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.thumb-row img {
  width: 31%;
  max-height: 110px;
  object-fit: contain;
  background: #efe6da;
}

.art-card {
  display: grid;
  gap: 12px;
  text-align: center;
}

.art-card > div {
  min-height: 4.5em;
  display: grid;
  place-items: center;
}

.art-card img {
  margin: 0 auto;
  max-height: 340px;
  object-fit: contain;
}

.detail-media,
.detail-info {
  min-width: 0;
}

.hero-image {
  width: 100%;
  max-height: 76vh;
  object-fit: contain;
  background: #efe6da;
}

.critique-section {
  max-height: 72vh;
  overflow: auto;
  padding-right: 8px;
}

.adjacent-nav-card {
  display: grid;
  gap: 10px;
  align-content: start;
  text-align: center;
}

.adjacent-nav-card img {
  margin: 0 auto;
  max-height: 160px;
  object-fit: contain;
}

.filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.filter-list a {
  min-width: 140px;
}

.empty {
  padding: 18px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
}

@media (max-width: 820px) {
  .site-header,
  .section-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-grid,
  .category-hero,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .category-list {
    column-count: 1;
  }

  .mini-bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
