.wordmark{font:650 28px var(--heading);letter-spacing:-.04em}
.setup{display:block;max-width:480px;padding:clamp(24px,8vh,64px) 24px}
.setup h1{font-size:clamp(34px,7vw,46px);line-height:1.07}
.setup p{color:var(--quiet);line-height:1.55;margin:14px 0 26px}
.setup .primary,.setup .secondary{display:grid;place-items:center;min-height:48px;text-decoration:none;font-size:16px}
.setup .primary{margin-top:20px}.setup .secondary{margin-top:7px}
.setup #back{margin-bottom:18px}.setup .amount{border:1px solid var(--card-edge);border-radius:6px;display:flex;align-items:center;padding:0 12px}
.amount input{border:0;background:transparent;font-size:23px;height:52px}.amount small{color:var(--quiet)}

.gate-mark { width:68px; height:68px; margin-bottom:24px; background:var(--ink); mask:url(brand/mark.svg) center/contain no-repeat; }
.setup:has(#tour:not([hidden])) { padding-top:0; padding-bottom:max(24px,env(safe-area-inset-bottom)); }
#tour { max-width:390px; margin:auto; text-align:center; }
.tour-stage { touch-action:pan-y pinch-zoom; }
.tour-art { display:block; width:min(100%, 360px); height:clamp(180px,36svh,350px); margin:0 auto; overflow:visible; }
.tour-copy { min-height:8rem; }
.tour-copy h1 { font-size:clamp(30px,6.6vw,40px); text-wrap:balance; }
.tour-copy p { max-width:34ch; margin:12px auto 0; text-wrap:pretty; }
.tour-art .shadow { fill:var(--surface); }
.tour-art .cover { fill:var(--ink); stroke:var(--ink); stroke-width:2; stroke-linejoin:round; }
.tour-art .seam { stroke:var(--page); stroke-width:1; stroke-dasharray:2.5 3; }
.tour-art .card,.tour-art .clasp { fill:var(--page); stroke:var(--ink); stroke-width:2.5; stroke-linejoin:round; }
.tour-art .pocket { fill:var(--quiet); stroke:var(--ink); stroke-width:2; }
.tour-art .slot { stroke:var(--page); stroke-width:2; stroke-linecap:round; }
.tour-art .engrave,.tour-art .tick { stroke:var(--ink); stroke-width:3; stroke-linejoin:round; stroke-linecap:round; }
.tour-art .heavy { stroke-width:8; }
.tour-art .fine-rule { stroke:var(--card-edge); stroke-width:2; }
.tour-nav { display:grid; justify-items:center; gap:8px; margin:12px auto 0; }
#tour-dots { display:flex; justify-content:center; width:100%; }
#tour-dots button { display:grid; place-items:center; min-width:0; flex:0 1 44px; height:44px; padding:0; }
#tour-dots button::after { content:""; width:7px; height:7px; border:1px solid var(--quiet); border-radius:50%; }
#tour-dots [aria-current="step"]::after { background:var(--ink); border-color:var(--ink); }
.tour-actions { display:grid; grid-template-columns:1fr 2fr; gap:8px; width:min(100%,320px); }
.setup .tour-actions button { margin:0; }
#start-setup { min-height:44px; padding:8px 16px; text-decoration:underline; text-underline-offset:4px; }
@media(prefers-reduced-motion:no-preference) {
  .tour-slide:not([hidden]), .setup > :is(#welcome,#balances,#ready):not([hidden]) {
    animation:tour-focus 230ms ease-out;
  }
  .art-enter,.art-follow { animation:appear 380ms ease-out both; }
  .art-follow { animation-delay:130ms; }
  .bar-grow,.step-rise { transform-box:fill-box; animation:grow-bar 540ms ease-out both; transform-origin:left; }
  .step-rise { animation-name:grow-step; transform-origin:bottom; }
  .ring-reveal { animation:draw-ring 700ms ease-out both; }
  .tick { stroke-dasharray:1; animation:draw-tick 350ms ease both; }
  .tour-art .second { animation-delay:100ms; }
  .tour-art .third { animation-delay:200ms; }
}
@keyframes tour-focus { from { filter:blur(2px); opacity:.65; } to { filter:blur(0); opacity:1; } }
@keyframes appear { from { opacity:0; transform:translateY(7px); } }
@keyframes grow-bar { from { transform:scaleX(.02); } }
@keyframes grow-step { from { transform:scaleY(.02); } }
@keyframes draw-ring { from { stroke-dasharray:0 100; } }
@keyframes draw-tick { from { stroke-dashoffset:1; } }
#tour-brand { display:inline-flex; align-items:center; gap:.24em; white-space:nowrap; }
.brand-symbol { display:block; flex:none; width:1.12em; height:1.12em; }
.brand-name { display:block; }
.brand-leaf { transform-origin:21px 24px; }
#intro-curtain { display:none; }
.intro-running { overflow:hidden; }
.intro-running #intro-curtain { display:block; visibility:visible; position:fixed; inset:0; z-index:8; background:#000; }
.intro-running #tour-brand { position:relative; z-index:9; visibility:visible; pointer-events:none; }
.intro-running .brand-name,.intro-running .brand-symbol { opacity:0; }
@media(max-width:440px) { #tour-brand { font-size:24px; } }
.intro-running.intro-ready body { visibility:visible; }
@media(max-height:610px) {
  .tour-art { height:clamp(120px,30svh,180px); }
  .tour-copy { min-height:0; }
}


#history input[type=file] { min-height:48px; height:auto; max-width:100%; padding:8px; }
#history .secondary { width:100%; }
.setup .quick-option { display:flex; align-items:center; gap:10px; min-height:44px; }
#profile label,#balances label { text-align:left; }
#bank-balance[hidden] { display:none; }
header .mast:has(#tour-brand) { justify-content:center; }
