/* Menus: the Héros screen's recipe on every tab (one showcase on top, then a single list of rows that open sheets),
   and La Croisée drawn as a square. Kept apart from style.css, which other work on the game also edits. */

/* ---------- rows: one place, one line, one state ---------- */
.place-head { font-size: .95rem; color: var(--gold); margin: 22px 2px 8px; }
.place-list { display: flex; flex-direction: column; gap: 8px; }
.place-row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 8px 10px; text-align: left; color: var(--ink);
  background: var(--panel); border: 3px solid var(--edge); border-radius: 6px;
  box-shadow: inset 0 0 0 2px #3c4044, 0 3px 0 rgba(0, 0, 0, .3);
}
.place-row:active { transform: translateY(2px); box-shadow: inset 0 0 0 2px #3c4044, 0 1px 0 rgba(0, 0, 0, .3); }
.place-row.hot { box-shadow: inset 0 0 0 2px #b0702c, 0 3px 0 rgba(0, 0, 0, .3); }
.place-row .pr-icon {
  flex: none; width: 46px; height: 46px; display: grid; place-items: center; overflow: hidden;
  background: #1c1e20; border: 2px solid var(--edge); border-radius: 4px; box-shadow: inset 0 0 0 1px #3c4044;
}
.place-row .pr-text { flex: 1; min-width: 0; }
.place-row .pr-text b { display: block; font-family: var(--pixel); font-size: .9rem; font-weight: 400; }
.place-row .pr-text span { display: block; color: var(--muted); font-size: .84rem; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.place-row .pr-tag {
  flex: none; font-family: var(--pixel); font-size: .68rem; padding: 2px 6px; border-radius: 3px;
  background: var(--panel-2); color: var(--ink); border: 1px solid var(--panel-3);
}
.place-row .pr-tag.gold { background: #4a3220; color: var(--gold); border-color: #7a5634; }
.place-row .pr-tag.red { background: #4a2025; color: #ff9aa2; border-color: #7a3440; }
.place-row .pr-tag.good { background: #24412b; color: #9be3a7; border-color: #2f6a3b; }
.place-row .pr-go { flex: none; color: var(--panel-3); font-family: var(--pixel); font-size: 1.1rem; }

/* ---------- La Croisée: the square ---------- */
.croisee-square { position: relative; margin: -12px -12px 0; border-bottom: 3px solid var(--edge); background: #3f7a3a; }
.croisee-square canvas.scene { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.croisee-square .scene-overlay { position: absolute; inset: 0; pointer-events: none; }
.psign {
  position: absolute; transform: translate(-50%, -100%); pointer-events: auto;
  display: inline-flex; flex-direction: column; align-items: center; gap: 1px; max-width: 46%;
  padding: 3px 8px 4px; line-height: 1.12; font-family: var(--pixel); font-size: .72rem; color: var(--gold); white-space: nowrap;
  background: #4a3220; border: 2px solid var(--edge); border-radius: 3px;
  box-shadow: inset 0 0 0 1px #7a5634, inset 0 2px 0 #8a6440, 0 3px 0 rgba(0, 0, 0, .45);
}
.psign:active { transform: translate(-50%, calc(-100% + 2px)); }
.psign.left { transform: translate(0, -100%); align-items: flex-start; }
.psign.right { transform: translate(-100%, -100%); align-items: flex-end; }
.psign .ps-name { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.psign .ps-line { font-family: var(--text); font-size: .68rem; color: #e6d6b8; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.psign .alert { display: inline-block; min-width: 14px; padding: 0 4px; border-radius: 7px; background: var(--bad); color: #fff; font-size: .66rem; line-height: 14px; font-style: normal; animation: pulse 1s infinite; }

/* The week's menace looms over the square. */
.square-sky {
  position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 10px; padding: 6px 12px 22px; border: 0; text-align: left; color: var(--ink);
  background: linear-gradient(rgba(26, 12, 20, .92), rgba(26, 12, 20, 0));
}
.square-sky .sky-text { flex: 1; min-width: 0; }
.square-sky b { display: block; font-family: var(--pixel); font-weight: 400; font-size: .8rem; color: #ff9aa2; }
.square-sky .bar { display: block; height: 10px; margin-top: 3px; max-width: 220px; }
.square-sky .bar span { font-size: .55rem; line-height: 10px; }
.square-sky small { font-family: var(--pixel); color: #e8d9c2; font-size: .68rem; }
.square-sky.done b { color: #9be3a7; }

/* The company's name, hung under the square. */
.square-banner {
  position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); width: min(78%, 320px);
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 12px 7px; color: var(--ink);
  background: #2a2d30; border: 3px solid var(--edge); border-radius: 4px; box-shadow: inset 0 0 0 2px #b0702c, 0 4px 0 rgba(0, 0, 0, .45);
}
.square-banner .sb-name { font-family: var(--pixel); color: var(--gold); font-size: .95rem; }
.square-banner .sb-line { font-size: .78rem; color: var(--muted); }
.square-banner .bar { display: block; width: 100%; height: 11px; margin-top: 2px; }
.square-banner .bar span { font-size: .55rem; line-height: 11px; }
.croisee-square + .place-head { margin-top: 18px; }

.board-list .post { padding: 8px 0; border-bottom: 1px dashed var(--panel-3); }

/* ---------- Expédition: one présage in the showcase, the others as rows ---------- */
.place-head.first { margin-top: 6px; }
.lead-omen {
  border: 3px solid var(--edge); border-radius: 6px; overflow: hidden; background: linear-gradient(#2e2a24, #23211e);
  box-shadow: inset 0 0 0 2px #5a4632, 0 3px 0 rgba(0, 0, 0, .3);
}
.lead-omen.legend { box-shadow: inset 0 0 0 2px var(--legend), 0 0 14px rgba(255, 179, 71, .25), 0 3px 0 rgba(0, 0, 0, .3); }
.lead-art { display: block; width: 100%; padding: 0; border: 0; border-bottom: 3px solid var(--edge); background: none; }
.lead-art .omen-preview { border: 0; margin: 0; }
.lead-body { padding: 10px 12px 12px; }
.lead-label { font-family: var(--pixel); color: var(--legend); font-size: .7rem; }
.lead-label .muted { font-family: var(--text); font-size: .8rem; }
.lead-omen h3 { margin: 2px 0 4px; font-size: 1.15rem; }
.lead-whisper { margin: 0 0 4px; font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lead-party { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.lead-party .btn { flex: 1; min-width: 0; padding: 8px; }
.lead-heroes { flex: none; }
.lead-heroes {
  display: flex; align-items: flex-end; gap: 0; padding: 4px 8px 2px; color: var(--muted);
  background: #1c1e20; border: 2px solid var(--edge); border-radius: 4px; box-shadow: inset 0 0 0 1px #3c4044;
}
.lead-heroes small { font-family: var(--pixel); font-size: .62rem; margin: 0 0 4px 6px; white-space: nowrap; }
.lead-read { display: block; margin: 10px auto 0; padding: 2px 6px; border: 0; background: none; color: var(--gold); font-family: var(--pixel); font-size: .74rem; }
/* The whole scene in the row, at the preview's own proportions, so no creature is cut off. */
.omen-rows .place-row { flex-wrap: wrap; row-gap: 6px; }
.omen-rows .pr-icon { order: -1; width: 100%; height: auto; padding: 0; }
.omen-rows .pr-icon .omen-preview { width: 100%; height: auto; aspect-ratio: 208 / 72; }
.pr-glyph { font-family: var(--pixel); font-size: 1.4rem; color: var(--muted); }
.pr-glyph.legend { color: var(--legend); }
.omens-refresh { display: block; margin: 14px auto 0; }
.place-row.with-action { padding: 0 10px 0 0; }
.place-row.with-action .pr-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 8px 0 8px 10px; border: 0; background: none; color: inherit; text-align: left; }
.place-row.with-action .pr-action { flex: none; }
.place-row.with-action:active { transform: none; }
.gift.sent { opacity: .8; }
.lead-roster { display: flex; flex-wrap: wrap; gap: 2px 12px; margin: 4px 0 6px; font-size: .8rem; color: var(--muted); }
.lead-roster b { font-family: var(--pixel); font-weight: 400; font-size: .66rem; color: var(--gold); }

/* The company's quarter */
.quarter-back {
  display: inline-block; margin: 0 0 10px; padding: 4px 10px; font-family: var(--pixel); font-size: .78rem; color: var(--gold);
  background: #4a3220; border: 2px solid var(--edge); border-radius: 3px; box-shadow: inset 0 0 0 1px #7a5634, 0 3px 0 rgba(0, 0, 0, .45);
}
.psign.mine { color: #9fd0ff; }
.quarter-hint { text-align: center; margin-top: 10px; }
.quarter-head { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.quarter-head h2 { margin: 0; font-size: .95rem; color: var(--gold); }
.quarter-head .quarter-back { margin: 0; flex: none; }
/* The lands: an island to drag and zoom; signs keep their size whatever the zoom (--iz is 1 / zoom). */
.lands-wrap { position: relative; margin: 0 -12px; }
.lands { position: relative; height: min(64vh, 560px); overflow: hidden; background: #3a78a8; border-top: 3px solid var(--edge); border-bottom: 3px solid var(--edge); touch-action: none; }
.lands-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.lands-world canvas { display: block; image-rendering: pixelated; }
.psign.map { padding: 2px 6px 3px; font-size: .64rem; transform: translate(-50%, -100%) scale(var(--iz, 1)); transform-origin: 50% 100%; }
.psign.map:active { transform: translate(-50%, -100%) scale(var(--iz, 1)); }
.psign.map .ps-line { font-size: .6rem; }
.lands-world.far .psign.map .ps-line { display: none; }
.psign.map .crown { font-style: normal; color: #ffd34d; margin-right: 3px; }
.psign.map.leader { box-shadow: inset 0 0 0 1px #c9a040, inset 0 2px 0 #8a6440, 0 3px 0 rgba(0, 0, 0, .45); }
.lands-heart { position: absolute; transform: translate(-50%, 0) scale(var(--iz, 1)); transform-origin: 50% 0; font-family: var(--pixel); font-size: .62rem; color: #fff6dc; text-shadow: 0 1px 0 #000, 0 0 4px #000; pointer-events: none; white-space: nowrap; }
.guest-tag { position: absolute; transform: translate(-50%, 0); padding: 0 5px; font-family: var(--pixel); font-size: .6rem; color: #fff6dc;
  background: rgba(20, 16, 12, .72); border-radius: 3px; white-space: nowrap; pointer-events: none; }
/* A visiting company: tap the group, a small card; tap anywhere else, it goes. */
.guest-hit { position: absolute; padding: 0; border: 0; background: none; pointer-events: auto; }
.guest-card {
  position: absolute; z-index: 3; transform: translateX(-50%); width: min(78%, 280px); display: flex; flex-direction: column; gap: 4px; padding: 8px 10px 10px;
  background: #2a2d30; border: 3px solid var(--edge); border-radius: 5px; box-shadow: inset 0 0 0 2px #b0702c, 0 4px 0 rgba(0, 0, 0, .45);
}
.guest-card .gc-head { font-family: var(--pixel); font-size: .74rem; color: var(--gold); text-align: center; }
.guest-card .gc-hero { display: flex; align-items: center; gap: 8px; }
.guest-card .gc-hero + .gc-hero { padding-top: 4px; border-top: 1px dashed var(--panel-3); }
.guest-card .gc-face { flex: none; width: 52px; display: grid; place-items: end center; }
.guest-card .gc-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.guest-card .gc-text b { font-family: var(--pixel); font-weight: 400; font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guest-card .gc-text small { color: var(--muted); font-size: .74rem; line-height: 1.1; }
.guest-card .bar { display: block; height: 8px; }
.guest-card .bar span { font-size: .48rem; line-height: 8px; }
.guest-card .btn { margin-top: 2px; }

/* ---------- Inside a building: the room, then the same things as rows ---------- */
.inside-room { margin: 0 -12px; border-top: 3px solid var(--edge); background: #3b2412; }
.quarter-head h2 small { font-family: var(--text); font-size: .8rem; }
.quarter-head .inside-more { margin-left: auto; }
.quarter-head .inside-more.can { color: #9be3a7; }
.recruit-tag { top: 0; }
.recruit-tag.legend { color: #ffd34d; background: rgba(60, 36, 10, .85); box-shadow: 0 0 6px rgba(255, 200, 80, .6); }
.recruit-sheet .rs-head { display: flex; gap: 14px; align-items: flex-end; }
.recruit-sheet .rs-art { flex: none; display: grid; place-items: end center; min-width: 84px; padding: 6px; background: #1c1e20; border: 2px solid var(--edge); border-radius: 4px; }
.recruit-sheet.legend .rs-art { box-shadow: 0 0 14px rgba(255, 190, 70, .45), inset 0 0 0 1px var(--legend); }
.recruit-sheet .rs-who { min-width: 0; }
.recruit-sheet .rs-who h2 { margin: 0; }
.recruit-sheet .rs-who p { margin: 2px 0 6px; }
.recruit-sheet .rs-who .pr-tag { display: inline-block; margin-bottom: 6px; font-family: var(--pixel); font-size: .68rem; padding: 2px 6px; border-radius: 3px; }
.recruit-sheet .pr-tag.gold { background: #4a3220; color: var(--gold); border: 1px solid #7a5634; }
.recruit-sheet .pr-tag.good { background: #24412b; color: #9be3a7; border: 1px solid #2f6a3b; }
.rs-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 10px 0; }
.rs-stats span { display: flex; flex-direction: column; align-items: center; padding: 4px 2px; background: var(--panel-2); border-radius: 3px; }
.rs-stats small { font-size: .7rem; color: var(--muted); }
.rs-stats b { font-family: var(--pixel); font-weight: 400; font-size: .85rem; }
.rs-weapon { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-family: var(--pixel); font-size: .8rem; }
.rs-weapon small { font-family: var(--text); color: var(--muted); }
.haggle { margin-top: 12px; padding: 10px 12px 12px; background: #2e2a24; border: 2px solid var(--edge); border-radius: 5px; box-shadow: inset 0 0 0 1px #5a4632; }
.haggle h3 { margin: 0 0 4px; }
.haggle p { margin: 4px 0; }
.haggle-mood { font-style: italic; }
.haggle-say { padding: 6px 10px; border-radius: 4px; background: #efe2c4; color: #2a1a0e; font-size: .95rem; }
.haggle-say.counter { background: #f5dc9a; }
.haggle-say.insult, .haggle-say.leave { background: #e9c2b8; }
.haggle-say.accept { background: #cfe9c8; }
.haggle-patience .patience-marks { color: var(--gold); letter-spacing: 2px; }
.haggle-row { display: flex; align-items: center; gap: 6px; margin: 8px 0; }
.haggle-field { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; padding: 4px 8px; background: #1c1e20; border: 2px solid var(--edge); border-radius: 4px; }
.haggle-input { flex: 1; min-width: 0; width: 100%; border: 0; background: none; color: var(--ink); font-family: var(--pixel); font-size: 1.05rem; }
.haggle .btn { display: block; width: 100%; margin-top: 6px; }
.haggle-row .btn { width: auto; margin: 0; flex: none; }

/* Previews only: − and + next to the upgrade button in a room's header. */
.quarter-head .test-level { display: inline-flex; gap: 4px; flex: none; }
.quarter-head .test-level .quarter-back { min-width: 34px; padding-left: 0; padding-right: 0; }
.quarter-head .test-level .quarter-back:disabled { opacity: .4; }
/* The forging of a new piece plays in the forge; this lets the player skip it. */
.forge-skip { position: absolute; right: 8px; bottom: 8px; z-index: 3; padding: 4px 10px; font-family: var(--pixel); font-size: .75rem; color: var(--gold); background: rgba(20, 14, 10, .75); border: 1px solid var(--gold); border-radius: 6px; }
/* The card of a piece just forged. */
.fresh-item .fresh-title { margin: 0 0 6px; font-family: var(--pixel); color: var(--gold); text-align: center; }
.fresh-item .fresh-stats { font-family: var(--pixel); font-size: 1rem; color: #9be3a7; text-align: center; padding: 6px; border: 1px solid var(--edge); border-radius: 6px; }

/* The library: shelves of book spines, and a book opened on parchment pages (library_ui.js). */
.lib-shelf .bookshelf { display: flex; align-items: flex-end; gap: 4px; height: 168px; padding: 10px 10px 0; background: linear-gradient(#24160b, #3a2412); border: 3px solid #2a180a; border-bottom: none; border-radius: 4px 4px 0 0; overflow-x: auto; }
.lib-shelf .bookshelf-board { height: 8px; background: #5a3519; border: 3px solid #2a180a; border-top: 2px solid #7a4a24; border-radius: 0 0 4px 4px; }
.book-spine { flex: 1 0 34px; max-width: 48px; height: var(--tall, 90%); display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 4px;
  padding: 8px 2px 6px; background: linear-gradient(90deg, rgba(255,255,255,.12), transparent 30%, rgba(0,0,0,.3)), var(--spine); color: var(--ink, #f3e6c4);
  border: 1px solid rgba(0,0,0,.5); border-radius: 3px 3px 1px 1px; box-shadow: inset 0 6px 0 -3px #d4a640, inset 0 -8px 0 -5px #d4a640; cursor: pointer; transition: transform .12s; }
.book-spine:active { transform: translateY(-6px); }
.book-spine .spine-title { writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--pixel); font-size: .72rem; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-height: 100%; }
.book-spine small { font-family: var(--pixel); font-size: .55rem; opacity: .85; }
.book-spine.locked { filter: saturate(.4) brightness(.75); }
.lib-book .book-page { background: #efe2c4; color: #3a2412; border-radius: 4px; padding: 14px 14px 10px; border-left: 8px solid var(--spine); box-shadow: inset 0 0 18px rgba(120,80,30,.35); }
.lib-book .book-page h2 { color: #5a2a1a; margin: 0; }
.lib-book .book-page h3 { color: #7a3a1a; font-family: var(--pixel); font-weight: 400; font-size: .85rem; margin: 14px 0 4px; border-bottom: 1px solid rgba(90,53,25,.3); }
.lib-book .book-page .muted { color: #7a6448; }
.book-head { display: flex; align-items: center; gap: 12px; }
.book-motto { font-style: italic; color: #6a4a2a; margin: 4px 0 0; }
.book-text { line-height: 1.45; }
.book-page > .book-text:first-of-type::first-letter { font-family: var(--pixel); font-size: 1.6em; color: #7a2a1a; }
.book-note { background: rgba(122,42,26,.12); border-left: 3px solid #7a2a1a; padding: 4px 8px; font-size: .85rem; }
.book-path, .book-beast { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px dashed rgba(90,53,25,.25); }
.book-path > canvas, .book-beast > canvas, .book-beast > img { flex: none; }
.book-path p, .book-beast p { margin: 2px 0; }
.book-beast.dark b { color: #7a6448; }
.book-beast .btn.small { margin-top: 4px; padding: 2px 10px; font-size: .75rem; }
.book-quote { font-style: italic; color: #7a2a1a; }
.book-legend { border-left: 4px solid var(--legend); padding: 4px 8px; margin: 8px 0; background: rgba(90,53,25,.06); }
.book-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; }
.book-nav .btn { flex: 1; }
.book-beast.dark > canvas, .book-beast.dark > img { filter: brightness(0) opacity(.5); }
.place-row.locked { opacity: .55; }

/* ---------- Chronique ---------- */
.chron-show { margin: 0 0 14px; border: 2px solid #3a2a1a; border-radius: 6px; overflow: hidden; background: #14110f; box-shadow: 0 3px 0 #0008; }
.chron-road { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.chron-plaque { padding: 8px 12px 10px; background: linear-gradient(#3a3026, #2a221b); border-top: 2px solid #5a4632; }
.chron-plaque > small { display: block; color: var(--muted); font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; }
.chron-plaque > b { display: block; color: var(--gold); font-size: .95rem; margin: 2px 0 6px; }
.chron-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.chron-stats span { text-align: center; background: #0003; border: 1px solid #0006; border-radius: 4px; padding: 4px 0; }
.chron-stats b { display: block; font-family: var(--pixel); font-size: 1.05rem; color: #f0e2c0; }
.chron-stats small { font-size: .66rem; color: var(--muted); }
.pr-glyph.gold { color: var(--gold); }
.pr-glyph.good { color: var(--good, #7fc27f); }
.pr-glyph.red { color: #d0605a; }
.chron-progress { margin: 0 2px 6px; }
.chron-progress .bar { margin: 6px 0; }
.chron-beasts { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; }
.chron-beast { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; min-height: 78px; padding: 6px 2px 5px;
  background: linear-gradient(#2c241c, #201a14); border: 2px solid #3e3022; border-radius: 5px; color: inherit; font: inherit; }
.chron-beast small { font-size: .66rem; line-height: 1.1; text-align: center; }
.chron-beast i { position: absolute; top: 3px; right: 4px; font-style: normal; font-size: .62rem; color: var(--muted); }
.chron-beast.boss { grid-column: span 2; border-color: #7a5a2a; background: linear-gradient(#3a2a1a, #241a10); }
.chron-beast.boss small { color: var(--gold); }
.chron-beast.unknown { opacity: .55; }
.chron-banner { text-align: center; margin: 0 0 12px; padding: 10px 12px 12px; color: #2a1a0e;
  background: linear-gradient(#e8d6a8, #cdb27a); border: 2px solid #6a4a22; border-radius: 4px; clip-path: polygon(0 0, 100% 0, 100% 86%, 50% 100%, 0 86%); padding-bottom: 20px; }
.chron-banner b { display: block; font-size: 1.05rem; margin: 2px 0; }
.chron-banner small { display: block; font-size: .72rem; }
.chron-banner small.muted { color: #5a4224; }
.chron-more { display: block; margin: 8px auto 0; }

/* ---------- Expedition camp (group and departure) ---------- */
.camp-show { position: relative; margin: 0 0 4px; border: 2px solid #3a2a1a; border-radius: 6px; overflow: hidden; background: #14110f; box-shadow: 0 3px 0 #0008; }
.camp-show > canvas { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.camp-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 6px 8px 7px; background: #1d1813; border-top: 2px solid #3a2a1a; }
.camp-slot { display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 4px 2px; background: #2a221b; border: 2px solid #4a3828; border-radius: 5px; color: #fff; font: inherit; }
.camp-slot b { font: 400 .74rem var(--pixel); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.camp-slot small { font-size: .64rem; color: #f0e2c0; }
.camp-slot.empty { background: none; border: 2px dashed rgba(240, 226, 192, .3); }
.camp-slot.empty b, .camp-slot.empty small { color: rgba(240, 226, 192, .55); }
.camp-slot.lent small { color: #a6d8ff; }
.camp-curses { position: absolute; top: 6px; right: 6px; display: flex; gap: 3px; padding: 3px; background: rgba(20, 14, 12, .7); border: 1px solid #6a2a1e; border-radius: 4px; }
.camp-curses canvas, .fd-marks canvas { display: block; image-rendering: pixelated; }
.camp-plaque { padding: 8px 12px 9px; background: linear-gradient(#3a3026, #2a221b); border-top: 2px solid #5a4632; }
.camp-plaque small { display: block; color: var(--muted); font-size: .72rem; }
.camp-plaque b { display: block; color: var(--gold); font-size: .95rem; }
.camp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 8px 0 0; }
.camp-stats span { text-align: center; background: #241e18; border: 2px solid #3e3022; border-radius: 5px; padding: 5px 0 4px; }
.camp-stats b { display: block; font-family: var(--pixel); font-size: 1rem; color: #f0e2c0; }
.camp-stats .cs-risk b { color: #ff9a8a; }
.camp-stats small { font-size: .66rem; color: var(--muted); }
.camp-whisper { margin: 10px 2px 4px; }
.camp-go { position: sticky; bottom: 0; padding: 10px 0 8px; background: linear-gradient(transparent, var(--bg, #1b1d1e) 30%); z-index: 2; }

/* ---------- Réglages ---------- */
.settings .set-title { font: 400 .8rem var(--pixel); color: var(--gold); margin: 16px 2px 6px; }
.settings .set-box { display: grid; gap: 2px; padding: 4px 12px; background: #24272a; border: 2px solid #0c0d0e; border-radius: 6px; box-shadow: inset 0 0 0 2px #34383c; }
.set-row { padding: 8px 0; border-bottom: 1px solid #34383c; }
.set-box > :last-child { border-bottom: 0; }
.set-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.set-head b { font: 400 .86rem var(--pixel); font-weight: 400; }
.set-row small { display: block; color: var(--muted); font-size: .8rem; margin-top: 4px; }
.seg { display: flex; border: 2px solid #0c0d0e; border-radius: 5px; overflow: hidden; flex: none; }
.seg button { font: 400 .74rem var(--pixel); padding: 6px 9px; background: #1a1c1e; color: var(--muted); border: 0; border-left: 2px solid #0c0d0e; }
.seg button:first-child { border-left: 0; }
.seg button.on { background: linear-gradient(#f0a040, #c8742a); color: #2a1406; }
.set-box .vol-row { padding: 4px 0; border-bottom: 1px solid #34383c; }
.set-back { margin: 0 0 10px; }
.set-box > .vol-row:last-child { border-bottom: 0; }
.acc-card { background: linear-gradient(#3a3026, #2a221b); border: 2px solid #0c0d0e; box-shadow: inset 0 0 0 2px #5a4632; border-radius: 6px; padding: 10px 12px; margin: 0 0 12px; }
.acc-head { display: flex; align-items: center; gap: 10px; padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px solid #5a4632; }
.acc-head small { display: block; color: var(--muted); font-size: .72rem; }
.acc-head b { font: 400 1rem var(--pixel); color: var(--gold); }
.acc-line { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: .88rem; }
.acc-line span { color: var(--muted); }
.acc-line b { font-weight: 600; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.account-panel > .btn { display: block; width: 100%; margin: 6px 0 0; }

/* Le Fardeau: the opt-in curses, folded into one line */
.fardeau { margin: 12px 0 4px; border: 2px solid #3e3022; border-radius: 6px; background: #1f1915; }
.fardeau.open { border-color: #6a2a1e; background: linear-gradient(#2a1714, #1f1915 60%); }
.fd-head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 10px; background: none; border: 0; color: inherit; font: inherit; text-align: left; }
.fd-title { flex: 1; min-width: 0; }
.fd-title b { display: block; font: 400 .95rem var(--pixel); color: #e8a090; }
.fd-title small { display: block; font-size: .72rem; color: var(--muted); }
.fd-marks { display: flex; gap: 2px; flex-wrap: wrap; max-width: 40%; justify-content: flex-end; }
.fd-level { text-align: center; min-width: 34px; padding: 2px 4px; border: 2px solid #4a3828; border-radius: 4px; background: #14100d; }
.fd-level b { display: block; font: 400 1.05rem var(--digits, var(--pixel)); color: #f0e2c0; line-height: 1.1; }
.fd-level small { font-size: .58rem; color: var(--muted); }
.fd-fold { font-style: normal; color: var(--muted); }
.fardeau.fl-0 .fd-level b { color: var(--muted); }
.fardeau.fl-3 .fd-level b, .fardeau.fl-4 .fd-level b { color: #ff9a6a; }
.fardeau.fl-5 .fd-level b, .fardeau.fl-6 .fd-level b { color: #ff5a4a; text-shadow: 0 0 6px #b0201088; }
.fd-meter { padding: 2px 12px 8px; }
.fd-gauge { position: relative; height: 12px; background: #0e0b09; border: 2px solid #4a3828; border-radius: 3px; overflow: hidden; }
.fd-fill { height: 100%; background: linear-gradient(90deg, #c9a24a, #e0702e 45%, #c8281e 75%, #6a1030); background-size: 300px 100%; box-shadow: inset 0 2px 0 #ffffff33; transition: width .3s; }
.fd-tick { position: absolute; top: 0; bottom: 0; width: 2px; background: #4a3828; }
.fd-tick.on { background: #1a0e0a; }
.fd-words { display: flex; flex-wrap: wrap; gap: 2px 8px; margin-top: 5px; font: 400 .66rem var(--pixel); color: #5a4c40; }
.fd-words .past { color: #8a7258; }
.fd-words .on { color: #ffb08a; text-decoration: underline; text-underline-offset: 3px; }
.fd-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 0 8px 8px; }
.fd-tile { position: relative; display: grid; grid-template-columns: 27px 1fr; grid-template-rows: auto auto auto; column-gap: 7px; align-items: start; padding: 7px 7px 6px; background: #2a221b; border: 2px solid #4a3828; border-radius: 5px; color: inherit; font: inherit; text-align: left; }
.fd-tile canvas { grid-row: 1 / 3; image-rendering: pixelated; filter: grayscale(.7) brightness(.8); }
.fd-tile b { font: 400 .78rem var(--pixel); color: #f0e2c0; padding-right: 22px; }
.fd-tile small { font-size: .68rem; color: var(--muted); line-height: 1.25; }
.fd-pts { position: absolute; top: 5px; right: 6px; font: 400 .8rem var(--pixel); color: #e8a090; }
.fd-loot { grid-column: 1 / 3; margin-top: 4px; font-size: .64rem; color: #c9a24a; }
.fd-tile.asc { border-style: double; border-width: 3px; }
.fd-tile.on { background: #3a1a14; border-color: #c8402e; box-shadow: inset 0 0 10px #c8281e55; }
.fd-tile.on canvas { filter: drop-shadow(0 0 3px #ff6a4a); }
.fd-clear { margin: 0 8px 8px; }

/* Dans le sac: every item in full */
.kit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.kit-chip { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 6px; padding: 6px 8px; background: #241e18; border: 2px solid #3e3022; border-radius: 5px; color: inherit; font: inherit; text-align: left; }
.kit-chip b { font: 400 .9rem var(--pixel); color: var(--gold); }
.kit-chip span { font-size: .78rem; color: #f0e2c0; line-height: 1.2; }

.fd-note { margin: 6px 0 0; font-size: .7rem; color: var(--muted); font-style: italic; }
.fd-tile.locked { opacity: .55; border-style: dashed; cursor: default; }
.fd-tile.locked canvas { filter: grayscale(1) brightness(.5); }
.fd-tile.locked b { color: var(--muted); }

/* The Fardeau's weight on the whole expedition: from a faint red breath at the edges (Épineux) to a dark, bleeding
   frame (Cauchemardesque). Under sheets and toasts, never catching a touch. */
body[data-fardeau]::after { content: ""; position: fixed; inset: 0; z-index: 19; pointer-events: none; transition: box-shadow .6s, background .6s; }
body[data-fardeau="1"]::after { box-shadow: inset 0 0 60px rgba(150, 30, 20, .22); }
body[data-fardeau="2"]::after { box-shadow: inset 0 0 80px rgba(160, 30, 20, .32); background: rgba(40, 0, 0, .05); }
body[data-fardeau="3"]::after { box-shadow: inset 0 0 100px rgba(170, 25, 20, .42); background: rgba(40, 0, 5, .1); }
body[data-fardeau="4"]::after { box-shadow: inset 0 0 120px rgba(170, 15, 20, .52); background: rgba(30, 0, 8, .16); }
body[data-fardeau="5"]::after { box-shadow: inset 0 0 140px rgba(150, 0, 25, .66); background: radial-gradient(ellipse at 50% 45%, transparent 40%, rgba(25, 0, 10, .4)); animation: fd-pulse 4s ease-in-out infinite; }
@keyframes fd-pulse { 50% { opacity: .75; } }
@media (prefers-reduced-motion: reduce) { body[data-fardeau="5"]::after { animation: none; } }

.rd-curses { position: absolute; right: 8px; top: 8px; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; padding: 3px 4px; line-height: 1; background: rgba(20, 12, 10, .72); border: 1px solid #6a2a1e; border-radius: 4px; color: #e8a090; }
.rd-curses small { font: 400 .6rem var(--pixel); }
.rd-curses span { display: flex; gap: 2px; }
.rd-curses canvas { display: block; image-rendering: pixelated; }
.rd-curses.fl-4 small, .rd-curses.fl-5 small { color: #ff5a4a; }

/* the présage scenes (OmenPreview.faceoff) everywhere on the expedition screens */
canvas.faceoff { display: block; width: 100% !important; height: auto !important; image-rendering: pixelated; }
.omen-rows .pr-icon .faceoff { border-radius: 4px; }
.presage-prologue .faceoff { border: 2px solid var(--edge); border-radius: 8px; margin-bottom: 18px; }

/* Le courrier du matin: a parchment letter with seven wax seals, what stays and what lasts until midnight */
.courrier { display: grid; gap: 10px; }
.cr-letter { background: #e6d3a8; color: #3b2412; border-radius: 3px; padding: 12px 12px 10px; box-shadow: 0 0 0 2px #7a5a30, 0 5px 0 #0008;
  background-image: repeating-linear-gradient(0deg, transparent 0 22px, rgba(122, 90, 48, .12) 22px 23px); }
.cr-letter h3 { margin: 0; font: 400 1rem var(--pixel); color: #3b2412; }
.cr-from { margin: 2px 0 8px; font-size: .8rem; font-style: italic; }
.cr-seals { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cr-seal { aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font: .72rem var(--digits, var(--pixel)); color: #7a5a30; background: #c9b58a; border: 2px dashed #9a835a; }
.cr-seal.chest { border-radius: 6px; }
.cr-seal.on { background: radial-gradient(circle at 35% 30%, #d8452e, #a8291c 60%, #6a160e); border: 2px solid #5a120a; box-shadow: 0 2px 0 #0005; }
.cr-seal.today { outline: 2px solid var(--gold); outline-offset: 2px; animation: cr-breathe 1.6s ease-in-out infinite; }
.cr-seal.broken { animation: cr-break .6s ease-out; }
@keyframes cr-breathe { 50% { transform: scale(1.08); } }
@keyframes cr-break { 0% { transform: scale(1.5) rotate(-12deg); filter: brightness(1.8); } 100% { transform: none; } }
.cr-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-top: 3px; text-align: center; font: .58rem var(--pixel); color: #7a5a30; }
.cr-hint { margin: 0; }
.cr-open { width: 100%; }
.cr-box { background: #241e18; border: 2px solid #3e3022; border-radius: 6px; padding: 8px 10px; }
.cr-box.today { border-color: #3a5a78; background: linear-gradient(#1e2833, #241e18); }
.cr-box > small { display: flex; justify-content: space-between; gap: 8px; font: 400 .72rem var(--pixel); color: var(--muted); margin-bottom: 4px; }
.cr-box.today > small { color: #a6d8ff; }
.cr-gift { display: grid; grid-template-columns: 32px 1fr auto; column-gap: 8px; align-items: center; padding: 3px 0; }
.cr-gift > :first-child { grid-row: span 2; justify-self: center; }
.cr-gift b { font: 400 .85rem var(--pixel); color: #f0e2c0; }
.cr-gift i { grid-column: 2; font-style: normal; font-size: .74rem; color: var(--muted); line-height: 1.25; }
.cr-gift em { grid-column: 3; grid-row: 1; font: .78rem var(--digits, var(--pixel)); font-style: normal; color: var(--gold); white-space: nowrap; }
.cr-ico { color: #e6d3a8; }
.loan-tag { display: block; color: #a6d8ff; }
.prime-card { display: grid; gap: 6px; }
.prime-card p { margin: 0; }
.prime-bar { height: 12px; background: #0e0b09; border: 2px solid #4a3828; border-radius: 3px; overflow: hidden; }
.prime-bar i { display: block; height: 100%; background: linear-gradient(90deg, #c9a24a, var(--gold)); }
@media (prefers-reduced-motion: reduce) { .cr-seal.today, .cr-seal.broken { animation: none; } }

/* First-visit guide (guide.js): a lit hole in a dim veil, taps pass through; a bubble says what to do. */
.guide { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.guide-ring { position: fixed; border-radius: 10px; border: 3px solid var(--gold); box-shadow: 0 0 0 9999px rgba(8, 9, 10, .58), 0 0 14px 2px rgba(242, 155, 58, .7);
  animation: guide-pulse 1.4s ease-in-out infinite; transition: left .2s, top .2s, width .2s, height .2s; }
.guide-veil { position: fixed; inset: 0; background: rgba(8, 9, 10, .58); }
@keyframes guide-pulse { 50% { box-shadow: 0 0 0 9999px rgba(8, 9, 10, .58), 0 0 22px 6px rgba(242, 155, 58, .9); } }
.guide-bubble { position: fixed; left: 12px; right: 12px; max-width: 440px; margin: 0 auto; pointer-events: auto; padding: 10px 12px; border-radius: 12px;
  border: 3px solid var(--gold); background: linear-gradient(#383c40, #34383c); box-shadow: 0 0 0 3px var(--edge), 0 8px 24px rgba(0, 0, 0, .5);
  animation: pop-in .3s cubic-bezier(.2, 1.4, .4, 1); }
.guide-bubble.middle { top: 50%; transform: translateY(-50%); }
.guide-bubble b { font-family: var(--pixel); color: var(--gold); }
.guide-bubble p { margin: 4px 0 8px; white-space: pre-line; line-height: 1.35; }
.guide-buttons { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.guide-buttons .btn:only-child { margin-left: auto; }
.guide-count { color: var(--muted, #9a9a9a); font-family: var(--pixel); }

/* Friends and companies: the register, the friend finder, the founder's requests (social_ui.js). */
.co-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.co-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; border: 2px solid var(--edge); background: rgba(20, 22, 23, .55); }
.co-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.co-text small { font-size: .8rem; opacity: .85; }
.co-actions { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.co-requests h3 { margin: 12px 0 6px; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; }
.welcome .btn { display: block; width: 100%; margin-top: 8px; }
.welcome .row-buttons .btn { width: auto; }
.co-row.stack { flex-direction: column; align-items: stretch; }
.co-row.stack .co-actions { justify-content: flex-start; }
/* "Supprimer mon compte": the leader picks who takes the company on. */
.heir { margin: 10px 0 12px; }
.heir-sort { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.chip-btn { padding: 5px 10px; border: 2px solid var(--panel-3); background: rgba(20, 22, 23, .4); color: var(--muted); font: .85rem var(--text); }
.chip-btn.on { border-color: var(--gold); color: var(--ink); }
.heir-list { display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow-y: auto; }
.heir-row { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px; border: 2px solid var(--panel-3); background: rgba(20, 22, 23, .35); color: var(--ink); text-align: left; }
.heir-row span { color: var(--muted); font-size: .82rem; }
.heir-row.on { border-color: var(--gold); box-shadow: inset 0 0 0 1px #6b3d0e; }
.heir-row.on b::after { content: " ⚑"; color: var(--gold); }

/* The player's pseudo with its tag, one tap to copy (friends find each other by it). */
.my-pseudo { display: flex; flex-direction: row; align-items: center; gap: 8px; width: 100%; margin: 8px 0; padding: 8px 10px; border-radius: 8px; border: 2px dashed var(--gold);
  background: rgba(20, 22, 23, .55); color: var(--ink); text-align: left; }
.my-pseudo span { font-size: .8rem; opacity: .8; }
.my-pseudo b { flex: 1; font-family: var(--pixel); color: var(--gold); letter-spacing: .5px; }
.my-pseudo i { font-style: normal; opacity: .85; }
.my-pseudo.mini { width: auto; white-space: nowrap; margin: 0; padding: 3px 8px; gap: 6px; border-width: 2px; border-style: solid; border-color: var(--edge); background: rgba(20, 22, 23, .85); pointer-events: auto; }
.my-pseudo.mini b { font-size: .75rem; }
.pseudo-tag { margin-left: 2px; font-weight: normal; opacity: .6; font-size: .85em; }
.acc-handle { align-items: center; }
.acc-handle b { flex: 1; font-family: var(--pixel); color: var(--gold); }
.acc-handle .btn { margin: 0; }
.guide { transition: opacity .15s; }
.guide.moving { opacity: 0; }
.guide-down { position: fixed; right: 18px; bottom: calc(var(--safe-bottom, 0px) + 92px); width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 50%; border: 3px solid var(--gold); background: rgba(32, 34, 37, .92); color: var(--gold); font-size: 1.4rem; font-weight: bold;
  animation: guide-bob 1s ease-in-out infinite; }
@keyframes guide-bob { 50% { transform: translateY(6px); } }
