/* ==================================================================== */
/* LUMEN PHOTO CLUB — playful cream / coral / teal skin                 */
/* Layered after style.css so layout and responsive rules stay intact.  */
/* ==================================================================== */

:root {
  --fun: "Wawati SC", "Hannotate SC", "HanziPen SC", "Yuanti SC", "YouYuan",
    "ZCOOL KuaiLe", "Comic Sans MS", "Chalkboard SE", "Noto Sans CJK SC", cursive;
  --sans: "Yuanti SC", "YouYuan", "PingFang SC", "Microsoft YaHei",
    "Noto Sans CJK SC", "Helvetica Neue", sans-serif;
  --serif: var(--fun);

  --cocoa: #2c211b;
  --cocoa-soft: #4b3b31;
  --cream: #f8f1e5;
  --cream-bright: #fffaf2;
  --paper: #fff9ef;
  --paper-dim: #6b5b4f;
  --paper-faint: #948372;
  --coral: #e36a4e;
  --coral-deep: #c74f35;
  --teal: #2f7c74;
  --sun: #f1c14d;
  --sky: #a8ccd4;
  --muted: #8c7b6b;
  --gold: var(--coral);
  --gold-bright: #f2a35c;
  --line: rgba(44, 33, 27, 0.16);
  --line-dark: rgba(44, 33, 27, 0.22);
}

html {
  background: var(--cream);
  color-scheme: light;
}

body {
  background: var(--cream);
  color: var(--cocoa);
  font-family: var(--sans);
}

::selection {
  background: var(--sun);
  color: var(--cocoa);
}

kbd {
  border-color: rgba(44, 33, 27, 0.2);
  background: rgba(255, 250, 242, 0.9);
  color: var(--cocoa-soft);
}

.eyebrow {
  color: var(--coral);
  font-family: var(--fun);
  letter-spacing: 0.2em;
}

.eyebrow-line {
  background: var(--coral);
}

a {
  color: var(--teal);
}

/* ------------------------------------------------------------------ */
/* Buttons                                                              */
/* ------------------------------------------------------------------ */

.primary-button {
  border: 2px solid var(--cocoa);
  border-radius: 999px;
  background: var(--coral);
  color: #fff9ef;
  box-shadow: 4px 4px 0 var(--cocoa);
  font-family: var(--fun);
  letter-spacing: 0.08em;
}

.primary-button:hover:not(:disabled) {
  border-color: var(--cocoa);
  background: var(--sun);
  color: var(--cocoa);
  box-shadow: 6px 6px 0 var(--cocoa);
  transform: translate(-1px, -1px);
}

.primary-button:active:not(:disabled) {
  box-shadow: 2px 2px 0 var(--cocoa);
  transform: translate(2px, 2px);
}

.primary-button--small {
  box-shadow: 3px 3px 0 var(--cocoa);
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 178px;
  padding: 16px 21px;
  border: 2px solid var(--cocoa);
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.54);
  color: var(--cocoa);
  box-shadow: 4px 4px 0 rgba(44, 33, 27, 0.2);
  font-family: var(--fun);
  font-size: 11px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.25s var(--ease), box-shadow 0.25s var(--ease),
    transform 0.25s var(--ease);
}

.secondary-button:hover {
  background: var(--sun);
  box-shadow: 6px 6px 0 rgba(44, 33, 27, 0.35);
  transform: translate(-1px, -1px);
}

.secondary-button:active {
  box-shadow: 1px 1px 0 rgba(44, 33, 27, 0.3);
  transform: translate(2px, 2px);
}

.text-button {
  color: var(--cocoa-soft);
}

/* ------------------------------------------------------------------ */
/* Loading                                                              */
/* ------------------------------------------------------------------ */

.loading {
  background:
    radial-gradient(circle at 52% 42%, rgba(241, 193, 77, 0.3), transparent 30%),
    radial-gradient(circle at 30% 70%, rgba(47, 124, 116, 0.12), transparent 30%),
    var(--cream);
}

.loading p {
  color: var(--cocoa);
  font-family: var(--fun);
}

.loading small {
  color: var(--muted);
}

.loading-mark span {
  background: var(--coral);
}

.loading-mark span:nth-child(2) {
  background: var(--teal);
}

.loading-mark span:nth-child(3) {
  background: var(--sun);
}

/* ------------------------------------------------------------------ */
/* Gate                                                                 */
/* ------------------------------------------------------------------ */

.gate {
  position: fixed;
  inset: 0;
  z-index: 108;
  display: grid;
  padding: 28px;
  place-items: center;
  overflow-y: auto;
  background:
    radial-gradient(circle at 78% 16%, rgba(241, 193, 77, 0.55), transparent 20%),
    radial-gradient(circle at 18% 84%, rgba(47, 124, 116, 0.16), transparent 26%),
    linear-gradient(135deg, #fdf7eb 0%, #f8edda 52%, #f5e8d3 100%);
  transition: opacity 0.5s var(--ease), visibility 0.5s;
}

.gate::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.08;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.gate-decor {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}

.gate-decor--sun {
  top: -90px;
  right: -60px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: var(--sun);
  opacity: 0.8;
  box-shadow: inset -28px -18px 0 rgba(227, 106, 78, 0.28);
}

.gate-decor--worm {
  bottom: 5%;
  left: 3%;
  color: rgba(47, 124, 116, 0.26);
  font-family: var(--fun);
  font-size: clamp(80px, 18vw, 240px);
  line-height: 1;
  transform: rotate(-16deg);
}

.gate-decor--flower {
  top: 18%;
  left: 8%;
  color: var(--coral);
  font-size: clamp(34px, 6vw, 72px);
  opacity: 0.7;
  transform: rotate(-12deg);
}

.gate-card {
  position: relative;
  z-index: 2;
  width: min(590px, 100%);
  padding: clamp(30px, 5vw, 58px);
  border: 2px solid var(--cocoa);
  border-radius: 34px;
  background: rgba(255, 250, 242, 0.94);
  box-shadow: 10px 11px 0 var(--cocoa), 24px 32px 0 rgba(44, 33, 27, 0.1);
  color: var(--cocoa);
  transform: rotate(-0.4deg);
  animation: gate-arrive 0.7s var(--ease) both;
}

@keyframes gate-arrive {
  from {
    opacity: 0;
    transform: translateY(24px) rotate(-1.4deg) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(-0.4deg) scale(1);
  }
}

.gate-card h1 {
  margin: 26px 0 20px;
  font-family: var(--fun);
  font-size: clamp(42px, 6vw, 68px);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.14;
}

.gate-card h1 em {
  color: var(--coral);
  font-style: normal;
}

.gate-lead {
  max-width: 440px;
  margin: 0 0 30px;
  color: var(--paper-dim);
  font-size: 13px;
  letter-spacing: 0.04em;
  line-height: 2;
}

.gate-form > label {
  display: block;
  margin-bottom: 9px;
  color: var(--teal);
  font-family: var(--fun);
  font-size: 10px;
  letter-spacing: 0.15em;
}

.gate-field {
  display: flex;
  gap: 10px;
}

.gate-field input {
  min-width: 0;
  flex: 1;
  height: 58px;
  padding: 0 22px;
  border: 2px solid var(--cocoa);
  border-radius: 999px;
  outline: none;
  background: var(--cream-bright);
  color: var(--cocoa);
  font-family: var(--sans);
  font-size: 16px;
  letter-spacing: 0.12em;
  transition: box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}

.gate-field input:focus {
  background: #ffffff;
  box-shadow: 4px 4px 0 var(--sun);
}

.gate-field input::placeholder {
  color: #aa9a8a;
  letter-spacing: 0.04em;
}

.gate-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  min-width: 154px;
  height: 58px;
  padding: 0 22px;
  border: 2px solid var(--cocoa);
  border-radius: 999px;
  background: var(--coral);
  color: var(--cream-bright);
  box-shadow: 3px 3px 0 var(--cocoa);
  font-family: var(--fun);
  font-size: 12px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.gate-submit:hover:not(:disabled) {
  background: var(--teal);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--cocoa);
}

.gate-submit:disabled {
  cursor: wait;
  opacity: 0.65;
}

.gate-error {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--coral-deep);
  font-size: 11px;
  letter-spacing: 0.05em;
}

.gate-note {
  margin: 16px 0 0;
  color: var(--paper-faint);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.gate-foot {
  position: absolute;
  right: 32px;
  bottom: 24px;
  z-index: 2;
  color: rgba(44, 33, 27, 0.42);
  font-family: var(--fun);
  font-size: 9px;
  letter-spacing: 0.18em;
}

.gate.is-shaking .gate-card {
  animation: gate-shake 0.45s var(--ease);
}

@keyframes gate-shake {
  0%,
  100% {
    transform: rotate(-0.4deg) translateX(0);
  }
  20% {
    transform: rotate(-0.4deg) translateX(-7px);
  }
  40% {
    transform: rotate(-0.4deg) translateX(6px);
  }
  60% {
    transform: rotate(-0.4deg) translateX(-4px);
  }
  80% {
    transform: rotate(-0.4deg) translateX(3px);
  }
}

/* ------------------------------------------------------------------ */
/* Intro                                                                */
/* ------------------------------------------------------------------ */

.intro {
  color: var(--cocoa);
  background:
    radial-gradient(circle at 83% 17%, rgba(241, 193, 77, 0.48), transparent 21%),
    radial-gradient(circle at 68% 78%, rgba(47, 124, 116, 0.14), transparent 28%),
    linear-gradient(
      96deg,
      rgba(252, 247, 237, 0.99) 0%,
      rgba(252, 247, 237, 0.97) 33%,
      rgba(252, 247, 237, 0.78) 58%,
      rgba(252, 247, 237, 0.12) 100%
    );
}

.intro::after {
  opacity: 0.07;
}

.intro-wash {
  top: -24%;
  right: -4%;
  background: radial-gradient(circle, rgba(241, 193, 77, 0.24), transparent 64%);
}

.intro .eyebrow {
  color: var(--coral);
}

.intro .eyebrow-line {
  background: var(--coral);
}

.hero-title {
  position: relative;
}

.hero-title h1 {
  color: var(--cocoa);
  font-family: var(--fun);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-shadow: none;
  text-decoration: underline wavy rgba(241, 193, 77, 0.9);
  text-decoration-thickness: 5px;
  text-underline-offset: 0.08em;
}

.hero-title h1 span:last-child {
  color: var(--coral);
}

.hero-latin {
  border-left-color: var(--coral);
  color: var(--teal);
  font-family: var(--fun);
  letter-spacing: 0.3em;
}

.hero-cn {
  color: var(--cocoa);
  font-family: var(--fun);
  font-weight: 500;
}

.hero-cn::before {
  width: 64px;
  height: 4px;
  border-radius: 4px;
  background: var(--coral);
  transform: rotate(-1.5deg);
}

.hero-copy {
  color: #6e5d51;
}

.hero-hint {
  color: #8d7c6b;
}

.hero-sticker {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  align-self: flex-start;
  gap: 3px;
  margin: 0 0 4px 8px;
  padding: 9px 13px 8px;
  border: 2px solid var(--cocoa);
  border-radius: 13px;
  background: var(--sun);
  color: var(--cocoa);
  box-shadow: 3px 3px 0 var(--cocoa);
  font-family: var(--fun);
  font-size: 12px;
  letter-spacing: 0.08em;
  line-height: 1.15;
  transform: rotate(6deg);
  white-space: nowrap;
}

.hero-sticker small {
  color: var(--coral-deep);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.key-guide {
  border-top-color: rgba(44, 33, 27, 0.14);
}

.key-guide-item {
  color: #716055;
}

.key-guide kbd {
  border-color: rgba(44, 33, 27, 0.22);
  background: rgba(255, 250, 242, 0.78);
  color: var(--cocoa-soft);
}

.mouse-glyph {
  border-color: rgba(44, 33, 27, 0.34);
}

.mouse-glyph::after {
  background: var(--coral);
}

.touch-guide {
  border-top-color: rgba(44, 33, 27, 0.14);
}

.touch-guide-item {
  color: #716055;
}

.touch-stick-glyph {
  border-color: rgba(44, 33, 27, 0.28);
}

.touch-stick-glyph::after {
  background: var(--coral);
}

.touch-swipe-glyph::before {
  background: rgba(44, 33, 27, 0.3);
}

.touch-swipe-glyph::after {
  border-color: var(--coral);
}

.touch-tap-glyph::before {
  border-color: rgba(44, 33, 27, 0.3);
}

.touch-tap-glyph::after {
  border-color: var(--coral);
}

.admin-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 9px;
  border: 1.5px solid var(--cocoa);
  border-radius: 999px;
  background: var(--coral);
  color: var(--cream-bright);
  font-family: var(--fun);
  font-size: 8px;
  letter-spacing: 0.08em;
  line-height: 1.2;
  vertical-align: middle;
}

.intro .admin-chip {
  margin-left: 5px;
  transform: translateY(-1px);
}

.intro-aside {
  border: 2px solid var(--cocoa);
  border-left: 2px solid var(--cocoa);
  border-radius: 24px;
  background: rgba(255, 250, 242, 0.9);
  box-shadow: 7px 8px 0 rgba(44, 33, 27, 0.88);
  color: var(--cocoa);
}

.aside-index {
  color: var(--coral);
}

.aside-title {
  color: var(--cocoa);
}

.aside-en {
  color: var(--paper-dim);
}

.aside-rule {
  background: var(--coral);
}

.aside-info {
  color: #7d6b5d;
}

.admin-hotspot {
  position: absolute;
  top: clamp(18px, 3vw, 36px);
  right: clamp(18px, 3vw, 36px);
  z-index: 5;
  display: grid;
  width: 46px;
  height: 46px;
  padding: 0;
  place-items: center;
  border: 2px solid var(--cocoa);
  border-radius: 50%;
  background: rgba(255, 250, 242, 0.9);
  color: var(--coral);
  box-shadow: 3px 3px 0 var(--cocoa);
  font-family: var(--fun);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}

.admin-hotspot:hover {
  background: var(--sun);
  transform: rotate(12deg) scale(1.05);
}

.admin-hotspot.is-admin {
  background: var(--coral);
  color: var(--cream-bright);
}

.admin-hotspot.is-tapped {
  animation: stamp-pop 0.32s var(--ease);
}

.admin-hotspot.is-working {
  animation: stamp-spin 1s linear infinite;
}

@keyframes stamp-pop {
  0% {
    transform: scale(0.86) rotate(-8deg);
  }
  55% {
    transform: scale(1.14) rotate(8deg);
  }
  100% {
    transform: scale(1) rotate(0);
  }
}

@keyframes stamp-spin {
  to {
    transform: rotate(360deg);
  }
}

.intro-confetti {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  user-select: none;
  font-family: var(--fun);
}

.intro-confetti--one {
  right: 8%;
  bottom: 20%;
  color: var(--teal);
  font-size: 38px;
  opacity: 0.36;
  transform: rotate(16deg);
}

.intro-confetti--two {
  top: 17%;
  left: 52%;
  color: var(--coral);
  font-size: 25px;
  opacity: 0.46;
  transform: rotate(-10deg);
}

.intro-footer {
  border-top-color: rgba(44, 33, 27, 0.14);
  color: rgba(44, 33, 27, 0.52);
}

.intro-footer-center {
  color: var(--coral);
}

/* ------------------------------------------------------------------ */
/* HUD                                                                  */
/* ------------------------------------------------------------------ */

.brand {
  gap: 11px;
  padding: 7px 14px 7px 10px;
  border: 1.5px solid rgba(44, 33, 27, 0.18);
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.86);
  color: var(--cocoa);
  box-shadow: 3px 3px 0 rgba(44, 33, 27, 0.82);
  backdrop-filter: blur(12px);
}

.brand-symbol {
  color: var(--coral);
}

.brand-copy strong {
  color: var(--cocoa);
  font-family: var(--fun);
  font-weight: 600;
}

.brand-copy small {
  color: var(--paper-dim);
}

.exhibition-tag span {
  color: var(--paper-dim);
}

.exhibition-tag strong {
  color: var(--cocoa);
  font-family: var(--fun);
}

.utility-button {
  border: 1.5px solid rgba(44, 33, 27, 0.2);
  background: rgba(255, 250, 242, 0.88);
  color: var(--cocoa);
  box-shadow: 2px 2px 0 rgba(44, 33, 27, 0.8);
  font-family: var(--fun);
  backdrop-filter: blur(12px);
}

.utility-button:hover {
  border-color: var(--cocoa);
  background: var(--sun);
  color: var(--cocoa);
}

.photo-icon {
  position: relative;
  display: block;
  width: 16px;
  height: 13px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
}

.photo-icon::before {
  content: "";
  position: absolute;
  top: 2px;
  right: 2px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

.photo-icon::after {
  content: "";
  position: absolute;
  right: 2px;
  bottom: 2px;
  left: 2px;
  height: 6px;
  background: currentColor;
  clip-path: polygon(0 100%, 34% 34%, 56% 65%, 72% 44%, 100% 100%);
}

.map-panel {
  border: 1.5px solid rgba(44, 33, 27, 0.22);
  border-radius: 20px;
  background: rgba(255, 250, 242, 0.88);
  color: var(--cocoa);
  box-shadow: 5px 6px 0 rgba(44, 33, 27, 0.8), 0 18px 50px rgba(44, 33, 27, 0.08);
  backdrop-filter: blur(18px) saturate(0.9);
}

.map-heading {
  border-bottom-color: rgba(44, 33, 27, 0.14);
  color: var(--paper-dim);
}

.map-heading span:last-child {
  color: var(--coral);
}

.map-foot span:first-child {
  color: var(--cocoa);
  font-family: var(--fun);
}

.map-foot span:last-child {
  color: var(--paper-dim);
}

.room-toast {
  min-width: 200px;
  padding: 10px 14px;
  border: 1.5px solid var(--cocoa);
  border-radius: 17px;
  background: rgba(255, 250, 242, 0.9);
  box-shadow: 4px 4px 0 rgba(44, 33, 27, 0.82);
  color: var(--cocoa);
}

#toast-code {
  color: var(--coral);
  font-family: var(--fun);
}

.room-toast strong {
  color: var(--cocoa);
  font-family: var(--fun);
}

.room-toast small {
  color: var(--paper-dim);
}

.reticle-dot {
  background: var(--cocoa);
  box-shadow: 0 0 0 2px rgba(255, 249, 239, 0.9);
}

.reticle.is-active .reticle-dot {
  background: var(--coral);
}

.reticle-ring {
  border-color: var(--coral);
}

.artwork-prompt {
  border: 1.5px solid var(--cocoa);
  border-radius: 18px;
  background: rgba(255, 250, 242, 0.94);
  color: var(--cocoa);
  box-shadow: 4px 4px 0 rgba(44, 33, 27, 0.82), 0 16px 50px rgba(44, 33, 27, 0.1);
}

.prompt-number {
  border-color: var(--coral);
  border-radius: 12px;
  color: var(--coral);
  font-family: var(--fun);
}

.prompt-copy strong {
  color: var(--cocoa);
  font-family: var(--fun);
}

.prompt-copy span {
  color: var(--paper-dim);
}

.prompt-action {
  border-left-color: rgba(44, 33, 27, 0.15);
  color: var(--paper-dim);
}

.prompt-action kbd {
  border-color: rgba(227, 106, 78, 0.4);
  color: var(--coral-deep);
}

.bottom-bar {
  background: linear-gradient(
    0deg,
    rgba(248, 241, 229, 0.96) 0%,
    rgba(248, 241, 229, 0.75) 35%,
    rgba(248, 241, 229, 0) 100%
  );
}

.visit-meta,
.movement-hints {
  color: #6e5d51;
}

.visit-meta .divider {
  background: rgba(44, 33, 27, 0.2);
}

.live-dot {
  background: var(--coral);
  box-shadow: 0 0 0 3px rgba(227, 106, 78, 0.14);
  animation: none;
}

.movement-hints kbd {
  border-color: rgba(44, 33, 27, 0.2);
  background: rgba(255, 250, 242, 0.74);
  color: var(--cocoa-soft);
}

.hud-notice {
  border: 1.5px solid var(--cocoa);
  border-radius: 14px;
  background: rgba(255, 250, 242, 0.96);
  color: var(--cocoa);
  box-shadow: 4px 4px 0 rgba(44, 33, 27, 0.8);
}

/* ------------------------------------------------------------------ */
/* Touch joystick                                                       */
/* ------------------------------------------------------------------ */

.joystick {
  border-color: rgba(44, 33, 27, 0.24);
  background:
    radial-gradient(circle at 50% 44%, rgba(241, 193, 77, 0.34), transparent 55%),
    rgba(255, 250, 242, 0.7);
  box-shadow: 4px 4px 0 rgba(44, 33, 27, 0.7);
}

.joystick-axis {
  border-color: rgba(44, 33, 27, 0.1);
}

.joystick-axis::before,
.joystick-axis::after {
  background: rgba(44, 33, 27, 0.12);
}

.joystick-knob {
  border-color: var(--cocoa);
  background: var(--coral);
  box-shadow: 2px 2px 0 var(--cocoa);
}

.joystick.is-active .joystick-knob {
  background: var(--sun);
}

.joystick-label,
.touch-look-label {
  color: rgba(44, 33, 27, 0.54);
}

body.is-touch-mode .artwork-prompt {
  color: var(--cocoa);
}

/* ------------------------------------------------------------------ */
/* Pause / help / detail                                                */
/* ------------------------------------------------------------------ */

.pause,
.help,
.detail,
.photos {
  background: rgba(44, 33, 27, 0.34);
  backdrop-filter: blur(14px) saturate(0.8);
}

.modal-shade,
.detail-shade {
  background: rgba(44, 33, 27, 0.42);
  backdrop-filter: blur(12px) saturate(0.85);
}

.pause-card {
  border: 2px solid var(--cocoa);
  border-radius: 28px;
  background: var(--cream-bright);
  color: var(--cocoa);
  box-shadow: 9px 9px 0 var(--cocoa);
}

.pause-card .eyebrow {
  color: var(--coral);
}

.pause-card h2 {
  font-family: var(--fun);
  font-weight: 600;
}

.pause-card > p:not(.eyebrow) {
  color: #756457;
}

.pause-card .primary-button {
  border-color: var(--cocoa);
  background: var(--coral);
  color: var(--cream-bright);
  box-shadow: 3px 3px 0 var(--cocoa);
}

.pause-card .primary-button:hover {
  border-color: var(--cocoa);
  background: var(--sun);
  color: var(--cocoa);
}

.pause-card > .text-button,
.pause-utilities .text-button {
  color: rgba(44, 33, 27, 0.6);
}

.pause-card > .text-button:hover,
.pause-utilities .text-button:hover {
  border-color: rgba(44, 33, 27, 0.4);
  color: var(--cocoa);
}

.pause-utilities {
  border-top-color: rgba(44, 33, 27, 0.14);
}

.pause-utilities span {
  color: rgba(44, 33, 27, 0.3);
}

.help-card {
  border: 2px solid var(--cocoa);
  border-radius: 28px;
  background: var(--cream-bright);
  color: var(--cocoa);
  box-shadow: 9px 9px 0 var(--cocoa);
}

.help-card h2 {
  font-family: var(--fun);
  font-weight: 600;
}

.help-card .eyebrow {
  color: var(--coral);
}

.help-lead {
  color: #756457;
}

.help-grid,
.touch-help {
  border-color: rgba(44, 33, 27, 0.16);
}

.help-grid > div,
.touch-help > div {
  border-color: rgba(44, 33, 27, 0.16);
}

.help-label {
  color: var(--teal);
}

.help-grid p,
.touch-help p {
  color: #5f5146;
}

.help-card kbd {
  border-color: rgba(44, 33, 27, 0.22);
  background: rgba(44, 33, 27, 0.04);
  color: var(--cocoa-soft);
}

.help-note {
  color: #8e7d6e;
}

.help-card .primary-button {
  border-color: var(--cocoa);
  background: var(--coral);
  color: var(--cream-bright);
  box-shadow: 3px 3px 0 var(--cocoa);
}

.help-card .primary-button:hover {
  border-color: var(--cocoa);
  background: var(--sun);
  color: var(--cocoa);
}

.help-card .close-button {
  border-color: rgba(44, 33, 27, 0.25);
  background: transparent;
  color: var(--cocoa);
}

.help-card .close-button:hover {
  border-color: var(--cocoa);
  background: var(--sun);
}

.detail-card {
  border: 2px solid var(--cocoa);
  border-radius: 28px;
  background: var(--cream-bright);
  color: var(--cocoa);
  box-shadow: 10px 10px 0 var(--cocoa);
}

.detail-media {
  background:
    radial-gradient(circle at 50% 48%, rgba(241, 193, 77, 0.12), transparent 55%),
    #1f1916;
}

.detail-copy {
  background: var(--cream-bright);
  color: var(--cocoa);
}

.detail-copy .eyebrow {
  color: var(--coral);
}

.detail-copy h2 {
  color: var(--cocoa);
  font-family: var(--fun);
  font-weight: 600;
}

.detail-byline {
  color: var(--cocoa-soft);
  font-family: var(--fun);
}

.byline-dot {
  background: var(--coral);
}

.detail-medium {
  color: var(--paper-dim);
}

.detail-rule {
  background: var(--coral);
}

.detail-description {
  color: #5d4d42;
  white-space: pre-line;
}

.detail-location {
  color: var(--paper-faint);
}

.location-dot {
  background: var(--coral);
}

.detail-actions .text-button,
.detail .text-button {
  color: var(--cocoa-soft);
}

.detail-actions .text-button:hover,
.detail .text-button:hover {
  border-color: rgba(44, 33, 27, 0.4);
  color: var(--cocoa);
}

.detail-close {
  border-color: rgba(255, 249, 239, 0.5);
  background: rgba(44, 33, 27, 0.8);
  color: var(--cream-bright);
}

.detail-close:hover {
  border-color: var(--sun);
  background: var(--coral);
}

.detail-index {
  color: var(--sun);
}

.detail-media-caption {
  color: rgba(255, 249, 239, 0.42);
}

/* ------------------------------------------------------------------ */
/* Photo manager                                                        */
/* ------------------------------------------------------------------ */

.photos {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  padding: 26px;
  place-items: center;
  transition: opacity 0.4s var(--ease), visibility 0.4s;
}

.photos-card {
  position: relative;
  z-index: 2;
  display: flex;
  width: min(1160px, 100%);
  max-height: 90vh;
  flex-direction: column;
  overflow: hidden;
  border: 2px solid var(--cocoa);
  border-radius: 30px;
  background: var(--cream-bright);
  box-shadow: 10px 10px 0 var(--cocoa);
  color: var(--cocoa);
  animation: card-in 0.55s var(--ease) both;
}

.photos-head {
  position: relative;
  padding: 32px 42px 22px;
  border-bottom: 1.5px dashed rgba(44, 33, 27, 0.2);
  background:
    radial-gradient(circle at 93% 4%, rgba(241, 193, 77, 0.34), transparent 24%),
    var(--cream-bright);
}

.photos-title-line {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
}

.photos-head h2 {
  margin: 10px 0 0;
  font-family: var(--fun);
  font-size: clamp(32px, 4.4vw, 52px);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.photos-count {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  padding: 9px 14px;
  border: 2px solid var(--cocoa);
  border-radius: 999px;
  background: var(--sun);
  color: var(--cocoa);
  font-family: var(--fun);
  font-size: 12px;
  letter-spacing: 0.06em;
  transform: rotate(2deg);
}

.photos-lead {
  max-width: 580px;
  margin: 12px 0 0;
  color: var(--paper-dim);
  font-size: 12px;
  letter-spacing: 0.04em;
  line-height: 1.9;
}

.photos-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 15px;
  color: var(--teal);
  font-family: var(--fun);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.photos-card > .close-button {
  top: 20px;
  right: 20px;
  z-index: 4;
  border-color: rgba(44, 33, 27, 0.25);
  background: var(--cream-bright);
  color: var(--cocoa);
}

.photos-card > .close-button:hover {
  border-color: var(--cocoa);
  background: var(--sun);
}

/* The eyebrow is gone, so leave a clean strip for the close button. */
.photos-head {
  padding-top: 58px;
}

@media (max-width: 900px) {
  .photos-head {
    padding-top: 54px;
  }
}

.photos-grid {
  display: grid;
  min-height: 0;
  flex: 1;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
}

.upload-panel {
  overflow-y: auto;
  padding: 28px 34px 30px;
  border-right: 1.5px dashed rgba(44, 33, 27, 0.2);
  background: #fffdf8;
}

.photo-list-panel {
  display: flex;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  padding: 24px 30px 26px;
}

.file-drop {
  position: relative;
  display: flex;
  min-height: 188px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  overflow: hidden;
  padding: 20px;
  border: 2px dashed var(--coral);
  border-radius: 22px;
  background: #fff6e9;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
}

.file-drop:hover,
.file-drop.is-dragging {
  border-color: var(--teal);
  background: #f3f8f3;
  transform: translateY(-1px);
}

.file-drop.is-disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.file-drop-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 2px solid var(--cocoa);
  border-radius: 50%;
  background: var(--sun);
  color: var(--cocoa);
  font-size: 24px;
  line-height: 1;
  box-shadow: 2px 2px 0 var(--cocoa);
}

.file-drop-text {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--cocoa);
  font-family: var(--fun);
  font-size: 15px;
  letter-spacing: 0.05em;
}

.file-drop-text small {
  color: var(--paper-faint);
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.file-preview {
  width: 100%;
  height: 188px;
  object-fit: cover;
}

.file-drop.has-file {
  padding: 0;
  border-style: solid;
  border-color: var(--cocoa);
}

.file-drop.has-file .file-drop-icon,
.file-drop.has-file .file-drop-text {
  display: none;
}

.form-field {
  margin-top: 17px;
}

.form-field > label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 7px;
  color: var(--teal);
  font-family: var(--fun);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.form-field > label span {
  color: var(--paper-faint);
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.03em;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1.5px solid rgba(44, 33, 27, 0.24);
  border-radius: 14px;
  outline: none;
  background: #fffdf9;
  color: var(--cocoa);
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.7;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--cocoa);
  background: #ffffff;
  box-shadow: 3px 3px 0 rgba(241, 193, 77, 0.72);
}

.upload-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 19px;
}

.upload-status {
  flex: 1;
  min-height: 18px;
  color: var(--teal);
  font-size: 9px;
  letter-spacing: 0.03em;
  line-height: 1.6;
}

.upload-status[data-tone="error"] {
  color: var(--coral-deep);
}

.upload-status[data-tone="success"] {
  color: var(--teal);
}

.upload-actions .primary-button {
  flex: 0 0 auto;
}

.photo-limit-note {
  margin: 14px 0 0;
  color: var(--paper-faint);
  font-size: 8px;
  letter-spacing: 0.04em;
  line-height: 1.7;
}

.photo-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.photo-tab {
  padding: 8px 13px;
  border: 1.5px solid rgba(44, 33, 27, 0.2);
  border-radius: 999px;
  background: transparent;
  color: var(--paper-dim);
  font-family: var(--fun);
  font-size: 10px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.photo-tab:hover {
  border-color: var(--cocoa);
  color: var(--cocoa);
}

.photo-tab.is-active {
  border-color: var(--cocoa);
  background: var(--cocoa);
  color: var(--cream-bright);
}

.photo-list {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding-right: 4px;
}

.photo-item {
  display: grid;
  grid-template-columns: 106px minmax(0, 1fr);
  min-height: 106px;
  overflow: hidden;
  border: 1.5px solid rgba(44, 33, 27, 0.2);
  border-radius: 17px;
  background: #fffdf9;
  box-shadow: 3px 3px 0 rgba(44, 33, 27, 0.08);
}

.photo-item > img {
  width: 106px;
  height: 100%;
  min-height: 106px;
  object-fit: cover;
}

.photo-item-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 11px 13px 10px;
}

.photo-item h3 {
  margin: 0;
  overflow: hidden;
  color: var(--cocoa);
  font-family: var(--fun);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-item-meta {
  margin: 3px 0 0;
  color: var(--paper-faint);
  font-size: 8px;
  letter-spacing: 0.03em;
}

.photo-item-description {
  display: -webkit-box;
  overflow: hidden;
  margin: 7px 0 0;
  color: #6a594d;
  font-size: 9px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.photo-delete {
  align-self: flex-start;
  margin-top: auto;
  padding: 0 0 2px;
  border: 0;
  border-bottom: 1px solid rgba(199, 79, 53, 0.4);
  background: transparent;
  color: var(--coral-deep);
  font-size: 8px;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.photo-delete:hover {
  border-color: var(--coral-deep);
}

.photo-list-empty {
  display: grid;
  min-height: 190px;
  place-items: center;
  margin: 0;
  padding: 20px;
  border: 1.5px dashed rgba(44, 33, 27, 0.2);
  border-radius: 18px;
  color: var(--paper-faint);
  font-family: var(--fun);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-align: center;
}

.photo-loading {
  margin: 0;
  padding: 20px;
  color: var(--paper-faint);
  font-family: var(--fun);
  font-size: 11px;
  text-align: center;
}

/* ------------------------------------------------------------------ */
/* Fatal                                                               */
/* ------------------------------------------------------------------ */

.fatal {
  background: rgba(248, 241, 229, 0.96);
}

.fatal-card {
  border: 2px solid var(--cocoa);
  border-radius: 26px;
  background: var(--cream-bright);
  color: var(--cocoa);
  box-shadow: 8px 8px 0 var(--cocoa);
}

.fatal-card h2 {
  font-family: var(--fun);
  font-weight: 600;
}

.fatal-card p:not(.eyebrow) {
  color: var(--paper-dim);
}

/* ------------------------------------------------------------------ */
/* Playful adjustments for old breakpoints                             */
/* ------------------------------------------------------------------ */

@media (max-width: 900px) {
  .photos {
    padding: 16px;
  }

  .photos-card {
    max-height: 93vh;
  }

  .photos-head {
    padding: 26px 26px 18px;
  }

  .photos-grid {
    display: block;
    overflow-y: auto;
  }

  .upload-panel {
    border-right: 0;
    border-bottom: 1.5px dashed rgba(44, 33, 27, 0.2);
  }

  .photo-list-panel {
    min-height: 300px;
    max-height: 42vh;
  }

  .photo-list {
    min-height: 140px;
  }
}

@media (max-width: 660px) {
  .gate {
    padding: 18px;
  }

  .gate-card {
    padding: 28px 22px 24px;
    border-radius: 26px;
    box-shadow: 7px 7px 0 var(--cocoa);
  }

  .gate-card h1 {
    margin-top: 20px;
  }

  .gate-field {
    flex-direction: column;
  }

  .gate-submit {
    width: 100%;
  }

  .gate-decor--sun {
    width: 190px;
    height: 190px;
    top: -70px;
    right: -70px;
  }

  .gate-decor--flower {
    top: 9%;
    left: 4%;
    font-size: 30px;
  }

  .gate-foot {
    right: 18px;
    bottom: 14px;
    font-size: 7px;
  }

  .hero-sticker {
    display: none;
  }

  .intro-confetti {
    display: none;
  }

  .admin-hotspot {
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    font-size: 19px;
  }

  .brand {
    padding: 6px 11px 6px 8px;
  }

  .brand-copy small {
    font-size: 6px;
  }

  #hud-admin {
    display: none;
  }

  .utility-button {
    width: 38px;
    height: 38px;
  }

  .map-panel {
    border-radius: 16px;
  }

  .room-toast {
    min-width: 160px;
    padding: 8px 11px;
  }

  .artwork-prompt {
    border-radius: 15px;
  }

  .photos {
    padding: 0;
  }

  .photos-card {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .photos-head {
    padding: 23px 22px 16px;
  }

  .photos-head h2 {
    font-size: 30px;
  }

  .photos-title-line {
    align-items: flex-start;
    gap: 8px;
  }

  .photos-count {
    min-width: 65px;
    padding: 7px 10px;
    font-size: 10px;
  }

  .photos-lead {
    font-size: 10px;
    line-height: 1.75;
  }

  .photos-meta {
    margin-top: 10px;
  }

  .upload-panel {
    padding: 20px 18px 22px;
  }

  .photo-list-panel {
    padding: 18px;
    max-height: none;
  }

  .file-drop {
    min-height: 155px;
  }

  .file-preview {
    height: 155px;
  }

  .photos-card > .close-button {
    top: 13px;
    right: 13px;
  }

  .photo-item {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .photo-item > img {
    width: 88px;
    min-height: 98px;
  }

  .photo-item h3 {
    font-size: 15px;
  }

  .pause-card,
  .help-card {
    border-radius: 22px;
    box-shadow: 6px 6px 0 var(--cocoa);
  }

  .detail-card {
    border-radius: 0;
    border: 0;
    box-shadow: none;
  }

  .detail-media {
    border-radius: 0;
  }

  .intro .hero-title h1 {
    text-decoration-thickness: 3px;
  }
}

@media (max-height: 560px) {
  .gate-card {
    padding: 22px 26px;
    max-width: 560px;
  }

  .gate-card h1 {
    margin: 12px 0 10px;
    font-size: clamp(32px, 8vh, 46px);
  }

  .gate-lead {
    margin-bottom: 12px;
    font-size: 10px;
    line-height: 1.7;
  }

  .gate-field input,
  .gate-submit {
    height: 46px;
  }

  .gate-note {
    margin-top: 8px;
  }

  .gate-decor--worm {
    display: none;
  }

  .hero-sticker {
    display: none;
  }

  .intro-confetti {
    display: none;
  }

  .photos-head {
    padding-top: 20px;
    padding-bottom: 12px;
  }

  .photos-head h2 {
    font-size: 28px;
  }

  .photos-lead {
    margin-top: 6px;
  }

  .photos-meta {
    margin-top: 6px;
  }
}

/* ------------------------------------------------------------------ */
/* Readable type: no decorative micro labels                            */
/* ------------------------------------------------------------------ */

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  padding: 0 !important;
  border: 0 !important;
  margin: -1px !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

.eyebrow,
small,
.hero-hint,
.hero-latin,
.key-guide,
.touch-guide,
.intro-footer,
.movement-hints,
.joystick-label,
.touch-look-label,
.gate-note,
.gate-foot,
.aside-index,
.aside-en,
.aside-rule,
.detail-media-caption {
  display: none !important;
}

#tab-all.is-hidden,
#admin-passcode-settings.is-hidden,
#photo-list-empty.is-hidden,
.admin-chip.is-hidden {
  display: none !important;
}

.gate-lead,
.photos-lead,
.help-note,
.detail-description,
.help-lead,
.fatal-card p,
.loading p {
  font-size: 14px;
}

.hero-copy {
  font-size: 15px;
  line-height: 1.9;
}

.gate-error {
  font-size: 13px;
}

.help-grid p,
.touch-help p,
.pause-card > p {
  font-size: 13px;
  line-height: 1.7;
}

.gate-form > label,
.admin-form > label,
.form-field > label,
.passcode-form > label {
  font-size: 13px;
}

.hero-sticker,
.admin-chip,
.exhibition-tag,
.map-heading,
.map-foot,
.room-toast code,
.room-toast strong,
.prompt-number,
.prompt-action,
.photos-count,
.photos-greeting,
.photo-tab,
.photo-item-meta,
.photo-delete,
.detail-index,
.detail-byline,
.detail-medium,
.detail-room-line,
.detail-location,
.help-label,
.pause-utilities,
.text-button,
.bottom-bar,
.visit-meta,
.photo-limit-note,
.upload-status {
  font-size: 13px;
}

.photos-meta,
.photo-list-empty,
.photo-loading,
.photo-loading-note {
  font-size: 14px;
}

.map-heading span,
.map-foot span,
.visit-meta span,
.room-toast > span,
.detail-byline span {
  font-size: 13px;
}

.room-toast strong {
  font-size: 18px;
}

.photo-item-description {
  font-size: 13px;
  line-height: 1.65;
}

.form-field input,
.form-field textarea,
.passcode-form input,
.admin-gate-card input {
  font-size: 14px;
}

.gate-field input {
  font-size: 14px;
}

.file-hint {
  color: var(--paper-faint);
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.02em;
  line-height: 1.6;
}

.detail-room-line {
  margin: 0 0 8px;
  color: var(--teal);
  font-family: var(--fun);
  letter-spacing: 0.04em;
}

.aside-info {
  font-size: 14px;
  line-height: 1.8;
}

.hero-actions .admin-chip {
  margin-left: 2px;
  align-self: center;
}

.primary-button,
.secondary-button,
.gate-submit {
  font-size: 13px;
}

.pause-utilities .text-button,
.detail-actions .text-button,
.detail-actions .primary-button {
  font-size: 13px;
}

.gate-error {
  font-size: 13px;
}

/* ------------------------------------------------------------------ */
/* Admin passcode gate                                                  */
/* ------------------------------------------------------------------ */

.admin-gate {
  z-index: 109;
}

.admin-gate-card {
  position: relative;
  width: min(470px, 100%);
  max-width: 470px;
}

.admin-gate-card h2 {
  margin: 6px 0 10px;
  font-family: var(--fun);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.12;
}

.admin-gate-card .close-button {
  top: 16px;
  right: 16px;
  z-index: 3;
  border-color: rgba(44, 33, 27, 0.25);
  background: var(--cream-bright);
  color: var(--cocoa);
}

.admin-gate-card .close-button:hover {
  border-color: var(--cocoa);
  background: var(--sun);
}

#admin-error {
  margin-top: 12px;
}

/* ------------------------------------------------------------------ */
/* Admin entry-passcode settings                                        */
/* ------------------------------------------------------------------ */

.passcode-settings {
  margin-top: 24px;
  padding: 20px;
  border: 1.5px dashed rgba(44, 33, 27, 0.24);
  border-radius: 18px;
  background: #f7f3e9;
}

.passcode-settings h3 {
  margin: 0;
  color: var(--cocoa);
  font-family: var(--fun);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.passcode-settings > p {
  margin: 7px 0 14px;
  color: var(--paper-dim);
  font-size: 13px;
  line-height: 1.7;
}

.passcode-form {
  display: grid;
  gap: 7px;
}

.passcode-form > label {
  margin-top: 5px;
  color: var(--teal);
  font-family: var(--fun);
  letter-spacing: 0.04em;
}

.passcode-form > input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid rgba(44, 33, 27, 0.24);
  border-radius: 13px;
  outline: none;
  background: #fffdf9;
  color: var(--cocoa);
  font-family: var(--sans);
  line-height: 1.6;
}

.passcode-form > input:focus {
  border-color: var(--cocoa);
  background: #ffffff;
  box-shadow: 3px 3px 0 rgba(241, 193, 77, 0.72);
}

.passcode-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.passcode-status {
  flex: 1;
  min-height: 18px;
  margin: 0;
  color: var(--teal);
  font-size: 13px;
  line-height: 1.6;
}

.passcode-status[data-tone="error"] {
  color: var(--coral-deep);
}

.passcode-status[data-tone="success"] {
  color: var(--teal);
}

.passcode-actions .primary-button {
  flex: 0 0 auto;
}

@media (max-width: 660px) {
  .admin-gate-card {
    width: 100%;
    max-width: none;
  }

  .admin-gate-card h2 {
    font-size: 34px;
  }

  .passcode-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .passcode-actions .primary-button {
    width: 100%;
  }
}

.photos-head {
  padding-top: 58px;
}
