@font-face {
  font-family: "Shippori Mincho";
  src: url("fonts/ShipporiMincho-Medium.sub.woff") format("woff");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Barrio";
  src: url("fonts/Barrio-Regular.sub.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}

/* ============================================================
   言語切断室 — museum tokens
   壁:   #202b24 (深い墨緑)  #182019 (影)
   真鍮: #b39a63 / #8a744a
   マット: #efe9dc   紙片: 年代により黄変
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --wall: #202b24;
  --wall-deep: #161e18;
  --brass: #b39a63;
  --brass-dark: #8a744a;
  --brass-ink: #3a2f1c;
  --mat: #efe9dc;
  --ink: #d8d2c2;
  --ink-dim: #8f9389;
  --serif: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --display: "Barrio", "Arial Black", sans-serif;
  --sans: "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", sans-serif;
}

html { -webkit-text-size-adjust: 100%; }

body {
  background: linear-gradient(180deg, var(--wall) 0%, var(--wall-deep) 100%);
  color: var(--ink);
  font-family: var(--serif);
  min-height: 100vh;
}

.room {
  max-width: 640px;
  margin: 0 auto;
  padding: 14px 18px calc(20px + env(safe-area-inset-bottom));
}

/* ---------- header ---------- */
.room-header { text-align: center; padding: 6px 0 0; }
.room-author {
  display: block;
  margin: 0 auto 6px;
  width: 118px;
  height: auto;
  opacity: 0.92;
}
.room-title-en {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--ink);
}

/* ---------- exhibit ---------- */
.exhibit { position: relative; padding-top: 26px; }

.spotlight {
  position: absolute;
  top: 20px; left: 50%;
  transform: translateX(-50%);
  width: 130%;
  height: 520px;
  background: radial-gradient(ellipse 58% 56% at 50% 30%,
              rgba(240, 230, 200, 0.2) 0%,
              rgba(240, 230, 200, 0.06) 50%,
              transparent 74%);
  pointer-events: none;
}

.frame-wrap { position: relative; z-index: 1; }

.frame {
  border: 14px solid transparent;
  border-image: linear-gradient(135deg,
    #8a7345 0%, #bfa876 18%, #6d5730 40%,
    #ab945e 62%, #5f4c24 82%, #927a4a 100%) 1;
  box-shadow:
    0 26px 54px rgba(0,0,0,0.68),
    0 8px 18px rgba(0,0,0,0.5),
    inset 0 0 0 1px rgba(0,0,0,0.5);
  background: #241f16;
}

.mat {
  background: var(--mat);
  box-shadow: inset 0 0 22px rgba(60, 45, 20, 0.22);
  padding: 24px 18px;
  min-height: 172px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- collage ---------- */
.collage {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 2px;
  max-width: 100%;
}

.scrap {
  display: inline-block;
  padding: 8px 12px 9px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 19px;
  line-height: 1.55;
  letter-spacing: 0.02em;
  color: #26221a;
  box-shadow: 1.5px 2.5px 5px rgba(50, 38, 14, 0.35);
  max-width: 100%;
  overflow-wrap: anywhere;
}

@keyframes scrapDissolve {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}
.scrap { transform: rotate(var(--rot)); }
.scrap.dissolve { animation: scrapDissolve 1.1s ease both; }

@media (prefers-reduced-motion: reduce) {
  .scrap.dissolve { animation: none; }
}

/* ---------- plate ---------- */
.plate {
  opacity: 0;
  transition: opacity 1.1s ease 0.25s;
}
.plate.visible { opacity: 1; }
.plate {
  margin: 24px auto 0;
  width: 86%;
  max-width: 360px;
  background: linear-gradient(160deg, #a8946a 0%, #8c7549 45%, #9e8859 70%, #7d693f 100%);
  border: 1px solid #5c4a28;
  border-radius: 3px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4), 0 0 0 1px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,240,200,0.3);
  padding: 9px 14px 9px;
  text-align: center;
  color: var(--brass-ink);
}
.plate-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.12em;
}
.plate-author {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  margin-top: 5px;
  opacity: 0.85;
}
.plate-materials {
  font-size: 10.5px;
  line-height: 1.7;
  margin-top: 8px;
  border-top: 1px solid rgba(80, 62, 30, 0.35);
  padding-top: 8px;
}
.plate-materials a {
  color: var(--brass-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.plate-actions { margin-top: 13px; }
.btn-post {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  color: var(--brass-ink);
  background: rgba(255, 246, 220, 0.35);
  border: 1px solid rgba(80, 62, 30, 0.55);
  border-radius: 2px;
  padding: 7px 16px 6px;
  cursor: pointer;
}
.btn-post:active { background: rgba(255, 246, 220, 0.6); }
.btn-post[disabled] { opacity: 0.55; }

/* ---------- nav ---------- */
.room-nav { text-align: center; margin-top: 22px; }
.btn-next {
  font-family: var(--display);
  font-size: 16px;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  color: var(--ink);
  background: transparent;
  border: 1px solid rgba(216, 210, 194, 0.5);
  padding: 11px 30px 10px;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-next:active { background: rgba(216, 210, 194, 0.12); }

.room-links { margin-top: 16px; display: flex; justify-content: center; gap: 26px; }
.link-btn {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.25em;
  color: var(--ink-dim);
  background: none;
  border: none;
  border-bottom: 1px solid rgba(143, 147, 137, 0.5);
  padding: 2px 2px 3px;
  cursor: pointer;
}
.link-btn:active { color: var(--ink); }

/* ---------- footer ---------- */
.room-footer {
  margin-top: 26px;
  text-align: center;
}
.room-footer p {
  font-size: 10px;
  letter-spacing: 0.08em;
  line-height: 1.9;
  color: var(--ink-dim);
}

/* ---------- overlay panels ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 11, 0.82);
  z-index: 50;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 26px 14px calc(26px + env(safe-area-inset-bottom));
}
.overlay[hidden] { display: none; }
.panel {
  position: relative;
  background: #f2ecdf;
  color: #2b261c;
  max-width: 560px;
  width: 100%;
  padding: 34px 26px 30px;
  box-shadow: 0 22px 50px rgba(0,0,0,0.6);
}
.panel-close {
  position: absolute;
  top: 10px; right: 12px;
  font-size: 22px;
  line-height: 1;
  background: none;
  border: none;
  color: #6d6656;
  cursor: pointer;
  padding: 6px 8px;
}
.panel-title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.06em;
  white-space: nowrap;
  margin-bottom: 18px;
}
.panel-lead { font-size: 12.5px; color: #6d6656; margin-bottom: 16px; }
.panel-body p {
  font-size: 16px;
  line-height: 2.05;
  margin-bottom: 16px;
}
.panel-h3 {
  font-size: 15px;
  letter-spacing: 0.3em;
  margin: 26px 0 12px;
  color: #7c6a3f;
}
.lineage-row {
  display: flex;
  gap: 14px;
  margin-bottom: 12px;
}
.lineage-row dt {
  flex: 0 0 56px;
  font-size: 14px;
  letter-spacing: 0.05em;
  color: #7c6a3f;
  padding-top: 2px;
}
.lineage-row dd {
  font-size: 15px;
  line-height: 1.95;
}
.notes { list-style: none; }
.notes li {
  font-size: 15px;
  line-height: 1.95;
  margin-bottom: 10px;
  padding-left: 1.1em;
  position: relative;
}
.notes li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: #7c6a3f;
}
.statement-sign {
  margin-top: 26px;
  text-align: right;
  font-size: 14px;
  line-height: 2;
  color: #6d6656;
}

/* ---------- vault ---------- */
.vault-item {
  border-bottom: 1px solid rgba(90, 76, 42, 0.25);
  padding: 14px 2px;
}
.vault-no {
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: #7c6a3f;
  margin-bottom: 6px;
}
.vault-text {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.9;
}
.vault-mat {
  font-size: 10.5px;
  color: #6d6656;
  margin-top: 6px;
}
.vault-mat a { color: #6d6656; }
.vault-empty { font-size: 12.5px; color: #6d6656; }

@media (min-width: 480px) {
  .mat { padding: 34px 28px; min-height: 210px; }
  .room-title-en { font-size: 34px; }
}
