@font-face {
  font-family: 'KaisotaiNextUP';
  src: url('/fonts/Kaisotai-Next-UP-B.woff2') format('woff2');
  font-display: swap;
}
:root {
  --bg: #0e0c0a;
  --surface: #161412;
  --surface2: #1a1714;
  --border: #2a2520;
  --border-strong: #2a2520;
  --text: #e8e0d4;
  --text-dim: #c0b4a8;
  --text-muted: #6e6560;
  --accent: #c8a96e;
  --accent-dim: #7a6540;
  --accent-2: #9fb4df;
  --card-text: #c0b4a8;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(200,169,110,0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(200,169,110,0.05) 0%, transparent 40%),
    #080808;
  color: var(--text);
  font-family: 'Noto Sans JP', sans-serif;
}
a { color: var(--accent-2); }
body { min-height: 100vh; }
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(200,169,110,0.06) 1px, transparent 1px);
  background-size: 100% 80px;
  pointer-events: none;
  z-index: 0;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}
.page-header {
  padding: 48px 0 22px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(200,169,110,0.06) 0%, transparent 60%);
  pointer-events: none;
}
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}
.header-label {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
}
.site-brand-title {
  margin: 16px 0 0;
  font-family: 'KaisotaiNextUP', 'Noto Sans JP', sans-serif;
  font-size: clamp(28px, 4.5vw, 58px);
  font-weight: normal;
  line-height: 1.1;
  letter-spacing: 0.18em;
  max-width: 800px;
}
.site-brand-title-link {
  color: inherit;
  text-decoration: none;
}
.site-brand-title-link:hover {
  color: var(--accent);
}
.site-brand-title em {
  color: var(--accent);
  font-style: normal;
}
.site-title-link {
  color: inherit;
  text-decoration: none;
}
.site-title-link:hover {
  color: var(--accent-bright);
}
.header-keywordline {
  margin-top: 14px;
  color: rgba(198, 170, 130, 0.82);
  font: 400 10px/1.7 'DM Mono', monospace;
  letter-spacing: 0.08em;
}
.header-keywordline a {
  color: var(--accent-2);
  text-decoration: none;
}
.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  background: rgba(16, 15, 13, 0.7);
}
.lang-btn,
.lang-toggle a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 12px;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}
.lang-btn.active,
.lang-toggle a.active {
  color: var(--text);
  background: rgba(200,169,110,0.12);
}
.lang-toggle a + a,
.lang-btn + .lang-btn {
  border-left: 1px solid var(--border);
}
.tab-nav {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}
.tab-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  gap: 0;
}
.page-top-links,
.top-links {
  display: flex;
  gap: 0;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
}
.page-top-links a {
  display: inline-flex;
  align-items: center;
  color: var(--text-muted);
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  letter-spacing: 0.1em;
  padding: 20px 24px;
  text-decoration: none;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s, border-color 0.2s;
}
.page-top-links a:hover {
  color: var(--text-dim);
  border-bottom-color: var(--accent-dim);
}
.page-top-links a.nav-active-link {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.tab-nav-selects {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  padding-left: 20px;
}
.tab-lang-toggle {
  margin-left: auto;
  flex-shrink: 0;
}
.filter-select,
.tax-select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  padding: 6px 10px;
  cursor: pointer;
  appearance: none;
  padding-right: 24px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%234a4440'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: border-color 0.2s;
}
.filter-select:hover,
.tax-select:hover { border-color: var(--accent-dim); }
.filter-select:focus,
.tax-select:focus {
  outline: none;
  border-color: var(--accent);
  color: var(--text);
}
.nav-select { min-width: 180px; }
.select-wrap {
  position: relative;
  display: inline-flex;
  width: fit-content;
}
@media (min-width: 769px) {
  .tab-nav-inner {
    flex-wrap: nowrap;
  }
  .page-top-links {
    flex: 0 1 auto;
    min-width: 0;
  }
  .tab-nav-selects {
    flex-wrap: nowrap;
    min-width: 0;
    padding-left: 20px;
  }
  .tab-nav-selects .select-wrap {
    flex: 0 1 176px;
    min-width: 0;
  }
  .nav-select {
    width: 100%;
    min-width: 0;
  }
  .tab-nav-selects .select-wrap:has(select[aria-label*="年代"]),
  .tab-nav-selects .select-wrap:has(select[aria-label*="eras"]) {
    order: 1;
  }
  .tab-nav-selects .select-wrap:has(select[aria-label*="国別"]),
  .tab-nav-selects .select-wrap:has(select[aria-label*="countries"]) {
    order: 2;
  }
  .tab-nav-selects .select-wrap:has(select[aria-label*="表現"]),
  .tab-nav-selects .select-wrap:has(select[aria-label*="movements"]) {
    order: 3;
  }
  .tab-nav-selects .select-wrap:has(select[aria-label*="関連する運動"]),
  .tab-nav-selects .select-wrap:has(select[aria-label*="Related movements"]) {
    order: 4;
  }
}
.page-shell { width: min(1040px, calc(100vw - 48px)); margin: 0 auto; padding: 36px 0 80px; position: relative; z-index: 1; }
.hero {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 28px;
}
.title {
  margin: 0;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0.02em;
  color: var(--accent);
}
.era-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
}
.era-context-trigger {
  display: none;
  flex: 0 0 auto;
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid rgba(200, 169, 110, 0.28);
  background: rgba(200, 169, 110, 0.05);
  color: var(--accent);
  font: 400 11px/1.3 'DM Mono', monospace;
  letter-spacing: 0.08em;
  cursor: pointer;
}
.era-context-inline {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid rgba(200, 169, 110, 0.18);
  background: rgba(200, 169, 110, 0.035);
}
.era-context-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.era-context-block {
  display: grid;
  gap: 8px;
}
.era-context-label {
  color: var(--accent);
  font: 400 10px/1.4 'DM Mono', monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.era-context-text {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.9;
}
.era-context-close {
  display: none;
}
.lead {
  margin: 18px 0 0;
  max-width: 820px;
  color: var(--text-dim);
  line-height: 1.9;
  font-size: 15px;
}
.hero-meta {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 16px;
  align-items: flex-start;
}
.meta-group {
  display: grid;
  gap: 6px;
}
.group-label {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 0 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--accent);
  font: 8px/1.2 'DM Mono', monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  width: fit-content;
}
.mini-card-grid,
.tag-grid,
.photographer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.mini-card,
.tag-card,
.photographer-card {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface2);
  color: var(--card-text);
  text-decoration: none;
}
.mini-card {
  width: fit-content;
}
.mini-card-label {
  font: 8px/1.2 'DM Mono', monospace;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.mini-card-value {
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}
.tag-card {
  font-size: 11px;
  line-height: 1.2;
}
.photographer-card {
  align-items: center;
  justify-content: center;
  min-width: 160px;
  max-width: 220px;
  text-align: center;
}
.photographer-card-name {
  font-size: 12px;
  line-height: 1.25;
}
.archive-list-shell {
  width: 100%;
}
.archive-list {
  display: grid;
  gap: 8px;
}
.archive-list-card {
  border: 1px solid var(--border);
  background: var(--surface);
}
.archive-list-summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  gap: 6px;
  padding: 14px 16px;
}
.archive-list-summary::-webkit-details-marker {
  display: none;
}
.archive-list-overline {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  font: 400 10px/1.4 'DM Mono', monospace;
  letter-spacing: 0.06em;
  text-decoration: none;
}
.archive-list-country {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  color: var(--text-muted);
}
.archive-list-flag {
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
  letter-spacing: 0;
}
.archive-list-country-code,
.archive-list-years {
  font-family: 'DM Mono', monospace;
}
.archive-list-years {
  color: var(--text-muted);
  white-space: nowrap;
}
.archive-list-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}
.archive-list-name-wrap {
  min-width: 0;
}
.archive-list-name {
  color: var(--text);
  font-size: 22px;
  line-height: 1.22;
  font-weight: 700;
}
.archive-list-alt {
  margin-top: 4px;
  color: var(--text-dim);
  font: 400 11px/1.5 'DM Mono', monospace;
  letter-spacing: 0.04em;
}
.archive-list-chevron {
  color: var(--text-dim);
  font: 400 20px/1 'DM Mono', monospace;
  transition: transform 0.18s ease;
}
.archive-list-card[open] .archive-list-chevron {
  transform: rotate(45deg);
  color: var(--accent);
}
.archive-list-descriptor {
  color: var(--accent);
  font: 400 11px/1.5 'DM Mono', monospace;
  letter-spacing: 0.05em;
}
.archive-list-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.archive-list-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--card-text);
  font: 400 10px/1.2 'DM Mono', monospace;
  letter-spacing: 0.04em;
}
.archive-list-tag-more {
  color: var(--text-dim);
}
.archive-list-body {
  display: grid;
  gap: 10px;
  padding: 0 16px 16px;
}
.archive-list-lead {
  margin: 0;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.8;
}
.archive-list-link {
  color: var(--accent-2);
  text-decoration: none;
  font: 400 11px/1.4 'DM Mono', monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.archive-list-link:hover {
  color: var(--text);
}
.taxonomy-empty {
  padding: 18px 0 8px;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.8;
}
.section-grid { display: grid; gap: 18px; margin-top: 20px; }
.section { border: 1px solid var(--border); background: var(--surface); padding: 24px; }
.section h2 {
  margin: 0 0 14px;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: 'DM Mono', monospace;
  color: var(--accent);
}
.section p { margin: 0; color: var(--text); line-height: 1.95; font-size: 15px; }
.site-footer {
  margin-top: 22px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.8;
}
.site-directory-links {
  margin-top: 22px;
  padding: 18px 0 4px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 14px;
}
.site-directory-group {
  display: grid;
  gap: 8px;
}
.site-directory-label {
  color: var(--accent);
  font: 400 10px/1.4 'DM Mono', monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.site-directory-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}
.site-directory-items a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 12px;
  line-height: 1.7;
}
.site-directory-items a:hover {
  color: var(--text);
}
.footer-secondary { margin-top: 4px; }
.footer-links { margin-top: 12px; }
.footer-links a {
  color: var(--accent);
  text-decoration: none;
}
.footer-links a:hover { color: var(--text); }
@media (max-width: 768px) {
  body.era-context-modal-open {
    overflow: hidden;
  }
  body.era-context-modal-open .page-shell {
    z-index: 360;
  }
  .page-header { padding: 48px 0 40px; }
  .header-top { flex-direction: column; align-items: flex-start; }
  .container,
  .tab-nav-inner {
    padding: 0 16px;
  }
  .tab-nav-inner {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    align-items: stretch;
  }
  .page-top-links {
    display: contents;
  }
  .page-top-links a {
    font-size: 11px;
    padding: 14px 10px 12px;
  }
  .tab-nav-selects {
    width: auto;
    padding: 4px 0 12px;
    display: contents;
    padding-left: 0;
  }
  .nav-select {
    width: 100%;
    min-width: 0;
    font-size: 10px;
    padding: 8px 28px 8px 10px;
  }
  .tab-lang-toggle {
    grid-column: 2 / 4;
    justify-self: stretch;
    margin-left: 0;
    align-self: start;
    width: 100%;
  }
  .tab-lang-toggle .lang-btn,
  .tab-lang-toggle a {
    flex: 1 1 50%;
    min-width: 0;
    padding: 10px 12px;
    font-size: 10px;
  }
  .lang-toggle .lang-btn,
  .lang-toggle a {
    font-size: 0;
  }
  .lang-toggle .lang-btn::after,
  .lang-toggle a::after {
    font-size: 10px;
    line-height: 1;
  }
  .lang-toggle .lang-btn:first-child::after,
  .lang-toggle a:first-child::after {
    content: "JP";
  }
  .lang-toggle .lang-btn:nth-child(2)::after,
  .lang-toggle a:nth-child(2)::after {
    content: "EN";
  }
  .site-directory-links {
    gap: 12px;
  }
  .site-directory-items {
    gap: 6px 10px;
  }
  .site-directory-items a {
    font-size: 11px;
    line-height: 1.6;
  }
  .hero {
    position: relative;
  }
  .era-title-row {
    display: grid;
    gap: 12px;
  }
  .era-context-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
  }
  .era-context-inline {
    display: none;
  }
  .hero.is-context-open .era-context-inline {
    display: block;
    position: fixed;
    inset: calc(env(safe-area-inset-top, 0px) + 16px) 16px calc(env(safe-area-inset-bottom, 0px) + 18px);
    z-index: 420;
    margin: 0;
    overflow-y: auto;
    padding: 0 18px 18px;
    background: rgba(12, 10, 8, 0.97);
    border-color: rgba(200, 169, 110, 0.24);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36);
    overscroll-behavior: contain;
  }
  .hero.is-context-open::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 419;
    background: rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(4px);
  }
  .era-context-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .era-context-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 0;
    z-index: 2;
    margin: 0 0 14px auto;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    background: rgba(12, 10, 8, 0.97);
    color: var(--text-dim);
    font: 0/1 'DM Mono', monospace;
    cursor: pointer;
  }
  .era-context-close::after {
    content: '×';
    font-size: 18px;
    line-height: 1;
  }
  .era-context-text {
    font-size: 13px;
    line-height: 1.82;
  }
}
@media (max-width: 720px) {
  .page-shell { width: min(100vw - 28px, 1040px); padding-top: 20px; }
  .hero, .section { padding: 20px; }
  .topline { flex-direction: column; }
}
@media (max-width: 560px) {
  .tag-card,
  .mini-card,
  .tax-select,
  .select-wrap {
    width: 100%;
    max-width: none;
  }
  .archive-list {
    gap: 0;
  }
  .archive-list-card {
    border-left: 0;
    border-right: 0;
    border-top: 0;
    background: transparent;
  }
  .archive-list-summary {
    gap: 5px;
    padding: 12px 0;
  }
  .archive-list-body {
    padding: 0 0 14px;
  }
  .archive-list-name {
    font-size: 16px;
  }
  .archive-list-overline,
  .archive-list-descriptor,
  .archive-list-link,
  .archive-list-tag {
    font-size: 10px;
  }
  .archive-list-overline {
    max-width: 100%;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
    word-break: keep-all;
    letter-spacing: 0.03em;
    gap: 7px;
  }
  .archive-list-country {
    gap: 5px;
  }
  .archive-list-years {
    min-width: 0;
    letter-spacing: 0.02em;
  }
  .archive-list-lead {
    font-size: 12px;
    line-height: 1.7;
  }
}

@media (min-width: 961px) {
  .page-top-links {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .page-top-links::-webkit-scrollbar { display: none; }
  .archive-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }
  .archive-list-card {
    height: fit-content;
  }
}
