/* The shared "Poke ShadowGarden" gothic theme (Work-ID 20261018-reskin-a-theme-hud-6e52; zenux, Trello "Mudancas", 2026-10-18: keep every function, change only the visuals to match the mockups
   in Docs/ or tmp_f8/zenux_redesign: dark red and black, a castle under a blood moon behind every header, ornate red frames with corner gems, gold for what is selected or what matters, icon
   tiles, chevrons). THIS file holds only what every screen shares: the tokens, the frame and the header art. The screens have their own files (gothic-hud.css, gothic-party.css, ...), loaded after it
   and before ui/audit/hover-geometry.css, which stays the final paint-only layer.

   AGENTS.md "Absolute UI hover geometry": nothing here changes a size, padding, margin, border width, gap, font metric or transform in a hover / pressed / selected / focus state. A state only
   repaints: a colour, an inset shadow, a background layer. Selected rows are drawn with inset paint (the gold of 09-menu), never with a border that takes room. The art below is a background picture
   (WebP crops of the mockups, ui/theme/*.webp) or plain CSS: no control is ever drawn from a size-changing picture. */
:root{
 /* Work-ID 20261023-redesign-s1-cb81 (zenux, 2026-10-23: "POKE SHADOWGARDEN, a full visual reformulation"): THE palette, in one place. Every screen's colours come from these (the `--sg-*` below are the same
    palette under the names the first theme gave them). Red is for actions, selection and alerts; gold for prestige, rarity, titles and rewards; green for HP, progress and success; teal and blue for
    information and navigation; violet for the rare and the special. Surfaces are navy; lines between them are quiet navy, not red. */
 --color-bg:#0b0f14;--color-panel:#171d2b;--color-panel-secondary:#202a3b;--color-primary:#d94a55;--color-gold:#f0c66a;--color-success:#35c77a;--color-teal:#35cfa4;--color-info:#48b9e8;--color-rare:#a78bfa;
 --color-text:#f1eee8;--color-text-muted:#aab7c7;
 /* the navy scale of the surfaces (the near-black reds of the first theme became these: Tools/recolor_theme.py) and the quiet line between two of them */
 --sg-navy-0:#0a0e18;--sg-navy-1:#0c111c;--sg-navy-2:#101624;--sg-navy-3:#131928;--sg-navy-4:#161d2d;--sg-line:#232d44;--sg-line-hi:#2a3550;
 --sg-void:#030103;--sg-ink:#101522;--sg-panel:#121826;--sg-panel-hi:#151d2e;--sg-tile:#141a2a;
 --sg-red:#c44c45;--sg-red-hi:#cf7666;--sg-red-lo:#28324a;--sg-edge:#af373a;--sg-edge-hi:#c44a43;
 --sg-gold:#f3c96b;--sg-gold-hi:#ffe5a8;--sg-gold-lo:#9a6a1c;
 --sg-text:#f3f0ea;--sg-muted:#b79a99;--sg-faint:#7e6566;--sg-green:#27e27c;--sg-green-lo:#12803f;--sg-blue:#6aa8ff;
 /* the frame: a black rim, a red line, a dark gap, an inner glow and a soft outer glow; one box-shadow list, so it never takes layout room */
 --sg-frame:inset 0 0 0 1px #000,inset 0 0 0 2px var(--sg-edge),inset 0 0 0 3px #1c0409,inset 0 0 22px #d4172f38,0 0 0 1px #000,0 0 14px #d4172f30;
 --sg-frame-soft:inset 0 0 0 1px #0d111c,inset 0 0 0 2px #29344d,inset 0 0 14px #c44c4526;
 /* a plain card: a navy line, no glow (red frames stay on the window itself, the HUD, controls and states) */
 --sg-frame-card:inset 0 0 0 1px #0a0e18,inset 0 0 0 2px var(--sg-line-hi),inset 0 0 0 3px #101624;
 --sg-gems-quiet:linear-gradient(transparent,transparent);
 --sg-frame-gold:inset 0 0 0 1px #0d111c,inset 0 0 0 2px var(--sg-gold-lo),inset 0 0 0 3px #161d2e,inset 0 0 18px #f3c96b30,0 0 14px #f3c96b2e;
 /* the four corner gems of a framed box (background layers, painted over the box's own background) */
 --sg-gems:radial-gradient(circle at 6px 6px,#ff7585 0 1.5px,#c4152c 2px 3.5px,#000 4px 4.5px,transparent 5px) top left/12px 12px no-repeat,
  radial-gradient(circle at 6px 6px,#ff7585 0 1.5px,#c4152c 2px 3.5px,#000 4px 4.5px,transparent 5px) top right/12px 12px no-repeat,
  radial-gradient(circle at 6px 6px,#ff7585 0 1.5px,#c4152c 2px 3.5px,#000 4px 4.5px,transparent 5px) bottom left/12px 12px no-repeat,
  radial-gradient(circle at 6px 6px,#ff7585 0 1.5px,#c4152c 2px 3.5px,#000 4px 4.5px,transparent 5px) bottom right/12px 12px no-repeat;
 --sg-surface:linear-gradient(180deg,#151c2d 0,#111724 100%);
 --sg-head-art:url("header-art-wide.webp?v=sg-1");--sg-emblem:url("emblem.webp?v=sg-1");
 /* the chevron of a row (a small gold angle), as an inline picture */
 --sg-chevron:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='16' viewBox='0 0 10 16'%3E%3Cpath d='M2 2l6 6-6 6' fill='none' stroke='%23ffe5a8' stroke-width='2'/%3E%3C/svg%3E");
}
/* A header strip every window can wear: the castle under the blood moon, right-aligned, over a dark red wash. */
.sg-head-art{background:linear-gradient(90deg,#111724 calc(100% - 640px),#11172400 calc(100% - 330px)),var(--sg-head-art) right center/640px 100% no-repeat,linear-gradient(180deg,#182032,#111724)}

/* The windows that wear the theme (extend the :is() list below and nothing else when a screen joins): the framed box, the header strip with the castle, the emblem, the gold title, the close button.
   Sizes are the window's own (ui/shutdown/window-geometry.css); only paint is set here. Desktop only: the phone keeps ui/mobile/mobile.css. */
@media screen and (min-width:901px){
 /* ---- the window chrome every themed window wears: frame, header art, emblem, title ---------------------------------------------------------------------------------------------------------------- */
 body:not(.mobile-web) #modal:is([data-view="collection"],[data-view="menu"],[data-view="card"],[data-view="friends"],[data-view="ai"],[data-view="bag"],[data-view="dex"],[data-view="pokemon"],[data-view="help"],[data-view="townmap"],[data-view="storage"]){
  border:0!important;border-image:none!important;border-radius:6px!important;background:#050205!important;box-shadow:var(--sg-frame),0 18px 60px #0d111c!important;overflow:hidden!important;
 }
 body:not(.mobile-web) #modal:is([data-view="collection"],[data-view="menu"],[data-view="card"],[data-view="friends"],[data-view="ai"],[data-view="bag"],[data-view="dex"],[data-view="pokemon"],[data-view="help"],[data-view="townmap"],[data-view="storage"]) .modal-header{
  position:relative!important;min-height:92px!important;padding:0 20px 0 106px!important;border:0!important;border-image:none!important;border-radius:0!important;align-items:center!important;
  background:linear-gradient(90deg,#111724 calc(100% - 640px),#11172400 calc(100% - 330px)),var(--sg-head-art) right center/640px 100% no-repeat,linear-gradient(180deg,#182134,#111724)!important;
  box-shadow:0 2px 0 #5c3639,0 3px 0 #0d111c!important;
 }
 body:not(.mobile-web) #modal:is([data-view="collection"],[data-view="menu"],[data-view="card"],[data-view="friends"],[data-view="ai"],[data-view="bag"],[data-view="dex"],[data-view="pokemon"],[data-view="help"],[data-view="townmap"],[data-view="storage"]) .modal-header::before{
  content:"";position:absolute;left:20px;top:50%;width:62px;height:70px;margin-top:-35px;background:var(--sg-emblem) center/cover no-repeat;
  clip-path:polygon(0 0,100% 0,100% 60%,50% 100%,0 60%);
 }
 body:not(.mobile-web) #modal:is([data-view="collection"],[data-view="menu"],[data-view="card"],[data-view="friends"],[data-view="ai"],[data-view="bag"],[data-view="dex"],[data-view="pokemon"],[data-view="help"],[data-view="townmap"],[data-view="storage"]) #modal-eyebrow{display:block!important;color:var(--sg-gold-hi)!important;font:700 12px/16px Arial,sans-serif!important;letter-spacing:.24em!important;text-transform:uppercase!important;text-shadow:0 1px 0 #0d111c}
 body:not(.mobile-web) #modal:is([data-view="collection"],[data-view="menu"],[data-view="card"],[data-view="friends"],[data-view="ai"],[data-view="bag"],[data-view="dex"],[data-view="pokemon"],[data-view="help"],[data-view="townmap"],[data-view="storage"]) #modal-title{
  margin:0!important;font:700 38px/44px Georgia,"Times New Roman",serif!important;letter-spacing:.06em!important;text-transform:uppercase!important;
  color:#f3c96b!important;-webkit-text-fill-color:#f3c96b!important;-webkit-text-stroke:0!important;text-shadow:0 2px 0 #0d111c,0 0 14px #f3c96b44!important;
 }
 body:not(.mobile-web) #modal:is([data-view="collection"],[data-view="menu"],[data-view="card"],[data-view="friends"],[data-view="ai"],[data-view="bag"],[data-view="dex"],[data-view="pokemon"],[data-view="help"],[data-view="townmap"],[data-view="storage"]) #modal-close{
  width:46px!important;height:46px!important;min-width:46px!important;min-height:46px!important;padding:0!important;border:0!important;border-image:none!important;border-radius:3px!important;
  background-color:#141b2b!important;box-shadow:inset 0 0 0 1px #0d111c,inset 0 0 0 2px #6b3f43,0 0 10px #673c4066!important;color:transparent!important;font-size:0!important;
 }
 body:not(.mobile-web) #modal:is([data-view="collection"],[data-view="menu"],[data-view="card"],[data-view="friends"],[data-view="ai"],[data-view="bag"],[data-view="dex"],[data-view="pokemon"],[data-view="help"],[data-view="townmap"],[data-view="storage"]) #modal-close:is(:hover,:focus-visible){background-color:#202b44!important;box-shadow:inset 0 0 0 1px #0d111c,inset 0 0 0 2px #ff7a88,0 0 14px #cf766688!important}

}
