/* Payke Global sample — design tokens fixed from the approved "A · Light" boards (2026-10-17).
   Do not invent new colours here: every value below is read off the board's swatch row. */
@font-face { font-family: "Geist"; src: url("assets/fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("assets/fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --canvas: #ffffff;
  --surface: #f4f4f4;
  --rule: #e5e6e8;
  --text: #171a20;
  --text-2: #5c5e62;
  --text-3: #8e9094;
  --blue: #3e6ae1;
  --blue-press: #3459c4;
  --amber: #f2b33d;
  --amber-text: #9a6200;
  --error: #b3261e;

  --r-btn: 4px;
  --r-card: 12px;
  --r-sheet: 18px;

  --font: "Geist", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Motion tokens (mengto-animation-systems): calm, product-grade, no bounce. */
  --dur-micro: 140ms;
  --dur-ui: 220ms;
  --dur-screen: 340ms;
  --dur-sheet: 320ms;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --rise: 14px;
  --stagger: 55ms;

  --pad: 20px;
  --tabbar-h: 64px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  background: #e9eaec;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  font-feature-settings: "ss01" 0;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
.mono { font-family: var(--mono); font-feature-settings: "zero" 0; letter-spacing: 0; }

/* Phone-width shell: full-bleed on phones, centred 390px column on wider screens. */
#app {
  position: relative;
  width: 100%;
  max-width: 430px;
  min-height: 100svh;
  height: 100svh;
  margin: 0 auto;
  background: var(--canvas);
  overflow: hidden;
}
@media (min-width: 520px) {
  body { padding: 24px 0; }
  #app { height: min(860px, calc(100svh - 48px)); min-height: 0; max-width: 390px; border-radius: 28px; box-shadow: 0 1px 2px rgba(23,26,32,.06), 0 24px 60px rgba(23,26,32,.12); }
}

.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: var(--canvas);
  overflow: hidden;
}
.scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.scroll::-webkit-scrollbar { display: none; }
.pad { padding-left: var(--pad); padding-right: var(--pad); }

/* Screen transitions */
.screen.enter-fwd { animation: enterFwd var(--dur-screen) var(--ease-out) both; }
.screen.enter-back { animation: enterBack var(--dur-screen) var(--ease-out) both; }
.screen.enter-fade { animation: fadeIn var(--dur-screen) var(--ease-out) both; }
@keyframes enterFwd { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes enterBack { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.rise { animation: rise 520ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * var(--stagger)); }
@keyframes rise { from { opacity: 0; transform: translateY(var(--rise)); } to { opacity: 1; transform: none; } }

/* ---------- Sample control (outside the product UI) ---------- */
.sample-pill {
  position: absolute; z-index: 60; top: 10px; left: 50%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px 0 8px;
  border-radius: 13px;
  background: rgba(23,26,32,.82); color: #fff;
  font-size: 11px; letter-spacing: .02em;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: transform var(--dur-micro) var(--ease-out), background var(--dur-micro);
}
.sample-pill:active { transform: translateX(-50%) scale(.97); }
.sample-pill b { font-weight: 600; letter-spacing: .08em; }
.sample-pill .mono { opacity: .75; font-size: 10.5px; }
.sample-pill svg { width: 12px; height: 12px; }

/* ---------- Top bars ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; height: 52px; padding: 0 12px; flex: none; margin-top: 30px; }
.topbar .title { font-size: 15px; font-weight: 500; }
.iconbtn {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface);
  transition: transform var(--dur-micro) var(--ease-out), background var(--dur-micro);
}
.iconbtn:active { transform: scale(.94); background: var(--rule); }
.iconbtn.ghost { background: transparent; }
.iconbtn.glass { box-shadow: 0 1px 3px rgba(23,26,32,.14); background: rgba(255,255,255,.86); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.ico { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico.sm { width: 16px; height: 16px; }
.ico.xs { width: 14px; height: 14px; }
.ico.lg { width: 24px; height: 24px; }

/* ---------- Type ---------- */
.eyebrow { font-size: 12px; color: var(--text-2); }
.display { font-size: 40px; line-height: 1.04; letter-spacing: -0.035em; font-weight: 500; margin: 0; }
.display .dim, .h1 .dim { color: var(--text-3); }
.h1 { font-size: 30px; line-height: 1.1; letter-spacing: -0.03em; font-weight: 500; margin: 0; }
.h2 { font-size: 22px; line-height: 1.2; letter-spacing: -0.02em; font-weight: 500; margin: 0; }
.h3 { font-size: 16px; font-weight: 500; margin: 0; }
.body { font-size: 15px; color: var(--text-2); margin: 0; }
.small { font-size: 13px; color: var(--text-2); }
.tiny { font-size: 11.5px; color: var(--text-2); }
.amber { color: var(--amber-text); }
.blue { color: var(--blue); }
.err { color: var(--error); }
.wordmark { font-size: 11px; letter-spacing: .28em; font-weight: 600; }

/* ---------- Buttons (radius 4, Tesla flat) ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 48px; border-radius: var(--r-btn);
  font-size: 15px; font-weight: 500;
  transition: transform var(--dur-micro) var(--ease-out), background var(--dur-micro), opacity var(--dur-ui);
}
.btn:active { transform: scale(.985); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:active { background: var(--blue-press); }
.btn-primary[disabled] { opacity: .35; pointer-events: none; }
.btn-secondary { background: var(--surface); color: var(--text); }
.btn-secondary:active { background: var(--rule); }
.btn-black { background: var(--text); color: #fff; }
.btn-outline { background: #fff; border: 1px solid var(--rule); }
.btn-text { height: 40px; background: none; font-size: 14px; }
.btn-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.btn-row .btn { height: 44px; font-size: 14px; margin-top: 0 !important; }
.btn.loading { pointer-events: none; }
.btn .spin { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin 800ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.cta { padding: 12px var(--pad) 18px; flex: none; background: var(--canvas); }
.cta .btn + .btn { margin-top: 8px; }
.cta .fine { text-align: center; font-size: 11.5px; color: var(--text-2); margin-top: 10px; }

/* ---------- Rows & lists ---------- */
.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }
.rows > * + * { border-top: 1px solid var(--rule); }
.row { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 0; width: 100%; text-align: left; }
.row .grow { flex: 1; min-width: 0; }
.row .val { color: var(--text-2); font-size: 13.5px; }
.row .chev { color: var(--text-3); }
.row.tap { transition: background var(--dur-micro); }
.row.tap:active { background: var(--surface); }
.section-label { font-size: 12px; color: var(--text-2); margin: 22px 0 4px; }

.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 16px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.trio .t { font-size: 12.5px; font-weight: 500; margin-top: 8px; }
.trio .s { font-size: 11px; color: var(--text-2); }

/* ---------- Pills, chips, badges ---------- */
.pill { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 12px; font-size: 11px; background: rgba(255,255,255,.22); color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.pill.light { background: var(--surface); color: var(--text); }
.badge { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 3px; font-size: 10px; font-weight: 600; letter-spacing: .04em; background: var(--text); color: #fff; vertical-align: middle; }
.badge.outline { background: none; border: 1px solid var(--rule); color: var(--text-2); font-weight: 500; }
.badge.added { background: var(--text); }
.badge.removed { background: none; border: 1px solid var(--rule); color: var(--text-2); font-weight: 500; }

/* ---------- Hero photo band ---------- */
.hero { position: relative; flex: none; overflow: hidden; background: #c9ccd1; }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero .shade { position: absolute; inset: 0 0 auto; height: 110px; background: linear-gradient(rgba(10,12,16,.45), rgba(10,12,16,0)); pointer-events: none; }
.hero .over { position: absolute; left: 0; right: 0; top: 40px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; color: #fff; }
.hero .over .ttl { font-size: 14px; font-weight: 500; }
.hero-img-in { animation: heroIn 900ms var(--ease-out) both; }
@keyframes heroIn { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }

/* ---------- Quiz ---------- */
.progress8 { display: flex; gap: 4px; flex: 1; margin: 0 12px; }
.progress8 i { flex: 1; height: 3px; border-radius: 2px; background: var(--rule); transition: background var(--dur-ui); }
.progress8 i.on { background: var(--text); }
.opt {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 14px; border: 1px solid var(--rule); border-radius: var(--r-card); background: #fff;
  transition: border-color var(--dur-micro), box-shadow var(--dur-micro), transform var(--dur-micro) var(--ease-out);
}
.opt + .opt { margin-top: 10px; }
.opt:active { transform: scale(.99); }
.opt .key { width: 24px; height: 24px; border-radius: 4px; background: var(--surface); display: grid; place-items: center; font-size: 11px; color: var(--text-2); flex: none; font-family: var(--mono); transition: background var(--dur-micro), color var(--dur-micro); }
.opt .o-t { font-size: 15px; font-weight: 500; }
.opt .o-s { font-size: 12px; color: var(--text-2); }
.opt .ck { margin-left: auto; opacity: 0; transform: scale(.8); transition: opacity var(--dur-micro), transform var(--dur-ui) var(--ease-out); }
.opt.sel { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.opt.sel .key { background: var(--text); color: #fff; }
.opt.sel .ck { opacity: 1; transform: none; }
.q-anim { animation: qIn 300ms var(--ease-out) both; }
@keyframes qIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }

/* ---------- Result / traits ---------- */
.traits { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; padding: 18px 0 16px; }
.traits .tv { font-size: 12.5px; font-weight: 500; margin-top: 6px; }
.traits .tk { font-size: 11px; color: var(--text-2); }
.lockcard { display: flex; gap: 12px; align-items: center; padding: 14px; background: var(--surface); border-radius: var(--r-card); }
.lockcard .ic { width: 32px; height: 32px; border-radius: 50%; background: #fff; display: grid; place-items: center; flex: none; }

/* ---------- Sheet ---------- */
.scrim { position: absolute; inset: 0; background: rgba(23,26,32,.38); z-index: 30; animation: fadeIn var(--dur-sheet) var(--ease-out) both; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 31;
  background: #fff; border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  padding: 10px var(--pad) 22px;
  animation: sheetUp var(--dur-sheet) var(--ease-out) both;
  max-height: 86%; overflow-y: auto;
}
.sheet .grab { width: 36px; height: 4px; border-radius: 2px; background: var(--rule); margin: 0 auto 14px; }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }

/* ---------- Form ---------- */
.field { position: relative; background: var(--surface); border-radius: var(--r-btn); padding: 8px 34px 8px 12px; min-height: 52px; }
.field label { display: block; font-size: 11px; color: var(--text-2); }
.field select, .field input { width: 100%; border: 0; background: transparent; outline: none; font-size: 15px; padding: 0; appearance: none; -webkit-appearance: none; }
.field .ico { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--text-2); pointer-events: none; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border-radius: var(--r-btn); padding: 3px; gap: 3px; }
.seg button { height: 38px; border-radius: 3px; font-size: 13px; color: var(--text-2); transition: background var(--dur-ui), color var(--dur-ui), box-shadow var(--dur-ui); }
.seg button.on { background: #fff; color: var(--text); font-weight: 500; box-shadow: 0 1px 2px rgba(23,26,32,.08); }
.seg button[disabled] { opacity: .45; cursor: not-allowed; }
.check { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; min-height: 46px; font-size: 14px; }
.check .box { width: 20px; height: 20px; border-radius: 4px; border: 1.5px solid #b9bbbf; display: grid; place-items: center; flex: none; transition: background var(--dur-micro), border-color var(--dur-micro); }
.check .box svg { width: 14px; height: 14px; stroke: #fff; stroke-width: 2.4; opacity: 0; transform: scale(.6); transition: opacity var(--dur-micro), transform var(--dur-ui) var(--ease-out); }
.check.on .box { background: var(--text); border-color: var(--text); }
.check.on .box svg { opacity: 1; transform: none; }
.check .req { color: var(--text-2); }
.subchecks { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 0 6px 32px; }
.subcheck { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 1px solid var(--rule); border-radius: var(--r-btn); font-size: 12.5px; transition: border-color var(--dur-micro), background var(--dur-micro); }
.subcheck .box { width: 14px; height: 14px; border-radius: 3px; border: 1.5px solid #b9bbbf; display: grid; place-items: center; }
.subcheck .box svg { width: 10px; height: 10px; stroke: #fff; stroke-width: 3; opacity: 0; }
.subcheck.on { border-color: var(--text); }
.subcheck.on .box { background: var(--text); border-color: var(--text); }
.subcheck.on .box svg { opacity: 1; }

/* ---------- Toggle ---------- */
.toggle { width: 44px; height: 26px; border-radius: 13px; background: #d3d5d9; position: relative; flex: none; transition: background var(--dur-ui) var(--ease-out); }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.18); transition: transform var(--dur-ui) var(--ease-out); }
.toggle.on { background: var(--blue); }
.toggle.on::after { transform: translateX(18px); }

/* ---------- Tab bar ---------- */
.tabbar { flex: none; height: var(--tabbar-h); border-top: 1px solid var(--rule); display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; padding-bottom: 6px; }
.tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10.5px; color: var(--text-2); transition: color var(--dur-micro); }
.tabbar button.on { color: var(--text); font-weight: 600; }
.tabbar button .ico { width: 21px; height: 21px; }

/* ---------- Map ---------- */
.map { position: relative; background: #eef0f2; overflow: hidden; }
.map svg { display: block; width: 100%; height: 100%; }
.map .credit { position: absolute; right: 6px; bottom: 5px; font-size: 9px; color: var(--text-2); background: rgba(255,255,255,.8); padding: 1px 5px; border-radius: 3px; }
.route-line { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 1200ms var(--ease-out) 150ms forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.pin { animation: pinIn 380ms var(--ease-out) both; transform-box: fill-box; transform-origin: center; }
@keyframes pinIn { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }

/* ---------- Day list ---------- */
.dayrow { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 13px 0; }
.dayrow .d-t { font-size: 14.5px; font-weight: 500; }
.dayrow .d-s { font-size: 12px; color: var(--text-2); }
.dayrow .d-r { text-align: right; font-size: 12px; color: var(--text-2); line-height: 1.35; }
.num { width: 22px; height: 22px; border-radius: 50%; background: var(--text); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; flex: none; font-family: var(--mono); }
.num.c { background: var(--amber); color: var(--text); }
.stop { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 0; }
.stop .th { width: 44px; height: 44px; border-radius: 8px; overflow: hidden; background: var(--surface); flex: none; display: grid; place-items: center; color: var(--text-2); }
.stop .th img { width: 100%; height: 100%; object-fit: cover; }
.stop .s-t { font-size: 14.5px; font-weight: 500; }
.stop .s-s { font-size: 12px; color: var(--text-2); }
.stop .s-s.amber { color: var(--amber-text); }
.stop .time { margin-left: auto; font-family: var(--mono); font-size: 13px; }
.daytabs { display: inline-flex; border: 1px solid var(--rule); border-radius: 6px; padding: 2px; gap: 2px; }
.daytabs button { width: 30px; height: 26px; border-radius: 4px; font-size: 12px; font-family: var(--mono); color: var(--text-2); transition: background var(--dur-ui), color var(--dur-ui); }
.daytabs button.on { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: inset 0 0 0 1px var(--rule); }
.askbar { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 6px 0 14px; border-radius: var(--r-card); background: var(--surface); width: 100%; text-align: left; }
.askbar input { flex: 1; border: 0; background: transparent; outline: none; font-size: 14px; min-width: 0; }
.askbar .go { width: 32px; height: 32px; border-radius: 8px; background: var(--blue); color: #fff; display: grid; place-items: center; flex: none; }
.drawer { position: relative; margin-top: -18px; background: #fff; border-radius: var(--r-sheet) var(--r-sheet) 0 0; box-shadow: 0 -1px 0 var(--rule); }
.drawer .grab { width: 36px; height: 4px; border-radius: 2px; background: var(--rule); margin: 8px auto 6px; }

/* ---------- Chat ---------- */
.bubble-me { align-self: flex-end; background: var(--text); color: #fff; padding: 9px 14px; border-radius: 16px 16px 4px 16px; font-size: 14px; max-width: 80%; animation: rise 300ms var(--ease-out) both; }
.ai { display: flex; gap: 10px; font-size: 14px; line-height: 1.5; animation: rise 360ms var(--ease-out) both; }
.typing { display: inline-flex; gap: 4px; padding: 8px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.changecard { border: 1px solid var(--rule); border-radius: var(--r-card); padding: 12px 14px 14px; animation: rise 420ms var(--ease-out) both; }
.changecard .stop { padding: 8px 0; }
.changecard .stop.removed .s-t, .changecard .stop.removed .time { text-decoration: line-through; color: var(--text-3); }
.changecard .stop.removed .th { opacity: .5; }

/* ---------- Coupons ---------- */
.tabs2 { display: flex; gap: 22px; border-bottom: 1px solid var(--rule); }
.tabs2 button { position: relative; height: 38px; font-size: 14px; color: var(--text-2); }
.tabs2 button.on { color: var(--text); font-weight: 500; }
.tabs2 button.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--text); animation: grow var(--dur-ui) var(--ease-out); }
@keyframes grow { from { transform: scaleX(.3); opacity: 0; } to { transform: none; opacity: 1; } }
.coupon { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 14px 0; transition: background var(--dur-micro); }
.coupon:active { background: var(--surface); }
.stub { width: 58px; height: 58px; border-radius: 8px; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; position: relative; }
.stub b { font-size: 17px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.stub small { font-size: 9px; color: var(--text-2); letter-spacing: .1em; margin-top: 2px; }
.coupon.past .stub b { color: var(--text-2); }
.coupon .c-t { font-size: 14.5px; font-weight: 500; }
.coupon .c-s { font-size: 12px; color: var(--text-2); }
.coupon .c-e { font-size: 12px; display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.coupon .c-e.soon { color: var(--amber-text); }
.linkbtn { color: var(--blue); font-size: 12px; margin-left: 6px; }
.savings { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; }

.note { display: flex; gap: 8px; font-size: 12px; color: var(--text-2); padding: 12px 14px; border-radius: var(--r-card); background: var(--surface); }
.note .ico { margin-top: 1px; }

/* ---------- Coupon detail ---------- */
.bigoffer { display: flex; align-items: flex-end; gap: 12px; margin: 20px 0 18px; }
.bigoffer b { white-space: nowrap; font-size: 46px; line-height: .95; letter-spacing: -0.04em; font-weight: 500; }
.bigoffer span { flex: 1; font-size: 13px; color: var(--text-2); line-height: 1.35; padding-bottom: 3px; }
.spec { display: flex; align-items: center; gap: 12px; padding: 12px 0; font-size: 13.5px; }
.spec .k { color: var(--text-2); width: 112px; white-space: nowrap; flex: none; display: flex; align-items: center; gap: 10px; }
.spec .v { margin-left: auto; text-align: right; }

/* ---------- Redeem ---------- */
.redeem-bg { background: var(--surface); }
.codecard { background: #fff; border-radius: var(--r-card); padding: 14px 14px 12px; margin: 0 14px; box-shadow: 0 1px 2px rgba(23,26,32,.05); }
.codecard .hd { display: flex; justify-content: space-between; font-size: 13px; padding-bottom: 12px; }
.codecard .hd b { font-weight: 500; }
.qrline { display: flex; gap: 14px; align-items: center; }
.qr { width: 96px; height: 96px; flex: none; }
.qr svg, .bar svg { display: block; width: 100%; height: 100%; }
.codetext { font-family: var(--mono); font-size: 19px; letter-spacing: .04em; }
.bar { height: 50px; margin-top: 12px; }
.code-swap { animation: codeSwap 420ms var(--ease-out) both; }
@keyframes codeSwap { from { opacity: 0; filter: blur(3px); } to { opacity: 1; filter: none; } }
.timer { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-2); margin-top: 10px; }
.timer .mono { color: var(--text); font-size: 12px; }
.tbar { height: 2px; background: var(--rule); border-radius: 1px; margin-top: 6px; overflow: hidden; }
.tbar i { display: block; height: 100%; background: var(--blue); transform-origin: left; transition: transform 1s linear; }
.staffline { text-align: center; font-size: 12px; color: var(--text-2); padding: 16px 24px 0; line-height: 1.5; }
.staffline.err { color: var(--error); }
.dots { display: flex; gap: 14px; justify-content: center; padding: 14px 0 6px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--text); transition: background var(--dur-micro); }
.dots i.on { background: var(--text); }
.dots.err i { border-color: var(--error); background: var(--error); }
.shake { animation: shake 320ms var(--ease-out); }
@keyframes shake { 0%,100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); padding: 0 18px; }
.keypad button { height: 50px; font-size: 24px; font-weight: 400; border-radius: 10px; transition: background var(--dur-micro); display: grid; place-items: center; }
.keypad button:active { background: rgba(23,26,32,.07); }
.pinhint { text-align: center; font-size: 11px; color: var(--text-3); padding-top: 2px; }

/* ---------- Used ---------- */
.okmark { width: 40px; height: 40px; border-radius: 50%; background: var(--text); color: #fff; display: grid; place-items: center; animation: pop 420ms var(--ease-out) both; }
.okmark svg { stroke: #fff; stroke-width: 2.2; stroke-dasharray: 30; stroke-dashoffset: 30; animation: drawck 360ms var(--ease-out) 200ms forwards; }
@keyframes pop { from { transform: scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes drawck { to { stroke-dashoffset: 0; } }
.usedcard { border: 1px solid var(--rule); border-radius: var(--r-card); padding: 14px; }
.kv3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.kv3 .k { font-size: 11px; color: var(--text-2); }
.kv3 .v { font-size: 13px; }
.won { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: var(--r-btn); height: 50px; padding: 0 14px; }
.won span { font-weight: 500; color: var(--text-2); border-right: 1px solid var(--rule); padding-right: 10px; }
.won input { flex: 1; border: 0; background: transparent; outline: none; font-size: 17px; font-family: var(--mono); min-width: 0; }

/* ---------- Store web (staff) ---------- */
.urlbar { margin: 38px 14px 0; height: 32px; border-radius: 8px; background: var(--surface); display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.livecard { background: var(--surface); border-radius: var(--r-card); padding: 14px; }
.livecard .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); margin-right: 6px; }
.logrow { display: flex; gap: 14px; align-items: center; padding: 12px 0; font-size: 13.5px; }
.logrow .mono { width: 44px; }
.logrow .r { margin-left: auto; font-size: 12px; color: var(--text-2); }
.logrow.new { animation: rise 500ms var(--ease-out) both; }
.box-line { border: 1px solid var(--rule); border-radius: var(--r-card); padding: 14px; display: flex; align-items: center; gap: 10px; }

/* ---------- Lock screen ---------- */
.lock { position: absolute; inset: 0; color: #fff; overflow: hidden; }
.lock > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lock .veil { position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,.42), rgba(0,0,0,.05) 42%, rgba(0,0,0,.3)); }
.lock .clock { position: relative; text-align: center; padding-top: 70px; text-shadow: 0 1px 10px rgba(0,0,0,.2); }
.lock .clock .d { font-size: 17px; font-weight: 500; }
.lock .clock .t { font-size: 88px; line-height: 1; font-weight: 600; letter-spacing: -0.03em; }
.lock .stack { position: absolute; left: 10px; right: 10px; bottom: 96px; display: flex; flex-direction: column; gap: 8px; }
.notif { display: flex; gap: 10px; text-align: left; width: 100%; padding: 12px; border-radius: 18px; background: rgba(245,245,247,.78); color: var(--text); -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4); animation: notifIn 520ms var(--ease-out) both; transition: transform var(--dur-micro) var(--ease-out); }
.notif:active { transform: scale(.98); }
.notif .app { width: 34px; height: 34px; border-radius: 8px; background: var(--blue); color: #fff; display: grid; place-items: center; flex: none; }
.notif .n-h { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; }
.notif .n-h span { font-weight: 400; color: var(--text-2); font-size: 12px; }
.notif .n-b { font-size: 13px; line-height: 1.35; }
@keyframes notifIn { from { opacity: 0; transform: translateY(-14px) scale(.98); } to { opacity: 1; transform: none; } }
.lock .bottom { position: absolute; left: 0; right: 0; bottom: 34px; display: flex; justify-content: space-between; padding: 0 44px; }
.lock .bottom span { width: 46px; height: 46px; border-radius: 50%; background: rgba(0,0,0,.28); display: grid; place-items: center; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.lock .hint { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; font-size: 11px; opacity: .8; }

/* ---------- Recap ---------- */
.mosaic { display: grid; grid-template-columns: 1.35fr 1fr; grid-template-rows: 1fr 1fr; gap: 4px; height: 186px; border-radius: 8px; overflow: hidden; }
.mosaic .m { position: relative; overflow: hidden; background: var(--surface); }
.mosaic .m:first-child { grid-row: span 2; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; }
.mosaic .lbl { position: absolute; left: 6px; bottom: 6px; font-size: 10px; background: rgba(255,255,255,.88); color: var(--text); padding: 2px 6px; border-radius: 3px; }
.sharecard { border-radius: var(--r-card); background: #fff; box-shadow: 0 1px 2px rgba(23,26,32,.06), 0 10px 30px rgba(23,26,32,.10); padding: 16px; }
.sharecard .mosaic { height: 150px; }
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); padding: 14px 0 12px; border-bottom: 1px solid var(--rule); }
.stats3 .k { font-size: 11px; color: var(--text-2); }
.stats3 .v { font-size: 14px; font-weight: 500; margin-top: 2px; }
.cardfoot { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; font-size: 11px; color: var(--text-2); }

.shareicons { display: flex; justify-content: space-between; padding: 0 6px; }
.shareicons button { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; color: var(--text-2); }
.shareicons .circ { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--rule); background: #fff; display: grid; place-items: center; color: var(--text); transition: transform var(--dur-micro) var(--ease-out); }
.shareicons button:active .circ { transform: scale(.94); }

/* ---------- Toast ---------- */
.toast { position: absolute; z-index: 80; left: 50%; bottom: 148px; transform: translateX(-50%); background: var(--text); color: #fff; font-size: 13px; padding: 10px 14px; border-radius: 10px; display: flex; gap: 8px; align-items: center; white-space: nowrap; animation: toastIn var(--dur-ui) var(--ease-out) both; }
.toast.out { animation: toastOut 180ms var(--ease-in) both; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px) scale(.98); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toastOut { to { opacity: 0; transform: translate(-50%, 6px); } }

/* ---------- Screen index (sample navigator) ---------- */
.idx-group { margin-top: 16px; }
.idx-group h4 { font-size: 12px; font-weight: 500; color: var(--text-2); margin: 0 0 4px; }
.idx-item { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 9px 0; font-size: 14px; border-top: 1px solid var(--rule); }
.idx-item .mono { font-size: 11px; color: var(--text-3); width: 20px; }
.idx-item.cur { font-weight: 600; }
.idx-item.cur .mono { color: var(--blue); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
  .route-line { stroke-dashoffset: 0; }
}

/* Re-renders for in-place state changes (dir "none") skip entrance motion so nothing replays. */
.screen.static .rise, .screen.static .hero-img-in { animation: none; }

.ph { overflow: hidden; }
.ph img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Credits sheet (sample menu) ---------- */
.sheet.credits h4 { font-size: 12px; font-weight: 500; color: var(--text-2); margin: 16px 0 4px; }
.cr-item { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--rule); font-size: 12.5px; line-height: 1.45; }
.cr-item a, .cr-text a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.cr-thumb { width: 52px; height: 52px; object-fit: cover; border-radius: 6px; flex: none; }
.cr-text { font-size: 12.5px; line-height: 1.45; margin: 6px 0; }
