/* The Explorer's Club: the whole interface. One stylesheet, tokens first. Logical properties everywhere so a right-to-left language mirrors the menus. */
:root {
  --ink: #2a1e12; --ink-soft: #5a4630; --paper: #f2e6c9; --paper-2: #e8d7b0; --paper-edge: #cdb98a;
  --night: #10202c; --night-2: #1a3040; --night-3: #25435a; --brass: #c99a4b; --brass-hi: #f0c978; --teal: #3c8f8a; --teal-hi: #7fd1c8;
  --red: #a2452e; --good: #2f7a4d; --bad: #a2452e; --radius: 14px; --gap: 14px;
  --font-display: Georgia, 'Iowan Old Style', 'Palatino Linotype', serif;
  --font-ui: 'Segoe UI', system-ui, -apple-system, Roboto, var(--sbg-font-fallback, sans-serif);
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
* { box-sizing: border-box; }
html { font-size: 16px; }
html.large-text { font-size: 19px; }
body { margin: 0; min-height: 100dvh; background: var(--night); color: var(--paper); font-family: var(--font-ui); line-height: 1.45; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; letter-spacing: 0; }
p { margin: 0; }
.sbg-keep-ltr { direction: ltr; unicode-bidi: isolate; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid var(--brass-hi); outline-offset: 2px; }
.reduced-motion * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }

.frame { min-height: 100dvh; display: flex; flex-direction: column; background: radial-gradient(120% 80% at 50% -10%, var(--night-3), var(--night) 60%); }
main { flex: 1; width: min(1240px, 100%); margin-inline: auto; padding: 18px clamp(12px, 3vw, 28px) 40px; outline: none; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 8px clamp(12px, 3vw, 28px); background: rgba(7, 16, 24, .72); border-block-end: 1px solid rgba(240, 201, 120, .25); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(6px); }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { inline-size: 34px; block-size: 34px; }
.brand > div { min-width: 0; }
.brand strong { display: block; font-family: var(--font-display); font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-actions { flex: none; }
.brand small { display: block; color: var(--brass-hi); font-size: .72rem; }
.topbar-mid { flex: 1; display: flex; justify-content: center; }
.renown-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: rgba(240, 201, 120, .14); border: 1px solid rgba(240, 201, 120, .4); font-weight: 700; }
.renown-chip img { inline-size: 22px; block-size: 22px; }
.top-actions { display: flex; gap: 8px; }
/* The free demo gets a "back to the store" pill, fixed at the top left, from the build (scripts/canonicalize-play-shells.mjs): the brand moves right of it on every screen. */
body:has(.exit-link) .brand { margin-inline-start: 214px; }
[dir='rtl'] body:has(.exit-link) .brand { margin-inline-start: 0; }
/* The pill steps aside on the road and while any card or dialog is open: it must never sit over an event picture or take a click meant for the game. */
body:has(#app[data-screen="trip"]) .exit-link,
body:has(#app .overlay) .exit-link { display: none; }

.btn { font: inherit; font-weight: 700; cursor: pointer; border-radius: 999px; border: 2px solid transparent; padding: 10px 20px; min-block-size: 44px; color: var(--paper); background: transparent; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center; transition: transform .12s, background .12s; }
.btn:hover:not([disabled]) { transform: translateY(-1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.primary { background: linear-gradient(180deg, var(--brass-hi), var(--brass)); color: #2b1c08; box-shadow: 0 3px 0 #7d5a22; }
.btn.secondary { background: var(--teal); color: #06201e; box-shadow: 0 3px 0 #1f5551; }
.btn.ghost { border-color: rgba(240, 201, 120, .5); }
.btn.paper { background: var(--paper); color: var(--ink); }
.btn.danger { background: var(--red); color: #fff; }
.btn.small { padding: 6px 14px; min-block-size: 36px; font-size: .9rem; }
.btn.round { inline-size: 44px; padding: 0; border-color: rgba(240, 201, 120, .5); font-size: 1.3rem; }

.eyebrow { display: block; color: var(--brass-hi); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-block-end: 4px; }
.blurb, .hint, .empty, small { color: #cdbd98; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .16); font-size: .78rem; font-weight: 600; }
.chip-icon { inline-size: 18px; block-size: 18px; }
.chip.cost { background: rgba(162, 69, 46, .28); border-color: rgba(235, 130, 100, .5); }
.chip.gain, .chip.good { background: rgba(47, 122, 77, .3); border-color: rgba(120, 210, 150, .5); }
.chip.tag.match { background: rgba(60, 143, 138, .35); border-color: var(--teal-hi); }
.chip.lock { background: rgba(0, 0, 0, .35); }
.chip.need, .chip.recruit { background: rgba(240, 201, 120, .2); border-color: var(--brass); color: var(--paper); }
.diamonds { display: inline-flex; gap: 3px; vertical-align: middle; }
.diamond { inline-size: 15px; block-size: 15px; display: inline-block; opacity: .45; }
.diamond.on { opacity: 1; }
.camp-art { inline-size: 100%; aspect-ratio: 3 / 1; object-fit: cover; border-radius: 12px; }
.vignettes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-block: 10px; }
.vignette { inline-size: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 10px; border: 1px solid rgba(240, 201, 120, .3); }
.ui-ico { inline-size: 22px; block-size: 22px; object-fit: contain; flex: none; vertical-align: middle; }
.ui-ico.top { inline-size: 26px; block-size: 26px; }
.ui-ico.head { margin-inline-end: 8px; }
.ui-ico.stat { inline-size: 28px; block-size: 28px; }
.meter-label { display: inline-flex; align-items: center; gap: 6px; }
.panel-head h3, .route-head h3, .panel h3 { display: flex; align-items: center; }
.panel { background: rgba(255, 255, 255, .06); border: 1px solid rgba(240, 201, 120, .22); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; min-inline-size: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.panel.resume { background: linear-gradient(180deg, rgba(240, 201, 120, .18), rgba(240, 201, 120, .06)); border-color: var(--brass); }
.notice-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px clamp(12px, 3vw, 28px); background: rgba(240, 201, 120, .16); border-block-end: 1px solid rgba(240, 201, 120, .45); }
.notice-bar p { flex: 1 1 260px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.badge { padding: 4px 12px; border-radius: 999px; background: rgba(0, 0, 0, .35); border: 1px solid rgba(240, 201, 120, .35); font-size: .85rem; font-weight: 600; }
.actions, .hero-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.faces { display: flex; gap: 10px; flex-wrap: wrap; }
.face { inline-size: 64px; block-size: 64px; border-radius: 50%; object-fit: cover; border: 2px solid var(--brass); }
.faces.small .face { inline-size: 34px; block-size: 34px; margin-inline-end: -10px; }
.face-tag { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .8rem; }
.face-tag.hurt .face { filter: saturate(.6); border-color: var(--bad); }
.face-tag .badge { position: absolute; inset-block-start: -4px; inset-inline-end: -4px; padding: 2px; border-radius: 50%; border: none; background: var(--night); }

.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center; min-block-size: calc(100dvh - 140px); }
.hero-art .art { inline-size: 100%; border-radius: 22px; box-shadow: var(--shadow); aspect-ratio: 16 / 10; object-fit: cover; }
.hero-copy { display: flex; flex-direction: column; gap: 14px; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); color: var(--brass-hi); }
.lede { font-size: 1.15rem; max-inline-size: 34rem; }
.notice { color: #9fb0b8; font-size: .8rem; }

.screen-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-block-end: 14px; flex-wrap: wrap; }
.screen-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.step { padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, .08); font-size: .85rem; font-weight: 600; }
.step.active { background: var(--brass); color: #2b1c08; }
.plan-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-block-start: 18px; flex-wrap: wrap; }
.arc-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-block-end: 14px; }
.arc-tab { font: inherit; cursor: pointer; padding: 8px 16px; border-radius: 12px; border: 1px solid rgba(240, 201, 120, .35); background: rgba(255, 255, 255, .06); color: var(--paper); display: flex; gap: 10px; align-items: center; min-block-size: 44px; }
.arc-tab.active, .arc-tab[aria-pressed='true'] { background: var(--brass); color: #2b1c08; }
.contract-grid, .member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--gap); }
.contract-card, .member-card, .item-card { font: inherit; text-align: start; color: inherit; cursor: pointer; border-radius: var(--radius); border: 2px solid rgba(240, 201, 120, .22); background: rgba(255, 255, 255, .06); overflow: hidden; display: flex; flex-direction: column; padding: 0; min-inline-size: 0; }
.contract-card.selected, .member-card.selected, .item-card.selected { border-color: var(--brass-hi); background: rgba(240, 201, 120, .12); }
.contract-card.locked { opacity: .6; cursor: not-allowed; }
.contract-card .plate { inline-size: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; min-inline-size: 0; }
.card-title { font-family: var(--font-display); font-size: 1.15rem; }
.card-text { font-size: .92rem; color: #e2d6b8; }
.member-card { flex-direction: row; }
.member-card .face { inline-size: 110px; block-size: 110px; border-radius: 0; border: 0; flex: none; }
.rapport { color: var(--teal-hi); }
.chemistry { flex-direction: row; gap: 18px; margin-block-start: 14px; align-items: center; }

.exchange-grid, .pack-layout { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.pack-layout { grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); align-items: start; }
.offer-list { display: flex; flex-direction: column; gap: 8px; max-block-size: 52dvh; overflow: auto; }
.offer { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 10px; background: rgba(0, 0, 0, .22); }
.offer .icon, .item-card .icon { inline-size: 56px; block-size: 56px; object-fit: contain; flex: none; }
.offer-text { flex: 1; display: flex; flex-direction: column; gap: 3px; min-inline-size: 0; }
.credit { color: var(--brass-hi); }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; }
.item-card { flex-direction: row; align-items: center; gap: 8px; padding: 8px; cursor: default; }
.item-card .card-body { flex: 1; padding: 0; }
.item-weight { font-size: .8rem; text-align: center; flex: none; color: #cdbd98; }
.stepper { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; }
.stepper .btn.round { inline-size: 34px; min-block-size: 34px; font-size: 1.1rem; }
.copies { font-weight: 800; min-inline-size: 1ch; text-align: center; }
.pack-summary { position: sticky; inset-block-start: 70px; }
.meter { display: flex; flex-direction: column; gap: 4px; }
.meter-head { display: flex; justify-content: space-between; font-weight: 700; font-size: .9rem; }
.meter-track { block-size: 10px; border-radius: 999px; background: rgba(0, 0, 0, .4); overflow: hidden; }
.meter-fill { block-size: 100%; background: var(--teal); }
.meter-fill.over { background: var(--bad); }
.required, .issues, .rows, .notes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.required li { display: flex; justify-content: space-between; padding: 4px 10px; background: rgba(47, 122, 77, .22); border-radius: 8px; }
.required li.missing { background: rgba(162, 69, 46, .3); }
.issues { color: #ffb8a0; font-size: .9rem; }
.ok { color: var(--teal-hi); }
.daily-card { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.daily-card .plate { border-radius: var(--radius); inline-size: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

.club { display: grid; grid-template-columns: minmax(0, 2fr) minmax(250px, 1fr); gap: var(--gap); }
.club-main, .club-side { display: flex; flex-direction: column; gap: var(--gap); min-inline-size: 0; }
.stats { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.stats li { display: flex; flex-direction: column; align-items: center; min-inline-size: 70px; }
.stats strong { font-family: var(--font-display); font-size: 1.7rem; color: var(--brass-hi); }
.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 10px; }
.room { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; background: rgba(0, 0, 0, .25); border: 1px dashed rgba(240, 201, 120, .3); }
.room.open { border-style: solid; background: rgba(47, 122, 77, .16); }
.room-art { border-radius: 8px; aspect-ratio: 3 / 2; object-fit: cover; }
.room-body { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.room .verb { color: var(--teal-hi); font-weight: 600; }
.rows li { display: flex; gap: 10px; align-items: center; }
.rows li > span, .rows li > strong { min-inline-size: 0; }
.rows small { display: block; }
.curio-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 10px; }
.curio { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 8px; background: rgba(0, 0, 0, .22); border-radius: 10px; }
.curio .icon { inline-size: 64px; block-size: 64px; object-fit: contain; }
.archive { display: grid; grid-template-columns: 1fr 1.4fr; gap: var(--gap); }
.archive-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.archive-row { font: inherit; inline-size: 100%; color: inherit; text-align: start; display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 10px; border: 1px solid rgba(240, 201, 120, .22); background: rgba(0, 0, 0, .2); cursor: pointer; }
.archive-row.selected { border-color: var(--brass-hi); }
.archive-row .thumb { inline-size: 64px; block-size: 44px; object-fit: cover; border-radius: 6px; }

.trip { display: grid; grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); gap: var(--gap); }
.trip-main { display: flex; flex-direction: column; gap: 12px; min-inline-size: 0; }
.trip-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.trip-side { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--radius); background: rgba(0, 0, 0, .28); align-self: start; }
.supplies { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.supply { display: flex; align-items: center; gap: 6px; padding: 4px 12px 4px 6px; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.supply .icon { inline-size: 30px; block-size: 30px; object-fit: contain; }
.supply strong { font-size: 1.15rem; }
.supply.low { background: rgba(162, 69, 46, .4); border: 1px solid #e58a70; }
.map { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; background: #0d1a24; aspect-ratio: 16 / 7; }
.map .map-art { inline-size: 100%; block-size: 100%; object-fit: cover; }
.travel { position: absolute; inset-block-end: 8%; inset-inline-start: var(--at); display: flex; transition: inset-inline-start .6s ease; }
.travel .dot { inline-size: 34px; block-size: 34px; border-radius: 50%; border: 2px solid var(--brass-hi); margin-inline-start: -8px; object-fit: cover; }
.stage-strip { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; list-style: none; margin: 0; padding: 0; }
.stage { display: flex; flex-direction: column; gap: 2px; padding: 6px; border-radius: 8px; background: rgba(255, 255, 255, .06); font-size: .72rem; min-inline-size: 0; }
.stage strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stage.visited { background: rgba(47, 122, 77, .3); }
.stage.current { background: var(--brass); color: #2b1c08; }
.stage.objective .stage-n { color: var(--brass-hi); }
.stage-n { font-weight: 800; }
.route-drawer { padding: 14px; border-radius: var(--radius); background: rgba(240, 201, 120, .1); border: 1px solid rgba(240, 201, 120, .35); display: flex; flex-direction: column; gap: 10px; }
.route-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.route-option { font: inherit; color: inherit; text-align: start; cursor: pointer; padding: 12px; border-radius: 12px; border: 2px solid rgba(240, 201, 120, .4); background: rgba(0, 0, 0, .25); display: flex; flex-direction: column; gap: 4px; }
.route-option em { color: var(--teal-hi); font-style: normal; font-size: .8rem; }
.verbs { display: flex; gap: 8px; flex-wrap: wrap; }
.kit { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.kit-item { position: relative; inline-size: 44px; block-size: 44px; border-radius: 8px; background: rgba(255, 255, 255, .08); display: grid; place-items: center; }
.kit-item .icon { inline-size: 36px; block-size: 36px; object-fit: contain; }
.kit-item.broken { opacity: .45; outline: 2px dashed var(--bad); }
.kit-item.spent { opacity: .6; }
.kit-item em { position: absolute; inset-block-end: -2px; font-size: .6rem; background: var(--bad); border-radius: 4px; padding: 0 3px; font-style: normal; }
.log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-block-size: 220px; overflow: auto; font-size: .88rem; }
.log li.setback strong::after { content: ' ·'; color: var(--bad); }

.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(5, 12, 18, .78); display: flex; align-items: center; justify-content: center; padding: 12px; overflow: auto; }
.event-card, .camp-card, .dialog { inline-size: min(940px, 100%); max-block-size: calc(100dvh - 24px); overflow: auto; background: linear-gradient(180deg, #f6ecd2, #e6d4a8); color: var(--ink); border-radius: 18px; box-shadow: var(--shadow); }
.event-card { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); }
.event-art { position: relative; min-block-size: 220px; }
.event-art .art { inline-size: 100%; block-size: 100%; object-fit: cover; position: absolute; inset: 0; }
.pill { position: absolute; inset-block-end: 10px; inset-inline-start: 10px; padding: 3px 12px; border-radius: 999px; background: rgba(7, 16, 24, .8); color: var(--paper); font-size: .78rem; font-weight: 700; }
.event-body, .camp-card, .dialog { padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.event-body .eyebrow, .camp-card .eyebrow, .dialog .eyebrow { color: #8a5a14; }
.event-body p, .camp-card p, .dialog p { color: var(--ink); }
.event-body small, .camp-card small, .dialog small { color: var(--ink-soft); }
.choices { display: flex; flex-direction: column; gap: 10px; }
.choice-card { border-radius: 12px; border: 2px solid var(--paper-edge); background: #fbf4df; display: flex; flex-direction: column; }
.choice-card:hover:not(.locked) { border-color: var(--teal); }
.choice-card.locked { opacity: .6; }
.choice { font: inherit; color: var(--ink); text-align: start; cursor: pointer; padding: 12px 14px 6px; border: 0; background: none; border-radius: 10px; display: flex; flex-direction: column; gap: 6px; inline-size: 100%; }
.choice.locked, .choice[disabled] { cursor: not-allowed; }
.choice-card .why { padding: 0 14px 10px; }
.choice .choice-text { font-size: .9rem; color: var(--ink-soft); }
.odds { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.odds .chip { color: var(--ink); background: rgba(0, 0, 0, .06); border-color: rgba(0, 0, 0, .16); }
.odds .chip.cost { background: rgba(162, 69, 46, .16); }
.odds .chip.gain { background: rgba(47, 122, 77, .18); }
.odds-label { font-weight: 800; padding: 2px 10px; border-radius: 999px; font-size: .8rem; }
.odds-label.strong { background: #cfe8d5; color: #14502d; }
.odds-label.fair { background: #e6e0b8; color: #5a4a0c; }
.odds-label.risky { background: #f0d3a6; color: #70400a; }
.odds-label.severe { background: #efc3b6; color: #7a2412; }
.need { color: var(--bad); font-weight: 700; font-size: .85rem; }
.why { font-size: .82rem; color: var(--ink-soft); }
.why ul { margin: 6px 0 0; padding-inline-start: 18px; }
.banner { padding: 12px 14px; border-radius: 12px; display: flex; flex-direction: column; gap: 4px; }
.banner.good { background: #cfe8d5; color: #14502d; }
.banner.bad { background: #efc3b6; color: #7a2412; }
.banner p { color: inherit; }
.notes { font-size: .9rem; }
.notes li { padding: 4px 10px; background: rgba(0, 0, 0, .06); border-radius: 8px; }
.reaction { display: flex; gap: 12px; align-items: center; }
.reaction .face { inline-size: 72px; block-size: 72px; flex: none; }
.turns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.camp-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px; }
.camp-action { font: inherit; color: var(--ink); text-align: start; cursor: pointer; padding: 12px; border-radius: 12px; border: 2px solid var(--paper-edge); background: #fbf4df; display: flex; flex-direction: column; gap: 4px; }
.camp-action[disabled] { opacity: .55; cursor: not-allowed; }
.dialog { inline-size: min(620px, 100%); }
.dialog .btn.ghost { color: var(--ink); border-color: var(--paper-edge); }
.dialog .btn.round { color: var(--ink); }
.setting { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 8px 0; border-block-end: 1px solid var(--paper-edge); }
.setting p { font-size: .85rem; color: var(--ink-soft); }
.toggle { inline-size: 54px; block-size: 30px; border-radius: 999px; border: 2px solid var(--ink-soft); background: #cbb98a; position: relative; cursor: pointer; flex: none; padding: 0; }
.toggle span { position: absolute; inset-block-start: 2px; inset-inline-start: 2px; inline-size: 22px; block-size: 22px; border-radius: 50%; background: var(--ink); transition: inset-inline-start .15s; }
.toggle.on { background: var(--teal); }
.toggle.on span { inset-inline-start: 26px; background: #fff; }
.slider { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 8px 0; font-weight: 700; }
.slider input { inline-size: 55%; accent-color: var(--teal); }
.language select { font: inherit; padding: 6px 10px; border-radius: 8px; }

.result .paper { background: linear-gradient(180deg, #f6ecd2, #e6d4a8); color: var(--ink); border-radius: 20px; padding: 26px clamp(14px, 4vw, 34px); display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; box-shadow: var(--shadow); max-inline-size: 860px; margin-inline: auto; }
.result .paper .panel { background: rgba(0, 0, 0, .06); border-color: var(--paper-edge); color: var(--ink); inline-size: 100%; text-align: start; }
.result .paper .eyebrow { color: #8a5a14; }
.result .paper p, .result .paper li { color: var(--ink); }
.result .paper small { color: var(--ink-soft); }
.result .stats strong { color: #7a4c0f; }
.seal { inline-size: 72px; block-size: 72px; border-radius: 50%; display: grid; place-items: center; background: #cfe8d5; }
.seal.fail { background: #efc3b6; }
.seal-art { inline-size: 54px; block-size: 54px; object-fit: contain; }
.ending { border-radius: 14px; background: var(--night); color: var(--paper); padding: 16px; inline-size: 100%; text-align: start; }
.ending .art { border-radius: 10px; margin-block-end: 10px; }
.demo-end { background: var(--night-2); color: var(--paper); border: 2px solid var(--brass); border-radius: 16px; padding: 18px; inline-size: 100%; text-align: start; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.demo-end .eyebrow { color: var(--brass-hi); }
.demo-end p { color: var(--paper); }
.result .paper .demo-end p, .result .paper .demo-end li, .result .paper .demo-end .badge { color: var(--paper); }
.result .paper .demo-end .eyebrow { color: var(--brass-hi); }
.result .paper .btn.ghost { color: var(--ink); border-color: var(--paper-edge); }
.result .paper .demo-end .btn.ghost { color: var(--paper); border-color: rgba(240, 201, 120, .55); }
.toast { inline-size: max-content; max-inline-size: min(92vw, 560px); text-align: center; position: fixed; inset-block-end: 18px; inset-inline-start: 50%; transform: translateX(-50%); z-index: 90; background: var(--night); border: 1px solid var(--brass); padding: 10px 18px; border-radius: 999px; box-shadow: var(--shadow); }
[dir='rtl'] .toast { transform: translateX(50%); }
[dir='rtl'] .stage-strip, [dir='rtl'] .map { direction: ltr; }

@media (max-width: 900px) {
  .hero, .exchange-grid, .pack-layout, .club, .archive, .trip, .daily-card, .event-card { grid-template-columns: 1fr; }
  .hero { min-block-size: 0; }
  .event-art { min-block-size: 140px; max-block-size: 190px; }
  .pack-summary { position: static; }
  .stage-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .map { aspect-ratio: 16 / 8; }
}
@media (max-width: 560px) {
  .topbar-mid { display: none; }
  .brand small { display: none; }
  body:has(.exit-link) .brand div { display: none; }
  .member-card { flex-direction: column; }
  .member-card .face { inline-size: 100%; block-size: 150px; }
  .item-card { flex-wrap: wrap; }
  .btn { padding-inline: 14px; }
  .plan-foot .btn { flex: 1; }
}
@media (max-height: 460px) and (orientation: landscape) {
  main { padding-block: 8px 24px; }
  .topbar { padding-block: 4px; }
  .hero { min-block-size: 0; gap: 14px; grid-template-columns: 1fr 1fr; }
  .hero-art .art { aspect-ratio: 16 / 9; }
  .event-card { grid-template-columns: 1fr 1.6fr; }
  .event-art { min-block-size: 0; max-block-size: none; }
  .hero-copy .blurb, .hero-copy .badges { display: none; }
  .hero-copy h1 { font-size: 1.9rem; }
  .hero-copy .lede { font-size: 1rem; }
  .event-body, .camp-card, .dialog { padding: 12px 16px; gap: 8px; }
  .overlay { padding: 6px; }
  .event-card, .camp-card, .dialog { max-block-size: calc(100dvh - 12px); }
  .map { aspect-ratio: 16 / 5; }
}
