/* Kana4You - system fonts only, mobile first. Contrast checked against #0F1B2A. */
:root {
  --bg: #0F1B2A;
  --bg2: #16273b;
  --bg3: #1f3550;
  --line: #34506f;
  --text: #FFF4E0;      /* on --bg ~15:1 */
  --muted: #BCC8D6;     /* on --bg ~9:1 */
  --orange: #F28C28;    /* on --bg ~7:1; navy text on orange ~7:1 */
  --orange-hi: #FFB259;
  --red: #D7261E;       /* white text on red ~5.3:1 */
  --ok: #7FD99A;
  --warn: #FFD166;
  --err: #FF8A80;
  --radius: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: radial-gradient(120% 60% at 50% -10%, #1d3550 0%, var(--bg) 60%) var(--bg);
  color: var(--text); font-family: var(--font); font-size: 17px; line-height: 1.5;
  display: flex; flex-direction: column;
  overflow-x: hidden;
}
img, svg, video, canvas { max-width: 100%; }
a { color: var(--orange-hi); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.2rem; }
p { margin: 0 0 .8em; }
:focus-visible { outline: 3px solid var(--orange-hi); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.skip { position: absolute; left: -999px; top: 0; background: var(--orange); color: var(--bg); padding: 10px 14px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

.demo-banner { display: none; background: var(--red); color: #fff; text-align: center; font-weight: 700; padding: 8px 12px; font-size: .95rem; position: sticky; top: 0; z-index: 50; }
[data-mode="demo"] .demo-banner { display: block; }
[data-mode="live"] .demo-only { display: none !important; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; max-width: 560px; width: 100%; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; min-height: 48px; }
.brand img { width: 44px; height: 44px; }
.lang { display: flex; gap: 4px; background: var(--bg2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang-btn { min-width: 48px; min-height: 40px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; }
.lang-btn[aria-pressed="true"] { background: var(--orange); color: var(--bg); }

main { flex: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: 8px 16px 32px; }
.site-footer { max-width: 560px; width: 100%; margin: 0 auto; padding: 16px; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); }
.site-footer p { margin: 0 0 .4em; }

.panel { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 0 0 16px; }
.panel h2 { margin-bottom: .4em; }
.muted { color: var(--muted); }
.center { text-align: center; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  min-height: 56px; padding: 12px 18px; border: 2px solid transparent; border-radius: 14px;
  font: inherit; font-size: 1.1rem; font-weight: 700; text-decoration: none; cursor: pointer; text-align: center;
}
.btn-primary { background: var(--orange); color: var(--bg); }
.btn-primary:hover { background: var(--orange-hi); }
.btn-red { background: var(--red); color: #fff; }
.btn-line { background: transparent; color: var(--text); border-color: var(--line); }
.btn-line:hover { border-color: var(--orange); }
.btn-small { min-height: 48px; font-size: 1rem; width: auto; padding: 8px 16px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.stack > * + * { margin-top: 12px; }

label { display: block; font-weight: 600; margin-bottom: 6px; }
input[type="text"], input[type="password"], input[type="tel"], input[inputmode] {
  width: 100%; min-height: 56px; padding: 10px 14px; font: inherit; font-size: 1.25rem;
  background: var(--bg); color: var(--text); border: 2px solid var(--line); border-radius: 12px;
}
input:focus { border-color: var(--orange); }
.hint { color: var(--muted); font-size: .9rem; margin-top: 4px; }
.msg { padding: 12px 14px; border-radius: 12px; margin: 12px 0; font-weight: 600; }
.msg-err { background: #3a1a1a; color: var(--err); border: 1px solid #7a2f2f; }
.msg-ok { background: #14301f; color: var(--ok); border: 1px solid #2c6b43; }
.msg-warn { background: #3a2f10; color: var(--warn); border: 1px solid #7a6420; }

/* landing */
.hero { text-align: center; padding-top: 12px; }
.hero img.logo { width: min(62vw, 240px); height: auto; margin: 0 auto 12px; display: block; filter: drop-shadow(0 8px 24px rgba(242,140,40,.35)); }
.pitch { list-style: none; padding: 0; margin: 0 0 20px; text-align: left; }
.pitch li { padding: 8px 0 8px 34px; position: relative; }
.pitch li::before { content: ""; position: absolute; left: 4px; top: 12px; width: 20px; height: 20px; background: var(--orange); border-radius: 50% 50% 50% 8%; transform: rotate(-45deg); }

/* stamps */
.stamps { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; padding: 0; margin: 12px 0; }
.stamp { aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; position: relative; border: 2px dashed var(--line); color: var(--line); background: var(--bg); }
.stamp svg { width: 62%; height: 62%; }
.stamp .num { position: absolute; bottom: 2px; right: 6px; font-size: .7rem; font-weight: 700; color: var(--muted); }
.stamp.on { border: 2px solid var(--orange); background: linear-gradient(160deg, #3a2410, #5a2b0e); color: var(--orange-hi); }
.stamp.on .num { color: var(--bg); background: var(--orange); border-radius: 8px; padding: 0 4px; }
.progress { font-weight: 700; font-size: 1.15rem; }

.reward { border: 2px solid var(--orange); background: linear-gradient(160deg, #3a2410, #2a1a10); border-radius: var(--radius); padding: 16px; margin: 0 0 16px; }
.reward h2 { color: var(--orange-hi); font-size: 1.35rem; margin-bottom: .2em; }

.qr-box { background: #fff; border-radius: 14px; padding: 8px; width: min(100%, 320px); margin: 12px auto; }
.qr-box svg { display: block; width: 100%; height: auto; }
.code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 1.5rem; font-weight: 700; letter-spacing: .06em; text-align: center; background: var(--bg); border: 2px dashed var(--line); border-radius: 12px; padding: 12px; user-select: all; word-break: break-all; }
.steps { padding-left: 1.2em; margin: .4em 0 0; }
.steps li { margin-bottom: .3em; }

/* staff */
.video-wrap { position: relative; background: #000; border-radius: var(--radius); overflow: hidden; margin: 12px 0; }
.video-wrap video { display: block; width: 100%; max-height: 60vh; object-fit: cover; }
.video-wrap::after { content: ""; position: absolute; inset: 15%; border: 3px solid var(--orange); border-radius: 16px; pointer-events: none; }
.calc { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 1.15rem; }
.calc td { padding: 8px 0; border-bottom: 1px solid var(--line); }
.calc td:last-child { text-align: right; font-weight: 700; }
.calc tr.pay td { font-size: 1.5rem; color: var(--orange-hi); border-bottom: 0; }
.mini-stamps { display: flex; gap: 4px; flex-wrap: wrap; margin: 6px 0; }
.mini-stamps i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: inline-block; }
.mini-stamps i.on { background: var(--orange); border-color: var(--orange); }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }
.row .btn-small { flex: 0 0 auto; }

@media (prefers-reduced-motion: no-preference) {
  .stamp.on { animation: pop .35s ease-out; }
  @keyframes pop { from { transform: scale(.7); } to { transform: scale(1); } }
}

.panel-gap { margin-bottom: 16px; }
