/* Piano Attack, the game (2026-10-01): the page round the stage (attack-stage.css):
   the purse, the mission map, the hangar, the options, the gate and the gem shop.
   Its own file, per the rule. The chrome follows the lab's. */
@font-face { font-family: "Barlow"; src: url("fonts/Barlow-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/Barlow-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("fonts/BarlowCondensed-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #15171c; --bg2: #1d2027; --bg3: #262a33; --line: #343945;
  --ink: #ecebe4; --dim: #a7aab4; --soft: #c9c6bb;
  --gold: #e2b452; --gold2: #f0cf85; --red: #c9534a; --green: #63b47a;
  --paper: #f4ead2;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 -apple-system, "Segoe UI", Inter, Roboto, sans-serif; }
a { color: var(--gold2); }
h1, h2, h5 { font-family: "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif; font-weight: 700; line-height: 1.15; margin: 0; }
kbd { font: 700 11px/1 ui-monospace, Menlo, monospace; background: var(--bg3); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 2px 5px; color: var(--ink); }
.wrap { max-width: 1640px; margin: 0 auto; padding: 0 16px 60px; }

.mast { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 12px 0 8px; border-bottom: 1px solid var(--line); }
.mast .home { text-decoration: none; color: var(--soft); font-size: 14px; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; }
.mast .home:hover { border-color: var(--gold); }
.mast h1 { font-size: 26px; color: var(--gold2); }
.purse { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font: 700 15px/1 "Barlow Condensed", Barlow, sans-serif; letter-spacing: .5px; }
.purse b { color: var(--gold2); font-size: 20px; font-variant-numeric: tabular-nums; }
.purse small { font: 500 12px/1 Barlow, sans-serif; color: var(--dim); margin-left: 4px; letter-spacing: 0; }
.plain { font: inherit; font-size: 13.5px; color: var(--ink); background: var(--bg3); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.plain:hover { border-color: var(--gold); }
.plain.small { font-size: 12.5px; padding: 5px 11px; }
.go { font: 700 15px/1 "Barlow Condensed", Barlow, sans-serif; letter-spacing: .5px; text-transform: uppercase; background: var(--gold); color: #2a2010; border: 0; border-radius: 999px; padding: 9px 16px; cursor: pointer; }
.go:hover { background: var(--gold2); }

.game { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; align-items: start; margin-top: 14px; }
@media (max-width: 1080px) { .game { grid-template-columns: 1fr; } }
.under { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 9px; font-size: 13.5px; color: var(--soft); }
.under .midi { margin-left: auto; font-size: 12.5px; color: var(--dim); }
.under .teaches b { color: var(--gold2); font: 700 19px/1 "Barlow Condensed", Barlow, sans-serif; letter-spacing: .5px; }
.help { font-size: 13px; color: var(--dim); margin: 8px 0 0; max-width: 980px; }
.help b { color: var(--soft); }

/* the gate over the stage */
.pa-gate { position: absolute; inset: 0; z-index: 7; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 20px;
  background: rgba(12, 14, 20, .82); color: #fff; font: 500 15px/1.4 Barlow, sans-serif; }
.pa-gate[hidden] { display: none; }
.pa-gate b { font: 700 26px/1.1 "Barlow Condensed", Barlow, sans-serif; letter-spacing: 1px; text-transform: uppercase; color: #ffe45c; }
.pa-gate span { max-width: 460px; color: var(--soft); }
.pa-gate .row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 6px; }
.pa-debrief .skip { color: #8ff0a0; font-weight: 700; margin: 4px 0; }
.pa-debrief .lost { color: #ff9b8f; font-weight: 700; margin: 4px 0; }
.pa-debrief .skip.lost { color: #ffd9a0; }

/* the panel: the map, the hangar, the options */
.panel { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px 12px; }
.ptabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-bottom: 10px; }
.ptabs button { font: 700 13px/1 "Barlow Condensed", Barlow, sans-serif; letter-spacing: .5px; text-transform: uppercase; padding: 8px 4px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg3); color: var(--soft); cursor: pointer; }
.ptabs button:hover { border-color: var(--gold); }
.ptabs button.on { background: var(--gold); color: #2a2010; border-color: var(--gold); }
.pane { display: none; } .pane.on { display: block; }
.panel .note { font-size: 12.5px; color: var(--dim); margin: 0 0 8px; }
.panel h5 { font: 500 12px/1.2 Barlow, sans-serif; color: var(--dim); margin: 9px 0 2px; }
.progress { display: flex; align-items: baseline; gap: 8px; margin: 0 0 8px; font-size: 13px; color: var(--soft); }
.progress b { color: var(--gold2); font: 700 22px/1 "Barlow Condensed", Barlow, sans-serif; letter-spacing: .5px; }
.missions { display: grid; gap: 3px; max-height: 560px; overflow: auto; padding-right: 2px; }
.missions button { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 8px; text-align: left; font: inherit; color: var(--ink); background: var(--bg3); border: 1px solid transparent; border-radius: 9px; padding: 6px 8px; cursor: pointer; }
.missions button:hover { border-color: var(--line); }
.missions button.on { border-color: var(--gold); background: #2a2416; }
.missions button.locked { opacity: .45; cursor: default; }
.missions button.boss { background: #2a1d1d; }
.missions button.bonus { background: #2a2416; border-color: #5a4a1e; }
.missions button.met { opacity: .6; cursor: default; }
.missions button.bonus em { color: #ffe45c; }
.missions i { font: 700 18px/26px "Barlow Condensed", Barlow, sans-serif; font-style: normal; text-align: center; width: 36px; height: 26px; border-radius: 999px; background: var(--bg); color: var(--gold2); }
.missions b { display: block; font-size: 13px; color: var(--ink); } .missions small { display: block; font-size: 11px; color: var(--dim); }
.missions em { font-style: normal; color: #ffe45c; font-size: 12px; letter-spacing: 1px; } .missions s { text-decoration: none; color: #3a3f4c; }
.hangar { display: grid; gap: 4px; }
.part { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; background: var(--bg3); border-radius: 9px; padding: 7px 10px; }
.part b { display: block; font-size: 13.5px; } .part b i { font-style: normal; color: #ffe45c; margin-left: 4px; }
.part span { display: block; font-size: 11.5px; color: var(--dim); } .part u { text-decoration: none; color: var(--ink); }
.part button { font: 700 12px/1 Barlow, sans-serif; border: 0; border-radius: 7px; padding: 7px 10px; background: var(--gold); color: #2a2010; cursor: pointer; white-space: nowrap; }
.part button:disabled { background: var(--bg); color: var(--dim); cursor: default; }
.part.heart { border: 1px solid #5a2a2a; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.seg button { font: inherit; font-size: 12.5px; color: var(--soft); background: var(--bg3); border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; cursor: pointer; }
.seg button:hover { border-color: var(--gold); }
.seg button.on { background: var(--gold); color: #2a2010; border-color: var(--gold); font-weight: 700; }
.check { display: block; font-size: 13px; color: var(--soft); margin: 5px 0; cursor: pointer; }
.keysline { margin-top: 10px; font-size: 12px; color: var(--dim); }

/* the gem shop */
dialog.gems { background: var(--bg2); color: var(--ink); border: 1px solid var(--gold); border-radius: 14px; padding: 18px 20px; width: min(520px, 92vw); }
dialog.gems::backdrop { background: rgba(0, 0, 0, .6); }
dialog.gems h2 { font-size: 22px; color: var(--gold2); margin-bottom: 6px; }
dialog.gems p { margin: 0 0 10px; font-size: 14px; color: var(--soft); }
dialog.gems .fine { font-size: 12.5px; color: var(--dim); }
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0 12px; }
.packs button { font: inherit; color: var(--ink); background: var(--bg3); border: 1px solid var(--line); border-radius: 12px; padding: 12px 8px; cursor: pointer; text-align: center; }
.packs button:hover { border-color: var(--gold); }
.packs b { display: block; font-size: 16px; color: var(--gold2); } .packs span { display: block; font-size: 20px; font-weight: 700; margin: 4px 0; } .packs small { color: var(--dim); font-size: 12px; }
dialog.gems .row { display: flex; justify-content: flex-end; }

/* the three volumes: a name, a slider, what it stands at */
.vols { display: grid; gap: 4px; margin: 4px 0 8px; }
.vols label { display: grid; grid-template-columns: 78px 1fr 40px; align-items: center; gap: 8px; font-size: 13px; color: var(--soft); }
.vols input[type="range"] { width: 100%; accent-color: var(--gold); }
.vols output { font: 700 12px/1 Barlow, sans-serif; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }

/* Piano Attack's own coins (round piano-attack-r4): a coin, a stack of five, a sack, a chest. Pixel art, drawn at its own size. */
img.coin { image-rendering: pixelated; vertical-align: middle; }
.purse .coins { display: inline-flex; align-items: center; gap: 5px; }
.part button img.coin, .pa-debrief img.coin { margin-right: 4px; }
.part button { display: inline-flex; align-items: center; }
.pa-debrief .pay { display: block; }
/* a flight's pay, counted out: chests of a hundred, sacks of twenty-five, stacks of five, coins */
.coin-tally { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center; gap: 3px; margin: 4px 0 2px; min-height: 30px; }
.coin-tally img { image-rendering: pixelated; }
.coin-tally i { font: 700 13px/1 Barlow, sans-serif; font-style: normal; color: #ffe9a6; align-self: center; margin: 0 4px 0 1px; }

/* 10-02, the afternoon: the tank in the purse, the pianos, the skills, the weak spots */
.purse .fuel b.low { color: #ff8a7a; }
.purse #refuel { border-color: var(--gold); }
/* the pianos: a card each, the one flown marked */
.pianos { display: grid; gap: 4px; margin-bottom: 6px; }
.piano { display: grid; grid-template-columns: 78px 1fr auto; align-items: center; gap: 8px; background: var(--bg3); border: 1px solid transparent; border-radius: 9px; padding: 6px 8px; }
.piano.flying { border-color: var(--gold); background: #2a2416; }
.piano > img { width: 74px; height: auto; image-rendering: pixelated; justify-self: center; }
.piano button img.coin { width: auto; margin-right: 4px; }
.piano b { display: block; font-size: 13.5px; } .piano b i { font-style: normal; color: #ffe45c; font-size: 11px; margin-left: 4px; letter-spacing: .5px; text-transform: uppercase; }
.piano span { display: block; font-size: 11.5px; color: var(--dim); }
/* a plane's own parts on its card: a pip a part, filled by its marks */
.piano .parts { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 11px; color: var(--soft); }
.piano .parts .pips { display: inline-flex; gap: 2px; }
.piano .parts .pips u { display: block; width: 9px; height: 9px; border-radius: 2px; background: linear-gradient(0deg, #ffe45c calc(var(--m) * 100%), #2a2e38 calc(var(--m) * 100%)); }
.piano button { font: 700 12px/1 Barlow, sans-serif; border: 0; border-radius: 7px; padding: 7px 10px; background: var(--gold); color: #2a2010; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; }
.piano button.fly { background: var(--bg); color: var(--ink); border: 1px solid var(--line); }
.piano button:disabled { background: var(--bg); color: var(--dim); cursor: default; border: 0; }
/* the skills: a row each, the level's own bar */
.skills { display: grid; gap: 3px; }
.skill { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 6px 8px; background: var(--bg3); border-radius: 9px; padding: 6px 9px; }
.skill .ico { font-size: 17px; text-align: center; }
.skill b { display: block; font-size: 13px; } .skill b i { font-style: normal; color: #ffe45c; font: 700 11px/1 "Barlow Condensed", Barlow, sans-serif; letter-spacing: .8px; text-transform: uppercase; margin-left: 6px; }
.skill small { display: block; font-size: 11px; color: var(--dim); }
.skill .n { font: 700 12px/1 Barlow, sans-serif; color: var(--soft); font-variant-numeric: tabular-nums; text-align: right; }
.skill .n u { text-decoration: none; color: var(--gold2); font-size: 14px; }
.skill .bar { grid-column: 2 / 4; height: 7px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.skill .bar i { display: block; height: 100%; background: linear-gradient(90deg, #8ac46a, #e2b452); border-radius: 999px; transition: width .4s; }
.skill.top .bar i { background: linear-gradient(90deg, #e2b452, #ffe9a6); }
.skill.up { border: 1px solid var(--gold); }
.weak { display: grid; gap: 3px; }
.weak .spot { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; background: #2a1d1d; border-radius: 9px; padding: 6px 9px; font-size: 13px; }
.weak .spot small { color: var(--dim); font-size: 11px; display: block; }
.weak .spot em { font-style: normal; color: #ff9b8f; font: 700 12px/1 Barlow, sans-serif; }
.weak .none { font-size: 12.5px; color: var(--dim); }
/* on the debrief: what the flight did for the skills */
.pa-debrief .skills-gained { margin: 6px 0 2px; font-size: 12.5px; color: var(--soft); text-align: left; }
.pa-debrief .skills-gained b { color: #8ff0a0; font-weight: 700; }
.pa-debrief .skills-gained .up { color: #ffe45c; font-weight: 700; }
.pa-debrief .fuel-line { font-size: 12.5px; color: var(--dim); margin: 2px 0; }

/* THE ADMIN'S THREE SLOTS (attack-game.js paintSlots): slot 1 the account, 2 and 3 test runs; shown to the admin only */
.slots { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 8px 0 2px; padding: 7px 10px; border: 1px dashed #8a7a35; border-radius: 10px; background: rgba(255, 228, 92, .05); }
.slots[hidden] { display: none; }
.slots .label { font: 700 12px/1 "Barlow Condensed", Barlow, sans-serif; letter-spacing: 1.2px; text-transform: uppercase; color: #c9a94a; }
.slots .slot { display: inline-flex; align-items: stretch; gap: 2px; }
.slots .slot button[data-slot] { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 7px; align-items: baseline; text-align: left; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg3); color: var(--ink); cursor: pointer; }
.slots .slot button[data-slot] b { grid-row: 1 / 3; align-self: center; font: 800 20px/1 "Barlow Condensed", Barlow, sans-serif; color: var(--gold2); }
.slots .slot button[data-slot] i { font: 700 12.5px/1.1 Barlow, sans-serif; font-style: normal; }
.slots .slot button[data-slot] small { font: 500 11px/1.2 Barlow, sans-serif; color: var(--dim); }
.slots .slot.on button[data-slot] { border-color: #ffe45c; background: #2a2416; box-shadow: 0 0 0 1px #ffe45c inset; cursor: default; }
.slots .slot:not(.on) button[data-slot]:disabled { opacity: .55; cursor: default; }
.slots .slot .reset { padding: 0 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg3); color: var(--dim); font-size: 15px; cursor: pointer; }
.slots .slot .reset:hover:not(:disabled) { color: #ff9b8f; border-color: #ff9b8f; }
.slots .slot .reset:disabled { opacity: .45; cursor: default; }
.slots .why { flex-basis: 100%; font: 500 11px/1.2 Barlow, sans-serif; color: var(--dim); }
