:root { --gold: #d6aa5a; --gold2: #f0d08a; --ink: #120c08; --cream: #efe4cc; --red: #c8442e; --deco: 'Limelight', Georgia, serif; --paper: 'Old Standard TT', Georgia, serif; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--ink); color: var(--cream); overflow: hidden; font-family: Georgia, serif; touch-action: none; user-select: none; -webkit-user-select: none; }
#game { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }
#ui { position: fixed; inset: 0; pointer-events: none; }
#ui > * { pointer-events: auto; }
#ui.play { pointer-events: none; }
#ui.play > * { pointer-events: none; }
#ui.play button, #ui.play .crewCard, #ui.play .pauseBox { pointer-events: auto; }
button { font-family: var(--deco); color: var(--ink); background: linear-gradient(#f0d08a, #c8963e); border: 2px solid #3a2410; border-radius: 4px; padding: 10px 18px; font-size: 18px; letter-spacing: 1px; cursor: pointer; box-shadow: 0 3px 0 #3a2410, 0 0 0 1px rgba(255, 220, 150, 0.4) inset; }
button:active { transform: translateY(2px); box-shadow: 0 1px 0 #3a2410; }
button:disabled { opacity: 0.4; }
button small { display: block; font-family: Georgia, serif; font-size: 11px; letter-spacing: 0; opacity: 0.8; }
button.big { font-size: 22px; padding: 12px 26px; margin: 10px auto 4px; display: block; }
button.small { font-size: 14px; padding: 6px 12px; margin: 6px auto; display: block; background: linear-gradient(#5a4430, #3a2a1c); color: var(--gold2); border-color: #1a1008; }

/* ---- screens */
.screen { position: fixed; inset: 0; overflow-y: auto; overflow-x: hidden; touch-action: pan-y; background: radial-gradient(ellipse at 50% 20%, #3a2618 0%, #1a100a 55%, #0a0604 100%); padding: 14px 14px 30px; }
.screen::before { content: ''; position: fixed; inset: 0; pointer-events: none; background: repeating-conic-gradient(from 0deg at 50% 105%, rgba(214, 170, 90, 0.06) 0deg 4deg, transparent 4deg 12deg); }
.title { display: flex; align-items: center; justify-content: center; }
.titlebox { text-align: center; max-width: 420px; position: relative; }
.titlebox h1 { font-family: var(--deco); font-size: 64px; margin: 6px 0; color: var(--gold2); letter-spacing: 6px; text-shadow: 0 0 18px rgba(255, 190, 90, 0.45), 0 3px 0 #3a2410; }
.deco { font-family: var(--deco); color: var(--gold); letter-spacing: 3px; font-size: 14px; }
.sub { font-style: italic; color: #d8c8a8; margin-bottom: 20px; }
.how { margin-top: 22px; font-size: 14px; line-height: 1.6; color: #c8b898; border-top: 1px solid rgba(214, 170, 90, 0.35); padding-top: 12px; }

.mapTop { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--deco); color: var(--gold2); font-size: 20px; position: relative; gap: 8px; }
.mapTop .turf { font-size: 13px; color: #c8b898; font-family: Georgia, serif; }
.mapWrap { position: relative; margin: 10px auto; width: 100%; max-width: 520px; aspect-ratio: 1 / 0.93; border: 2px solid var(--gold); box-shadow: 0 0 0 4px #1a1008, 0 0 0 5px rgba(214, 170, 90, 0.4); }
.cityMap { width: 100%; height: 100%; display: block; }
.offers { display: flex; flex-direction: column; gap: 8px; max-width: 520px; margin: 0 auto; position: relative; }
.offer { background: linear-gradient(#2e2016, #1e140c); border: 1px solid rgba(214, 170, 90, 0.4); border-radius: 4px; padding: 9px 12px; cursor: pointer; }
.offer.sel { border-color: var(--gold2); box-shadow: 0 0 12px rgba(240, 200, 120, 0.25); }
.offer.urgent .oname { color: #ff8a6a; }
.oname { font-family: var(--deco); color: var(--gold2); font-size: 18px; }
.oward { font-size: 12px; color: #b8a888; font-style: italic; }
.oblurb { font-size: 14px; margin-top: 3px; line-height: 1.35; }
.ometa { display: flex; justify-content: space-between; margin-top: 4px; font-size: 14px; }
.ometa .pay { color: #a8e08a; }
.ometa .heat { color: #ff8a6a; letter-spacing: 2px; }
button.corner { position: fixed; top: 10px; right: 10px; font-size: 13px; padding: 6px 10px; z-index: 2; display: none; }

.brief { position: fixed; left: 0; right: 0; bottom: 0; background: linear-gradient(#2a1c12, #120c08); border-top: 2px solid var(--gold); padding: 12px 14px 18px; z-index: 3; box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.7); }
.bname { font-family: var(--deco); color: var(--gold2); font-size: 20px; text-align: center; margin: 4px 0 6px; }
.bsub { text-align: center; font-size: 13px; color: #c8b898; margin: 6px 0; }
.crewPick { display: flex; gap: 8px; overflow-x: auto; justify-content: center; flex-wrap: wrap; padding: 4px; }
.pick { width: 72px; text-align: center; opacity: 0.45; border: 2px solid transparent; border-radius: 6px; padding: 4px 2px; cursor: pointer; }
.pick.on { opacity: 1; border-color: var(--gold2); background: rgba(214, 170, 90, 0.12); }
.pick.out { opacity: 0.25; }
.pick .face { border-radius: 4px; border: 1px solid #3a2410; }
.pn { font-family: var(--deco); font-size: 13px; color: var(--gold2); }
.pr { font-size: 10px; color: #b8a888; }

/* ---- the job */
.hudTop { position: fixed; top: 0; left: 0; right: 0; display: flex; align-items: flex-start; gap: 8px; padding: max(8px, env(safe-area-inset-top)) 10px 0; }
.msg { flex: 1; text-align: center; font-family: var(--deco); color: var(--gold2); font-size: 17px; text-shadow: 0 2px 4px #000, 0 0 10px #000; letter-spacing: 0.5px; padding-top: 4px; }
.cases { min-width: 54px; font-family: var(--deco); color: #e8c890; font-size: 14px; text-shadow: 0 2px 3px #000; padding-top: 6px; }
.heat { display: flex; gap: 3px; padding-top: 6px; }
.heat i { width: 12px; height: 14px; display: block; background: rgba(255, 255, 255, 0.12); clip-path: polygon(50% 0, 100% 20%, 90% 75%, 50% 100%, 10% 75%, 0 20%); }
.heat i.on { background: #6a9aff; }
.heat i.on.seen { background: #ff5a4a; animation: blink 0.5s steps(2) infinite; }
@keyframes blink { 50% { background: #6a9aff; } }
.pauseBtn { pointer-events: auto; font-size: 12px; padding: 4px 8px; background: rgba(30, 20, 12, 0.7); color: var(--gold2); border-color: rgba(214, 170, 90, 0.5); box-shadow: none; margin-top: 2px; }
.crewBar { position: fixed; left: 8px; bottom: max(10px, env(safe-area-inset-bottom)); display: flex; gap: 7px; }
.crewCard { position: relative; width: 56px; text-align: center; pointer-events: auto; cursor: pointer; }
.crewCard .face { border-radius: 50%; border: 2px solid #3a2410; display: block; margin: 5px auto 0; position: relative; z-index: 1; }
.crewCard .ring { position: absolute; left: 50%; top: 0; width: 56px; height: 56px; margin-left: -28px; border-radius: 50%; background: conic-gradient(var(--gold2) var(--c, 0%), rgba(0, 0, 0, 0.5) 0); }
.crewCard.ready .ring { background: var(--gold2); box-shadow: 0 0 16px 4px rgba(255, 200, 100, 0.8); animation: pulse 0.8s ease-in-out infinite alternate; }
@keyframes pulse { to { box-shadow: 0 0 6px 1px rgba(255, 200, 100, 0.5); } }
.crewCard.down .face { filter: grayscale(1) brightness(0.5) sepia(1) hue-rotate(-30deg) saturate(3); }
.crewCard.panic .face { animation: shake 0.15s infinite; }
@keyframes shake { 50% { transform: translateX(2px); } }
.crewCard .hp { height: 4px; background: rgba(0, 0, 0, 0.6); margin: 3px 4px 0; border-radius: 2px; overflow: hidden; }
.crewCard .hp i { display: block; height: 100%; background: #8ad06a; }
.crewCard .cn { font-family: var(--deco); font-size: 11px; color: var(--gold2); text-shadow: 0 1px 2px #000; }
.crewCard .mv { font-size: 9px; color: #e8d8b8; text-shadow: 0 1px 2px #000; opacity: 0; }
.crewCard.ready .mv { opacity: 1; }
.carBtn { position: fixed; right: 12px; bottom: max(16px, env(safe-area-inset-bottom)); width: 86px; height: 86px; border-radius: 50%; font-size: 15px; padding: 0; pointer-events: auto; }
.ammo { position: fixed; right: 16px; bottom: max(112px, calc(env(safe-area-inset-bottom) + 100px)); font-family: var(--deco); font-size: 13px; color: #e8c890; text-shadow: 0 1px 3px #000; }
.bubbles { position: fixed; inset: 0; pointer-events: none; }
.bubble { position: fixed; max-width: 230px; background: rgba(239, 228, 204, 0.95); color: #1a120a; font-size: 14px; line-height: 1.3; padding: 6px 10px; border-radius: 10px; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.6); animation: pop 0.15s ease-out; }
.bubble b { font-family: var(--deco); color: #7a3a1a; font-weight: normal; margin-right: 4px; }
@keyframes pop { from { transform: scale(0.7); opacity: 0; } }
.pauseBox { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); background: #1e140c; border: 2px solid var(--gold); padding: 16px 22px; border-radius: 6px; min-width: 240px; pointer-events: auto; }

/* ---- the paper */
.paper { background: #0a0604; display: flex; flex-direction: column; align-items: center; }
.newspaper { background: #e9e1cf; color: #1e1a14; max-width: 460px; width: 100%; padding: 14px 16px 16px; font-family: var(--paper); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8); transform: rotate(-0.6deg); margin-top: 6px; position: relative; }
.newspaper::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 30% 20%, transparent 50%, rgba(120, 90, 40, 0.18)); }
.mast { font-family: 'Old Standard TT', serif; font-weight: 700; text-align: center; font-size: 25px; letter-spacing: 1px; border-bottom: 3px double #1e1a14; padding-bottom: 4px; }
.dateline { text-align: center; font-size: 11px; border-bottom: 1px solid #1e1a14; padding: 3px 0; font-style: italic; }
.headline { font-family: 'Old Standard TT', serif; font-weight: 700; font-size: 30px; line-height: 1.02; text-align: center; margin: 10px 0 4px; letter-spacing: -0.5px; }
.deck { text-align: center; font-size: 15px; font-style: italic; border-bottom: 1px solid #1e1a14; padding-bottom: 6px; }
.photo { margin: 8px 0; border: 1px solid #1e1a14; }
.photo canvas { width: 100%; display: block; }
.story { font-size: 14px; line-height: 1.4; text-align: justify; columns: 2; column-gap: 14px; margin-top: 6px; }
.byline { font-size: 11px; font-style: italic; text-align: right; margin-top: 4px; }
.nums { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; margin-top: 8px; border-top: 2px solid #1e1a14; padding-top: 6px; font-size: 13px; }
.nums div { display: flex; justify-content: space-between; border-bottom: 1px dotted #8a7a60; }

/* ---- the speakeasy */
.barScene { max-width: 520px; margin: 0 auto; position: relative; }
.table { display: flex; justify-content: center; gap: 10px; margin: 12px 0; flex-wrap: wrap; }
.seat { width: 100px; text-align: center; }
.seat .face { border-radius: 6px; border: 2px solid #3a2410; }
.seat .say { font-size: 13px; font-style: italic; color: #e8d8b8; min-height: 2.6em; margin-top: 4px; }
.splitRow { display: flex; flex-direction: column; gap: 4px; }
.splitRow button { width: 100%; max-width: 320px; }
.talk { display: flex; flex-direction: column; gap: 10px; margin: 10px 0; max-height: 52vh; overflow-y: auto; }
.tline { display: flex; gap: 10px; align-items: flex-start; animation: pop 0.2s ease-out; }
.tline .face { border-radius: 50%; border: 2px solid #3a2410; flex: none; }
.tt { font-size: 15px; line-height: 1.4; }
.tt b { font-family: var(--deco); font-weight: normal; color: var(--gold2); margin-right: 4px; }
.tabs { display: flex; gap: 4px; justify-content: center; margin: 14px 0 8px; }
.tab { font-size: 14px; padding: 6px 14px; background: #2a1c12; color: var(--gold); box-shadow: none; border-color: rgba(214, 170, 90, 0.4); }
.tab.on { background: linear-gradient(#f0d08a, #c8963e); color: var(--ink); }
.tabBody { display: flex; flex-direction: column; gap: 8px; }
.crewRow, .envRow { display: flex; gap: 10px; align-items: center; background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(214, 170, 90, 0.2); border-radius: 4px; padding: 8px; }
.crewRow .face { border-radius: 4px; flex: none; }
.ci { flex: 1; font-size: 14px; line-height: 1.35; }
.ci b { font-family: var(--deco); font-weight: normal; color: var(--gold2); }
.ci small { color: #c8b898; }
.crewRow button, .envRow button { flex: none; margin: 0; }
.bars { display: grid; grid-template-columns: auto 1fr; gap: 2px 6px; align-items: center; font-size: 11px; color: #b8a888; margin: 3px 0; }
.bars i { height: 6px; background: linear-gradient(90deg, #d6aa5a var(--v), rgba(255, 255, 255, 0.1) var(--v)); border-radius: 3px; }
.bars i.nv { background: linear-gradient(90deg, #8ab0e0 var(--v), rgba(255, 255, 255, 0.1) var(--v)); }
.notice { background: rgba(120, 30, 20, 0.3); border-left: 3px solid var(--red); padding: 8px 10px; margin: 8px 0; font-style: italic; }
.stranger { display: flex; gap: 10px; align-items: center; background: rgba(214, 170, 90, 0.08); border: 1px dashed rgba(214, 170, 90, 0.5); padding: 8px; border-radius: 4px; margin: 8px 0; flex-wrap: wrap; }
.stranger .face { border-radius: 4px; }
.stranger .tt { flex: 1; min-width: 160px; }
.hint { position: fixed; left: 50%; bottom: 150px; transform: translateX(-50%); background: rgba(18, 12, 8, 0.82); border: 1px solid var(--gold); color: var(--gold2); font-family: var(--deco); font-size: 16px; padding: 8px 14px; border-radius: 20px; white-space: nowrap; transition: opacity 0.4s; pointer-events: none; animation: bob 1.4s ease-in-out infinite alternate; }
@keyframes bob { to { transform: translate(-50%, -5px); } }
.phone { background: linear-gradient(#2a1a10, #1a100a); border: 1px solid var(--gold); border-left: 4px solid var(--gold); padding: 10px 12px; margin: 10px 0; border-radius: 4px; animation: pop 0.3s ease-out; }
.ptitle { font-family: var(--deco); color: var(--gold2); font-size: 15px; margin-bottom: 6px; }
.pline { font-style: italic; font-size: 15px; line-height: 1.4; margin: 4px 0; color: #efe4cc; }
