/* Phase 3: the event banner (/tap, /tasks), the cipher pill + sheet + Morse bar over the coin. On the app screen the
   coin gives up exactly the room the banner and the pills take, so /tap still fits 390x660 without scrolling. */
.ev-banner {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; width: 100%; padding: 7px 12px; border-radius: 16px;
  background: linear-gradient(90deg, rgba(255, 61, 110, 0.32), rgba(255, 201, 64, 0.28)); box-shadow: inset 0 0 0 1px rgba(255, 201, 64, 0.45);
  font-size: 0.78rem;
}
.ev-banner[hidden] { display: none; }
.ev-icon { font-size: 1.2rem; }
.ev-text { display: flex; flex-wrap: wrap; gap: 0 8px; min-width: 0; }
.ev-text strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-left { font-weight: 800; color: var(--gold); white-space: nowrap; }
.page-tasks .ev-banner { margin: 4px 0 10px; font-size: 0.85rem; }

.tap-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.tap-pills:not(:has(> :not([hidden]))) { display: none; }
.cp-pill { background: linear-gradient(180deg, rgba(34, 211, 238, 0.4), rgba(14, 116, 144, 0.45)); box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.6); }
.cp-pill.is-done { background: rgba(31, 224, 138, 0.2); box-shadow: inset 0 0 0 1px rgba(31, 224, 138, 0.55); }

/* coin room on the app screen: base, minus the banner and the pills row when they show */
html.app .tap-stage { --ev-room: 0px; --pill-room: 0px; }
html.app .tap-stage:has(#ev-banner:not([hidden])) { --ev-room: 44px; }
html.app .tap-stage:has(.tap-pills > :not([hidden])) { --pill-room: 36px; }
html.app .tap-stage:has(.tap-pills > .test-note:not([hidden])) { --pill-room: 76px; } /* admin: the note is a second pill row */
html.app .tap-stage .tap-coin-wrap { width: min(70vw, 300px, calc(var(--app-h, 100dvh) - 410px - var(--ev-room) - var(--pill-room))); }

/* Morse mode: the bar replaces the balance area's attention, the coin turns cyan */
.cp-bar { display: grid; justify-items: center; gap: 4px; width: 100%; padding: 8px 10px; border-radius: 18px;
  background: rgba(14, 116, 144, 0.25); box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.5); }
.cp-bar[hidden] { display: none; }
.cp-mode-label { font-size: 0.72rem; font-weight: 800; color: #9eeaf9; }
.cp-word { font: 900 1.5rem/1 var(--display); letter-spacing: 0.12em; color: #fff; }
.cp-code { min-height: 1.2em; font: 900 1.3rem/1 var(--display); letter-spacing: 0.2em; color: #22d3ee; }
.cp-actions { display: flex; gap: 6px; }
.tap-stage[data-cipher="1"] .tap-coin { filter: drop-shadow(0 22px 40px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 34px rgba(34, 211, 238, 0.6)) hue-rotate(150deg) saturate(0.8); }
.tap-stage[data-cipher="1"] .tap-bal { opacity: 0.35; }
/* Morse mode: the bar takes the pills', the power line's and the energy row's place (no taps, no energy) */
.tap-stage[data-cipher="1"] :is(.tap-pills, .tap-power, .tap-energy) { display: none; }
html.app .tap-stage:has(#cp-bar:not([hidden])) { --pill-room: 70px; }

.cp-solved { margin: 0; padding: 10px 12px; border-radius: 14px; font-weight: 800; color: var(--win); background: rgba(31, 224, 138, 0.1); }
.cp-table { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 6px; }
.cp-cell { display: grid; justify-items: center; gap: 2px; padding: 6px 4px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); font-size: 0.8rem; }
.cp-cell b { font: 900 0.95rem/1 var(--display); }
.cp-cell .num { color: #22d3ee; letter-spacing: 0.1em; }
.cp-morse summary { cursor: pointer; font-weight: 800; padding: 6px 0; }
.cp-morse[open] summary { margin-bottom: 8px; }
.cp-sheet .g-form { display: flex; gap: 8px; }
.cp-sheet .g-form input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: 0.15em; }
.cp-sheet .g-form input::placeholder { text-transform: none; letter-spacing: normal; }
