/* Evervale design system: ev-ui.css
   One stylesheet for the public site, account pages, the operator panel, the Companion PWA and the web Studio.
   Language: the Companion's. Teal-on-navy glass panels with a dark inner outline, Chakra Petch headings,
   IBM Plex Mono labels, a blue primary button, line icons (Lucide set). Light text on dark, phone first.
   Everything is prefixed ev- / --ev- so it can sit beside older stylesheets while pages migrate.
   No inline styles are needed anywhere (the site CSP forbids them); see docs/DESIGN-SYSTEM.md. */

/* ============================== tokens ============================== */
:root {
  /* surface */
  --ev-bg-0: #06101a;
  --ev-bg-1: #04090f;
  --ev-bg-raise: #0a1b27;
  --ev-bg-input: rgba(3, 14, 20, .85);
  /* ink: every text token passes 4.5:1 on --ev-bg-0 (mute 7.6, dim 5.4) */
  --ev-ink: #eef6ff;
  --ev-text: #c9d6e8;
  --ev-mute: #8fa9b6;
  --ev-dim: #7a8aa3;
  /* brand cyan */
  --ev-cy: #5ee0e8;
  --ev-cy-hi: #8ef0f5;
  --ev-cy-lo: rgba(94, 224, 232, .3);
  --ev-line: rgba(94, 224, 232, .22);
  --ev-line-soft: rgba(94, 224, 232, .13);
  --ev-line-strong: rgba(140, 235, 240, .42);
  /* signal colours (status, never decoration) */
  --ev-green: #2fbf8a;
  --ev-mint: #7ef0c4;
  --ev-amber: #ffd479;
  --ev-red: #ff9db1;
  --ev-red-hard: #e0607a;
  --ev-blue: #4aa6d8;
  --ev-violet: #b878ff;
  /* item quality (the same ladder as the item database) */
  --ev-q-inferior: #8d96a6; --ev-q-average: #f1f5fb; --ev-q-good: #4fe06b; --ev-q-excellent: #47a8ff;
  --ev-q-superb: #b878ff; --ev-q-legendary: #ffa63a; --ev-q-artifact: #ff5fcf;
  /* panels */
  --ev-panel: linear-gradient(rgba(20, 66, 84, .5), rgba(8, 26, 36, .62));
  --ev-panel-solid: linear-gradient(rgba(14, 52, 68, .99), rgba(6, 22, 31, .99));
  --ev-panel-quiet: rgba(6, 20, 30, .5);
  --ev-bar: linear-gradient(rgba(14, 40, 54, .95), rgba(6, 16, 25, .96));
  --ev-btn-bg: linear-gradient(rgba(16, 60, 78, .85), rgba(6, 24, 34, .9));
  --ev-btn-primary: linear-gradient(#4aa6d8, #1d5e93);
  --ev-scrim: rgba(2, 8, 14, .72);
  /* type */
  --ev-head: 'Chakra Petch', system-ui, sans-serif;
  --ev-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --ev-sans: 'IBM Plex Sans', system-ui, sans-serif;
  --ev-fs-2xs: 10px;   /* mono labels, caps */
  --ev-fs-xs: 12px;
  --ev-fs-sm: 13px;
  --ev-fs-md: 15px;    /* body */
  --ev-fs-lg: 17px;    /* card titles */
  --ev-fs-xl: clamp(20px, 2.4vw + 12px, 26px);
  --ev-fs-2xl: clamp(26px, 4vw + 12px, 40px);
  --ev-fs-display: clamp(36px, 9vw + 4px, 84px);
  /* space (4px grid) */
  --ev-s1: 4px; --ev-s2: 8px; --ev-s3: 12px; --ev-s4: 16px; --ev-s5: 24px; --ev-s6: 32px; --ev-s7: 48px; --ev-s8: 72px; --ev-s9: 112px;
  /* radii */
  --ev-r-xs: 4px; --ev-r-sm: 6px; --ev-r-md: 10px; --ev-r-lg: 14px; --ev-r-pill: 999px;
  /* elevation */
  --ev-sh-sm: 0 2px 8px rgba(0, 0, 0, .4);
  --ev-sh-md: 0 10px 30px rgba(0, 0, 0, .6);
  --ev-sh-lg: 0 -12px 40px rgba(0, 0, 0, .65);
  --ev-glow: 0 0 18px rgba(74, 166, 216, .3);
  --ev-glow-cy: 0 0 16px rgba(94, 224, 232, .25);
  /* motion */
  --ev-ease: cubic-bezier(.2, .7, .2, 1);
  --ev-t-fast: .12s; --ev-t: .18s; --ev-t-slow: .5s;
  /* layers */
  --ev-z-bar: 20; --ev-z-sheet: 100; --ev-z-toast: 120; --ev-z-tip: 140;
  /* layout */
  --ev-wrap: 1200px; --ev-gutter: 16px; --ev-bar-h: 56px;
  /* spacing rules (docs/DESIGN-SYSTEM.md, Spacing): only --ev-s1..s7 values in page CSS */
  --ev-sec-gap: 24px; --ev-card-pad: 16px; --ev-card-gap: 12px;
  /* top bar: every action one height, one radius, 8 apart */
  --ev-act-h: 44px; --ev-act-r: var(--ev-r-md); --ev-act-gap: 8px;
  --ev-sat: env(safe-area-inset-top, 0px); --ev-sab: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
html { scroll-padding-top: calc(var(--ev-bar-h) + 16px); } /* in-page links land with their heading visible below the fixed top bar */
@media (min-width: 900px) { :root { --ev-gutter: 24px; --ev-bar-h: 64px; --ev-sec-gap: 32px; --ev-card-pad: 24px; --ev-card-gap: 16px; } }

/* ============================== base (opt in with <body class="ev-ui">) ============================== */
.ev-ui, .ev-ui * { box-sizing: border-box; }
html:has(.ev-ui) { background: var(--ev-bg-1); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.ev-ui {
  margin: 0; min-height: 100vh; font: 400 var(--ev-fs-md)/1.5 var(--ev-sans); color: var(--ev-text); -webkit-font-smoothing: antialiased;
  background: radial-gradient(900px 560px at 80% -8%, rgba(38, 150, 170, .22), transparent 62%), radial-gradient(700px 520px at 0% 108%, rgba(64, 200, 175, .12), transparent 64%), linear-gradient(var(--ev-bg-0), var(--ev-bg-1));
  background-attachment: fixed;
}
.ev-ui h1, .ev-ui h2, .ev-ui h3, .ev-ui h4 { margin: 0; font-family: var(--ev-head); color: var(--ev-ink); line-height: 1.25; }
.ev-ui p { margin: 0; }
.ev-ui a { color: var(--ev-cy-hi); }
.ev-ui button, .ev-ui input, .ev-ui select, .ev-ui textarea { font: inherit; color: inherit; }
.ev-ui button { cursor: pointer; }
.ev-ui [hidden] { display: none !important; }
.ev-ui :focus { outline: none; }
.ev-ui :focus-visible { outline: 2px solid var(--ev-cy-hi); outline-offset: 2px; border-radius: var(--ev-r-xs); }
.ev-ui ::selection { background: rgba(94, 224, 232, .35); color: #fff; }
.ev-skip { position: absolute; left: 8px; top: -60px; z-index: 300; background: #0b2330; border: 1px solid var(--ev-cy); padding: 10px 14px; border-radius: var(--ev-r-sm); color: var(--ev-ink); }
.ev-skip:focus { top: calc(var(--ev-sat) + 8px); }
.ev-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ev-wrap { width: 100%; max-width: var(--ev-wrap); margin: 0 auto; padding-left: var(--ev-gutter); padding-right: var(--ev-gutter); }
.ev-stack { display: flex; flex-direction: column; gap: var(--ev-s4); }
.ev-row { display: flex; align-items: center; gap: var(--ev-s3); flex-wrap: wrap; }
.ev-grow { flex: 1; min-width: 0; }
.ev-muted { color: var(--ev-mute); }
.ev-ok { color: var(--ev-mint); } .ev-warn { color: var(--ev-amber); } .ev-bad { color: var(--ev-red); }
.ev-small { font-size: var(--ev-fs-xs); line-height: 1.5; }
.ev-mono { font-family: var(--ev-mono); }
.ev-h-display { font: 700 var(--ev-fs-display)/.98 var(--ev-head); letter-spacing: .01em; text-transform: uppercase; color: var(--ev-ink); }
.ev-h-1 { font: 700 var(--ev-fs-2xl)/1.05 var(--ev-head); letter-spacing: .01em; }
.ev-h-2 { font: 600 var(--ev-fs-xl)/1.15 var(--ev-head); }
.ev-h-3 { font: 600 var(--ev-fs-lg)/1.2 var(--ev-head); }
.ev-lead { font-size: clamp(16px, 1vw + 12px, 19px); line-height: 1.55; color: var(--ev-text); max-width: 56ch; }
/* section label: mono caps with a rule running out of it */
.ev-eyebrow { display: flex; align-items: center; gap: 10px; font: 500 var(--ev-fs-2xs)/1.2 var(--ev-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--ev-cy-hi); }
.ev-eyebrow::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--ev-cy-lo), transparent); }
.ev-eyebrow b { font-weight: 500; color: var(--ev-mute); order: 2; }
.ev-eyebrow.ev-bare::after { display: none; }

/* ============================== icons ============================== */
.ev-i { display: inline-block; flex: none; width: 1em; height: 1em; vertical-align: -.15em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ev-tile { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border: 1.5px solid rgba(94, 224, 232, .5); border-radius: 50%; color: var(--ev-cy-hi);
  background: radial-gradient(circle at 50% 35%, rgba(94, 224, 232, .22), rgba(4, 18, 26, .9)); box-shadow: var(--ev-glow-cy), inset 0 0 14px rgba(94, 224, 232, .14); }
.ev-tile.ev-sm { width: 30px; height: 30px; }
.ev-tile.ev-lg { width: 52px; height: 52px; }
.ev-tile.ev-warn { border-color: rgba(255, 212, 121, .5); color: var(--ev-amber); box-shadow: 0 0 16px rgba(255, 212, 121, .15); }
.ev-tile.ev-bad { border-color: rgba(255, 157, 177, .5); color: var(--ev-red); box-shadow: 0 0 16px rgba(255, 157, 177, .12); }
.ev-tile.ev-ok { border-color: rgba(126, 240, 196, .5); color: var(--ev-mint); }
/* the brand diamond */
.ev-gem { flex: none; width: 13px; height: 13px; border: 1.5px solid var(--ev-cy); transform: rotate(45deg); box-shadow: 0 0 12px rgba(94, 224, 232, .45); margin: 0 2px; }

/* ============================== buttons ============================== */
.ev-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 9px 18px; border: 1px solid var(--ev-line-strong); border-radius: var(--ev-r-sm);
  background: var(--ev-btn-bg); font: 600 13px var(--ev-head); letter-spacing: .04em; color: #c9d6e8; text-decoration: none; white-space: nowrap; transition: background var(--ev-t-fast), filter var(--ev-t-fast), transform var(--ev-t-fast); }
.ev-btn:hover { background: rgba(94, 224, 232, .16); color: #fff; }
.ev-btn:active { background: rgba(94, 224, 232, .26); transform: translateY(1px); }
.ev-btn.ev-primary { border-color: rgba(150, 225, 255, .6); background: var(--ev-btn-primary); box-shadow: var(--ev-glow), inset 0 1px 0 rgba(255, 255, 255, .28); font-weight: 700; color: #eaf8ff; }
.ev-btn.ev-primary:hover { filter: brightness(1.12); }
.ev-btn.ev-primary:active { filter: brightness(1.2); }
.ev-btn.ev-ghost { background: transparent; }
.ev-btn.ev-danger { border-color: rgba(255, 157, 177, .5); color: var(--ev-red); }
.ev-btn.ev-lg { min-height: 54px; padding: 12px 26px; font-size: 15px; border-radius: var(--ev-r-md); }
.ev-btn.ev-sm { min-height: 36px; padding: 5px 12px; font-size: 12px; }
.ev-btn.ev-block { display: flex; width: 100%; }
.ev-btn:disabled, .ev-btn[aria-disabled="true"] { opacity: .45; cursor: default; pointer-events: none; }
.ev-btn small { display: block; font: 500 10px var(--ev-mono); letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
/* two-line CTA: label over a small mono line (version, size) */
.ev-btn.ev-cta { gap: 12px; padding: 8px 24px 8px 18px; text-align: left; }
.ev-btn.ev-cta span { display: grid; line-height: 1.15; }
.ev-link { background: none; border: 0; padding: 0; color: var(--ev-cy-hi); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ev-iconbtn { flex: none; width: 44px; height: 44px; display: inline-grid; place-items: center; padding: 0; color: var(--ev-cy-hi); border: 1px solid rgba(140, 235, 240, .32); border-radius: var(--ev-r-md);
  background: linear-gradient(rgba(16, 60, 78, .55), rgba(6, 24, 34, .6)); text-decoration: none; transition: background var(--ev-t-fast); }
.ev-iconbtn:hover { background: rgba(94, 224, 232, .18); }
.ev-iconbtn:active { background: rgba(94, 224, 232, .28); }
.ev-iconbtn.ev-bare { background: none; border-color: transparent; color: var(--ev-mute); }

/* ============================== top bar, account chip, nav ============================== */
.ev-topbar { position: sticky; top: 0; z-index: var(--ev-z-bar); display: flex; align-items: center; gap: 8px; min-height: var(--ev-bar-h); padding: calc(var(--ev-sat) + 4px) 8px 4px 16px;
  border-bottom: 1px solid var(--ev-line); background: var(--ev-bar); backdrop-filter: blur(10px); }
.ev-topbar.ev-clear { background: linear-gradient(rgba(4, 10, 16, .78), rgba(4, 10, 16, 0)); border-bottom-width: 0; backdrop-filter: none; position: absolute; left: 0; right: 0; }
.ev-brand { display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; color: var(--ev-ink) !important; flex: none; }
.ev-brand-t { font: 700 13.5px var(--ev-head); letter-spacing: .2em; text-transform: uppercase; }
.ev-brand .ev-logo { width: 24px; height: 24px; flex: none; filter: drop-shadow(0 0 8px rgba(94, 224, 232, .45)); }
.ev-nav { display: none; align-items: center; gap: 2px; margin: 0 auto 0 18px; }
.ev-nav a { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 12px; border-radius: var(--ev-r-sm); color: var(--ev-mute) !important; text-decoration: none;
  font: 600 12px var(--ev-head); letter-spacing: .12em; text-transform: uppercase; position: relative; transition: color var(--ev-t-fast), background var(--ev-t-fast); }
.ev-nav a:hover { color: var(--ev-ink) !important; background: rgba(94, 224, 232, .08); }
.ev-nav a[aria-current="page"] { color: var(--ev-cy-hi) !important; }
.ev-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px; background: var(--ev-cy); box-shadow: 0 0 10px var(--ev-cy); }
.ev-topbar .ev-actions { margin-left: auto; display: flex; align-items: center; gap: var(--ev-act-gap); }
.ev-nav + .ev-actions { margin-left: 0; }
@media (min-width: 1024px) { .ev-nav { display: flex; } .ev-topbar { padding-left: 24px; padding-right: 20px; gap: 10px; } .ev-burger { display: none !important; } }
/* the account chip: portrait + name + presence dot; opens the account menu sheet */
.ev-acct { min-width: 0; flex: 0 1 auto; display: flex; align-items: center; gap: 8px; min-height: var(--ev-act-h); padding: 0 8px; color: var(--ev-ink); text-align: left; text-decoration: none;
  background: linear-gradient(rgba(16, 60, 78, .6), rgba(6, 24, 34, .7)); border: 1px solid rgba(140, 235, 240, .34); border-radius: var(--ev-act-r); }
.ev-acct:hover { background: rgba(94, 224, 232, .18); }
.ev-acct .ev-av { width: 32px; height: 32px; }
.ev-acct-t { display: grid; min-width: 0; line-height: 1.15; }
.ev-acct-t b { font: 600 13.5px var(--ev-head); color: var(--ev-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 128px; }
.ev-acct-t small { font: 500 9.5px var(--ev-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ev-mute); white-space: nowrap; }
.ev-acct[data-s="live"] small { color: var(--ev-mint); }
.ev-acct[data-s="offline"] small { color: var(--ev-red); }
.ev-acct > .ev-i { flex: none; color: var(--ev-mute); }
.ev-acct.ev-out { padding: 0 16px; gap: 8px; border-radius: var(--ev-r-md); font: 600 13px var(--ev-head); letter-spacing: .04em; }
@media (max-width: 380px) { .ev-brand-t { display: none; } .ev-acct-t b { max-width: 84px; } }
/* bottom tab bar (phone app shell) */
.ev-tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--ev-z-bar); display: flex; border-top: 1px solid var(--ev-line); padding-bottom: var(--ev-sab);
  background: linear-gradient(rgba(10, 32, 44, .97), rgba(5, 14, 21, .98)); backdrop-filter: blur(10px); }
.ev-tabbar a { position: relative; flex: 1; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--ev-mute) !important;
  font: 600 10.5px var(--ev-head); letter-spacing: .1em; text-transform: uppercase; }
.ev-tabbar a[aria-current="page"] { color: var(--ev-cy-hi) !important; box-shadow: inset 0 2px 0 var(--ev-cy); background: linear-gradient(rgba(94, 224, 232, .12), transparent); }
.ev-tabbar a:focus-visible { outline-offset: -3px; }
.ev-tabbar .ev-i { font-size: 22px; }
@media (min-width: 1024px) { .ev-tabbar { display: none; } }
.ev-has-tabbar { padding-bottom: calc(56px + var(--ev-sab)); }
@media (min-width: 1024px) { .ev-has-tabbar { padding-bottom: 0; } }
.ev-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font: 500 var(--ev-fs-2xs) var(--ev-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ev-mute); }
.ev-crumbs a { color: var(--ev-cy-hi); text-decoration: none; }
.ev-crumbs .ev-i { font-size: 12px; color: var(--ev-dim); }

/* ============================== avatars, presence ============================== */
.ev-av { position: relative; flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid rgba(var(--hc, 94, 224, 232), .6);
  background: radial-gradient(circle at 50% 35%, rgba(var(--hc, 94, 224, 232), .28), rgba(4, 18, 26, .92)); font: 700 17px var(--ev-head); color: rgb(var(--hc, 94, 224, 232)); text-transform: uppercase; box-shadow: inset 0 0 8px rgba(0, 0, 0, .6); }
.ev-av img { width: 78%; height: 78%; object-fit: contain; display: block; }
.ev-av.ev-lg { width: 56px; height: 56px; }
.ev-av .ev-pd { position: absolute; right: -2px; bottom: -2px; width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid #082030; background: var(--ev-dim); }
.ev-pd.ev-on, .ev-st-on .ev-pd { background: var(--ev-green); box-shadow: 0 0 8px rgba(47, 191, 138, .8); }
.ev-pd.ev-match { background: var(--ev-amber); box-shadow: 0 0 8px rgba(255, 212, 121, .7); }
.ev-pd.ev-mobile { background: var(--ev-blue); box-shadow: 0 0 8px rgba(74, 166, 216, .8); }
.ev-hue1 { --hc: 126, 240, 196; } .ev-hue2 { --hc: 106, 170, 240; } .ev-hue3 { --hc: 255, 212, 121; } .ev-hue4 { --hc: 196, 160, 255; } .ev-hue5 { --hc: 255, 157, 177; }
.ev-live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--ev-green); box-shadow: 0 0 8px rgba(47, 191, 138, .8); animation: ev-pulse 1.6s ease-in-out infinite; }
.ev-live-dot.ev-off { background: var(--ev-dim); box-shadow: none; animation: none; }
.ev-live-dot.ev-warn { background: var(--ev-amber); box-shadow: 0 0 8px rgba(255, 212, 121, .7); }
@keyframes ev-pulse { 50% { opacity: .35; } }
/* a green dot with a soft glow ring that expands and fades (1.6 s); only rendered while something is live */
.ev-pdot { display: inline-block; flex: none; width: 8px; height: 8px; margin: 0 6px 0 0; border-radius: 50%; vertical-align: middle; background: var(--ev-green); box-shadow: 0 0 0 0 rgba(47, 191, 138, .65); animation: ev-ring 1.6s ease-out infinite; transition: background .5s, box-shadow .5s; }
.ev-pdot.ev-end { background: var(--ev-amber); animation: none; box-shadow: 0 0 0 0 rgba(255, 212, 121, 0); }
@keyframes ev-ring { 0% { box-shadow: 0 0 0 0 rgba(47, 191, 138, .65); } 70%, 100% { box-shadow: 0 0 0 9px rgba(47, 191, 138, 0); } }
@media (prefers-reduced-motion: reduce) { .ev-pdot { animation: none; transition: none; } }

/* ============================== cards ============================== */
.ev-card { position: relative; border: 1px solid var(--ev-cy-lo); border-radius: var(--ev-r-md); outline: 1px solid rgba(0, 0, 0, .5); outline-offset: -5px; background: var(--ev-panel); overflow: hidden; }
.ev-card.ev-r { border-radius: var(--ev-r-md); outline-offset: -5px; }
.ev-card-h { display: flex; align-items: center; gap: 10px; padding: 12px var(--ev-card-pad); min-height: 46px; border-bottom: 2px solid rgba(94, 224, 232, .28); background: linear-gradient(rgba(94, 224, 232, .12), transparent);
  font: 500 var(--ev-fs-2xs)/1.2 var(--ev-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--ev-cy-hi); }
.ev-card-h .ev-i { font-size: 17px; flex: none; }
.ev-card-h .ev-grow { flex: 1; }
.ev-card-b { padding: var(--ev-card-pad); }
.ev-card-b > * + * { margin-top: 12px; }
.ev-card-f { display: flex; align-items: center; gap: 8px; padding: 12px var(--ev-card-pad); border-top: 1px solid var(--ev-line-soft); background: rgba(3, 14, 20, .35); }
.ev-card.ev-flat { background: var(--ev-panel-quiet); }
.ev-card.ev-hot { border-color: rgba(150, 225, 255, .55); box-shadow: var(--ev-glow); }
a.ev-card, .ev-card.ev-link { display: block; color: inherit; text-decoration: none; transition: transform var(--ev-t) var(--ev-ease), border-color var(--ev-t), box-shadow var(--ev-t); }
a.ev-card:hover, .ev-card.ev-link:hover { transform: translateY(-3px); border-color: rgba(150, 225, 255, .6); box-shadow: var(--ev-sh-md), var(--ev-glow-cy); }
/* media card: picture on top (or behind), text over a scrim */
.ev-media { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 220px; isolation: isolate; overflow: hidden; border: 1px solid var(--ev-cy-lo); border-radius: var(--ev-r-md); background: #05121b; color: var(--ev-text); text-decoration: none; }
.ev-media > img, .ev-media > .ev-bgimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .8s var(--ev-ease); }
.ev-media > .ev-card-b, .ev-media-b { padding: 16px; display: grid; gap: 8px; }
.ev-media::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(4, 10, 16, 0) 30%, rgba(4, 10, 16, .92) 100%); }
a.ev-media:hover > img, a.ev-media:hover > .ev-bgimg { transform: scale(1.05); }
.ev-section-pad { padding-top: var(--ev-s7); padding-bottom: var(--ev-s7); }
@media (min-width: 900px) { .ev-section-pad { padding-top: var(--ev-s8); padding-bottom: var(--ev-s8); } }

/* ============================== chips, badges ============================== */
.ev-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 0 9px; border: 1px solid rgba(94, 224, 232, .4); background: rgba(94, 224, 232, .07); color: var(--ev-cy-hi);
  font: 500 10.5px var(--ev-mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; border-radius: 2px; }
.ev-chip .ev-i { font-size: 12px; }
.ev-chip.ev-ok { border-color: rgba(126, 240, 196, .5); background: rgba(47, 191, 138, .12); color: var(--ev-mint); }
.ev-chip.ev-warn { border-color: rgba(255, 212, 121, .5); background: rgba(255, 212, 121, .1); color: var(--ev-amber); }
.ev-chip.ev-bad { border-color: rgba(255, 157, 177, .5); background: rgba(255, 157, 177, .1); color: var(--ev-red); }
.ev-chip.ev-quiet { border-color: var(--ev-line); background: none; color: var(--ev-mute); }
.ev-chip.ev-pill { border-radius: var(--ev-r-pill); padding: 0 11px; }
button.ev-chip { cursor: pointer; min-height: 32px; } button.ev-chip[aria-pressed="true"] { background: rgba(94, 224, 232, .24); color: #fff; border-color: var(--ev-cy); }
.ev-badge { flex: none; display: inline-block; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--ev-green); color: #03121a; font: 700 11px/20px var(--ev-mono); text-align: center; box-shadow: 0 0 10px rgba(47, 191, 138, .5); }
.ev-badge.ev-dot { min-width: 9px; width: 9px; height: 9px; padding: 0; }
.ev-badge.ev-amber { background: var(--ev-amber); box-shadow: 0 0 10px rgba(255, 212, 121, .5); }
.ev-kbd { display: inline-block; min-width: 22px; padding: 1px 6px; border: 1px solid var(--ev-line-strong); border-bottom-width: 2px; border-radius: 4px; background: rgba(3, 14, 20, .7); font: 500 11px/1.5 var(--ev-mono); color: var(--ev-ink); text-align: center; }

/* ============================== lists, tables ============================== */
.ev-list { display: flex; flex-direction: column; }
.ev-li { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 9px 14px; text-align: left; text-decoration: none; color: inherit; background: none; border: 0; border-bottom: 1px solid var(--ev-line-soft); }
.ev-li:last-child { border-bottom: 0; }
a.ev-li:hover, button.ev-li:hover, .ev-li.ev-link:hover { background: rgba(94, 224, 232, .07); }
.ev-li:focus-visible { outline-offset: -3px; }
.ev-li.ev-cur { background: rgba(94, 224, 232, .1); box-shadow: inset 3px 0 0 var(--ev-cy); }
.ev-li .ev-body { flex: 1; min-width: 0; }
.ev-li .ev-l1 { display: flex; align-items: baseline; gap: 8px; }
.ev-li .ev-nm { flex: 1; min-width: 0; font: 600 15px var(--ev-head); color: var(--ev-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-li .ev-when { flex: none; font: 10.5px var(--ev-mono); color: var(--ev-dim); }
.ev-li .ev-l2 { display: flex; align-items: center; gap: 8px; margin-top: 1px; font-size: 13px; color: var(--ev-mute); }
.ev-li .ev-l2 span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-li > .ev-chev { flex: none; color: var(--ev-dim); }
/* menu rows: round icon tile + title + hint + chevron (the account menu pattern) */
.ev-menu { display: grid; border: 1px solid var(--ev-line); border-radius: 8px; background: var(--ev-panel-quiet); overflow: hidden; }
.ev-mi { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 8px 12px; text-align: left; text-decoration: none; color: var(--ev-ink); background: none; border: 0; border-bottom: 1px solid var(--ev-line-soft); }
.ev-mi:last-child { border-bottom: 0; }
.ev-mi:hover { background: rgba(94, 224, 232, .08); }
.ev-mi-i { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(140, 235, 240, .35); color: var(--ev-cy); background: rgba(94, 224, 232, .07); }
.ev-mi-t { flex: 1; min-width: 0; display: grid; gap: 1px; }
.ev-mi-t b { font: 600 14.5px var(--ev-head); }
.ev-mi-t small { font-size: 12px; color: var(--ev-mute); }
.ev-mi > .ev-i:last-child { flex: none; color: var(--ev-dim); }
.ev-mi.ev-danger { color: var(--ev-red); }
.ev-mi.ev-danger .ev-mi-i { border-color: rgba(255, 157, 177, .5); color: var(--ev-red); background: rgba(255, 157, 177, .08); }
.ev-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--ev-cy-lo); background: var(--ev-panel-quiet); }
.ev-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ev-table caption { text-align: left; padding: 12px 14px; font: 500 var(--ev-fs-2xs) var(--ev-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--ev-cy-hi); }
.ev-table th { position: sticky; top: 0; padding: 10px 14px; text-align: left; white-space: nowrap; font: 500 var(--ev-fs-2xs) var(--ev-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ev-mute); background: rgba(10, 36, 50, .96); border-bottom: 2px solid rgba(94, 224, 232, .28); }
.ev-table td { padding: 10px 14px; border-bottom: 1px solid var(--ev-line-soft); vertical-align: middle; }
.ev-table tbody tr:last-child td { border-bottom: 0; }
.ev-table tbody tr:hover td { background: rgba(94, 224, 232, .06); }
.ev-table .ev-num { text-align: right; font-family: var(--ev-mono); font-variant-numeric: tabular-nums; }
.ev-table .ev-rank { width: 44px; font: 600 15px var(--ev-head); color: var(--ev-cy-hi); }
.ev-table .ev-nm { font: 600 15px var(--ev-head); color: var(--ev-ink); }

/* ============================== tabs, segmented ============================== */
.ev-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--ev-line); }
.ev-tabs::-webkit-scrollbar { display: none; }
.ev-tabs [role="tab"] { flex: none; min-height: 44px; padding: 0 16px; background: none; border: 0; color: var(--ev-mute); font: 600 12px var(--ev-head); letter-spacing: .12em; text-transform: uppercase; position: relative; }
.ev-tabs [role="tab"]:hover { color: var(--ev-ink); }
.ev-tabs [role="tab"][aria-selected="true"] { color: var(--ev-cy-hi); background: linear-gradient(rgba(94, 224, 232, .12), transparent); box-shadow: inset 0 -2px 0 var(--ev-cy); }
.ev-tabpanel { padding-top: var(--ev-s4); }
.ev-seg { display: inline-flex; padding: 3px; border: 1px solid var(--ev-line-strong); border-radius: var(--ev-r-pill); background: var(--ev-bg-input); }
.ev-seg button { min-height: 36px; padding: 0 14px; border: 0; border-radius: var(--ev-r-pill); background: none; color: var(--ev-mute); font: 600 12px var(--ev-head); letter-spacing: .06em; }
.ev-seg button[aria-pressed="true"], .ev-seg button[aria-checked="true"] { background: rgba(94, 224, 232, .22); color: #fff; box-shadow: inset 0 0 0 1px rgba(94, 224, 232, .5); }

/* ============================== forms ============================== */
.ev-lbl { display: block; margin-bottom: 4px; font: 600 12px var(--ev-head); letter-spacing: .06em; color: #bfeef2; }
.ev-help { margin-top: 4px; font-size: 12px; color: var(--ev-mute); }
.ev-fld { display: flex; align-items: center; gap: 8px; background: var(--ev-bg-input); border: 1px solid rgba(140, 235, 240, .45); border-radius: 5px; box-shadow: inset 0 2px 8px rgba(0, 0, 0, .7); padding: 0 14px; color: #dbe6f5; }
.ev-fld:focus-within { border-color: var(--ev-cy-hi); box-shadow: inset 0 2px 8px rgba(0, 0, 0, .7), 0 0 0 2px rgba(94, 224, 232, .25); }
.ev-fld input, .ev-fld textarea, .ev-fld select { flex: 1; min-width: 0; background: none; border: 0; outline: 0; padding: 11px 0; min-height: 44px; font-size: 16px; line-height: 1.4; color: inherit; }
.ev-fld select { appearance: none; -webkit-appearance: none; cursor: pointer; }
.ev-fld select option { background: #0a1b27; color: #dbe6f5; }
/* A bare <select> (one not wrapped in .ev-fld, which draws its own chevron icon): our own chevron, inset 16px from the right edge (site pages carry .ev-site/.ev-app rather than .ev-ui)
 * with the padding to match so text never runs under it. Two gradients, no image and no data: URI, so a strict CSP is no obstacle;
 * the colour follows the accent. */
:is(.ev-ui, .ev-site, .ev-app) :not(.ev-fld) > select:not([multiple]):not([size]) {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 44px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ev-cy-hi) 50%), linear-gradient(135deg, var(--ev-cy-hi) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat;
}
.ev-fld input::placeholder, .ev-fld textarea::placeholder { color: var(--ev-dim); }
.ev-fld > .ev-i { color: var(--ev-mute); flex: none; }
.ev-fld.ev-invalid { border-color: var(--ev-red-hard); }
.ev-fld.ev-invalid + .ev-help { color: var(--ev-red); }
.ev-fld:has(:disabled) { opacity: .5; }
.ev-opt { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 4px 2px; cursor: pointer; }
.ev-opt input { flex: none; }
.ev-switch { flex: none; position: relative; width: 52px; height: 44px; background: none; border: 0; padding: 0; }
.ev-switch::before { content: ""; position: absolute; left: 2px; top: 8px; width: 48px; height: 28px; border-radius: 14px; border: 1px solid rgba(140, 235, 240, .4); background: var(--ev-bg-input); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .7); }
.ev-switch::after { content: ""; position: absolute; left: 6px; top: 12px; width: 20px; height: 20px; border-radius: 50%; background: #7f93a6; transition: transform var(--ev-t), background var(--ev-t); }
.ev-switch[aria-checked="true"]::before { border-color: rgba(126, 240, 196, .6); background: rgba(47, 191, 138, .28); }
.ev-switch[aria-checked="true"]::after { transform: translateX(20px); background: var(--ev-mint); box-shadow: 0 0 10px rgba(126, 240, 196, .6); }
.ev-setting { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 8px 16px; border-bottom: 1px solid var(--ev-line-soft); }
.ev-setting:last-child { border-bottom: 0; }
.ev-setting b { display: block; font: 600 14.5px var(--ev-head); color: var(--ev-ink); }
.ev-setting span { display: block; font-size: 12.5px; color: var(--ev-mute); line-height: 1.35; }
.ev-progress { height: 8px; border-radius: 4px; border: 1px solid var(--ev-line); background: var(--ev-bg-input); overflow: hidden; }
.ev-progress > i { display: block; height: 100%; width: var(--p, 50%); background: linear-gradient(90deg, #1d5e93, var(--ev-cy)); box-shadow: 0 0 10px rgba(94, 224, 232, .5); }

/* ============================== sheets, dialogs, toasts ============================== */
.ev-sheet-back { position: fixed; inset: 0; z-index: var(--ev-z-sheet); background: var(--ev-scrim); display: flex; align-items: flex-end; justify-content: center; animation: ev-fade var(--ev-t) ease-out; }
.ev-sheet { width: 100%; max-width: 560px; max-height: 88vh; max-height: 88dvh; display: flex; flex-direction: column; border: 1px solid rgba(94, 224, 232, .4); border-bottom: 0; border-radius: 14px 14px 0 0;
  background: var(--ev-panel-solid); box-shadow: var(--ev-sh-lg); animation: ev-rise var(--ev-t) ease-out; }
.ev-sheet-h { flex: none; display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 18px; min-height: 56px; border-bottom: 1px solid var(--ev-line); background: linear-gradient(rgba(94, 224, 232, .1), transparent); }
.ev-sheet-h h2 { flex: 1; font: 600 17px var(--ev-head); }
.ev-sheet-b { overflow-y: auto; padding: 14px 16px calc(16px + var(--ev-sab)); -webkit-overflow-scrolling: touch; }
.ev-sheet-b > * + * { margin-top: 12px; }
.ev-sheet-f { flex: none; display: flex; gap: 10px; justify-content: flex-end; padding: 12px 16px calc(12px + var(--ev-sab)); border-top: 1px solid var(--ev-line); }
.ev-sheet-f .ev-btn { flex: 1; }
@media (min-width: 600px) { .ev-sheet-back { align-items: center; } .ev-sheet { border-radius: 14px; border-bottom: 1px solid rgba(94, 224, 232, .4); } .ev-sheet-f .ev-btn { flex: none; } }
.ev-sheet.ev-narrow { max-width: 420px; }
@keyframes ev-rise { from { transform: translateY(24px); opacity: 0; } }
@keyframes ev-fade { from { opacity: 0; } }
.ev-toasts { position: fixed; z-index: var(--ev-z-toast); left: 12px; right: 12px; top: calc(var(--ev-sat) + 62px); display: flex; flex-direction: column; gap: 8px; pointer-events: none; max-width: 420px; margin: 0 auto; }
@media (min-width: 900px) { .ev-toasts { left: auto; right: 24px; top: 76px; margin: 0; width: 380px; } }
.ev-toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 8px 14px; border: 1px solid rgba(94, 224, 232, .5); border-left: 3px solid var(--ev-green); border-radius: var(--ev-r-sm);
  background: var(--ev-panel-solid); box-shadow: var(--ev-sh-md); color: var(--ev-text); animation: ev-rise var(--ev-t) ease-out; }
.ev-toast.ev-bad { border-left-color: var(--ev-red-hard); } .ev-toast.ev-warn { border-left-color: var(--ev-amber); } .ev-toast.ev-info { border-left-color: var(--ev-blue); }
.ev-toast b { display: block; font: 600 13.5px var(--ev-head); color: var(--ev-ink); }
.ev-toast span { display: block; font-size: 12.5px; color: var(--ev-mute); }
.ev-alert { display: flex; align-items: flex-start; gap: 12px; padding: 10px 14px; border: 1px solid rgba(94, 224, 232, .4); background: rgba(94, 224, 232, .08); border-radius: var(--ev-r-sm); font-size: 13px; line-height: 1.4; }
.ev-alert > .ev-i { margin-top: 2px; font-size: 16px; }
.ev-alert.ev-warn { border-color: rgba(255, 212, 121, .45); background: rgba(255, 212, 121, .09); color: var(--ev-amber); }
.ev-alert.ev-bad { border-color: rgba(255, 157, 177, .45); background: rgba(255, 157, 177, .08); color: var(--ev-red); }
.ev-alert.ev-ok { border-color: rgba(126, 240, 196, .4); background: rgba(47, 191, 138, .1); color: var(--ev-mint); }

/* ============================== tooltips ============================== */
.ev-tip { position: fixed; z-index: var(--ev-z-tip); max-width: 260px; padding: 7px 10px; border: 1px solid rgba(94, 224, 232, .5); border-radius: var(--ev-r-sm); background: var(--ev-panel-solid); box-shadow: var(--ev-sh-md);
  font-size: 12.5px; line-height: 1.4; color: var(--ev-text); pointer-events: none; animation: ev-fade var(--ev-t-fast) ease-out; }
/* item tooltip: framed box, name in the quality colour, a quality gauge, mono stat lines. Same ladder as the item database. */
.ev-itip { --q: var(--ev-q-average); width: 280px; max-width: calc(100vw - 24px); border: 1px solid color-mix(in srgb, var(--q) 55%, #000); outline: 1px solid rgba(0, 0, 0, .6); outline-offset: -4px; border-radius: var(--ev-r-xs);
  background: linear-gradient(rgba(10, 36, 50, .98), rgba(4, 14, 22, .99)); box-shadow: var(--ev-sh-md), 0 0 24px color-mix(in srgb, var(--q) 22%, transparent); font-size: 13px; }
.ev-itip.ev-tip { max-width: 300px; padding: 0; }
.ev-itip-h { padding: 10px 14px 8px; border-bottom: 1px solid var(--ev-line); background: linear-gradient(color-mix(in srgb, var(--q) 18%, transparent), transparent); }
.ev-itip-n { font: 700 16px var(--ev-head); color: var(--q); }
.ev-itip-t { font: 500 10.5px var(--ev-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ev-mute); margin-top: 2px; }
.ev-itip-g { display: flex; gap: 3px; margin-top: 7px; }
.ev-itip-g i { flex: 1; height: 4px; background: rgba(255, 255, 255, .1); }
.ev-itip-g i.on { background: var(--q); box-shadow: 0 0 6px var(--q); }
.ev-itip-b { padding: 8px 14px 12px; display: grid; gap: 4px; }
.ev-itip-b .ev-s { display: flex; justify-content: space-between; gap: 12px; font-family: var(--ev-mono); font-size: 12px; color: var(--ev-text); }
.ev-itip-b .ev-s b { font-weight: 500; color: var(--ev-mint); }
.ev-itip-b .ev-s.ev-neg b { color: var(--ev-red); }
.ev-itip-b .ev-fl { font-size: 12px; color: var(--ev-mute); font-style: italic; }
.ev-q-inferior { --q: var(--ev-q-inferior); } .ev-q-average { --q: var(--ev-q-average); } .ev-q-good { --q: var(--ev-q-good); } .ev-q-excellent { --q: var(--ev-q-excellent); }
.ev-q-superb { --q: var(--ev-q-superb); } .ev-q-legendary { --q: var(--ev-q-legendary); } .ev-q-artifact { --q: var(--ev-q-artifact); }
.ev-slot { --q: var(--ev-q-average); flex: none; width: 48px; height: 48px; display: grid; place-items: center; border: 1.5px solid var(--q); background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--q) 22%, transparent), rgba(4, 18, 26, .92)); box-shadow: inset 0 0 8px rgba(0, 0, 0, .6); color: var(--q); border-radius: var(--ev-r-xs); }

/* ============================== states: empty, loading ============================== */
.ev-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 22px 18px; }
.ev-empty.ev-center { align-items: center; text-align: center; }
.ev-empty p { color: var(--ev-mute); max-width: 44ch; }
.ev-spin { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(94, 224, 232, .3); border-top-color: var(--ev-cy-hi); border-radius: 50%; animation: ev-rot .8s linear infinite; }
@keyframes ev-rot { to { transform: rotate(360deg); } }
.ev-loading { display: flex; align-items: center; gap: 10px; padding: 18px 16px; color: var(--ev-mute); }
.ev-skel { display: block; height: 1em; border-radius: 4px; background: linear-gradient(90deg, rgba(94, 224, 232, .06) 0, rgba(94, 224, 232, .16) 40%, rgba(94, 224, 232, .06) 80%) 0 0/200% 100%; animation: ev-shimmer 1.4s linear infinite; }
.ev-skel.ev-line { width: 100%; margin: 6px 0; } .ev-skel.ev-w60 { width: 60%; } .ev-skel.ev-w30 { width: 30%; }
.ev-skel.ev-block { height: 90px; } .ev-skel.ev-round { width: 42px; height: 42px; border-radius: 50%; }
@keyframes ev-shimmer { to { background-position: -200% 0; } }

/* ============================== states (EvUI.state): empty / error / loading / offline / signin / stale ==============================
   One card for every "nothing to show" message. Standard card look (teal gradient, border, dark inner outline); the ring colour says
   what kind it is: teal = empty / loading, amber = offline or unavailable, red = error, blue = sign in. A faint diamond lattice (the
   Evervale gem) sits behind it. */
.ev-state { --st-c: var(--ev-cy); --st-rgb: 94, 224, 232; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px;
  padding: 32px 24px; border: 1px solid rgba(var(--st-rgb), .3); border-radius: var(--ev-r-md); outline: 1px solid rgba(0, 0, 0, .5); outline-offset: -5px;
  background: radial-gradient(60% 90% at 50% 0%, rgba(var(--st-rgb), .12), transparent 70%), var(--ev-panel); overflow: hidden; text-align: center; min-width: 0; }
.ev-state::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: linear-gradient(45deg, transparent 47.5%, rgba(var(--st-rgb), .13) 49.5% 50.5%, transparent 52.5%) 0 0 / 32px 32px,
              linear-gradient(-45deg, transparent 47.5%, rgba(var(--st-rgb), .13) 49.5% 50.5%, transparent 52.5%) 0 0 / 32px 32px;
  -webkit-mask-image: radial-gradient(70% 90% at 50% 45%, #000, transparent); mask-image: radial-gradient(70% 90% at 50% 45%, #000, transparent); }
.ev-state > * { position: relative; }
.ev-st-empty, .ev-st-loading { --st-c: var(--ev-cy); --st-rgb: 94, 224, 232; }
.ev-st-offline, .ev-st-stale { --st-c: var(--ev-amber); --st-rgb: 255, 212, 121; }
.ev-st-error { --st-c: var(--ev-red); --st-rgb: 255, 157, 177; }
.ev-st-signin { --st-c: var(--ev-blue); --st-rgb: 74, 166, 216; }
.ev-st-ring { flex: none; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; color: var(--st-c);
  border: 1px solid rgba(var(--st-rgb), .55); background: radial-gradient(circle, rgba(var(--st-rgb), .22), rgba(var(--st-rgb), .05) 70%);
  box-shadow: 0 0 0 8px rgba(var(--st-rgb), .06), 0 0 28px rgba(var(--st-rgb), .3); animation: ev-st-glow 3.2s ease-in-out infinite; }
.ev-st-ring .ev-i, .ev-st-ring svg { width: 30px; height: 30px; }
.ev-st-loading .ev-st-ring svg { animation: ev-rot 1.6s linear infinite; }
@keyframes ev-st-glow { 50% { box-shadow: 0 0 0 12px rgba(var(--st-rgb), .03), 0 0 40px rgba(var(--st-rgb), .42); } }
.ev-st-body { display: grid; justify-items: center; gap: 8px; max-width: 46ch; min-width: 0; }
.ev-st-t { margin: 0; font: 600 var(--ev-fs-lg)/1.25 var(--ev-head); letter-spacing: .02em; color: var(--ev-ink); }
.ev-st-x { margin: 0; font-size: var(--ev-fs-sm); line-height: 1.5; color: var(--ev-mute); }
.ev-st-a { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
.ev-st-compact .ev-st-a { justify-content: flex-start; }
.ev-st-skel { display: grid; gap: 8px; width: min(320px, 70vw); margin-top: 4px; justify-items: center; }
.ev-st-bar { height: 10px; margin: 0; width: 100%; } .ev-st-b1 { width: 82%; } .ev-st-b2 { width: 58%; }
.ev-st-compact { flex-direction: row; padding: 16px; gap: 16px; justify-content: flex-start; text-align: left; }
.ev-st-compact .ev-st-body { justify-items: start; }
.ev-st-compact .ev-st-ring { width: 48px; height: 48px; box-shadow: 0 0 0 4px rgba(var(--st-rgb), .06), 0 0 16px rgba(var(--st-rgb), .25); }
.ev-st-compact .ev-st-ring .ev-i, .ev-st-compact .ev-st-ring svg { width: 24px; height: 24px; }
.ev-st-compact .ev-st-t { font-size: var(--ev-fs-md); }
/* stale: slim note over data that is still showing */
.ev-st-stale { flex-direction: row; align-self: start; text-align: left; justify-content: flex-start; gap: 12px; padding: 8px 12px; margin: 0 0 12px; border-radius: var(--ev-r-sm); outline: 0; background: rgba(var(--st-rgb), .08); border-color: rgba(var(--st-rgb), .45); font-size: var(--ev-fs-sm); color: var(--ev-text); }
.ev-st-stale::before { display: none; }
.ev-st-stale > svg { color: var(--st-c); flex: none; }
.ev-st-stale .ev-st-note { flex: 1 1 200px; }
/* full-page hero: no card, centred between the header and the bottom bar */
.ev-st-page { min-height: calc(100dvh - 2 * var(--ev-bar-h) - 96px); border: 0; outline: 0; background: none; overflow: visible; gap: 8px; padding: 16px 0 32px; }
.ev-st-page::before { display: none; }
.ev-st-art { position: relative; display: grid; place-items: end center; width: min(300px, 70vw); }
.ev-st-art::before { content: ""; position: absolute; inset: 8% -20% -2%; border-radius: 50%; z-index: 0;
  background: radial-gradient(closest-side, rgba(var(--st-rgb), .22), transparent 72%); }
.ev-st-art::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: -6px; height: 18px; border-radius: 50%; z-index: 0; background: radial-gradient(closest-side, rgba(0, 0, 0, .6), transparent); }
.ev-st-img { position: relative; z-index: 1; display: block; width: auto; height: min(300px, 38dvh); max-width: 100%; object-fit: contain; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .55)); animation: ev-st-bob 4s ease-in-out infinite; }
.ev-st-q { position: absolute; z-index: 2; top: 4%; right: 2%; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font: 700 24px/1 var(--ev-head); color: var(--st-c);
  background: var(--ev-panel); border: 1px solid rgba(var(--st-rgb), .6); box-shadow: 0 0 18px rgba(var(--st-rgb), .4); animation: ev-st-bob 3s ease-in-out -1s infinite; }
/* under 1024 px: the space between the top bar and the bottom tab bar (56 px + safe area), less main's 32 px bottom gap */
@media (max-width: 1023px) { .ev-st-page { min-height: calc(100dvh - var(--ev-bar-h) - 56px - var(--ev-sab) - 32px); padding: 32px 0 0; } }
@keyframes ev-st-bob { 50% { transform: translateY(-6px); } }
.ev-st-page .ev-st-body { gap: 10px; max-width: 52ch; }
.ev-st-page .ev-st-t { font-size: var(--ev-fs-xl); line-height: 1.2; }
.ev-st-page .ev-st-x { font-size: var(--ev-fs-md); }
.ev-st-page .ev-st-a { margin-top: 12px; gap: 12px; }
@media (prefers-reduced-motion: reduce) { .ev-st-img, .ev-st-q { animation: none; } }
@media (prefers-reduced-motion: reduce) { .ev-st-ring, .ev-st-loading .ev-st-ring svg { animation: none; } }
@media (forced-colors: active) { .ev-state { border-color: CanvasText; } .ev-st-ring { border-color: CanvasText; } }

/* ============================== stat tiles ============================== */
.ev-stat { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ev-stat-v { font: 700 28px/1 var(--ev-head); color: var(--ev-ink); font-variant-numeric: tabular-nums; }
.ev-stat-k { margin-top: 3px; font: 500 var(--ev-fs-2xs)/1.2 var(--ev-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ev-mute); }
.ev-stat-v.ev-sm { font-size: 20px; }

/* ============================== motion ============================== */
[data-ev-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ev-ease), transform .6s var(--ev-ease); transition-delay: var(--d, 0s); }
[data-ev-reveal].is-in { opacity: 1; transform: none; }
.ev-no-js [data-ev-reveal] { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .ev-ui *, .ev-ui *::before, .ev-ui *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  [data-ev-reveal] { opacity: 1; transform: none; }
}
@media (forced-colors: active) { .ev-btn, .ev-iconbtn, .ev-acct, .ev-card, .ev-fld { border-color: ButtonText; } .ev-btn.ev-primary { background: Highlight; color: HighlightText; } }
.ev-table .ev-num { white-space: nowrap; }

/* "No pay-to-win" strip: a quiet badge, used on the front page and the rewards pages */
.ev-earned { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; padding: 7px 14px; border: 1px solid var(--ev-line); border-radius: 999px; background: rgba(3, 14, 20, .55); color: var(--ev-text); font-size: 13px; line-height: 1.4; }
.ev-earned::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--ev-mint); }
.ev-earned b { color: var(--ev-ink); font-weight: 600; }
.ev-earned-row { margin: 14px 0 0; }

/* button icons added by btn-icons.js */
.ev-bi { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.2em; }
.ev-bi-host { display: inline-flex; align-items: center; justify-content: center; gap: .55em; }
a.ev-bi-host { text-decoration: none; }
.ev-bi-host .ev-bi-after { order: 2; }


/* ============================== page head banner (.ev-pagehead) ==============================
   The slim banner for APP pages: the admin panel's Dashboard header (ph-icon tile, title, state chip, subtitle, actions), over real
   game art with a heavy scrim. Cinematic heroes (.ca-hero, .ca-phero) are for selling pages; app pages use this.
   <header class="ev-pagehead">
     <img class="ev-ph-art" data-slot="my-banner" src="/img/marketing/x-800.webp" alt="" width="1600" height="900">   (optional art)
     <div class="ev-ph-left"><span class="ev-ph-icon"><svg ...></svg></span>
       <div><div class="ev-ph-title"><h1>Title</h1><span class="ev-ph-chip ok">State</span></div><p class="ev-ph-sub">One line.</p></div></div>
     <div class="ev-ph-actions"><a class="ev-btn" href="...">Action</a></div>
   </header>                                                       chip: .ok .warn .danger (default cyan) */
.ev-pagehead { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 24px;
  padding: 16px 24px; margin: 0 0 24px; border: 1px solid var(--ev-line); border-radius: var(--ev-r-md); background: #06101a; }
.ev-pagehead::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(6, 16, 26, .92) 0%, rgba(6, 16, 26, .58) 48%, rgba(6, 16, 26, .2) 100%); }
.ev-ph-art { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 38%; filter: brightness(1.35) saturate(1.15) contrast(1.05); }
.ev-ph-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.ev-ph-icon { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 1.5px solid var(--ev-line-strong); border-radius: 50%; color: var(--ev-cy-hi);
  background: radial-gradient(circle at 50% 35%, rgba(94, 224, 232, .26), rgba(4, 18, 26, .9)); box-shadow: var(--ev-glow-cy), inset 0 0 14px rgba(94, 224, 232, .12); }
.ev-ph-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ev-ph-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.ev-ph-title :is(h1, h2) { margin: 0; font: 700 var(--ev-fs-xl)/1.25 var(--ev-head); color: var(--ev-ink); }
.ev-ph-chip { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; font: 500 10.5px var(--ev-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ev-cy-hi);
  border: 1px solid var(--ev-line-strong); background: rgba(94, 224, 232, .11); border-radius: 2px; }
.ev-ph-chip.ok { color: var(--ev-mint); border-color: rgba(126, 240, 196, .5); background: rgba(47, 191, 138, .12); }
.ev-ph-chip.warn { color: var(--ev-amber); border-color: rgba(255, 212, 121, .5); background: rgba(255, 212, 121, .1); }
.ev-ph-chip.danger { color: var(--ev-red); border-color: rgba(255, 157, 177, .5); background: rgba(255, 157, 177, .1); }
.ev-pagehead .ev-ph-sub { margin: 8px 0 0; max-width: 60ch; font-size: 14px; line-height: 1.5; color: var(--ev-text); }
.ev-pagehead :is(h1, h2), .ev-pagehead .ev-ph-sub { text-shadow: 0 1px 3px rgba(0, 0, 0, .9), 0 0 14px rgba(0, 0, 0, .6); } /* readable over busy art at every width */
@media (max-width: 1023px) { .ev-pagehead::before { background: linear-gradient(90deg, rgba(6, 16, 26, .88) 0%, rgba(6, 16, 26, .6) 55%, rgba(6, 16, 26, .22) 100%); } }
.ev-ph-actions { display: flex; flex-wrap: wrap; gap: 8px; flex: none; }
/* Buttons never live inside the banner: actions go in .ev-actionbar at the top of the content; the way back to a list is .ev-backlink. */
.ev-actionbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; }
.ev-actionbar:empty { display: none; }
/* Link card band: 1-3 big art cards under the page banner, the whole card is the link. Markup:
   <nav class="ev-linkband" aria-label="..."><a class="ev-linkcard" href><img alt="" src loading="lazy" width height>
   <span class="ev-tile ev-lg"><i data-i="icon" data-size="24"></i></span><span class="ev-lc-t"><b>Title</b><span>One line.</span></span>
   <i class="ev-lc-go" data-i="arrow-right" data-size="22"></i></a></nav> */
.ev-linkband { display: grid; gap: 12px; margin: 0 0 20px; } .ev-linkband[hidden] { display: none; }
/* phones: header, link cards and the first content block sit on one even 16 px rhythm, a little higher on the page */
@media (max-width: 699px) { .ev-pagehead, .ev-linkband { margin-bottom: 16px; } .ar-wrap { padding-top: 16px !important; } }
@media (min-width: 720px) { .ev-linkband:has(> :nth-child(2)) { grid-template-columns: repeat(2, 1fr); } .ev-linkband:has(> :nth-child(3)) { grid-template-columns: repeat(3, 1fr); } }
.ev-linkcard { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; gap: 14px; min-height: 120px; padding: 18px 18px 18px 20px; border: 1px solid var(--ev-cy-lo); border-radius: var(--ev-r-md); background: #05121b; color: var(--ev-ink); text-decoration: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35); transition: border-color var(--ev-t), box-shadow var(--ev-t), transform var(--ev-t); }
.ev-linkcard > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .8s var(--ev-ease); }
.ev-linkcard::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(4, 10, 16, .94) 0%, rgba(4, 10, 16, .82) 55%, rgba(4, 10, 16, .55) 100%); }
.ev-lc-t { display: grid; gap: 4px; flex: 1; min-width: 0; text-shadow: 0 1px 3px rgba(0, 0, 0, .9); }
.ev-lc-t b { font: 700 var(--ev-fs-lg, 18px)/1.2 var(--ev-head); letter-spacing: .02em; color: var(--ev-ink); }
.ev-lc-t span { font-size: 14px; line-height: 1.45; color: var(--ev-text); }
.ev-lc-go { flex: none; color: var(--ev-cy-hi); transition: transform var(--ev-t); }
.ev-linkcard:hover, .ev-linkcard:focus-visible { border-color: var(--ev-cy); box-shadow: 0 10px 30px rgba(0, 0, 0, .35), 0 0 28px rgba(94, 224, 232, .28); }
.ev-linkcard:hover > img { transform: scale(1.05); }
.ev-linkcard:hover .ev-lc-go, .ev-linkcard:focus-visible .ev-lc-go { transform: translateX(4px); }
.ev-linkcard:focus-visible { outline: 2px solid var(--ev-cy-hi); outline-offset: 3px; border-radius: var(--ev-r-md); }
@media (prefers-reduced-motion: reduce) { .ev-linkcard, .ev-linkcard > img, .ev-lc-go { transition: none; } .ev-linkcard:hover > img { transform: none; } }
.ev-backlink { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; margin: 0 0 8px; font-size: var(--ev-fs-sm); font-weight: 500; color: var(--ev-cy-hi); text-decoration: none; }
.ev-backlink:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.ev-backlink .ev-i, .ev-backlink svg { flex: none; }
@keyframes ev-ph-in { from { opacity: 0; } to { opacity: 1; } }
.ev-ph-art { animation: ev-ph-in .6s ease both; }
@media (prefers-reduced-motion: reduce) { .ev-ph-art { animation: none; } }
@media (forced-colors: active) { .ev-pagehead { border-color: ButtonText; } .ev-ph-art { display: none; } }

/* ============================== stage 1 design pieces (2026-10-21 design audit) ==============================
   Spacing, section headers, meta lines, notes, form groups + tiles, file upload, filter bar, phone page banner.
   Rules: docs/DESIGN-SYSTEM.md. Only the scale (4 8 12 16 24 32 48 = --ev-s1..s7) is used for margin, padding and gap here. */
.ev-pi { flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---- spacing helpers ---- */
.ev-section { margin-top: var(--ev-sec-gap); }
.ev-cards { display: grid; gap: var(--ev-card-gap); }
.ev-cards.ev-c2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.ev-cards.ev-c3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.ev-ct + * { margin-top: 8px; }                      /* card title -> its body */
.ev-prose { max-width: 70ch; line-height: 1.5; }     /* long text: about 70 characters a line */
.ev-prose > * + * { margin-top: 12px; }
.ev-inset { padding-left: 16px; padding-right: 16px; } /* text never touches a card edge */
.ev-lv { display: grid; gap: 4px; }                  /* label -> value */
.ev-rows > * { padding-top: 12px; padding-bottom: 12px; }
.ev-rows > * + * { border-top: 1px solid var(--ev-line-soft); }
/* meta group: stacked small lines (time, author, status), 4 apart, 8 below the line above */
.ev-meta { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; font-size: var(--ev-fs-xs, 13px); line-height: 1.4; color: var(--ev-mute); }
.ev-meta > * { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ev-meta > * > svg, .ev-meta > * > .ev-i { flex: none; width: 14px; height: 14px; color: var(--ev-dim); }
.ev-meta.ev-inline { flex-direction: row; flex-wrap: wrap; gap: 4px 16px; }

/* ---- section header: .ev-sechead (plain) and .ev-sechead.ev-band (slim banner) ----
   <header class="ev-sechead"><span class="ev-sh-icon"><svg|<i data-i></span>
     <div class="ev-sh-t"><h2>Title</h2><p class="ev-sh-sub">One line.</p></div>
     <div class="ev-sh-actions"><a class="ev-btn">...</a></div></header>
   band: add .ev-band (+ optional <img class="ev-sh-art" alt="" src="...">). Content goes in a card 12 below. */
.ev-sechead { position: relative; isolation: isolate; display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; margin: var(--ev-sec-gap) 0 12px; padding: 12px 16px; border: 1px solid var(--ev-cy-lo); border-bottom: 2px solid rgba(94, 224, 232, .28); border-radius: var(--ev-r-md); background: linear-gradient(rgba(94, 224, 232, .12), transparent), var(--ev-panel); }
.ev-sechead:first-child, .ev-pagehead + .ev-sechead { margin-top: 0; }
.ev-sh-icon { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border: 1.5px solid var(--ev-line-strong); border-radius: 50%; color: var(--ev-cy-hi);
  background: radial-gradient(circle at 50% 35%, rgba(94, 224, 232, .26), rgba(4, 18, 26, .9)); box-shadow: inset 0 0 12px rgba(94, 224, 232, .12); }
.ev-sh-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ev-sh-t { flex: 1 1 200px; min-width: 0; }
.ev-sh-t :is(h2, h3) { margin: 0; font: 500 var(--ev-fs-2xs, 11px)/1.3 var(--ev-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--ev-cy-hi); }
.ev-sh-sub { margin: 4px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--ev-mute); }
.ev-sh-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.ev-sechead.ev-band { padding: 12px 16px; border: 1px solid var(--ev-cy-lo); border-bottom: 2px solid rgba(94, 224, 232, .28); border-radius: var(--ev-r-md); background: var(--ev-panel); overflow: hidden; }
.ev-sechead.ev-band::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, rgba(6, 16, 26, .9) 0%, rgba(6, 16, 26, .55) 55%, rgba(6, 16, 26, .15) 100%); }
.ev-sh-art { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; opacity: .55; filter: brightness(1.25) saturate(1.1); }
.ev-band .ev-sh-t :is(h2, h3) { text-shadow: 0 1px 6px rgba(0, 0, 0, .7); }
@media (min-width: 900px) { .ev-sechead.ev-band { padding: 16px 24px; } }
@media (max-width: 599px) { .ev-sh-actions { margin-left: 0; width: 100%; } .ev-sh-actions .ev-btn { flex: 1 1 auto; } }

/* ---- notes / callouts: .ev-note.ev-info|ev-ok|ev-warn|ev-danger, icon first ---- */
.ev-note { --n-c: var(--ev-cy-hi); --n-line: rgba(94, 224, 232, .4); --n-bg: rgba(94, 224, 232, .07);
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border: 1px solid var(--n-line); border-radius: var(--ev-r-sm); background: var(--n-bg);
  font-size: 13.5px; line-height: 1.5; color: var(--ev-text); }
.ev-note.ev-info, .ev-note.ev-ok, .ev-note.ev-warn, .ev-note.ev-danger { color: var(--ev-text); }
.ev-note.ev-ok { --n-c: var(--ev-mint); --n-line: rgba(126, 240, 196, .45); --n-bg: rgba(47, 191, 138, .09); }
.ev-note.ev-warn { --n-c: var(--ev-amber); --n-line: rgba(255, 212, 121, .5); --n-bg: rgba(255, 212, 121, .08); }
.ev-note.ev-danger { --n-c: var(--ev-red); --n-line: rgba(255, 157, 177, .5); --n-bg: rgba(255, 157, 177, .08); }
.ev-note > svg, .ev-note > .ev-i { flex: none; width: 18px; height: 18px; margin-top: 2px; /* spacing-ok: optical icon nudge */ color: var(--n-c); }
.ev-note b { color: var(--ev-ink); }
.ev-note > div > * + * { margin-top: 4px; }

/* ---- forms: groups, option tiles, field messages ----
   <div class="ev-form"> <div class="ev-fgroup" role="group" aria-labelledby="g1"><div class="ev-fg-h" id="g1">icon + Duration</div> ...fields / .ev-choices... </div> </div>
   Labels in a set stay on ONE line and about the same length: shorten the wording, never wrap or shrink the font. */
.ev-form { display: grid; gap: 16px; }
/* standard card look (teal gradient, border, tinted title strip + split line), small radius like the page banner */
.ev-fgroup { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 0 16px 16px; border: 1px solid var(--ev-cy-lo); outline: 1px solid rgba(0, 0, 0, .5); outline-offset: -5px; border-radius: var(--ev-r-md); background: var(--ev-panel); overflow: hidden; min-width: 0; }
.ev-fg-h { margin: 0 -16px; /* spacing-ok: strip runs edge to edge over the card padding */ display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 12px 16px; border-bottom: 2px solid rgba(94, 224, 232, .28); background: linear-gradient(rgba(94, 224, 232, .12), transparent); font: 500 var(--ev-fs-2xs, 11px)/1.2 var(--ev-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--ev-cy-hi); }
.ev-fg-h svg, .ev-fg-h .ev-i { width: 16px; height: 16px; flex: none; }
.ev-ferr { display: flex; align-items: flex-start; gap: 8px; margin-top: 4px; font-size: 12px; line-height: 1.4; color: var(--ev-red); }
.ev-ferr svg { width: 14px; height: 14px; margin-top: 1px; /* spacing-ok: optical icon nudge */ }
.ev-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); grid-auto-rows: 1fr; gap: 8px; }
.ev-choices.ev-sm { grid-template-columns: repeat(auto-fill, minmax(min(100%, 104px), 1fr)); } /* short labels ("6 hours"): more per row */
.ev-choice { position: relative; display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 48px; padding: 12px; text-align: left; cursor: pointer;
  border: 1px solid rgba(140, 235, 240, .35); border-radius: 6px; background: rgba(4, 14, 22, .7); color: var(--ev-text); font: 600 13px/1.25 var(--ev-head); }
.ev-choice > svg, .ev-choice > .ev-i { flex: none; width: 18px; height: 18px; color: var(--ev-cy-hi); }
.ev-choice > span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* one line; ellipsis only as a last resort */
.ev-choice > input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.ev-choice:hover { border-color: var(--ev-cy); }
.ev-choice.on, .ev-choice[aria-pressed="true"], .ev-choice:has(input:checked) { border-color: var(--ev-cy); background: rgba(94, 224, 232, .16); box-shadow: inset 0 0 0 1px var(--ev-cy); color: var(--ev-ink); }
.ev-choice:focus-visible, .ev-choice:has(input:focus-visible) { outline: 2px solid var(--ev-cy-hi); outline-offset: 2px; }

/* ---- file upload: EvParts.upload(host, opts) builds this ---- */
.ev-upload { display: grid; gap: 12px; }
.ev-up-in { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.ev-up-zone { display: grid; justify-items: center; gap: 4px; padding: 24px 16px; text-align: center; cursor: pointer; border: 1.5px dashed var(--ev-line-strong); border-radius: var(--ev-r-md); background: rgba(3, 14, 20, .45);
  transition: border-color var(--ev-t-fast), background var(--ev-t-fast); }
.ev-up-zone > svg { width: 28px; height: 28px; color: var(--ev-cy-hi); margin-bottom: 4px; }
.ev-up-zone b { font: 600 14px/1.25 var(--ev-head); color: var(--ev-ink); }
.ev-up-zone small { font-size: 12px; line-height: 1.4; color: var(--ev-mute); }
.ev-up-zone:hover, .ev-upload.is-over .ev-up-zone { border-color: var(--ev-cy); background: rgba(94, 224, 232, .1); }
.ev-up-in:focus-visible + .ev-up-zone { outline: 2px solid var(--ev-cy-hi); outline-offset: 2px; }
.ev-upload.is-err .ev-up-zone { border-color: var(--ev-red-hard); }
.ev-upload.is-full .ev-up-zone { opacity: .55; }
.ev-up-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ev-up-chip { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; padding: 4px 4px 4px 4px; border: 1px solid var(--ev-line); border-radius: var(--ev-r-sm); background: var(--ev-panel-quiet); }
.ev-up-chip img { width: 40px; height: 40px; flex: none; object-fit: cover; border-radius: var(--ev-r-xs); }
.ev-up-meta { display: grid; min-width: 0; font-size: 12px; line-height: 1.3; }
.ev-up-meta b { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--ev-ink); }
.ev-up-meta small { color: var(--ev-mute); }
.ev-up-x { flex: none; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: var(--ev-r-sm); background: none; color: var(--ev-mute); cursor: pointer; }
.ev-up-x:hover { color: var(--ev-red); background: rgba(255, 157, 177, .1); }

/* ---- filter bar + Filters sheet/popover: EvParts.filterBar(host, opts) ---- */
.ev-fbar { position: sticky; top: var(--ev-fbar-top, var(--ev-bar-h)); z-index: 15; display: grid; gap: 8px; padding: 8px 0; margin: 0 0 12px; background: linear-gradient(var(--ev-bg-0) 78%, rgba(6, 16, 26, 0)); }
.ev-fbar.is-open { z-index: var(--ev-z-sheet); }
.ev-fb-row { display: flex; align-items: center; gap: 8px; }
.ev-fb-search { flex: 1; min-width: 0; }
.ev-fb-search input { padding: 0; width: 100%; }
.ev-fb-btn { position: relative; flex: none; }
.ev-fb-count { min-width: 20px; height: 20px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: var(--ev-r-pill); background: var(--ev-cy); color: #04121a; font: 700 11px var(--ev-mono); }
.ev-fb-count[hidden] { display: none; }
.ev-fb-sort, .ev-fb-inl { flex: 0 1 auto; min-width: 0; max-width: 40%; display: none; }
.ev-fb-sort select, .ev-fb-inl { text-overflow: ellipsis; }
.ev-fb-sort.ev-always { display: flex; }
@media (min-width: 600px) { .ev-fb-sort { display: flex; } .ev-fsort-g { display: none; } }
.ev-fwrap { position: relative; flex: none; }
.ev-fpanel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 2; max-height: 82dvh; display: flex; flex-direction: column; border: 1px solid rgba(94, 224, 232, .4); border-bottom: 0; border-radius: 14px 14px 0 0;
  background: var(--ev-panel-solid), var(--ev-bg-0); background-color: var(--ev-bg-0); box-shadow: var(--ev-sh-lg); padding-bottom: var(--ev-sab); }
.ev-fscrim { position: fixed; inset: 0; z-index: 1; background: var(--ev-scrim); }
.ev-fp-h { flex: none; display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 16px; min-height: 52px; border-bottom: 1px solid var(--ev-line); font: 600 16px var(--ev-head); color: var(--ev-ink); }
.ev-fp-h span { flex: 1; display: flex; align-items: center; gap: 8px; }
.ev-fp-b { overflow-y: auto; padding: 16px; display: grid; gap: 16px; }
.ev-fp-b .ev-opt { min-height: 44px; }
.ev-fp-f { flex: none; display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--ev-line); }
.ev-fp-f .ev-btn { flex: 1; }
.ev-fbar .ev-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ev-pills:empty { display: none; }
.ev-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 8px 0 12px; border: 1px solid var(--ev-cy-lo); border-radius: var(--ev-r-pill); background: rgba(94, 224, 232, .1); color: var(--ev-ink); font: 600 12px var(--ev-head); cursor: pointer; }
.ev-pill svg { width: 14px; height: 14px; color: var(--ev-mute); }
.ev-pill:hover { border-color: var(--ev-cy); } .ev-pill:hover svg { color: var(--ev-red); }
.ev-pill.ev-clear-all { background: none; border-color: transparent; color: var(--ev-cy-hi); text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 600px) {
  .ev-fscrim { background: transparent; }
  .ev-fpanel { position: absolute; left: auto; right: 0; bottom: auto; top: calc(100% + 8px); width: 380px; max-height: 70vh; border-bottom: 1px solid rgba(94, 224, 232, .4); border-radius: var(--ev-r-md); }
}
@media (min-width: 900px) { .ev-fbar.has-inline .ev-fb-inl { display: flex; } .ev-fbar.has-inline .ev-fwrap { display: none; } }

/* ---- page banner on phones: art stays visible, text keeps contrast with a shadow, actions stay (max two + More) ---- */
.ev-ph-more { display: none; }
@media (max-width: 600px) {
  .ev-pagehead { padding: 16px; gap: 12px; }
  .ev-pagehead::before { background: linear-gradient(90deg, rgba(6, 16, 26, .7) 0%, rgba(6, 16, 26, .45) 55%, rgba(6, 16, 26, .08) 100%); }
  .ev-pagehead :is(h1, h2), .ev-pagehead .ev-ph-sub { text-shadow: 0 1px 3px rgba(0, 0, 0, .9), 0 0 14px rgba(0, 0, 0, .6); }
  .ev-pagehead .ev-ph-sub { color: var(--ev-ink); margin-top: 8px; font-size: 13px; }
  .ev-ph-icon { width: 40px; height: 40px; } .ev-ph-icon svg { width: 20px; height: 20px; } .ev-ph-left { gap: 12px; }
  .ev-ph-actions { display: flex; flex-direction: column; flex-wrap: nowrap; width: 100%; gap: 8px; }
  .ev-ph-actions > .ev-btn, .ev-ph-actions > a, .ev-ph-actions > button { width: 100%; justify-content: center; }
  .ev-ph-actions > .ev-ph-x { display: none; }
  .ev-ph-actions.ev-ph-open > .ev-ph-x { display: inline-flex; }
  .ev-ph-more { display: inline-flex; }
}
/* Checkbox: same dark field + teal border as the text fields; teal fill and a tick when checked. */
input[type="checkbox"] { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; min-width: 20px; margin: 0; padding: 0; border: 1px solid rgba(140, 235, 240, .45); border-radius: 4px; background: rgba(3, 14, 20, .85) center / 14px 14px no-repeat; box-shadow: inset 0 2px 5px rgba(0, 0, 0, .7); cursor: pointer; vertical-align: middle; transition: background-color .15s, border-color .15s; }
input[type="checkbox"]:hover:not(:disabled) { border-color: #8ef0f5; }
input[type="checkbox"]:checked { background-color: #5ee0e8; border-color: #8ef0f5; box-shadow: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 7.4l3 3 6-6.6' fill='none' stroke='%2304141c' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
input[type="checkbox"]:focus-visible { outline: 2px solid #8ef0f5; outline-offset: 2px; }
input[type="checkbox"]:disabled { opacity: .45; cursor: not-allowed; }
.ev-bot-chip { margin-left: 6px; padding: 1px 6px; gap: 3px; font-size: var(--ev-fs-2xs); vertical-align: middle; }
.ev-bot-chip svg { width: 12px; height: 12px; }
