@font-face {
  font-family: "Tide Serif KR";
  src: url("./assets/type-study/SerifKR.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Tide Cormorant";
  src: url("./assets/type-study/CormorantItalic.woff2") format("woff2");
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: "Tide Condensed";
  src: url("./assets/type-study/Condensed.woff2") format("woff2");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: "Tide Brush KR";
  src: url("./assets/type-study/BrushKR.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Tide Caveat";
  src: url("./assets/type-study/Caveat.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

/* Approved Glass is the public default; explicit study queries keep the comparison UI. */
html[data-type][data-presentation="live"] .exhibit { margin-top: 24px; min-height: calc(100svh - 48px); }
html[data-type][data-presentation="live"] .gallery { height: clamp(520px, calc(100svh - 305px), 900px); }
@media (max-width: 900px) { html[data-type][data-presentation="live"] .gallery { height: auto; } }
@media (max-width: 700px) { html[data-type][data-presentation="live"] .exhibit { margin-top: 12px; min-height: calc(100svh - 24px); } html[data-type][data-presentation="live"] .gallery { height: auto; } }
html[data-type] .type-study-nav {
  min-height: 56px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--sand);
  font-size: 11px;
  font-weight: 400;
}

html[data-type] .type-study-label { white-space: nowrap; }
html[data-type] .type-study-choices { display: flex; gap: 4px; }
html[data-type] .type-study-choices button {
  min-width: 44px;
  min-height: 44px;
  padding: 8px;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  font-size: 12px;
  color: var(--sand);
}
html[data-type] .type-study-choices button[aria-pressed="true"] {
  border-bottom-color: var(--amber);
  color: var(--ivory);
}
html[data-type] .type-study-choices button:hover,
html[data-type] .type-study-overview:hover { color: var(--ivory); }
html[data-type] .type-study-overview {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 8px 0;
  margin-left: auto;
  white-space: nowrap;
}
html[data-type] .exhibit { margin-top: 0; min-height: calc(100svh - 104px); }
html[data-type] .gallery { height: clamp(520px, calc(100svh - 361px), 900px); }
html[data-type] h1 {
  max-width: none;
  margin: 0;
  font-family: "Pretendard Variable", sans-serif;
  font-size: inherit;
  font-weight: 300;
  line-height: 1;
  letter-spacing: 0;
  color: var(--ivory);
  font-synthesis: none;
}
html[data-type] h1 > span { white-space: nowrap; }
html[data-type] .eyebrow {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .15em;
  color: var(--ivory);
}
html[data-type] .introduction {
  max-width: none;
  font-size: 12px;
  font-weight: 350;
  line-height: 1.9;
  letter-spacing: 0;
}
html[data-type] .english-title { display: none; }
html[data-type] .closing-line {
  font-family: "Pretendard Variable", sans-serif;
  font-size: 12px;
  font-weight: 350;
  line-height: 1.7;
  letter-spacing: .01em;
}
html[data-type] .mode-button { font-size: 12px; font-weight: 400; }
html[data-type] .mode-index { font-family: "Pretendard Variable", sans-serif; font-weight: 400; }
html[data-type] .footer-meta { font-size: 11px; font-weight: 400; }

/* A — a small literary opening, then a long serif exhalation. */
html[data-type="a"] .intro {
  top: 12%;
  left: 5%;
  width: clamp(300px, 25vw, 360px);
}
html[data-type="a"] .eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
  color: var(--amber);
}
html[data-type="a"] .eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}
html[data-type="a"] h1 { font-family: "Tide Serif KR", serif; font-weight: 300; }
html[data-type="a"] h1 > span:first-child {
  font-size: clamp(42px, 3.6vw, 52px);
  letter-spacing: .08em;
  line-height: 1.4;
}
html[data-type="a"] h1 > span:nth-child(2) {
  margin-left: 16px;
  font-size: clamp(116px, 9.7vw, 140px);
  line-height: 1.2;
}
html[data-type="a"][lang="en"] h1 {
  font-family: "Tide Cormorant", serif;
  font-weight: 400;
  font-style: italic;
}
html[data-type="a"][lang="en"] h1 > span:first-child {
  font-size: clamp(100px, 8.3vw, 120px);
  letter-spacing: 0;
  line-height: .95;
}
html[data-type="a"][lang="en"] h1 > span:nth-child(2) {
  margin: 3px 0 3px 70px;
  font-size: 28px;
  line-height: 1.2;
}
html[data-type="a"][lang="en"] h1 > span:nth-child(3) {
  margin-left: 18px;
  font-size: clamp(76px, 6.3vw, 90px);
  line-height: 1.1;
}
html[data-type="a"] .introduction { margin-top: 42px; }
html[data-type="a"] .closing-line {
  font-family: "Tide Cormorant", "Tide Serif KR", serif;
  font-size: 18px;
  font-style: italic;
  font-weight: 300;
}

/* B — separate vertical columns; the description stays horizontal. */
html[data-type="b"] .intro {
  top: 9%;
  bottom: 9%;
  left: 5.5%;
  width: 240px;
  display: flex;
  flex-direction: column;
}
html[data-type="b"] .eyebrow { margin-bottom: 24px; letter-spacing: .09em; }
html[data-type="b"] h1 {
  position: relative;
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 24px;
  width: max-content;
  height: 300px;
  flex: none;
  font-weight: 200;
}
html[data-type="b"] h1::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 0;
  height: 270px;
  border-left: 1px solid #e9e5dc60;
}
html[data-type="b"] h1 > span {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 40px;
  line-height: 1;
  letter-spacing: 0;
}
html[data-type="b"] h1 > span:nth-child(2) { margin-top: 60px; font-size: 80px; }
html[data-type="b"][lang="en"] h1 { font-family: "Tide Condensed", sans-serif; font-weight: 300; }
html[data-type="b"][lang="en"] h1 > span { font-size: 54px; letter-spacing: .01em; }
html[data-type="b"][lang="en"] h1 > span:nth-child(2) { font-size: 26px; }
html[data-type="b"][lang="en"] h1 > span:nth-child(3) { margin-top: 36px; }
html[data-type="b"] .introduction { margin-top: auto; padding-top: 24px; }

/* C — outline letters sit on the low horizon, leaving the stage intact. */
html[data-type="c"] .intro { inset: 0; width: auto; }
html[data-type="c"] .eyebrow { position: absolute; top: 8%; left: 4%; margin: 0; }
html[data-type="c"] .introduction {
  position: absolute;
  top: calc(8% + 29px);
  left: 4%;
  max-width: 310px;
}
html[data-type="c"] h1 { position: absolute; bottom: 55px; left: 4%; }
html[data-type="c"] h1 > span:first-child {
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 300;
  letter-spacing: .36em;
  line-height: 1.6;
}
html[data-type="c"] h1 > span:nth-child(2) {
  font-size: 200px;
  font-weight: 200;
  line-height: 1.13;
  color: transparent;
  -webkit-text-stroke: 1px var(--ivory);
}
html[data-type="c"][lang="en"] h1 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-family: "Tide Condensed", sans-serif;
  font-weight: 300;
}
html[data-type="c"][lang="en"] h1 > span:first-child {
  margin: 0;
  font-size: 160px;
  letter-spacing: 0;
  line-height: 1.1;
  color: transparent;
  -webkit-text-stroke: 1px var(--ivory);
}
html[data-type="c"][lang="en"] h1 > span:nth-child(2),
html[data-type="c"][lang="en"] h1 > span:nth-child(3) {
  font-size: 30px;
  font-weight: 300;
  line-height: 1.3;
  color: var(--ivory);
  -webkit-text-stroke: 0;
}
html[data-type="c"] .scene-caption { left: auto; right: 4%; bottom: 20px; text-align: right; }

/* D — warm hand-lettering, with the original words and no painted effects. */
html[data-type="d"] .intro { top: 15%; left: 5%; width: 360px; }
html[data-type="d"] .eyebrow { margin-bottom: 24px; }
html[data-type="d"] h1 {
  width: max-content;
  font-family: "Tide Brush KR", cursive;
  font-weight: 400;
  letter-spacing: 0;
}
html[data-type="d"] h1 > span:first-child {
  margin-left: 4px;
  font-size: 72px;
  line-height: 1.15;
  transform: rotate(-5deg);
}
html[data-type="d"] h1 > span:nth-child(2) {
  margin-left: 38px;
  font-size: 150px;
  line-height: 1.05;
  transform: rotate(2deg);
}
html[data-type="d"] h1::after {
  content: "";
  display: block;
  width: 94px;
  height: 12px;
  margin: 8px 0 0 32px;
  border-bottom: 1px solid var(--amber);
  border-radius: 0 0 50% 50%;
  transform: rotate(-5deg);
}
html[data-type="d"][lang="en"] h1 { font-family: "Tide Caveat", cursive; }
html[data-type="d"][lang="en"] h1 > span:first-child { font-size: 108px; line-height: .95; }
html[data-type="d"][lang="en"] h1 > span:nth-child(2) {
  margin-left: 80px;
  font-size: 36px;
  line-height: 1.05;
}
html[data-type="d"][lang="en"] h1 > span:nth-child(3) {
  margin-left: 18px;
  font-size: 100px;
  line-height: 1;
  transform: rotate(-3deg);
}
html[data-type="d"] .introduction { margin-top: 32px; }
html[data-type="d"] .closing-line {
  font-family: "Tide Caveat", cursive;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0;
}

/* Stack before the literary columns can crowd the whale's head. */
@media (max-width: 900px) {
  html[data-type] .gallery {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
  }
  html[data-type] .intro {
    position: relative;
    inset: auto;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    padding: 36px 6% 30px;
    flex: none;
  }
  html[data-type] .artwork {
    position: relative;
    inset: auto;
    width: 100%;
    height: clamp(320px, 60vw, 480px);
    flex: none;
  }
  html[data-type] .introduction { max-width: 340px; }
  html[data-type] .footer-main { flex-direction: column; align-items: stretch; gap: 15px; }
  html[data-type] .modes { justify-content: space-between; }
  html[data-type="b"] .intro { padding-left: 8%; }
  html[data-type="b"] .introduction { margin-top: 24px; padding-top: 0; }
  html[data-type="c"] .artwork { order: 0; }
  html[data-type="c"] .intro { order: 1; display: flex; flex-direction: column; padding-top: 16px; }
  html[data-type="c"] h1 { position: static; order: 0; }
  html[data-type="c"] h1 > span:nth-child(2) { font-size: 160px; }
  html[data-type="c"] .eyebrow { position: static; order: 1; margin-top: 28px; }
  html[data-type="c"] .introduction { position: static; order: 2; margin-top: 10px; }
  html[data-type="c"] .scene-caption { left: 6%; right: auto; bottom: 10px; text-align: left; }
}

@media (max-width: 600px) {
  html[data-type] .type-study-nav { min-height: 100px; padding: 4px 18px; gap: 0 12px; flex-wrap: wrap; }
  html[data-type] .type-study-label { order: 0; }
  html[data-type] .type-study-overview { order: 1; }
  html[data-type] .type-study-choices { order: 2; flex-basis: 100%; justify-content: space-between; }
  html[data-type] .type-study-choices button { flex: 1; }
  html[data-type] .exhibit { min-height: calc(100svh - 124px); }
  html[data-type] .intro { padding: 26px 20px 28px; }
  html[data-type] .artwork { height: clamp(310px, 88vw, 420px); }
  html[data-type] .eyebrow { margin-bottom: 22px; }
  html[data-type] .introduction { font-size: 12px; }
  html[data-type="a"] h1 > span:first-child { font-size: 30px; }
  html[data-type="a"] h1 > span:nth-child(2) { font-size: 82px; }
  html[data-type="a"][lang="en"] h1 > span:first-child { font-size: 70px; }
  html[data-type="a"][lang="en"] h1 > span:nth-child(2) { font-size: 22px; margin-left: 48px; }
  html[data-type="a"][lang="en"] h1 > span:nth-child(3) { font-size: 60px; margin-left: 12px; }
  html[data-type="a"] .introduction { margin-top: 28px; }
  html[data-type="b"] .intro { padding-left: 30px; }
  html[data-type="b"] h1 { height: 220px; max-height: 220px; }
  html[data-type="b"] h1::before { height: 210px; }
  html[data-type="b"] .introduction { margin-top: 24px; }
  html[data-type="c"] .intro { padding-top: 16px; }
  html[data-type="c"] h1 > span:first-child { font-size: 12px; }
  html[data-type="c"] h1 > span:nth-child(2) { font-size: 110px; }
  html[data-type="c"][lang="en"] h1 { gap: 8px; }
  html[data-type="c"][lang="en"] h1 > span:first-child { font-size: 110px; }
  html[data-type="c"][lang="en"] h1 > span:nth-child(2),
  html[data-type="c"][lang="en"] h1 > span:nth-child(3) { font-size: 22px; }
  html[data-type="c"] .eyebrow { margin-bottom: 0; }
  html[data-type="d"] h1 > span:first-child { font-size: 54px; }
  html[data-type="d"] h1 > span:nth-child(2) { font-size: 108px; margin-left: 24px; }
  html[data-type="d"][lang="en"] h1 > span:first-child { font-size: 72px; }
  html[data-type="d"][lang="en"] h1 > span:nth-child(2) { font-size: 25px; margin-left: 60px; }
  html[data-type="d"][lang="en"] h1 > span:nth-child(3) { font-size: 68px; margin-left: 14px; }
}

@font-face {
  font-family: "Tide Maru";
  src: url("./assets/thin-study/MaruExtraLight.woff2") format("woff2");
  font-style: normal;
  font-weight: 200;
  font-display: swap;
}

@font-face {
  font-family: "Tide Hahmlet";
  src: url("./assets/thin-study/Hahmlet.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Tide Italiana";
  src: url("./assets/thin-study/Italiana.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Tide Raleway";
  src: url("./assets/thin-study/Raleway.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Tide Poiret";
  src: url("./assets/thin-study/Poiret.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Tide Gothic Thin";
  src: url("./assets/thin-study/GothicThin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100;
  font-display: swap;
}

/* A's composition stays fixed; these faces change only the letterforms. */
html[data-type="a"][data-face="silk"] h1,
html[data-type="a"][data-face="glass"] h1,
html[data-type="a"][data-face="moon"] h1,
html[data-type="a"][data-face="silk"] .closing-line,
html[data-type="a"][data-face="glass"] .closing-line,
html[data-type="a"][data-face="moon"] .closing-line {
  font-style: normal;
  font-synthesis: none;
}

html[data-type="a"][data-face="silk"] h1 {
  font-family: "Tide Maru", serif;
  font-weight: 200;
}
html[data-type="a"][data-face="silk"][lang="en"] h1 {
  font-family: "Tide Italiana", serif;
  font-weight: 400;
}
html[data-type="a"][data-face="silk"] .closing-line {
  font-family: "Tide Italiana", serif;
  font-size: 18px;
  font-weight: 400;
}

html[data-type="a"][data-face="glass"] h1 {
  font-family: "Tide Gothic Thin", sans-serif;
  font-weight: 100;
}
html[data-type="a"][data-face="glass"] h1 > span { letter-spacing: .035em; }
html[data-type="a"][data-face="glass"][lang="en"] h1 {
  font-family: "Tide Raleway", sans-serif;
  font-weight: 100;
}
html[data-type="a"][data-face="glass"][lang="en"] h1 > span { letter-spacing: -.025em; }
html[data-type="a"][data-face="glass"] .closing-line {
  font-family: "Pretendard Variable", sans-serif;
  font-size: 11px;
  font-weight: 400;
}

html[data-type="a"][data-face="moon"] h1 {
  font-family: "Tide Hahmlet", serif;
  font-weight: 100;
}
html[data-type="a"][data-face="moon"] h1 > span { letter-spacing: .01em; }
html[data-type="a"][data-face="moon"][lang="en"] h1 {
  font-family: "Tide Poiret", sans-serif;
  font-weight: 400;
}
html[data-type="a"][data-face="moon"][lang="en"] h1 > span { letter-spacing: .015em; }
html[data-type="a"][data-face="moon"] .closing-line {
  font-family: "Tide Poiret", sans-serif;
  font-size: 18px;
  font-weight: 400;
}

@media (max-width: 420px) {
  html[data-type="a"][data-face="silk"][lang="en"] h1 > span:nth-child(3),
  html[data-type="a"][data-face="glass"][lang="en"] h1 > span:nth-child(3),
  html[data-type="a"][data-face="moon"][lang="en"] h1 > span:nth-child(3) { font-size: 56px; }
}
