/* Born Into: Art Deco, phone-first. */
:root {
  --gold: #c9a227; --gold2: #e8c766; --gold3: #8a6d14; --black: #0e0d0b; --ink: #17150f; --ink2: #221f17;
  --cream: #f3e9d2; --cream2: #e6d7b5; --paper: #efe4c8; --burgundy: #7a1f2b; --teal: #1c3d5a; --green: #2e6b4f; --rust: #c46b2f;
  --display: 'Limelight', 'Playfair Display', Georgia, serif; --deco: 'Poiret One', 'Josefin Sans', sans-serif;
  --news: 'Playfair Display', Georgia, serif; --body: 'Josefin Sans', system-ui, sans-serif;
  --r: 14px; --shadow: 0 10px 30px rgba(0,0,0,.45);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--black); color: var(--cream); font-family: var(--body); }
body {
  background:
    radial-gradient(ellipse at 50% -20%, rgba(201,162,39,.18), transparent 60%),
    repeating-linear-gradient(90deg, rgba(201,162,39,.035) 0 2px, transparent 2px 46px),
    var(--black);
  min-height: 100dvh; overscroll-behavior: none;
}
button { font-family: inherit; cursor: pointer; }
#app { max-width: 480px; margin: 0 auto; min-height: 100dvh; position: relative; overflow-x: hidden; background: linear-gradient(180deg, #14120d, #0e0d0b 40%); box-shadow: 0 0 0 1px rgba(201,162,39,.15), 0 0 80px rgba(0,0,0,.8); }
.boot { display: grid; place-items: center; height: 100dvh; }
.boot-mark { font-family: var(--display); color: var(--gold); font-size: 42px; letter-spacing: 6px; animation: pulse 1.2s infinite alternate; }
@keyframes pulse { from { opacity: .4 } to { opacity: 1 } }

/* deco ornaments */
.sunburst { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.sunburst::before { content: ''; position: absolute; left: 50%; top: 38%; width: 1400px; height: 1400px; transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg, rgba(201,162,39,.10) 0deg 4deg, transparent 4deg 12deg); animation: spin 120s linear infinite; mask: radial-gradient(circle, #000 10%, transparent 55%); -webkit-mask: radial-gradient(circle, #000 10%, transparent 55%); }
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.deco-rule { height: 14px; margin: 14px auto; width: 80%; background:
  linear-gradient(var(--gold), var(--gold)) center/100% 1px no-repeat,
  radial-gradient(circle, var(--gold) 3px, transparent 4px) center/14px 14px no-repeat; opacity: .8; }
.deco-frame { position: relative; border: 1px solid rgba(201,162,39,.55); border-radius: var(--r); background: linear-gradient(180deg, rgba(34,31,23,.92), rgba(18,16,12,.95)); box-shadow: inset 0 0 0 4px rgba(14,13,11,1), inset 0 0 0 5px rgba(201,162,39,.25), var(--shadow); }
.deco-frame::before, .deco-frame::after { content: ''; position: absolute; width: 18px; height: 18px; border: 2px solid var(--gold); }
.deco-frame::before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.deco-frame::after { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 14px 22px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; font-size: 14px; transition: transform .15s, box-shadow .2s, filter .2s; }
.btn:active { transform: scale(.97); }
.btn-gold { color: #1a1406; background: linear-gradient(180deg, #f3d77a, #c9a227 55%, #9f7d16); box-shadow: 0 6px 0 #6b520c, 0 10px 24px rgba(201,162,39,.35); }
.btn-gold:active { box-shadow: 0 2px 0 #6b520c; transform: translateY(4px); }
.btn-ghost { background: transparent; color: var(--gold2); border: 1px solid rgba(201,162,39,.6); }
.btn-block { width: 100%; }
.btn[disabled] { filter: grayscale(.8) brightness(.6); pointer-events: none; }

/* title */
.screen { position: relative; min-height: 100dvh; padding: 24px 20px 40px; animation: fadeIn .5s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }
.title-wrap { position: relative; z-index: 1; text-align: center; padding-top: 9vh; }
.title-kicker { font-family: var(--deco); letter-spacing: 6px; color: var(--gold2); font-size: 14px; text-transform: uppercase; }
.title-logo { font-family: var(--display); font-size: clamp(54px, 17vw, 84px); line-height: .95; margin: 14px 0 6px; color: transparent;
  background: linear-gradient(180deg, #fff3c4 0%, #e8c766 35%, #c9a227 55%, #8a6d14 100%); -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 3px 0 #3d2f07) drop-shadow(0 0 22px rgba(201,162,39,.35)); letter-spacing: 3px; }
.title-era { font-family: var(--deco); font-size: 24px; color: var(--cream); letter-spacing: 3px; }
.title-sub { color: var(--cream2); opacity: .8; font-size: 13px; letter-spacing: 3px; text-transform: uppercase; margin-top: 6px; }
.title-tag { font-family: var(--news); font-style: italic; font-size: 19px; color: var(--cream); margin: 26px 10px; }
.title-actions { display: grid; gap: 14px; margin: 26px auto 0; max-width: 320px; }
.rating { margin: 26px auto 0; max-width: 340px; font-size: 12px; line-height: 1.5; color: var(--cream2); opacity: .85; border: 1px solid rgba(201,162,39,.35); border-radius: 10px; padding: 10px 12px; }
.rating b { color: var(--gold2); }
.footer { position: relative; z-index: 1; text-align: center; font-size: 11px; color: rgba(243,233,210,.55); margin-top: 34px; line-height: 1.6; padding: 0 10px; }
.footer a, .linkish { color: var(--gold2); text-decoration: underline; background: none; border: 0; font-size: inherit; padding: 0; }

/* wheel */
.wheel-head { text-align: center; position: relative; z-index: 1; }
.wheel-head h2 { font-family: var(--display); color: var(--gold2); font-size: 30px; margin: 6px 0 2px; letter-spacing: 2px; }
.wheel-head p { margin: 0; color: var(--cream2); font-size: 14px; opacity: .8; }
.wheel-stage { position: relative; width: min(88vw, 400px); aspect-ratio: 1; margin: 18px auto 10px; z-index: 1; }
.wheel-stage svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 12px 30px rgba(0,0,0,.6)); }
.wheel-pointer { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 18px solid transparent; border-right: 18px solid transparent; border-top: 34px solid var(--gold2); filter: drop-shadow(0 3px 2px rgba(0,0,0,.6)); z-index: 3; }
.wheel-pointer.tick { animation: tick .09s ease; }
@keyframes tick { 50% { transform: translateX(-50%) rotate(-14deg); } }
.wheel-hub { position: absolute; inset: 39%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3c4, #c9a227 45%, #6b520c); box-shadow: 0 0 0 4px #0e0d0b, 0 0 0 6px var(--gold), 0 6px 18px rgba(0,0,0,.6); display: grid; place-items: center; font-family: var(--display); color: #2a1f05; font-size: 15px; letter-spacing: 1px; text-align: center; line-height: 1; z-index: 2; border: 0; }
.wheel-hub:disabled { cursor: default; }
.wheel-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: 12px; color: var(--cream2); max-width: 400px; margin: 6px auto 0; position: relative; z-index: 1; }
.wheel-legend span { display: flex; align-items: center; gap: 6px; }
.wheel-legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

.result { margin-top: 14px; padding: 22px 18px 18px; animation: rise .6s cubic-bezier(.2,.9,.2,1.15); position: relative; z-index: 1; }
@keyframes rise { from { opacity: 0; transform: translateY(40px) scale(.96) } to { opacity: 1; transform: none } }
.result-kicker { font-family: var(--deco); letter-spacing: 4px; font-size: 12px; color: var(--gold2); text-transform: uppercase; text-align: center; }
.result h3 { font-family: var(--display); font-size: 30px; text-align: center; margin: 6px 0 2px; color: var(--cream); }
.result .odds { text-align: center; font-size: 12px; color: var(--gold2); letter-spacing: 2px; }
.result p { font-size: 14px; line-height: 1.55; color: var(--cream2); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 13px; margin: 12px 0; }
.kv dt { color: var(--gold2); text-transform: uppercase; letter-spacing: 1px; font-size: 11px; padding-top: 2px; }
.kv dd { margin: 0; color: var(--cream); }
.form-row { display: flex; gap: 8px; margin: 10px 0; }
.input { flex: 1; min-width: 0; background: #0b0a08; border: 1px solid rgba(201,162,39,.45); color: var(--cream); border-radius: 10px; padding: 12px 12px; font-size: 16px; font-family: var(--body); }
.input:focus { outline: 2px solid var(--gold); }
.seg { display: flex; border: 1px solid rgba(201,162,39,.45); border-radius: 10px; overflow: hidden; }
.seg button { flex: 1; background: transparent; color: var(--cream2); border: 0; padding: 10px; font-weight: 600; }
.seg button.on { background: var(--gold); color: #1a1406; }
.iconbtn { background: #0b0a08; border: 1px solid rgba(201,162,39,.45); color: var(--gold2); border-radius: 10px; width: 46px; font-size: 18px; }

/* art placeholders (AI image hooks) */
.art { position: relative; margin: 0; border-radius: 12px; overflow: hidden; height: 150px; display: grid; place-items: center; isolation: isolate;
  background: linear-gradient(180deg, var(--a1, #2a2418), var(--a2, #0e0d0b)); border: 1px solid rgba(201,162,39,.35); }
.art::before { content: ''; position: absolute; inset: -40%; background: repeating-conic-gradient(from 0deg at 50% 100%, rgba(232,199,102,.13) 0 5deg, transparent 5deg 14deg); z-index: -1; }
.art::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 38%; background: linear-gradient(180deg, transparent, rgba(0,0,0,.55)); z-index: -1; }
.art .art-emoji { font-size: 64px; filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)); animation: floaty 4s ease-in-out infinite; }
.art .art-cap { position: absolute; bottom: 8px; left: 10px; right: 10px; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: rgba(243,233,210,.6); text-align: center; }
@keyframes floaty { 50% { transform: translateY(-6px) } }
.art.sm { height: 96px; } .art.sm .art-emoji { font-size: 44px; }

/* game screen */
.game { padding: 0 0 270px; }
.topbar { position: sticky; top: 0; z-index: 20; padding: 12px 16px 10px; background: linear-gradient(180deg, rgba(14,13,11,.98), rgba(14,13,11,.92)); border-bottom: 1px solid rgba(201,162,39,.3); backdrop-filter: blur(6px); }
.tb-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tb-year { font-family: var(--display); font-size: 34px; line-height: 1; color: var(--gold2); letter-spacing: 1px; }
.tb-who { text-align: right; font-size: 13px; line-height: 1.3; min-width: 0; }
.tb-who b { font-size: 15px; color: var(--cream); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-who span { color: var(--cream2); opacity: .8; }
.tb-icons { display: flex; gap: 6px; }
.tb-icons button { background: transparent; border: 1px solid rgba(201,162,39,.35); color: var(--gold2); width: 34px; height: 34px; border-radius: 50%; font-size: 15px; }
.money-row { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.money-row::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; background: #0b0a08; border: 1px solid rgba(201,162,39,.35); border-radius: 999px; padding: 5px 10px; font-size: 12px; white-space: nowrap; }
.chip b { color: var(--gold2); font-weight: 700; }
.chip.warn { border-color: #b0453b; } .chip.warn b { color: #ff8f7f; }
.bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.bar { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--cream2); }
.bar .track { height: 7px; border-radius: 4px; background: #2a261c; overflow: hidden; margin-top: 3px; }
.bar .fill { height: 100%; border-radius: 4px; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.bar.health .fill { background: linear-gradient(90deg, #3f9b6b, #6fd39b); }
.bar.happy .fill { background: linear-gradient(90deg, #c9a227, #f3d77a); }
.bar.rep .fill { background: linear-gradient(90deg, #3d6d9a, #79b3e6); }
.bar.heat .fill { background: linear-gradient(90deg, #b0453b, #ff7a5c); }
.bar .num { float: right; color: var(--cream); }

.section { padding: 14px 16px 0; }
.narrator { padding: 16px; }
.narrator .era-line { font-family: var(--deco); font-size: 12px; letter-spacing: 3px; color: var(--gold2); text-transform: uppercase; }
.narrator p { font-family: var(--news); font-size: 17px; line-height: 1.55; margin: 8px 0 0; color: var(--cream); }
.narrator .sub { font-family: var(--body); font-size: 13px; color: var(--cream2); opacity: .85; margin-top: 8px; }
.sugs { display: flex; flex-wrap: wrap; gap: 8px; }
.sug { background: rgba(201,162,39,.1); border: 1px solid rgba(201,162,39,.5); color: var(--cream); border-radius: 999px; padding: 9px 13px; font-size: 13px; transition: background .2s, transform .15s; }
.sug:hover { background: rgba(201,162,39,.22); } .sug:active { transform: scale(.96); }
.h-label { font-family: var(--deco); letter-spacing: 3px; text-transform: uppercase; font-size: 12px; color: var(--gold2); margin: 0 0 8px; display: flex; justify-content: space-between; align-items: center; }
.typebox { display: flex; gap: 8px; }
.typebox .input { font-family: var(--news); font-style: italic; }
.typebox button { flex: 0 0 auto; }
.log { list-style: none; margin: 0; padding: 0; }
.log li { padding: 10px 0 10px 14px; border-left: 2px solid rgba(201,162,39,.35); position: relative; font-size: 14px; line-height: 1.45; color: var(--cream2); animation: fadeIn .4s; }
.log li::before { content: ''; position: absolute; left: -5px; top: 15px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.log li b { color: var(--gold2); font-weight: 600; margin-right: 6px; }
.log li.history::before { background: #ff7a5c; } .log li.people::before { background: #79b3e6; } .log li.year::before { background: var(--cream); }

/* dock */
.dock { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; z-index: 30; padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(14,13,11,0), rgba(14,13,11,.96) 22%); }
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.tab { background: #17150f; border: 1px solid rgba(201,162,39,.35); color: var(--cream); border-radius: 12px; padding: 8px 2px 7px; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; display: grid; gap: 2px; justify-items: center; transition: background .2s, transform .15s; }
.tab span { font-size: 20px; } .tab:active { transform: scale(.95); } .tab:hover { background: #221f17; }
.live { display: flex; gap: 10px; align-items: center; }
.live .btn { flex: 1; font-size: 16px; padding: 16px; }
.pips { display: flex; gap: 4px; align-items: center; font-size: 10px; color: var(--cream2); letter-spacing: 1px; flex-direction: column; }
.pips .row { display: flex; gap: 4px; }
.pip { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--gold); }
.pip.on { background: var(--gold2); box-shadow: 0 0 8px rgba(232,199,102,.7); }

/* sheets and modals */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(5,4,3,.72); backdrop-filter: blur(3px); display: flex; align-items: flex-end; justify-content: center; animation: fadeOnly .25s; }
@keyframes fadeOnly { from { opacity: 0 } }
.overlay.center { align-items: center; padding: 14px; }
.sheet { width: 100%; max-width: 480px; max-height: 84dvh; overflow-y: auto; background: #15130e; border-top: 2px solid var(--gold); border-radius: 22px 22px 0 0; padding: 8px 16px 26px; animation: slideUp .35s cubic-bezier(.2,.9,.2,1); }
@keyframes slideUp { from { transform: translateY(100%) } }
.sheet-grip { width: 44px; height: 5px; border-radius: 3px; background: rgba(201,162,39,.5); margin: 6px auto 12px; }
.sheet h3 { font-family: var(--display); color: var(--gold2); margin: 0 0 4px; font-size: 24px; letter-spacing: 1px; }
.sheet .hint { font-size: 12px; color: var(--cream2); opacity: .75; margin-bottom: 12px; }
.act { width: 100%; text-align: left; display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; background: #1d1a13; border: 1px solid rgba(201,162,39,.25); border-radius: 12px; padding: 11px 12px; margin-bottom: 8px; color: var(--cream); transition: border-color .2s, transform .12s, background .2s; }
.act:hover { border-color: var(--gold); background: #231f16; } .act:active { transform: scale(.98); }
.act .ae { font-size: 26px; text-align: center; }
.act .al { font-weight: 600; font-size: 14px; line-height: 1.3; }
.act .ad { font-size: 12px; color: var(--cream2); opacity: .75; margin-top: 2px; line-height: 1.35; }
.act .ac { font-size: 11px; color: var(--gold2); text-align: right; white-space: nowrap; }
.act.off { opacity: .45; }
.act.off .ad.reason { color: #ff9b8a; opacity: 1; }
.subhead { font-family: var(--deco); letter-spacing: 3px; font-size: 11px; color: var(--gold2); text-transform: uppercase; margin: 16px 0 8px; }

.person { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 12px; padding: 12px; border-radius: 14px; background: #1d1a13; border: 1px solid rgba(201,162,39,.25); margin-bottom: 10px; }
.portrait { position: relative; flex: none; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; overflow: hidden; background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.18), transparent 60%), var(--pc, #333); box-shadow: 0 0 0 2px #0e0d0b, 0 0 0 3px var(--gold); }
.portrait.lg { width: 84px; height: 84px; font-size: 44px; margin: 0 auto; }
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; opacity: 0; transition: opacity .5s ease, transform .6s ease; }
.portrait.loaded img { opacity: 1; }
.portrait.has-img.loaded .emo { opacity: 0; }
/* People cards: 3:4 deco frame */
.portrait.card { width: 76px; height: 101px; border-radius: 14px; font-size: 34px; box-shadow: 0 0 0 2px #0e0d0b, 0 0 0 3.5px var(--gold), 0 0 0 6px #0e0d0b, 0 0 0 7px rgba(201,162,39,.55), 0 8px 18px rgba(0,0,0,.55); }
.portrait.card::after, .portrait.hero::after { content: ''; position: absolute; inset: 4px; border: 1px solid rgba(232,199,102,.55); border-radius: inherit; pointer-events: none; z-index: 2; }
.portrait.card::before, .portrait.hero::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(0,0,0,0) 62%, rgba(10,8,5,.55)); }
/* Story and meet cards: arched Art Deco hero */
.portrait.hero { width: 176px; height: 234px; border-radius: 88px 88px 16px 16px; font-size: 70px; margin: 4px auto 14px; box-shadow: 0 0 0 3px #0e0d0b, 0 0 0 5px var(--gold), 0 0 0 9px #0e0d0b, 0 0 0 10px rgba(201,162,39,.6), 0 14px 34px rgba(0,0,0,.6), 0 0 40px rgba(201,162,39,.18); }
.portrait.hero.loaded img { animation: heroIn 1.1s ease; }
@keyframes heroIn { from { transform: scale(1.08); filter: brightness(.6); } to { transform: scale(1); filter: none; } }
.char-card h2 { margin-top: 6px; }
/* Log avatars */
.portrait.av { width: 34px; height: 34px; font-size: 17px; box-shadow: 0 0 0 1.5px #0e0d0b, 0 0 0 2.5px var(--gold); }
.log li.has-av { display: flex; gap: 10px; align-items: flex-start; }
.log li.has-av .portrait { margin-top: 1px; }
.person .pn { font-weight: 700; } .person .pr { font-size: 12px; color: var(--cream2); opacity: .8; }
.relbar { height: 6px; border-radius: 3px; background: #2a261c; margin: 7px 0 4px; position: relative; overflow: hidden; }
.relbar i { position: absolute; top: 0; bottom: 0; left: 50%; }
.relbar i.pos { background: linear-gradient(90deg, #c9a227, #6fd39b); } .relbar i.neg { background: linear-gradient(270deg, #b0453b, #ff7a5c); }
.memory { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.memory span { font-size: 10px; letter-spacing: .5px; padding: 2px 7px; border-radius: 999px; background: rgba(121,179,230,.12); border: 1px solid rgba(121,179,230,.35); color: #bcdcff; }
.person .pacts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mini { font-size: 12px; padding: 7px 10px; border-radius: 999px; background: rgba(201,162,39,.1); border: 1px solid rgba(201,162,39,.45); color: var(--cream); }
.mini[disabled] { opacity: .4; }

.card { width: 100%; max-width: 440px; max-height: 92dvh; overflow-y: auto; padding: 20px 18px 18px; animation: pop .45s cubic-bezier(.2,.9,.25,1.2); }
@keyframes pop { from { opacity: 0; transform: scale(.9) translateY(20px) } }
.card h2 { font-family: var(--display); color: var(--gold2); font-size: 26px; text-align: center; margin: 10px 0 4px; letter-spacing: 1px; line-height: 1.1; }
.card .csub { text-align: center; font-size: 12px; letter-spacing: 1.5px; color: var(--cream2); opacity: .8; text-transform: uppercase; }
.card .ctext { font-family: var(--news); font-size: 17px; line-height: 1.55; margin: 14px 0; color: var(--cream); }
.choices { display: grid; gap: 9px; margin-top: 12px; }
.choice { text-align: left; background: #1d1a13; border: 1px solid rgba(201,162,39,.5); color: var(--cream); padding: 13px 14px; border-radius: 12px; font-size: 15px; font-weight: 600; transition: background .2s, transform .12s, border-color .2s; }
.choice:hover { background: #29241a; border-color: var(--gold2); } .choice:active { transform: scale(.98); }
.choice::before { content: '◆'; color: var(--gold); margin-right: 8px; font-size: 11px; vertical-align: 2px; }
.outcome { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(201,162,39,.08); border-left: 3px solid var(--gold); font-size: 15px; line-height: 1.5; animation: fadeIn .4s; }
.deltas { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.delta { font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: #0b0a08; border: 1px solid rgba(255,255,255,.12); animation: popIn .4s cubic-bezier(.2,.9,.25,1.4) both; }
.delta.up { color: #7ee2a8; border-color: rgba(126,226,168,.4); } .delta.down { color: #ff8f7f; border-color: rgba(255,143,127,.4); }
@keyframes popIn { from { opacity: 0; transform: scale(.5) } }

/* newspaper history card */
.news { background: var(--paper); color: #1d1a14; border-radius: 6px; padding: 16px 16px 14px; box-shadow: 0 20px 50px rgba(0,0,0,.6); position: relative; width: 100%; max-width: 440px; max-height: 92dvh; overflow-y: auto; animation: spinIn .7s cubic-bezier(.2,.9,.3,1.1); background-image: radial-gradient(rgba(0,0,0,.05) 1px, transparent 1px); background-size: 4px 4px; }
@keyframes spinIn { from { opacity: 0; transform: rotate(-14deg) scale(.4) } }
.news .mast { text-align: center; border-bottom: 3px double #1d1a14; padding-bottom: 6px; }
.news .mast .extra { font-family: var(--news); font-weight: 900; font-size: 13px; letter-spacing: 5px; color: var(--burgundy); }
.news .mast .name { font-family: var(--news); font-weight: 900; font-size: 30px; letter-spacing: 1px; line-height: 1; margin-top: 2px; }
.news .dateline { display: flex; justify-content: space-between; font-size: 11px; font-family: var(--news); border-bottom: 1px solid #1d1a14; padding: 4px 0; text-transform: uppercase; letter-spacing: 1px; }
.news .headline { font-family: var(--news); font-weight: 900; font-size: 27px; line-height: 1.05; text-align: center; margin: 12px 0 8px; text-transform: uppercase; }
.news .hits { font-family: var(--news); font-size: 15px; line-height: 1.5; columns: 1; }
.news .wrh { margin-top: 12px; border: 2px solid #1d1a14; padding: 10px 12px; background: rgba(255,255,255,.35); }
.news .wrh h4 { margin: 0 0 6px; font-family: var(--body); font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: var(--burgundy); }
.news .wrh p { margin: 0; font-family: var(--news); font-size: 14.5px; line-height: 1.5; }
.news .choice { background: #1d1a14; color: var(--cream); border-color: #1d1a14; }
.news .choice:hover { background: #2d281f; }
.news .outcome { background: rgba(29,26,20,.08); border-left-color: var(--burgundy); color: #1d1a14; }
.news .delta { background: #1d1a14; }
.news .art { border-color: #1d1a14; height: 120px; filter: sepia(.5) contrast(1.05); }

/* summary ledger */
.ledger { list-style: none; padding: 0; margin: 12px 0; }
.ledger li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed rgba(201,162,39,.25); font-size: 14px; }
.ledger li:first-child { font-weight: 700; color: var(--gold2); }

/* fade to black */
.fade { position: fixed; inset: 0; z-index: 80; background: #000; display: grid; place-items: center; padding: 30px; animation: fadeOnly 1.2s; text-align: center; }
.fade .q { font-family: var(--news); font-style: italic; font-size: 19px; line-height: 1.6; color: var(--cream); max-width: 380px; opacity: 0; animation: fadeIn 1s .6s forwards; }
.fade .sfx { margin-top: 30px; display: inline-block; font-family: var(--display); font-size: 30px; color: #1a1406; background: var(--gold2); padding: 14px 20px; border: 4px solid #fff3c4; border-radius: 8px; transform: rotate(-4deg) scale(0); box-shadow: 8px 8px 0 var(--burgundy); }
.fade .sfx.slam { animation: slam .5s cubic-bezier(.2,1.6,.4,1) forwards; }
@keyframes slam { 0% { transform: rotate(-20deg) scale(3); opacity: 0 } 100% { transform: rotate(-4deg) scale(1); opacity: 1 } }
.fade .after { margin-top: 26px; font-size: 14px; color: var(--cream2); max-width: 360px; opacity: 0; line-height: 1.5; }
.fade .after.show { animation: fadeIn .8s forwards; }
.fade .btn { margin-top: 24px; opacity: 0; } .fade .btn.show { animation: fadeIn .6s forwards; }

/* toast */
.toast { position: fixed; top: 120px; left: 50%; transform: translateX(-50%); z-index: 90; background: #1d1a13; border: 1px solid var(--gold); color: var(--cream); padding: 10px 16px; border-radius: 999px; font-size: 13px; box-shadow: var(--shadow); animation: toast 2.6s forwards; max-width: 90vw; text-align: center; }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, -10px) } 10%, 85% { opacity: 1; transform: translate(-50%, 0) } 100% { opacity: 0 } }

/* ending */
.ending { padding: 20px 14px 40px; }
.front { background: var(--paper); color: #1d1a14; padding: 16px; border-radius: 4px; box-shadow: 0 20px 50px rgba(0,0,0,.6); background-image: radial-gradient(rgba(0,0,0,.05) 1px, transparent 1px); background-size: 4px 4px; animation: spinIn .9s cubic-bezier(.2,.9,.3,1.1); }
.front .mast .name { font-size: 34px; }
.front .headline { font-size: 26px; }
.front .front-sub { font-family: var(--news); font-style: italic; text-align: center; font-size: 14px; border-bottom: 1px solid #1d1a14; padding-bottom: 10px; }
.front .obit { font-family: var(--news); font-size: 14.5px; line-height: 1.55; column-count: 1; margin-top: 10px; }
.front .obit p { margin: 0 0 8px; text-indent: 1em; }
.front .obit p:first-child::first-letter { font-size: 42px; float: left; line-height: .8; margin: 4px 6px 0 0; font-weight: 900; }
.scorebox { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; font-size: 13px; margin-top: 10px; border-top: 3px double #1d1a14; padding-top: 10px; }
.scorebox div { display: flex; justify-content: space-between; }
.scorebox .total { grid-column: 1 / -1; font-family: var(--news); font-weight: 900; font-size: 20px; border-top: 1px solid #1d1a14; padding-top: 6px; }
.sharecard { margin: 22px auto 0; width: 270px; aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden; position: relative; padding: 22px 18px; display: flex; flex-direction: column; justify-content: space-between; text-align: center;
  background: radial-gradient(ellipse at 50% 30%, #2a2418, #0e0d0b 70%); border: 2px solid var(--gold); box-shadow: 0 20px 50px rgba(0,0,0,.7), inset 0 0 0 6px #0e0d0b, inset 0 0 0 7px rgba(201,162,39,.4); }
.sharecard .sc-logo { font-family: var(--display); color: var(--gold2); font-size: 28px; letter-spacing: 2px; }
.sharecard .sc-era { font-family: var(--deco); font-size: 12px; letter-spacing: 3px; color: var(--cream2); }
.sharecard .sc-emoji { font-size: 58px; }
.sharecard .sc-head { font-family: var(--news); font-weight: 900; font-size: 16px; line-height: 1.15; color: var(--cream); }
.sharecard .sc-score { font-family: var(--display); font-size: 40px; color: var(--gold2); line-height: 1; }
.sharecard .sc-small { font-size: 11px; color: var(--cream2); line-height: 1.4; }
.sharecard .sc-foot { font-family: var(--deco); font-size: 11px; color: var(--gold2); letter-spacing: 1px; }
.end-actions { display: grid; gap: 10px; max-width: 320px; margin: 20px auto 0; }

.about { font-size: 14px; line-height: 1.6; color: var(--cream2); }
.about h4 { color: var(--gold2); font-family: var(--deco); letter-spacing: 2px; text-transform: uppercase; margin: 16px 0 4px; }
@media (min-width: 520px) { #app { margin-top: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
