/* Characters, backpacks, gadgets and clue puzzles. Matches the field-equipment look of expedition.css. */

/* Menu: solo choice and the character roster */
.solo-choice { display: grid; gap: 10px; background: #0b1519cc; border: 1px solid #60716c44; border-radius: 12px; padding: 12px; }
.solo-choice > p { text-align: center; font-size: 13px; }
.solo-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mode-btn { display: grid; gap: 4px; padding: 12px 10px; background: #17282c; border: 1px solid #4c6468; }
.mode-btn span { font-size: 15px; }
.mode-btn small { font-weight: 500; font-size: 11px; color: #a8b9b5; line-height: 1.35; }
.mode-btn[aria-expanded="true"] { border-color: #b9cc9d; }
.roster { display: grid; gap: 8px; max-height: min(52vh, 520px); overflow-y: auto; overscroll-behavior: contain; padding-right: 2px; }
.cast-how .roster { margin-top: 10px; }
.char-card { display: grid; gap: 6px; text-align: left; font: inherit; color: var(--ink); background: #0b1519; border: 1px solid #60716c55; border-left: 4px solid var(--c); border-radius: 10px; padding: 10px 12px; }
button.char-card { cursor: pointer; }
button.char-card:hover, button.char-card:focus-visible { background: #132227; border-color: var(--c); }
.cc-top { display: flex; align-items: center; gap: 10px; }
.cc-emoji { font-size: 26px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: color-mix(in srgb, var(--c) 22%, transparent); flex: none; }
.cc-top b { display: block; font-size: 15px; }
.cc-top small { color: var(--c); font-weight: 700; font-size: 12px; letter-spacing: .5px; text-transform: uppercase; }
.char-card p { font-size: 12px; color: #b9c7c3; margin: 0; }
.char-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.char-card li { display: flex; gap: 8px; font-size: 12px; line-height: 1.4; color: #c7d2ce; }
.char-card li .gi { font-size: 16px; width: 22px; text-align: center; flex: none; }
.char-card li em, .bp-txt em { font-style: normal; font-size: 10px; color: #0b1519; background: #b9cc9d; border-radius: 4px; padding: 0 5px; font-weight: 700; }
.char-card li em.pas { background: #93c5fd; }
.char-card li em.auto { background: #f0abfc; }

/* Lobby */
.deal-note { font-size: 12px; color: #a8b9b5; text-align: center; }
.last-char { margin-left: auto; font-size: 11px; font-weight: 600; color: #a8b9b5; white-space: nowrap; }
.last-char + .tag-host { margin-left: 8px; }

/* HUD: character chip, decoded digits, gadget hotbar, scout readout */
.char-chip { font-size: 12px; font-weight: 700; background: #000a; border: 1px solid color-mix(in srgb, var(--c, #b9cc9d) 60%, transparent); color: #e5e7eb; border-radius: 999px; padding: 4px 9px; white-space: nowrap; }
.pages span.got.decoded { background: #c9d9f2; color: #102033; transform: rotate(2deg); }
.hints span.decoded { background: #c9d9f2; color: #102033; }
.decode-btn { width: 100%; background: #16324a; border: 1px solid #3d6a8f; }
.decode-btn:disabled { opacity: .5; cursor: default; }
.gadget-bar { position: absolute; right: 20px; bottom: 80px; display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, auto); direction: rtl; gap: 6px; z-index: 7; }
.gadget-bar:empty { display: none; }
.g-slot { direction: ltr; position: relative; width: 46px; height: 46px; border-radius: 9px; border: 1px solid #53686a; background: #0b171df0; color: #fff; cursor: pointer; display: grid; place-items: center; padding: 0; }
.g-slot:hover, .g-slot:focus-visible { border-color: #b9cc9d; }
.g-slot .g-ic { font-size: 22px; line-height: 1; }
.g-slot b { position: absolute; left: 3px; top: 1px; font-size: 10px; color: #a8c1b3; }
.g-slot i { position: absolute; right: 3px; bottom: 1px; font-style: normal; font-size: 11px; font-weight: 800; color: #e7dbc4; }
.g-slot.empty { opacity: .35; }
#scoutLine { position: absolute; right: 20px; top: 128px; background: #2a0f0fd0; border: 1px solid #ff7b7866; color: #ffd7cf; border-radius: 6px; padding: 6px 10px; font: 600 12px Inter, sans-serif; pointer-events: none; z-index: 7; max-width: 46vw; }
#scoutLine small { color: #ffb4a8; margin-left: 4px; }
@media (pointer: coarse), (max-height: 550px) { .gadget-bar { display: none; } }
@media (max-width: 800px) { #scoutLine { top: 118px; right: 12px; font-size: 10px; padding: 4px 8px; max-width: 70vw; } .char-chip { display: none; } }

/* Field guide: who you are tonight */
.guide-char { display: grid; gap: 6px; background: #0b1519; border: 1px solid #52686c; border-left: 4px solid var(--c); border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; }
.guide-char > b { font: 600 16px Georgia, serif; }
.guide-char > span, .guide-char > small { font-size: 12px; color: #b9c7c3; line-height: 1.5; }
.guide-char > small b { color: #e7dbc4; }
.guide-gear { display: flex; flex-wrap: wrap; gap: 4px; font-size: 18px; }

/* Backpack sheet */
.backpack-panel, .puzzle-panel { max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; }
.backpack-panel { max-width: 640px; }
.bp-head { display: flex; gap: 12px; align-items: flex-start; }
.bp-emoji { font-size: 34px; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 12px; background: color-mix(in srgb, var(--c, #b9cc9d) 22%, transparent); flex: none; }
.bp-head small { font-size: 10px; letter-spacing: 2px; color: #a8c1b3; }
.bp-head h3 { font: 600 22px Georgia, serif; margin: 2px 0 4px; }
.bp-head p { font-size: 13px; color: #b9c7c3; }
.bp-items { display: grid; gap: 14px; }
.bp-items section { display: grid; gap: 6px; }
.bp-items h4, .bp-team h4 { margin: 0; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: #a8c1b3; }
.bp-item { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; background: #0b1519; border: 1px solid #60716c44; border-radius: 10px; padding: 9px 10px; }
.bp-item.passive { border-style: dashed; }
.bp-item.empty { opacity: .55; }
.bp-ic { font-size: 26px; text-align: center; }
.bp-txt b { font-size: 14px; }
.bp-txt p { font-size: 12px; color: #b9c7c3; margin: 3px 0 0; }
.bp-txt small { display: block; font-size: 11px; color: #a8b9b5; margin-top: 3px; }
.bp-txt .bp-from { color: #e7bf7d; }
.bp-charge { font-size: 11px; color: #e7dbc4; letter-spacing: 1px; margin-left: 4px; }
.bp-charge.pas { color: #93c5fd; letter-spacing: 0; }
.bp-use { padding: 9px 12px; font-size: 13px; background: #693832; white-space: nowrap; }
.bp-use:disabled { background: #23233a; opacity: .6; cursor: default; }
.bp-auto { font-size: 11px; color: #f0abfc; font-weight: 700; }
.bp-team ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 5px; }
.bp-team li { display: flex; align-items: center; gap: 8px; font-size: 13px; background: #0b1519; border-radius: 8px; padding: 6px 9px; }
.bp-team li span:last-child { margin-left: auto; color: #b9c7c3; font-size: 12px; text-align: right; }
@media (max-width: 600px) {
  .bp-item { grid-template-columns: 32px 1fr; }
  .bp-item .bp-use, .bp-item .bp-auto { grid-column: 1 / -1; width: 100%; }
  .solo-modes { grid-template-columns: 1fr; }
}

/* Puzzles */
.puzzle-panel { max-width: 560px; }
.pz-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pz-head h3 { font: 600 22px Georgia, serif; }
.pz-threat { font: 700 10px Inter, sans-serif; letter-spacing: 1px; color: #a8c1b3; }
.pz-threat.danger { color: #ffb38a; animation: blink 1s steps(2) infinite; }
.pz-intro { font-size: 13px; color: #c7d2ce; }
.pz-body { display: grid; gap: 12px; justify-items: center; }
.pz-msg { min-height: 1.3em; text-align: center; font-size: 13px; font-weight: 600; }
.pz-msg.bad { color: #fca5a5; }
.pz-msg.good { color: #86efac; }
.pz-body button { font: inherit; cursor: pointer; }

/* Key cabinet */
.pz-note { background: #efe6cc; color: #2a1d0b; font: 14px/1.5 Georgia, serif; border-radius: 3px; padding: 10px 14px; transform: rotate(-1deg); width: 100%; }
.pz-note ol { margin: 6px 0; padding-left: 20px; }
.pz-note small { color: #6b5a3e; font-style: italic; }
.key-rack { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; background: linear-gradient(#3b2a1a, #2a1d12); border-radius: 8px; padding: 10px; }
.key-btn { background: #1b130c; border: 1px solid #5a4430; border-radius: 8px; padding: 6px; color: #d9c7a8; display: grid; gap: 2px; justify-items: center; font-size: 11px !important; text-transform: capitalize; }
.key-btn svg { width: 100%; max-width: 120px; height: auto; }
.key-btn:hover, .key-btn:focus-visible { border-color: #e7bf7d; background: #2a1d12; }

/* Torn page */
.strips { display: grid; width: 100%; max-width: 420px; }
.strip { display: block; width: 100%; text-align: left; background: #efe6cc; color: #2a1d0b; border: 0; padding: 13px 16px 15px; font: 16px/1.3 'Special Elite', monospace !important; margin-top: -3px; }
.strip:nth-child(odd) { background: #ebe1c4; }
.strip.sel { background: #f8e7a4; outline: 3px solid #b45309; outline-offset: -3px; }
.strip:focus-visible { outline: 3px solid #bde3cc; outline-offset: -3px; }

/* Microscope */
.scope { width: 240px; height: 240px; border-radius: 50%; overflow: hidden; border: 10px solid #1d2426; box-shadow: 0 0 0 2px #52686c, inset 0 0 30px #000; background: #000; }
.scope canvas { display: block; width: 100%; height: 100%; }
.knobs { display: grid; gap: 8px; width: 100%; }
.knobs label { font-size: 12px; }
.knobs input { padding: 0; accent-color: #a6c6ac; min-height: 32px; }
.clarity { font-size: 12px; color: #a8c1b3; }

/* Terminal cipher */
.terminal { width: 100%; background: #071510; border: 1px solid #1f4a3a; border-radius: 6px; padding: 10px 12px; font: 14px/1.5 ui-monospace, Consolas, monospace; color: #8cceb5; }
.t-head { color: #5f9c86; font-size: 12px; }
.t-head span { color: #e7936c; }
.t-text { margin: 8px 0; min-height: 3em; letter-spacing: .5px; word-break: break-word; color: #b9f5dc; }
.t-wheel { border-top: 1px dashed #1f4a3a; padding-top: 6px; font-size: 11px; overflow-x: auto; white-space: nowrap; }
.t-row.out { color: #f6e3a1; }
.wheel { display: flex; align-items: center; gap: 8px; width: 100%; }
.wheel input { flex: 1; padding: 0; accent-color: #8cceb5; min-height: 32px; }
.wheel .btn { padding: 8px 14px; }
.wheel .shift { font: 12px ui-monospace, monospace; color: #a8c1b3; width: 60px; text-align: right; }
.t-ask { font-size: 13px; color: #c7d2ce; }
.t-digits { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; width: 100%; }
.t-digits button { padding: 10px 0; border-radius: 8px; border: 1px solid #1f4a3a; background: #0b2019; color: #b9f5dc; font: 800 18px ui-monospace, monospace !important; }

/* Hand bells */
.bells { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: 100%; }
.bell { aspect-ratio: 1; border-radius: 50%; border: 3px solid var(--c); background: radial-gradient(circle at 40% 35%, color-mix(in srgb, var(--c) 45%, #000), #0b1519 70%); color: #fff; display: grid; place-items: center; transition: transform .12s, box-shadow .12s; }
.bell span { font-size: 28px; }
.bell small { font-size: 11px; color: #e5e7eb; margin-top: -12px; }
.bell.ring { transform: rotate(-12deg) scale(1.08); box-shadow: 0 0 26px var(--c); background: var(--c); }
.seq-dots { display: flex; gap: 8px; min-height: 12px; }
.seq-dots i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #a8c1b3; }
.seq-dots i.on { background: #e7bf7d; border-color: #e7bf7d; }

/* Piano */
.stave { width: 100%; max-width: 440px; background: #efe6cc; border-radius: 4px; padding: 4px; }
.stave .clef { font-size: 54px; stroke: none; font-family: 'Segoe UI Symbol', 'Noto Music', serif; }
.stave .lbl { font: 700 13px Georgia, serif; text-anchor: middle; stroke: none; fill: #7f1d1d; }
.stave .unk { font: 700 13px Georgia, serif; text-anchor: middle; stroke: none; fill: #8b7a5c; }
.played { font: 15px ui-monospace, monospace; color: #e7dbc4; min-height: 1.4em; }
.piano-keys { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; width: 100%; max-width: 440px; }
.piano-keys button { height: 92px; background: linear-gradient(#fbfaf5, #dcd6c6); color: #2a1d0b; border: 1px solid #000; border-radius: 0 0 6px 6px; font: 700 15px Georgia, serif !important; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px; }
.piano-keys button:active { background: #e7bf7d; }

/* Photo tiles */
.tiles { --t: min(96px, 26vw); display: grid; grid-template-columns: repeat(3, var(--t)); gap: 3px; background: #2b1e10; padding: 3px; border-radius: 4px; }
.tile { width: var(--t); height: var(--t); border: 0; padding: 0; background-size: 300% 300%; transition: transform .18s ease; }
.tile:focus-visible { outline: 3px solid #bde3cc; z-index: 1; }
.comfort .tile, .comfort .bell { transition: none; }

/* The ✕ in every panel's corner (game.js): it stays in view while the panel scrolls, for phones. */
.panel-x { position: sticky; top: 0; align-self: flex-end; flex: none; width: 44px; height: 44px; margin: -12px -12px -40px 0; z-index: 3;
  border-radius: 50%; border: 1px solid #ffffff3a; background: #0b1519ee; color: #fff; font: 20px/1 Inter, sans-serif; cursor: pointer; }
.panel-x:hover, .panel-x:focus-visible { background: #7f1d1d; }
.panel-x + * { padding-right: 36px; }
