/* Interactive layer: envelope, dock, music, lightbox and the free-flow sections. Same palette as the artboards. */

/* ---------- self-hosted fonts ---------- */
/* Khmer M2 — Khmer display headings. Kantumruy Pro — Latin + Khmer body (English display stays Playfair). */
@font-face { font-family: "Khmer M2"; src: url(assets/fonts/khmer-m2.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Kantumruy Pro"; src: url(assets/fonts/kantumruypro-300.woff2) format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Kantumruy Pro"; src: url(assets/fonts/kantumruypro-400.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Kantumruy Pro"; src: url(assets/fonts/kantumruypro-500.woff2) format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Kantumruy Pro"; src: url(assets/fonts/kantumruypro-600.woff2) format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Kantumruy Pro"; src: url(assets/fonts/kantumruypro-700.woff2) format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --u: calc(100cqw / 1240);
  --gold-1: #f6dc96; --gold-2: #c89a43; --gold-3: #7d5520;
  --gold: linear-gradient(135deg, var(--gold-1), var(--gold-2) 45%, #e9c46f 60%, var(--gold-3));
  --ink: #2a170f;
  --env: #5c3524; --env-dark: #2c180f; --env-light: #80503a;
  --text: clamp(15px, calc(34 * var(--u)), 19px);
  --small: clamp(13px, calc(28 * var(--u)), 16px);
}
[hidden] { display: none !important; }
body.locked { overflow: hidden; height: 100svh; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--gold-1); outline-offset: 3px; }

/* ---------- hero greeting ---------- */
.dear { top: 89.6%; line-height: 1.3; white-space: normal; padding: 0 8%; }
.dear .k { display: block; font-size: calc(24 * var(--u)); letter-spacing: .32em; text-transform: uppercase; font-weight: 300; color: rgba(242,230,202,.6); }
.dear .g { display: block; margin-top: calc(10 * var(--u)); font-family: var(--serif); font-style: italic; font-weight: 450; font-size: calc(46 * var(--u)); color: rgba(242,230,202,.9); }
/* (unused) */ .date-line { top: 88.4%; font-size: calc(30 * var(--u)); letter-spacing: .32em; font-weight: 300; color: rgba(242,230,202,.6); line-height: 1; }

/* ---------- envelope scene ---------- */
.scene { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(120% 80% at 50% 45%, rgba(0,0,0,0) 40%, rgba(0,0,0,.55)), var(--wall) url(assets/wall-tex.webp) center / 1240px auto repeat;
  transition: opacity .9s ease, visibility 0s linear .9s; }
.scene.gone { opacity: 0; visibility: hidden; pointer-events: none; }
.scene-in { width: min(88vw, 440px); container-type: inline-size; text-align: center; transform: translateY(-2svh); }
.scene .kicker { font-size: clamp(11px, 3cqw, 13px); letter-spacing: .34em; font-weight: 300; color: rgba(242,230,202,.62); margin-bottom: 4cqw; }
.scene .who { font-family: var(--serif); font-style: italic; font-weight: 450; font-size: clamp(26px, 9cqw, 40px); color: rgba(242,230,202,.92); margin-bottom: 9cqw; line-height: 1.1; }

.env { position: relative; width: 100%; aspect-ratio: 10 / 7; perspective: 1400px; margin: 0 auto; }
.env .back { position: absolute; inset: 0; border-radius: 1.4cqw; background: linear-gradient(180deg, var(--env-dark), #24130b);
  box-shadow: 0 3cqw 7cqw rgba(0,0,0,.55), 0 .6cqw 1.4cqw rgba(0,0,0,.4); }
.env .card { position: absolute; left: 6%; right: 6%; top: 7%; height: 88%; border-radius: 1cqw; z-index: 2;
  background: #efe3c6 linear-gradient(180deg, #f5ecd6, #e9dbbb); box-shadow: 0 1cqw 3cqw rgba(0,0,0,.35);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6cqw; color: var(--ink);
  transition: transform 1.1s cubic-bezier(.2,.8,.2,1); }
.env .card .mini { position: relative; width: 26%; aspect-ratio: 1; }
.env .card .mini .ph { position: absolute; left: 20.55%; top: 14.01%; width: 58.25%; height: 71.33%; border-radius: 50%; overflow: hidden; }
.env .card .mini .ph img { width: 100%; height: 100%; object-fit: cover; }
.env .card .mini > img { position: absolute; inset: 0; width: 100%; }
.env .card .nm { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 6.4cqw; line-height: 1; }
.env .card .dt { font-size: 2.6cqw; letter-spacing: .34em; font-weight: 400; opacity: .75; }
.env .pocket { position: absolute; inset: 0; z-index: 3; border-radius: 1.4cqw; overflow: hidden; }
.env .pocket .face { position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 50% 100%, rgba(255,220,170,.10), transparent 60%), linear-gradient(160deg, var(--env-light), var(--env) 55%, #45271a);
  clip-path: polygon(0 0, 50% 52%, 100% 0, 100% 100%, 0 100%); }
.env .pocket svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.env .addr { position: absolute; left: 0; right: 0; bottom: 8%; z-index: 4; color: rgba(242,230,202,.88); pointer-events: none; }
.env .addr .to { font-size: clamp(10px, 2.6cqw, 12px); letter-spacing: .3em; opacity: .65; }
.env .addr .name { font-family: var(--serif); font-style: italic; font-weight: 450; font-size: clamp(17px, 5.6cqw, 25px); margin-top: 1.2cqw; padding: 0 8%; line-height: 1.2; }
.env .flap { position: absolute; left: 0; right: 0; top: 0; height: 62%; z-index: 5; transform-origin: 50% 0; transform-style: preserve-3d;
  transition: transform .95s cubic-bezier(.5,.05,.25,1), z-index 0s linear .45s; }
.env .flap .f, .env .flap .b { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  clip-path: polygon(0 0, 100% 0, 50% 100%); }
.env .flap .f { background: linear-gradient(180deg, #8a5a41, #6a3e2a 55%, #5a3323);
  filter: drop-shadow(0 .6cqw .8cqw rgba(0,0,0,.4)); }
.env .flap .b { background: linear-gradient(0deg, #3a2015, #2a160d); transform: rotateX(180deg); }
.env .flap svg { position: absolute; inset: 0; width: 100%; height: 100%; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.seal { position: absolute; left: 50%; top: 58%; z-index: 6; width: 18%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  display: grid; place-items: center; transition: transform .5s ease, opacity .5s ease; }
.seal::before { content: ""; position: absolute; inset: -6%; border-radius: 47% 53% 50% 50% / 52% 48% 53% 47%;
  background: radial-gradient(circle at 35% 30%, #fbe7a8, #d8a94f 38%, #a6782d 70%, #6f4a18);
  box-shadow: 0 .8cqw 1.8cqw rgba(0,0,0,.5), inset 0 0 0 .5cqw rgba(255,240,200,.25), inset 0 -.8cqw 1.4cqw rgba(80,50,10,.45); }
.seal::after { content: ""; position: absolute; inset: 12%; border-radius: 50%; border: .35cqw solid rgba(110,72,20,.55);
  box-shadow: inset 0 0 0 .5cqw rgba(255,236,180,.18); }
.seal span { position: relative; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 5.4cqw; color: #6b4615;
  text-shadow: 0 .2cqw 0 rgba(255,236,180,.55), 0 -.15cqw 0 rgba(60,35,5,.5); letter-spacing: -.02em; }
.open-btn { margin-top: 10cqw; display: inline-flex; align-items: center; gap: 2.4cqw; padding: 3.4cqw 7cqw; border-radius: 999px;
  border: 1px solid rgba(232,196,111,.7); color: var(--cream); font-size: clamp(13px, 3.4cqw, 15px); letter-spacing: .28em;
  background: rgba(20,10,6,.25); box-shadow: 0 0 0 0 rgba(232,196,111,.45); animation: pulse 2.6s ease-in-out infinite; }
.hint { margin-top: 3.4cqw; font-size: clamp(11px, 2.8cqw, 12px); color: rgba(242,230,202,.5); letter-spacing: .1em; font-style: italic; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(232,196,111,.35); } 50% { box-shadow: 0 0 0 10px rgba(232,196,111,0); } }

/* open sequence */
.scene.opening .seal { transform: translate(-50%, -50%) scale(1.25); opacity: 0; }
.scene.opening .open-btn, .scene.opening .hint, .scene.opening .kicker, .scene.opening .who { opacity: 0; transition: opacity .5s; }
.scene.flap-open .flap { transform: rotateX(180deg); z-index: 1; }
.scene.card-out .card { transform: translateY(-58%); z-index: 4; }
.scene.card-out .addr { opacity: 0; transition: opacity .4s; }
.scene.card-out .card { transition-delay: .05s; }
@media (prefers-reduced-motion: reduce) {
  .env .flap, .env .card, .seal, .scene { transition-duration: .01s !important; }
  .open-btn { animation: none; }
}

/* ---------- floating controls ---------- */
.music { position: fixed; z-index: 40; top: max(14px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right)); width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(30,16,10,.7); border: 1px solid rgba(232,196,111,.55); color: var(--gold-1);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.music svg { width: 18px; height: 18px; }
.music[data-on="true"] svg { animation: spin 6s linear infinite; }
.music[data-on="false"]::after { content: ""; position: absolute; width: 22px; height: 1.5px; background: var(--gold-1); transform: rotate(-45deg); }
@keyframes spin { to { transform: rotate(360deg); } }

.dock { position: fixed; z-index: 40; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translate(-50%, 140%);
  display: flex; gap: 2px; padding: 6px; border-radius: 999px; background: rgba(30,16,10,.78); border: 1px solid rgba(232,196,111,.35);
  box-shadow: 0 10px 30px rgba(0,0,0,.45); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.dock.show { transform: translate(-50%, 0); }
.dock button { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: rgba(242,230,202,.7); transition: background .3s, color .3s; }
.dock button svg { width: 20px; height: 20px; }
.dock button.active { color: var(--ink); background: linear-gradient(135deg, var(--gold-1), var(--gold-2)); }

.toast { position: fixed; z-index: 70; left: 50%; bottom: 84px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: #f2e6ca; color: var(--ink); padding: 10px 18px; border-radius: 999px; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.4);
  transition: opacity .3s, transform .3s; max-width: 88vw; text-align: center; }
.toast.in { opacity: 1; transform: translate(-50%, 0); }

/* ---------- lightbox ---------- */
.zoomable { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(8,4,2,.94); display: grid; place-items: center; opacity: 0; visibility: hidden;
  transition: opacity .3s, visibility 0s linear .3s; touch-action: pan-y; }
.lightbox.in { opacity: 1; visibility: visible; transition: opacity .3s; }
.lightbox img { max-width: 94vw; max-height: 84svh; object-fit: contain; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
.lightbox .x, .lightbox .pv, .lightbox .nx { position: absolute; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  color: var(--cream); background: rgba(242,230,202,.08); border: 1px solid rgba(242,230,202,.25); font-size: 22px; }
.lightbox .x { top: max(14px, env(safe-area-inset-top)); right: 14px; }
.lightbox .pv { left: 10px; top: 50%; transform: translateY(-50%); }
.lightbox .nx { right: 10px; top: 50%; transform: translateY(-50%); }
.lightbox .ct { position: absolute; bottom: max(18px, env(safe-area-inset-bottom)); font-size: 13px; letter-spacing: .2em; color: rgba(242,230,202,.6); }

/* ---------- free-flow sections ---------- */
/* panels: content column (container) centred, background bleeds edge to edge via ::before */
.panel { position: relative; width: min(100%, 760px); margin: calc(var(--abw) * 60 / 1240) auto 0; container-type: inline-size; isolation: isolate;
  padding: calc(120 * var(--u)) calc(110 * var(--u)) calc(140 * var(--u)); text-align: center; font-size: var(--text); }
.panel::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); z-index: -1;
  background: var(--wall) url(assets/wall-band.webp) center top / calc(var(--abw) * 5) auto repeat; }
.panel.satin-bg::before { background:
  linear-gradient(90deg, var(--satin-base) calc(50% - var(--abw) / 2), transparent calc(50% - var(--abw) * .3),
                  transparent calc(50% + var(--abw) * .3), var(--satin-base) calc(50% + var(--abw) / 2)),
  url(assets/satin.webp) center / var(--abw) auto no-repeat, var(--satin-base); }
@media (min-width: 900px) {
  .panel { padding-top: 88px; padding-bottom: 100px; }
  main .panel h2 { font-size: 46px; }
  #wishes { width: min(100% - 48px, 720px); }
  main .grat h3 { font-size: 36px; }
  .dock { padding: 8px; gap: 4px; }
  .dock button { width: 54px; height: 54px; }
  .dock button svg { width: 24px; height: 24px; }
  .music { width: 50px; height: 50px; }
}
.panel h2 { font-size: calc(84 * var(--u)); margin-bottom: calc(60 * var(--u)); white-space: nowrap; }
.panel .lead { color: rgba(242,230,202,.85); font-weight: 300; line-height: 1.6; }
.panel .lead em { font-family: var(--serif); font-weight: 450; font-size: 1.15em; color: var(--cream); }
.rule { width: 64%; height: 1px; margin: calc(56 * var(--u)) auto; background: linear-gradient(90deg, transparent, rgba(242,230,202,.6), transparent); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border-radius: 999px;
  border: 1px solid rgba(232,196,111,.7); color: var(--cream); font-size: var(--small); letter-spacing: .14em; text-decoration: none; text-transform: uppercase;
  transition: background .25s, color .25s; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.solid { background: linear-gradient(135deg, var(--gold-1), var(--gold-2)); color: var(--ink); border-color: transparent; font-weight: 500; }
.btn:active { transform: translateY(1px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: calc(56 * var(--u)); }

/* RSVP */
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: calc(60 * var(--u)); }
.choice button { min-height: 64px; padding: 12px; border-radius: 14px; border: 1px solid rgba(232,196,111,.45); font-family: var(--serif);
  font-style: italic; font-size: clamp(16px, calc(40 * var(--u)), 21px); color: rgba(242,230,202,.85); background: rgba(0,0,0,.12); }
.choice button[aria-pressed="true"] { background: linear-gradient(135deg, var(--gold-1), var(--gold-2)); color: var(--ink); border-color: transparent; }
.seats { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: calc(50 * var(--u)); }
.seats button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(232,196,111,.6); font-size: 22px; line-height: 1; }
.seats output { min-width: 3.5em; font-family: var(--serif); font-style: italic; font-size: clamp(22px, calc(56 * var(--u)), 30px); }
.seats-label { margin-top: 6px; font-size: var(--small); color: rgba(242,230,202,.6); }
.field { display: block; width: 100%; margin-top: calc(44 * var(--u)); padding: 14px 16px; border-radius: 12px; background: rgba(0,0,0,.18);
  border: 1px solid rgba(242,230,202,.25); color: var(--cream); font-size: 16px; resize: vertical; }
.field::placeholder { color: rgba(242,230,202,.4); }
.done { margin-top: calc(40 * var(--u)); padding: 22px 18px; border-radius: 16px; border: 1px solid rgba(232,196,111,.45); background: rgba(0,0,0,.14); }
.done .big { font-family: var(--serif); font-style: italic; font-size: clamp(20px, calc(50 * var(--u)), 26px); }
.linkish { margin-top: 12px; font-size: var(--small); text-decoration: underline; text-underline-offset: 4px; color: rgba(242,230,202,.7); }

/* date & venue */
.big-date { font-family: var(--serif); font-style: italic; font-weight: 450; font-size: clamp(26px, calc(76 * var(--u)), 40px); line-height: 1.15; }
.venue { margin-top: calc(50 * var(--u)); }
.venue .vn { font-family: var(--serif); font-style: italic; font-size: clamp(19px, calc(46 * var(--u)), 24px); }
.venue .va { margin-top: 6px; color: rgba(242,230,202,.7); font-weight: 300; }

/* wishes */
.wish-form { text-align: left; }
.wish-form .btn { width: 100%; margin-top: 14px; }
.count-hint { text-align: right; font-size: 12px; color: rgba(242,230,202,.45); margin-top: 4px; }
.wishes { list-style: none; margin-top: calc(70 * var(--u)); display: grid; gap: 14px; text-align: left; }
.wishes li { padding: 18px 18px 16px; border-radius: 14px; background: rgba(242,230,202,.05); border: 1px solid rgba(242,230,202,.14); }
.wishes .m { line-height: 1.6; font-weight: 300; white-space: pre-wrap; overflow-wrap: anywhere; }
.wishes .by { margin-top: 10px; font-family: var(--serif); font-style: italic; color: var(--gold-1); font-size: .95em; }
.wishes .by time { font-family: var(--sans); font-style: normal; font-size: 12px; color: rgba(242,230,202,.45); margin-left: 6px; }
.more { margin-top: 16px; }
.empty { margin-top: calc(60 * var(--u)); color: rgba(242,230,202,.55); font-style: italic; }

#wishes { padding-bottom: max(150px, calc(260 * var(--u))); }
.grat { margin-top: calc(40 * var(--u)); }
.grat h3 { font-size: calc(64 * var(--u)); margin-bottom: calc(36 * var(--u)); white-space: nowrap; }
.grat .sig { margin-top: calc(50 * var(--u)); font-family: var(--serif); font-style: italic; font-size: clamp(28px, calc(86 * var(--u)), 44px); color: rgba(242,230,202,.92); }
.grat .dt { margin-top: 10px; letter-spacing: .34em; font-size: var(--small); color: rgba(242,230,202,.55); }
.spacer { display: none; }

/* ---------- language switch ---------- */
.lang-switch { position: fixed; z-index: 60; top: max(14px, env(safe-area-inset-top)); left: max(14px, env(safe-area-inset-left));
  display: flex; padding: 3px; border-radius: 999px; background: rgba(30,16,10,.72); border: 1px solid rgba(232,196,111,.45);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lang-switch button { min-width: 44px; height: 34px; padding: 0 12px; border-radius: 999px; font-size: 13px; letter-spacing: .08em; color: rgba(242,230,202,.75); }
.lang-switch button[lang="km"] { font-family: "Kantumruy Pro", sans-serif; letter-spacing: 0; font-size: 14px; }
.lang-switch button[aria-pressed="true"] { background: linear-gradient(135deg, var(--gold-1), var(--gold-2)); color: var(--ink); font-weight: 600; }

/* ---------- Khmer typography: Khmer M2 for display lines, Kantumruy Pro for text ---------- */
body.lang-kh { font-family: "Kantumruy Pro", sans-serif; }
.lang-kh .h-caps, .lang-kh .cd-title, .lang-kh .names, .lang-kh .grat .sig, .lang-kh .big-date,
.lang-kh .scene .who, .lang-kh .env .card .nm {
  font-family: "Khmer M2", "Kantumruy Pro", serif; font-style: normal; font-weight: 400; letter-spacing: 0; font-feature-settings: normal; line-height: 1.5; }
.lang-kh .join, .lang-kh .std-date, .lang-kh .since, .lang-kh .cd .l, .lang-kh .events .t, .lang-kh .events .d,
.lang-kh .dear .k, .lang-kh .lead, .lang-kh .choice button, .lang-kh .btn, .lang-kh .field, .lang-kh .done .big,
.lang-kh .scene .kicker, .lang-kh .open-btn, .lang-kh .hint, .lang-kh .env .addr .to, .lang-kh .env .card .dt, .lang-kh .grat .dt,
.lang-kh .wishes .by time, .lang-kh .seats-label, .lang-kh .linkish, .lang-kh .empty, .lang-kh .toast {
  font-family: "Kantumruy Pro", sans-serif; font-style: normal; letter-spacing: 0; }
.lang-kh .btn { text-transform: none; }
/* hero */
.lang-kh .std { top: 6.6%; font-size: calc(70 * var(--u)); color: rgba(242,230,202,.6); }
.lang-kh .std-date { top: 15.1%; font-size: calc(36 * var(--u)); font-weight: 300; line-height: 1.6; }
.lang-kh .join { top: 76.4%; font-size: calc(38 * var(--u)); font-weight: 300; line-height: 1.6; }
.lang-kh .names { top: 80.2%; font-size: calc(76 * var(--u)); }
.lang-kh .dear .k { font-size: calc(26 * var(--u)); }
/* countdown */
.lang-kh .cd-title { top: 17.6%; font-size: calc(50 * var(--u)); }
.lang-kh .cd .n, .lang-kh .cd .c { font-family: "Kantumruy Pro", sans-serif; font-style: normal; font-weight: 400; font-size: calc(112 * var(--u)); top: calc(6 * var(--u)); }
.lang-kh .cd .l { font-size: calc(38 * var(--u)); font-weight: 400; top: calc(146 * var(--u)); line-height: 1.6; }
.lang-kh .since { font-size: calc(30 * var(--u)); line-height: 1.6; top: 81.6%; }
/* prewedding wall + schedule */
.lang-kh .wall-title { top: 2.6%; font-size: calc(64 * var(--u)); }
.lang-kh .sch-title { top: 4.2%; font-size: calc(62 * var(--u)); }
.lang-kh .events { top: 14.2%; left: 12%; width: 76%; }
.lang-kh .events li { padding-top: calc(10 * var(--u)); padding-bottom: calc(18 * var(--u)); }
.lang-kh .events li + li { padding-top: calc(14 * var(--u)); }
.lang-kh .events .t { font-size: calc(44 * var(--u)); font-weight: 700; line-height: 1.6; }
.lang-kh .events .d { font-size: calc(37 * var(--u)); font-weight: 400; line-height: 1.7; margin-top: 0 !important; }
/* envelope */
.lang-kh .scene .kicker { font-size: clamp(12px, 3.4cqw, 15px); }
.lang-kh .scene .who { font-size: clamp(22px, 7.4cqw, 32px); }
.lang-kh .open-btn { letter-spacing: .02em; font-size: clamp(14px, 3.8cqw, 16px); }
.lang-kh .env .addr .to { letter-spacing: 0; font-size: clamp(11px, 3cqw, 13px); opacity: .8; }
.lang-kh .env .card .nm { font-size: 4.6cqw; }
/* panels */
.lang-kh .panel h2 { font-size: calc(58 * var(--u)); white-space: normal; }
.lang-kh .grat h3 { font-size: calc(48 * var(--u)); white-space: normal; }
.lang-kh .lead { line-height: 1.95; }
.lang-kh .big-date { font-size: clamp(22px, calc(54 * var(--u)), 32px); line-height: 1.7; }
.lang-kh .choice button { font-size: clamp(15px, calc(32 * var(--u)), 18px); }
.lang-kh .grat .sig { font-size: clamp(24px, calc(64 * var(--u)), 34px); }
@media (min-width: 900px) { .lang-kh main .panel h2 { font-size: 34px; } .lang-kh main .grat h3 { font-size: 26px; } }

/* switch lives on the envelope screen; after opening, the same choice is a button in the dock */
.lang-switch.gone { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .4s, visibility 0s linear .4s; }
.dock button.dock-lang { width: auto; min-width: 44px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 600; letter-spacing: .06em;
  color: var(--gold-1); border: 1px solid rgba(232,196,111,.45); margin-left: 4px; }
.dock button.dock-lang[lang="km"] { font-family: "Kantumruy Pro", sans-serif; letter-spacing: 0; font-size: 14px; }
@media (max-width: 380px) { .dock button { width: 40px; height: 40px; } .dock button.dock-lang { padding: 0 8px; } }

/* ---------- prewedding "tap any photo" hint ---------- */
.tap-hint { top: 95%; display: flex; align-items: center; justify-content: center; gap: calc(16 * var(--u)); color: rgba(242,230,202,.82); }
.tap-hint .tap-ring { position: relative; width: calc(64 * var(--u)); height: calc(64 * var(--u)); border-radius: 50%; display: grid; place-items: center;
  border: calc(2 * var(--u)) solid rgba(232,196,111,.55); color: var(--gold-1); flex: none; }
.tap-hint .tap-ring svg { width: 56%; height: 56%; }
.tap-hint .tap-tx { font-family: var(--serif); font-style: italic; font-size: calc(34 * var(--u)); letter-spacing: .01em; color: rgba(242,230,202,.85); }
.lang-kh .tap-hint .tap-tx { font-family: "Kantumruy Pro", sans-serif; font-style: normal; font-size: calc(32 * var(--u)); }
@media (prefers-reduced-motion: no-preference) {
  .tap-hint .tap-ring { animation: tapbob 1.9s ease-in-out infinite; }
  .tap-hint .tap-ring::after { content: ""; position: absolute; inset: calc(-2 * var(--u)); border-radius: 50%;
    border: calc(2 * var(--u)) solid rgba(232,196,111,.55); animation: tapring 1.9s ease-out infinite; }
}
@keyframes tapbob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(calc(-9 * var(--u))); } }
@keyframes tapring { 0% { transform: scale(1); opacity: .65; } 70%,100% { transform: scale(1.75); opacity: 0; } }

/* ---------- location ---------- */
.venue-frame { position: relative; width: min(100%, 430px); margin: calc(10 * var(--u)) auto 0; aspect-ratio: 16 / 10; border-radius: 16px;
  overflow: hidden; border: 1px solid rgba(232,196,111,.4); background: linear-gradient(160deg, rgba(60,36,24,.55), rgba(20,12,8,.65));
  display: grid; place-items: center; box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.venue-frame .venue-photo { width: 100%; height: 100%; object-fit: cover; }
.venue-frame .venue-sketch { width: 60%; height: auto; color: rgba(232,196,111,.68); }
.venue-name { margin-top: calc(44 * var(--u)); font-family: var(--serif); font-style: italic; font-weight: 450; line-height: 1.2;
  font-size: clamp(21px, calc(54 * var(--u)), 29px); color: var(--cream); }
.lang-kh .venue-name { font-family: "Khmer M2", "Kantumruy Pro", serif; font-style: normal; font-size: clamp(18px, calc(44 * var(--u)), 24px); }
.venue-note { margin-top: 8px; letter-spacing: .26em; text-transform: uppercase; font-size: var(--small); color: rgba(242,230,202,.6); }
.lang-kh .venue-note { letter-spacing: .06em; text-transform: none; }

/* ---------- QR cards (map + gift) ---------- */
.qr-card { margin: calc(52 * var(--u)) auto 0; width: max-content; max-width: 86%; padding: 16px 16px 12px; border-radius: 18px;
  background: #fbf6ea; box-shadow: 0 16px 36px rgba(0,0,0,.42); }
.qr-card img { display: block; width: clamp(160px, calc(440 * var(--u)), 216px); height: auto; border-radius: 6px; margin: 0 auto; }
.qr-cap { margin-top: 10px; color: var(--gold-3); font-size: 13px; letter-spacing: .04em; text-align: center; }

/* ---------- gift / KHQR ---------- */
.khqr { margin: calc(26 * var(--u)) auto 0; width: max-content; max-width: 90%; padding: 10px; border-radius: 22px; background: #fff;
  box-shadow: 0 18px 44px rgba(0,0,0,.48); border: 3px solid transparent;
  background-image: linear-gradient(#fff,#fff), var(--gold); background-origin: border-box; background-clip: padding-box, border-box; }
.khqr img { display: block; width: clamp(220px, calc(600 * var(--u)), 300px); height: auto; border-radius: 13px; }
#gift .qr-cap { margin-top: 16px; color: rgba(242,230,202,.72); font-size: var(--small); letter-spacing: .02em; }
.gift-accts { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: calc(46 * var(--u)); }
.gift-accts .acct { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 12px 20px; border-radius: 14px; min-width: 150px;
  border: 1px solid rgba(232,196,111,.4); background: rgba(0,0,0,.16); text-align: left; transition: border-color .2s, background .2s, transform .15s; }
.gift-accts .acct:hover { border-color: rgba(232,196,111,.8); background: rgba(0,0,0,.24); }
.gift-accts .acct:active { transform: translateY(1px); }
.gift-accts .acct .lbl { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: rgba(242,230,202,.55); }
.lang-kh .gift-accts .acct .lbl { letter-spacing: .04em; text-transform: none; }
.gift-accts .acct .no { font-family: var(--serif); font-style: italic; letter-spacing: .05em; color: var(--gold-1); font-size: clamp(18px, calc(48 * var(--u)), 23px); }
