@font-face {
  font-family: "Pretendard Variable";
  src: url("./assets/PretendardVariable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Clash Display";
  src: url("../../fonts/ClashDisplay-Semibold.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #080c0e;
  --ivory: #e9e5dc;
  --sand: #b3a79a;
  --copper: #8bcfe5;
  --amber: #ff6388;
  --line: #e9e5dc24;
  --accent-strong: #3182f6;
  --fill-pearl: linear-gradient(110deg, #ffffff 0%, #dfe6f2 18%, #ffffff 36%, #c9d5ea 54%, #ffffff 72%, #e6ecf6 88%, #ffffff 100%);
  font-family: "Pretendard Variable", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  color: var(--ivory);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, canvas:focus-visible { outline: 2px solid var(--copper); outline-offset: 5px; }
button[hidden], [hidden] { display: none !important; }
p { margin: 0; }
.exhibit { margin: 24px; border: 1px solid var(--line); min-height: calc(100svh - 48px); }
.masthead { height: 83px; margin: 0 35px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.brand { font-weight: 590; letter-spacing: -.01em; line-height: 1; color: #f7f8f8; display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; white-space: nowrap; flex: none; }
.brand-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; object-position: 62% 30%; display: block; flex: none; box-shadow: 0 0 0 1.5px color-mix(in oklab, var(--accent-strong) 70%, transparent); }
.brand-name { font-size: 1.12rem; font-weight: 800; letter-spacing: -.05em; }
.brand-name s { text-decoration: none; font-weight: 400; color: #8a8f98; margin: 0 .04em; }
.pearl-text { font-weight: inherit; background: var(--fill-pearl); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; }
.masthead-right { display: flex; align-items: center; gap: 24px; }
.edition { font-size: 11px; letter-spacing: 1.4px; color: var(--sand); white-space: nowrap; }
.back-link { font-size: 11px; display: inline-flex; gap: 12px; align-items: center; min-height: 44px; color: var(--sand); }
.back-link:hover { color: var(--ivory); }
.languages { display: flex; flex: none; }
.languages button { border: 0; background: transparent; min-width: 44px; min-height: 44px; padding: 10px; color: var(--sand); font-size: 11px; letter-spacing: .06em; }
.languages button[aria-pressed="true"] { color: var(--ivory); }
.languages button:hover { color: var(--copper); }
.gallery { position: relative; min-height: 520px; height: clamp(520px, calc(100svh - 305px), 900px); }
.intro { position: absolute; z-index: 2; left: 4.3%; top: 21%; pointer-events: none; }
.eyebrow { color: var(--copper); font-size: 11px; letter-spacing: 2.7px; margin-bottom: 27px; }
h1 { margin: 0 0 27px -4px; max-width: 4em; font-size: clamp(60px, 6vw, 92px); font-weight: 600; line-height: 1.07; letter-spacing: -.065em; word-break: keep-all; }
h1 > span, .introduction > span { display: block; }
h1 > span:empty { display: none; }
html[lang="en"] h1 { font-family: "Clash Display", "Pretendard Variable", sans-serif; font-size: clamp(48px, 5vw, 76px); font-weight: 600; line-height: .98; letter-spacing: -.045em; }
.introduction { color: var(--sand); font-size: 13px; font-weight: 400; line-height: 1.8; letter-spacing: -.02em; }
.english-title { font-size: 11px; color: #a79f93; letter-spacing: 2.5px; margin-top: 28px; }
.artwork { position: absolute; width: 78%; height: 100%; right: 0; top: 0; isolation: isolate; }
#tide-canvas { width: 100%; height: 100%; display: block; touch-action: pan-y; outline-offset: -8px; opacity: 0; transition: opacity 400ms ease; }
.artwork[data-state="ready"] #tide-canvas { opacity: 1; }
.scene-caption { position: absolute; left: 12%; bottom: 25px; pointer-events: none; color: var(--sand); font-size: 11px; line-height: 1.9; }
.scene-caption > span { color: var(--copper); font-size: 11px; letter-spacing: 1.8px; }
.scene-caption p { margin-top: 4px; }
.loading-note { position: absolute; bottom: 26px; right: 35px; max-width: 250px; font-size: 11px; line-height: 1.8; text-align: right; color: var(--sand); pointer-events: none; }
.artwork:not([data-state="loading"]) .loading-note { display: none; }
.artwork:not([data-state="ready"]) #tide-canvas { visibility: hidden; }
.artwork:not([data-state="ready"]) .scene-caption { display: none; }
.fallback { position: absolute; inset: 0; display: none; flex-direction: column; justify-content: center; align-items: center; pointer-events: none; }
.artwork[data-state="fallback"] .fallback, .artwork[data-state="context-lost"] .fallback, .artwork[data-state="context-restored"] .fallback { display: flex; }
.fallback img { display: block; width: 94%; height: auto; max-height: 78%; object-fit: contain; mix-blend-mode: screen; filter: grayscale(1) sepia(.4) hue-rotate(155deg) saturate(1.8); }
.fallback p { max-width: 420px; padding: 0 20px; font-size: 11px; color: var(--sand); text-align: center; line-height: 1.7; white-space: pre-line; }
.fallback .text-button { pointer-events: auto; }
.exhibit-footer { border-top: 1px solid var(--line); margin: 0 35px; padding: 27px 0 15px; }
.footer-main { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.closing-line { font-family: "Clash Display", sans-serif; font-size: clamp(18px, 1.6vw, 23px); font-weight: 600; letter-spacing: .005em; line-height: 1.4; text-wrap: balance; }
.modes { display: flex; align-items: center; gap: 26px; }
.mode-button { position: relative; border: 0; border-bottom: 1px solid transparent; padding: 12px 7px 14px; min-height: 48px; min-width: 80px; background: transparent; font-size: 13px; color: var(--sand); white-space: nowrap; }
.mode-index { font-family: "Clash Display", sans-serif; font-size: 11px; letter-spacing: .6px; margin-right: 7px; }
.mode-button[aria-pressed="true"] { color: var(--ivory); border-bottom-color: var(--amber); }
.mode-button[aria-pressed="true"]::before { content: ""; width: 4px; height: 4px; background: var(--amber); border-radius: 50%; position: absolute; left: -4px; top: 22px; }
.mode-button:hover:not(:disabled) { color: var(--ivory); }
.footer-meta { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 0 24px; color: var(--sand); font-size: 11px; line-height: 1.8; letter-spacing: .2px; }
.footer-meta > p:nth-child(2) { margin-left: auto; }
.text-button { border: 0; background: transparent; font-size: 11px; color: var(--sand); padding: 10px 0 10px 10px; min-height: 44px; }
.text-button:hover:not(:disabled) { color: var(--copper); }
.text-button .button-icon { padding-left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.noscript-note { text-align: center; font-size: 12px; color: var(--sand); padding: 12px; }

@media (min-width: 1600px) {
  .intro { left: 5%; }
  .artwork { width: 79%; }
}

@media (max-width: 1000px) and (min-width: 701px) {
  .exhibit { margin: 16px; min-height: calc(100svh - 32px); }
  .masthead, .exhibit-footer { margin-left: 25px; margin-right: 25px; }
  .masthead-right { gap: 14px; }
  .intro { left: 4%; top: 24%; }
  .artwork { width: 78%; }
  .introduction { max-width: 205px; }
  .modes { gap: 10px; }
  .closing-line { font-size: 19px; }
  .edition { letter-spacing: .8px; }
  .footer-meta > p:first-child { flex-basis: 100%; }
  .footer-meta > p:nth-child(2) { margin-left: 0; flex: 1; }
}

@media (max-width: 700px) {
  .exhibit { margin: 12px; min-height: calc(100svh - 24px); }
  .masthead { height: 64px; margin: 0 16px; gap: 10px; }
  .masthead-right { gap: 10px; }
  .edition { display: none; }
  .back-link { font-size: 11px; gap: 8px; }
  .gallery { height: auto; min-height: 0; display: flex; flex-direction: column; }
  .intro { position: relative; left: auto; top: auto; padding: 27px 24px 0; min-height: 248px; }
  html[lang="en"] .intro { min-height: 278px; }
  .eyebrow { font-size: 11px; letter-spacing: 2px; margin-bottom: 14px; }
  h1 { font-size: 53px; margin: 0 0 15px -2px; }
  html[lang="en"] h1 { font-size: 48px; }
  .introduction { font-size: 12px; line-height: 1.8; }
  .english-title { position: absolute; right: 21px; top: 94px; font-size: 11px; letter-spacing: 2px; writing-mode: vertical-rl; margin-top: 0; }
  .artwork { position: relative; width: 100%; height: clamp(310px, 88vw, 420px); flex: none; }
  .scene-caption { left: 24px; bottom: 9px; font-size: 11px; }
  .scene-caption > span { font-size: 11px; }
  .scene-caption p { margin-top: 0; }
  .loading-note { bottom: 5px; right: 15px; font-size: 11px; max-width: 180px; }
  .fallback p { font-size: 11px; }
  .fallback img { width: 100%; max-height: 76%; }
  .exhibit-footer { margin: 0 18px; padding-top: 18px; padding-bottom: 8px; }
  .footer-main { flex-direction: column; align-items: stretch; gap: 15px; }
  .closing-line { font-size: 18px; letter-spacing: .005em; }
  .modes { gap: 13px; justify-content: space-between; }
  .mode-button { flex: 1; min-width: 0; font-size: 12px; padding: 10px 5px 12px; min-height: 46px; }
  .mode-button[aria-pressed="true"]::before { left: 1px; top: 20px; }
  .mode-index { font-size: 11px; margin-right: 6px; }
  .footer-meta { gap: 0 12px; margin-top: 10px; font-size: 11px; }
  .footer-meta > p:first-child { flex-basis: 100%; }
  .footer-meta > p:nth-child(2) { margin-left: 0; }
  .text-button { margin-left: auto; font-size: 11px; }
  .desktop-hint { display: none; }
}

@media (max-width: 420px) {
  .back-link { display: none; }
}

@media (max-width: 360px) {
  .intro { padding-left: 18px; }
  .modes { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
  #tide-canvas { transition: none; }
}
