/* Sarthavaha: palm-leaf manuscript pages on an indigo night, with block-print borders. */
@font-face { font-family: 'Rozha One'; src: url('fonts/RozhaOne-Regular.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Martel'; src: url('fonts/Martel-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Martel'; src: url('fonts/Martel-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }

:root {
  --indigo: #1A1D3A; --indigo2: #262A52; --indigo3: #33386A;
  --leaf: #EAD9AE; --leaf2: #F3E7C6; --leaf3: #D9C58F; --ink: #2B1D12; --ink2: #5A4632;
  --sindoor: #C2361F; --sindoor2: #9E2614; --turmeric: #E0A526; --peacock: #1F7A72; --peacock2: #155A54;
  --good: #1F7A55; --bad: #B0301C;
  --radius: 14px; --shadow: 0 6px 24px rgba(10, 8, 30, .35);
  --block: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='12'%3E%3Cpath d='M12 1 L17 6 L12 11 L7 6Z' fill='%23C2361F'/%3E%3Ccircle cx='12' cy='6' r='1.6' fill='%23EAD9AE'/%3E%3Ccircle cx='2' cy='6' r='1.4' fill='%231A1D3A'/%3E%3Ccircle cx='22' cy='6' r='1.4' fill='%231A1D3A'/%3E%3C/svg%3E");
  --safe-top: var(--safe-area-inset-top, env(safe-area-inset-top, 0px)); --safe-bot: var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--indigo); color: var(--ink); }
html { font-size: calc(16px * var(--text-scale, 1)); }
body { font: 1rem/1.5 'Martel', Georgia, serif; font-variant-numeric: tabular-nums; overscroll-behavior: none; -webkit-font-smoothing: antialiased; }
#app { min-height: 100%; max-width: 560px; margin: 0 auto; position: relative; }
h1, h2, h3, .logo, .town-name, .score { font-family: 'Rozha One', Georgia, serif; font-weight: 400; letter-spacing: .01em; margin: 0; }
h2 { font-size: 1.45rem; line-height: 1.15; } h3 { font-size: 1.15rem; line-height: 1.2; margin-bottom: .4rem; }
p { margin: .35rem 0; } small { display: block; font-size: .8rem; line-height: 1.35; opacity: .8; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
:focus-visible { outline: 3px solid var(--turmeric); outline-offset: 2px; }
.ic, .gi { width: 22px; height: 22px; flex: none; }
.up { color: var(--good); font-weight: 700; } .good { color: var(--good); } .bad { color: var(--bad); } .muted { color: var(--ink2); opacity: .8; }
.fine { font-size: .8rem; color: var(--ink2); }
.band { height: 12px; background: var(--block) repeat-x center / 24px 12px; margin: 14px 0; }
.band.thin { margin: 0; height: 10px; background-size: 20px 10px; }
.band.small { margin: 18px 30%; opacity: .45; height: 8px; background-size: 16px 8px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 18px; border-radius: 999px; border: 2px solid var(--ink); background: var(--leaf2); font-weight: 700; font-size: .95rem; transition: transform .08s, background .15s; text-align: center; }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.98); }
.btn.primary { background: var(--sindoor); color: var(--leaf2); border-color: var(--sindoor2); box-shadow: 0 3px 0 var(--sindoor2); }
.btn.ghost { background: transparent; }
.btn.danger { background: transparent; color: var(--bad); border-color: var(--bad); }
.btn.wide { width: 100%; margin-top: 10px; }
.btn small { display: inline; margin-left: 6px; font-weight: 400; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: none; background: rgba(43, 29, 18, .08); display: grid; place-items: center; flex: none; }
.icon-btn.light { background: rgba(26, 29, 58, .55); color: var(--leaf2); backdrop-filter: blur(4px); }
.link { background: none; border: none; padding: 4px 0; color: var(--sindoor); text-decoration: underline; font-weight: 700; min-height: 32px; }
.chip { border: 1.5px solid var(--ink2); background: var(--leaf2); border-radius: 999px; padding: 6px 12px; min-height: 36px; font-size: .85rem; font-weight: 700; }
.chips, .row-btns, .qty-quick, .trade-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.trade-btns .btn { flex: 1 1 140px; }
.label { font-weight: 700; font-size: .85rem; margin-top: 12px; color: var(--ink2); }

/* title */
.title-screen { min-height: 100vh; display: flex; flex-direction: column; background: var(--indigo); color: var(--leaf2); }
.title-art { position: relative; flex: 1 1 52vh; min-height: 280px; overflow: hidden; }
.title-art img, .title-art svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.title-art::after { content: ''; position: absolute; inset: auto 0 0; height: 45%; background: linear-gradient(transparent, var(--indigo)); }
.title-block { padding: 0 22px calc(28px + var(--safe-bot)); margin-top: -70px; position: relative; text-align: center; }
.logo { font-size: 3.1rem; color: var(--turmeric); text-shadow: 0 3px 0 var(--sindoor2), 0 8px 30px rgba(0,0,0,.5); line-height: 1; }
.tag { font-size: 1rem; letter-spacing: .14em; text-transform: uppercase; color: var(--leaf3); margin-top: 8px; }
.menu { display: flex; flex-direction: column; gap: 10px; max-width: 360px; margin: 0 auto; }
.title-screen .btn { color: var(--ink); } .title-screen .btn.primary { color: var(--leaf2); }
.title-screen .btn.ghost { color: var(--leaf2); border-color: var(--leaf3); }
.menu-row { display: flex; gap: 8px; } .menu-row .btn { flex: 1; padding: 8px 6px; font-size: .82rem; }

/* pages */
.page { min-height: 100vh; background: var(--leaf); padding: calc(12px + var(--safe-top)) 16px calc(32px + var(--safe-bot)); }
.page-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.prose h3 { margin-top: 18px; } .gloss div { display: grid; grid-template-columns: 9.5em 1fr; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--leaf3); }
.gloss dt { font-weight: 700; } .gloss dd { margin: 0; }
.merchant-list { display: grid; gap: 14px; }
.merchant { display: flex; gap: 14px; padding: 14px; background: var(--leaf2); border-radius: var(--radius); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink2); }
.merchant.locked { opacity: .65; filter: saturate(.4); }
.merchant .btn { margin-top: 8px; }
.m-title { color: var(--sindoor); font-weight: 700; font-size: .85rem; } .m-bio { font-size: .9rem; } .m-perk { font-size: .85rem; color: var(--peacock2); font-weight: 700; } .m-lock { font-size: .85rem; font-style: italic; }
.portrait { width: 84px; height: 104px; border-radius: 42px 42px 10px 10px; object-fit: cover; border: 2px solid var(--ink); flex: none; background: var(--indigo2); }
.portrait.big { width: 92px; height: 116px; } .portrait.small { width: 52px; height: 64px; border-radius: 26px 26px 8px 8px; border-width: 1.5px; }
.portrait.ph { display: grid; place-items: center; color: var(--turmeric); font-family: 'Rozha One'; font-size: 1.6rem; background: radial-gradient(circle at 50% 35%, var(--indigo3), var(--indigo)); }
.portrait.small.ph { font-size: 1.1rem; }
.hall { list-style: none; padding: 0; margin: 0; } .hall li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--leaf3); }
.h-rank { font-family: 'Rozha One'; width: 1.6em; color: var(--sindoor); font-size: 1.2rem; } .h-name { flex: 1; } .h-score { font-weight: 700; }
.feats-h { margin-top: 24px; } .feats { list-style: none; padding: 0; display: grid; gap: 8px; }
.feats li { padding: 8px 12px; border-radius: 10px; border: 1.5px dashed var(--ink2); opacity: .55; } .feats li.got { opacity: 1; border-style: solid; background: var(--leaf2); }
.feats li.got b::before { content: '✦ '; color: var(--turmeric); }
.toggle { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px dashed var(--leaf3); }
.toggle input { width: 24px; height: 24px; accent-color: var(--sindoor); }
.empty { padding: 30px 0; text-align: center; color: var(--ink2); }

/* game shell */
.game { min-height: 100vh; display: flex; flex-direction: column; background: var(--leaf); }
.scene { position: relative; height: 34vh; min-height: 200px; max-height: 300px; overflow: hidden; background: var(--indigo); color: var(--leaf2); flex: none; }
.scene > img, .scene > svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scene::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(26,29,58,.55), transparent 40%, transparent 55%, rgba(26,29,58,.85)); pointer-events: none; }
.scene-top { position: absolute; z-index: 2; top: calc(10px + var(--safe-top)); left: 12px; right: 12px; display: flex; gap: 10px; align-items: center; }
.season { flex: 1; font-size: .78rem; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.year { height: 6px; background: rgba(234,217,174,.3); border-radius: 3px; margin-top: 4px; overflow: hidden; } .year i { display: block; height: 100%; background: var(--turmeric); }
.town-name { position: absolute; z-index: 2; left: 16px; bottom: 10px; font-size: 2.2rem; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.purse { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1.2fr; gap: 2px; padding: 8px 10px; background: var(--indigo); color: var(--leaf2); overflow-x: auto; scrollbar-width: none; flex: none; }
.purse > div { text-align: center; padding: 2px 4px; border-right: 1px solid rgba(234,217,174,.15); min-width: 0; overflow: hidden; } .purse small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.purse > div:last-child { border: none; }
.purse b { font-size: 1.1rem; display: block; line-height: 1.2; color: #FFF6DE; } .purse small { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; opacity: .85; color: var(--leaf3); }
.purse .coin b { color: var(--turmeric); font-size: 1.3rem; } .purse .debt b, .purse .warn b { color: #FF8A70; }
.sheet { flex: 1; padding: 16px 16px calc(96px + var(--safe-bot)); position: relative; }
.sheet::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 10px; background: var(--block) repeat-x center / 20px 10px; }
.navbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 560px; display: flex; align-items: center; gap: 4px; padding: 8px 10px calc(8px + var(--safe-bot)); background: var(--indigo); z-index: 10; box-shadow: 0 -4px 20px rgba(0,0,0,.25); }
.nav { flex: 1; background: none; border: none; color: var(--leaf3); display: flex; flex-direction: column; align-items: center; font-size: .72rem; padding: 4px; min-height: 48px; border-radius: 10px; }
.nav.on { color: var(--turmeric); background: rgba(224,165,38,.1); }
.navbar .go { flex: 1.6; min-height: 50px; }
.blurb { font-style: italic; color: var(--ink2); }
.news { background: var(--leaf2); border-left: 4px solid var(--turmeric); padding: 8px 12px; border-radius: 0 10px 10px 0; font-size: .9rem; }
.quest { background: rgba(31,122,114,.1); border-left: 4px solid var(--peacock); padding: 8px 12px; border-radius: 0 10px 10px 0; font-size: .88rem; }
.hint { background: var(--indigo); color: var(--leaf2); padding: 10px 14px; border-radius: 12px; margin-bottom: 12px; font-size: .88rem; display: flex; gap: 10px; align-items: center; }
.hint p { flex: 1; margin: 0; } .hint .link { color: var(--turmeric); flex: none; }
.places { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 14px 0; }
.place { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left; padding: 10px; min-height: 76px; border-radius: var(--radius); border: 2px solid var(--ink); background: var(--leaf2); box-shadow: 3px 3px 0 var(--ink2); transition: transform .08s; }
.place:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink2); }
.place > :first-child { grid-row: 1 / 3; }
.place-ic { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--indigo); color: var(--turmeric); }
.place-ic .ic { width: 26px; height: 26px; }
.pl-t { font-family: 'Rozha One'; font-size: 1.05rem; line-height: 1.1; } .pl-s { font-size: .74rem; color: var(--ink2); line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.town-actions { display: flex; gap: 10px; justify-content: center; }
.order-banner { background: var(--leaf2); border: 2px solid var(--peacock); border-radius: var(--radius); padding: 10px 12px; margin: 10px 0; font-size: .9rem; }
.order-banner .btn { width: 100%; margin-top: 6px; }
.note { font-size: .85rem; color: var(--peacock2); font-style: italic; }

/* overlays & place sheets */
.overlay { position: fixed; inset: 0; z-index: 30; background: rgba(14, 12, 34, .72); display: flex; align-items: flex-end; justify-content: center; animation: fade .18s ease-out; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
.place-sheet { z-index: 20; align-items: stretch; }
.psheet, .map-sheet { width: 100%; max-width: 560px; background: var(--leaf); display: flex; flex-direction: column; animation: rise .22s ease-out; }
.psheet { height: 100%; }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: calc(10px + var(--safe-top)) 14px 10px; background: var(--leaf); }
.sheet-head h2 { flex: 1; }
.ph-cash { font-weight: 700; color: var(--ink); background: var(--turmeric); padding: 4px 10px; border-radius: 999px; font-size: .85rem; white-space: nowrap; }
.psheet-body { flex: 1; overflow-y: auto; padding: 14px 16px calc(30px + var(--safe-bot)); -webkit-overflow-scrolling: touch; }
.who { font-size: .9rem; color: var(--ink2); }
.block h3 { color: var(--sindoor2); }
.keeper { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 12px; }
.greet { font-style: italic; background: var(--leaf2); padding: 8px 12px; border-radius: 4px 14px 14px 14px; margin-top: 8px; position: relative; }
blockquote { margin: 8px 0; padding: 8px 12px; border-left: 3px solid var(--turmeric); background: var(--leaf2); font-style: italic; }
.hearts { display: flex; gap: 2px; margin-top: 4px; } .hearts i { color: var(--leaf3); } .hearts i.on { color: var(--sindoor); } .hearts i.on svg { fill: currentColor; } .hearts .ic { width: 18px; height: 18px; }
.contract { padding: 10px 12px; background: var(--leaf2); border-radius: 10px; margin: 8px 0; border: 1.5px solid var(--leaf3); }
.contract.mine { border-color: var(--sindoor); }
.contract .btn { margin-top: 4px; min-height: 40px; }
.court-art { height: 140px; margin: -14px -16px 12px; overflow: hidden; position: relative; } .court-art:empty { display: none; }
.court-art img, .court-art svg { width: 100%; height: 100%; object-fit: cover; }

/* bazaar */
.gd { border-bottom: 1px dashed var(--leaf3); }
.gd.open { background: var(--leaf2); margin: 0 -10px; padding: 0 10px; border-radius: 12px; border: none; }
.good-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 0; background: none; border: none; text-align: left; min-height: 58px; }
.g-ic { width: 40px; height: 40px; border-radius: 50%; background: var(--indigo); color: var(--turmeric); display: grid; place-items: center; flex: none; }
.g-ic.contra { background: var(--peacock2); color: #B6F0C8; }
.g-name { flex: 1; font-weight: 700; } .g-name small { font-weight: 400; }
.g-price { text-align: right; min-width: 52px; font-weight: 700; font-size: 1.05rem; } .g-price small { font-size: .65rem; text-transform: uppercase; letter-spacing: .06em; }
.g-none { font-size: .8rem; color: var(--ink2); }
.row-hint { margin: -8px 0 8px 50px; font-size: .78rem; color: var(--ink2); } .row-hint.up { color: var(--good); font-weight: 700; }
.trade { padding: 4px 0 14px; }
.ledger-line { font-size: .85rem; } .trait { font-size: .8rem; color: var(--ink2); font-style: italic; }
.qty { display: flex; gap: 6px; align-items: center; margin: 10px 0 6px; }
.step { min-width: 46px; height: 46px; border-radius: 12px; border: 2px solid var(--ink); background: var(--leaf); font-weight: 700; }
.qty-in { flex: 1; min-width: 0; height: 46px; text-align: center; font: 700 1.2rem 'Martel', serif; border: 2px solid var(--ink); border-radius: 12px; background: #FFF9E8; color: var(--ink); }
.qty-range { width: 100%; accent-color: var(--sindoor); height: 30px; }
.trade-btns.godown .btn { min-height: 40px; font-size: .85rem; }
.space-note { font-size: .8rem; color: var(--ink2); margin-top: 12px; }

/* caravan */
.wagon, .buy-wagon { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--leaf3); }
.w-name { flex: 1; font-weight: 700; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .w-name small { font-weight: 400; flex-basis: 100%; }
.thumb { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; border: 1.5px solid var(--ink); }
.hpbar { width: 80px; height: 10px; border-radius: 5px; background: var(--leaf3); overflow: hidden; flex: none; } .hpbar i { display: block; height: 100%; background: var(--peacock); }
.owned { font-size: .8rem; font-weight: 700; color: var(--peacock2); white-space: nowrap; }
.relic { display: flex; align-items: center; gap: 12px; padding: 10px; margin: 8px 0; border-radius: 12px; background: var(--leaf2); border: 1.5px solid var(--leaf3); }
.relic > div { flex: 1; } .relic .lore { font-style: italic; opacity: .7; margin-top: 2px; }
.relic-img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; flex: none; } .relic-img.ph { display: grid; place-items: center; background: var(--indigo); color: var(--turmeric); }
.r-rare { border-color: var(--peacock); } .r-legendary { border-color: var(--turmeric); background: linear-gradient(135deg, #FFF3CC, var(--leaf2)); box-shadow: 0 0 0 1px var(--turmeric) inset; }
.r-legendary b { color: var(--sindoor2); }
.factions { display: grid; gap: 6px; margin: 8px 0; }
.fac { display: grid; grid-template-columns: 7.5em 1fr 2.2em; gap: 8px; align-items: center; font-size: .85rem; }
.facbar { position: relative; height: 8px; background: var(--leaf3); border-radius: 4px; } .facbar::after { content: ''; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px; background: var(--ink2); }
.facbar i { position: absolute; top: 0; bottom: 0; background: var(--peacock); border-radius: 4px; } .facbar i.neg { background: var(--sindoor); }
.fac b { text-align: right; }

/* ledger */
.table-wrap { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
table { border-collapse: collapse; font-size: .8rem; min-width: 100%; }
th, td { padding: 6px 5px; text-align: center; border-bottom: 1px dashed var(--leaf3); white-space: nowrap; }
tbody th { text-align: left; position: sticky; left: 0; background: var(--leaf); font-weight: 700; } tbody th small { font-weight: 400; }
thead th .gi { width: 18px; height: 18px; } thead th small { font-size: .62rem; }
.journal { list-style: none; padding: 0; margin: 0; font-size: .86rem; }
.journal li { padding: 6px 0; border-bottom: 1px dashed var(--leaf3); } .journal li span { font-weight: 700; color: var(--ink2); margin-right: 8px; font-size: .75rem; }
.journal li.good { color: var(--good); } .journal li.bad { color: var(--bad); }

/* map */
.map-overlay { align-items: stretch; z-index: 25; }
.map-sheet { height: 100%; }
.map-wrap { position: relative; flex: 1; min-height: 0; aspect-ratio: 2 / 3; max-height: 62vh; margin: 0 auto; width: auto; max-width: 100%; }
.map-bg, .map-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-bg { object-fit: fill; }
.map-name { font: 700 13px 'Martel', serif; fill: var(--ink); paint-order: stroke; stroke: var(--leaf2); stroke-width: 4px; }
.map-lbl { font: 700 11px 'Martel', serif; fill: var(--sindoor2); paint-order: stroke; stroke: var(--leaf2); stroke-width: 3px; }
.map-town { cursor: pointer; } .map-town.far { opacity: .6; }
.scene.compact { height: 22vh; min-height: 150px; } .scene.compact .town-name { font-size: 1.8rem; } .map-name.picked { fill: var(--peacock2); font-size: 15px; }
.quest-sum { display: block; width: 100%; text-align: left; background: rgba(31,122,114,.1); border: none; border-left: 4px solid var(--peacock); padding: 8px 12px; border-radius: 0 10px 10px 0; font-size: .88rem; margin: 6px 0; min-height: 44px; }
.quest p { margin: 0 0 6px; } .map-town:focus { outline: none; } .map-town:focus-visible circle:last-of-type { stroke: var(--turmeric); stroke-width: 3; }
.here-ring { animation: pulse 1.8s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes pulse { 50% { transform: scale(1.25); opacity: .5; } }
.map-card { padding: 12px 16px calc(16px + var(--safe-bot)); background: var(--leaf); border-top: 10px solid transparent; border-image: var(--block) 0 0 100% 0 / 10px 0 0 0 repeat; overflow-y: auto; max-height: 42vh; }
.route { margin: 8px 0; display: grid; gap: 4px; } .route div { display: grid; grid-template-columns: 5.5em 1fr; gap: 8px; font-size: .88rem; }
.route dt { font-weight: 700; color: var(--ink2); } .route dd { margin: 0; }
.skulls { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; } .sk { color: var(--leaf3); } .sk.on { color: var(--sindoor); } .sk .ic { width: 18px; height: 18px; } .skulls b { margin: 0 4px; }

/* modal */
.modal { width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; background: var(--leaf); border-radius: 22px 22px 0 0; padding: 0 18px calc(20px + var(--safe-bot)); animation: rise .25s ease-out; border-top: 6px solid var(--sindoor); }
.modal.tone-good { border-top-color: var(--good); } .modal.tone-event { border-top-color: var(--turmeric); }
.modal h2 { margin: 14px 0 6px; }
.modal-art { height: 130px; margin: 0 -18px; overflow: hidden; position: relative; background: var(--indigo); }
.modal-art img, .modal-art svg { width: 100%; height: 100%; object-fit: cover; }
.modal-art::after { content: ''; position: absolute; inset: auto 0 0; height: 40%; background: linear-gradient(transparent, var(--leaf)); }
.choices { display: grid; gap: 8px; margin-top: 12px; }
.stances { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.stances .choice { padding: 10px 8px; } .stances .choice small { font-size: .72rem; }
.choice { text-align: left; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--ink); background: var(--leaf2); min-height: 52px; box-shadow: 2px 2px 0 var(--ink2); }
.choice b { display: block; } .choice:active:not(:disabled) { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink2); }
.odds-cap { font-size: .75rem; color: var(--ink2); margin: 10px 0 -6px; text-transform: uppercase; letter-spacing: .06em; }
.odds { display: flex; align-items: center; gap: 10px; margin: 10px 0; font-size: .85rem; }
.odds-bar { flex: 1; height: 12px; border-radius: 6px; background: var(--sindoor); overflow: hidden; } .odds-bar i { display: block; height: 100%; background: var(--peacock); }
.rounds { padding-left: 1.2em; margin: 10px 0; font-size: .9rem; } .rounds li { margin: 4px 0; animation: rise .2s ease-out; }
.rounds li.good::marker { color: var(--good); } .rounds li.bad::marker { color: var(--bad); }
.outcome { padding: 10px 12px; border-radius: 12px; background: var(--leaf2); margin: 10px 0; border-left: 4px solid var(--bad); } .outcome.good { border-left-color: var(--good); }
.outcome p { color: var(--ink); }

/* travel */
.travel { flex-direction: column; align-items: center; justify-content: center; color: var(--leaf2); background: var(--indigo); z-index: 40; }
.travel-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.travel p { position: relative; font-family: 'Rozha One'; font-size: 1.4rem; }
.road { position: relative; width: 70%; height: 4px; background: repeating-linear-gradient(90deg, var(--leaf3) 0 14px, transparent 14px 26px); }
.cart { position: absolute; top: -30px; left: 0; color: var(--turmeric); animation: roll 1.3s ease-in-out forwards; } .cart .ic { width: 40px; height: 40px; }
@keyframes roll { to { left: calc(100% - 40px); } }

/* end */
.end { text-align: center; background: radial-gradient(circle at 50% 0, var(--leaf2), var(--leaf)); }
.end-kicker { margin-top: 40px; font-style: italic; color: var(--ink2); }
.score { font-size: 3.6rem; color: var(--sindoor); line-height: 1.1; margin-top: 10px; }
.score-sub { color: var(--ink2); }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 16px 0; text-align: left; }
.stats div { background: var(--leaf2); padding: 8px 12px; border-radius: 10px; } .stats dt { font-size: .75rem; color: var(--ink2); } .stats dd { margin: 0; font-weight: 700; }
.unlock { background: var(--indigo); color: var(--leaf2); padding: 10px; border-radius: 12px; } .unlock b { color: var(--turmeric); } .unlock.feat { background: var(--peacock2); }
.end .menu { margin-top: 20px; }

.verdict { font-family: 'Rozha One'; font-size: 1.4rem; margin: 6px 0 4px; } .deltas { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.delta { padding: 4px 10px; border-radius: 999px; font-weight: 700; font-size: .85rem; background: #E7D7B0; } .delta.up { color: var(--good); } .delta.down { color: var(--bad); }
.wear { font-style: normal; background: #FF8A70; color: var(--indigo); border-radius: 50%; padding: 0 6px; font-size: .8rem; }
.worth { width: 100%; margin: 6px 0 14px; font-size: .95rem; text-align: left; } .worth th { text-align: left; font-weight: 400; position: static; background: none; } .worth td { text-align: right; font-weight: 700; } .worth tr.tot th, .worth tr.tot td { font-family: 'Rozha One'; font-size: 1.15rem; border-top: 2px solid var(--ink); }
.impact { display: grid; gap: 6px; margin: 8px 0; } .impact div { background: var(--leaf); border-radius: 8px; padding: 6px 10px; display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: .85rem; } .impact b { flex-basis: 100%; }
.scene.mini { height: 72px; min-height: 72px; } .scene.mini .town-name { font-size: 1.3rem; bottom: 6px; } .scene.mini .season { display: none; } .scene.mini .scene-top { top: calc(14px + var(--safe-top)); }
.scene.mini .town-name { left: 68px; }
.req { font-size: .85rem; color: var(--ink2); margin-bottom: 6px; }
.hpwrap { display: flex; align-items: center; gap: 6px; } .hpwrap small { width: 3em; text-align: right; } .hpbar.low i { background: var(--sindoor); }
tr.stale th small, tr.stale td { opacity: .55; } tr.fresh th small { color: var(--good); font-weight: 700; }
.toast { position: fixed; left: 50%; bottom: calc(90px + var(--safe-bot)); transform: translateX(-50%); background: var(--indigo); color: var(--leaf2); padding: 10px 18px; border-radius: 999px; z-index: 60; transition: opacity .4s; box-shadow: var(--shadow); }
.toast.out { opacity: 0; }

@media (max-width: 360px) { .places { grid-template-columns: 1fr; } .town-name { font-size: 1.8rem; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Fight screen: everything fits on a 360x640 phone without scrolling */
.modal-art .art-title { position: absolute; z-index: 2; left: 18px; bottom: 2px; margin: 0; text-shadow: 0 0 8px var(--leaf), 0 0 3px var(--leaf); }
.modal.fight .modal-art { height: 110px; }
.modal.fight > p:not(.odds-cap):not(.fine):not(.note) { font-size: .92rem; margin: 6px 0; }
.choices.fightc { gap: 6px; margin-top: 8px; }
.extras { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.choice.mini { padding: 7px 9px; min-height: 46px; border-radius: 10px; }
.choice.mini b { font-size: .86rem; line-height: 1.15; } .choice.mini small { font-size: .7rem; line-height: 1.2; display: block; margin-top: 2px; }
.choice.mini.span2 { grid-column: 1 / -1; }
.stances .choice b { font-size: .92rem; line-height: 1.15; }
@media (max-height: 700px) { .modal.fight .modal-art { height: 84px; } .modal.fight .odds { margin: 6px 0; } .modal.fight .odds-cap { margin-top: 4px; } .modal.fight .fine { margin: 6px 0 0; } }
@media (max-width: 330px) { .stances .choice small { font-size: .66rem; } .stances .choice { padding: 8px 5px; } }

/* Wishlist */
.wish-in { width: 100%; font: inherit; padding: 10px 12px; border-radius: 12px; border: 2px solid var(--ink); background: var(--leaf2); color: var(--ink); resize: vertical; }
.wish-actions { display: flex; gap: 8px; margin: 8px 0 14px; } .wish-actions .btn { flex: 1; }
.wishes { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.wishes li { position: relative; padding: 10px 40px 10px 12px; background: var(--leaf2); border-radius: 12px; border-left: 4px solid var(--turmeric); }
.wishes li p { margin: 0 0 4px; } .wishes li small { color: var(--ink2); }
.wishes li .icon-btn { position: absolute; top: 6px; right: 6px; }
.wish-link { width: 100%; margin-top: 2px; font-size: .82rem; padding: 6px; }

/* Notice board */
.tag { display: inline-block; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; padding: 2px 7px; border-radius: 6px; background: var(--ink); color: var(--leaf); margin-bottom: 4px; }
.contract.guild { border-left: 4px solid var(--turmeric); } .contract.guild .tag { background: var(--turmeric); color: var(--ink); }
.contract.wanted .tag { background: var(--sindoor); color: #fff; }
.posting { padding: 10px 12px; border-radius: 12px; background: var(--leaf2); margin: 8px 0; }
.posting h4 { margin: 2px 0 4px; font-size: 1rem; }
.posting.verified { border-left: 4px solid var(--peacock); } .posting.verified .tag { background: var(--peacock); color: #fff; }
.scrawl { font-style: italic; transform: rotate(-0.6deg); background: #f6eccf; border: 1px dashed var(--ink2); padding: 10px 12px; border-radius: 4px; box-shadow: 2px 3px 0 rgba(0,0,0,.08); margin: 8px 0; }

/* Campaign */
.story h3 { color: var(--sindoor); }
.goals { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.goals li { padding: 8px 10px 8px 32px; position: relative; background: var(--leaf2); border-radius: 10px; }
.goals li::before { content: ''; position: absolute; left: 10px; top: 11px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink2); }
.goals li.ok::before { background: var(--good); border-color: var(--good); }
.goals li small { color: var(--ink2); display: block; }
.quest-sum.chapter { border-left: 4px solid var(--sindoor); }

/* Living street scenes */
.scene.street { height: 46vh; min-height: 300px; max-height: 480px; }
.street-pan { position: absolute; inset: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.street-pan::-webkit-scrollbar { display: none; }
.street-art { position: relative; height: 100%; display: inline-block; }
.street-art > img { height: 100%; width: auto; display: block; max-width: none; user-select: none; -webkit-user-drag: none; }
.scene.street::after { background: linear-gradient(rgba(26,29,58,.55), transparent 22%, transparent 70%, rgba(26,29,58,.85)); }
.street-pan.dusk .street-art::before { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(90,40,90,.25), rgba(240,120,40,.12)); mix-blend-mode: multiply; pointer-events: none; z-index: 1; }
.spot { position: absolute; z-index: 3; background: transparent; border: 0; padding: 0; border-radius: 14px; cursor: pointer; }
.spot:focus-visible, .spot.hl { outline: 3px solid rgba(240,190,60,.9); outline-offset: -3px; background: rgba(240,190,60,.12); }
.spot-pin { position: absolute; left: 50%; top: 0; transform: translate(-50%, -30%); white-space: nowrap; font-size: .7rem; font-weight: 700; letter-spacing: .02em; padding: 3px 8px; border-radius: 999px; background: rgba(26,29,58,.78); color: #f5e6c4; border: 1px solid rgba(240,190,60,.7); box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.spot:active .spot-pin { background: var(--turmeric); color: var(--ink); }
.street-pan i { position: absolute; pointer-events: none; z-index: 2; }
.shimmer { background: repeating-linear-gradient(100deg, transparent 0 18px, rgba(255,255,255,.10) 22px, transparent 30px); mix-blend-mode: screen; }
.smoke { width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: radial-gradient(rgba(230,225,215,.55), rgba(230,225,215,0) 70%); opacity: 0; }
.lamp { width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: radial-gradient(rgba(255,210,120,.85), rgba(255,170,60,.35) 40%, transparent 70%); opacity: .35; mix-blend-mode: screen; }
.dusk .lamp { opacity: .8; }
.bird { left: 0; width: 100%; height: 8px; transform: translateX(-5%); will-change: transform; }
.bird::before { content: ''; position: absolute; left: 0; top: 0; width: 16px; height: 8px; background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 8'%3E%3Cpath d='M0 6 Q4 0 8 5 Q12 0 16 6' fill='none' stroke='%232a2230' stroke-width='1.4'/%3E%3C/svg%3E"); opacity: .7; }
.live .bird::before { animation: flap .6s ease-in-out infinite alternate; transform-origin: center; }
.live .bird.b2::before { animation-duration: .5s; }
.live .shimmer { animation: shimmer 7s linear infinite; }
.live .smoke { animation: smoke 6s ease-out infinite; }
.live .lamp { animation: flicker 2.3s ease-in-out infinite; }
.live .bird { animation: fly 26s linear infinite; }
.live .bird.b2 { animation-duration: 34s; }
@keyframes shimmer { from { background-position: 0 0; } to { background-position: 120px 0; } }
@keyframes smoke { 0% { opacity: 0; transform: translate(0, 0) scale(.6); } 15% { opacity: .9; } 100% { opacity: 0; transform: translate(14px, -46px) scale(2.6); } }
@keyframes flicker { 0%, 100% { opacity: .55; } 30% { opacity: .9; } 55% { opacity: .65; } 75% { opacity: 1; } }
/* Birds cross the street on the compositor: the wide, empty .bird moves by its own width (the street's), the glyph flaps inside. */
@keyframes fly { from { transform: translateX(-5%); } to { transform: translateX(105%); } }
@keyframes flap { from { transform: scaleY(1); } to { transform: scaleY(.45); } }
@media (prefers-reduced-motion: reduce) { .live .smoke, .live .lamp, .live .bird, .live .shimmer { animation: none; } .live .bird { display: none; } }

/* travellers */
.faces { margin: 8px 0 4px; }
.faces h4 { margin: 0 0 6px; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted, #6b5a44); }
.face-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.face { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 6px 12px 6px 6px; border-radius: 30px; border: 2px solid rgba(0,0,0,.18); background: rgba(255,255,255,.45); text-align: left; flex: 0 0 auto; }
.face.new { border-color: var(--sindoor, #c0392b); box-shadow: 0 0 0 3px rgba(192,57,43,.15); }
.face[disabled] { opacity: .6; }
.face span { display: flex; flex-direction: column; line-height: 1.15; }
.face small { font-size: .74rem; opacity: .8; }
.face-img { width: 40px !important; height: 40px !important; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.people .person { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; border-bottom: 1px dashed rgba(0,0,0,.12); }
.people .person:last-child { border-bottom: none; }
.people .person small { opacity: .75; }
.people .person .fine { margin: 2px 0 0; }
.slider { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-bottom: 1px solid rgba(0,0,0,.08); }
.slider span { display: flex; flex-direction: column; }
.slider small { opacity: .75; }
.slider input[type=range] { width: 100%; min-height: 32px; accent-color: var(--sindoor, #c0392b); }
.talk-head { display: flex; align-items: center; gap: 12px; }
.talk-head h2 { margin: 0; }
.talk-img { width: 64px !important; height: 64px !important; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold, #c9a227); flex: 0 0 auto; }
.bark { font-size: .86rem; font-style: italic; margin: 4px 0 8px; padding-left: 10px; border-left: 2px dotted rgba(0,0,0,.25); opacity: .9; }

.btn.loss { border-color: var(--bad); color: var(--bad); }
.btn small { display: block; font-size: .75rem; font-weight: 700; }
.impact b.down { color: var(--bad); }
.moored { margin-top: 8px; }

/* ---------- 0.6: full-screen street town ---------- */
.game.townmode { height: 100vh; height: 100dvh; min-height: 0; position: relative; overflow: hidden; background: var(--indigo); }
.street-full { position: absolute; inset: 0; }
.street-full .street-pan { position: absolute; inset: 0; }
.street-full::before, .street-full::after { content: ''; position: absolute; left: 0; right: 0; pointer-events: none; z-index: 4; }
.street-full::before { top: 0; height: 170px; background: linear-gradient(rgba(20,22,48,.85), rgba(20,22,48,0)); }
.street-full::after { bottom: 0; height: 200px; background: linear-gradient(rgba(20,22,48,0), rgba(20,22,48,.8)); }
.hud { position: absolute; z-index: 6; top: calc(10px + var(--safe-top)); left: 10px; right: 10px; display: flex; flex-direction: column; gap: 6px; color: var(--leaf2); pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud-row { display: flex; gap: 6px; align-items: center; }
.stats-strip { flex: 1; min-width: 0; height: 44px; border-radius: 22px; background: rgba(26,29,58,.82); display: flex; align-items: center; justify-content: space-around; padding: 0 6px; color: var(--leaf2); }
.stats-strip .st { display: flex; align-items: center; gap: 4px; min-width: 0; }
.stats-strip .ic { width: 18px; height: 18px; flex: none; }
.stats-strip b { font-size: 1rem; line-height: 1; white-space: nowrap; } .stats-strip b small { display: inline; font-size: .78rem; opacity: .7; font-weight: 400; }
.stats-strip .coin { color: var(--turmeric); } .stats-strip .debt, .stats-strip .warn { color: #FF8A70; }
.hud-title { display: flex; align-items: baseline; gap: 8px; padding-left: 4px; flex-wrap: wrap; }
.townmode .town-name { position: static; font-size: 1.75rem; line-height: 1; text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.day-pill { font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 12px; background: rgba(26,29,58,.75); }
.hud .year { width: 190px; margin-left: 4px; }
.townmode .spot-pin { display: flex; align-items: center; gap: 5px; padding: 4px 10px 4px 5px; font-size: .78rem; border: 2px solid var(--turmeric); box-shadow: 0 0 0 5px rgba(224,165,38,.18), 0 3px 10px rgba(0,0,0,.4); }
.townmode .spot-pin .ic { width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: var(--turmeric); color: var(--indigo); box-sizing: content-box; }
.swipe-hint { position: absolute; z-index: 6; left: 50%; bottom: calc(150px + var(--safe-bot)); transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 14px; background: rgba(26,29,58,.72); color: var(--leaf2); font-size: .8rem; font-weight: 700; pointer-events: none; animation: nudge 1.6s ease-in-out infinite; }
.swipe-hint .ic { width: 16px; height: 16px; } .swipe-hint .flip { display: flex; transform: scaleX(-1); }
@keyframes nudge { 50% { transform: translateX(calc(-50% + 8px)); } }
.bubbles { position: absolute; z-index: 6; left: 12px; bottom: calc(18px + var(--safe-bot)); display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; max-width: calc(100% - 110px); }
.bubble { position: relative; width: 56px; height: 56px; padding: 0; border-radius: 50%; border: 3px solid var(--leaf3); background: var(--indigo2); overflow: visible; display: grid; place-items: center; color: var(--leaf2); box-shadow: 0 4px 12px rgba(0,0,0,.45); }
.bubble.new { border-color: var(--turmeric); }
.bubble:disabled { opacity: .7; }
.bubble .bub-img, .bubble .portrait { width: 50px !important; height: 50px !important; border-radius: 50%; border: 0; object-fit: cover; }
.bubble.matters { width: 48px; height: 48px; border-color: var(--leaf2); background: rgba(26,29,58,.85); margin-bottom: 4px; }
.bubble .ic { width: 22px; height: 22px; }
.badge { position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; border-radius: 10px; background: var(--sindoor); color: #FFF6DE; font-size: .72rem; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
.fabs { position: absolute; z-index: 6; right: 14px; bottom: calc(18px + var(--safe-bot)); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.fab { border: none; border-radius: 50%; display: grid; place-items: center; color: var(--leaf2); box-shadow: 0 6px 18px rgba(0,0,0,.45); }
.fab.small { width: 48px; height: 48px; background: rgba(26,29,58,.88); }
.fab.go { width: 68px; height: 68px; background: var(--sindoor); border: 3px solid var(--leaf2); color: #FFF6DE; }
.fab .ic { width: 24px; height: 24px; } .fab.go .ic { width: 30px; height: 30px; }
.matters-sheet { z-index: 22; }
.msheet { width: 100%; max-width: 560px; max-height: 80vh; overflow-y: auto; background: var(--leaf); border-radius: 22px 22px 0 0; animation: rise .22s ease-out; }
.msheet .sheet-head { position: sticky; top: 0; z-index: 1; border-radius: 22px 22px 0 0; }
.msheet .psheet-body { padding-bottom: calc(24px + var(--safe-bot)); }

/* ---------- 0.6: building interiors ---------- */
.place-sheet.interior .psheet { position: relative; background: #2B1D12; }
.int-art { position: absolute; inset: 0; overflow: hidden; }
.int-art img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.05); }
.int-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(20,22,48,.65), rgba(20,22,48,.1) 30%, rgba(30,18,10,.35) 55%, rgba(30,18,10,.85)); }
.int-head { position: relative; z-index: 2; display: flex; gap: 6px; align-items: center; padding: calc(10px + var(--safe-top)) 10px 0; }
.int-focus { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 14px 20px 16px; color: var(--leaf2); }
.int-portrait .portrait.focus { width: 132px; height: 164px; border-radius: 66px 66px 18px 18px; border: 3px solid var(--turmeric); box-shadow: 0 10px 30px rgba(0,0,0,.55); }
.int-focus h2 { font-size: 1.5rem; text-shadow: 0 2px 8px rgba(0,0,0,.7); margin-top: 6px; }
.int-sub { margin: 0; font-size: .85rem; font-weight: 700; display: flex; align-items: center; gap: 8px; padding: 2px 12px; border-radius: 12px; background: rgba(26,29,58,.7); }
.int-sub .hearts { margin: 0; }
.int-line { margin: 6px 0 0; max-width: 340px; padding: 8px 14px; border-radius: 16px 16px 16px 4px; background: rgba(243,231,198,.95); color: var(--ink); font-style: italic; font-size: .92rem; }
.interior .psheet-body { position: relative; z-index: 2; background: var(--leaf); border-radius: 22px 22px 0 0; margin-top: 4px; box-shadow: 0 -6px 24px rgba(0,0,0,.35); min-height: 40vh; }
.interior .psheet-body > .keeper:first-of-type, .interior .psheet-body > .court-art, .interior .psheet-body > .who:first-child { display: none; }
.interior .psheet { overflow-y: auto; }
.interior .psheet-body { flex: none; overflow: visible; }
.interior .psheet-body > .court-art + .keeper { display: none; }

.callout { position: absolute; z-index: 7; left: 12px; right: 96px; bottom: calc(92px + var(--safe-bot)); min-height: 48px; display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 14px; border: 2px solid var(--turmeric); background: rgba(26,29,58,.92); color: var(--leaf2); font-weight: 700; font-size: .92rem; text-align: left; box-shadow: 0 6px 18px rgba(0,0,0,.45); }
.callout .ic { width: 22px; height: 22px; color: var(--turmeric); flex: none; }

/* ---------- 0.7: the bazaar as one fixed screen over the stall ---------- */
.bazaar-int .psheet { display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.bazaar-int .int-art::after { background: linear-gradient(rgba(20,22,48,.7), rgba(20,22,48,.15) 22%, rgba(30,18,10,.25) 60%, rgba(30,18,10,.7)); }
.bz-plate { position: relative; z-index: 2; margin: 8px 14px 6px; color: var(--leaf2); text-shadow: 0 2px 6px rgba(0,0,0,.7); display: flex; flex-direction: column; gap: 2px; }
.bz-plate b { font-family: 'Rozha One'; font-size: 1.3rem; font-weight: 400; } .bz-plate span { font-size: .82rem; font-style: italic; opacity: .9; }
.bz-board { position: relative; z-index: 2; flex: 0 1 auto; margin-bottom: auto !important; min-height: 0; overflow-y: auto; margin: 0 10px; padding: 4px 6px 6px; border-radius: 14px; background: rgba(26,20,14,.78); border: 2px solid rgba(224,165,38,.55); backdrop-filter: blur(2px); color: var(--leaf2); }
.bz-head, .bz-row { display: grid; grid-template-columns: 30px 1fr 52px 52px 44px; align-items: center; gap: 4px; }
.bz-head { font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: var(--leaf3); padding: 4px 6px 2px; } .bz-head span:nth-child(n+3) { text-align: right; }
.bz-row { width: 100%; min-height: 36px; padding: 2px 6px; border: 0; border-radius: 9px; background: transparent; color: inherit; text-align: left; }
.bz-row + .bz-row { border-top: 1px solid rgba(234,217,174,.08); }
.bz-row.on { background: rgba(224,165,38,.22); box-shadow: inset 0 0 0 1.5px var(--turmeric); }
.bz-row .g-ic { width: 28px; height: 28px; } .bz-row .g-ic .gi { width: 17px; height: 17px; }
.bz-name { font-weight: 700; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bz-up { font-style: normal; color: #7EE0A0; font-size: .7rem; margin-left: 4px; }
.bz-tag { font-style: normal; font-size: .62rem; background: var(--peacock); color: #E8FFF8; border-radius: 6px; padding: 0 5px; margin-left: 4px; vertical-align: 2px; }
.bz-num { text-align: right; font-weight: 700; font-size: .95rem; font-variant-numeric: tabular-nums; } .bz-num.have { color: var(--turmeric); }
.bz-trade { position: relative; z-index: 2; flex: none; margin: 8px 10px calc(10px + var(--safe-bot)); padding: 10px 12px; border-radius: 16px; background: var(--leaf); box-shadow: 0 -4px 20px rgba(0,0,0,.4); display: flex; flex-direction: column; gap: 7px; }
.bz-sel { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; } .bz-sel b { font-family: 'Rozha One'; font-weight: 400; font-size: 1.15rem; } .bz-paid { font-size: .82rem; color: var(--ink2); }
.bz-qty { display: grid; grid-template-columns: 44px 40px 1fr 40px 44px; gap: 5px; } .bz-qty .step { min-width: 0; height: 40px; } .bz-qty .qty-in { height: 40px; }
.bz-chips { display: flex; gap: 6px; flex-wrap: wrap; } .bz-chips .chip { min-height: 32px; padding: 4px 10px; font-size: .8rem; }
.bz-trade .trade-btns { margin: 0; } .bz-trade .trade-btns .btn { min-height: 50px; flex-direction: column; gap: 0; line-height: 1.15; }
.bz-trade .trade-btns .btn small { font-size: .78rem; font-weight: 700; opacity: .9; }
.bz-foot { margin: 0; font-size: .75rem; color: var(--ink2); }
.bz-curios { max-height: 120px; overflow-y: auto; }
@media (max-height: 720px) {
  .bz-plate { margin: 4px 14px 4px; } .bz-plate b { font-size: 1.1rem; } .bz-plate span { display: none; }
  .bz-head { padding: 2px 6px 0; } .bz-row { min-height: 27px; padding: 0 6px; } .bz-row .g-ic { width: 22px; height: 22px; } .bz-row .g-ic .gi { width: 14px; height: 14px; }
  .bz-name, .bz-num { font-size: .86rem; }
  .bz-trade { padding: 8px 10px; gap: 5px; margin-top: 6px; } .bz-qty .step, .bz-qty .qty-in { height: 36px; } .bz-trade .trade-btns .btn { min-height: 46px; }
}

/* ---------- 0.7: coach marks ---------- */
.coach { position: fixed; inset: 0; z-index: 100; }
.coach-ring { position: fixed; border-radius: 16px; box-shadow: 0 0 0 9999px rgba(10,8,24,.66); border: 3px solid var(--turmeric); transition: all .25s ease; pointer-events: none; }
.coach-card { position: fixed; width: 300px; max-width: calc(100vw - 24px); background: var(--leaf2); color: var(--ink); border-radius: 16px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.5); animation: rise .2s ease-out; }
.coach-card h3 { margin: 2px 0 4px; color: var(--sindoor2); } .coach-card p { margin: 0 0 8px; font-size: .92rem; }
.coach-step { font-size: .72rem !important; text-transform: uppercase; letter-spacing: .08em; color: var(--ink2); margin: 0 !important; }
.coach-btns { display: flex; justify-content: space-between; align-items: center; } .coach-btns .btn { min-height: 42px; padding: 8px 18px; }

/* ---------- characters and chat scenes (0.8) ---------- */
/* Figures: knee-up, bottom-anchored. Painted figures are layered PNG/WebP on one canvas. */
.fig { position: relative; height: 100%; width: 100%; color: rgba(243,231,198,.3); }
.fig.painted .fig-l { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: bottom center; filter: drop-shadow(0 10px 24px rgba(0,0,0,.55)); }
.fig.painted .fig-l + .fig-l { filter: none; }
.fig.stand-in { display: flex; align-items: flex-start; justify-content: center; }
.fig.stand-in img { height: 92%; max-width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 18%; border-radius: 999px 999px 18px 18px; border: 3px solid var(--turmeric);
  box-shadow: 0 12px 34px rgba(0,0,0,.6); -webkit-mask-image: linear-gradient(#000 78%, transparent); mask-image: linear-gradient(#000 78%, transparent); }
.fig.silhouette { display: flex; align-items: flex-end; justify-content: center; }
.fig.silhouette svg { width: 100%; height: 100%; fill: currentColor; }
.cs-fig .fig, .int-fig .fig { animation: fig-in .35s ease-out; }
.mood-pleased .fig { animation: fig-in .35s ease-out, fig-nod .5s ease-in-out .2s; }
.mood-cross .fig { animation: fig-in .35s ease-out, fig-shake .4s ease-in-out .2s; }
@keyframes fig-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes fig-nod { 50% { transform: translateY(5px); } }
@keyframes fig-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* Chat bubbles */
.cb { margin: 0; padding: 9px 13px; max-width: 86%; font-size: .93rem; line-height: 1.4; border-radius: 16px; box-shadow: 0 3px 10px rgba(0,0,0,.25); }
.cb.them { align-self: flex-start; background: var(--leaf2); color: var(--ink); border-bottom-left-radius: 4px; }
.cb.you { align-self: flex-end; background: var(--peacock); color: #F3E7C6; border-bottom-right-radius: 4px; font-weight: 600; }
.cb.note { align-self: center; max-width: 94%; background: rgba(20,22,48,.72); color: var(--leaf2); font-style: italic; font-size: .85rem; box-shadow: none; text-align: center; border-radius: 12px; }
.cb.fresh { animation: cb-in .25s ease-out; }
@keyframes cb-in { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.cb.typing { display: flex; gap: 4px; padding: 11px 14px; background: var(--leaf2); align-self: flex-start; border-bottom-left-radius: 4px; }
.cb.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink2); animation: dot 1s infinite; }
.cb.typing i:nth-child(2) { animation-delay: .15s; } .cb.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }

/* The full chat scene: room, figure on the left, conversation on the right, replies at the bottom. */
.chat-scene { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-columns: 100%; justify-content: stretch; align-items: stretch; grid-template-rows: auto 1fr auto; max-width: 560px; margin: 0 auto; background: #14162C; overflow: hidden; }
.cs-bg { position: absolute; inset: 0; }
.cs-bg img { width: 100%; height: 100%; object-fit: cover; }
.cs-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(20,22,48,.7), rgba(20,22,48,.15) 30%, rgba(20,22,48,.35) 60%, rgba(20,14,8,.92)); }
.cs-fig { position: absolute; left: -8%; top: calc(58px + var(--safe-top)); width: min(84%, calc((100vh - 300px) * 0.75)); aspect-ratio: 3 / 4; bottom: auto; height: auto; display: flex; align-items: flex-end; justify-content: center; z-index: 1; pointer-events: none; }
.cs-name { position: relative; z-index: 2; padding: calc(14px + var(--safe-top)) 16px 6px; color: var(--leaf2); text-shadow: 0 2px 8px rgba(0,0,0,.8); }
.cs-name b { display: block; font-size: 1.35rem; line-height: 1.2; }
.cs-name small { font-size: .82rem; opacity: .85; }
.cs-thread { position: relative; z-index: 2; align-self: end; display: flex; flex-direction: column; gap: 8px; margin-left: 42%; padding: 8px 14px 10px 0; max-height: 100%; overflow-y: auto; cursor: pointer;
  -webkit-mask-image: linear-gradient(transparent, #000 24px); mask-image: linear-gradient(transparent, #000 24px); }
.cs-thread .cb { max-width: 100%; }
.cs-thread .cb.you { max-width: 92%; }
.cs-replies { position: relative; z-index: 3; display: flex; flex-direction: column; gap: 8px; padding: 10px 14px calc(14px + var(--safe-bot)); background: linear-gradient(transparent, rgba(20,14,8,.85) 18px); }
.reply { display: block; width: 100%; text-align: left; padding: 10px 14px; border: 0; border-radius: 16px 16px 4px 16px; background: rgba(31,122,114,.94); color: #F3E7C6; font: inherit; box-shadow: 0 4px 12px rgba(0,0,0,.35); cursor: pointer; }
.reply b { display: block; font-size: .95rem; }
.reply small { display: block; font-size: .8rem; opacity: .85; line-height: 1.35; }
.reply:disabled { background: rgba(60,62,90,.85); opacity: .7; }
.reply.go { text-align: center; background: var(--sindoor); border-radius: 16px; }
.reply:active:not(:disabled) { transform: scale(.98); }
.cs-skip { margin: 0; text-align: center; color: var(--leaf2); opacity: .7; font-size: .8rem; }
@media (max-height: 700px) { .cs-fig { width: 64%; } .cs-thread { margin-left: 36%; } .reply { padding: 8px 12px; } .reply small { font-size: .75rem; } }

/* Interiors: the keeper stands in the room and greets you in a bubble. */
.int-stage { position: relative; z-index: 2; display: flex; align-items: flex-end; min-height: min(46vh, 380px); padding: 6px 14px 0 0; }
.int-fig { flex: 0 0 46%; min-width: 0; overflow: hidden; height: min(46vh, 380px); display: flex; align-items: flex-end; justify-content: center; margin-bottom: -10px; }
.int-talk { flex: 1 1 0; display: flex; flex-direction: column; gap: 6px; padding-bottom: 22px; color: var(--leaf2); min-width: 0; }
.int-talk h2 { margin: 0; font-size: 1.3rem; line-height: 1.2; text-shadow: 0 2px 8px rgba(0,0,0,.75); }
.int-talk .int-sub { align-self: flex-start; flex-wrap: wrap; }
.int-talk .cb { max-width: 100%; font-style: italic; }
@media (prefers-reduced-motion: reduce) { .fig, .cb.fresh, .cb.typing i { animation: none !important; } }

.cs-fig .fig.stand-in img { height: auto; width: 100%; }
.int-talk .cb { max-height: 34vh; overflow-y: auto; }

.cs-fig .fig.painted .fig-l { object-position: top center; }
.cs-fig .fig { height: 100%; }
.fig.painted { -webkit-mask-image: linear-gradient(#000 80%, transparent 99%); mask-image: linear-gradient(#000 80%, transparent 99%); }

/* Bazaar: separate Buy and Sell (0.9) */
.bz-tabs { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0 10px 6px; padding: 4px; border-radius: 14px; background: rgba(26,20,14,.6); backdrop-filter: blur(2px); }
.bz-tab { border: 0; border-radius: 10px; padding: 8px 0; font: 700 1rem 'Martel', serif; color: var(--leaf2); background: transparent; }
.bz-tab.on { background: var(--turmeric); color: var(--ink); box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.bz-tab i { font-style: normal; font-size: .72rem; background: var(--sindoor); color: #fff; border-radius: 8px; padding: 0 6px; margin-left: 4px; vertical-align: 2px; }
.bz-tab.on i { background: var(--ink); }
.bz-name small { display: block; font-weight: 400; font-size: .68rem; color: var(--leaf3); line-height: 1.1; }
.bz-num.dim { color: var(--leaf3); font-weight: 400; } .bz-num.up { color: #7EE0A0; } .bz-num.down { color: #FF9C84; }
.bz-empty { margin: 10px 4px; font-style: italic; color: var(--leaf3); text-align: center; }
.bz-trade .bz-empty { color: var(--ink2); }
.bz-room { margin-left: auto; align-self: center; font-size: .75rem; color: var(--ink2); }
.bz-go { min-height: 50px; flex-direction: column; gap: 0; line-height: 1.15; } .bz-go small { font-size: .78rem; font-weight: 700; opacity: .9; }
.bz-go.loss { background: var(--bad); }

/* ---------- Rooms (0.9): the keeper, you, their line by their face, and chat bars instead of a sheet ---------- */
.interior.room .psheet { position: relative; height: 100%; overflow: hidden; display: block; background: #1a120b; }
.room .int-head { position: relative; z-index: 5; }
.room-keeper { position: absolute; z-index: 1; left: -10%; top: calc(52px + var(--safe-top)); width: min(66%, calc((100vh - 360px) * 0.75 * 1.05)); aspect-ratio: 3 / 4; pointer-events: none; }
.room-you { position: absolute; z-index: 1; right: -14%; top: 31%; width: min(54%, calc((100vh - 420px) * 0.75)); aspect-ratio: 3 / 4; pointer-events: none; filter: brightness(.92); }
.room-you .fig.stand-in img { width: 92%; height: auto; object-position: 50% 20%; border-width: 2px; }
/* No keeper here: you stay on your own side of the room, never in the keeper's place. */
.room-keeper .fig, .room-you .fig { height: 100%; }
.room-keeper .fig.painted .fig-l, .room-you .fig.painted .fig-l { object-position: top center; }
.room-say { position: absolute; z-index: 3; top: calc(62px + var(--safe-top)); right: 10px; width: 52%; display: flex; flex-direction: column; gap: 6px; }
.no-keeper .room-say { width: 46%; }
.room-name { margin: 0; display: flex; flex-direction: column; gap: 3px; color: var(--leaf2); text-shadow: 0 2px 8px rgba(0,0,0,.85); }
.room-name b { font-family: 'Rozha One', serif; font-weight: 400; font-size: 1.3rem; line-height: 1.1; }
.room-name span { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .76rem; font-weight: 700; padding: 1px 10px; border-radius: 10px; background: rgba(20,22,48,.62); text-shadow: none; }
.room-name .hearts { margin: 0; }
.room-line { position: relative; margin: 2px 0 0; padding: 9px 12px; border-radius: 4px 16px 16px 16px; background: rgba(20,18,40,.66); color: var(--leaf2); font-style: italic; font-size: .9rem; line-height: 1.4; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); border: 1px solid rgba(243,231,198,.18); max-height: 30vh; overflow-y: auto; }
.room-line::before { content: ''; position: absolute; left: -7px; top: 0; border: 7px solid transparent; border-top-color: rgba(20,18,40,.66); border-right-color: rgba(20,18,40,.66); }

/* Everything you can do: slim chat bars over the scene. */
.interior.room .psheet-body.room-bars { position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; max-height: 52%; min-height: 0; margin: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 30px 12px calc(14px + var(--safe-bot)); background: linear-gradient(rgba(14,10,6,0), rgba(14,10,6,.72) 46px, rgba(14,10,6,.86)); border-radius: 0; box-shadow: none; color: var(--leaf2);
  -webkit-mask-image: linear-gradient(transparent, #000 26px); mask-image: linear-gradient(transparent, #000 26px); }
.room-bars .band, .room-bars > .keeper:first-of-type, .room-bars .hint { display: none !important; }
.room-bars .block { background: transparent; padding: 0; margin: 10px 0 0; border: 0; box-shadow: none; }
.room-bars .block::before, .room-bars .block::after { display: none; }
.room-bars h3 { margin: 12px 4px 5px; font: 700 .68rem 'Martel', serif; text-transform: uppercase; letter-spacing: .12em; color: var(--turmeric); }
.room-bars p, .room-bars .note, .room-bars .blurb { margin: 4px 0; padding: 7px 12px; border-radius: 14px; background: rgba(20,22,48,.6); color: var(--leaf2); font-size: .86rem; line-height: 1.4; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.room-bars p.fine, .room-bars p.muted, .room-bars .fine, .room-bars .muted { background: transparent; padding: 2px 8px; font-size: .76rem; font-style: italic; color: var(--leaf3); backdrop-filter: none; }
.room-bars blockquote { margin: 6px 30px 6px 0; padding: 9px 12px; border-radius: 4px 16px 16px 16px; background: var(--leaf2); color: var(--ink); font-style: italic; font-size: .88rem; border: 0; }
.room-bars b, .room-bars strong { color: inherit; }
.room-bars .keeper { gap: 10px; align-items: center; margin: 4px 0; padding: 6px 10px; border-radius: 14px; background: rgba(20,22,48,.6); }
.room-bars .keeper p { background: transparent; padding: 0; }
.room-bars .keeper .portrait { width: 44px !important; height: 44px !important; border-radius: 50%; }
.room-bars .row-btns, .room-bars .chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; margin: 4px 0; }
/* Buttons become your replies: right-aligned pills. */
.room-bars .btn, .room-bars .chip, .room-bars .choice { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: auto; max-width: 100%; min-height: 40px; margin: 4px 0 4px auto; padding: 8px 16px;
  border: 0; border-radius: 20px 20px 6px 20px; background: rgba(31,122,114,.9); color: #F3E7C6; font: 700 .9rem 'Martel', serif; text-align: center; box-shadow: 0 3px 10px rgba(0,0,0,.35); }
.room-bars .block > .btn, .room-bars > .btn, .room-bars .block > .chip { display: flex; margin-left: auto; }
.room-bars .btn.primary { background: var(--sindoor); }
.room-bars .btn.ghost { background: rgba(243,231,198,.1); box-shadow: inset 0 0 0 1.5px rgba(243,231,198,.45); }
.room-bars .btn:disabled, .room-bars .chip:disabled, .room-bars .choice:disabled { background: rgba(60,62,90,.6); color: rgba(243,231,198,.55); box-shadow: none; }
.room-bars .btn small, .room-bars .choice small { font-weight: 400; font-size: .74rem; opacity: .85; }
.room-bars .choice { flex-direction: column; align-items: flex-end; text-align: right; }
.room-bars .buy-wagon, .room-bars .posting, .room-bars .contract, .room-bars .wagon, .room-bars li { background: rgba(20,22,48,.6); color: var(--leaf2); border-radius: 14px; border: 0; padding: 6px 10px; margin: 4px 0; }
.room-bars .buy-wagon .btn, .room-bars .buy-wagon .chip { margin: 0 0 0 auto; min-height: 34px; padding: 5px 12px; }
.room-bars input, .room-bars select { background: rgba(243,231,198,.92); color: var(--ink); border-radius: 10px; }
.room-bars .hearts i { color: var(--leaf3); } .room-bars .hearts i.on { color: var(--sindoor); }
@media (max-height: 700px) {
  .room-keeper { width: min(56%, calc((100vh - 330px) * 0.75)); }
  .room-you { top: 27%; width: min(44%, calc((100vh - 380px) * 0.75)); }
  .room-line { font-size: .84rem; max-height: 24vh; }
  .interior.room .psheet-body.room-bars { max-height: 56%; }
}
.bz-go.loss, .bz-go.loss small { color: #FFF4E6; }
/* You, in conversations: on the right, behind the thread. */
.cs-you { position: absolute; z-index: 1; right: -16%; top: 34%; width: min(52%, calc((100vh - 420px) * 0.75)); aspect-ratio: 3 / 4; pointer-events: none; filter: brightness(.85); }
.cs-you .fig { height: 100%; } .cs-you .fig.painted .fig-l { object-position: top center; }
.cs-you .fig.stand-in img { width: 92%; height: auto; border-width: 2px; }
.cs-thread .cb.note { background: rgba(20,22,48,.78); }
@media (max-height: 700px) { .cs-you { top: 30%; width: min(42%, calc((100vh - 380px) * 0.75)); } }

/* ===================== Vintage dialogue look (0.9) =====================
   One style for every conversation, room and the bazaar: dark lacquered panels with a thin gold double rule
   and diamond corners; speaker names in gold small caps; choices as a plain list of lines with a ◆ marker. */
:root { --v-bg: linear-gradient(180deg, rgba(22,15,10,.9), rgba(30,21,13,.93)); --v-gold: #C9A227; --v-line: rgba(201,162,39,.7); --v-text: #EFE3C4; --v-dim: rgba(239,227,196,.62); --v-hi: rgba(224,165,38,.26); }
.vbox, .room-line, .cs-thread .cb.them, .cs-replies, .room-bars, .bz-board, .bz-trade, .bz-tabs {
  position: relative; background: var(--v-bg) !important; color: var(--v-text) !important; border: 1px solid var(--v-line) !important; border-radius: 3px !important;
  box-shadow: inset 0 0 0 3px rgba(14,10,6,.92), inset 0 0 0 4px rgba(201,162,39,.28), 0 8px 22px rgba(0,0,0,.55) !important; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.room-line::before { display: none; }
.vbox::before, .room-line::after, .cs-replies::before, .room-bars::before, .bz-trade::before, .bz-board::before, .cs-thread .cb.them::before {
  content: '◆'; position: absolute; top: -7px; left: 50%; transform: translateX(-50%); font-size: 10px; line-height: 1; color: var(--v-gold); text-shadow: 0 0 4px rgba(0,0,0,.9); }
/* Speaker lines: subtitle boxes. */
.room-line, .cs-thread .cb.them { font-family: 'Martel', Georgia, serif; font-style: normal; font-size: .9rem; line-height: 1.5; padding: 10px 13px !important; }
.cs-thread .cb.them { border-radius: 3px !important; max-width: 100%; }
.cs-thread .cb.note, .cb.note { background: transparent !important; box-shadow: none !important; border: 0 !important; color: var(--v-dim) !important; font-style: italic; text-align: left; padding: 2px 4px !important; text-shadow: 0 1px 6px rgba(0,0,0,.95); }
.cs-thread .cb.you { align-self: flex-end; background: transparent !important; box-shadow: none !important; border: 0 !important; color: var(--turmeric) !important; font-style: italic; font-weight: 700; padding: 2px 4px !important; text-shadow: 0 1px 6px rgba(0,0,0,.95); }
.cs-thread .cb.you::before { content: '— '; }
.cs-thread .cb.typing { background: rgba(22,15,10,.85); border: 1px solid var(--v-line); border-radius: 3px; }
.cs-thread .cb.typing i { background: var(--v-gold); }
.room-name b, .cs-name b { font-family: 'Martel', serif; font-weight: 700; font-variant: small-caps; letter-spacing: .06em; color: var(--v-gold); font-size: 1.2rem; }
.room-name span, .cs-name small { background: transparent !important; padding: 0 !important; color: var(--v-dim); font-style: italic; font-weight: 400; }
/* Choices: a list of lines in one panel. */
.cs-replies { margin: 0 10px calc(10px + var(--safe-bot)); padding: 8px 4px !important; gap: 0 !important; }
.reply, .room-bars .btn, .room-bars .choice, .room-bars .chip {
  display: flex !important; align-items: baseline; gap: 8px; width: 100% !important; margin: 0 !important; padding: 9px 12px 9px 10px !important; min-height: 0 !important;
  background: transparent !important; color: var(--v-text) !important; border: 0 !important; border-radius: 2px !important; box-shadow: none !important; text-align: left !important; justify-content: flex-start !important;
  font: 400 .95rem/1.35 'Martel', Georgia, serif !important; flex-wrap: wrap; }
.reply::before, .room-bars .btn::before, .room-bars .choice::before, .room-bars .chip::before { content: '◆'; color: rgba(201,162,39,.55); font-size: .7rem; flex: none; transform: translateY(-1px); }
.reply b { font-weight: 700; display: inline; font-size: .95rem; }
.reply small, .room-bars .btn small, .room-bars .choice small { flex-basis: 100%; padding-left: 18px; color: var(--v-dim) !important; font-style: italic; font-size: .78rem !important; opacity: 1 !important; }
.reply:hover:not(:disabled), .reply:focus-visible, .reply:active:not(:disabled), .room-bars .btn:active:not(:disabled), .room-bars .chip:active:not(:disabled), .room-bars .btn:hover:not(:disabled), .room-bars .chip:hover:not(:disabled) {
  background: linear-gradient(90deg, var(--v-hi), transparent 85%) !important; color: #FFF4D6 !important; transform: none !important; }
.reply:hover::before, .reply:active::before, .room-bars .btn:hover::before, .room-bars .chip:hover::before { color: var(--v-gold); }
.reply + .reply { border-top: 1px solid rgba(201,162,39,.14) !important; }
.reply:disabled, .room-bars .btn:disabled, .room-bars .chip:disabled { color: rgba(239,227,196,.38) !important; background: transparent !important; }
.reply:disabled::before, .room-bars .btn:disabled::before { color: rgba(201,162,39,.25); }
.reply.go, .room-bars .btn.primary { color: var(--v-gold) !important; font-weight: 700 !important; justify-content: center !important; }
.reply.go::before { content: '◆'; } .reply.go::after { content: '◆'; color: rgba(201,162,39,.55); font-size: .7rem; }
.room-bars .btn.ghost { color: var(--v-dim) !important; }
.cs-skip { color: var(--v-dim); font-style: italic; }
/* Rooms: one framed panel holding notes and choices. */
.interior.room .psheet-body.room-bars { left: 8px; right: 8px; bottom: calc(8px + var(--safe-bot)); padding: 10px 6px 10px !important; max-height: 50%; -webkit-mask-image: none; mask-image: none; }
.room-bars h3 { color: var(--v-gold); margin: 10px 10px 2px; font-variant: small-caps; text-transform: none; letter-spacing: .1em; font-size: .82rem; border-bottom: 1px solid rgba(201,162,39,.2); padding-bottom: 3px; }
.room-bars .block:first-child h3, .room-bars > :first-child h3 { margin-top: 2px; }
.room-bars p, .room-bars .note, .room-bars .blurb, .room-bars .keeper, .room-bars .buy-wagon, .room-bars .posting, .room-bars .contract, .room-bars .wagon, .room-bars li {
  background: transparent !important; border: 0 !important; box-shadow: none !important; color: var(--v-text) !important; padding: 4px 10px !important; margin: 2px 0 !important; backdrop-filter: none; font-size: .86rem; }
.room-bars .buy-wagon, .room-bars .posting, .room-bars .contract { border-top: 1px solid rgba(201,162,39,.12) !important; }
.room-bars blockquote { background: transparent !important; color: var(--v-text) !important; border-left: 2px solid var(--v-gold) !important; border-radius: 0 !important; margin: 4px 10px !important; padding: 2px 10px !important; }
.room-bars .row-btns, .room-bars .chips { display: block !important; margin: 0 !important; }
.room-bars .buy-wagon .btn, .room-bars .buy-wagon .chip { width: auto !important; flex: none; padding: 4px 8px !important; }
.room-bars input, .room-bars select { background: rgba(14,10,6,.8) !important; color: var(--v-text) !important; border: 1px solid var(--v-line) !important; border-radius: 2px !important; }
.room-say { gap: 4px; }
/* Bazaar in the same dress. */
.bz-tabs { padding: 3px !important; }
.bz-tab { color: var(--v-dim); font-variant: small-caps; letter-spacing: .08em; border-radius: 2px; }
.bz-tab.on { background: linear-gradient(180deg, rgba(201,162,39,.35), rgba(201,162,39,.12)); color: var(--v-gold); box-shadow: inset 0 -2px 0 var(--v-gold); }
.bz-tab i { background: var(--sindoor); }
.bz-plate b { font-family: 'Martel', serif; font-weight: 700; font-variant: small-caps; color: var(--v-gold); letter-spacing: .05em; }
.bz-row.on { background: var(--v-hi); box-shadow: inset 2px 0 0 var(--v-gold); border-radius: 2px; }
.bz-trade { padding: 12px 12px 10px !important; }
.bz-sel b { font-family: 'Martel', serif; font-weight: 700; font-variant: small-caps; color: var(--v-gold); letter-spacing: .05em; }
.bz-paid, .bz-foot, .bz-room, .bz-trade .fine { color: var(--v-dim) !important; }
.bz-trade .step, .bz-trade .qty-in, .bz-trade .chip { background: rgba(14,10,6,.75) !important; color: var(--v-text) !important; border: 1px solid rgba(201,162,39,.5) !important; border-radius: 2px !important; box-shadow: none !important; }
.bz-trade .chip:disabled { color: rgba(239,227,196,.35) !important; border-color: rgba(201,162,39,.2) !important; }
.bz-trade .btn, .bz-go { background: linear-gradient(180deg, #5A2A16, #3A180C) !important; color: var(--v-text) !important; border: 1px solid var(--v-line) !important; border-radius: 2px !important; box-shadow: inset 0 0 0 2px rgba(14,10,6,.6) !important; font-variant: small-caps; letter-spacing: .04em; }
.bz-trade .btn.primary, .bz-go { background: linear-gradient(180deg, #8C5A12, #5E3A08) !important; color: #FFF0C8 !important; }
.bz-trade .btn:disabled, .bz-go:disabled { background: rgba(40,30,20,.7) !important; color: rgba(239,227,196,.35) !important; border-color: rgba(201,162,39,.2) !important; }
.bz-go.loss { background: linear-gradient(180deg, #7A1E12, #4E1008) !important; }
.bz-empty { color: var(--v-dim) !important; }
/* Amount pickers stay in a row of small plaques. */
.room-bars .chips { display: flex !important; flex-wrap: wrap; gap: 6px; padding: 4px 10px; }
.room-bars .chips .chip { width: auto !important; flex: 0 0 auto; padding: 5px 12px !important; border: 1px solid rgba(201,162,39,.5) !important; background: rgba(14,10,6,.6) !important; font-size: .85rem !important; }
.room-bars .chips .chip::before { display: none; }
.cs-thread .cb.note { color: rgba(239,227,196,.82) !important; text-shadow: 0 1px 3px #000, 0 0 10px rgba(0,0,0,.95); }
/* Narration: readable over busy paintings. */
.cs-thread .cb.note { background: rgba(10,8,6,.62) !important; border-radius: 3px !important; padding: 5px 10px !important; backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }

/* One line at a time (0.9): the current line in a subtitle box near the bottom, the previous one faded above it. */
.chat-scene .cs-thread { margin: 0 10px 8px !important; align-self: end; max-height: 46%; overflow-y: auto; -webkit-mask-image: none; mask-image: none; gap: 6px; }
.chat-scene .cs-thread:not(.log) .cb:not(:last-child) { opacity: .55; font-size: .82rem; }
.chat-scene .cs-thread:not(.log) .cb { max-width: 100%; }
.chat-scene .cs-thread.log { max-height: 62%; background: rgba(10,8,6,.82); border: 1px solid var(--v-line); padding: 10px; }
.chat-scene .cs-thread .cb.them, .chat-scene .cs-thread .cb.note { font-size: .95rem; }
.cs-log { position: absolute; z-index: 6; top: calc(14px + var(--safe-top)); right: 12px; padding: 4px 12px; font: 700 .78rem 'Martel', serif; font-variant: small-caps; letter-spacing: .08em; color: var(--v-gold); background: rgba(14,10,6,.75); border: 1px solid var(--v-line); border-radius: 2px; }
.cs-replies .reply.go { justify-content: center !important; }
.cs-count { margin-left: 10px; font-weight: 400; font-size: .75rem; color: var(--v-dim); }
.cs-skip { display: block; width: 100%; margin: 2px 0 0; padding: 6px; border: 0; background: transparent; font: italic .78rem 'Martel', serif; color: var(--v-dim) !important; text-align: center; }
/* Cards inside rooms (relics, vehicles, properties) take the vintage dress too. */
.room-bars .relic, .room-bars .owned, .room-bars .wagon, .room-bars [class*="-card"], .room-bars .vehicle { background: rgba(14,10,6,.55) !important; border: 1px solid rgba(201,162,39,.35) !important; border-radius: 3px !important; color: var(--v-text) !important; box-shadow: none !important; }
.room-bars .relic small, .room-bars .relic p { color: var(--v-dim) !important; }
.room-bars .relic .btn, .room-bars .relic .chip { width: auto !important; flex: none; margin-left: auto !important; }
/* Thumb-sized targets everywhere (review, 31 Oct): at least 46px tall. */
.bz-row { min-height: 46px !important; }
.bz-trade .step, .bz-qty .step, .bz-qty .qty-in { height: 46px !important; min-height: 46px !important; }
.bz-qty { grid-template-columns: 50px 46px 1fr 46px 50px !important; }
.bz-trade .chip { min-height: 44px !important; padding: 8px 14px !important; }
.bz-tab { min-height: 46px; }
.reply, .room-bars .btn, .room-bars .choice { min-height: 48px !important; align-items: center !important; }
.room-bars .chips .chip { min-height: 44px !important; }
@media (max-height: 700px) { .bz-row { min-height: 40px !important; } .bz-board { overflow-y: auto; } }
/* Map: deadlines and the rival (0.9) */
.due-txt { font: 700 10px 'Martel', serif; fill: #FFF4D6; }
.rival-k { font: 700 11px 'Martel', serif; fill: #FFE7A0; }
.rival-lbl { font-size: 10px; fill: #FFE7A0; paint-order: stroke; stroke: rgba(20,12,4,.85); stroke-width: 3px; }
.rival-mark circle { filter: drop-shadow(0 1px 3px rgba(0,0,0,.7)); }
.due-pill { display: inline-block; margin-top: 4px; padding: 2px 10px; border-radius: 3px; font: 700 .74rem 'Martel', serif; color: var(--v-text); background: rgba(14,10,6,.75); border: 1px solid var(--v-line); }
.due-pill.hot { background: rgba(122,30,18,.9); color: #FFF4E6; border-color: #E0A526; animation: duepulse 1.6s ease-in-out infinite; }
@keyframes duepulse { 50% { box-shadow: 0 0 0 3px rgba(224,165,38,.35); } }
@media (prefers-reduced-motion: reduce) { .due-pill.hot { animation: none; } }
.rival-note { margin: 6px 0; padding: 6px 10px; border-left: 3px solid var(--turmeric); background: rgba(94,58,8,.12); font-size: .84rem; }
/* Reading standard (ChatGPT review): narrative 16-17px on near-opaque panels, secondary 14px. */
.chat-scene .cs-thread .cb.them, .chat-scene .cs-thread .cb.note, .room-line { font-size: 1.05rem !important; line-height: 1.5 !important; }
.chat-scene .cs-thread .cb.note { background: rgba(14,10,6,.88) !important; color: rgba(239,227,196,.9) !important; }
.chat-scene .cs-thread .cb.them { background: rgba(22,15,10,.95) !important; }
.chat-scene .cs-thread:not(.log) .cb:not(:last-child) { font-size: .88rem !important; }
.reply b, .room-bars .btn, .room-bars .choice { font-size: 1rem !important; }
.reply small, .room-bars .btn small, .room-bars .choice small { font-size: .875rem !important; }
.room-bars p, .room-bars .note, .room-bars .blurb { font-size: .92rem !important; }
.room-bars p.fine, .room-bars p.muted, .room-bars .fine, .room-bars .muted { font-size: .84rem !important; }
@media (max-height: 700px) { .chat-scene .cs-thread .cb.them, .chat-scene .cs-thread .cb.note, .room-line { font-size: .98rem !important; } }
.reply b, .room-bars .btn > b { flex: 1 1 0; min-width: 0; }
.reply { flex-wrap: wrap; }
.reply::before { align-self: flex-start; transform: translateY(6px); }

/* ---------- 0.10: guide, preview, objective, tabs, cards; three looks (lacquer for talk, parchment for records, indigo for tactics) ---------- */
:root { --p-bg: #F1E4C3; --p-ink: #3A2A18; --p-line: #B89A5E; --t-bg: linear-gradient(180deg, #1C2250, #12163A); --t-line: #6F7BD8; --t-text: #E8EAFF; }
.guide-chip { position: absolute; z-index: 8; left: 12px; right: 96px; bottom: calc(92px + var(--safe-bot)); display: flex; gap: 6px; animation: rise .3s ease-out; }
.guide-go { flex: 1; min-height: 52px; display: flex; align-items: center; gap: 10px; padding: 8px 14px; text-align: left; border-radius: 3px; border: 1px solid var(--v-line); background: var(--v-bg); color: var(--v-text); box-shadow: inset 0 0 0 3px rgba(14,10,6,.9), inset 0 0 0 4px rgba(201,162,39,.3), 0 6px 18px rgba(0,0,0,.5); font-weight: 700; font-size: .95rem; }
.guide-go .ic { width: 24px; height: 24px; color: var(--v-gold); flex: none; }
.guide-go small { display: block; font-variant: small-caps; letter-spacing: .1em; color: var(--v-gold); font-weight: 400; font-size: .75rem; }
.guide-x { width: 44px; min-height: 52px; border-radius: 3px; border: 1px solid rgba(201,162,39,.4); background: rgba(14,10,6,.75); color: var(--v-dim); display: grid; place-items: center; }
.guide-x .ic { width: 16px; height: 16px; }
.guide-hl { animation: guidepulse 1.6s ease-in-out infinite; }
.spot.guide-hl .spot-pin { outline: 3px solid var(--turmeric); outline-offset: 2px; }
.bz-row.guide-hl { box-shadow: inset 0 0 0 2px var(--turmeric) !important; }
@keyframes guidepulse { 50% { filter: brightness(1.25); } }
@media (prefers-reduced-motion: reduce) { .guide-hl { animation: none; } }

.bz-preview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px 6px; margin: 4px 10px 6px; padding: 6px 8px; border: 1px solid rgba(201,162,39,.3); border-radius: 2px; background: rgba(14,10,6,.55); font-size: .95rem; color: var(--v-text); }
.bz-preview span { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; font-weight: 700; }
.bz-preview small { font-weight: 400; color: var(--v-dim); font-size: .72rem; font-variant: small-caps; letter-spacing: .05em; }
.bz-preview .pv-tot { text-align: right; }
.bz-preview.up .pv-tot { color: #9FD99A; } .bz-preview.down .pv-tot { color: #F2A08E; }
.bz-preview i { grid-column: 1 / -1; font-size: .72rem; color: var(--v-dim); }
.bz-preview.none { display: block; font-size: .82rem; color: var(--v-dim); }

.objective { margin: 0 0 12px; padding: 12px 14px; border-radius: 3px; background: var(--v-bg); color: var(--v-text); border: 1px solid var(--v-line); box-shadow: inset 0 0 0 3px rgba(14,10,6,.92), inset 0 0 0 4px rgba(201,162,39,.28); }
.objective .obj-k { margin: 0; color: var(--v-gold); font-variant: small-caps; letter-spacing: .1em; font-size: .8rem; }
.objective .obj-t { margin: 2px 0; font-size: 1.08rem; font-weight: 700; line-height: 1.3; }
.objective .obj-s { margin: 0; color: var(--v-dim); font-size: .85rem; }

details.fold { margin: 8px 0; border-top: 1px solid rgba(90,70,50,.25); }
details.fold > summary { list-style: none; cursor: pointer; min-height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 4px; font-family: 'Rozha One', serif; font-size: 1.05rem; color: var(--ink); }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: '▾'; color: var(--ink2); transition: transform .2s; }
details.fold[open] > summary::after { transform: rotate(180deg); }
details.fold > summary small { margin-left: auto; margin-right: 10px; font-family: 'Martel', serif; font-size: .8rem; color: var(--ink2); }

.parchment { background: var(--p-bg) !important; color: var(--p-ink) !important; border: 1px solid var(--p-line) !important; border-radius: 3px; box-shadow: inset 0 0 0 3px rgba(255,250,235,.6), inset 0 0 18px rgba(150,110,50,.18) !important; padding: 10px 12px !important; }
.parchment h3 { color: #6B2A12 !important; font-variant: small-caps; letter-spacing: .06em; }
.qlist { list-style: none; margin: 0; padding: 0; }
.qlist li { display: grid; grid-template-columns: 30px 1fr auto; gap: 8px; align-items: center; min-height: 46px; border-top: 1px solid rgba(120,90,50,.18); }
.qlist li:first-child { border-top: 0; }
.qlist li > span:last-child { text-align: right; display: flex; flex-direction: column; font-size: .92rem; }
.qlist small { color: #7A6448; font-size: .75rem; }
.qlist .up { color: #2E6B2A; }
.qlist .g-ic { width: 28px; height: 28px; }

.route-big { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 10px; }
.route-big > div { display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border-radius: 3px; background: var(--t-bg); color: var(--t-text); border: 1px solid var(--t-line); }
.route-big b { font-size: 1.6rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.route-big small { font-variant: small-caps; letter-spacing: .08em; font-size: .78rem; opacity: .85; }
.route-big .warm b { color: #FFD27A; } .route-big .hot b { color: #FF9C86; }
.map-card .route { margin-top: 10px; }

.balance { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0 6px 8px; text-align: center; }
.balance small { display: block; font-variant: small-caps; color: #7A6448; font-size: .74rem; letter-spacing: .05em; }
.balance b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.balance .bad b { color: #9E2614; }
.s-tabs { display: flex; gap: 4px; margin: 0 6px 8px; padding: 3px; border-radius: 3px; background: rgba(14,10,6,.55); border: 1px solid rgba(201,162,39,.4); }
.s-tab { flex: 1; min-height: 46px; border-radius: 2px; color: var(--v-dim); font-variant: small-caps; letter-spacing: .06em; font-size: .95rem; background: transparent; border: 0; }
.s-tab.on { background: linear-gradient(180deg, rgba(201,162,39,.35), rgba(201,162,39,.12)); color: var(--v-gold); box-shadow: inset 0 -2px 0 var(--v-gold); }
.s-tab i { font-style: normal; font-size: .72rem; padding: 1px 6px; border-radius: 9px; background: var(--sindoor); color: #fff; margin-left: 4px; }
.matters-sheet .s-tabs { margin: 8px 12px 0; background: var(--indigo); }

.post-card { margin: 8px 10px; padding: 10px 12px; border-radius: 3px; background: var(--p-bg); color: var(--p-ink); border: 1px solid var(--p-line); box-shadow: inset 0 0 0 3px rgba(255,250,235,.6), 0 3px 10px rgba(0,0,0,.25); }
.post-card p { margin: 0 !important; padding: 0 !important; border: 0 !important; color: var(--p-ink) !important; }
.post-card .pc-tag { font-variant: small-caps; letter-spacing: .1em; font-size: .78rem; color: #6B2A12 !important; }
.post-card .pc-pay { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.post-card .pc-pay small { font-size: .78rem; font-weight: 400; }
.post-card .pc-what { font-size: 1rem; } .post-card .pc-when { font-size: .82rem; color: #6E5A40 !important; margin-bottom: 6px !important; }
.post-card.mine { border-color: var(--turmeric); box-shadow: inset 0 0 0 2px var(--turmeric); }
.post-card.wanted .pc-tag { color: #9E2614 !important; }
.room-bars .post-card .btn { background: #3A2A18 !important; color: #F8EBCB !important; border-radius: 2px !important; justify-content: center !important; margin: 0 !important; width: 100% !important; }
.room-bars .post-card .btn::before { display: none; }
.room-bars .post-card .btn:disabled { background: rgba(58,42,24,.35) !important; color: rgba(58,42,24,.6) !important; }
.room-bars .post-card .link { color: #6B2A12 !important; }

.modal.tactical { background: var(--t-bg); color: var(--t-text); border-top-color: var(--t-line); }
.modal.tactical h2, .modal.tactical .label, .modal.tactical .odds-cap { color: #FFFFFF; }
.modal.tactical .modal-art::after { background: linear-gradient(transparent, #1C2250); }
.modal.tactical .modal-art .art-title { text-shadow: 0 0 8px #12163A, 0 0 3px #12163A; color: #fff; }
.modal.tactical .choice { background: rgba(255,255,255,.06); color: var(--t-text); border: 1px solid rgba(111,123,216,.6); }
.modal.tactical .choice small { color: rgba(232,234,255,.75); }
.modal.tactical .choice:disabled { opacity: .45; }
.modal.tactical .stances .choice { border-width: 2px; }
.modal.tactical .fine, .modal.tactical .note { color: rgba(232,234,255,.7); }
.modal.tactical .outcome { background: rgba(255,255,255,.07); border-radius: 3px; padding: 6px 10px; }
.modal.tactical .outcome.good { border-left: 3px solid #7FD08A; } .modal.tactical .outcome.bad { border-left: 3px solid #FF8C7A; }
.modal.tactical details.fold { border-color: rgba(111,123,216,.4); }
.modal.tactical details.fold > summary { color: var(--t-text); font-family: 'Martel', serif; font-size: .95rem; }
.modal.tactical details.fold > summary::after { color: var(--t-text); }
.modal.tactical .rounds li.good { color: #A9E6AF; } .modal.tactical .rounds li.bad { color: #FFB3A6; }
.modal.tactical .odds-bar { background: rgba(255,120,100,.35); }
.modal.tactical .verdict { color: #fff; }
.modal.tactical .btn.primary { background: #6F7BD8; color: #0E1130; border: 0; }
.room-bars .post-card { background: var(--p-bg) !important; border: 1px solid var(--p-line) !important; opacity: 1 !important; }
.room-bars .post-card.mine { border-color: var(--turmeric) !important; }
.modal.tactical .outcome p { color: var(--t-text) !important; opacity: 1; }
.guide-chip ~ .swipe-hint { display: none; }
.end .epilogue { text-align: left; margin: 14px 0; padding: 12px 14px; background: var(--p-bg); color: var(--p-ink); border: 1px solid var(--p-line); border-radius: 3px; box-shadow: inset 0 0 0 3px rgba(255,250,235,.6); }
.end .epilogue h3 { margin: 0 0 6px; color: #6B2A12; font-variant: small-caps; letter-spacing: .06em; }
.end .epilogue p { margin: 6px 0; line-height: 1.45; font-size: .98rem; }
.restore-in { width: 100%; min-height: 56px; margin: 4px 0 8px; padding: 8px; border-radius: 8px; border: 1px solid var(--leaf3); background: #FFF9EA; color: var(--ink); font: .8rem/1.3 monospace; resize: vertical; }
.file-btn { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.room-bars .post-card .pc-pay { font-size: 1.5rem !important; font-weight: 700; }
.room-bars .post-card .pc-tag { font-size: .78rem !important; } .room-bars .post-card .pc-when { font-size: .84rem !important; } .room-bars .post-card .pc-what { font-size: 1rem !important; }

/* ---------- 0.11: from the overnight reviews ---------- */
/* The guide is the one thing to do: make it the brightest thing on the street. */
.guide-go { background: linear-gradient(180deg, #C2361F, #9E2614) !important; border-color: #F0C35A !important; color: #FFF6E0 !important; box-shadow: 0 0 0 2px rgba(240,195,90,.5), 0 8px 22px rgba(0,0,0,.55) !important; }
.guide-go small, .guide-go .ic { color: #FFE2A0 !important; }
/* The goal under the town name, always visible. */
button.due-pill { border: 0; font: inherit; cursor: pointer; text-align: left; max-width: 100%; }
.due-pill.goal { background: rgba(26,29,58,.88); color: var(--leaf2); border: 1px solid rgba(240,195,90,.55); white-space: normal; line-height: 1.3; padding: 4px 10px; }
.due-pill.goal b { color: var(--turmeric); font-variant: small-caps; letter-spacing: .06em; margin-right: 4px; }
/* First-time bazaar: one good, and a way to see the rest. */
.bz-board.focus .bz-row { min-height: 60px; }
.bz-more { display: block; width: calc(100% - 20px); margin: 6px 10px 8px; min-height: 44px; border: 1px dashed rgba(201,162,39,.5); background: transparent; color: var(--v-dim); font-variant: small-caps; letter-spacing: .06em; border-radius: 2px; }
.bz-preview .pv-warn { color: #FFB3A6 !important; font-style: normal; }
/* Readable small print in tactical screens and on buttons; disabled actions still legible. */
.modal.tactical .choice small { color: rgba(255,255,255,.9) !important; font-size: .82rem !important; }
.modal.tactical .choice b { font-size: 1.02rem; }
.stances.one { grid-template-columns: 1fr !important; }
.stances.one .choice { min-height: 64px; }
.choice small, .reply small { font-size: .84rem !important; }
.room-bars .btn:disabled, .room-bars .chip:disabled, .btn:disabled { opacity: 1 !important; color: rgba(239,227,196,.55) !important; }
.page .btn:disabled, .modal:not(.tactical) .btn:disabled { color: rgba(43,29,18,.5) !important; }
.room-bars .req, .req { font-weight: 600; }
/* Rooms: smaller figures, more room for what you can do. */
.interior.room .psheet-body.room-bars { max-height: 60% !important; }
.interior.room .room-keeper .fig, .interior.room .room-you .fig { transform: scale(.88); transform-origin: bottom center; }
/* Ledger: town names stay put while the table scrolls sideways. */
.table-wrap th:first-child { position: sticky; left: 0; z-index: 1; background: var(--leaf2); }
.table-wrap thead th { position: sticky; top: 0; background: var(--leaf2); }
/* Map: road notes folded under the numbers. */
.map-card .road-notes { margin-top: 8px; }
.map-card .road-notes > summary { min-height: 44px; font-size: .95rem; }
/* Living streets rest while something is open on top of them. */
.street-full.paused *, .street-full.paused *::before, .street-full.paused *::after { animation-play-state: paused !important; }
.toggle input { flex: none; min-width: 24px; }
.s-tab.on { box-shadow: inset 0 -4px 0 var(--v-gold) !important; font-weight: 700; }
.modal.tactical.bad.lost { animation: lostshake .45s ease-in-out 1; }
@keyframes lostshake { 0%,100% { transform: none; } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }
@media (prefers-reduced-motion: reduce) { .modal.tactical.bad.lost { animation: none; } }
.room-line.long { font-size: .9rem !important; line-height: 1.4 !important; }

/* ---------- 0.11 round 2 ---------- */
.stats-strip.labelled .st { position: relative; padding-bottom: 9px; }
.stats-strip.labelled .st::after { content: attr(data-l); position: absolute; left: 0; right: 0; bottom: -2px; text-align: center; font-size: .6rem; letter-spacing: .06em; font-variant: small-caps; color: rgba(243,231,198,.8); }
.order-banner .ob-cancel { display: flex; justify-content: flex-end; margin-top: 6px; }
.btn.small { min-height: 40px; padding: 6px 14px; font-size: .88rem; }
.bz-qty { display: grid !important; grid-template-columns: 56px 1fr 64px 56px; gap: 6px; align-items: center; }
.bz-qty .step { min-width: 56px; min-height: 48px; font-size: 1.3rem; }
.bz-qty .qty-range { width: 100%; height: 44px; accent-color: var(--v-gold); margin: 0; }
.bz-qty .qty-in { min-width: 0; text-align: center; }
.bz-foot .bz-back { color: var(--v-gold) !important; font-weight: 700; min-height: 40px; padding: 0 6px 0 0; }
.s-tab.on { background: rgba(201,162,39,.38) !important; color: #FFE7A3 !important; }
.chat-scene .cs-thread .cb.note { color: #F3E7C6 !important; opacity: 1 !important; }
.map-card h3 small { display: block; font-size: .8rem; font-family: 'Martel', serif; color: var(--ink2); font-weight: 400; }
.modal.tactical details.tactics { margin-top: 6px; }
.modal.tactical details.tactics > summary { min-height: 44px; font-size: .9rem; }
.objective .btn.ghost.small { margin-top: 8px; color: var(--v-gold); border-color: rgba(201,162,39,.6); background: transparent; }
.bz-qty { grid-template-columns: 64px 1fr 64px !important; }
.bz-slide { display: block; width: calc(100% - 20px); margin: 2px 10px 4px; height: 36px; accent-color: var(--v-gold); }
.spot.dim .spot-pin { opacity: .45; filter: saturate(.4); }
.merchant.locked { padding-top: 10px; padding-bottom: 10px; }
.merchant.locked .portrait { width: 56px; height: 56px; filter: grayscale(.7); }
.room-bars details.fold.more { border-top: 1px solid rgba(201,162,39,.2); margin: 6px 0 0; }
.room-bars details.fold.more > summary { color: var(--v-dim); font-family: 'Martel', serif; font-size: .9rem; padding: 0 10px; min-height: 46px; }
.room-bars details.fold.more > summary::after { color: var(--v-gold); }
.room-bars .post-card .btn:disabled { background: rgba(58,42,24,.12) !important; color: #6E5A40 !important; border: 1px dashed rgba(58,42,24,.4) !important; }

/* ---------- 0.11 round 3 ---------- */
.fab.go.named { width: auto; min-width: 64px; padding: 0 16px 0 12px; border-radius: 32px; display: flex; align-items: center; gap: 6px; }
.fab.go.named span { font-weight: 700; font-size: .95rem; white-space: nowrap; }
.place-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.place-chips .chip { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; }
.place-chips .chip .ic { width: 16px; height: 16px; }
.ob-cancel { align-items: center; gap: 8px; flex-wrap: wrap; }
.btn.danger.small { background: var(--sindoor); color: #fff; border: 0; }
.modal.tactical .choice.primary-choice { border: 2px solid #F0C35A; background: rgba(240,195,90,.12); }
.modal.tactical .choice.ghost-choice { background: transparent; border-style: dashed; }
.page { padding-bottom: 110px; }
details.fold.dev { margin-top: 14px; }
/* Readability in the dark rooms (round 3) and cheaper street effects. */
.room-bars p, .room-bars .note, .room-bars .blurb { font-size: .96rem !important; }
.room-bars p.fine, .room-bars p.muted, .room-bars .fine, .room-bars .muted { font-size: .88rem !important; color: rgba(239,227,196,.78) !important; }
.room-bars .btn, .room-bars .choice { font-size: 1rem; }
.lamp, .shimmer { mix-blend-mode: normal !important; }
.lamp { opacity: .28; }
/* The goal under the town name: one line, so it never covers the street signs. Tap it for the whole story. */
.due-pill.goal { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: calc(100vw - 32px); display: block; }

/* ---------- Launch fixes ---------- */
/* Map overlays never take taps meant for the town under them. */
.rival-mark, .due-mark, .moor-mark { pointer-events: none; }
/* The bazaar board always shows a few rows, and the trade panel can fold down to its trade buttons. */
.bz-board { min-height: 168px !important; }
.bz-trade { position: relative; }
.bz-fold { position: absolute; top: -2px; right: 6px; z-index: 3; width: 44px; height: 44px; border: 0; background: transparent; color: var(--v-gold); font-size: 1.1rem; line-height: 1; }
.bz-trade .bz-sel { padding-right: 40px; }
.bz-trade.folded .bz-qty, .bz-trade.folded .bz-slide, .bz-trade.folded .bz-preview, .bz-trade.folded .bz-chips, .bz-trade.folded .bz-curios { display: none !important; }
/* Tap targets of at least 44px. */
.cs-log { min-height: 44px; min-width: 56px; }
.cs-skip { min-height: 44px; }
.bz-foot .bz-back { min-height: 44px; }
button.due-pill { min-height: 44px; display: inline-flex; align-items: center; }
button.due-pill.goal { display: flex; }
/* HUD: labels readable, and big sums (1,234,567) fit at 360px. */
.stats-strip.labelled .st::after { font-size: max(11px, .69rem); bottom: -4px; }
.stats-strip .st.long b { font-size: .84rem; letter-spacing: -.02em; }
.stats-strip .st.long .ic { width: 15px; height: 15px; }
.stats-strip .st b { overflow: hidden; text-overflow: ellipsis; }
/* Two-tap confirmations. */
.confirm-row { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.confirm-row .fine { flex-basis: 100%; margin: 0; color: inherit !important; opacity: 1; font-weight: 700; }
.menu .confirm-row, .page > .confirm-row { display: flex; padding: 8px 10px; border: 1px solid var(--bad); border-radius: 10px; background: rgba(176,48,28,.12); color: var(--leaf2); }
.page > .confirm-row { color: var(--ink); }
/* Road warnings sit above Set out, outside the fold. */
.road-warns { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.road-warns li { padding: 4px 8px 4px 10px; border-left: 3px solid var(--bad); background: rgba(176,48,28,.1); color: var(--bad); font-size: .85rem; font-weight: 700; line-height: 1.3; }
/* Text size. */
.text-size { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-bottom: 1px dashed var(--leaf3); }
.text-size > span { display: flex; flex-direction: column; } .text-size small { opacity: .75; }
.text-size .s-tabs { margin: 0; } .text-size .s-tab { color: var(--leaf2); } .text-size .s-tab.on { color: var(--turmeric); }
/* The recovery screen after an error. */
.crash { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(10,8,30,.92); }
.crash-card { width: 100%; max-width: 420px; padding: 20px 18px; border-radius: var(--radius); background: var(--leaf2); color: var(--ink); box-shadow: var(--shadow); }
.crash-card h2 { margin-bottom: 6px; }
.crash-btns { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 8px; }
.crash-btns .btn { min-height: 48px; } .crash-btns .btn small { display: block; font-weight: 400; opacity: .8; }
.crash-code { width: 100%; font: .75rem monospace; }
.crash-err { opacity: .6; word-break: break-word; }
.town-actions:has(.confirm-row) { flex-wrap: wrap; }
.town-actions .confirm-row { flex-basis: 100%; justify-content: center; padding: 8px 10px; border: 1px solid var(--bad); border-radius: 10px; background: rgba(176,48,28,.08); }
.town-actions .confirm-row .fine { text-align: center; }
/* 0.12: big-lot note and the Best chip */
.bz-lot { margin: 6px 0 0; font-size: .82rem; line-height: 1.35; color: #F3D9A4; background: rgba(176,48,28,.22); border-left: 3px solid var(--turmeric, #E0A526); padding: 6px 9px; border-radius: 6px; }
.chip.best { background: var(--turmeric, #E0A526); color: #2A1A06; border-color: transparent; font-weight: 700; }
/* 0.12: reward moments */
.coin-float { position: fixed; z-index: 90; transform: translate(-50%, 0); font: 700 .95rem/1 var(--display, serif); pointer-events: none; text-shadow: 0 1px 3px rgba(0,0,0,.6); animation: coinfloat 1.4s ease-out forwards; }
.coin-float.up { color: #F5C451; } .coin-float.down { color: #F08A73; }
@keyframes coinfloat { 0% { opacity: 0; transform: translate(-50%, 4px) scale(.9); } 15% { opacity: 1; transform: translate(-50%, 10px) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, 46px) scale(1); } }
.coin-float.down { animation-name: coinsink; } @keyframes coinsink { 0% { opacity: 0; } 15% { opacity: 1; transform: translate(-50%, 8px); } 100% { opacity: 0; transform: translate(-50%, 30px); } }
.deliver-ribbon { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; pointer-events: none; }
.dr-band { width: 100%; padding: 18px 16px; text-align: center; color: #2A1A06; background: linear-gradient(90deg, transparent, #E0A526 12%, #F5C451 50%, #E0A526 88%, transparent); box-shadow: 0 8px 30px rgba(0,0,0,.45); animation: ribbonin .45s cubic-bezier(.2,1.4,.4,1) both; }
.dr-band .dr-k { display: block; letter-spacing: .18em; text-transform: uppercase; font-size: .78rem; font-weight: 700; }
.dr-band b { display: block; font: 800 2.2rem/1.1 var(--display, serif); }
.dr-band small { font-size: .85rem; }
.deliver-ribbon.out .dr-band { animation: ribbonout .45s ease-in forwards; }
@keyframes ribbonin { from { transform: scaleX(.2) translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ribbonout { to { transform: translateY(-30px); opacity: 0; } }
.spoils { display: flex; align-items: baseline; justify-content: center; gap: 10px; margin: 6px auto 10px; padding: 10px 16px; border-radius: 12px; background: radial-gradient(circle at 50% 0, #F5C451, #B8791A); color: #2A1A06; box-shadow: 0 4px 18px rgba(224,165,38,.45); animation: ribbonin .5s cubic-bezier(.2,1.4,.4,1) both; }
.spoils span { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700; } .spoils b { font: 800 1.7rem/1 var(--display, serif); }
.relic-reveal { position: fixed; inset: 0; z-index: 96; display: grid; place-items: center; padding: 16px; background: radial-gradient(circle at 50% 40%, rgba(245,196,81,.35), rgba(10,8,30,.92) 65%); animation: rrfade .35s ease both; }
.relic-reveal.out { animation: rrfade .3s ease reverse forwards; }
.rr-card { max-width: 340px; width: 100%; text-align: center; color: #F6EBD2; }
.rr-card img, .rr-glyph { width: 180px; height: 180px; object-fit: contain; margin: 6px auto 4px; display: block; filter: drop-shadow(0 0 24px rgba(245,196,81,.7)); animation: rrspin 1s cubic-bezier(.2,1.3,.4,1) both; }
.rr-glyph .ic { width: 100%; height: 100%; color: #F5C451; }
.rr-kicker { letter-spacing: .2em; text-transform: uppercase; font-size: .78rem; color: #F5C451; margin: 0; }
.rr-card h2 { margin: 4px 0; font-size: 1.6rem; } .rr-eff { font-weight: 700; color: #F5C451; margin: 4px 0; } .rr-lore { font-style: italic; opacity: .85; margin: 4px 0 14px; }
@keyframes rrfade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rrspin { from { transform: scale(.3) rotate(-20deg); opacity: 0; } to { transform: none; opacity: 1; } }
.cart { animation: roll 1.3s ease-in-out forwards, bump .26s ease-in-out infinite alternate; }
@keyframes bump { from { margin-top: 0; } to { margin-top: -3px; } }
@media (prefers-reduced-motion: reduce) { .coin-float, .dr-band, .spoils, .rr-card img, .cart { animation: none !important; } }
/* 0.13: trade tiers */
.bz-next { display: flex; gap: 10px; align-items: center; margin: 8px 6px 4px; padding: 9px 10px; border: 1px dashed rgba(224,165,38,.55); border-radius: 10px; background: rgba(0,0,0,.25); }
.bz-next-ics { display: flex; gap: 2px; flex-shrink: 0; }
.g-ic.locked { opacity: .45; filter: grayscale(1); }
.bz-next-t { display: grid; gap: 2px; min-width: 0; font-size: .85rem; } .bz-next-t b { color: #F5C451; } .bz-next-t small { opacity: .8; }
.bz-next-bar { display: block; height: 6px; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden; margin-top: 3px; }
.bz-next-bar i { display: block; height: 100%; background: linear-gradient(90deg, #B8791A, #F5C451); }
