/* Era Clash · rooms, timers, opponent-left, wager, phalanx block, Nine Tongues, power boxes
   (loaded after ui-overhaul.css and powers.css) */

/* ------------------------------------------------- Champion select: power boxes line up */
/* Each champion's column is a subgrid of three rows (name, signature, advantage), so Tesla's
   boxes stretch to the same height as Ada Lovelace's instead of leaving a gap underneath. */
.picker-powers[data-count="2"] { grid-template-rows: auto auto auto; column-gap: 12px; row-gap: 8px; }
.picker-powers[data-count="2"] > div { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 8px; }
.picker-powers[data-count="2"] .pw-card { display: contents; }
.picker-powers[data-count="2"] .pw-card ul { display: contents; }
.picker-powers[data-count="2"] .pw-card-row { height: 100%; box-sizing: border-box; align-content: start;
  border: 1px solid rgb(246 220 156 / .16); border-left: 3px solid var(--pw); background: linear-gradient(180deg, rgb(0 0 0 / .32), rgb(0 0 0 / .2)); }
.picker-powers .pw-card-row small { text-wrap: pretty; }
@media (max-width: 640px) {
  .picker-powers[data-count="2"] > div { grid-row: auto; grid-template-rows: none; }
  .picker-powers[data-count="2"] .pw-card, .picker-powers[data-count="2"] .pw-card ul { display: grid; gap: 8px; }
}

/* ------------------------------------------------------------- Private room: the code */
body.roman-menu #app .room-code-card { display: grid; justify-items: center; gap: 16px; width: min(560px, 100%); padding: 28px 24px 22px;
  border: 1px solid var(--ec-line-2); border-radius: 26px; background: radial-gradient(120% 90% at 50% 0%, rgb(246 220 156 / .12), rgb(255 236 214 / .02) 70%); box-shadow: 0 30px 60px -40px rgb(217 171 82 / .6); }
body.roman-menu #app .room-code-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
body.roman-menu #app .room-code-actions > * { min-width: 170px; }
body.roman-menu #app .room-panel .room-how { font-size: 14px; }
body.roman-menu #app .room-panel .room-how-join { max-width: 620px; font-size: 16px; text-wrap: balance; }
/* One even gap down the waiting screen; the friends box takes no room while it's empty. */
body.roman-menu #app .room-panel .room-waiting { gap: 20px; }
body.roman-menu #app .room-panel .room-waiting h2 { margin: 0; }
body.roman-menu #app .room-waiting .room-invite-friends:empty { display: none; }
body.roman-menu #app .room-how b { color: var(--ec-text); font-weight: 650; }
/* Temporary, for testing on one Wi-Fi only. Small and out of the way. */
body.roman-menu #app .room-lan-test { display: grid; justify-items: center; gap: 8px; margin-top: 18px; opacity: .72; }
body.roman-menu #app .room-lan-test:hover, body.roman-menu #app .room-lan-test:focus-within { opacity: 1; }
body.roman-menu #app .room-lan-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px dashed var(--ec-line-2); border-radius: 999px; background: none; color: var(--ec-text-2); font: 600 12px var(--ec-font-ui); cursor: pointer; }
body.roman-menu #app .room-lan-toggle small { padding: 2px 6px; border-radius: 999px; background: rgb(255 255 255 / .08); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
body.roman-menu #app .room-lan-detail { display: grid; gap: 8px; max-width: 460px; }
body.roman-menu #app .room-panel .room-lan-detail p { font-size: 12.5px; }
body.roman-menu #app .room-lan-row { display: flex; gap: 8px; justify-content: center; align-items: center; }
body.roman-menu #app .room-lan-row code { padding: 8px 12px; border-radius: 10px; background: rgb(0 0 0 / .35); color: var(--ec-gold-hi); font: 600 14px ui-monospace, monospace; }

/* --------------------------------------------------------- Wager, next to Start game */
body.roman-menu .champion-picker .room-wager-slot:empty { display: none; }
/* Wager sits last in the launch column, just above the maps (owner, 2026-11-27). */
body.roman-menu .champion-picker .room-wager-slot { margin: 10px 0 0; }
/* One even gap down the launch column (owner, 2026-11-27: "spacing is terrible"): Ready up, hint, wager
   all 16px apart, the same as the page's row gap down to the maps. Hint centred under the button. */
body.roman-menu .champion-picker .picker-launch { display: flex; flex-direction: column; gap: 16px; }
body.roman-menu .champion-picker .picker-launch > * { margin: 0; }
body.roman-menu .champion-picker .picker-launch .picker-hint { margin: 0; min-height: 0; text-align: center; }
body.roman-menu .champion-picker .picker-launch .picker-hint:empty { display: none; }
body.roman-menu .champion-picker .room-wager-slot .wg { padding: 12px 16px; }

/* Lobby labels (Players, Question difficulty, Computer skill...) use the same display font and gold as
   "Champion Preview" / "Select a person from history", at their old small size. Site-wide (owner, 2026-11-27). */
body.roman-menu #app :is(.room-level-tag, .party-count-row > span, .party-check-inline .party-check-text) {
  font-family: var(--ec-font-display);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .12em;
  opacity: 1;
  background: linear-gradient(180deg, #fff6e6 10%, var(--ec-gold-hi) 55%, var(--ec-gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* The chosen map gets a bold gold frame, not a faint border (owner, 2026-11-27). Everywhere a map is picked. */
body.roman-menu #app .arena-card[aria-checked="true"] {
  outline: 3px solid var(--ec-gold-hi);
  outline-offset: 3px;
  border-color: var(--ec-gold-hi);
  box-shadow: 0 0 0 2px rgb(20 8 6 / .9), 0 0 26px 4px rgb(246 210 130 / .55);
}
/* Same parts as the difficulty bar and Start game: dark track, pill buttons, one gold. (owner, 2026-11-25) */
.wg { --wg-gold: var(--ec-gold-hi, #f6dc9c); --wg-fill: linear-gradient(180deg, #fbe7b4, #d9ab52 52%, #b5823a); --wg-ink: #2a1408;
  position: relative; display: grid; gap: 12px; padding: 14px 16px; border-radius: 26px; color: var(--ec-text, #fcf1e1);
  border: 1px solid var(--ec-line-2, rgb(246 220 156 / .28)); background: rgb(16 5 4 / .55); text-align: left; }
.wg summary { list-style: none; cursor: pointer; }
.wg summary::-webkit-details-marker { display: none; }
.wg > summary, .wg-top, .wg.is-locked, .wg.is-waiting { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; }
.wg-coin { width: 40px; height: 40px; filter: drop-shadow(0 4px 10px rgb(232 180 79 / .35)); }
.wg-copy { display: grid; gap: 1px; min-width: 0; }
.wg-copy small { font: 700 10px/1.2 var(--ec-font-ui, Inter, sans-serif); letter-spacing: .16em; text-transform: uppercase; color: rgb(246 220 156 / .7); }
.wg-copy b { font: 600 21px/1.15 var(--ec-font-display, Georgia, serif); color: var(--wg-gold); }
.wg-copy span { font: 500 13px/1.35 var(--ec-font-ui, Inter, sans-serif); color: var(--ec-text-2, #dcc8aa); }
.wg-chev { width: 10px; height: 10px; border-right: 2px solid var(--wg-gold); border-bottom: 2px solid var(--wg-gold); transform: rotate(45deg); transition: transform .2s; margin-right: 6px; }
.wg[open] .wg-chev { transform: rotate(225deg); }
/* Owner, 2026-11-27: "Add a wager?" bar centred — coin + title sit together in the middle, chevron pinned right. */
.wg.is-idle > summary { display: flex; justify-content: center; position: relative; padding-inline: 28px; }
.wg.is-idle > summary .wg-copy { flex: none; }
.wg.is-idle > summary .wg-chev { position: absolute; right: 0; top: 50%; margin-top: -7px; }
.wg.is-idle[open] > summary .wg-chev { margin-top: -2px; }
.wg.is-idle:not([open]):hover { border-color: rgb(246 220 156 / .45); }
/* Owner, 2026-12-01: "Add a wager?" sat high in its bar. Chrome keeps a closed <details>' hidden body as
   a grid item, so the 12px gap was added under the summary. Closed = no gap, the bar is centred. */
.wg.is-idle:not([open]) { gap: 0; }
.wg-form { display: grid; gap: 10px; }
/* Quick amounts = one track like the difficulty bar, not four loose boxes. */
.wg .wg-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; border: 1px solid var(--ec-line-2, rgb(246 220 156 / .28)); border-radius: 999px; background: rgb(0 0 0 / .22); }
.wg .wg-chips button { min-height: 40px; margin: 0; padding: 0 6px; border: 0; border-radius: 999px; background: transparent; box-shadow: none; color: var(--ec-text-2, #dcc8aa); font: 650 14px var(--ec-font-ui, Inter, sans-serif); white-space: nowrap; cursor: pointer; transition: background .15s, color .15s; }
/* Owner, 2026-11-27: the EC coin (not ◉) wherever a wager amount shows. */
.wg .wg-cc { width: 1.05em; height: 1.05em; flex: none; vertical-align: -.16em; filter: drop-shadow(0 1px 3px rgb(232 180 79 / .35)); }
.wg .wg-chips button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.wg .wg-chips button:hover:not(:disabled), .wg .wg-chips button:focus-visible { background: rgb(246 220 156 / .09); color: var(--ec-text, #fcf1e1); outline: none; }
/* chosen amount = the difficulty bar's highlight (dark fill, gold edge, cream serif), not a yellow pill */
.wg .wg-chips button.is-on { background: linear-gradient(180deg, rgb(246 220 156 / .12), rgb(246 220 156 / .04)), rgb(40 13 10 / .9); color: #f6dc9c;
  box-shadow: inset 0 0 0 1px rgb(246 220 156 / .55), 0 8px 20px -12px rgb(0 0 0 / .8); }
.wg .wg-chips button.is-all { font-family: "Cormorant Garamond", "Iowan Old Style", Georgia, serif; font-weight: 700; font-size: 17px; color: #f6dc9c; }
.wg .wg-chips button:disabled { opacity: .35; cursor: not-allowed; }
/* Amount + Offer = one pill, the button is the same gold pill as Start game. */
.wg .wg-entry { display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 18px; border: 1px solid var(--ec-line-2, rgb(246 220 156 / .28)); border-radius: 999px; background: rgb(0 0 0 / .22); transition: border-color .15s; }
.wg .wg-entry:focus-within { border-color: rgb(246 220 156 / .6); }
.wg-entry > .wg-cc { width: 20px; height: 20px; }
.wg-entry input { flex: 1; min-width: 0; min-height: 40px; border: 0 !important; background: transparent !important; box-shadow: none !important; color: var(--ec-text, #fcf1e1); font: 650 16px var(--ec-font-ui, Inter, sans-serif); padding: 0 !important; outline: none; }
.wg-entry input::placeholder { color: rgb(220 200 170 / .55); }
.wg-entry input { -moz-appearance: textfield; appearance: textfield; }
.wg-entry input::-webkit-inner-spin-button, .wg-entry input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
/* Set / Offer = the site's main-button look (home Footnote card: dark wine, gold hairline, cream Cormorant), owner 2026-11-27 */
.wg .wg-entry .wg-go { flex: none; min-height: 40px; margin: 0; padding: 0 28px; border: 1px solid rgb(246 220 156 / .45); border-radius: 20px;
  background: linear-gradient(180deg, rgb(255 236 214 / .067), rgb(255 236 214 / .02)), rgb(28 9 7 / .62); color: #f6dc9c; -webkit-text-fill-color: #f6dc9c;
  font: 700 19px "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; letter-spacing: .01em; text-shadow: none; cursor: pointer;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .06), 0 10px 26px -14px rgb(0 0 0 / .8); transition: border-color .15s, background .15s, box-shadow .15s; }
.wg .wg-entry .wg-go:hover, .wg .wg-entry .wg-go:focus-visible { border-color: rgb(246 220 156 / .85); outline: none;
  background: linear-gradient(180deg, rgb(246 220 156 / .14), rgb(246 220 156 / .05)), rgb(36 12 9 / .75);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .08), 0 0 0 3px rgb(217 171 82 / .12), 0 12px 30px -14px rgb(0 0 0 / .85); }
/* "Broke bitch" (owner, 2026-11-30): the same button as the other wager choices, on the same line;
   the row gets four smaller buttons to make room. It only sends a line. */
.wg-actions.is-four { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.wg-actions.is-four > * { min-height: 38px; padding-inline: 6px !important; font-size: 15px !important; line-height: 1.1; white-space: normal; }
.wg-taunt { grid-column: 1 / -1; margin: 0; padding: 8px 12px; border-radius: 14px; background: rgb(255 120 96 / .12); border: 1px solid rgb(255 143 122 / .35);
  color: #ffd2c8; font: 500 13.5px var(--ec-font-ui, Inter, sans-serif); animation: wg-taunt-in .3s ease-out; }
@keyframes wg-taunt-in { from { opacity: 0; transform: translateY(-4px); } }
.wg-taunt b { color: #ffb0a0; font-weight: 700; }
.wg-balance { padding-left: 18px; font: 500 12px var(--ec-font-ui, Inter, sans-serif); color: rgb(220 200 170 / .7); }
.wg-link { border: 0; background: none; color: rgb(255 236 214 / .75); font: 600 12.5px var(--ec-font-ui, Inter, sans-serif); text-decoration: underline; cursor: pointer; }
.wg.is-waiting .wg-coin { animation: wg-spin 2.4s linear infinite; }
@keyframes wg-spin { to { transform: rotateY(360deg); } }
.wg.is-offer { border-color: rgb(246 220 156 / .6); animation: wager-glow 1.8s ease-in-out infinite; }
.wg.is-offer .wg-top { grid-template-columns: 40px 1fr; }
.wg-actions { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; }
.wg-actions > * { min-height: 42px; margin: 0 !important; }
.wg-actions.is-three { grid-template-columns: repeat(3, 1fr); }
.wg-actions.is-three > .ec-btn.is-on { border-color: rgb(246 220 156 / .6); color: var(--wg-gold); }
.wg-line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.wg-line span { text-align: right; }
.wg-counter-form[hidden] { display: none; }
.wg-counter summary { font: 600 12.5px var(--ec-font-ui, Inter, sans-serif); color: rgb(255 236 214 / .7); text-decoration: underline; }
.wg-counter[open] summary { margin-bottom: 10px; }
.wg.is-locked { border-color: rgb(246 220 156 / .55); background: radial-gradient(120% 140% at 0% 50%, rgb(217 171 82 / .2), rgb(16 5 4 / .55) 70%); }
.wg.is-locked .wg-copy b { font-size: 20px; }

/* ---------------------------------------------------------------------- Turn timers */
.room-timer { position: fixed; z-index: 60; top: 74px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px;
  padding: 8px 14px 8px 10px; border-radius: 999px; border: 1px solid rgb(246 220 156 / .35); background: rgb(24 10 6 / .88); backdrop-filter: blur(8px);
  color: #fff3dc; font: 600 13px var(--ec-font-ui, Inter, sans-serif); box-shadow: 0 14px 30px -16px rgb(0 0 0 / .9); pointer-events: none; animation: rt-in .3s ease-out; }
.room-timer i { --p: 1; width: 22px; height: 22px; border-radius: 50%; background: conic-gradient(#f6dc9c calc(var(--p) * 360deg), rgb(255 255 255 / .12) 0); -webkit-mask: radial-gradient(circle, transparent 6px, #000 7px); mask: radial-gradient(circle, transparent 6px, #000 7px); }
.room-timer span:empty { display: none; }
.room-timer b { min-width: 2.4em; color: #f6dc9c; font-variant-numeric: tabular-nums; text-align: right; }
.room-timer.is-urgent { border-color: #ff8f7a; }
.room-timer.is-urgent b { color: #ffb0a0; animation: rt-pulse .5s ease-in-out infinite alternate; }
.room-timer.is-urgent i { background: conic-gradient(#ff8f7a calc(var(--p) * 360deg), rgb(255 255 255 / .12) 0); }
@keyframes rt-in { from { opacity: 0; transform: translate(-50%, -8px); } }
/* In a match there's no chip: waiting time runs down the same gold bar as answering (owner, 2026-11-25). */
body.duel-view #app .panel > .quiz-progress.wait-bar { position: absolute; inset: 0 26px auto; width: auto; height: 4px; margin: 0; border: 0; appearance: none;
  border-radius: 0 0 4px 4px; background: rgb(255 236 214 / .1); accent-color: var(--ec-gold, #f6dc9c); }
body.duel-view #app .panel > .quiz-progress.wait-bar::-webkit-progress-bar { background: rgb(255 236 214 / .1); border-radius: 0 0 4px 4px; }
body.duel-view #app .panel > .quiz-progress.wait-bar::-webkit-progress-value { background: linear-gradient(90deg, var(--ec-gold-lo, #c79a4a), var(--ec-gold-hi, #f6dc9c)); border-radius: 0 0 4px 4px; box-shadow: 0 0 10px rgb(246 220 156 / .8); }
body.duel-view #app .panel > .quiz-progress.wait-bar::-moz-progress-bar { background: linear-gradient(90deg, var(--ec-gold-lo, #c79a4a), var(--ec-gold-hi, #f6dc9c)); border-radius: 0 0 4px 4px; }
@media (max-width: 720px) { body.duel-view #app .panel > .quiz-progress.wait-bar { inset: 0 18px auto; } }
@keyframes rt-pulse { to { opacity: .55; } }

/* ----------------------------------------------------------- Room bar (champion select) */
/* Owner, 2026-11-26: kind of match + who you're playing, and the 60 s select clock as a gold bar
   draining along the top edge (the arena's question bar), no number, no floating chip. */
/* No box of its own: it sits straight in the room panel, and the clock runs along the panel's top edge. */
body.roman-menu #app #lan-play > .room-bar { position: static; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 6px 2px; }
body.roman-menu #app .room-panel:has(> #lan-play > .room-bar) { position: relative; }
/* Owner, 2026-11-27: the bar runs the full width of the panel's top edge, corner to corner (the panel's
   rounded corners + overflow:hidden clip its ends), not inset from the sides. */
.room-bar-clock { position: absolute; inset: 0 0 auto; height: 4px; border-radius: 0; overflow: hidden; background: rgb(255 236 214 / .1); opacity: 0; transition: opacity .3s; }
.room-bar.is-timed .room-bar-clock { opacity: 1; }
.room-bar-clock { --p: 1; }
.room-bar-clock i { position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--p)); border-radius: 0 4px 4px 0;
  background: linear-gradient(90deg, var(--ec-gold-lo, #c79a4a), var(--ec-gold-hi, #f6dc9c)); box-shadow: 0 0 10px rgb(246 220 156 / .8); }
.room-bar-clock.is-urgent i { background: linear-gradient(90deg, #c4452f, #ff8f7a); box-shadow: 0 0 12px rgb(255 120 96 / .85); animation: rt-pulse .5s ease-in-out infinite alternate; }
body.roman-menu #app .room-bar .room-bar-info { display: grid; gap: 4px; min-width: 0; }
body.roman-menu #app .room-bar .room-bar-kind { margin: 0; color: var(--ec-gold-hi, #f6dc9c); font: 700 11.5px var(--ec-font-ui, Inter, sans-serif); letter-spacing: .16em; text-transform: uppercase; }
body.roman-menu #app .room-bar #lan-room { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 10px; margin: 0; color: #fff6e6; font: 600 clamp(22px, 2.6vw, 30px)/1.15 var(--ec-font-display, Georgia, serif); }
body.roman-menu #app .room-bar #lan-room .rb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
body.roman-menu #app .room-bar #lan-room .rb-vs { color: rgb(255 236 214 / .5); font: italic 500 .7em var(--ec-font-display, Georgia, serif); }

/* ------------------------------------------------------------------ Opponent left */
.room-left { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 16px; background: rgb(8 3 2 / .66); backdrop-filter: blur(6px); animation: rl-fade .25s ease-out; }
.room-left-card { display: grid; justify-items: center; gap: 10px; width: min(520px, 100%); padding: 28px 24px 20px; border-radius: 26px; text-align: center;
  border: 1px solid rgb(246 220 156 / .3); background: linear-gradient(170deg, #3a2014, #1a0c07); color: #fff3dc; box-shadow: 0 40px 80px -30px rgb(0 0 0 / .95); animation: rl-pop .35s cubic-bezier(.2,1.3,.4,1); }
.room-left-emblem { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; background: rgb(246 220 156 / .12); color: #f6dc9c; font-size: 28px; }
.room-left-card.is-win .room-left-emblem { background: linear-gradient(180deg, #f2cf7d, #b97e25); color: #2a1606; box-shadow: 0 0 30px rgb(246 220 156 / .45); }
.room-left-card h2 { margin: 4px 0 0; font: 600 clamp(24px, 4vw, 30px)/1.15 var(--ec-font-display, Georgia, serif); color: #fff6e6; }
.room-left-card > p { margin: 0 0 8px; color: rgb(255 236 214 / .75); font: 500 15px/1.5 var(--ec-font-ui, Inter, sans-serif); }
.room-left-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100%; }
.room-left-actions button { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; border: 1px solid rgb(246 220 156 / .2); background: rgb(255 236 214 / .05); color: #fff3dc; text-align: left; cursor: pointer; transition: transform .15s, border-color .15s, background .15s; }
.room-left-actions button:hover, .room-left-actions button:focus-visible { transform: translateY(-2px); border-color: rgb(246 220 156 / .55); background: rgb(255 236 214 / .09); }
.room-left-actions button.is-primary { border-color: transparent; background: linear-gradient(180deg, #f2cf7d, #c48d32); color: #2a1606; }
.room-left-actions .rl-icon { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; background: rgb(0 0 0 / .2); font-size: 17px; }
.room-left-actions b { display: block; font: 700 14px var(--ec-font-ui, Inter, sans-serif); }
.room-left-actions small { display: block; font: 500 12px var(--ec-font-ui, Inter, sans-serif); opacity: .75; }
.room-left-stay { margin-top: 6px; color: rgb(255 236 214 / .7); }
.room-left.is-mini { inset: auto 16px 16px auto; padding: 0; background: none; backdrop-filter: none; place-items: end; }
.room-left.is-mini .room-left-card { width: min(380px, calc(100vw - 32px)); padding: 16px; gap: 8px; }
.room-left.is-mini .room-left-emblem, .room-left.is-mini .room-left-card > p, .room-left.is-mini .room-left-stay, .room-left.is-mini small { display: none; }
.room-left.is-mini h2 { font-size: 18px; }
@media (max-width: 520px) { .room-left-actions { grid-template-columns: 1fr; } }
@keyframes rl-fade { from { opacity: 0; } }
@keyframes rl-pop { from { opacity: 0; transform: translateY(14px) scale(.96); } }

/* ------------------------------------------------- Alexander's phalanx: BLOCKED */
.block-fx { position: absolute; z-index: 30; left: 50%; top: 42%; width: clamp(220px, 26vw, 340px); pointer-events: none; transform: translate(-50%, -50%); opacity: 0; }
.block-fx.is-tracked { left: 0; top: 0; transform: translate(calc(var(--head-x) - 50%), calc(var(--head-y) + 10px)); }
.block-fx.is-on { opacity: 1; }
/* The arena is redrawn for the attack, and the page-entrance rise (ui-overhaul .ec-enter > *) would run on
   the block too: its transform overrides the head position, so it sat top-left until the class dropped. */
.ec-enter > .block-fx { animation: none; filter: none; }
.block-fx.is-done { opacity: 0; transition: opacity .55s; }
.block-wall { position: relative; display: flex; justify-content: center; height: clamp(90px, 10vw, 130px); }
.block-shield { --k: 0; position: absolute; top: 0; width: clamp(80px, 9vw, 118px); height: auto; left: calc(50% + (var(--k) - 2) * 21% - clamp(40px, 4.5vw, 59px));
  filter: drop-shadow(0 10px 14px rgb(0 0 0 / .6)); opacity: 0; transform: translateX(calc((var(--k) - 2) * 140%)) rotate(calc((var(--k) - 2) * 25deg)) scale(.6); z-index: calc(5 - (var(--k) - 2) * (var(--k) - 2)); }
.block-fx.is-on .block-shield { animation: block-slam .34s cubic-bezier(.3,1.6,.5,1) forwards; animation-delay: calc(abs(var(--k) - 2) * 45ms); }
@supports not (animation-delay: calc(abs(1) * 1ms)) { .block-fx.is-on .block-shield { animation-delay: 0ms; } }
@keyframes block-slam { 0% { opacity: 0; } 60% { opacity: 1; transform: translateX(0) rotate(0) scale(1.12); } 100% { opacity: 1; transform: translateX(0) rotate(0) scale(1); } }
.block-ring { position: absolute; left: 50%; top: clamp(45px, 5vw, 65px); width: 40px; height: 40px; margin: -20px; border-radius: 50%; border: 4px solid #ffe7a8; opacity: 0; }
.block-fx.is-on .block-ring { animation: block-ring .6s .2s ease-out forwards; }
@keyframes block-ring { 0% { opacity: .95; transform: scale(.4); } 100% { opacity: 0; transform: scale(7); border-width: 1px; } }
.block-word { margin: 8px 0 0; text-align: center; font: 800 clamp(30px, 4.4vw, 52px)/1 var(--ec-font-display, Georgia, serif); letter-spacing: .06em; color: #fff4d2;
  text-shadow: 0 0 18px #ffd27a, 0 4px 0 #6b3f12, 0 8px 22px rgb(0 0 0 / .7); opacity: 0; transform: scale(1.8); }
.block-word small { display: block; margin-bottom: 6px; font: 700 11px/1 var(--ec-font-ui, Inter, sans-serif); letter-spacing: .24em; text-transform: uppercase; color: #ffd2a3; text-shadow: 0 2px 6px rgb(0 0 0 / .8); }
.block-fx.is-on .block-word { animation: block-word .45s .18s cubic-bezier(.2,1.4,.4,1) forwards; }
@keyframes block-word { to { opacity: 1; transform: scale(1); } }
.block-fx.is-crowd .block-word { color: #ffe3c9; text-shadow: 0 0 18px #ffb46a, 0 4px 0 #6b2f12, 0 8px 22px rgb(0 0 0 / .7); }
.arena.is-block-shake .stage { animation: block-shake .5s cubic-bezier(.36,.07,.19,.97); }
@keyframes block-shake { 10%, 90% { transform: translate(-2px, 1px); } 20%, 80% { transform: translate(4px, -2px); } 30%, 50%, 70% { transform: translate(-7px, 2px); } 40%, 60% { transform: translate(7px, -1px); } }
@media (prefers-reduced-motion: reduce) {
  .block-fx.is-on .block-shield, .block-fx.is-on .block-word { animation: none; opacity: 1; transform: none; }
  .arena.is-block-shake .stage { animation: none; }
}

/* ------------------------------------------- Cleopatra's Nine Tongues: multiple choice */
.typed-answer.pw-mc-hidden { display: none !important; }
.pw-options { display: grid; gap: 10px; margin-top: 10px; padding: 12px; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--pw) 45%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--pw) 12%, transparent), rgb(0 0 0 / .25)); animation: mc-in .35s ease-out; }
.pw-options-head { display: flex; align-items: center; gap: 10px; margin: 0; text-align: left; color: #fff3dc; font: 650 15px var(--ec-font-display, Georgia, serif); }
.pw-options-head .pw-art { width: 34px; height: 34px; border-radius: 10px; flex: none; }
.pw-options-head small { display: block; font: 700 10px/1.3 var(--ec-font-ui, Inter, sans-serif); letter-spacing: .16em; text-transform: uppercase; color: var(--pw); }
.pw-options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pw-options-grid button { --j: 0; display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 10px 12px; border-radius: 14px; text-align: left;
  border: 1px solid color-mix(in srgb, var(--pw) 35%, transparent); background: rgb(20 8 4 / .7); color: #fff3dc; font: 600 15px/1.25 var(--ec-font-ui, Inter, sans-serif); cursor: pointer;
  transition: transform .15s, border-color .15s, background .15s, opacity .2s; animation: mc-opt .32s calc(var(--j) * 60ms) both cubic-bezier(.2,1.3,.4,1); }
.pw-options-grid button b { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 9px; background: color-mix(in srgb, var(--pw) 22%, transparent); color: var(--pw); font: 800 13px var(--ec-font-ui, Inter, sans-serif); }
.pw-options-grid button:hover:not(:disabled), .pw-options-grid button:focus-visible { transform: translateY(-2px); border-color: var(--pw); background: color-mix(in srgb, var(--pw) 14%, rgb(20 8 4 / .8)); outline: none; }
.pw-options.is-chosen button:not(.is-picked) { opacity: .35; }
.pw-options-grid button.is-picked { border-color: var(--pw); background: color-mix(in srgb, var(--pw) 30%, rgb(20 8 4 / .8)); transform: scale(1.03); }
.pw-options-grid button.is-picked b { background: var(--pw); color: #2a1606; }
@media (max-width: 520px) { .pw-options-grid { grid-template-columns: 1fr; } }
@keyframes mc-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes mc-opt { from { opacity: 0; transform: translateY(8px) scale(.96); } }
/* The "use it" suggestion inside the question box when Nine Tongues is charged. */
.pw-suggest { display: grid; grid-template-columns: 76px minmax(0, 1fr) 76px; align-items: center; gap: 10px; margin-top: 10px; padding: 9px 10px; border-radius: 14px; text-align: center;
  border: 1px dashed color-mix(in srgb, var(--pw) 60%, transparent); background: color-mix(in srgb, var(--pw) 8%, transparent); color: rgb(255 236 214 / .85); font: 500 13px/1.35 var(--ec-font-ui, Inter, sans-serif); animation: mc-in .4s ease-out; }
.pw-suggest .pw-art { width: 36px; height: 36px; border-radius: 10px; justify-self: start; }
.pw-suggest > button { justify-self: end; }
.pw-suggest small { display: block; font: 700 10px/1.3 var(--ec-font-ui, Inter, sans-serif); letter-spacing: .14em; text-transform: uppercase; color: var(--pw); }
.pw-suggest strong { color: #fff3dc; }
.pw-suggest button { padding: 8px 14px; border: 0; border-radius: 10px; background: var(--pw); color: #2a1606; font: 700 13px var(--ec-font-ui, Inter, sans-serif); cursor: pointer; box-shadow: 0 0 0 0 color-mix(in srgb, var(--pw) 60%, transparent); animation: mc-call 1.6s ease-in-out infinite; }
@keyframes mc-call { 50% { box-shadow: 0 0 0 6px transparent; } 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pw) 55%, transparent); } }
