/* Shared look: white paper, black ink, Cormorant Garamond for names, LINE Seed Sans TH for Thai/UI. */
:root {
  --paper: #ffffff;
  --soft: #f6f5f2;
  --ink: #111111;
  --ink2: #3a3936;
  --muted: #8a877f;
  --line: #e8e6e1;
  --danger: #b3261e;
  --ok: #1f7a4a;
  --serif: "Cormorant Garamond", "Cormorant", Georgia, "LINE Seed TH", serif;
  --sans: "LINE Seed TH", "Sukhumvit Set", "Thonburi", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gut-l: max(20px, env(safe-area-inset-left, 0px));
  --gut-r: max(20px, env(safe-area-inset-right, 0px));
  --r: 999px;
  color-scheme: light;
}
@font-face { font-family: "LINE Seed TH"; src: url("/fonts/LINESeedSansTH_A_Th.otf") format("opentype"); font-weight: 100 300; font-display: swap; }
@font-face { font-family: "LINE Seed TH"; src: url("/fonts/LINESeedSansTH_A_Rg.otf") format("opentype"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "LINE Seed TH"; src: url("/fonts/LINESeedSansTH_A_Bd.otf") format("opentype"); font-weight: 600 900; font-display: swap; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 15px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.label { font-size: 10.5px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.names { font-family: var(--serif); font-weight: 400; letter-spacing: .005em; line-height: 1.02; }
.names i { font-style: italic; font-size: .62em; margin: 0 .12em; }

.pill { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0 22px; border-radius: var(--r); background: #fff; color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; border: 1px solid transparent; cursor: pointer; white-space: nowrap; transition: transform .15s, background .15s, opacity .15s; }
.pill.dark { background: var(--ink); color: #fff; }
.pill.dark:hover { background: #2c2c2c; }
.pill:disabled { opacity: .45; cursor: default; }
.pill .arr { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; margin-right: -12px; background: rgba(0,0,0,.08); transition: transform .2s; }
.pill.dark .arr { background: rgba(255,255,255,.16); }
.pill:hover .arr { transform: translateX(3px); }
.chipbtn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: var(--r); border: 1px solid var(--line); background: #fff; font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap; text-decoration: none; }
.chipbtn:hover { border-color: #cfccc5; }
.chipbtn.icon { width: 40px; padding: 0; }
.chipbtn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.round { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 90; background: var(--ink); color: #fff; padding: 11px 18px; border-radius: var(--r); font-size: 13.5px; max-width: calc(100vw - 40px); text-align: center; box-shadow: 0 10px 30px -12px rgba(0,0,0,.5); }

.sheet { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(17,17,17,.45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.sheet-box { position: relative; width: min(460px, 100%); max-height: calc(100svh - 40px); overflow: auto; background: #fff; border-radius: 22px; padding: 28px 24px 22px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 30px 80px -30px rgba(0,0,0,.5); }
.sheet-box h2 { font-size: 22px; font-weight: 700; }
.sheet-x { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; }
.sheet-x:hover { background: var(--soft); }
.sheet-act { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
@media (max-width: 560px) {
  .sheet { place-items: end stretch; padding: 0; }
  .sheet-box { width: 100%; border-radius: 22px 22px 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); max-height: 92svh; }
  .sheet-act > * { flex: 1; }
}
.prog-bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.prog-bar i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .25s; }
.prog p { margin-top: 8px; font-size: 13px; color: var(--ink2); font-variant-numeric: tabular-nums; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; }
.field small { color: var(--muted); font-size: 12.5px; }
.input { width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 15px; }
.input:focus { outline: none; border-color: var(--ink); }
textarea.input { min-height: 90px; resize: vertical; }
.err { color: var(--danger); font-size: 13.5px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
