*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --bg: #f7f0e7;
  --bg-soft: rgba(255, 255, 255, 0.62);
  --panel: rgba(255, 251, 247, 0.8);
  --panel-strong: rgba(255, 251, 247, 0.94);
  --line: rgba(55, 37, 24, 0.12);
  --text: #24160f;
  --muted: #6d5d51;
  --accent: #d45c2f;
  --accent-soft: #f5c8b2;
  --shadow: 0 18px 50px rgba(62, 28, 10, 0.12);
  --page-background:
    radial-gradient(circle at top left, rgba(255, 206, 145, 0.38), transparent 30%),
    radial-gradient(circle at top right, rgba(153, 210, 232, 0.34), transparent 28%),
    linear-gradient(180deg, #fff8f2 0%, #f7f0e7 52%, #efe6dc 100%);
  --hero-background: linear-gradient(160deg, rgba(255, 252, 248, 0.85), rgba(255, 247, 241, 0.62));
  --tag-background: rgba(255, 255, 255, 0.56);
  --field-border: rgba(52, 34, 20, 0.12);
  --input-background: rgba(255, 255, 255, 0.92);
  --focus-border: rgba(212, 92, 47, 0.45);
  --focus-shadow: 0 0 0 4px rgba(212, 92, 47, 0.12);
  --button-primary-text: #fff8f4;
  --button-secondary-background: #fff4ec;
  --button-ghost-border: rgba(36, 22, 15, 0.12);
  --featured-background: linear-gradient(180deg, rgba(255, 252, 249, 0.96), rgba(255, 247, 241, 0.82));
  --swatch-inset: rgba(255, 255, 255, 0.34);
  --stat-background: rgba(255, 255, 255, 0.62);
  --stat-border: rgba(36, 22, 15, 0.08);
  --card-shadow: 0 18px 28px rgba(34, 17, 8, 0.12);
  --card-hover-shadow: 0 22px 38px rgba(34, 17, 8, 0.16);
  --card-decor: rgba(255, 255, 255, 0.28);
  --card-outline: rgba(36, 22, 15, 0.16);
  --empty-border: rgba(36, 22, 15, 0.16);
  --empty-background: rgba(255, 255, 255, 0.45);
  --noscript-background: rgba(255, 251, 247, 0.95);
  --footer-background: rgba(255, 251, 247, 0.8);
  --lang-background: rgba(255, 255, 255, 0.6);
  --lang-border: rgba(36, 22, 15, 0.1);
  --lang-active-background: var(--text);
  --lang-active-text: #fff5ef;
  --soft-panel-background: rgba(255, 255, 255, 0.58);
  --theme-toggle-background: rgba(255, 251, 247, 0.92);
  --theme-toggle-border: rgba(36, 22, 15, 0.1);
  --theme-toggle-shadow: 0 18px 36px rgba(34, 17, 8, 0.14);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121317;
  --bg-soft: rgba(20, 22, 28, 0.72);
  --panel: rgba(22, 24, 30, 0.78);
  --panel-strong: rgba(25, 28, 35, 0.9);
  --line: rgba(232, 220, 210, 0.12);
  --text: #f4ece3;
  --muted: #b7aca1;
  --accent: #ff9966;
  --accent-soft: #483024;
  --shadow: 0 24px 56px rgba(0, 0, 0, 0.36);
  --page-background:
    radial-gradient(circle at top left, rgba(201, 116, 50, 0.22), transparent 32%),
    radial-gradient(circle at top right, rgba(76, 122, 171, 0.2), transparent 28%),
    linear-gradient(180deg, #16181d 0%, #111317 48%, #0c0d12 100%);
  --hero-background: linear-gradient(160deg, rgba(31, 34, 42, 0.9), rgba(21, 23, 30, 0.72));
  --tag-background: rgba(255, 255, 255, 0.06);
  --field-border: rgba(232, 220, 210, 0.12);
  --input-background: rgba(255, 255, 255, 0.06);
  --focus-border: rgba(255, 153, 102, 0.64);
  --focus-shadow: 0 0 0 4px rgba(255, 153, 102, 0.16);
  --button-primary-text: #1a120c;
  --button-secondary-background: rgba(255, 255, 255, 0.08);
  --button-ghost-border: rgba(232, 220, 210, 0.14);
  --featured-background: linear-gradient(180deg, rgba(30, 33, 41, 0.94), rgba(21, 24, 30, 0.82));
  --swatch-inset: rgba(255, 255, 255, 0.12);
  --stat-background: rgba(255, 255, 255, 0.05);
  --stat-border: rgba(255, 255, 255, 0.08);
  --card-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
  --card-hover-shadow: 0 26px 42px rgba(0, 0, 0, 0.34);
  --card-decor: rgba(255, 255, 255, 0.12);
  --card-outline: rgba(255, 255, 255, 0.18);
  --empty-border: rgba(255, 255, 255, 0.16);
  --empty-background: rgba(255, 255, 255, 0.04);
  --noscript-background: rgba(25, 28, 35, 0.95);
  --footer-background: rgba(22, 24, 30, 0.82);
  --lang-background: rgba(255, 255, 255, 0.06);
  --lang-border: rgba(255, 255, 255, 0.1);
  --lang-active-background: #f4ece3;
  --lang-active-text: #1a120c;
  --soft-panel-background: rgba(255, 255, 255, 0.05);
  --theme-toggle-background: rgba(22, 24, 30, 0.94);
  --theme-toggle-border: rgba(255, 255, 255, 0.12);
  --theme-toggle-shadow: 0 22px 44px rgba(0, 0, 0, 0.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121317;
    --bg-soft: rgba(20, 22, 28, 0.72);
    --panel: rgba(22, 24, 30, 0.78);
    --panel-strong: rgba(25, 28, 35, 0.9);
    --line: rgba(232, 220, 210, 0.12);
    --text: #f4ece3;
    --muted: #b7aca1;
    --accent: #ff9966;
    --accent-soft: #483024;
    --shadow: 0 24px 56px rgba(0, 0, 0, 0.36);
    --page-background:
      radial-gradient(circle at top left, rgba(201, 116, 50, 0.22), transparent 32%),
      radial-gradient(circle at top right, rgba(76, 122, 171, 0.2), transparent 28%),
      linear-gradient(180deg, #16181d 0%, #111317 48%, #0c0d12 100%);
    --hero-background: linear-gradient(160deg, rgba(31, 34, 42, 0.9), rgba(21, 23, 30, 0.72));
    --tag-background: rgba(255, 255, 255, 0.06);
    --field-border: rgba(232, 220, 210, 0.12);
    --input-background: rgba(255, 255, 255, 0.06);
    --focus-border: rgba(255, 153, 102, 0.64);
    --focus-shadow: 0 0 0 4px rgba(255, 153, 102, 0.16);
    --button-primary-text: #1a120c;
    --button-secondary-background: rgba(255, 255, 255, 0.08);
    --button-ghost-border: rgba(232, 220, 210, 0.14);
    --featured-background: linear-gradient(180deg, rgba(30, 33, 41, 0.94), rgba(21, 24, 30, 0.82));
    --swatch-inset: rgba(255, 255, 255, 0.12);
    --stat-background: rgba(255, 255, 255, 0.05);
    --stat-border: rgba(255, 255, 255, 0.08);
    --card-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
    --card-hover-shadow: 0 26px 42px rgba(0, 0, 0, 0.34);
    --card-decor: rgba(255, 255, 255, 0.12);
    --card-outline: rgba(255, 255, 255, 0.18);
    --empty-border: rgba(255, 255, 255, 0.16);
    --empty-background: rgba(255, 255, 255, 0.04);
    --noscript-background: rgba(25, 28, 35, 0.95);
    --footer-background: rgba(22, 24, 30, 0.82);
    --lang-background: rgba(255, 255, 255, 0.06);
    --lang-border: rgba(255, 255, 255, 0.1);
    --lang-active-background: #f4ece3;
    --lang-active-text: #1a120c;
    --soft-panel-background: rgba(255, 255, 255, 0.05);
    --theme-toggle-background: rgba(22, 24, 30, 0.94);
    --theme-toggle-border: rgba(255, 255, 255, 0.12);
    --theme-toggle-shadow: 0 22px 44px rgba(0, 0, 0, 0.4);
  }
}

html {
  scroll-behavior: smooth;
}

.is-theme-switching *,
.is-theme-switching *::before,
.is-theme-switching *::after {
  transition: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Manrope", "Noto Sans JP", "Segoe UI", sans-serif;
  background: var(--page-background);
}

button,
input,
select {
  font: inherit;
}

.page-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}

.hero-copy,
.hero-tools,
.toolbar,
.card {
  backdrop-filter: blur(18px);
}

.hero-copy {
  display: grid;
  gap: 18px;
  justify-items: stretch;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: var(--hero-background);
  box-shadow: var(--shadow);
}

.hero-copy > * {
  width: 100%;
}

.eyebrow,
.toolbar-label,
.stat-label,
.chip {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
  font-weight: 800;
}

.eyebrow {
  color: var(--accent);
}

.hero-copy h1,
.toolbar h2 {
  margin: 10px 0 0;
  font-family: "Fraunces", Georgia, serif;
  line-height: 0.97;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.hero-copy h1 {
  font-size: clamp(2.8rem, 5vw, 5.4rem);
  max-width: none;
  margin: 0;
  text-align: center;
}

.lead {
  max-width: none;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.72;
  color: var(--muted);
  text-align: left;
}

.hero-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-notes span,
.toolbar-meta,
.chip {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--tag-background);
  color: var(--muted);
}

.hero-tools {
  display: grid;
  grid-template-columns: minmax(340px, 0.92fr) minmax(0, 1.08fr);
  gap: 18px;
  align-items: start;
}

.finder,
.featured,
.toolbar {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.finder {
  padding: 24px;
}

.finder h2,
.featured h2 {
  margin: 0;
  font-size: 1.45rem;
}

.finder p,
.featured p {
  margin: 10px 0 0;
  line-height: 1.6;
  color: var(--muted);
}

.finder-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 0.86rem;
  font-weight: 700;
}

.field select,
.field input {
  width: 100%;
  border: 1px solid var(--field-border);
  border-radius: 16px;
  padding: 14px 16px;
  background: var(--input-background);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 56px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 26px) calc(50% - 3px),
    calc(100% - 20px) calc(50% - 3px);
  background-size: 7px 7px, 7px 7px;
  background-repeat: no-repeat;
}

.field select::-ms-expand {
  display: none;
}

.field select:focus,
.field input:focus {
  border-color: var(--focus-border);
  box-shadow: var(--focus-shadow);
}

.field-search {
  margin-top: 14px;
}

.finder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
  transform: none;
  box-shadow: none;
}

.button-primary {
  background: var(--accent);
  color: var(--button-primary-text);
  box-shadow: 0 14px 26px rgba(212, 92, 47, 0.24);
}

.button-secondary {
  background: var(--button-secondary-background);
  color: var(--text);
}

.button-ghost {
  background: transparent;
  border: 1px solid var(--button-ghost-border);
  color: var(--muted);
}

.featured {
  padding: 22px;
  background: var(--featured-background);
}

.featured-inner {
  display: grid;
  gap: 18px;
}

.featured-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 18px;
  align-items: stretch;
}

.featured-text h2 {
  margin-top: 6px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 2rem;
  line-height: 1;
}

.featured-subtitle {
  margin-top: 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.featured-swatch {
  border-radius: 26px;
  min-height: 150px;
  box-shadow: inset 0 0 0 1px var(--swatch-inset);
}

.featured-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.stat {
  padding: 14px;
  border-radius: 18px;
  background: var(--stat-background);
  border: 1px solid var(--stat-border);
}

.stat-label {
  color: var(--muted);
}

.stat-value {
  margin-top: 7px;
  font-size: 1rem;
  font-weight: 800;
  word-break: break-word;
}

.featured-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.catalogue {
  margin-top: 24px;
}

.toolbar {
  padding: 22px;
}

.toolbar-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}

.month-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.chip {
  border: 1px solid var(--stat-border);
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.chip:hover {
  transform: translateY(-1px);
}

.chip.is-active {
  background: var(--text);
  color: var(--lang-active-text);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 0;
  border-radius: 24px;
  padding: 16px;
  min-height: 196px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--card-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease, outline-color 0.22s ease;
}

.card::after {
  content: "";
  position: absolute;
  inset: auto -18% -42% auto;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: var(--card-decor);
  filter: blur(2px);
}

.card:hover,
.card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--card-hover-shadow);
}

.card.is-active {
  outline: 3px solid var(--card-outline);
  outline-offset: 2px;
}

.card-date,
.card-code {
  position: relative;
  z-index: 1;
  margin: 0;
}

.card-date {
  font-size: 0.9rem;
  font-weight: 800;
  opacity: 0.92;
}

.card-title {
  position: relative;
  z-index: 1;
  margin: 18px 0 0;
  font-size: 1.12rem;
  line-height: 1.12;
  font-weight: 800;
}

.card-subtitle {
  position: relative;
  z-index: 1;
  margin: 8px 0 0;
  font-size: 0.88rem;
  line-height: 1.5;
  opacity: 0.92;
}

.card-code {
  margin-top: auto;
  padding-top: 16px;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.empty-state {
  padding: 32px 22px;
  border-radius: 24px;
  border: 1px dashed var(--empty-border);
  background: var(--empty-background);
  color: var(--muted);
}

.noscript {
  width: min(1280px, calc(100% - 32px));
  margin: 16px auto 0;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--noscript-background);
}

.theme-toggle {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid var(--theme-toggle-border);
  border-radius: 999px;
  background: var(--theme-toggle-background);
  color: var(--text);
  box-shadow: var(--theme-toggle-shadow);
  backdrop-filter: blur(18px);
}

.theme-toggle__icon {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), transparent 70%);
  box-shadow: inset -6px -6px 0 0 var(--text);
}

.theme-toggle__label {
  font-size: 0.86rem;
  font-weight: 800;
}

.site-footer {
  padding: 0 0 32px;
}

.site-footer__inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--footer-background);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.site-footer__copy {
  max-width: 780px;
}

.site-footer__inner p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.site-footer__inner p + p {
  margin-top: 6px;
}

.site-footer__inner a {
  color: var(--text);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.site-footer__langs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.site-lang-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  padding: 10px 14px;
  border: 1px solid var(--lang-border);
  border-radius: 999px;
  background: var(--lang-background);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-lang-link.is-active {
  background: var(--lang-active-background);
  color: var(--lang-active-text);
  border-color: transparent;
}

.seo-section,
.faq-section {
  margin-top: 22px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.seo-section {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 18px;
}

.seo-copy h2,
.seo-links-card h2,
.faq-section h2,
.faq-card h3 {
  margin: 10px 0 0;
  font-family: "Fraunces", Georgia, serif;
}

.seo-copy p,
.faq-card p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.seo-links-card {
  padding: 18px;
  border-radius: 22px;
  background: var(--soft-panel-background);
  border: 1px solid var(--stat-border);
}

.seo-link-list {
  margin: 16px 0 0;
  padding-left: 20px;
}

.seo-link-list li + li {
  margin-top: 10px;
}

.seo-link-list a {
  color: var(--text);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.faq-card {
  padding: 18px;
  border-radius: 22px;
  background: var(--soft-panel-background);
  border: 1px solid var(--stat-border);
}

@media (max-width: 1080px) {
  .hero-tools {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    gap: 18px;
  }

  .hero-copy h1 {
    max-width: none;
    text-align: center;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 18px, 1280px);
    padding-top: 18px;
  }

  .hero-copy,
  .finder,
  .featured,
  .toolbar {
    border-radius: 24px;
    padding: 18px;
  }

  .hero-copy h1 {
    max-width: none;
    font-size: clamp(1.95rem, 8vw, 3.2rem);
    text-align: center;
  }

  .featured-top,
  .featured-stats,
  .finder-controls,
  .toolbar-head {
    grid-template-columns: 1fr;
  }

  .toolbar-head {
    align-items: start;
  }

  .featured-swatch {
    min-height: 120px;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .seo-section,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .site-footer__inner {
    flex-direction: column;
  }

  .card {
    min-height: 168px;
    padding: 14px;
    border-radius: 20px;
  }

  .card-title {
    font-size: 1rem;
  }

  .month-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .month-chips::-webkit-scrollbar {
    display: none;
  }

  .theme-toggle {
    right: 14px;
    bottom: 14px;
    padding: 11px 14px;
  }
}

@media (max-width: 420px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .theme-toggle__label {
    display: none;
  }

  .theme-toggle {
    padding: 12px;
  }
}
