/* Wire to Wire shared theme: one look for every page (navy + brass, high contrast, roomy). */
:root {
  --w-bg: #0a1722; --w-bg2: #0e2231; --w-panel: #112a3c; --w-panel2: #163449; --w-raise: #1b3d55;
  --w-line: rgba(216, 180, 90, .38); --w-line2: rgba(255, 255, 255, .12);
  --w-brass: #d8b45a; --w-brass2: #f3d98a; --w-brassDk: #a57b26;
  --w-txt: #f2f6f9; --w-muted: #b7c7d3; --w-good: #86e08f; --w-bad: #ff9a8f; --w-blue: #8fd0ff;
  --w-sans: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --w-serif: Georgia, 'Times New Roman', serif;
  --w-num: 'Bahnschrift', 'DIN Alternate', 'Roboto Condensed', 'Arial Narrow', system-ui, sans-serif;
  --w-h: 56px; --w-tab: 64px; --w-r: 14px;
  --w-safeT: env(safe-area-inset-top, 0px); --w-safeB: env(safe-area-inset-bottom, 0px);
}
@media (max-height: 500px) { :root { --w-h: 46px; --w-tab: 50px; } }

/* ---------- header ---------- */
.w2w-hdr { position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: calc(var(--w-h) + var(--w-safeT)); padding: var(--w-safeT) max(14px, env(safe-area-inset-right, 0px)) 0 max(14px, env(safe-area-inset-left, 0px));
  display: flex; align-items: center; gap: 14px; background: linear-gradient(180deg, #13304a, #0b1d2b); border-bottom: 2px solid var(--w-brass); box-shadow: 0 4px 16px rgba(0, 0, 0, .35);
  font: 15px/1.2 var(--w-sans); color: var(--w-txt); box-sizing: border-box; }
.w2w-hdr * { box-sizing: border-box; }
.w2w-brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--w-txt); flex: none; }
.w2w-brand svg { width: 30px; height: 30px; flex: none; }
.w2w-brand b { font: 700 21px/1 var(--w-serif); letter-spacing: .2px; white-space: nowrap; }
.w2w-brand b i { font-style: italic; font-weight: 400; color: var(--w-brass2); font-size: .8em; margin: 0 2px; }
.w2w-links { display: flex; align-items: stretch; gap: 2px; height: 100%; margin-left: 6px; flex: 1; min-width: 0; }
.w2w-links a, .w2w-links button { display: flex; align-items: center; gap: 7px; padding: 0 13px; border: 0; background: none; color: var(--w-muted); font: 600 15px/1 var(--w-sans);
  text-decoration: none; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.w2w-links a:hover, .w2w-links button:hover { color: #fff; }
.w2w-links .on { color: #fff; border-bottom-color: var(--w-brass2); }
.w2w-ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.w2w-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: none; }
.w2w-bank { display: flex; flex-direction: column; align-items: flex-end; text-decoration: none; line-height: 1.05; padding: 5px 12px; border-radius: 10px; background: rgba(0, 0, 0, .28); border: 1px solid var(--w-line); }
.w2w-bank b { font: 800 17px/1 var(--w-num); color: var(--w-good); letter-spacing: .02em; }
.w2w-bank small { font: 600 11px/1.2 var(--w-sans); color: var(--w-muted); letter-spacing: .04em; }
.w2w-menu { display: none; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--w-line); background: rgba(255, 255, 255, .06); color: var(--w-txt); font: 700 15px/1 var(--w-sans); cursor: pointer; }
@media (max-width: 1060px) { .w2w-links a span, .w2w-links button span { display: none; } .w2w-links a, .w2w-links button { padding: 0 12px; } }
@media (max-width: 900px) {
  .w2w-links { display: none; }
  .w2w-menu { display: flex; }
  body.w2w-page .w2w-menu { display: none; }   /* page mode uses the bottom tab bar */
}
@media (max-width: 380px) { .w2w-brand b { font-size: 18px; } .w2w-bank { padding: 4px 9px; } .w2w-bank b { font-size: 15px; } }

/* ---------- bottom tab bar (phones, page mode) ---------- */
.w2w-tabbar { display: none; }
@media (max-width: 900px) {
  body.w2w-page .w2w-tabbar { display: grid; grid-template-columns: repeat(6, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; height: calc(var(--w-tab) + var(--w-safeB)); padding-bottom: var(--w-safeB);
    background: #0b1d2b; border-top: 2px solid var(--w-brass); box-shadow: 0 -4px 16px rgba(0, 0, 0, .35); font-family: var(--w-sans); }
  .w2w-tabbar a, .w2w-tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 0; background: none; color: var(--w-muted); text-decoration: none; font: 600 12.5px/1 var(--w-sans); cursor: pointer; min-width: 0; }
  .w2w-tabbar .w2w-ico { width: 24px; height: 24px; }
  .w2w-tabbar .on { color: var(--w-brass2); }
  .w2w-tabbar .on .w2w-ico { stroke-width: 2.3; }
  body.w2w-page { padding-bottom: calc(var(--w-tab) + var(--w-safeB)); }
}
@media (max-width: 900px) and (max-height: 500px) {
  .w2w-tabbar a, .w2w-tabbar button { flex-direction: row; gap: 7px; font-size: 13.5px; }
}

/* ---------- More / menu sheet ---------- */
.w2w-sheet { position: fixed; inset: 0; z-index: 70; display: none; background: rgba(3, 8, 12, .55); font-family: var(--w-sans); }
.w2w-sheet.open { display: block; }
.w2w-sheet .in { position: absolute; right: 12px; top: calc(var(--w-h) + var(--w-safeT) + 8px); width: min(340px, calc(100vw - 24px)); max-height: calc(100vh - var(--w-h) - 30px); overflow: auto;
  background: var(--w-panel); border: 1px solid var(--w-line); border-radius: 16px; box-shadow: 0 18px 50px rgba(0, 0, 0, .6); padding: 8px; }
@media (max-width: 900px) { body.w2w-page .w2w-sheet .in { top: auto; bottom: calc(var(--w-tab) + var(--w-safeB) + 8px); } }
.w2w-sheet h6 { margin: 10px 10px 4px; font: 700 12px/1 var(--w-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--w-brass); }
.w2w-sheet a { display: flex; align-items: center; gap: 12px; padding: 12px 10px; border-radius: 10px; color: var(--w-txt); text-decoration: none; font-size: 16px; font-weight: 600; }
.w2w-sheet a small { display: block; font-weight: 400; font-size: 13px; color: var(--w-muted); margin-top: 2px; }
.w2w-sheet a:hover, .w2w-sheet a.on { background: rgba(255, 255, 255, .07); }
.w2w-sheet a.on { box-shadow: inset 3px 0 0 var(--w-brass2); }
.w2w-sheet .w2w-ico { width: 22px; height: 22px; color: var(--w-brass2); }

/* ---------- page mode body ---------- */
body.w2w-page { padding-top: calc(var(--w-h) + var(--w-safeT)); }

/* ---------- pill mode (3D island: compact brand + menu that floats in the HUD) ---------- */
.w2w-pill { display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(9, 24, 36, .78); border: 1px solid var(--w-line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font: 15px/1.2 var(--w-sans); color: var(--w-txt); box-shadow: 0 6px 20px rgba(0, 0, 0, .35); }
.w2w-pill .w2w-brand { padding: 4px 8px 4px 6px; } .w2w-pill .w2w-brand b { font-size: 18px; } .w2w-pill .w2w-brand svg { width: 26px; height: 26px; }
.w2w-pill .w2w-links { height: 40px; margin: 0; flex: none; }
.w2w-pill .w2w-links a, .w2w-pill .w2w-links button { border-radius: 10px; border-bottom: 0; margin: 0; padding: 0 10px; font-size: 14px; }
.w2w-pill .w2w-links .on { background: rgba(216, 180, 90, .2); color: var(--w-brass2); }
.w2w-pill .w2w-menu { display: none; height: 38px; }
@media (max-width: 1240px) { .w2w-pill .w2w-links { display: none; } .w2w-pill .w2w-menu { display: flex; } }
@media (max-width: 560px) { .w2w-pill .w2w-brand b { display: none; } .w2w-pill .w2w-menu span { display: none; } }
body.w2w-pillmode .w2w-sheet .in { left: 12px; right: auto; top: calc(64px + var(--w-safeT)); }

/* ---------- shared bits ---------- */
.w2w-legal { margin: 18px auto calc(16px + var(--w-safeB)); padding: 0 16px; max-width: 760px; text-align: center; font: 12px/1.5 var(--w-sans); color: rgba(220, 232, 240, .55); }
.w2w-hide, [data-ad-hook] { display: none !important; }
.ad-slot { display: none !important; }  /* ad placements stay in the markup as hooks, hidden for now */
@media (max-width: 900px) { body.w2w-page .toast, body.w2w-page .toasts { bottom: calc(var(--w-tab) + 16px + var(--w-safeB)) !important; } }
@media (max-width: 520px) { .w2w-hdr .w2w-menu span { display: none; } .w2w-hdr .w2w-menu { padding: 0 10px; } .w2w-hdr { gap: 8px; } }
@media (max-width: 350px) { .w2w-hdr .w2w-brand b { display: none; } }
@media (max-width: 900px) { body.w2w-page .w2w-sheet .gomain { display: none; } }

/* Game Points chip in the header */
.w2w-gp { display: flex; align-items: center; padding: 6px 11px; border-radius: 999px; background: linear-gradient(180deg, #3a2f7a, #241c55); border: 1px solid #9d8cff; color: #e6e0ff; text-decoration: none; font: 800 13.5px/1 var(--w-sans); white-space: nowrap; }
@media (max-width: 520px) { .w2w-gp { padding: 5px 8px; font-size: 12px; } }
.w2w-mylogo { display: flex; width: 36px; height: 36px; flex: none; } .w2w-mylogo svg { width: 36px; height: 36px; } .w2w-mylogo[hidden] { display: none; }
@media (max-width: 420px) { .w2w-mylogo { display: none; } }

/* players-online line under the wordmark */
.w2w-bt { display: flex; flex-direction: column; gap: 3px; line-height: 1; }
.w2w-on { display: flex; align-items: center; gap: 5px; font: 700 10.5px/1 var(--w-sans); color: #9fd8b0; letter-spacing: .3px; white-space: nowrap; }
.w2w-on i { width: 7px; height: 7px; border-radius: 50%; background: #39d36b; box-shadow: 0 0 0 0 rgba(57,211,107,.6); animation: w2wpulse 2s infinite; }
.w2w-on em { font-style: normal; color: #d7f5df; }
@keyframes w2wpulse { 0% { box-shadow: 0 0 0 0 rgba(57,211,107,.55); } 70% { box-shadow: 0 0 0 6px rgba(57,211,107,0); } 100% { box-shadow: 0 0 0 0 rgba(57,211,107,0); } }
@media (max-width: 560px) { .w2w-pill .w2w-on { display: none; } }
@media (max-width: 350px) { .w2w-hdr .w2w-on { display: none; } }
@media (max-width: 420px) { .w2w-hdr .w2w-brand b { font-size: 17px; } .w2w-hdr .w2w-brand { gap: 6px; } .w2w-hdr .w2w-right { gap: 6px; } .w2w-hdr .w2w-gp { padding: 4px 7px; font-size: 11.5px; } .w2w-hdr .w2w-bank b { font-size: 15px; } }
/* bloodlines: mare tiers, maturity profiles, special crosses */
.mtier,.mprof{display:inline-flex;align-items:center;gap:3px;padding:1px 7px;border-radius:999px;font-size:11px;font-weight:700;letter-spacing:.02em;white-space:nowrap;vertical-align:1px}
.mt-foundation{background:#e9e4d8;color:#5a5244}.mt-producer{background:#d7e7f7;color:#1d4f86}.mt-elite{background:#f3e2b3;color:#7a5408}
.mt-bluehen{background:linear-gradient(135deg,#1e4fa8,#5aa0ff);color:#fff;box-shadow:0 0 0 1px #c9a227,0 0 10px rgba(90,160,255,.55)}
.mp-precocious{background:#ffe7c2;color:#8a4a00}.mp-classic{background:#e3f1df;color:#22612d}.mp-late{background:#e7e0f5;color:#4b3485}
.xcall{position:relative;margin:10px 0;padding:12px 14px;border-radius:14px;color:#2b1d00;background:linear-gradient(135deg,#fff6d6,#f3d27a 55%,#e6b84a);border:2px solid #c9a227;box-shadow:0 6px 22px rgba(201,162,39,.35);overflow:hidden}
.xcall .xt{font:800 20px/1.1 Georgia,serif;letter-spacing:.03em;text-transform:uppercase}.xcall .xs{font-size:13px;margin-top:4px;line-height:1.4}
.xcall::after{content:"";position:absolute;inset:0;background:linear-gradient(110deg,transparent 30%,rgba(255,255,255,.55) 45%,transparent 60%);transform:translateX(-100%);animation:xshine 3.2s ease-in-out infinite}
.xcall.x-bronze{background:linear-gradient(135deg,#fbe9dc,#e0a476 50%,#b8733f);border-color:#8a4f22;color:#2e1606}.xcall.x-silver{background:linear-gradient(135deg,#ffffff,#d9dee6 45%,#a9b2bf);border-color:#7d8794;color:#1c2330}
.xcall.x-golden{background:linear-gradient(135deg,#fffbe6,#ffd75e 40%,#ff9f1c 75%,#ffd75e);border-color:#a86a00;box-shadow:0 0 0 2px #fff3,0 8px 30px rgba(255,170,0,.55)}
.xcall.x-golden .xt{font-size:24px}
@keyframes xshine{0%,40%{transform:translateX(-100%)}70%,100%{transform:translateX(100%)}}
@media (prefers-reduced-motion:reduce){.xcall::after{animation:none}}