/* SIP IT base: tokens, shell, phone frame, tab bar, buttons, shared primitives. Screens add styles/front.css and styles/flow.css. */
:root {
  --bg: #0B0706; --wood: #1A0F0C; --wood2: #2A1810; --velvet: #5A1A1F; --velvet-deep: #3a1014;
  --gold: #C9A24B; --gold-hi: #E3C06E; --text: #F3E9D8; --muted: #B9A992; --error: #E58F7B; --amber: #D98B2B;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --tab-h: 68px; --pad: 20px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/24px var(--sans); -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; }
h1, h2, h3, p, ul { margin: 0; } ul { padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
a { color: var(--gold-hi); }
:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; border-radius: 4px; }
h1:focus, main:focus { outline: none; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--wood); padding: 8px 12px; z-index: 100; } .skip:focus { left: 8px; }

/* shell: the phone column; centred frame on wide screens */
.stage { min-height: 100dvh; display: flex; justify-content: center; }
.side { display: none; }
.phone { position: relative; width: 100%; max-width: 440px; min-height: 100dvh; background: var(--bg); overflow-x: hidden; }
.phone.has-tabs main { padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); }
main { min-height: 100dvh; }
@media (min-width: 900px) {
  body { background: radial-gradient(1200px 700px at 30% 20%, #3a1d0c 0%, #140a07 55%, #080404 100%); }
  .stage { gap: 72px; align-items: center; padding: 24px; }
  .side { display: block; width: 300px; }
  .side-mark { font: 700 28px/32px var(--sans); letter-spacing: .36em; }
  .side .rule { width: 120px; margin: 14px 0; } .side-line { font: italic 20px/28px var(--serif); margin-top: 20px; } .side-note { color: var(--muted); margin-top: 28px; font-size: 14px; }
  .phone { width: 390px; max-width: 390px; height: min(844px, calc(100dvh - 48px)); min-height: 0; border-radius: 40px; border: 1px solid #3b2a1c; box-shadow: 0 30px 90px #000a, 0 0 0 10px #120a07, 0 0 0 11px #3b2a1c; overflow: hidden; }
  main { height: 100%; min-height: 0; overflow-y: auto; overflow-x: hidden; }
  .tabbar { position: absolute !important; }
}
.caps { font: 600 13px/18px var(--sans); letter-spacing: .28em; text-transform: uppercase; color: var(--muted); }
.rule { border: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); margin: 0; }
.h1 { font: 400 32px/38px var(--serif); } .h2 { font: 400 22px/28px var(--serif); }
.pad { padding: 24px var(--pad) 32px; }
.muted { color: var(--muted); } .small { font-size: 13px; line-height: 18px; }
[hidden] { display: none !important; }

/* buttons: one filled gold primary, outlined secondary */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 20px; border-radius: 12px; text-decoration: none; font: 600 16px/24px var(--sans); letter-spacing: .04em; cursor: pointer; border: 1.5px solid var(--gold); width: 100%; }
.btn-primary { background: linear-gradient(180deg, #d6b25a, #b98f3b); color: #1A0F0C; box-shadow: 0 6px 24px #c9a24b33; }
.btn-secondary { background: rgba(11,7,6,.55); color: var(--gold-hi); backdrop-filter: blur(2px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.link-btn { background: none; border: 0; color: var(--gold-hi); text-decoration: underline; padding: 12px 8px; min-height: 48px; cursor: pointer; }
.icon-btn { width: 48px; height: 48px; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid #c9a24b66; background: rgba(11,7,6,.55); color: var(--gold-hi); cursor: pointer; backdrop-filter: blur(4px); }
.icon-btn[aria-pressed="true"] { background: var(--gold); color: var(--wood); }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid #c9a24b88; background: var(--wood); color: var(--text); font-size: 15px; cursor: pointer; }
.chip.on { background: #c9a24b26; border-color: var(--gold); }
.badge { display: inline-flex; align-items: center; gap: 4px; font: 600 11px/16px var(--sans); letter-spacing: .16em; text-transform: uppercase; padding: 2px 8px; border: 1px solid #c9a24b99; border-radius: 10px; color: var(--gold-hi); background: rgba(11,7,6,.6); }
.surface { background: linear-gradient(180deg, var(--wood2), var(--wood)); border: 1px solid #3b2a1c; border-radius: 16px; }
.photo-fill { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(11,7,6,.94) 0%, rgba(11,7,6,.55) 38%, rgba(11,7,6,.15) 70%, rgba(11,7,6,.35) 100%); }

/* tab bar */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 440px; height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); display: flex; background: linear-gradient(180deg, #170c09f2, #0B0706); border-top: 1px solid var(--gold); z-index: 20; }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 48px; color: var(--muted); text-decoration: none; font: 600 12px/16px var(--sans); letter-spacing: .06em; position: relative; }
.tabbar a[aria-current="page"] { color: var(--gold-hi); }
.tabbar a[aria-current="page"]::before { content: ""; position: absolute; top: -1px; left: 28%; right: 28%; height: 2px; background: var(--gold-hi); }
@media (min-width: 900px) { .tabbar { left: 0; transform: none; max-width: none; } }

.banners p { background: var(--velvet); color: var(--text); padding: 8px var(--pad); font-size: 13px; line-height: 18px; border-bottom: 1px solid var(--gold); }
.toast { position: absolute; left: 50%; bottom: calc(var(--tab-h) + 20px + env(safe-area-inset-bottom)); transform: translate(-50%, 8px); background: #120a07; border: 1px solid var(--gold); color: var(--text); padding: 10px 16px; border-radius: 12px; opacity: 0; pointer-events: none; transition: opacity .25s ease-out, transform .25s ease-out; z-index: 30; max-width: 86%; text-align: center; font-size: 14px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.screen { animation: fade .28s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
