/* Kanit, self-hosted (SIL Open Font License) — Thai + Latin subsets, weights 200–500 */
@font-face { font-family: 'Kanit'; font-style: normal; font-weight: 200; font-display: swap; src: url('../fonts/kanit-200-thai.woff2') format('woff2'); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'Kanit'; font-style: normal; font-weight: 200; font-display: swap; src: url('../fonts/kanit-200-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Kanit'; font-style: normal; font-weight: 200; font-display: swap; src: url('../fonts/kanit-200-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Kanit'; font-style: normal; font-weight: 300; font-display: swap; src: url('../fonts/kanit-300-thai.woff2') format('woff2'); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'Kanit'; font-style: normal; font-weight: 300; font-display: swap; src: url('../fonts/kanit-300-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Kanit'; font-style: normal; font-weight: 300; font-display: swap; src: url('../fonts/kanit-300-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Kanit'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/kanit-400-thai.woff2') format('woff2'); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'Kanit'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/kanit-400-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Kanit'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/kanit-400-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Kanit'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/kanit-500-thai.woff2') format('woff2'); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'Kanit'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/kanit-500-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Kanit'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/kanit-500-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* =========================================================
   Frame of Memories — การประกวดภาพถ่าย & ภาพวาด
   Theme: Vintage scrapbook · Cream / White minimal
   ========================================================= */

:root {
  --paper: #f6f1e7;
  --paper-2: #efe7d6;
  --white: #fffdf8;
  --ink: #2f2922;
  --ink-2: #5e5345;
  --muted: #8b7f6e;
  --accent: #9a6a3c;
  --accent-dark: #6f4c2a;
  --seal: #b0532f;
  --line: #ddd2bd;
  --dark: #29231c;
  --tape: rgba(226, 212, 178, 0.78);

  --font: "Kanit", system-ui, sans-serif;
  --radius: 14px;
  --shadow: 0 10px 30px -12px rgba(47, 41, 34, 0.35);
  --shadow-lg: 0 24px 50px -20px rgba(47, 41, 34, 0.5);
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 72px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* overflow-x on html too: on phones, body-only hidden doesn't stop a too-wide element from zooming the page out */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* subtle paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: .35;
  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='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .4 0 0 0 0 .33 0 0 0 0 .25 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
[hidden] { display: none !important; }
.nw { white-space: nowrap; } /* keep a Thai phrase on one line (Thai has no spaces to break at) */
.m-show { display: none; } /* text shown only on phones; .m-hide is its desktop-only twin (see 640px block) */
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; line-height: 1.15; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.container { width: min(100% - var(--gutter) * 2, var(--container)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Typography ---------- */
.display {
  font-weight: 300;
  font-size: clamp(2.4rem, 6.2vw, 5.2rem);
  line-height: 1.14; /* Thai vowels/tone marks need room */
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.h2 {
  font-weight: 300;
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  line-height: 1.18;
  text-transform: uppercase;
  color: var(--ink-2);
}
.h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 400; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .82rem; font-weight: 400; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.lead { font-size: 1.08rem; color: var(--ink-2); max-width: 46ch; }
.hand { font-style: italic; font-weight: 300; color: var(--accent-dark); }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--ink); --fg: var(--white);
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--bg); color: var(--fg);
  font-size: .95rem; font-weight: 400; text-decoration: none;
  cursor: pointer;
  transition: transform .25s ease, background .25s ease, box-shadow .25s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--light { --bg: var(--white); --fg: var(--ink); }
.btn--ghost { --bg: transparent; --fg: var(--ink); border-color: var(--ink); }
.btn--ghost-light { --bg: transparent; --fg: var(--white); border-color: rgba(255,253,248,.7); }
.btn--sm { padding: 8px 18px; font-size: .88rem; }
.btn .arrow { transition: transform .25s ease; }
.btn:hover .arrow { transform: translateX(4px); }

.circle-link {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--ink); color: var(--white);
  text-decoration: none; font-size: .9rem;
  transition: transform .25s ease;
}
.circle-link:hover { transform: rotate(-45deg); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 14px; left: 0; right: 0;
  z-index: 100;
  padding-inline: var(--gutter);
}
.site-header__bar {
  max-width: var(--container); margin-inline: auto;
  height: 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 10px 0 22px;
  border-radius: 999px;
  background: rgba(41, 35, 28, 0.32);
  border: 1px solid rgba(255, 253, 248, 0.18);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: var(--white);
  transition: background .35s ease, color .35s ease, box-shadow .35s ease;
}
.site-header.is-scrolled .site-header__bar,
.site-header.is-solid .site-header__bar {
  background: rgba(255, 253, 248, 0.92);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo__mark {
  width: 24px; height: 26px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round;
}
.logo__bell { fill: var(--accent); }
.logo__text { font-size: .82rem; font-weight: 500; letter-spacing: .16em; white-space: nowrap; }

.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav ul { display: flex; gap: 22px; }
.site-nav a:not(.btn) {
  /* weight 400: at 300 the small Thai letters blur (ก reads like ด) */
  font-size: .9rem; font-weight: 400; text-decoration: none; opacity: .85; position: relative; padding: 4px 0;
  transition: opacity .2s ease;
}
.site-nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -3px; height: 1px; background: currentColor;
  transition: right .3s ease;
}
.site-nav a:not(.btn):hover, .site-nav a.is-active { opacity: 1; }
.site-nav a:not(.btn):hover::after, .site-nav a.is-active::after { right: 0; }
/* header buttons: always the dark ink style (same as the main form buttons) */
.site-nav .site-nav__cta, .site-nav .site-nav__login { --bg: var(--ink); --fg: var(--white); border-color: rgba(255,253,248,.18); }
.site-nav__login { gap: 6px; margin-left: 6px; margin-right: -12px; /* sit closer to the CTA */ }
/* account button: round icon on desktop, labelled pill in the mobile menu */
.site-nav a.site-nav__account {
  display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; flex: none; opacity: 1;
  border-radius: 50%; background: var(--ink); color: var(--white); border: 1px solid rgba(255,253,248,.18);
  transition: transform .25s ease, background .25s ease;
}
.site-nav a.site-nav__account::after { display: none; }
.site-nav a.site-nav__account:hover { transform: translateY(-2px); background: var(--seal); }
.site-nav__account svg { width: 16px; height: 16px; }
.site-nav__account-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.site-nav__actions { display: flex; align-items: center; gap: 12px; }

/* desktop: menu left · logo centre · actions right */
@media (min-width: 961px) {
  .site-header__bar { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; padding: 0 10px 0 26px; }
  .site-nav { display: contents; }
  .site-nav ul { grid-column: 1; grid-row: 1; justify-self: start; }
  .site-header__bar > .logo { grid-column: 2; grid-row: 1; }
  .site-nav__actions { grid-column: 3; grid-row: 1; justify-self: end; }
}

/* language switch — a little scrapbook stamp naming the *other* language */
.site-nav a.site-nav__lang {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; opacity: 1;
  font-size: .74rem; font-weight: 500; letter-spacing: .16em; text-decoration: none; white-space: nowrap;
  border: 1.5px dashed currentColor; border-radius: 4px; transform: rotate(-4deg);
  color: var(--seal); background: #fbefe9; transition: transform .25s ease;
}
.site-nav a.site-nav__lang::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--seal); }
.site-nav a.site-nav__lang::after { display: none; }
.site-nav a.site-nav__lang:hover { transform: rotate(0) scale(1.05); }
.site-nav a.site-nav__lang[lang="th"] { letter-spacing: .04em; } /* Thai label needs no wide tracking */
/* on the transparent bar over the hero photo */
.site-header:not(.is-scrolled):not(.is-solid) .site-nav__lang { color: #e7c98f; background: rgba(41,35,28,.35); }
@media (max-width: 960px) {
  .site-nav a.site-nav__lang { align-self: center; margin: 6px 0; color: var(--seal) !important; background: #fbefe9 !important; }
  .site-nav__actions { flex-direction: column; align-items: stretch; gap: 10px; }
  .site-nav a.site-nav__account { display: flex; gap: 8px; width: auto; height: auto; padding: 10px 16px; border-radius: 99px; justify-content: center; }
  .site-nav__account-text { position: static; width: auto; height: auto; overflow: visible; clip: auto; font-size: .9rem; }
}
.site-nav__login::before { content: ""; width: 14px; height: 14px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 4-6 8-6s8 2 8 6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 4-6 8-6s8 2 8 6'/%3E%3C/svg%3E") center / contain no-repeat; }

.nav-toggle {
  display: none; width: 42px; height: 42px; border: 0; border-radius: 50%;
  background: transparent; cursor: pointer; position: relative;
}
.nav-toggle span {
  position: absolute; left: 11px; right: 11px; height: 1.5px; background: currentColor;
  transition: transform .3s ease, opacity .3s ease;
}
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 20px; }
.nav-toggle span:nth-child(3) { top: 26px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* reserve space before header loads to avoid layout shift */
[data-component="header"]:empty { height: 0; }

/* ---------- Torn paper edges ---------- */
.torn {
  position: absolute; left: 0; width: 100%; height: clamp(34px, 5vw, 70px);
  pointer-events: none; z-index: 3;
}
.torn--bottom { bottom: -2px; }
.torn--top { top: -2px; transform: scaleY(-1); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(100svh, 920px);
  display: grid; align-items: center;
  padding: calc(var(--header-h) + 60px) 0 120px;
  color: var(--white);
  isolation: isolate;
  overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; z-index: -2; }
.hero__bg img {
  width: 100%; height: 100%; object-fit: cover;
  filter: sepia(.35) saturate(.75) brightness(.9);
  transform: scale(1.06);
  animation: heroZoom 1.4s ease-out forwards; /* short settle: a long zoom keeps the screen "changing" and hurts Speed Index */
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(41,35,28,.45) 0%, rgba(41,35,28,.1) 40%, rgba(41,35,28,.55) 100%),
    radial-gradient(ellipse at 70% 40%, transparent 30%, rgba(41,35,28,.35) 100%);
}
@keyframes heroZoom { to { transform: scale(1); } }

.hero__inner { display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; align-items: center; }
.hero__content { grid-column: 2; }
.hero__title { margin-bottom: 26px; text-shadow: 0 2px 30px rgba(0,0,0,.25); }
.hero__title span { display: block; }
.hero__title .indent { padding-left: clamp(0px, 8vw, 120px); }
.hero__text { max-width: 44ch; font-size: 1rem; opacity: .92; margin-bottom: 28px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero__note {
  grid-column: 1; grid-row: 1;
  justify-self: center; align-self: start;
  margin-top: 40px;
}

/* handwritten ticket / tag */
.ticket {
  position: relative;
  display: inline-block;
  padding: 16px 22px 14px;
  background: var(--white);
  color: var(--ink-2);
  font-style: italic;
  font-size: .95rem; line-height: 1.35;
  transform: rotate(-7deg);
  box-shadow: var(--shadow);
}
.ticket strong { display: block; font-style: normal; font-weight: 500; color: var(--ink); font-size: 1.3rem; }
.ticket::before {
  content: ""; position: absolute; top: -12px; left: 50%; width: 70px; height: 22px;
  translate: -50% 0; rotate: 4deg; background: var(--tape);
}
.ticket--sm { font-size: .82rem; padding: 10px 16px; }

/* ---------- Sections ---------- */
.section { position: relative; padding: clamp(70px, 10vw, 130px) 0; }
.section--tight { padding: clamp(50px, 7vw, 90px) 0; }
.section--white { background: var(--white); }
.section__head { display: flex; justify-content: space-between; align-items: end; gap: 30px; flex-wrap: wrap; margin-bottom: clamp(36px, 5vw, 60px); }
.section__head .lead { margin: 0; }

/* About split */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(30px, 6vw, 80px); align-items: center; }
.split__text .h2 { margin-bottom: 26px; }
.collage { position: relative; min-height: 420px; }
.collage__envelope { position: absolute; width: 62%; left: 0; top: 10px; filter: drop-shadow(0 18px 24px rgba(47,41,34,.22)); }
.collage__sketch { position: absolute; width: 46%; right: 0; top: 70px; }
.collage__photo { position: absolute; width: 44%; left: 22%; bottom: 0; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: clamp(50px, 7vw, 90px); }
.stat { padding: 26px 20px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat__num { font-size: clamp(2rem, 4vw, 3rem); font-weight: 300; line-height: 1; color: var(--ink); }
.stat__label { font-size: .9rem; color: var(--muted); margin-top: 8px; }

/* Category cards */
.cards-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(20px, 3vw, 36px); }
.cat-card {
  position: relative; display: grid; grid-template-columns: 1fr 1.1fr; gap: 0;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-decoration: none;
  transition: transform .35s ease, box-shadow .35s ease;
}
.cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.cat-card__img { aspect-ratio: 4/5; overflow: hidden; }
.cat-card__img img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.25) saturate(.85); transition: transform .6s ease; }
.cat-card:hover .cat-card__img img { transform: scale(1.06); }
.cat-card__body { padding: clamp(20px, 3vw, 34px); display: flex; flex-direction: column; gap: 12px; }
.cat-card__num { font-size: .8rem; letter-spacing: .2em; color: var(--accent); }
.cat-card__body p { color: var(--ink-2); font-size: .95rem; }
.cat-card__body .circle-link { margin-top: auto; }

/* ---------- Scene (dark photo section with polaroids) ---------- */
.scene {
  position: relative; color: var(--white);
  padding: clamp(110px, 13vw, 170px) 0 clamp(120px, 14vw, 180px);
  isolation: isolate; overflow: hidden;
}
.scene__bg { position: absolute; inset: 0; z-index: -2; }
.scene__bg img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.4) saturate(.6) brightness(.7); }
.scene::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(41,35,28,.35), rgba(41,35,28,.65)); }
.scene .h2 { color: var(--white); }
.scene .eyebrow { color: #e7d6b6; }
.scene__intro { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end; margin-bottom: 60px; }
.scene__intro p { opacity: .9; max-width: 48ch; }

.polaroid-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 2.4vw, 30px);
  align-items: start;
}
.polaroid-row > :nth-child(1) { --r: -4deg; margin-top: 60px; }
.polaroid-row > :nth-child(2) { --r: 3deg; margin-top: 20px; }
.polaroid-row > :nth-child(3) { --r: -2deg; margin-top: 0; }
.polaroid-row > :nth-child(4) { --r: 5deg; margin-top: -30px; }

/* ---------- Polaroid ---------- */
.polaroid {
  --r: 0deg;
  position: relative;
  background: var(--white);
  color: var(--ink);
  padding: 12px 12px 18px;
  box-shadow: var(--shadow-lg);
  transform: rotate(var(--r));
  transition: transform .4s ease, box-shadow .4s ease;
  text-decoration: none;
  display: block;
}
.polaroid:hover { transform: rotate(0deg) translateY(-8px) scale(1.02); z-index: 2; }
.polaroid::before { /* tape */
  content: ""; position: absolute; top: -13px; left: 50%; width: 84px; height: 26px;
  translate: -50% 0; rotate: -3deg; background: var(--tape);
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.polaroid__img { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--paper-2); }
.polaroid__img img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.25) saturate(.85) contrast(1.02); }
.polaroid__tag {
  position: absolute; top: 10px; left: 10px;
  background: var(--white); color: var(--ink); font-size: .74rem; padding: 2px 10px;
}
.polaroid__caption { display: flex; justify-content: space-between; align-items: end; gap: 10px; padding-top: 14px; }
.polaroid__caption h3 { font-size: 1rem; font-weight: 500; text-transform: uppercase; line-height: 1.25; }
.polaroid__caption small { display: block; color: var(--muted); font-size: .8rem; text-transform: none; font-weight: 300; }

.scene__footer { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 70px; align-items: center; }
.scene__footer > div { grid-column: 2; }
.scene__footer p { opacity: .9; }

/* ---------- News ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2.6vw, 32px); }
.news-card { display: flex; flex-direction: column; text-decoration: none; }
.news-card__img { aspect-ratio: 1/1; overflow: hidden; border-radius: 10px; margin-bottom: 18px; }
.news-card__img img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.25) saturate(.85); transition: transform .6s ease; }
.news-card:hover .news-card__img img { transform: scale(1.05); }
.news-card time { font-size: .82rem; color: var(--accent); letter-spacing: .06em; }
.news-card h3 { font-size: 1.2rem; margin: 6px 0 10px; }
.news-card p { color: var(--ink-2); font-size: .95rem; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative; text-align: center;
  background: var(--paper);
  padding: clamp(70px, 10vw, 120px) 0 clamp(110px, 13vw, 160px);
  overflow: hidden;
}
.cta-band .h2 { margin: 0 auto 20px; max-width: 18ch; }
.cta-band p { margin: 0 auto 30px; max-width: 52ch; color: var(--ink-2); }
.cta-band__stamp { position: absolute; right: 6%; top: 40px; width: 120px; rotate: 12deg; opacity: .9; }

/* ---------- Page hero (sub pages) ---------- */
.page-hero {
  position: relative; color: var(--white); isolation: isolate; overflow: hidden;
  padding: calc(var(--header-h) + 90px) 0 clamp(110px, 12vw, 160px);
}
.page-hero .hero__bg img { animation: none; transform: none; }
.page-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(41,35,28,.55), rgba(41,35,28,.45)); }
.page-hero .display { font-size: clamp(2.2rem, 5.4vw, 4.4rem); margin-bottom: 18px; }
.page-hero .eyebrow { color: #e7d6b6; }
.page-hero p { max-width: 54ch; opacity: .92; }
.breadcrumb { display: flex; gap: 8px; font-size: .85rem; opacity: .8; margin-bottom: 18px; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.subnav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

/* ---------- Sub-page hero — minimal, centred, photo in a temple-arch frame ---------- */
.hero-arch {
  position: relative; overflow: hidden; text-align: center;
  padding: calc(var(--header-h) + 40px) 0 clamp(64px, 7vw, 84px);
  background: var(--white) radial-gradient(circle at 50% 0%, rgba(231,201,143,.22), transparent 55%);
}
.hero-arch__crumb { justify-content: center; color: var(--muted); margin-bottom: 18px; }
.hero-arch__frame {
  position: relative; width: 136px; height: 172px; margin: 0 auto 22px; overflow: hidden;
  border-radius: 68px 68px 10px 10px; outline: 1px solid var(--line); outline-offset: 6px;
  box-shadow: 0 20px 40px -24px rgba(47,41,34,.6);
}
.hero-arch__frame img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.3) saturate(.8); transform: scale(1.08); animation: archDrift 14s ease-in-out infinite alternate; }
@keyframes archDrift { to { transform: scale(1.18) translateY(-6px); } }
.eyebrow--center::after { content: ""; width: 28px; height: 1px; background: currentColor; }
.hero-arch__title { margin: 8px auto 12px; font-size: clamp(2rem, 4vw, 3rem); font-weight: 300; line-height: 1.18; color: var(--ink); }
.hero-arch__sub { max-width: 56ch; margin: 0 auto; color: var(--ink-2); }
/* section links in sub-page heroes: outline pills, the first (page start) filled dark */
.hero-arch__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }
.hero-arch__nav a {
  padding: 8px 18px; border: 1px solid var(--line); border-radius: 99px; background: var(--white);
  font-size: .9rem; color: var(--ink-2); text-decoration: none; white-space: nowrap;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.hero-arch__nav a:hover { border-color: var(--ink); color: var(--ink); }
/* the pill for the section you're on (set by main.js initHeroNav; the first one until it runs) */
.hero-arch__nav a.is-active, .hero-arch__nav:not(.is-ready) a:first-child { background: var(--ink); border-color: var(--ink); color: var(--white); }
.hero-arch__side { position: absolute; top: 50%; translate: 0 -50%; writing-mode: vertical-rl; font-size: .72rem; letter-spacing: .3em; color: var(--muted); }
.hero-arch__side--l { left: 32px; transform: rotate(180deg); }
.hero-arch__side--r { right: 32px; }
@media (max-width: 700px) {
  .hero-arch__side { display: none; }
  .hero-arch__frame { width: 116px; height: 146px; border-radius: 58px 58px 8px 8px; }
  .hero-arch__title { font-size: clamp(1.9rem, 8.4vw, 2.6rem); text-wrap: balance; }
  .hero-arch .eyebrow { font-size: .7rem; letter-spacing: .14em; text-wrap: balance; }
  .hero-arch .eyebrow::before, .hero-arch .eyebrow::after { display: none; }
  /* phones: one row that scrolls sideways */
  .hero-arch__nav { flex-wrap: nowrap; justify-content: flex-start; gap: 8px; overflow-x: auto; scrollbar-width: none;
    margin-inline: calc(var(--gutter) * -1); padding: 2px var(--gutter); }
  .hero-arch__nav::-webkit-scrollbar { display: none; }
  .hero-arch__nav a { padding: 7px 15px; font-size: .86rem; }
  /* centred when they fit, still scrollable from the first pill when they don't */
  .hero-arch__nav a:first-child { margin-left: auto; }
  .hero-arch__nav a:last-child { margin-right: auto; }
}

/* ---------- Legal pages (privacy policy) ---------- */
.legal-head { padding: calc(var(--header-h) + 70px) 0 clamp(30px, 4vw, 44px); background: var(--white); border-bottom: 1px solid var(--line); }
.legal-head .breadcrumb { color: var(--muted); }
.legal-date { margin: 14px 0 0; font-size: .86rem; color: var(--muted); }
.legal { display: grid; grid-template-columns: 240px 1fr; gap: clamp(30px, 5vw, 60px); align-items: start; }
.legal__toc { position: sticky; top: calc(var(--header-h) + 40px); }
.legal__toc ol { margin: 0; padding: 0 0 0 18px; display: grid; gap: 8px; font-size: .9rem; color: var(--muted); }
.legal__toc a { color: var(--ink-2); text-decoration: none; }
.legal__toc a:hover { color: var(--seal); text-decoration: underline; }
.legal__body { max-width: 760px; }
.legal__body h2 { font-size: 1.3rem; margin: 36px 0 12px; scroll-margin-top: calc(var(--header-h) + 30px); }
.legal__body h2:first-child { margin-top: 0; }
.legal__body p, .legal__body li { color: var(--ink-2); }
.legal__body ul { list-style: disc; padding-left: 22px; display: grid; gap: 8px; margin: 0 0 1em; }
.legal__body b { font-weight: 400; color: var(--ink); }
.legal__table { overflow-x: auto; margin: 0 0 1em; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.legal__table table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.legal__table th, .legal__table td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.legal__table th { font-weight: 400; color: var(--ink); background: var(--paper); }
.legal__table tr:last-child td { border-bottom: 0; }
.legal__table code { font-size: .85em; padding: 1px 6px; border-radius: 4px; background: var(--paper-2); }
@media (max-width: 860px) {
  .legal { grid-template-columns: 1fr; }
  .legal__toc { position: static; padding: 16px 20px; border-radius: 14px; background: var(--white); border: 1px solid var(--line); }
}

/* ---------- Image credits page ---------- */
.credit-list { display: grid; gap: 10px; max-width: 980px; margin: 0 0 26px; padding: 0; list-style: none; }
.credit { display: grid; grid-template-columns: 72px 1.2fr 1fr auto; gap: 18px; align-items: center; padding: 12px 18px 12px 12px; border-radius: 16px; background: var(--white); border: 1px solid var(--line); }
.credit img { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; filter: sepia(.2); }
.credit b { display: block; font-weight: 400; color: var(--ink); }
.credit span { font-size: .84rem; color: var(--muted); }
.credit__by { font-size: .9rem; color: var(--ink-2); }
.credit__by a { color: var(--accent-dark); }
.credit__lic { justify-self: end; padding: 3px 12px; border-radius: 99px; background: var(--paper-2); color: var(--ink-2) !important; font-size: .8rem; text-decoration: none; white-space: nowrap; }
a.credit__lic:hover { background: var(--ink); color: var(--white) !important; }
@media (max-width: 700px) {
  .credit { grid-template-columns: 60px 1fr; gap: 6px 14px; }
  .credit img { width: 60px; height: 60px; grid-row: span 3; }
  .credit__lic { justify-self: start; }
}

/* ---------- Rules ---------- */
.rules-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.paper-card {
  position: relative; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px;
}
.paper-card__icon {
  width: 46px; height: 46px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%; margin-bottom: 18px; color: var(--accent);
}
.paper-card__icon svg { width: 22px; height: 22px; }
.paper-card h3 { margin-bottom: 12px; }
.paper-card ul { display: grid; gap: 8px; }
.paper-card li { position: relative; padding-left: 18px; color: var(--ink-2); font-size: .95rem; }
.paper-card li::before { content: ""; position: absolute; left: 0; top: .72em; width: 7px; height: 1px; background: var(--accent); }

.criteria { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(30px, 6vw, 80px); align-items: start; margin-top: clamp(60px, 8vw, 100px); }
.criteria__list { display: grid; gap: 22px; }
.bar__head { display: flex; justify-content: space-between; margin-bottom: 8px; }
.bar__head span:last-child { color: var(--accent); font-weight: 400; }
.bar__track { height: 6px; background: var(--paper-2); border-radius: 99px; overflow: hidden; }
.bar__fill { height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width 1.4s cubic-bezier(.2,.7,.2,1); }
.is-visible .bar__fill { width: var(--w); }

.prizes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: clamp(60px, 8vw, 100px); }
.prize { text-align: center; padding: 40px 24px 34px; }
.prize__medal {
  width: 74px; height: 74px; margin: 0 auto 18px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.5rem; font-weight: 500; color: var(--white);
  background: var(--accent);
  box-shadow: inset 0 0 0 5px rgba(255,255,255,.35);
}
.prize--2 .prize__medal { background: #9c968a; }
.prize--3 .prize__medal { background: #a87650; }
.prize__amount { font-size: 2rem; font-weight: 300; margin: 6px 0; }
.prize p { color: var(--ink-2); font-size: .92rem; margin: 0; }

/* ---------- Timeline ---------- */
.timeline { position: relative; display: grid; gap: 0; max-width: 900px; margin-inline: auto; }
.timeline::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: repeating-linear-gradient(to bottom, var(--accent) 0 6px, transparent 6px 12px); }
.tl-item { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 70px; padding: 22px 0; }
.tl-item::before {
  content: ""; position: absolute; left: 50%; top: 42px; width: 15px; height: 15px; translate: -50% 0;
  border-radius: 50%; background: var(--paper); border: 2px solid var(--accent);
}
.tl-item.is-current::before { background: var(--accent); box-shadow: 0 0 0 6px rgba(138,106,67,.18); }
.tl-item:nth-child(odd) .tl-card { grid-column: 1; text-align: right; }
.tl-item:nth-child(even) .tl-card { grid-column: 2; }
.tl-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; }
.tl-card time { display: block; font-size: .85rem; color: var(--accent); letter-spacing: .06em; margin-bottom: 4px; }
.tl-card h3 { font-size: 1.2rem; margin-bottom: 6px; }
.tl-card p { margin: 0; color: var(--ink-2); font-size: .94rem; }
.badge { display: inline-block; font-size: .72rem; padding: 2px 10px; border-radius: 99px; background: var(--ink); color: var(--white); margin-left: 6px; vertical-align: middle; }

/* ---------- Timeline — railway map (guidelines #timeline) ---------- */
.metro { position: relative; padding: 130px 0 140px; }
.metro__line { position: absolute; left: calc(50% / var(--n, 9)); right: calc(50% / var(--n, 9)); top: 50%; height: 12px; translate: 0 -50%; display: flex; border-radius: 12px; overflow: hidden; }
.metro__line::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(255,255,255,.35) 0 2px, transparent 2px 22px); }
.metro__p1 { flex: 4.5; background: var(--accent); }
.metro__p2 { flex: 3.5; background: var(--seal); }
.metro__stations { position: relative; display: grid; grid-template-columns: repeat(var(--n, 9), 1fr); margin: 0; padding: 0; list-style: none; }
.station { position: relative; display: flex; flex-direction: column; align-items: center; }
.station__dot {
  position: relative; z-index: 2; width: 30px; height: 30px; padding: 0; border-radius: 50%; cursor: pointer;
  background: var(--white); border: 5px solid var(--ink); transition: transform .25s ease, box-shadow .25s ease;
}
.station__dot:hover, .station.is-selected .station__dot { transform: scale(1.25); }
.station.is-selected .station__dot { box-shadow: 0 0 0 6px rgba(47,41,34,.12); }
.station.is-done .station__dot { background: var(--accent); border-color: var(--white); box-shadow: 0 0 0 3px var(--accent); }
.station.is-next .station__dot { background: var(--seal); border-color: var(--white); box-shadow: 0 0 0 3px var(--seal), 0 0 0 10px rgba(176,83,47,.15); }
.station__sign { position: absolute; width: 150px; text-align: center; }
.station:nth-child(odd) .station__sign { bottom: calc(100% + 18px); }
.station:nth-child(even) .station__sign { top: calc(100% + 18px); }
.station__sign::before { content: ""; position: absolute; left: 50%; width: 1px; height: 14px; background: var(--line); }
.station:nth-child(odd) .station__sign::before { top: 100%; }
.station:nth-child(even) .station__sign::before { bottom: 100%; }
.station__sign time { display: block; font-size: .8rem; color: var(--accent); }
.station__sign h3 { margin: 2px 0 4px; font-size: .95rem; line-height: 1.3; }
.station.is-done .station__sign { opacity: .6; }
.station.is-selected .station__sign h3 { color: var(--seal); }
.metro__train { position: absolute; top: 50%; left: 0; z-index: 3; width: 74px; translate: -50% -50%; filter: drop-shadow(0 6px 8px rgba(0,0,0,.25)); transition: left 2.4s cubic-bezier(.3,.7,.2,1); }
.metro__train svg { display: block; }
.metro__puff { position: absolute; left: 6px; top: -10px; width: 10px; height: 10px; border-radius: 50%; background: #ddd; opacity: 0; animation: puff 1.4s ease-out infinite; }
.metro__puff:nth-child(2) { animation-delay: .5s; }
.metro__puff:nth-child(3) { animation-delay: 1s; }
@keyframes puff { 0% { opacity: .8; transform: translate(0, 0) scale(.6); } 100% { opacity: 0; transform: translate(-22px, -22px) scale(1.8); } }
.metro__legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 24px; font-size: .85rem; color: var(--ink-2); }
.metro__legend i { display: inline-block; width: 26px; height: 8px; margin-right: 8px; border-radius: 8px; vertical-align: middle; }
.metro__hint { color: var(--muted); }
.metro-detail { max-width: 720px; margin: 30px auto 0; display: grid; gap: 14px; }
.metro-detail__item { position: relative; padding: 24px 28px; border-radius: 18px; background: var(--white); border: 1px solid var(--line); }
.metro-detail__no { font-size: .75rem; letter-spacing: .14em; color: var(--muted); }
.metro-detail__title { margin: 4px 0 2px; font-size: 1.3rem; color: var(--ink); }
.metro-detail__item time { color: var(--accent); font-size: .9rem; }
.metro-detail__item p:last-child { margin: 8px 0 0; color: var(--ink-2); }
/* with JS: one station's details at a time */
.metro-detail.is-ready .metro-detail__item { display: none; }
.metro-detail.is-ready .metro-detail__item.is-active { display: block; animation: fadeUp .35s ease; border-left: 4px solid var(--seal); }

@media (max-width: 960px) {
  .metro { padding: 10px 0; }
  .metro__line { left: 9px; right: auto; top: 0; bottom: 0; width: 12px; height: auto; translate: none; flex-direction: column; }
  .metro__stations { grid-template-columns: 1fr; gap: 22px; }
  .station { flex-direction: row; align-items: flex-start; gap: 16px; }
  .station__sign { position: static; width: auto; text-align: left; }
  .station__sign::before { display: none; }
  .station__dot { flex: none; }
  .metro__train { display: none; }
  .metro__legend { justify-content: flex-start; margin-top: 20px; }
}

/* ---------- Form ---------- */
.form-wrap { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(30px, 6vw, 80px); align-items: start; }
.form-aside { position: sticky; top: calc(var(--header-h) + 40px); }
.form-aside .ticket { margin-top: 30px; }
.checklist { display: grid; gap: 10px; margin-top: 24px; }
.checklist li { display: flex; gap: 12px; color: var(--ink-2); }
.checklist li::before { content: "✓"; color: var(--accent); font-weight: 500; }

.form {
  background: var(--white); border: 1px solid var(--line); border-radius: 20px;
  padding: clamp(24px, 4vw, 44px);
  box-shadow: var(--shadow);
}
.form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.field { display: grid; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label, .field legend { font-size: .9rem; font-weight: 400; color: var(--ink); }
.field label .req { color: var(--seal); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 16px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; background: var(--white); border-color: var(--accent); box-shadow: 0 0 0 4px rgba(138,106,67,.14);
}
.field.has-error input, .field.has-error select, .field.has-error textarea, .field.has-error .dropzone { border-color: var(--seal); }
.field__error { font-size: .82rem; color: var(--seal); min-height: 0; }
.field__hint { font-size: .82rem; color: var(--muted); }

.choice-group { display: flex; gap: 12px; flex-wrap: wrap; border: 0; padding: 0; margin: 0; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice > span {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px;
  border: 1px solid var(--line); border-radius: 999px; cursor: pointer; background: var(--paper);
  transition: all .2s ease;
}
.choice input:checked + span { background: var(--ink); color: var(--white); border-color: var(--ink); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.dropzone {
  position: relative; display: grid; place-items: center; text-align: center; gap: 6px;
  padding: 34px 20px; border: 1.5px dashed var(--line); border-radius: 14px; background: var(--paper);
  cursor: pointer; transition: border-color .2s ease, background .2s ease;
}
.dropzone:hover, .dropzone.is-dragover { border-color: var(--accent); background: var(--white); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone svg { width: 34px; height: 34px; color: var(--accent); }
.dropzone__preview { display: none; align-items: center; gap: 14px; text-align: left; width: 100%; }
.dropzone.has-file .dropzone__preview { display: flex; }
.dropzone.has-file .dropzone__empty { display: none; }
.dropzone__preview img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
.dropzone__preview small { color: var(--muted); display: block; }

.check { display: flex; gap: 12px; align-items: flex-start; font-size: .92rem; color: var(--ink-2); cursor: pointer; }
.check input { margin-top: 5px; accent-color: var(--accent); width: 17px; height: 17px; flex: none; }
.form__foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 26px; }

.form-success { display: none; text-align: center; padding: 30px 10px; }
.form-success.is-shown { display: block; }
.form-success__icon { width: 70px; height: 70px; margin: 0 auto 16px; border-radius: 50%; background: var(--accent); color: var(--white); display: grid; place-items: center; font-size: 1.8rem; }
.form-success p { color: var(--ink-2); }

/* ---------- Gallery ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-btn {
  padding: 9px 20px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--white); cursor: pointer; font-size: .9rem; transition: all .2s ease;
}
.filter-btn:hover { border-color: var(--ink); }
.filter-btn.is-active { background: var(--ink); color: var(--white); border-color: var(--ink); }

.masonry { columns: 4 240px; column-gap: 26px; }
.masonry .polaroid { break-inside: avoid; margin: 0 0 34px; cursor: zoom-in; width: 100%; border: 0; text-align: left; font: inherit; }
.masonry .polaroid:nth-child(3n+1) { --r: -2deg; }
.masonry .polaroid:nth-child(3n+2) { --r: 1.5deg; }
.masonry .polaroid:nth-child(3n) { --r: -1deg; }
.masonry .polaroid.tall .polaroid__img { aspect-ratio: 3/4; }
.masonry .polaroid.wide .polaroid__img { aspect-ratio: 4/3; }
.masonry .polaroid.is-hidden { display: none; }

.lightbox {
  position: fixed; inset: 0; z-index: 2000; display: none;
  place-items: center; padding: 24px; background: rgba(28,24,19,.88);
}
.lightbox.is-open { display: grid; animation: fadeIn .3s ease; }
.lightbox__frame { background: var(--white); padding: 14px 14px 20px; max-width: min(900px, 100%); box-shadow: var(--shadow-lg); }
.lightbox__frame img { max-height: 72vh; width: auto; margin-inline: auto; }
.lightbox__meta { display: flex; justify-content: space-between; gap: 16px; padding-top: 14px; flex-wrap: wrap; }
.lightbox__meta h3 { font-size: 1.15rem; }
.lightbox__meta p { margin: 0; color: var(--muted); font-size: .9rem; }
.lightbox__btn {
  position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4);
  background: rgba(255,255,255,.08); color: #fff; font-size: 1.3rem; cursor: pointer;
}
.lightbox__btn:hover { background: rgba(255,255,255,.2); }
.lightbox__close { top: 20px; right: 20px; }
.lightbox__prev { left: 20px; top: 50%; translate: 0 -50%; }
.lightbox__next { right: 20px; top: 50%; translate: 0 -50%; }
@keyframes fadeIn { from { opacity: 0; } }

/* Results / podium */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: clamp(16px, 3vw, 36px); align-items: end; }
.winner { text-align: center; }
.winner .polaroid { margin-bottom: 18px; }
.winner--1 .polaroid { --r: 0deg; }
.winner--2 .polaroid { --r: -3deg; }
.winner--3 .polaroid { --r: 3deg; }
.winner__rank { display: inline-block; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; padding: 4px 14px; border-radius: 99px; background: var(--ink); color: var(--white); margin-bottom: 8px; }
.winner--1 .winner__rank { background: var(--accent); }
.winner h3 { font-size: 1.2rem; }
.winner p { color: var(--muted); font-size: .9rem; margin: 0; }

.honors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 50px; }
.honor { display: flex; gap: 14px; align-items: center; padding: 14px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; }
.honor img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; filter: sepia(.25); }
.honor h3 { font-size: 1rem; }
.honor p { margin: 0; color: var(--muted); font-size: .84rem; }

/* Press releases (/news/) */
.pr-list { display: grid; gap: clamp(28px, 4vw, 48px); max-width: 1000px; margin-inline: auto; }
.pr-item { display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: clamp(20px, 3vw, 44px); align-items: start; padding-bottom: clamp(28px, 4vw, 48px); border-bottom: 1px solid var(--line); }
.pr-item:last-child { border-bottom: 0; }
.pr-item:not(:has(.pr-item__img)) { grid-template-columns: 1fr; }
.pr-item__img { display: block; padding: 10px; background: var(--white); box-shadow: var(--shadow-lg); rotate: -1.2deg; transition: rotate .3s ease; }
.pr-item__img:hover { rotate: 0deg; }
.pr-item__img img { display: block; width: 100%; height: auto; }
.pr-item time { color: var(--accent); font-size: .88rem; letter-spacing: .04em; margin-right: 6px; }
.pr-item h2 { margin: 8px 0 14px; font-size: clamp(1.3rem, 2.4vw, 1.7rem); line-height: 1.35; }
.pr-item__text p { margin: 0 0 12px; color: var(--ink-2); }
.pr-item__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.pr-empty { padding: 40px 0; text-align: center; color: var(--muted); column-span: all; }
.pr-item h2 a { color: inherit; text-decoration: none; }
.pr-item h2 a:hover { color: var(--accent); }
.tag--featured { border-color: #e5c97f; background: #fbf1d9; color: #7a5413; }
@media (max-width: 720px) { .pr-item { grid-template-columns: 1fr; } }

/* one press release (/news/?id=N) */
.pr-article { max-width: 780px; margin-inline: auto; }
.pr-article__back { display: inline-block; margin-bottom: 22px; color: var(--muted); font-size: .9rem; text-decoration: none; }
.pr-article__back:hover { color: var(--accent); }
.pr-article__meta time { color: var(--accent); font-size: .9rem; margin-right: 6px; }
.pr-article__title { margin: 10px 0 14px; font-size: clamp(1.6rem, 3.4vw, 2.3rem); line-height: 1.3; }
.pr-article__lead { font-size: 1.1rem; color: var(--ink-2); margin: 0 0 24px; }
.pr-article__cover { margin: 0 0 30px; padding: 12px; background: var(--white); box-shadow: var(--shadow-lg); }
.pr-article__cover img { display: block; width: 100%; height: auto; }
.pr-article__body { color: var(--ink-2); line-height: 1.85; }
.pr-article__body p { margin: 0 0 16px; }
.pr-article__body h2 { font-size: 1.4rem; margin: 30px 0 12px; color: var(--ink); }
.pr-article__body h3 { font-size: 1.15rem; margin: 24px 0 10px; color: var(--ink); }
.pr-article__body ul, .pr-article__body ol { margin: 0 0 16px; padding-left: 1.4em; }
.pr-article__body li { margin-bottom: 6px; }
.pr-article__body blockquote { margin: 0 0 16px; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); color: var(--ink); }
.pr-article__body a { color: var(--accent); }
.pr-article__sub { margin: 36px 0 18px; font-size: 1.1rem; }
.pr-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 22px; }
.pr-photos .polaroid { margin: 0; cursor: zoom-in; }
.pr-photos .polaroid:nth-child(odd) { --r: -1.5deg; }
.pr-photos .polaroid:nth-child(even) { --r: 1.5deg; }
.pr-article .pr-item__actions { margin-top: 30px; }

/* awards added in the admin panel (/finalists/#awards) */
.award-block { margin-top: clamp(60px, 8vw, 100px); }
.award-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: clamp(22px, 3vw, 36px); }
.award-card { text-align: center; }
.award-card .polaroid { margin-bottom: 16px; }
.award-card:nth-child(odd) .polaroid { --r: -2deg; }
.award-card:nth-child(even) .polaroid { --r: 2deg; }
.award-card .polaroid__code { display: grid; place-items: center; height: 100%; font-size: 1.1rem; color: var(--accent-dark); }
.award-card h3 { margin: 6px 0 2px; font-size: 1.1rem; }
.award-card p { margin: 0; color: var(--muted); font-size: .9rem; }
.award-card__tech { font-size: .82rem !important; }
.award-card__label { margin-top: 6px !important; color: var(--accent-dark) !important; font-weight: 400; }
.award-card--gold .winner__rank { background: #b8860b; }
.award-card--silver .winner__rank { background: #7d8790; }
.award-card--bronze .winner__rank { background: #a0612c; }
.award-card--special .winner__rank { background: var(--accent); }
.award-card--honorable .winner__rank { background: var(--muted); }

/* News list */
.news-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.news-row {
  display: grid; grid-template-columns: 140px 1fr auto; gap: 30px; align-items: center;
  padding: 26px 0; border-bottom: 1px solid var(--line); text-decoration: none;
  transition: padding .3s ease, background .3s ease;
}
.news-row:hover { padding-inline: 14px; background: var(--white); }
.news-row time { color: var(--accent); font-size: .88rem; }
.news-row h3 { font-size: 1.15rem; margin-bottom: 4px; }
.news-row p { margin: 0; color: var(--ink-2); font-size: .93rem; }
.tag { display: inline-block; font-size: .72rem; padding: 2px 10px; border: 1px solid var(--line); border-radius: 99px; margin-bottom: 8px; color: var(--ink-2); }

/* ---------- Contact / FAQ ---------- */
/* contact on a warm brown wall so the cream envelope stands out */
.section--brown {
  color: var(--white); padding-bottom: clamp(100px, 12vw, 150px);
  background: radial-gradient(ellipse 70% 60% at 50% 35%, #5a4634, transparent 75%), #3a2e24;
}
.section--brown .eyebrow { color: #e7c98f; }
.section--brown .h2 { color: var(--white); }
.section--brown .lead { color: #d8ccb6; }
.section--brown .letter__env { box-shadow: 0 40px 60px -30px rgba(0,0,0,.75); }
.section--brown .btn:not(.btn--ghost) { --bg: var(--white); --fg: var(--ink); }
.section--brown .btn--ghost { --fg: var(--white); border-color: rgba(255,253,248,.6); }
.section--brown .letter__copied { color: #e7c98f; }
/* contact: the coordinator's email written as the address on a big envelope */
.letter { text-align: center; }
.letter .lead { max-width: 60ch; margin: 0 auto clamp(36px, 5vw, 56px); }
.letter__env {
  position: relative; display: grid; place-items: center; max-width: 640px; aspect-ratio: 16 / 9; margin: 0 auto;
  background: #f3e9d4; border: 1px solid #d8c9a8; box-shadow: 0 30px 50px -30px rgba(47,41,34,.5); rotate: -1.5deg;
}
/* "you've got mail" wiggle: a ~0.7s shake every 2s, a livelier one on hover (off with reduced motion) */
.letter__env { animation: envNudge 2s ease-in-out 1s infinite; transform-origin: 50% 60%; }
.letter__env:hover { animation: envWiggle .7s ease-in-out infinite; }
@keyframes envNudge {
  0%, 62%, 100% { transform: none; }
  67% { transform: rotate(-2deg) translateY(-2px); }
  72% { transform: rotate(2deg) translateY(-2px); }
  78% { transform: rotate(-1.4deg); }
  84% { transform: rotate(1.2deg); }
  91% { transform: rotate(-.5deg); }
}
@keyframes envWiggle {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-1.6deg) translateY(-3px); }
  75% { transform: rotate(1.6deg) translateY(-3px); }
}
.letter__env::before { /* back flap */
  content: ""; position: absolute; inset: 0 0 auto; height: 50%; opacity: .7;
  background: #ecdfc2; clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.letter__stamp {
  position: absolute; top: 18px; right: 20px; width: 72px; height: 86px; display: grid; place-items: center; text-align: center;
  background: var(--white); border: 2px dashed #c9b48d; font-size: .66rem; line-height: 1.5; letter-spacing: .1em; color: var(--accent); rotate: 4deg;
}
.letter__to { position: relative; margin: 0; padding: 30px 24px 0; text-align: left; font-size: .95rem; line-height: 2; color: var(--ink-2); }
.letter__to a {
  display: block; font-size: clamp(1.3rem, 3.2vw, 1.95rem); font-weight: 400; line-height: 1.5; color: var(--ink);
  text-decoration: none; border-bottom: 1px dashed var(--accent); transition: color .2s ease;
}
.letter__to a:hover { color: var(--seal); }
.letter__to span { display: block; font-size: .82rem; color: var(--muted); }
.letter__actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; margin-top: clamp(30px, 4vw, 44px); }
.letter__copied { flex-basis: 100%; min-height: 1.4em; font-size: .82rem; color: var(--seal); }
@media (max-width: 640px) {
  .letter__env { aspect-ratio: auto; padding: 46px 0 34px; rotate: -1deg; }
  .letter__stamp { width: 54px; height: 64px; top: 10px; right: 10px; font-size: .5rem; }
  .letter__to { padding: 10px 18px 0; }
}

.faq { display: grid; gap: 12px; }
.faq details {
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  transition: box-shadow .25s ease;
}
.faq details[open] { box-shadow: var(--shadow); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 20px 24px; font-weight: 400; font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 32px; height: 32px;
  border-radius: 50%; border: 1px solid var(--line); color: var(--ink);
  background:
    linear-gradient(currentColor, currentColor) center / 12px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.5px 12px no-repeat;
  transition: transform .3s ease, background-color .3s ease, color .3s ease, border-color .3s ease;
}
/* open: the + turns 45° into an × on a dark circle */
.faq details[open] summary::after {
  transform: rotate(45deg);
  background-color: var(--ink); color: var(--white); border-color: var(--ink);
}
.faq__body { padding: 0 24px 22px; color: var(--ink-2); }
.faq__body p:last-child { margin: 0; }

.faq-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(30px, 6vw, 80px); align-items: start; }
.faq-layout aside { position: sticky; top: calc(var(--header-h) + 40px); }

/* ---------- Footer ---------- */
.site-footer {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--dark); color: #d9cfbd; font-size: .94rem;
  padding: clamp(70px, 7vw, 90px) 0 24px;
}
.site-footer::before { /* soft golden glow behind the seal */
  content: ""; position: absolute; z-index: -1; left: 6%; top: 10px; width: 460px; height: 460px;
  border-radius: 50%; background: radial-gradient(circle, rgba(214,150,70,.14), transparent 65%);
}
.site-footer__watermark {
  position: absolute; z-index: -1; right: -1%; bottom: 8px; white-space: nowrap; pointer-events: none;
  font-size: clamp(3rem, 9vw, 7.5rem); font-weight: 500; letter-spacing: .04em; line-height: 1;
  color: transparent; -webkit-text-stroke: 1px rgba(231,201,143,.08);
}
/* one compact row: seal · title · CTA */
.site-footer__main { display: flex; align-items: center; gap: 22px 28px; }
.site-footer__text { flex: 1; min-width: 0; }
.site-footer__seal { /* the stamp artwork, painted in the theme gold via a mask */
  flex: none; display: block; width: 72px; height: 72px; background: #e7c98f; opacity: .85;
  -webkit-mask: url("../images/stamp.svg") center / contain no-repeat; mask: url("../images/stamp.svg") center / contain no-repeat;
  animation: sealSpin 30s linear infinite;
}
.logo--dark { color: var(--white); }
.site-footer__title-th { margin: 0; font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 300; line-height: 1.25; color: var(--white); }
.site-footer__title-en { margin: 4px 0 0; font-size: .88rem; letter-spacing: .05em; color: #e7c98f; }
.site-footer__meta { margin: 2px 0 0; font-size: .82rem; opacity: .7; }
.site-footer__cta { flex: none; }
.site-footer__bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 10px 24px; flex-wrap: wrap;
  margin-top: clamp(30px, 4vw, 44px); padding-top: 18px; border-top: 1px solid rgba(255,253,248,.12);
  font-size: .85rem;
}
@media (max-width: 760px) {
  .site-footer__main { flex-direction: column; text-align: center; }
  .site-footer__watermark { display: none; }
  .site-footer::before { left: 50%; translate: -50% 0; }
}
.site-footer__bottom p { margin: 0; opacity: .65; }
.site-footer__util { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; }
.site-footer__util a { text-decoration: none; opacity: .7; transition: opacity .2s ease, color .2s ease; }
.site-footer__util a:hover { opacity: 1; color: #e7c98f; }
.to-top { text-decoration: none; }
/* phones: copyright + links on one line (the province is already named above, so drop it here) */
@media (max-width: 640px) {
  .site-footer__bottom { flex-wrap: nowrap; justify-content: center; gap: 14px; font-size: .74rem; white-space: nowrap; }
  .site-footer__org { display: none; }
  .site-footer__util { flex-wrap: nowrap; gap: 14px; }
}

/* hero entrance: slide only, never hidden (opacity stays 1) so the first paint / LCP isn't held back by JS */
.hero-in { animation: heroIn .9s cubic-bezier(.2,.7,.2,1) both; }
.hero-in.reveal-d1 { animation-delay: .08s; }
.hero-in.reveal-d2 { animation-delay: .16s; }
.hero-in.reveal-d3 { animation-delay: .24s; }
@keyframes heroIn { from { transform: translateY(18px); } to { transform: none; } }
/* phones: no hero motion — the screen settles at once (Speed Index), and small screens don't need it */
@media (max-width: 640px) {
  .hero-in, .hero__bg img { animation: none; }
  .hero__bg img { transform: none; }
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .12s; }
.reveal-d2 { transition-delay: .24s; }
.reveal-d3 { transition-delay: .36s; }

/* ---------- 404 ---------- */
.notfound { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 120px 0 60px; }
.notfound .display { font-size: clamp(5rem, 18vw, 11rem); color: var(--accent); }

/* =========================================================
   Pathom Taste additions
   ========================================================= */
.en { display: block; font-size: .42em; font-weight: 300; letter-spacing: .08em; text-transform: none; opacity: .85; margin-top: .4em; line-height: 1.4; }
.h2 .en { font-size: .34em; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; }
.hero .en, .page-hero .en, .scene .en { color: inherit; }

.hero__title .big { font-size: 1.55em; font-weight: 400; letter-spacing: .01em; line-height: 1.05; }
/* English is uppercase and wider than Thai — tone the big display type down */
html[lang="en"] .display { font-size: clamp(2.1rem, 4.6vw, 3.9rem); line-height: 1.08; }
html[lang="en"] .hero__title .big { font-size: 1.35em; }
html[lang="en"] .hero__title .en { font-size: .36em; letter-spacing: .05em; }
html[lang="en"] .h2 { font-size: clamp(1.8rem, 4vw, 3.1rem); }
.hero__badge {
  display: inline-block; font-size: .78rem; letter-spacing: .2em; text-transform: uppercase;
  padding: 6px 14px; border: 1px solid rgba(255,253,248,.55); border-radius: 99px; margin-bottom: 22px;
}

/* key dates strip (home) */
.keydates { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); overflow: hidden; }
.keydate { padding: 22px 20px; border-right: 1px solid var(--line); position: relative; }
.keydate:last-child { border-right: 0; }
.keydate time { display: block; font-size: 1.25rem; font-weight: 400; color: var(--ink); }
.keydate span { font-size: .88rem; color: var(--muted); }
.keydate.is-current { background: var(--ink); color: var(--white); }
.keydate.is-current time, .keydate.is-current span { color: inherit; }
.keydate.is-done { opacity: .55; }

/* key dates — tear-off calendar (home) */
.keydates-head__side { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.next-pill { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 12px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); font-size: .9rem; color: var(--ink-2); }
.next-pill b { font-weight: 500; color: var(--ink); }
.next-pill__dot { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--seal); flex: none; }
.next-pill__dot::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--seal); animation: ping 1.6s ease-out infinite; }
@keyframes ping { from { transform: scale(.5); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }

.cal-row { display: grid; grid-template-columns: repeat(var(--n, 5), 1fr); gap: 22px; align-items: start; list-style: none; margin: 0; padding: 14px 0 0; }
.cal {
  --r: -2deg;
  position: relative; display: block; text-align: center; background: var(--white); border-radius: 10px;
  box-shadow: 0 16px 28px -18px rgba(47,41,34,.55);
  transform: rotate(var(--r)); transition: transform .35s ease, opacity .9s ease;
}
.cal:nth-child(2) { --r: 1.5deg; margin-top: 18px; }
.cal:nth-child(3) { --r: -1deg; }
.cal:nth-child(4) { --r: 2deg; margin-top: 14px; }
.cal:nth-child(5) { --r: -1.5deg; }
.cal.reveal { transform: translateY(28px) rotate(var(--r)); }
.cal.reveal.is-visible { transform: rotate(var(--r)); }
.cal.reveal.is-visible:hover { transform: rotate(0deg) translateY(-8px); }
.cal__rings { position: absolute; top: -9px; left: 0; right: 0; display: flex; justify-content: center; gap: 46px; }
.cal__rings i { width: 10px; height: 20px; border-radius: 6px; background: linear-gradient(#cfc2a6, #9b8b6c); box-shadow: 0 2px 2px rgba(0,0,0,.2); }
.cal__month { display: block; padding: 14px 10px 8px; border-radius: 10px 10px 0 0; background: var(--accent); color: var(--white); font-size: .9rem; letter-spacing: .12em; }
.cal__day { display: block; padding: 16px 8px 4px; font-size: 3.4rem; font-weight: 200; line-height: 1; color: var(--ink); }
.cal__day small { display: block; margin-top: 6px; font-size: .3em; letter-spacing: .04em; color: var(--muted); }
.cal__what { display: block; margin: 10px 14px 0; padding: 10px 0 18px; border-top: 1px dashed var(--line); font-size: .88rem; color: var(--ink-2); }
.cal__flag:empty { display: none; }
.cal__flag { position: absolute; z-index: 2; }
/* past: faded with a "passed" stamp */
.cal.is-done { opacity: .5; }
.cal.is-done .cal__month { background: var(--muted); }
.cal.is-done .cal__flag { top: 46%; left: 50%; translate: -50% -50%; rotate: -14deg; padding: 2px 12px; border: 2px solid var(--muted); border-radius: 6px; font-size: .8rem; color: var(--muted); background: rgba(255,253,248,.85); }
/* running or next phase */
.cal.is-next { box-shadow: 0 0 0 2px var(--seal), 0 22px 36px -18px rgba(176,83,47,.55); }
.cal.is-next .cal__month { background: var(--seal); }
.cal.is-next .cal__flag { right: -10px; top: -14px; rotate: 8deg; padding: 3px 10px; border-radius: 99px; background: var(--ink); color: var(--white); font-size: .72rem; }

/* concept — tray of 5 bowls (home) */
.concept { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(36px, 5vw, 60px); align-items: center; }
.concept .h2 { margin-bottom: 0; }
.three { display: flex; flex-wrap: wrap; gap: 10px 34px; margin: 26px 0 10px; }
.three span { position: relative; font-size: clamp(1.5rem, 3vw, 2.1rem); color: var(--ink); }
.three b { font-weight: 400; color: var(--accent-dark); }
.three svg { position: absolute; left: -4px; bottom: -8px; width: calc(100% + 8px); height: 12px; overflow: visible; }
.three path { fill: none; stroke: var(--seal); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 300; stroke-dashoffset: 300; }
.three.is-visible path { animation: drawLine 1.4s ease forwards; }
.three.is-visible span:nth-child(2) path { animation-delay: .4s; }
.three.is-visible span:nth-child(3) path { animation-delay: .8s; }
@keyframes drawLine { to { stroke-dashoffset: 0; } }
.three-sub { color: var(--ink-2); }

.samrap-detail { margin-top: 26px; display: grid; gap: 18px; }
.samrap-card__num { display: block; font-size: 4rem; font-weight: 200; line-height: 1; color: var(--accent); }
.samrap-card h3 { margin: 6px 0 8px; font-size: 1.8rem; }
.samrap-card p { margin: 0; max-width: 38ch; color: var(--ink-2); }
/* with JS: one card at a time */
.concept.is-ready .samrap-detail { min-height: 180px; display: block; }
.concept.is-ready .samrap-card { display: none; }
.concept.is-ready .samrap-card.is-active { display: block; animation: fadeUp .45s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } }
.tray-dots { display: flex; gap: 8px; margin-top: 22px; }
.tray-dots button { width: 34px; height: 4px; padding: 0; border: 0; border-radius: 4px; background: var(--line); cursor: pointer; transition: background .3s ease; }
.tray-dots button.is-active { background: var(--seal); }

/* woven bamboo tray + cream-and-gold ceramic bowls holding real photos */
.tray { position: relative; width: min(100%, 540px); aspect-ratio: 1; margin: 0 auto; }
.tray__plate {
  position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,.28), transparent 45%),
    radial-gradient(circle, transparent 60%, rgba(60,40,15,.35) 100%),
    repeating-linear-gradient(45deg, #c9a46a 0 9px, #b48d55 9px 11px, #d4b27a 11px 20px, #a98048 20px 22px),
    repeating-linear-gradient(-45deg, rgba(0,0,0,.08) 0 9px, transparent 9px 22px);
  box-shadow: inset 0 0 0 14px #9b7444, inset 0 0 0 18px #c79a5d, inset 0 0 0 22px #8a6237, 0 40px 60px -30px rgba(47,41,34,.75);
}
.bowl {
  position: absolute; width: 30%; aspect-ratio: 1; translate: -50% -50%;
  border: 0; border-radius: 50%; padding: 0; cursor: pointer; font: inherit;
  background: none; filter: drop-shadow(0 14px 12px rgba(40,25,10,.45));
  transition: transform .35s ease;
}
.bowl::before { /* cream ceramic rim with two thin gold lines */
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(circle, transparent 62%, #c9a35e 62.5% 63.5%, transparent 64% 89%, #c9a35e 89.5% 90.5%, transparent 91%),
    radial-gradient(circle at 35% 30%, #fffdf8, #f1e9da 60%, #e2d5bd 100%);
}
.bowl::after { /* glaze highlight */
  content: ""; position: absolute; inset: 0; z-index: 2; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 32% 26%, rgba(255,255,255,.55), transparent 28%), radial-gradient(circle, transparent 60%, rgba(0,0,0,.16) 100%);
}
.bowl img { position: absolute; inset: 14%; z-index: 1; width: 72%; height: 72%; border-radius: 50%; object-fit: cover; }
.bowl__shade { position: absolute; inset: 14%; z-index: 2; border-radius: 50%; box-shadow: inset 0 8px 16px rgba(0,0,0,.55); }
.bowl__tag {
  position: absolute; left: 50%; bottom: -14px; z-index: 3; translate: -50% 0; white-space: nowrap;
  padding: 2px 12px; border-radius: 99px; background: var(--white); color: var(--ink);
  font-size: clamp(.68rem, 1.4vw, .8rem); font-weight: 400; box-shadow: 0 4px 10px -4px rgba(0,0,0,.4);
  transition: background .25s ease, color .25s ease;
}
.bowl:hover, .bowl.is-active { transform: scale(1.1) translateY(-4px); z-index: 4; }
.bowl.is-active .bowl__tag { background: var(--seal); color: var(--white); }
.bowl:focus-visible { outline: 3px solid var(--seal); outline-offset: 4px; }
.bowl--center { left: 50%; top: 50%; width: 36%; cursor: default; }
.bowl--center:hover { transform: none; }
.bowl--center::before { /* dark lacquer centre bowl, same thin gold lines */
  background: radial-gradient(circle, #2f2922 0 60%, #c9a35e 60.5% 61.5%, #2f2922 62% 89%, #c9a35e 89.5% 90.5%, #2f2922 91%);
}
.bowl__txt { position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; text-align: center; color: #e7c98f; }
.bowl__txt small { font-size: .75rem; font-weight: 300; letter-spacing: .1em; }
.bowl__txt b { font-size: clamp(1rem, 2.6vw, 1.5rem); font-weight: 400; line-height: 1.1; color: var(--white); }

/* concept "5 สำรับ" */
.samrap { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.samrap__item {
  position: relative; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 20px 22px; text-align: center;
}
.samrap__num { width: 44px; height: 44px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 50%; border: 1px dashed var(--accent); color: var(--accent); font-size: .95rem; }
.samrap__item h3 { font-size: 1.15rem; margin-bottom: 8px; }
.samrap__item p { font-size: .9rem; color: var(--ink-2); margin: 0; }
.quote-strip { text-align: center; max-width: 820px; margin: 0 auto clamp(40px, 6vw, 70px); }
.quote-strip p { font-size: clamp(1.2rem, 2.4vw, 1.6rem); font-weight: 300; color: var(--ink-2); line-height: 1.6; }
.quote-strip p strong { font-weight: 400; color: var(--accent-dark); }

.objectives { counter-reset: obj; display: grid; gap: 14px; }
.objectives li { counter-increment: obj; display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; color: var(--ink-2); }
.objectives li::before { content: counter(obj, decimal-leading-zero); font-size: .85rem; color: var(--accent); border-top: 1px solid var(--accent); padding-top: 4px; }

.organizers { display: grid; grid-template-columns: 1.2fr 1fr; gap: 22px; }
.org-list { display: grid; gap: 12px; }
.org-list li { display: flex; gap: 12px; align-items: baseline; color: var(--ink-2); }
.org-list li strong { font-weight: 400; color: var(--ink); }
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-list li { font-size: .85rem; padding: 5px 14px; border: 1px solid var(--line); border-radius: 99px; background: var(--paper); color: var(--ink-2); }

/* Objectives — scrapbook notes + prize ticket + stamps (home) */
.obj-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(36px, 5vw, 64px); align-items: start; margin-top: clamp(60px, 8vw, 100px); }
.obj-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 34px 26px; margin-top: 30px; }
.obj-note {
  --r: -1.5deg;
  position: relative; background: var(--white); padding: 30px 24px 24px;
  box-shadow: 0 16px 30px -18px rgba(47,41,34,.45);
  transform: rotate(var(--r)); transition: transform .35s ease, opacity .9s ease;
}
.obj-note:nth-child(2) { --r: 1.5deg; }
.obj-note:nth-child(3) { --r: 1deg; }
.obj-note:nth-child(4) { --r: -1deg; }
.obj-note.reveal { transform: translateY(28px) rotate(var(--r)); }
.obj-note.reveal.is-visible { transform: rotate(var(--r)); }
.obj-note.reveal.is-visible:hover { transform: rotate(0deg) translateY(-6px); }
.obj-note::before { content: ""; position: absolute; top: -12px; left: 50%; width: 80px; height: 24px; translate: -50% 0; rotate: -3deg; background: var(--tape); }
.obj-note__num { display: flex; justify-content: space-between; align-items: center; font-size: 3rem; font-weight: 200; line-height: 1; color: var(--accent); margin-bottom: 10px; }
.obj-note__num svg { width: 30px; height: 30px; color: var(--ink-2); }
.obj-note h3 { margin-bottom: 6px; font-size: 1.08rem; }
.obj-note p { margin: 0; font-size: .9rem; color: var(--ink-2); }

.obj-prize { position: relative; margin-top: 70px; }
.obj-seal { position: absolute; right: -14px; top: -44px; width: 108px; height: 108px; z-index: 2; animation: sealSpin 24s linear infinite; }
@keyframes sealSpin { to { transform: rotate(360deg); } }
.prize-ticket {
  position: relative; background: var(--ink); color: var(--white); border-radius: 16px; padding: 34px 34px 30px;
  -webkit-mask: radial-gradient(circle 14px at 0 64%, transparent 98%, #000), radial-gradient(circle 14px at 100% 64%, transparent 98%, #000);
  -webkit-mask-composite: source-in; mask-composite: intersect;
}
.prize-ticket::after { content: ""; position: absolute; left: 22px; right: 22px; top: 64%; border-top: 2px dashed rgba(255,253,248,.2); }
.prize-ticket small { letter-spacing: .2em; font-size: .75rem; color: #e7c98f; }
.prize-ticket__amount { font-size: clamp(3rem, 6vw, 4.6rem); font-weight: 200; line-height: 1.05; margin: 6px 0 4px; }
.prize-ticket__amount .unit { font-size: .4em; color: #e7c98f; margin-left: 8px; }
.prize-ticket__foot { padding-top: 30px; display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; color: rgba(255,253,248,.75); }
.stamps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 26px; }
.stamp {
  --r: -2deg;
  background: var(--white); padding: 18px 10px 14px; text-align: center;
  border: 2px dashed var(--line); outline: 6px solid var(--white);
  box-shadow: 0 10px 20px -14px rgba(47,41,34,.45);
  transform: rotate(var(--r));
}
.stamp:nth-child(2) { --r: 2deg; }
.stamp:nth-child(3) { --r: -1deg; }
.stamp.reveal { transform: translateY(28px) rotate(var(--r)); }
.stamp.reveal.is-visible { transform: rotate(var(--r)); }
.stamp b { display: block; font-weight: 400; font-size: 1.6rem; color: var(--accent-dark); line-height: 1.15; }
.stamp > span { font-size: .78rem; color: var(--muted); line-height: 1.4; display: block; margin-top: 4px; }

/* Organizers — dark band, rotating seal, venue cards, marquee (home) */
.org-band {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--dark); color: var(--white);
  padding: clamp(110px, 13vw, 160px) 0 clamp(120px, 14vw, 170px);
}
.org-band::before { /* soft golden glow */
  content: ""; position: absolute; z-index: -1; width: 620px; height: 620px; left: 50%; top: 40px; translate: -50% 0;
  border-radius: 50%; background: radial-gradient(circle, rgba(214,150,70,.18), transparent 65%);
}
.org-band .h2 { color: var(--white); }
.org-band .eyebrow { color: #e7c98f; }
.org-band__center { text-align: center; max-width: 720px; margin: 0 auto; }
.org-seal { position: relative; width: 150px; height: 150px; margin: 26px auto 18px; color: #e7c98f; }
.org-seal__ring { position: absolute; inset: 0; animation: sealSpin 26s linear infinite; }
.org-seal__core { position: absolute; inset: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(231,201,143,.12); border: 1px solid rgba(231,201,143,.5); }
.org-seal__core svg { width: 52px; height: 52px; }
.org-host { font-size: 2rem; font-weight: 300; margin: 0; line-height: 1.3; }
.org-host small { display: block; font-size: .8rem; letter-spacing: .2em; color: #e7c98f; }
.venues { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: clamp(44px, 6vw, 64px); }
.venue {
  position: relative; overflow: hidden; min-height: 200px; padding: 26px; border-radius: 18px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: rgba(255,253,248,.05); border: 1px solid rgba(231,201,143,.2);
  transition: border-color .3s ease, transform .3s ease, opacity .9s ease;
}
.venue.reveal.is-visible:hover { border-color: rgba(231,201,143,.7); transform: translateY(-4px); }
.venue__n { position: absolute; top: 14px; right: 20px; font-size: 4rem; font-weight: 200; line-height: 1; color: rgba(231,201,143,.18); }
.venue small { font-size: .75rem; letter-spacing: .12em; color: #e7c98f; }
.venue h3 { margin: 4px 0; font-size: 1.2rem; }
.venue p { margin: 0; font-size: .9rem; color: rgba(255,253,248,.65); }
.org-band__sub { text-align: center; margin: clamp(44px, 6vw, 60px) 0 22px; font-size: .78rem; font-weight: 400; letter-spacing: .2em; color: #e7c98f; }
.marquee {
  display: grid; gap: 14px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee__row { display: flex; gap: 12px; width: max-content; animation: marquee 40s linear infinite; }
.marquee__row--rev { animation-direction: reverse; animation-duration: 46s; }
.marquee:hover .marquee__row { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.chip { white-space: nowrap; padding: 10px 20px; border-radius: 999px; border: 1px solid rgba(231,201,143,.35); color: rgba(255,253,248,.85); font-size: .95rem; }
.chip--fill { background: #e7c98f; border-color: #e7c98f; color: var(--ink); }

/* =========================================================
   Guidelines page — applicant handbook (scrapbook + interactive)
   ========================================================= */
/* notebook tabs */
.gl-tabs { display: flex; gap: 6px; padding-left: 24px; }
.gl-tab {
  display: flex; align-items: center; gap: 8px; padding: 10px 20px 8px;
  font: inherit; color: var(--ink-2); cursor: pointer;
  background: var(--paper-2); border: 1px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0;
  transform: translateY(4px); transition: background .25s ease, transform .25s ease;
}
.gl-tab svg { width: 18px; height: 18px; color: var(--accent); }
.gl-tab[aria-selected="true"] { background: var(--white); color: var(--ink); font-weight: 400; transform: none; }
.gl-tabs { display: none; } /* shown once JS turns the panels into tabs */
.gl-book.is-ready .gl-tabs { display: flex; }
.gl-page {
  position: relative; display: grid; gap: 30px; padding: 34px 36px 34px 56px;
  background: var(--white) repeating-linear-gradient(transparent 0 31px, rgba(154,106,60,.1) 31px 32px) 0 30px;
  border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 18px 36px -26px rgba(47,41,34,.5);
}
.gl-page::before { content: ""; position: absolute; left: 30px; top: 0; bottom: 0; width: 1px; background: rgba(176,83,47,.25); }
.gl-panel { display: grid; grid-template-columns: 1fr 220px; gap: 30px; }
.gl-book.is-ready .gl-panel:not(.is-active) { display: none; }
.gl-book.is-ready .gl-panel.is-active { animation: fadeUp .4s ease; }
.gl-panel__title { font-size: 1.2rem; margin-bottom: 12px; }
.gl-book.is-ready .gl-panel__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } /* tab already names it */
.gl-list { display: grid; gap: 10px; }
.gl-list li { position: relative; padding-left: 22px; color: var(--ink-2); }
.gl-list li::before { content: ""; position: absolute; left: 0; top: .78em; width: 10px; height: 1px; background: var(--accent); }
.gl-panel__side { margin: 0; padding-left: 24px; border-left: 1px dashed var(--line); font-size: .85rem; color: var(--muted); }
.gl-panel__side b { display: block; font-size: 3.2rem; font-weight: 200; line-height: 1.1; color: var(--accent); }

/* required files */
.gl-files { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(30px, 5vw, 50px); align-items: start; margin-top: clamp(60px, 8vw, 100px); }
.gl-ftypes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 0; }
.gl-ftypes small { font-size: .8rem; color: var(--muted); }
.gl-ft { padding: 4px 10px; border-radius: 6px; background: var(--paper-2); color: var(--accent-dark); font-size: .75rem; font-weight: 500; letter-spacing: .06em; }
.gl-ft--v { background: var(--ink); color: #e7c98f; }
.clipboard { position: relative; padding: 34px 18px 18px; border-radius: 18px; background: #b98a55; box-shadow: 0 24px 40px -26px rgba(47,41,34,.7); }
.clipboard::before { content: ""; position: absolute; top: -14px; left: 50%; translate: -50% 0; width: 120px; height: 34px; border-radius: 10px; background: linear-gradient(#d9d2c3, #a99f8b); box-shadow: 0 3px 6px rgba(0,0,0,.25); }
.clipboard__paper { padding: 24px 24px 20px; border-radius: 6px; background: var(--white); }
.clipboard__title { font-size: 1.15rem; margin-bottom: 4px; }
.gl-progress { display: flex; align-items: center; gap: 12px; margin: 10px 0 14px; font-size: .88rem; color: var(--ink-2); }
.gl-progress__bar { flex: 1; height: 8px; border-radius: 8px; background: var(--paper-2); overflow: hidden; }
.gl-progress__bar i { display: block; width: 0; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #c79a5d, var(--seal)); transition: width .4s ease; }
.gl-progress.is-complete { color: var(--seal); font-weight: 400; }
.gl-check { display: flex; align-items: flex-start; gap: 14px; padding: 12px 0; border-bottom: 1px dashed var(--line); cursor: pointer; }
.gl-check:last-child { border-bottom: 0; }
.gl-check input { appearance: none; -webkit-appearance: none; flex: none; display: grid; place-items: center; width: 24px; height: 24px; margin: 2px 0 0; border: 2px solid var(--accent); border-radius: 6px; cursor: pointer; transition: background .2s ease; }
.gl-check input:checked { background: var(--accent); }
.gl-check input:checked::after { content: "✓"; font-size: .9rem; color: var(--white); }
.gl-check input:focus-visible { outline: 2px solid var(--seal); outline-offset: 2px; }
.gl-check b { font-weight: 400; color: var(--ink); }
.gl-check small { display: block; font-size: .8rem; color: var(--muted); }
.gl-check input:checked + span b { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--accent); }

/* two phases */
.gl-phases { display: grid; grid-template-columns: 1fr 70px 1fr; align-items: center; margin-top: clamp(60px, 8vw, 100px); }
.gl-phase { padding: 28px 28px 24px; border-radius: 18px; background: var(--white); border: 1px solid var(--line); }
.gl-phase small { font-size: .75rem; letter-spacing: .18em; color: var(--accent); }
.gl-phase h3 { margin: 6px 0 6px; font-size: 1.3rem; }
.gl-phase p { margin: 0; font-size: .94rem; color: var(--ink-2); }
.gl-phase__funnel { display: flex; align-items: baseline; gap: 10px; margin-top: 16px; font-size: .85rem; }
.gl-phase__funnel b { font-size: 1.6rem; font-weight: 300; }
.gl-phase--dark { background: var(--ink); border-color: var(--ink); color: var(--white); }
.gl-phase--dark small { color: #e7c98f; }
.gl-phase--dark p { color: rgba(255,253,248,.75); }
.gl-phases__arrow { position: relative; height: 2px; background: repeating-linear-gradient(90deg, var(--accent) 0 6px, transparent 6px 12px); }
.gl-phases__arrow::after { content: ""; position: absolute; right: -2px; top: -5px; border: 6px solid transparent; border-left: 9px solid var(--accent); }

/* criteria donut */
.gl-crit { display: grid; grid-template-columns: minmax(0, 360px) 1fr; gap: clamp(30px, 5vw, 60px); align-items: center; margin-top: clamp(60px, 8vw, 100px); }
.gl-donut { position: relative; width: 100%; max-width: 360px; aspect-ratio: 1; margin: 0 auto; }
.gl-donut svg { width: 100%; height: 100%; rotate: -90deg; }
.gl-donut__seg { fill: none; stroke-width: 6; transition: stroke-width .25s ease, opacity .25s ease; }
.gl-crit.has-focus .gl-donut__seg { opacity: .3; }
.gl-crit.has-focus .gl-donut__seg.is-on { opacity: 1; stroke-width: 8; }
.gl-donut__center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.gl-donut__center b { font-size: 3.6rem; font-weight: 200; line-height: 1; }
.gl-donut__center span { font-size: .85rem; color: var(--muted); }
.gl-legend { display: grid; gap: 4px; list-style: none; margin: 0; padding: 0; }
.gl-legend button {
  display: grid; grid-template-columns: 14px 1fr auto; gap: 14px; align-items: center; width: 100%;
  padding: 12px 16px; border: 0; border-radius: 12px; background: transparent; font: inherit; color: var(--ink-2); text-align: left; cursor: pointer;
  transition: background .2s ease;
}
.gl-legend button:hover, .gl-legend button.is-on { background: var(--white); color: var(--ink); }
.gl-legend i { width: 14px; height: 14px; border-radius: 4px; }
.gl-legend b { font-size: 1.3rem; font-weight: 400; color: var(--accent-dark); }
.gl-rubrics { margin-top: 14px; }
.gl-rubric { display: grid; grid-template-columns: 70px 1fr; gap: 6px 10px; margin: 0 0 14px; padding: 16px 20px; border-radius: 14px; background: var(--white); border: 1px solid var(--line); font-size: .9rem; color: var(--ink-2); }
.gl-rubric dt { color: var(--ink); }
.gl-rubric dd { margin: 0; }
.gl-crit.is-ready .gl-rubric { display: none; }
.gl-crit.is-ready .gl-rubric.is-on { display: grid; animation: fadeUp .35s ease; }

/* jury balance scale */
.gl-jury { display: grid; grid-template-columns: 1fr 280px 1fr; gap: 20px; align-items: center; margin-top: clamp(60px, 8vw, 100px); }
.gl-jury__side { padding: 24px; border-radius: 18px; background: var(--white); border: 1px solid var(--line); }
.gl-jury__side b { display: block; font-size: 2.4rem; font-weight: 200; line-height: 1; color: var(--accent); }
.gl-jury__side h3 { margin: 8px 0 4px; font-size: 1.1rem; }
.gl-jury__side p { margin: 0; font-size: .9rem; color: var(--ink-2); }
.gl-scale { width: 100%; height: auto; color: var(--accent-dark); }
.gl-scale__beam { transform-origin: 150px 60px; animation: scaleTilt 5s ease-in-out infinite; }
.gl-scale__pan { animation: scaleCounter 5s ease-in-out infinite; }
.gl-scale__pan--l { transform-origin: 50px 60px; }
.gl-scale__pan--r { transform-origin: 250px 60px; }
@keyframes scaleTilt { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes scaleCounter { 0%, 100% { transform: rotate(3deg); } 50% { transform: rotate(-3deg); } }

/* prizes */
.gl-prize { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(30px, 5vw, 60px); align-items: center; margin-top: clamp(40px, 6vw, 70px); }
.stamps--2 { grid-template-columns: repeat(2, 1fr); margin-top: 18px; }

/* =========================================================
   Account zone — login / register / reset / dashboard / admin
   ========================================================= */
.auth { display: grid; grid-template-columns: 1fr 1fr; min-height: 100svh; }
.auth__visual {
  position: relative; display: flex; align-items: flex-end; padding: clamp(28px, 4vw, 56px);
  color: var(--white); isolation: isolate; overflow: hidden;
}
.auth__visual img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; filter: sepia(.35) saturate(.75) brightness(.85); }
.auth__visual::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(41,35,28,.25), rgba(41,35,28,.85)); }
.auth__visual h2 { font-size: clamp(1.8rem, 3.4vw, 2.8rem); font-weight: 300; line-height: 1.25; margin-bottom: 12px; }
.auth__visual p { max-width: 42ch; opacity: .9; margin: 0; }
.auth__steps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; padding: 0; list-style: none; counter-reset: as; }
.auth__steps li { counter-increment: as; font-size: .82rem; padding: 6px 14px; border-radius: 99px; background: rgba(255,253,248,.14); border: 1px solid rgba(255,253,248,.3); }
.auth__steps li::before { content: counter(as) ". "; color: #e7c98f; }
.auth__panel { display: grid; place-items: center; padding: calc(var(--header-h) + 50px) var(--gutter) 60px; }

.auth-card {
  position: relative; width: min(100%, 470px); padding: clamp(26px, 4vw, 40px);
  background: var(--white); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg);
}
.auth-card::before { content: ""; position: absolute; top: -12px; left: 50%; width: 90px; height: 24px; translate: -50% 0; rotate: -3deg; background: var(--tape); }
.auth-card h1 { font-size: 1.7rem; font-weight: 300; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); font-size: .92rem; margin-bottom: 24px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 26px; background: var(--paper-2); border-radius: 999px; }
.auth-tabs button { padding: 10px; border: 0; border-radius: 999px; background: transparent; font: inherit; color: var(--ink-2); cursor: pointer; transition: background .2s ease, color .2s ease; }
.auth-tabs button[aria-selected="true"] { background: var(--white); color: var(--ink); font-weight: 400; box-shadow: 0 2px 8px -4px rgba(47,41,34,.4); }
.auth-form { display: grid; gap: 16px; }
.auth-form[hidden] { display: none; }
/* login / register: the 4-step timeline lives on the photo on desktop, and inside the "Sign up" tab on phones / tablets */
.auth__steps--card { display: none; }
@media (max-width: 960px) {
  .auth__visual .auth__steps { display: none; }
  .auth__steps--card { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 4px; margin: 2px 0 4px; }
  .auth__steps--card::before { /* the line joining the dots */
    content: ""; position: absolute; top: 13px; left: 12.5%; right: 12.5%; height: 1px; background: var(--line);
  }
  .auth__steps--card li {
    position: relative; display: grid; justify-items: center; gap: 6px; padding: 0; border: 0; background: none;
    text-align: center; font-size: .72rem; line-height: 1.3; color: var(--ink-2);
  }
  .auth__steps--card li::before {
    content: counter(as); position: relative; z-index: 1; width: 27px; height: 27px; border-radius: 50%;
    display: grid; place-items: center; font-size: .78rem; color: var(--accent-dark); background: var(--white); border: 1px solid var(--line);
  }
  .auth__steps--card li:first-child { color: var(--ink); font-weight: 400; }
  .auth__steps--card li:first-child::before { background: var(--seal); border-color: var(--seal); color: var(--white); } /* you are here */
}

/* searchable select (main.js initComboboxes): the native <select> stays in the form but out of sight */
.combo__native { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.combo { position: relative; }
.combo__input {
  width: 100%; padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b7f6e' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='6'/%3E%3Cpath d='M20 20l-4.5-4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
}
.combo__list {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); max-height: 280px; overflow-y: auto;
  margin: 0; padding: 6px; list-style: none; background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 36px -18px rgba(47,41,34,.45); overscroll-behavior: contain;
}
.combo__list li { padding: 9px 12px; border-radius: 9px; cursor: pointer; color: var(--ink); font-size: .95rem; }
.combo__list li.is-active { background: var(--paper-2); }
.combo__list li.combo__empty { cursor: default; color: var(--muted); font-size: .88rem; }

/* "registration opens soon" popup (main.js showRegPopup) */
.reg-pop { padding: 0; border: 0; background: transparent; max-width: min(460px, calc(100vw - 32px)); width: 100%; overflow: visible; }
.reg-pop::backdrop { background: rgba(41, 35, 28, .6); backdrop-filter: blur(4px); }
.reg-pop[open] { animation: popIn .35s cubic-bezier(.2,.8,.2,1.2); }
@keyframes popIn { from { opacity: 0; transform: translateY(16px) scale(.96); } }
.reg-pop__card {
  position: relative; padding: 46px 32px 30px; text-align: center; color: var(--ink);
  background: var(--white); border-radius: 22px; box-shadow: 0 40px 70px -30px rgba(0,0,0,.6);
}
.reg-pop__card::before { content: ""; position: absolute; top: -13px; left: 50%; width: 110px; height: 26px; translate: -50% 0; rotate: -3deg; background: var(--tape); }
.reg-pop__x { position: absolute; top: 12px; right: 14px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.reg-pop__x:hover { background: var(--paper); color: var(--ink); }
.reg-pop__stamp {
  display: inline-grid; justify-items: center; margin-bottom: 18px; padding: 8px 20px 6px; line-height: 1.1;
  border: 3px double var(--seal); border-radius: 12px; color: var(--seal); rotate: -5deg;
}
.reg-pop__stamp small { font-size: .62rem; letter-spacing: .24em; }
.reg-pop__stamp b { font-size: 2.6rem; font-weight: 400; }
.reg-pop__stamp span { font-size: .8rem; }
.reg-pop h2 { margin: 0 0 8px; font-size: 1.7rem; font-weight: 400; }
.reg-pop p { margin: 0 auto; max-width: 34ch; color: var(--ink-2); font-size: .95rem; line-height: 1.65; }
.reg-pop p b { font-weight: 500; color: var(--ink); }
.reg-pop__cd { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 22px 0 4px; }
.reg-pop__cd div { padding: 10px 4px 8px; border-radius: 12px; background: var(--paper); }
.reg-pop__cd b { display: block; font-size: 1.7rem; font-weight: 300; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--accent-dark); }
.reg-pop__cd small { font-size: .72rem; color: var(--muted); }
.reg-pop__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }
/* submitted confirmation popup (account.js showSubmitted) */
.done-pop__icon {
  width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center;
  background: #e6efe1; color: #4f7a43; border: 2px solid #4f7a43; font-size: 1.7rem; line-height: 1;
  animation: popIn .45s cubic-bezier(.2,.8,.2,1.3) .1s both;
}
.done-pop__code { margin: 14px 0 16px; }
.done-pop__code b { font-size: 1.8rem; letter-spacing: .04em; }
.done-pop p { margin-bottom: 14px; }
.done-pop__info { display: grid; gap: 0; margin: 0; padding: 4px 16px; border-radius: 12px; background: var(--paper); text-align: left; }
.done-pop__info > div { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 16px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.done-pop__info > div:last-child { border-bottom: 0; }
.done-pop__info dt { font-size: .82rem; color: var(--muted); }
.done-pop__info dd { margin: 0; font-size: .92rem; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
/* form error popup (main.js showFormErrors) */
.err-pop .reg-pop__card { padding-top: 40px; }
.err-pop__icon {
  width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center;
  background: #fbefe9; color: var(--seal); border: 2px solid var(--seal); font-size: 1.6rem; font-weight: 500; line-height: 1;
}
.err-pop__list { margin: 14px 0 0; padding: 0; list-style: none; text-align: left; display: grid; gap: 12px; max-height: 46vh; overflow-y: auto; }
.err-pop__list > li { padding: 12px 14px; border-radius: 12px; background: var(--paper); border-left: 3px solid var(--seal); }
.err-pop__list > li > b { display: block; margin-bottom: 4px; font-size: .82rem; font-weight: 500; color: var(--seal); letter-spacing: .02em; }
.err-pop__list ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: .9rem; color: var(--ink-2); line-height: 1.5; }
.err-pop__field { font-weight: 500; color: var(--ink); }
.auth-closed { margin: 0; padding: 14px 16px; border-radius: 12px; background: #fbefe9; border-left: 4px solid var(--seal); color: var(--ink-2); font-size: .92rem; line-height: 1.6; }
.auth-closed b { font-weight: 500; color: var(--seal); }
.auth-closed__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.auth-closed__actions .btn { width: auto; padding: 9px 16px; }
/* registration not open: only the heading, steps and the notice stay; the fields are hidden */
.auth-form.is-locked > *:not(div:first-child):not(.auth__steps--card):not(.auth-closed) { display: none !important; }
.auth-form input:disabled, .auth-form button:disabled { opacity: .55; cursor: not-allowed; }
.auth-form .btn { justify-content: center; width: 100%; padding: 13px; }
.auth-links { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .88rem; }
.auth-links a { color: var(--accent-dark); }
/* single "back to login" link: centred under a divider, arrow drawn, no heavy underline */
.auth-links--back { justify-content: center; margin-top: 4px; padding-top: 16px; border-top: 1px dashed var(--line); }
.auth-links--back a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink-2); }
.auth-links--back a::before { content: "←"; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--paper-2); color: var(--accent-dark); transition: transform .2s ease; }
.auth-links--back a:hover { color: var(--ink); }
.auth-links--back a:hover::before { transform: translateX(-3px); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 70px; }
/* show / hide password: eye icon (eye with a slash once the password is visible) */
.pw-toggle {
  position: absolute; right: 6px; top: 50%; translate: 0 -50%; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: none; color: var(--muted); font-size: 0; cursor: pointer; transition: color .2s ease, background .2s ease;
}
.pw-toggle:hover { color: var(--ink); background: var(--paper-2); }
.pw-toggle::before {
  content: ""; width: 20px; height: 20px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pw-toggle[aria-pressed="true"] { color: var(--accent-dark); }
.pw-toggle[aria-pressed="true"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.6 5.1A10.7 10.7 0 0112 5c6.4 0 10 7 10 7a17.6 17.6 0 01-3 3.9M6.6 6.6A17.4 17.4 0 002 12s3.6 7 10 7a10 10 0 005.4-1.6'/%3E%3Cpath d='M9.9 9.9a3 3 0 004.2 4.2M3 3l18 18'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.6 5.1A10.7 10.7 0 0112 5c6.4 0 10 7 10 7a17.6 17.6 0 01-3 3.9M6.6 6.6A17.4 17.4 0 002 12s3.6 7 10 7a10 10 0 005.4-1.6'/%3E%3Cpath d='M9.9 9.9a3 3 0 004.2 4.2M3 3l18 18'/%3E%3C/svg%3E");
}
.pw-meter { height: 4px; border-radius: 4px; background: var(--paper-2); overflow: hidden; margin-top: 6px; }
.pw-meter i { display: block; height: 100%; width: 0; transition: width .3s ease, background .3s ease; }
.form-message { min-height: 1.2em; margin: 0; font-size: .9rem; color: var(--seal); }
.form-message.is-ok { color: #4f7a43; }
.form-message:empty { display: none; }

/* guidelines #submit → account call-to-action */
.submit-cta__card {
  position: relative; padding: clamp(28px, 4vw, 44px); border-radius: 20px;
  background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.submit-cta__card::before { content: ""; position: absolute; top: -12px; left: 50%; width: 90px; height: 24px; translate: -50% 0; rotate: -3deg; background: var(--tape); }
.submit-cta__card h3 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 300; margin: 6px 0 10px; }
.submit-cta__card > p { color: var(--ink-2); margin-bottom: 26px; }
.submit-cta__steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 0 0 28px; padding: 0; list-style: none; }
.submit-cta__steps li { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 14px; background: var(--paper); }
.submit-cta__steps b { font-size: 1.6rem; font-weight: 200; color: var(--accent); line-height: 1; }
.submit-cta__steps span { line-height: 1.35; color: var(--ink); }
.submit-cta__steps small { display: block; font-size: .8rem; color: var(--muted); }
.submit-cta__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* dashboard */
.dash { padding: calc(var(--header-h) + 60px) 0 clamp(70px, 9vw, 110px); }
.dash-head { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(24px, 4vw, 40px); align-items: stretch; margin-bottom: clamp(36px, 5vw, 56px); }
.dash-hello h1 { font-size: clamp(2rem, 4.4vw, 3rem); font-weight: 300; color: var(--ink-2); margin: 8px 0 10px; }
.dash-hello p { color: var(--ink-2); margin: 0 0 18px; }
.dash-hello__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.dash-card {
  position: relative; display: grid; grid-template-columns: 1fr auto; gap: 8px 20px; align-content: start;
  padding: 28px 30px; border-radius: 18px; background: var(--ink); color: var(--white);
}
.dash-card small { font-size: .74rem; letter-spacing: .18em; color: #e7c98f; }
.dash-card__code { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 200; line-height: 1.1; letter-spacing: .04em; }
.dash-card__code.is-empty { font-size: 1.15rem; font-weight: 300; letter-spacing: 0; color: rgba(255,253,248,.7); margin-top: 6px; }
.dash-card__meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 22px; padding-top: 16px; margin-top: 8px; border-top: 1px dashed rgba(255,253,248,.22); font-size: .88rem; color: rgba(255,253,248,.78); }
.dash-card__meta b { font-weight: 400; color: var(--white); }
.status-pill { align-self: start; padding: 4px 14px; border-radius: 99px; font-size: .8rem; background: rgba(255,253,248,.14); color: var(--white); white-space: nowrap; }
.status-pill[data-status="submitted"], .status-pill[data-status="verified"] { background: #e7c98f; color: var(--ink); }
.status-pill[data-status="finalist"], .status-pill[data-status="winner"] { background: var(--seal); color: var(--white); }
.status-pill[data-status="rejected"] { background: #6b6259; }
.dash-alert { display: flex; gap: 14px; align-items: flex-start; padding: 16px 20px; margin-bottom: 26px; border-radius: 14px; background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--accent); color: var(--ink-2); }
.dash-alert b { color: var(--ink); font-weight: 400; }
.dash-alert--ok { border-left-color: #4f7a43; }
.dash-alert--warn { border-left-color: var(--seal); }
.dash-form .form__foot { position: sticky; bottom: 0; z-index: 5; margin: 26px calc(clamp(24px, 4vw, 44px) * -1) calc(clamp(24px, 4vw, 44px) * -1); padding: 16px clamp(24px, 4vw, 44px); background: rgba(255,253,248,.96); border-top: 1px solid var(--line); border-radius: 0 0 20px 20px; backdrop-filter: blur(6px); }
.dash-form .form__foot .spacer { flex: 1; }
.form__dots { display: none; } /* step dots only appear in the phone footer */
/* submit not ready yet (declarations missing): muted, but still clickable so it can point at what's missing */
.dash-form [type=submit].is-waiting { background: var(--paper-2); border-color: var(--line); color: var(--muted); box-shadow: none; }
.dash-form [type=submit]:disabled { opacity: .55; cursor: not-allowed; }
.dash-form fieldset[disabled] { opacity: .7; }

/* applicant dashboard as a notebook: dotted binding on the left, step tabs sticking out on the right,
   applicant code as a red rubber stamp */
.app-book {
  --pl: clamp(52px, 6vw, 80px); --pr: clamp(26px, 4vw, 48px); --pb: clamp(24px, 4vw, 44px);
  position: relative; margin-right: 18px; padding: clamp(28px, 4vw, 46px) var(--pr) var(--pb) var(--pl);
  background: var(--white); border-radius: 6px 20px 20px 6px; box-shadow: 0 30px 60px -36px rgba(47,41,34,.55);
}
.app-book::before { content: ""; position: absolute; left: calc(var(--pl) * .42); top: 0; bottom: 0; border-left: 2px dotted var(--line); }
.stepper.app-book__tabs { position: absolute; top: 46px; right: -18px; display: grid; grid-template-columns: none; gap: 8px; margin: 0; }
.app-book__tabs li {
  writing-mode: vertical-rl; padding: 16px 7px; border: 0; border-radius: 0 12px 12px 0;
  background: var(--paper-2); color: var(--ink-2); font-size: .76rem; letter-spacing: .02em;
  box-shadow: 4px 6px 14px -10px rgba(47,41,34,.5);
}
.app-book__tabs li.is-done { background: #e7c98f; color: var(--ink); }
.app-book__tabs li.is-active { background: var(--seal); color: var(--white); }
.app-book__head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 20px 28px; flex-wrap: wrap;
  margin-bottom: 30px; padding-bottom: 24px; border-bottom: 1px dashed var(--line);
}
.app-book__hello h1 { margin: 6px 0 6px; font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 300; line-height: 1.2; color: var(--ink); }
.app-book__meta { margin: 0 0 16px; font-size: .88rem; color: var(--muted); }
.app-book__meta b { font-weight: 400; color: var(--ink-2); }
.app-stamp {
  display: grid; justify-items: center; gap: 4px; min-width: 190px; padding: 12px 20px; text-align: center; line-height: 1.2;
  border: 3px double var(--seal); border-radius: 12px; color: var(--seal); rotate: -4deg;
}
.app-stamp small { font-size: .6rem; letter-spacing: .2em; }
.app-stamp__code { font-size: 1.6rem; font-weight: 500; letter-spacing: .04em; }
.app-stamp__code.is-empty { max-width: 170px; font-size: .9rem; font-weight: 400; letter-spacing: 0; }
.app-stamp .status-pill { margin-top: 4px; font-size: .72rem; background: rgba(176,83,47,.1); color: var(--seal); }
.app-book .form__foot {
  margin: 26px calc(var(--pr) * -1) calc(var(--pb) * -1) calc(var(--pl) * -1);
  padding: 16px var(--pr) 16px var(--pl); border-radius: 0 0 20px 6px;
}
input[readonly] { background: var(--white); border-style: dashed; color: var(--ink-2); cursor: default; }
@media (max-width: 760px) {
  /* phones keep the side tabs (narrower), with room for them on the right edge */
  .app-book { --pl: 34px; --pr: 16px; --pb: 20px; margin-right: 20px; border-radius: 6px 18px 18px 6px; }
  .app-book::before { left: 13px; }
  .app-book .stepper.app-book__tabs { top: 28px; right: -20px; gap: 6px; }
  .app-book .stepper.app-book__tabs li { padding: 12px 5px; font-size: .66rem; line-height: 1.2; }
  .app-book .stepper.app-book__tabs li::before { font-size: inherit; }
  .app-stamp { rotate: -2deg; }
  .dash-alert { display: block; } /* one flowing paragraph instead of two narrow columns */
}
/* long file names must shrink to "…" instead of widening the form: grid tracks default to their content's width */
.existing-files { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin: 4px 0 8px; padding: 0; list-style: none; }
.upload-grid > *, .form__grid > *, .file-list li { min-width: 0; }
.existing-files li span:not(.ok) { flex: none; white-space: nowrap; }
.file-list li { overflow-wrap: anywhere; }
.existing-files li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--paper-2); font-size: .86rem; color: var(--ink-2); }
.existing-files li a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.existing-files li .ok { color: #4f7a43; }
.file-remove { border: 0; background: none; padding: 4px 8px; font: inherit; font-size: .8rem; color: var(--seal); cursor: pointer; }
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 3000; translate: -50% 20px; opacity: 0; pointer-events: none;
  max-width: min(92vw, 520px); padding: 12px 20px; border-radius: 12px; background: var(--ink); color: var(--white); font-size: .92rem;
  box-shadow: var(--shadow-lg); transition: opacity .3s ease, translate .3s ease;
}
.toast.is-shown { opacity: 1; translate: -50% 0; }
.toast.is-error { background: var(--seal); }
.dash-loading { text-align: center; padding: 120px 0; color: var(--muted); }

/* admin */
.admin-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 20px; }
.admin-bar .spacer { flex: 1; }
.admin-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.admin-stats span { padding: 8px 14px; border-radius: 12px; background: var(--white); border: 1px solid var(--line); font-size: .86rem; color: var(--ink-2); }
.admin-stats b { font-weight: 400; color: var(--ink); margin-left: 4px; }
.admin-table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: 16px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 860px; }
.admin-table th, .admin-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table th { font-weight: 400; font-size: .8rem; letter-spacing: .06em; color: var(--muted); background: var(--paper); position: sticky; top: 0; }
.admin-table tr.is-open td { background: var(--paper); }
.admin-table select { padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); font: inherit; font-size: .85rem; }
.admin-table .more { border: 0; background: none; color: var(--accent-dark); cursor: pointer; font: inherit; font-size: .85rem; padding: 0; }
.admin-detail td { background: var(--paper); }
.admin-detail dl { display: grid; grid-template-columns: 170px 1fr; gap: 6px 16px; margin: 0; font-size: .88rem; }
.admin-detail dt { color: var(--muted); }
.admin-detail dd { margin: 0; white-space: pre-wrap; }
.admin-detail textarea { width: 100%; min-height: 70px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }

@media (max-width: 960px) {
  .auth { grid-template-columns: minmax(0, 1fr); } /* minmax: long words can't widen the page */
  .auth__visual { min-height: 320px; padding-top: calc(var(--header-h) + 40px); }
  .auth__panel { padding-top: 40px; }
  .dash-head { grid-template-columns: 1fr; }
  .site-nav__login { justify-content: center; margin: 0; --bg: var(--ink) !important; --fg: var(--white) !important; }
}
@media (max-width: 640px) {
  .admin-detail dl { grid-template-columns: 1fr; }
  .submit-cta__steps { grid-template-columns: 1fr; }
  /* phones: an app-style dark capsule floating above the bottom edge — [←] [☁ save] • ━ • • [next →] */
  .app-book.dash-form .form__foot, .dash-form .form__foot {
    position: sticky; bottom: 14px; z-index: 20; flex-wrap: nowrap; align-items: center; gap: 4px;
    margin: 26px 0 0; padding: 6px; border: 0; border-radius: 99px;
    background: var(--dark); box-shadow: 0 16px 30px -10px rgba(0,0,0,.5); backdrop-filter: none;
  }
  .dash-form .form__foot .spacer { display: none; }
  .dash-form .form__foot [data-prev], .dash-form .form__foot [data-save] {
    flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; justify-content: center;
    gap: 0; line-height: 0; /* no gap next to the hidden label, or the icon drifts off-centre */
    background: rgba(255,253,248,.1); color: var(--white); font-size: 0; /* icon only; the label stays for screen readers */
  }
  .dash-form .form__foot [data-prev] { order: 1; }
  .dash-form .form__foot [data-prev]::before { /* drawn arrow (a text "←" sits on the font baseline, not the centre) */
    content: ""; width: 20px; height: 20px; background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5M11 6l-6 6 6 6'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5M11 6l-6 6 6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  }
  .dash-form .form__foot [data-save] { order: 2; }
  .dash-form .form__foot [data-save]::before {
    content: ""; width: 20px; height: 20px; background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 18a4.5 4.5 0 01-.9-8.9A6 6 0 0117.7 8 4 4 0 0118 18z'/%3E%3Cpath d='M12 11v6M9.5 13.5L12 11l2.5 2.5'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 18a4.5 4.5 0 01-.9-8.9A6 6 0 0117.7 8 4 4 0 0118 18z'/%3E%3Cpath d='M12 11v6M9.5 13.5L12 11l2.5 2.5'/%3E%3C/svg%3E") center / contain no-repeat;
  }
  .dash-form .form__foot [data-save]:disabled::before { animation: savePulse 1s ease-in-out infinite; }
  @keyframes savePulse { 50% { opacity: .35; } }
  .form__dots { order: 3; flex: 1; display: flex; justify-content: center; gap: 6px; }
  .form__dots i { width: 7px; height: 7px; border-radius: 99px; background: rgba(255,253,248,.3); transition: width .3s ease, background .3s ease; }
  .form__dots i.done { background: rgba(231,201,143,.6); }
  .form__dots i.on { width: 20px; background: #e7c98f; }
  .dash-form .form__foot [data-next], .dash-form .form__foot [type=submit] {
    order: 4; flex: none; height: 44px; padding: 0 20px; border: 0; justify-content: center; white-space: nowrap;
    background: var(--white); color: var(--ink); font-size: .9rem;
  }
  .dash-form .form__foot [type=submit]:disabled { opacity: .45; }
  .dash-form .form__foot [type=submit].is-waiting { background: rgba(255,253,248,.16); color: rgba(255,253,248,.75); }
}

/* 6-step journey */
.polaroid-row--6 { grid-template-columns: repeat(3, 1fr); row-gap: 50px; }
.polaroid-row--6 > :nth-child(n) { margin-top: 0; }
.polaroid-row--6 > :nth-child(1) { --r: -3deg; }
.polaroid-row--6 > :nth-child(2) { --r: 2deg; margin-top: 30px; }
.polaroid-row--6 > :nth-child(3) { --r: -1.5deg; }
.polaroid-row--6 > :nth-child(4) { --r: 2.5deg; }
.polaroid-row--6 > :nth-child(5) { --r: -2deg; margin-top: 30px; }
.polaroid-row--6 > :nth-child(6) { --r: 3deg; }
.polaroid__caption p { margin: 6px 0 0; font-size: .82rem; color: var(--ink-2); line-height: 1.5; }

/* rubric */
.rubric { margin-top: 10px; }
.rubric summary { cursor: pointer; font-size: .85rem; color: var(--accent); list-style: none; }
.rubric summary::-webkit-details-marker { display: none; }
.rubric summary::before { content: "+ "; }
.rubric[open] summary::before { content: "– "; }
.rubric ul { margin-top: 10px; display: grid; gap: 6px; }
.rubric li { display: grid; grid-template-columns: 74px 1fr; gap: 10px; font-size: .86rem; color: var(--ink-2); }
.rubric li b { font-weight: 400; color: var(--ink); }
.jury { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 30px; }
.jury .paper-card p { color: var(--ink-2); font-size: .94rem; margin: 0; }
.jury__weight { font-size: 2.2rem; font-weight: 300; color: var(--accent); line-height: 1; margin-bottom: 8px; }
.note { font-size: .88rem; color: var(--muted); border-left: 2px solid var(--line); padding-left: 14px; margin-top: 22px; }

.prize-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 22px; margin-top: clamp(60px, 8vw, 100px); }
.prize-hero .paper-card { display: flex; flex-direction: column; justify-content: center; }
.prize-hero .prize__amount { font-size: clamp(2.4rem, 5vw, 3.6rem); }

/* timeline status */
.tl-item.is-done .tl-card { opacity: .6; }
.tl-item.is-done::before { background: var(--accent); border-color: var(--accent); }
.tl-phase { grid-column: 1 / -1; text-align: center; padding: 30px 0 10px; position: relative; z-index: 1; }
.tl-phase span { display: inline-block; background: var(--white); border: 1px solid var(--line); border-radius: 99px; padding: 6px 18px; font-size: .85rem; color: var(--accent-dark); }
.badge--muted { background: var(--paper-2); color: var(--ink-2); }

/* multi-step form */
.stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 0 28px; padding: 0; list-style: none; counter-reset: st; }
.stepper li { counter-increment: st; font-size: .8rem; color: var(--muted); padding-top: 12px; border-top: 3px solid var(--paper-2); transition: border-color .3s ease, color .3s ease; }
.stepper li::before { content: "0" counter(st) " "; color: inherit; }
.stepper li.is-active { border-color: var(--ink); color: var(--ink); }
.stepper li.is-done { border-color: var(--accent); color: var(--accent); }
.form-step { display: none; border: 0; padding: 0; margin: 0; min-width: 0; }
.form-step.is-active { display: block; animation: fadeIn .35s ease; }
.form-step > legend { font-size: 1.3rem; font-weight: 400; margin-bottom: 4px; padding: 0; }
.form-step__desc { color: var(--muted); font-size: .9rem; margin-bottom: 22px; }
.counter { font-size: .8rem; color: var(--muted); text-align: right; }
.counter.is-over { color: var(--seal); }
.file-list { display: grid; gap: 6px; margin-top: 8px; }
.file-list li { display: flex; gap: 10px; align-items: center; font-size: .85rem; color: var(--ink-2); background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.file-list img { width: 36px; height: 36px; object-fit: cover; border-radius: 4px; }
.file-list .ext { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 4px; background: var(--paper-2); font-size: .7rem; color: var(--accent-dark); }
.file-unpick { margin-left: auto; flex: none; width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: .85rem; cursor: pointer; }
.file-unpick:hover { background: var(--white); color: var(--seal); }
.dropzone--sm { padding: 20px 14px; }
.upload-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.prepare-list { display: grid; gap: 10px; counter-reset: pr; }
.prepare-list li { counter-increment: pr; display: grid; grid-template-columns: 30px 1fr; gap: 10px; color: var(--ink-2); font-size: .95rem; }
.paper-card .prepare-list li, .paper-card .pill-list li, .paper-card .org-list li { padding-left: 0; }
.paper-card .pill-list li { padding: 5px 14px; }
.paper-card .pill-list li::before, .paper-card .org-list li::before { display: none; }
.paper-card .prepare-list li::before { position: static; top: auto; left: auto; }
.prepare-list li::before { content: counter(pr); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--white); font-size: .78rem; }

/* TOP 10 */
/* film-strip rail: one row, scroll / swipe sideways, snaps to each card */
.rail__bar { display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin-bottom: 4px; }
.rail__count { font-size: .9rem; letter-spacing: .12em; color: var(--muted); font-variant-numeric: tabular-nums; }
.rail__btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--ink); background: transparent; color: var(--ink);
  font: inherit; font-size: 1.1rem; cursor: pointer; transition: background .2s ease, color .2s ease, opacity .2s ease;
}
.rail__btn:hover:not(:disabled) { background: var(--ink); color: var(--white); }
.rail__btn:disabled { opacity: .3; cursor: default; }
.top10 {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(360px, 78%); gap: 34px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: 6px;
  padding: 30px 6px 44px; scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.top10 > * { scroll-snap-align: start; }
.top10::-webkit-scrollbar { height: 6px; }
.top10::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; }
.top10 .polaroid:nth-child(odd) { --r: -1.5deg; }
.top10 .polaroid:nth-child(even) { --r: 1.5deg; }
/* waiting for artwork: faint Phra Pathom Chedi line sketch behind a thin entry code */
.polaroid--empty .polaroid__img {
  display: grid; place-items: center; text-align: center;
  background: var(--paper);
  outline: 1px solid var(--line); outline-offset: -8px;
}
.polaroid--empty .polaroid__img::before {
  content: ""; position: absolute; left: 19%; right: 19%; bottom: 8%; height: 72%;
  background: url("../images/chedi-sketch.svg") center bottom / contain no-repeat; opacity: .16; pointer-events: none;
}
.polaroid--empty .polaroid__code { position: relative; font-size: 2.6rem; font-weight: 200; letter-spacing: .04em; color: var(--accent-dark); line-height: 1.2; }
.polaroid--empty .polaroid__code small { display: block; font-size: .74rem; font-weight: 300; color: var(--muted); letter-spacing: .14em; }
.polaroid:not(a):hover { transform: rotate(var(--r)) translateY(-4px); }
.vote-btn { width: 100%; justify-content: center; margin-top: 12px; font-size: .82rem; padding: 8px 12px; }
[data-vote][aria-disabled="true"] { --bg: var(--paper-2); --fg: var(--muted); pointer-events: none; }
/* vote buttons wear the app's own colour + logo; before links go live they show it faded */
.app-icon { width: 1.25em; height: 1.25em; flex: none; }
.vote-btn, [data-vote] { gap: 8px; }
[data-vote][data-app="facebook"] { --bg: #0866ff; --fg: #fff; }
[data-vote][data-app="facebook"]:hover { --bg: #0759e0; }
[data-vote][data-app="instagram"] { --fg: #fff; background: linear-gradient(45deg, #f9a03f, #e1306c 50%, #833ab4); }
[data-vote][data-app][aria-disabled="true"] { opacity: .5; }
/* TOP 10 on a dark gallery wall: compact heading, works first, how-to-vote as a slim strip underneath */
.section--gallery {
  color: var(--white); padding-bottom: clamp(100px, 12vw, 150px);
  background: radial-gradient(ellipse 70% 60% at 50% 22%, #4a3c2f, transparent 70%), var(--dark);
}
.section--gallery .eyebrow { color: #e7c98f; }
.top10-head { display: flex; align-items: end; gap: 12px 28px; flex-wrap: wrap; }
.top10-head__title { margin: 6px 0 0; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 300; line-height: 1.2; color: var(--white); }
.top10-head__meta { margin: 0 auto 4px 0; font-size: .9rem; color: #b9ad97; }
.section--gallery .rail__bar { margin: 0; }
.section--gallery .rail__count { color: #b9ad97; }
.section--gallery .rail__btn { border-color: rgba(255,253,248,.6); color: var(--white); }
.section--gallery .rail__btn:hover:not(:disabled) { background: var(--white); color: var(--ink); }
.section--gallery .top10 { grid-auto-columns: min(430px, 82%); gap: 40px; padding: 40px 8px 46px; scrollbar-color: rgba(255,253,248,.25) transparent; }
.section--gallery .top10::-webkit-scrollbar-thumb { background: rgba(255,253,248,.25); }
.section--gallery .polaroid { box-shadow: 0 40px 50px -26px rgba(0,0,0,.9); color: var(--ink); }

.vote-strip {
  display: flex; align-items: center; gap: 10px 20px; flex-wrap: wrap; margin-top: 6px; padding: 12px 14px 12px 12px;
  border: 1px solid rgba(231,201,143,.3); border-radius: 99px; background: rgba(255,253,248,.06); font-size: .88rem; color: #d8ccb6;
}
.vote-strip__when { padding: 5px 16px; border-radius: 99px; background: var(--white); color: var(--ink); font-size: .84rem; white-space: nowrap; }
.vote-strip__when b { font-weight: 500; color: var(--seal); }
.vote-strip__steps { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; }
.vote-strip__steps li { display: flex; align-items: center; gap: 7px; }
.vote-strip__steps li > span {
  flex: none; width: 21px; height: 21px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(231,201,143,.18); color: #e7c98f; font-size: .72rem;
}
.vote-strip [data-vote] { margin-left: auto; }
.vote-strip__note { margin: 12px 0 0; text-align: center; font-size: .8rem; color: #9d917c; }

/* results day (body.is-final, set by main.js from DATES.results): the winner moves up under the hero,
   TOP 10 follows; tear edges swap so each one matches the section below it */
.torn--post { display: none; }
body.is-final .torn--pre { display: none; }
body.is-final .torn--post { display: block; }
body.is-final main { display: flex; flex-direction: column; }
body.is-final main > .hero-arch { order: -2; }
body.is-final main > #results { order: -1; padding-bottom: clamp(110px, 12vw, 150px); }
@media (max-width: 760px) {
  .vote-strip { border-radius: 18px; padding: 16px; }
  .vote-strip__steps { flex-direction: column; gap: 6px; }
  .vote-strip [data-vote] { margin-left: 0; width: 100%; justify-content: center; }
  .top10-head__meta { flex-basis: 100%; margin: 0; }
  .section--gallery .top10 { gap: 20px; }
}

/* Grand Prize — a gold-framed certificate with a rosette, so it stands apart from the plain status cards */
.winner-slot {
  position: relative; display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(28px, 5vw, 60px); align-items: center;
  margin: clamp(70px, 9vw, 110px) auto 0; max-width: 1060px; padding: clamp(28px, 5vw, 60px);
  background: var(--white); border: 1px solid #c9a25e; outline: 6px double #c9a25e; outline-offset: 10px;
  box-shadow: 0 40px 60px -40px rgba(47,41,34,.5);
}
.container > .winner-slot:first-child { margin-top: 40px; } /* when it opens the section, just clear the rosette */
.winner-slot::before, .winner-slot::after { content: "❖"; position: absolute; color: #c9a25e; font-size: 1.1rem; line-height: 1; }
.winner-slot::before { top: 12px; left: 14px; }
.winner-slot::after { bottom: 12px; right: 14px; }
.winner-slot .polaroid__img { outline-color: #c9a25e; }
.winner-slot .polaroid--empty .polaroid__img::before { opacity: .2; }
.winner-slot__amount { display: flex; align-items: baseline; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--line); color: var(--ink-2); }
.winner-slot__amount b { font-size: clamp(2.2rem, 4vw, 2.8rem); font-weight: 300; line-height: 1; color: var(--accent-dark); }
.rosette {
  position: absolute; z-index: 2; top: -36px; right: clamp(20px, 4vw, 44px); width: 104px; height: 104px; border-radius: 50%;
  display: grid; place-items: center; text-align: center; color: var(--white); font-size: .76rem; line-height: 1.2; rotate: 8deg;
  background: radial-gradient(circle, var(--seal) 58%, #8f3f21 59% 62%, var(--seal) 63%);
  box-shadow: 0 10px 20px -8px rgba(0,0,0,.5);
}
.rosette b { display: block; font-size: 1.3rem; font-weight: 500; }
.rosette::before, .rosette::after { /* ribbon tails */
  content: ""; position: absolute; top: 86px; z-index: -1; width: 26px; height: 54px; background: var(--seal);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%);
}
.rosette::before { left: 26px; rotate: 14deg; }
.rosette::after { right: 26px; rotate: -14deg; }
@media (max-width: 640px) {
  .winner-slot { outline-offset: 6px; outline-width: 4px; padding-top: 70px; }
  .rosette { width: 86px; height: 86px; top: -30px; font-size: .68rem; }
  .rosette b { font-size: 1.1rem; }
  .rosette::before, .rosette::after { top: 70px; width: 22px; height: 44px; }
}

/* credits */
.credits { font-size: .82rem; color: var(--muted); }
.credits summary { cursor: pointer; }
.credits ul { margin-top: 10px; display: grid; gap: 4px; }
.credits a { color: var(--ink-2); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .samrap { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 960px) {
  .keydates { grid-template-columns: repeat(2, 1fr); }
  .keydate { border-bottom: 1px solid var(--line); }
  .keydate:nth-child(2n) { border-right: 0; }
  .polaroid-row--6 { grid-template-columns: repeat(2, 1fr); }
  .polaroid-row--6 > * { margin-top: 0 !important; }
  .organizers, .jury, .prize-hero, .winner-slot, .obj-grid, .venues, .concept,
  .gl-panel, .gl-files, .gl-crit, .gl-prize { grid-template-columns: 1fr; }
  .gl-panel__side { padding: 14px 0 0; border-left: 0; border-top: 1px dashed var(--line); }
  .gl-phases { grid-template-columns: 1fr; gap: 14px; }
  .gl-phases__arrow { display: none; }
  .gl-jury { grid-template-columns: 1fr; }
  .gl-scale { max-width: 240px; margin: 0 auto; order: -1; }
  .gl-tabs { padding-left: 0; overflow-x: auto; }
  .gl-tab { white-space: nowrap; }
  .gl-donut { max-width: 300px; }
  .concept .tray { max-width: 420px; }
  /* 3 + 2: six half-columns, each card spans two; card 4 starts half a card in so the short row is centred */
  .cal-row { grid-template-columns: repeat(6, 1fr); row-gap: 34px; }
  .cal { grid-column: span 2; }
  .cal:nth-child(4) { grid-column: 2 / span 2; }
  .cal:nth-child(n) { margin-top: 0; }
  .venue { min-height: 0; padding-top: 40px; }
  .obj-prize { margin-top: 40px; max-width: 560px; }
}
@media (max-width: 640px) {
  .samrap { grid-template-columns: 1fr 1fr; }
  .samrap__item:last-child { grid-column: 1 / -1; }
  .obj-notes { grid-template-columns: 1fr; }
  .gl-page { padding: 26px 20px 26px 40px; }
  .gl-page::before { left: 20px; }
  .gl-tab { padding: 9px 14px 7px; font-size: .9rem; }
  /* 2 + 2 + 1: same trick on four half-columns, the last card sits centred */
  .cal-row { grid-template-columns: repeat(4, 1fr); gap: 30px 16px; }
  .cal:nth-child(4) { grid-column: span 2; }
  .cal:nth-child(5) { grid-column: 2 / span 2; }
  .cal__day { font-size: 2.8rem; }
  .stamps { gap: 12px; }
  .stamp b { font-size: 1.25rem; }
  .obj-seal { width: 84px; height: 84px; right: -4px; top: -36px; }
  .prize-ticket { padding: 28px 24px 24px; }
  .top10 { gap: 20px; }
  .rail__btn { display: none; }
  .polaroid-row--6 { grid-template-columns: 1fr 1fr; gap: 30px 14px; }
  .polaroid-row--6 .polaroid { padding: 8px 8px 12px; }
  .polaroid-row--6 .polaroid__caption h3 { font-size: .85rem; }
  .polaroid-row--6 .polaroid__caption p { display: none; }
  .upload-grid { grid-template-columns: minmax(0, 1fr); }
  .stepper li { font-size: 0; }
  .stepper li::before { font-size: .8rem; }
  .stepper li.is-active { font-size: .8rem; }
  .keydates { grid-template-columns: 1fr; }
  .keydate { border-right: 0; }
  .rubric li { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 1080px) {
  .site-nav ul { gap: 16px; }
  .site-nav a:not(.btn) { font-size: .84rem; }
  .masonry { columns: 3 220px; }
}

@media (max-width: 960px) {
  .nav-toggle { display: block; color: inherit; }
  /* phones / tablets: the bar stays dark frosted glass everywhere (over the hero and on cream pages), gold chedi bell */
  .site-header .site-header__bar,
  .site-header.is-scrolled .site-header__bar,
  .site-header.is-solid .site-header__bar {
    background: rgba(41, 35, 28, .72); border-color: rgba(231, 201, 143, .3); color: var(--white);
    box-shadow: 0 12px 26px -14px rgba(0, 0, 0, .5);
  }
  .site-header .logo__bell { fill: #e7c98f; }
  .site-nav {
    position: absolute; top: 66px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 14px;
    padding: 20px; border-radius: 22px;
    background: rgba(255,253,248,.97); color: var(--ink); border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: opacity .3s ease, transform .3s ease, visibility .3s;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { display: block; padding: 12px 6px !important; border-bottom: 1px solid var(--line); font-size: 1rem !important; }
  .site-nav a:not(.btn)::after { display: none; }
  .site-nav__cta { justify-content: center; --bg: var(--ink) !important; --fg: var(--white) !important; }
  .site-header__bar { position: relative; }

  .hero__inner { grid-template-columns: 1fr; }
  .hero__content { grid-column: 1; }
  .hero__note { grid-row: auto; justify-self: start; margin-top: 10px; }

  .split, .scene__intro, .criteria, .form-wrap, .faq-layout { grid-template-columns: 1fr; }
  .scene__footer { grid-template-columns: 1fr; }
  .scene__footer > div { grid-column: 1; }
  .form-aside, .faq-layout aside { position: static; }
  .collage { min-height: 380px; max-width: 560px; }
  .polaroid-row { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .polaroid-row > * { margin-top: 0 !important; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .cards-2 { grid-template-columns: 1fr; }
  .rules-grid, .prizes, .honors { grid-template-columns: 1fr 1fr; }
  .news-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .logo__text { font-size: .74rem; letter-spacing: .12em; }
  .hero { min-height: 92svh; padding-bottom: 100px; }
  .hero__title .indent { padding-left: 0; }
  br.br-desk { display: none; } /* line breaks meant for wide screens only */
  .m-hide { display: none; }
  .m-show { display: inline; }
  /* login / register page: a compact photo band — title + a 4-dot timeline, no long paragraph */
  .auth__visual { min-height: 0; padding: calc(var(--header-h) + 34px) var(--gutter) 30px; }
  .auth__visual h2 { font-size: clamp(1.45rem, 6.4vw, 1.8rem); margin-bottom: 0; }
  .auth__visual p { display: none; }
  /* two-option choices (individual / team) share one row */
  .choice-group { flex-wrap: nowrap; gap: 8px; }
  .choice-group .choice { flex: 1; min-width: 0; }
  .choice-group .choice > span { display: flex; justify-content: center; text-align: center; padding-inline: 10px; white-space: nowrap; }
  /* submit section: drop the "having trouble?" ticket on phones (the email is on the contact page + FAQ) */
  #submit .form-aside .ticket { display: none; }
  /* submit card: both buttons side by side, shorter labels */
  .submit-cta__actions { flex-wrap: nowrap; gap: 8px; }
  .submit-cta__actions .btn { flex: 1 1 auto; justify-content: center; gap: 6px; padding: 12px 14px; font-size: .86rem; white-space: nowrap; }
  /* calmer phone hero: plain badge, smaller ticket + English line, no paragraph (the About section says it),
     and a darker lower half so the text reads over the busy chedi photo */
  .hero::after { background: linear-gradient(180deg, rgba(41,35,28,.4) 0%, rgba(41,35,28,.25) 35%, rgba(41,35,28,.72) 75%, rgba(41,35,28,.8) 100%); }
  .hero__note { margin-top: 0; }
  .hero__note .ticket { scale: .82; transform-origin: left top; }
  .hero__badge { border: 0; padding: 0; margin-bottom: 12px; font-size: .66rem; letter-spacing: .16em; opacity: .85; }
  .hero__title { margin-bottom: 22px; }
  .hero__title .en { margin-top: 8px; font-size: .78rem; line-height: 1.5; opacity: .8; }
  .hero__text { display: none; }
  .cat-card { grid-template-columns: 1fr; }
  .cat-card__img { aspect-ratio: 16/10; }
  .rules-grid, .prizes, .honors, .news-grid { grid-template-columns: 1fr; }
  .form__grid { grid-template-columns: minmax(0, 1fr); }
  .podium { grid-template-columns: 1fr; max-width: 360px; margin-inline: auto; }
  .winner--1 { order: -1; }
  .masonry { columns: 2 140px; column-gap: 14px; }
  .masonry .polaroid { padding: 8px 8px 12px; margin-bottom: 22px; }
  .masonry .polaroid__caption h3 { font-size: .85rem; }
  .timeline::before { left: 7px; }
  .tl-item { grid-template-columns: 1fr; gap: 0; padding-left: 34px; }
  .tl-item::before { left: 7px; }
  .tl-item:nth-child(odd) .tl-card, .tl-item:nth-child(even) .tl-card { grid-column: 1; text-align: left; }
  .news-row { grid-template-columns: 1fr; gap: 6px; }
  .news-row .circle-link { display: none; }
  .collage { min-height: 300px; }
  .cta-band__stamp { width: 80px; top: 16px; right: 16px; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 20px; translate: none; }
}

/* ---------- Phone carousels: .m-rail grids become one swipeable, auto-sliding row (see initRail) ---------- */
.rail__dots { display: none; }
@media (max-width: 640px) {
  .m-rail {
    /* each card = full width minus 36px a side, so the active card sits centred with its neighbours peeking on both sides */
    display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 100%; gap: 14px;
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: calc(var(--gutter) * -1); padding: 28px 36px 30px;
    /* don't let the long row of cards size its parent (a grid track would grow to fit them and widen the page) */
    contain: inline-size; min-width: 0;
  }
  .obj-grid > * { min-width: 0; }
  .m-rail::-webkit-scrollbar { display: none; }
  .m-rail > * { scroll-snap-align: center; margin-top: 0 !important; }
  .rail__dots { display: flex; justify-content: center; gap: 8px; margin-top: -8px; }
  .rail__dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 99px; background: var(--line); cursor: pointer; transition: width .3s ease, background .3s ease; }
  .rail__dots button.on { width: 22px; background: var(--accent); }
  .scene .rail__dots button { background: rgba(255, 253, 248, .35); }
  .scene .rail__dots button.on { background: #e7c98f; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .three path { stroke-dashoffset: 0; }
}
