:root {
  --paper: #f8f7f1;
  --surface: #fff;
  --ink: #3a302a;
  --muted: #8c847a;
  --sage: #5f6e4e;
  --sagesoft: #b7c2a2;
  --blush: #c27a6c;
  --blushsoft: #f1ddd6;
  --line: #e4ded2;
  --backdrop: #ebe7df;
  --fh: 'Cormorant Garamond', 'Itim', serif;
  --fb: 'Jost', 'Mitr', sans-serif;
  --ls: 2px;
  --dur: 380ms;
  --ease: cubic-bezier(.3, .7, .2, 1);
  --spot: 0 0 0 3px rgba(255, 255, 255, .75), 0 0 0 3000px rgba(58, 48, 42, .32);
  color-scheme: light;
}
html[lang=th] { --ls: 0; }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--backdrop);
  color: var(--ink);
  font-family: var(--fb);
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
}
[hidden] { display: none !important; }
a { color: var(--sage); }
a:hover { color: #3f4a33; }
button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
a { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; }
h1 { margin: 0; font-family: var(--fh); font-size: 34px; font-weight: 600; line-height: 1.1; }
html:not([lang=th]) .th-only { display: none; }

/* frame */
.app {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--paper);
}
@media (min-width: 500px) {
  .app { max-width: 430px; margin: 0 auto; box-shadow: 0 0 0 1px var(--line), 0 0 60px -24px rgba(46, 40, 36, .4); }
}
.no-anim .track, .no-anim .sheet { transition: none !important; }

.topbar {
  flex: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 18px 8px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.mark {
  padding: 2px 4px 0 0;
  font-family: 'Pinyon Script', cursive;
  font-size: 30px;
  line-height: 1.1;
  color: var(--ink);
  text-decoration: none;
}
.mark:hover { color: var(--ink); }

.seg { display: flex; gap: 2px; padding: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
.seg button {
  border: 0;
  border-radius: 16px;
  padding: 6px 13px;
  font: 600 12px/1 Jost, sans-serif;
  letter-spacing: 1px;
  cursor: pointer;
  background: transparent;
  color: var(--ink);
  transition: background .2s, color .2s;
}
.seg .seg-th { padding: 6px 12px; font-family: Mitr, sans-serif; letter-spacing: 0; }
.seg button[aria-pressed=true] { background: var(--sage); color: var(--paper); }
.seg-wide { border-radius: 24px; }
.seg-wide button { flex: 1; border-radius: 20px; padding: 9px; font: 600 14px/1.2 var(--fb); letter-spacing: 0; }

/* tabs */
.stage { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.track {
  display: flex;
  width: 500%;
  height: 100%;
  transform: translateX(calc(var(--tab, 0) * -20%));
  transition: transform var(--dur) var(--ease);
}
.panel, .sheet, .car, .zoom-area { scrollbar-width: none; }
.panel::-webkit-scrollbar, .sheet::-webkit-scrollbar, .car::-webkit-scrollbar, .zoom-area::-webkit-scrollbar { display: none; }
.panel {
  width: 20%;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  padding: 22px 22px 32px;
  background: var(--paper);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 26px;
  padding: 14px 26px;
  background: var(--sage);
  color: var(--paper);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .6px;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { color: var(--paper); filter: brightness(1.08); }
.btn:active { transform: scale(.98); }
.btn-cta { align-self: center; padding: 14px 22px; box-shadow: 0 8px 20px -12px rgba(58, 48, 42, .6); }
.btn-cta svg { flex: none; }

/* home */
.panel-home { padding: 8px 26px 36px; }
.home { margin: auto 0; display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; }
.logo { display: block; width: 100%; max-width: 330px; height: auto; mix-blend-mode: darken; }
.names-th { margin-top: -6px; font-family: var(--fh); font-size: 26px; font-weight: 600; line-height: 1.3; }
.when { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.date { font-family: var(--fh); font-size: 25px; font-weight: 500; line-height: 1.25; text-wrap: balance; }
.divider { display: flex; align-items: center; gap: 10px; width: 132px; }
.divider span { flex: 1; height: 1px; background: var(--sagesoft); }
.divider i { width: 6px; height: 6px; border-radius: 50%; background: var(--blush); }
.meta { font-size: 13px; font-weight: 500; letter-spacing: var(--ls); text-transform: uppercase; color: var(--muted); line-height: 1.6; }
.panel-home .btn { box-shadow: 0 8px 20px -12px rgba(58, 48, 42, .6); }

/* pictures */
.pic {
  position: relative;
  display: block;
  flex: none;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), 0 14px 30px -20px rgba(58, 48, 42, .55);
}
.pic img { display: block; width: 100%; height: auto; }
.pic-tall { aspect-ratio: 3 / 4; }
.pic-tall img { height: 100%; object-fit: cover; }
.chip {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .92);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .4px;
  color: var(--ink);
}

/* venue */
.panel-venue { gap: 16px; }
.venue-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  color: inherit;
  text-decoration: none;
}
.venue-card:hover { color: inherit; border-color: var(--sage); }
.venue-card:active { transform: scale(.99); }
.venue-card .row-body { gap: 3px; }
.venue-pin { flex: none; color: var(--sage); }
.back-inline { margin: -10px 0 -8px; padding: 0 8px 0 0; }
.spot-ring {
  position: absolute;
  width: 22%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 2.5px solid var(--blush);
  border-radius: 50%;
  box-shadow: var(--spot);
  pointer-events: none;
  transition: left .45s var(--ease), top .45s var(--ease);
}
.act-card { display: flex; align-items: center; gap: 14px; margin-top: -2px; padding: 12px; background: var(--surface); border: 1px solid var(--blush); border-radius: 18px; }
.act-sub { font-size: 13px; line-height: 1.4; text-wrap: pretty; }
.act-where { font-size: 12px; font-weight: 600; letter-spacing: var(--ls); text-transform: uppercase; color: var(--blush); }
.act-close { flex: none; align-self: flex-start; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: var(--blushsoft); color: var(--ink); cursor: pointer; }
.venue-name { font-family: var(--fh); font-size: 24px; font-weight: 600; line-height: 1.2; }
.venue-addr { font-size: 14px; color: var(--muted); line-height: 1.5; }

/* schedule */
.panel-schedule { gap: 18px; padding: 22px 18px 32px; }
.panel-schedule h1 { margin: 0 4px; }
.timeline { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 6px 0; }
.timeline::before { content: ''; position: absolute; left: 50%; top: 14px; bottom: 14px; border-left: 1.5px dashed var(--sagesoft); }
.ev { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr); align-items: center; gap: 8px; }
.ev-txt { display: flex; flex-direction: column; gap: 4px; }
.ev-left { align-items: flex-end; text-align: right; }
.ev-right { align-items: flex-start; }
.ev-time { font-size: 12px; font-weight: 500; letter-spacing: 2.5px; color: var(--muted); }
.ev-name { font-size: 15px; font-weight: 600; letter-spacing: var(--ls); text-transform: uppercase; line-height: 1.35; }
.ev-step { font-size: 12px; font-weight: 500; letter-spacing: var(--ls); text-transform: uppercase; color: var(--muted); }
.ev-sub { font-size: 13px; color: var(--muted); line-height: 1.4; text-wrap: pretty; }
.ev-dot { justify-self: center; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--blush); background: var(--paper); }
.ev-img { display: block; width: 100%; max-width: 132px; aspect-ratio: 1; object-fit: contain; mix-blend-mode: darken; }
.ev-imgwrap { display: flex; justify-content: flex-end; }

/* seat */
.panel-seat { gap: 14px; }
.intro { margin: -6px 0 0; font-size: 14px; line-height: 1.5; }
.seat-form { display: flex; gap: 8px; }
.seat-form input {
  flex: 1;
  min-width: 0;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  letter-spacing: 2px;
  text-transform: uppercase;
  outline: none;
}
.seat-form input:focus { border-color: var(--sage); box-shadow: 0 0 0 3px rgba(95, 110, 78, .15); }
.btn-find { border: 0; border-radius: 14px; padding: 0 20px; background: var(--sage); color: var(--paper); font-weight: 600; font-size: 15px; letter-spacing: .5px; cursor: pointer; }
.btn-find:hover { filter: brightness(1.08); }
.seat-result { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.seat-badge {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--blushsoft);
  box-shadow: inset 0 0 0 2px var(--blush);
  font-family: 'Cormorant Garamond', serif;
  font-size: 23px;
  font-weight: 600;
}
.seat-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.kicker { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.seat-table { font-family: var(--fh); font-size: 24px; font-weight: 600; line-height: 1.15; }
.seat-zone { font-size: 13px; font-weight: 500; color: var(--sage); }
.seat-err { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--blushsoft); border-radius: 14px; background: #f8ebe6; color: #7d4134; font-size: 14px; line-height: 1.5; }
.seat-err b { font-weight: 600; }
.ring {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 2.5px solid var(--blush);
  border-radius: 9px;
  box-shadow: var(--spot);
  pointer-events: none;
  transition: left .45s var(--ease), top .45s var(--ease), width .45s, height .45s;
}
.seat-note { display: flex; align-items: center; gap: 12px; padding: 2px 4px; }
.seat-note img { flex: none; display: block; width: 46px; height: 66px; object-fit: contain; }
.seat-note-txt { display: flex; flex-direction: column; gap: 2px; font-family: var(--fh); font-style: italic; font-size: 18px; line-height: 1.35; text-wrap: pretty; }
html[lang=th] .seat-note-txt { font-style: normal; }
.ring-zoom { border-width: 3px; border-radius: 10px; transition: none; }

/* more */
.panel-more { gap: 12px; }
.panel-more h1 { margin-bottom: 4px; }
.row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  color: inherit;
  text-decoration: none;
  text-align: left;
}
.row:hover { color: inherit; border-color: var(--sagesoft); }
.thumb { flex: none; width: 62px; height: 62px; border-radius: 13px; overflow: hidden; background: #faf9f4; }
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; }
.thumb-sm { width: 56px; height: 56px; border-radius: 12px; }
.rows { display: contents; }
.row-sub.lh { line-height: 1.4; }
.row-pin { flex: none; color: var(--blush); }
.row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-title { font-family: var(--fh); font-size: 22px; font-weight: 600; line-height: 1.2; }
.row-sub { font-size: 13px; color: var(--muted); }
.row-icon { flex: none; color: var(--muted); }

/* sub-page sheet */
.sheet {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 12px 22px 32px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--paper);
  transform: translateX(100%);
  transition: transform var(--dur) var(--ease);
}
.sheet.open { transform: none; }
.back {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px 6px 0;
  border: 0;
  background: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--sage);
  cursor: pointer;
}
.sub { display: flex; flex-direction: column; gap: 14px; }
.sub-head { display: flex; flex-direction: column; gap: 4px; }
.kicker-sage { font-size: 13px; font-weight: 600; letter-spacing: var(--ls); text-transform: uppercase; color: var(--sage); }
.label { font-size: 12px; font-weight: 600; letter-spacing: var(--ls); text-transform: uppercase; color: var(--muted); }

/* dress */
.car { display: flex; gap: 10px; margin: 0 -22px; padding: 0 22px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 22px; }
.slide {
  flex: none;
  width: 72%;
  aspect-ratio: 9 / 16;
  padding: 0;
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  scroll-snap-align: start;
  cursor: zoom-in;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line);
}
.slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dots { display: flex; justify-content: center; gap: 7px; }
.dots span { width: 7px; height: 7px; border-radius: 4px; background: var(--line); transition: all .25s; }
.dots span.on { width: 20px; background: var(--sage); }
.tip { font-size: 15px; line-height: 1.6; }
.badge { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--blushsoft); font-size: 14px; font-weight: 600; }
.badge i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--blush); }
.colours { display: flex; flex-direction: column; gap: 12px; padding-top: 6px; border-top: 1px dashed var(--line); }
.colours .label { padding-top: 8px; }
.swatches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 8px; }
.sw { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.sw i { width: 46px; height: 46px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(58, 48, 42, .1); }
.sw span { font-size: 12px; line-height: 1.3; }

/* gifts */
.sub-intro { margin-top: -4px; font-family: var(--fh); font-style: italic; font-size: 19px; line-height: 1.45; text-wrap: pretty; }
html[lang=th] .sub-intro { font-style: normal; }
.groups { display: flex; flex-direction: column; gap: 22px; }
.grp { display: flex; flex-direction: column; gap: 10px; }
html[lang=th] .grp-local { order: -1; }
.card { padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.qr-card { display: flex; align-items: center; gap: 14px; }
.qr-btn { flex: none; padding: 0; border: 0; background: none; cursor: zoom-in; }
.qr { display: block; width: 96px; height: auto; border-radius: 10px; }
.qr-wise { height: 96px; object-fit: contain; }
.qr-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.brand { font-family: 'Cormorant Garamond', serif; font-size: 23px; font-weight: 600; line-height: 1; }
.brand-pp { font-family: var(--fh); line-height: 1.1; }
.pp-name { font-size: 15px; }
.hint { font-size: 13px; color: var(--muted); line-height: 1.4; }
.copy {
  flex: none;
  border: 0;
  border-radius: 16px;
  padding: 6px 12px;
  background: var(--blushsoft);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s;
}
.copy.copied { background: var(--sagesoft); }
.copy-wise { align-self: flex-start; display: flex; align-items: center; gap: 8px; max-width: 100%; font-size: 14px; font-weight: 400; }
.copy-wise b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.copy-wise .lbl { font-size: 12px; font-weight: 600; }

.bank { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.bank-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border: 0; background: none; text-align: left; cursor: pointer; }
.bank-ico { flex: none; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 11px; background: var(--blushsoft); }
.bank-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bank-txt b { font-size: 15px; font-weight: 600; }
.bank-txt span { font-size: 12px; color: var(--muted); }
.bank-chev { flex: none; color: var(--muted); transition: transform .25s; }
.bank.open .bank-chev { transform: rotate(180deg); }
.bank-body { display: flex; flex-direction: column; padding: 0 14px 14px; }
.bank:not(.open) .bank-body { display: none; }
.field { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px dashed var(--line); }
.field-txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.field-label { font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.field-value { font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.mono { font-family: ui-monospace, Menlo, monospace; }
.bank-note { margin-top: 4px; padding: 11px 13px; border-radius: 12px; background: var(--paper); font-size: 13px; line-height: 1.5; }

/* zoom viewer */
.zoom { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; background: rgba(38, 32, 28, .97); }
.zoom-bar { flex: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; color: #f8f7f1; }
.zoom-hint { font-size: 13px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zoom-ctrls { flex: none; display: flex; gap: 6px; }
.zbtn { width: 36px; height: 36px; border: 1px solid rgba(248, 247, 241, .35); border-radius: 50%; background: none; color: #f8f7f1; font-size: 20px; line-height: 1; cursor: pointer; }
.zclose { height: 36px; padding: 0 14px; border: 0; border-radius: 18px; background: #f8f7f1; color: #3a302a; font-size: 13px; font-weight: 600; cursor: pointer; }
.zoom-area { flex: 1; overflow: auto; touch-action: pan-x pan-y pinch-zoom; }
.zoom-inner { position: relative; display: flex; align-items: center; min-height: 100%; }
.zoom-fig { position: relative; width: 100%; }
.zoom-fig img { display: block; width: 100%; max-width: none; }

/* bottom nav */
.tabbar {
  flex: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 6px 4px calc(env(safe-area-inset-bottom, 0px) + 6px);
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 0;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.tab:hover { color: var(--muted); }
.tab[aria-current=page] { color: var(--sage); font-weight: 600; }
