/* Era Clash · owner polish pass (2026-11-18). Loaded last (game.js, with match-ui.css), so it wins.
   1. Header: your picture hangs from the top bar in a gold-rimmed dip; Shop sits right by the coins.
   2. Make an account: one short, friendly card.
   3. Arena right/wrong stamp: smaller and cleaner.
   4. Ready up buttons + "Ready" tags in room lobbies. */

/* ------------------------------------------------------------- 1. Header
   Player plate (owner, 2026-11-24, replaces the hanging corner portrait): Shop, coins and you sit in one
   row of matching 40px capsules, centred in the bar, nothing hanging off the corner.
   You = your champion in a round frame whose gold ring fills with your Legacy Road XP, a level badge,
   and your name. Guest = a silhouette, "Guest" and "Sign in". Built by syncHeaderAvatar() in game.js. */
body > header .command-shop { gap: 10px; align-items: center; padding-right: 0; }
body > header .command-shop > * { align-self: center; }
/* Divider under the top bar: OFF as an experiment (owner, 2026-11-30, "just curious how it looks").
   To bring it back, delete this block and restore the gold ::after line:
   background: linear-gradient(90deg, transparent 0%, rgb(217 171 82 / .25) 40%, rgb(217 171 82 / .7) 100%); */
body.roman-menu:not(.duel-view) > header { border-bottom-color: transparent !important; }
body.roman-menu:not(.duel-view) > header::after { content: none !important; }

/* Shop: a gold capsule with a little bag. */
body.roman-menu > header .command-shop #shop-open {
  display: inline-flex; align-items: center; gap: 7px; box-sizing: border-box;
  height: 40px; min-height: 40px; margin: 0; padding: 0 16px 0 13px;
  border: 1px solid rgb(217 171 82 / .55); border-radius: 99px;
  background: linear-gradient(180deg, rgb(217 171 82 / .22), rgb(217 171 82 / .07));
  color: #f6dfa6; font-size: 14px; font-weight: 650; letter-spacing: .01em;
}
body.roman-menu > header .command-shop #shop-open:hover { background: linear-gradient(180deg, rgb(217 171 82 / .34), rgb(217 171 82 / .12)); border-color: #e8c26e; color: #fff1cc; }
body > header #shop-open .hdr-bag { width: 16px; height: 16px; flex: none; color: #f2c85b; }

/* Ducats: the old struck "EF" ducat (assets/ducat.svg) and the number (no "+": the counter itself opens the coin shop). */
body.roman-menu > header .command-shop .coin-counter {
  display: inline-flex; align-items: center; gap: 8px; box-sizing: border-box;
  height: 40px !important; min-height: 40px !important; padding: 0 14px 0 10px !important; font-size: 14px; font-weight: 700; color: #fbe7b5;
  border: 1px solid rgb(217 171 82 / .35); background: rgb(14 5 3 / .45);
}
body.roman-menu > header .command-shop .coin-counter > b {
  width: 20px; height: 20px; flex: none; border-radius: 50%; font-size: 0; color: transparent;
  background: url("assets/ducat.svg?v=1") center / 100% no-repeat;
  box-shadow: none; filter: drop-shadow(0 1px 2px rgb(0 0 0 / .5));
}

/* You: the player plate. */
body > header #account-open.has-hdr-avatar {
  position: relative !important; inset: auto !important; z-index: 2; flex: none;
  display: inline-flex !important; align-items: center; gap: 10px; box-sizing: border-box;
  width: auto !important; height: 40px !important; min-width: 0 !important; min-height: 40px !important;
  margin: 0 !important; padding: 0 16px 0 0 !important;
  border: 1px solid rgb(217 171 82 / .45) !important; border-radius: 99px !important;
  background: linear-gradient(90deg, rgb(92 32 20 / .85), rgb(30 10 6 / .85)) !important;
  box-shadow: 0 6px 16px -8px rgb(0 0 0 / .8) !important; color: #f6e7c8; cursor: pointer; overflow: visible;
  transition: border-color .15s ease, box-shadow .15s ease, filter .15s ease;
}
body > header #account-open.has-hdr-avatar > svg,
body > header #account-open.has-hdr-avatar > span { display: none !important; }
body > header #account-open.has-hdr-avatar:hover { border-color: #e8c26e !important; filter: brightness(1.08); box-shadow: 0 0 0 3px rgb(242 200 91 / .14), 0 6px 16px -8px rgb(0 0 0 / .8) !important; outline: none !important; }
body > header #account-open.has-hdr-avatar:focus-visible { outline: 2px solid #fff4d6 !important; outline-offset: 3px; }
/* The portrait pokes a little out of the capsule; its ring is your progress to the next level. */
body > header #account-open .hdr-avatar {
  --xp: 0;
  position: relative; flex: none; width: 50px; height: 50px; margin: -5px 0 -5px -6px; padding: 3px; box-sizing: border-box;
  display: block; border-radius: 50%; font-style: normal;
  /* Solid colour under the ring: the empty part is see-through, and the capsule's gold edge must not show in it. */
  background: conic-gradient(#f2c85b calc(var(--xp) * 1%), rgb(255 236 200 / .16) 0) #2a0f0a;
  box-shadow: 0 4px 10px -2px rgb(0 0 0 / .7);
  transition: transform .18s ease;
}
body > header #account-open .hdr-avatar > * {
  display: block; width: 100%; height: 100%; box-sizing: border-box; border-radius: 50%;
  border: 2px solid #1b0b07; background: radial-gradient(circle at 40% 30%, #6a2a1c, #1b0d09 80%);
}
body > header #account-open .hdr-avatar img { object-fit: cover; object-position: center 16%; }
body > header #account-open .hdr-avatar .hdr-guest { padding: 8px 8px 6px; color: #f2c85b; }
body > header #account-open.has-hdr-avatar:hover .hdr-avatar { transform: scale(1.05); }
body > header #account-open .hdr-lvl {
  position: absolute; left: 32px; bottom: -6px; z-index: 1; min-width: 20px; height: 20px; padding: 0 5px; box-sizing: border-box;
  display: grid; place-items: center; border-radius: 99px; border: 1.5px solid #1b0b07;
  font: 800 11px/1 var(--ec-font-ui, system-ui); font-style: normal; color: #2a1206;
  background: linear-gradient(180deg, #ffe08a, #d9a43c);
}
body > header #account-open .hdr-lvl[hidden] { display: none; }
body > header #account-open .hdr-who { display: grid; gap: 1px; text-align: left; line-height: 1.1; min-width: 0; font-weight: inherit; }
body > header #account-open .hdr-who > b { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; font-weight: 700; color: #fff1d6; }
body > header #account-open .hdr-who small { font-size: 11px; font-weight: 600; color: #d9ab52; letter-spacing: .02em; white-space: nowrap; }

/* In a match, and on phones, just the round picture. */
body.duel-view > header #account-open.has-hdr-avatar { padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; margin-left: 8px !important; }
body.duel-view > header #account-open .hdr-avatar { width: 40px; height: 40px; margin: 0; padding: 2px; }
body.duel-view > header #account-open :is(.hdr-who, .hdr-lvl) { display: none; }
body > header .command-shop { flex-wrap: nowrap !important; }
/* Picture-only profile button up to 1180px (not just 1000px): just above 1000px the one-row header has no
   room for Shop + a 7-digit coin balance + a long Battletag next to the menu. */
@media (max-width: 1180px) {
  body > header #account-open.has-hdr-avatar { padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; margin: 0 !important; }
  body > header #account-open .hdr-avatar { width: 44px; height: 44px; margin: 0; }
  body > header #account-open .hdr-who { display: none; }
  body > header #account-open .hdr-lvl { left: auto; right: -4px; bottom: -4px; }
}

/* Top bar titles (owner, 2026-11-25): Home, the menus, Legacy Road, Shop, coins and your name use the same
   bold gold serif as the "Who Goes There?" / "Footnote" daily-card titles on the home page.
   Dropdown rows keep the plain UI font. */
body.roman-menu > header :is(#home-nav, nav > button, nav > .nav-dropdown > button, #shop-open, .coin-counter, #account-open .hdr-who > b, #_) {
  font-family: var(--ec-font-display) !important;
  font-weight: 700 !important;
  font-size: 19px !important;
  line-height: 1.05 !important;
  letter-spacing: .01em !important;
  text-shadow: 0 2px 8px rgb(0 0 0 / .55);
}
body.roman-menu > header :is(#home-nav, nav > button, nav > .nav-dropdown > button, #_) { color: var(--ec-gold-hi, #f6dc9c) !important; }
body.roman-menu > header :is(#home-nav, nav > button, nav > .nav-dropdown > button, #_):is(:hover, [aria-expanded="true"]) { color: #fff6e6 !important; }
body.roman-menu > header #home-nav, body.roman-menu > header #home-nav[aria-current="page"] { color: var(--ec-gold-hi, #f6dc9c) !important; }
body.roman-menu > header #shop-open { color: var(--ec-gold-hi, #f6dc9c) !important; }
body.roman-menu > header #account-open .hdr-who > b { font-size: 18px !important; color: var(--ec-gold-hi, #f6dc9c); }
body.roman-menu > header .nav-dropdown > button::after { text-shadow: none; font-family: var(--ec-font-ui); }
body.roman-menu > header .coin-counter output { font: inherit !important; color: var(--ec-gold-hi, #f6dc9c); }
body.roman-menu > header #account-open :is(.hdr-who, .hdr-who small, > span) { font-family: var(--ec-font-display) !important; font-weight: 700 !important; }
body.roman-menu > header #account-open .hdr-who small { font-size: 14px !important; letter-spacing: .01em; text-shadow: 0 2px 8px rgb(0 0 0 / .55); }
body.roman-menu > header #account-open .hdr-lvl { font-family: var(--ec-font-display) !important; font-weight: 700 !important; }

/* Ranked under your name (owner, 2026-11-30): replaces the squashed "SP (6) ON (1)" circles.
   Sword = single player, globe = online, then the rank code; hover shows the full rank. The plate
   keeps the same 40px height as Shop and coins, so the name drops to 16px to make room. */
@media (min-width: 1181px) { body.roman-menu > header #account-open.hdr-signed-in .hdr-who { display: grid; gap: 3px; } }
body.roman-menu > header #account-open.hdr-signed-in .hdr-who > b { font-size: 16px !important; line-height: 1 !important; }
/* Name centred over the rank row (owner, 2026-11-30). */
body.roman-menu > header #account-open.hdr-signed-in .hdr-who { justify-items: center; text-align: center; }
body.roman-menu > header #account-open .hdr-who small.hdr-ranks {
  display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0;
  font: 700 11px/1 var(--ec-font-ui, system-ui) !important; letter-spacing: .08em; text-shadow: none;
}
body.roman-menu > header #account-open .hdr-who small.hdr-ranks[hidden] { display: none !important; }
body > header #account-open .hdr-rank { display: inline-flex; align-items: center; gap: 4px; color: #f3dca6; }
body > header #account-open .hdr-rank svg { width: 12px; height: 12px; flex: none; color: #d9ab52; }
body > header #account-open .hdr-rank b { all: unset; font: inherit; color: inherit; }
body > header #account-open .hdr-rank-sep { width: 1px; height: 10px; background: rgb(217 171 82 / .4); }
body > header #account-open.hdr-signed-in .hdr-lvl { display: none !important; }

/* Bigger account plate (owner, 2026-11-30): a touch taller than Shop/coins and wider, using the free
   space on the right of the bar. Desktop only; ≤1180px and matches stay portrait-only. */
@media (min-width: 1181px) {
  body.roman-menu:not(.duel-view) > header #account-open.has-hdr-avatar {
    height: 48px !important; min-height: 48px !important; min-width: 0 !important; /* hugs its words (owner, 2026-12-02) */
    gap: 10px; padding: 0 10px 0 0 !important; /* same space each side of the name, so it sits centred */
  }
  body.roman-menu:not(.duel-view) > header #account-open.has-hdr-avatar .hdr-who { flex: 1; justify-items: center; text-align: center; }
  /* Guest: words on the left, with clear space before the rounded end (owner, 2026-12-02). */
  body.roman-menu:not(.duel-view) > header #account-open.has-hdr-avatar:not(.hdr-signed-in) { padding-right: 20px !important; }
  body.roman-menu:not(.duel-view) > header #account-open.has-hdr-avatar:not(.hdr-signed-in) .hdr-who { justify-items: start; text-align: left; }
  body.roman-menu:not(.duel-view) > header #account-open.has-hdr-avatar:not(.hdr-signed-in) .hdr-who small { font-size: 12px !important; letter-spacing: 0; }
  /* Shop, coins and you sit close to the right edge (owner, 2026-12-02). */
  body.roman-menu:not(.duel-view) > header { padding-right: 16px !important; }
  body.roman-menu:not(.duel-view) > header #account-open .hdr-avatar { width: 58px; height: 58px; margin: -5px 0 -5px -6px; }
  body.roman-menu:not(.duel-view) > header #account-open .hdr-lvl { left: 38px; }
  body.roman-menu:not(.duel-view) > header #account-open .hdr-who > b { max-width: 170px; }
  body.roman-menu:not(.duel-view) > header #account-open.hdr-signed-in .hdr-who > b { font-size: 19px !important; }
  body.roman-menu:not(.duel-view) > header #account-open .hdr-who small.hdr-ranks { font-size: 12.5px !important; gap: 10px; }
  body.roman-menu:not(.duel-view) > header #account-open .hdr-rank svg { width: 14px; height: 14px; }
  body.roman-menu:not(.duel-view) > header #account-open .hdr-rank-sep { height: 12px; }
}

/* Header numbers: full-height digits that share one line (Cormorant's default digits rise and dip). */
body.roman-menu > header :is(.coin-counter, .coin-counter output, #account-open .hdr-lvl, #account-open .hdr-rank b) { font-variant-numeric: lining-nums tabular-nums !important; }
body.roman-menu > header .coin-counter output { display: block; line-height: 1 !important; }

/* ------------------------------------------------------ 2. Make an account */
/* One frame only: the card. The section and panel around it go see-through. */
.pf-v2.pf-guest .pf-section.pf-guest-cta, .pf-v2.pf-guest .pf-guest-cta #account-panel.account-panel {
  padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; backdrop-filter: none !important;
}
.pf-v2.pf-guest .pf-guest-cta #account-panel.account-panel::before,
.pf-v2.pf-guest .pf-guest-cta #account-panel.account-panel::after { content: none !important; display: none !important; }
.pf-v2.pf-guest .pf-section.pf-guest-cta { margin-bottom: 34px; }
.pf-v2.pf-guest .pf-guest-cta > .pf-note { text-align: center; margin: 18px 0 0 !important; }
.acct-easy .acct-easy-head h2::after, .acct-easy .acct-easy-head h2::before { content: none !important; display: none !important; }
.acct-easy .acct-easy-head h2 { display: block !important; margin: 0 !important; }
.acct.acct-easy {
  display: grid; gap: 18px; width: min(480px, 100%); margin: 0 auto; padding: 26px;
  grid-template-columns: none; border-radius: 22px;
  border: 1px solid rgb(217 171 82 / .4);
  background: radial-gradient(120% 70% at 50% 0%, rgb(217 171 82 / .14), transparent 60%), linear-gradient(180deg, rgb(44 14 10 / .92), rgb(24 7 5 / .95));
  box-shadow: 0 24px 50px -24px rgb(0 0 0 / .85), inset 0 1px 0 rgb(255 255 255 / .06);
}
.acct-easy .acct-easy-head { display: grid; gap: 6px; text-align: center; }
.acct-easy .acct-easy-head h2 { margin: 0; font: 600 clamp(1.9rem, 4vw, 2.4rem)/1.05 var(--ec-font-display, 'Cormorant Garamond', serif); color: #fff3dc; }
.acct-easy .acct-easy-head h2::after { content: none; }
.acct-easy .acct-easy-head p { margin: 0; color: #e8c98a; font-size: .95rem; }
.acct-easy .acct-easy-form { display: grid; gap: 12px; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
.acct-easy .acct-easy-form > label:not(.acct-consent) { display: grid; gap: 5px; margin: 0; }
.acct-easy .acct-easy-form > label > span:first-child { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #d9ab52; }
.acct-easy .acct-easy-form input:not([type=checkbox]) {
  width: 100%; min-height: 48px; padding: 0 14px; border-radius: 12px; font-size: 1rem;
  border: 1px solid rgb(246 220 156 / .22); background: rgb(10 3 2 / .55); color: #fff3dc;
  transition: border-color .15s, box-shadow .15s;
}
.acct-easy .acct-easy-form input:not([type=checkbox]):focus { outline: none; border-color: #f2c85b; box-shadow: 0 0 0 3px rgb(242 200 91 / .2); }
.acct-easy .acct-easy-form input::placeholder { color: rgb(243 227 196 / .4); }
.acct-easy .acct-pw { position: relative; display: block; }
.acct-easy .acct-pw input { padding-right: 48px !important; }
.acct-easy .acct-eye { position: absolute; right: 6px; top: 0 !important; bottom: 0 !important; margin: auto 0 !important; translate: none !important; transform: none !important; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 9px; background: none; color: #e8c98a; cursor: pointer; }
.acct-easy .acct-eye:hover { background: rgb(255 236 214 / .08); }
.acct-easy .acct-eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.acct-easy .account-fields label.acct-consent { font-size: .8rem; color: #e9dcc4; margin: 0; }
.acct-easy .acct-submit { width: 100%; min-height: 52px; margin-top: 2px; font-size: 1.05rem; border-radius: 14px; }
.acct-easy .acct-status { min-height: 0; margin: 0; text-align: center; font-size: .86rem; }
.acct-easy .acct-status:empty { display: none; }
.acct-easy .acct-status[data-kind=error] { color: #ffb4a8; }
.acct-easy .acct-swap { margin: 0; text-align: center; font-size: .88rem; color: #d8c6a6; }
.acct-easy .acct-swap .link-button { font-weight: 700; color: #f2c85b; }
/* Owner, 2026-11-30: everything in the sign-up card is centred: labels, typed text, hints, strength, checks, consent. */
.acct-easy .acct-easy-form > label:not(.acct-consent) { justify-items: center; text-align: center; }
.acct-easy .acct-easy-form > label:not(.acct-consent) > :not(span:first-child) { justify-self: stretch; }
.acct-easy .acct-easy-form input:not([type=checkbox]) { text-align: center; }
.acct-easy .acct-pw input { padding-left: 48px !important; }
.acct-easy .acct-hint { text-align: center; }
.acct-easy .acct-strength { flex-direction: column; gap: 4px; }
.acct-easy .acct-strength .acct-meter { width: 100%; }
.acct-easy .acct-checks { justify-content: center; }
.acct-easy .account-fields label.acct-consent { justify-content: center; text-align: center; }
.acct-easy .acct-swap { font-size: 1.05rem; }
.acct-easy .acct-swap .link-button { font-size: 1.1rem; }
@media (max-width: 520px) { .acct.acct-easy { padding: 20px 16px 14px; border-radius: 18px; } }

/* --------------------------------------------- 3. Arena right / wrong stamp */
/* A slim pill instead of the big medallion: clear at a glance, out of the way. */
.arena .arena-verdict, .arena .arena-verdict.verdict-timeout {
  top: 44%; left: 50%; gap: 9px; padding: 5px 16px 5px 5px;
  border: 1px solid color-mix(in srgb, var(--verdict-ink) 55%, transparent);
  background: rgb(22 7 5 / .9); backdrop-filter: blur(6px);
  box-shadow: 0 0 22px -8px var(--verdict-glow), 0 12px 26px -14px rgb(0 0 0 / .85);
  animation: vf-pop 300ms cubic-bezier(.2, 1.3, .4, 1) both;
}
@keyframes vf-pop { 0% { opacity: 0; transform: translateY(6px) scale(.9); } 100% { opacity: 1; transform: none; } }
.arena .arena-verdict.is-leaving { animation: vf-leave 300ms ease-in forwards; }
.arena-verdict .verdict-icon, .arena-verdict.verdict-timeout .verdict-icon {
  width: 30px; height: 30px; box-shadow: none;
  background: var(--verdict-ink); color: #1a0805;
}
.arena-verdict .verdict-icon svg, .arena-verdict.verdict-timeout .verdict-icon svg { width: 19px; height: 19px; }
.arena-verdict .verdict-copy { display: flex; align-items: baseline; gap: 8px; }
.arena-verdict .verdict-copy small { font-size: 10px; letter-spacing: .16em; color: rgb(246 220 156 / .75); }
.arena-verdict .verdict-copy strong, .arena-verdict.verdict-timeout .verdict-copy strong {
  font: 700 clamp(18px, 1.9vw, 22px)/1 var(--ec-font-display, 'Cormorant Garamond', serif); text-shadow: none;
}
@media (max-width: 700px) {
  .arena .arena-verdict, .arena .arena-verdict.verdict-timeout { top: 40%; padding: 4px 13px 4px 4px; gap: 7px; }
  .arena-verdict .verdict-icon, .arena-verdict.verdict-timeout .verdict-icon { width: 26px; height: 26px; }
  .arena-verdict .verdict-icon svg, .arena-verdict.verdict-timeout .verdict-icon svg { width: 16px; height: 16px; }
}
@media (prefers-reduced-motion: reduce) { .arena .arena-verdict { animation: none; } }
/* The answer line in the question card: one slim row, not a framed plate. */
body.duel-view #app .panel .feedback { padding: 5px 14px 5px 5px; gap: 6px 12px; margin: 4px auto 10px; border-radius: 999px; box-shadow: none; border-color: rgb(217 171 82 / .22); background: rgb(12 3 2 / .45); }
body.duel-view #app .answer-verdict { padding: 4px 11px 4px 7px; font-size: 12px; }
body.duel-view #app .accepted-answer { padding-left: 12px; }

/* ------------------------------------------------------------ 4. Ready up */
.is-ready-up.is-ready, button.is-ready-up.is-ready {
  background: linear-gradient(180deg, #3f8f4d, #26612f) !important; border-color: #9be3a5 !important; color: #effff0 !important;
  box-shadow: 0 0 0 3px rgb(80 190 100 / .2), 0 10px 22px -12px rgb(0 0 0 / .8) !important;
}
.ready-tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; white-space: nowrap;
  font: 800 10px/1.2 var(--ec-font-ui, Inter, sans-serif); letter-spacing: .12em; text-transform: uppercase;
  background: rgb(63 143 77 / .22); border: 1px solid rgb(155 227 165 / .7); color: #b8f0c0;
}
.ready-tag.is-waiting { background: rgb(255 236 214 / .05); border-color: rgb(246 220 156 / .3); color: rgb(246 220 156 / .7); }
.party-seat .ready-tag { margin-left: auto; flex: none; }
.champion-feature { position: relative; }
.champion-feature > .ready-tag { position: absolute; top: 10px; left: 50%; translate: -50% 0; z-index: 2; box-shadow: 0 4px 12px rgb(0 0 0 / .5); }
.champion-feature.is-ready img { box-shadow: 0 0 0 2px #9be3a5, 0 0 24px rgb(80 190 100 / .35); }

/* ------------------------------------------------------------- Dividers + Footnote boxes (owner, 2026-11-30)
   Any page or panel <header>/<footer> line (style.css drew them grey) is the gold-cream line used
   everywhere else. Footnote's boxes are warm burnished crimson with a gold edge instead of near-black. */
header, footer { border-color: rgb(246 220 156 / .3); }
.fn-page .fn-card, .fn-page .daily-round, .fn-page .fn-points, .fn-page .lb {
  border-color: rgb(246 220 156 / .32) !important;
  background:
    linear-gradient(180deg, rgb(255 228 180 / .09), rgb(255 228 180 / 0) 38%),
    linear-gradient(155deg, rgb(146 50 33 / .62), rgb(98 28 19 / .66) 55%, rgb(66 17 12 / .72)) !important;
  box-shadow: inset 0 1px 0 rgb(255 236 200 / .16), 0 18px 40px -22px rgb(0 0 0 / .8) !important;
}