:root {
  /* Hockey Australia sets headings in Radnika (Zetafonts, paid) and body in Inter. Manrope stands in
     for Radnika until a web licence is bought; put 'Radnika' first here once the files are served. */
  --font-head: 'Manrope', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --black: #121212;
  --bone: #EBE4D2;
  --red: #D2261B;
  --bone-dark: #d9d0b8;
  --mid: #8a8370;
  --line: rgba(18, 18, 18, 0.18);
  /* Hockey Australia's green and lime, used for stance and accents */
  --green: #0E8F7E;
  --green-deep: #0A6B5F;
  --lime: #D7E84B;
  --amber: #E8A317;
  --grey: #8a8370;
  --ink: #0f1413;
  --glass: rgba(235, 228, 210, 0.72);
  --glass-strong: rgba(235, 228, 210, 0.9);
  --glass-dark: rgba(15, 20, 19, 0.58);
  --radius: 16px;
  --radius-s: 10px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bone);
  background-image: radial-gradient(1200px 600px at 10% -10%, rgba(14, 143, 126, 0.16), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(215, 232, 75, 0.22), transparent 55%);
  background-attachment: fixed;
  color: var(--black);
  font: 15px/1.45 var(--font-body);
}
h1, h2, h3 { font-family: var(--font-head); margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; }
.muted { color: var(--mid); }
.error { color: var(--red); min-height: 1.4em; margin: 0; }
.spacer { flex: 1; }
a { color: inherit; }

button, select, input, textarea {
  font: inherit;
  color: inherit;
  border: 1px solid var(--black);
  background: transparent;
  padding: 8px 14px;
  border-radius: 999px;
}
input, textarea { border-radius: var(--radius-s); background: rgba(255, 255, 255, 0.35); }
select { background: rgba(255, 255, 255, 0.35); }
button { cursor: pointer; background: var(--black); color: var(--bone); font-weight: 500; }
button.ghost { background: transparent; color: var(--black); }
button.small { padding: 3px 10px; font-size: 13px; }
button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, .tcard:focus-visible, .tile:focus-visible, .node:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}
textarea { width: 100%; min-height: 70px; }
label { display: grid; gap: 4px; font-size: 13px; font-weight: 500; }

/* Glass surfaces */
.glass { background: var(--glass); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border: 1px solid rgba(18, 18, 18, 0.12); border-radius: var(--radius); }

/* Sign in */
#login { min-height: 100vh; display: grid; place-items: center; padding: 20px; position: relative; isolation: isolate; }
#trail { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
#login .panel { position: relative; z-index: 1; }
.panel { display: grid; gap: 14px; width: min(360px, 100%); padding: 28px; background: var(--glass-strong); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(18, 18, 18, 0.12); border-radius: var(--radius); }

/* App frame, mobile first */
#app { max-width: 1240px; margin: 0 auto; padding: 12px 12px 40px; display: grid; gap: 16px; }
.top { position: sticky; top: 8px; z-index: 5; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; background: var(--glass); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border: 1px solid rgba(18, 18, 18, 0.12); border-radius: var(--radius); }
.top .sub { display: none; font-size: 13px; }
.top #votes { display: contents; }
.top .actions { display: flex; gap: 6px; margin-left: auto; }
.top .actions button { padding: 6px 12px; font-size: 13px; }

/* Votes to win */
.vote-pill { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 6px; border-radius: 999px; background: var(--black); color: var(--bone); }
.vote-pill b { font: 700 20px/1 var(--font-head); background: var(--green); color: #fff; border-radius: 999px; min-width: 32px; height: 32px; display: grid; place-items: center; padding: 0 6px; }
.vote-pill > span { display: grid; line-height: 1.1; font-size: 13px; font-weight: 600; }
.vote-pill small { font-weight: 400; opacity: 0.75; font-size: 11px; }
.votes-desktop { display: none; gap: 8px; }
.votes-mobile { display: flex; }

/* Scorecard bars */
#scorecard { display: grid; gap: 14px; }
.score { padding: 16px; }
.score h2 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.score .need { font: 500 13px var(--font-body); color: var(--mid); }
.bar { display: flex; height: 40px; margin: 10px 0 8px; border-radius: 999px; overflow: hidden; position: relative; background: rgba(18, 18, 18, 0.06); }
.bar > span { display: grid; place-items: center; font: 700 15px var(--font-head); min-width: 0; overflow: hidden; }
.bar .marker { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dashed var(--black); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; }
.legend i { display: inline-block; width: 11px; height: 11px; margin-right: 5px; border-radius: 3px; vertical-align: -1px; }

/* Stance colours: green is ours, red is a rival, lime undecided, grey unknown */
.b-AUS { background: var(--green); color: #fff; }
.b-CHI { background: var(--red); color: #fff; }
.b-IND { background: var(--amber); color: var(--black); }
.b-undecided { background: repeating-linear-gradient(45deg, var(--lime), var(--lime) 5px, #eef3b8 5px, #eef3b8 10px); color: var(--black); }
.b-unknown { background: var(--grey); color: #fff; }
.b-recused { background: #3a3a3a; color: var(--bone); }
.b-none { background: rgba(18, 18, 18, 0.08); color: var(--black); }

/* Attention lists */
.two-col { display: grid; gap: 14px; }
.two-col article { padding: 16px; }
.list { list-style: none; margin: 8px 0 0; padding: 0; border-top: 1px solid var(--line); }
.list li { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
button.link { background: none; border: 0; padding: 0; color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; border-radius: 0; }
.empty { color: var(--mid); padding: 8px 0; margin: 0; }

/* Filters and sort */
#filters { display: flex; flex-direction: column; gap: 8px; }
.row-wrap, .controls { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.controls { font-size: 13px; }
.controls .muted { margin: 0 2px 0 4px; }
.controls select { font-size: 13px; padding: 4px 10px; }
#filters button { background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: var(--black); font-size: 13px; padding: 5px 12px; border-color: rgba(18, 18, 18, 0.2); }
#filters button small { opacity: 0.6; font-weight: 400; }
#filters .row-wrap button[aria-pressed="true"], #filters [data-cluster][aria-pressed="true"], #filters [data-sort][aria-pressed="true"] { background: var(--black); color: var(--bone); border-color: var(--black); }
#filters .everyone[aria-pressed="false"] { border-color: var(--green); color: var(--green-deep); }
.host-chip[aria-pressed="false"] { opacity: 0.4; }
.host-chip[aria-pressed="true"] { outline: 2px solid var(--black); outline-offset: -2px; }
#filters .host-chip.b-AUS[aria-pressed="true"] { background: var(--green); color: #fff; border-color: var(--green); }
#filters .host-chip.b-CHI[aria-pressed="true"] { background: var(--red); color: #fff; border-color: var(--red); }
#filters .host-chip.b-IND[aria-pressed="true"] { background: var(--amber); color: var(--black); border-color: var(--amber); }
#filters .host-chip.b-undecided, #filters .host-chip.b-unknown, #filters .host-chip.b-recused { color: var(--black); }
.sorts { display: none; }

/* People: groups */
.group { margin-bottom: 18px; }
.group > header { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding: 0 4px 8px; }
.tag { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; border: 1px solid var(--black); padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.tag.red { background: var(--red); border-color: var(--red); color: var(--bone); }
.tag.green { background: var(--green); border-color: var(--green); color: #fff; }
.tag.soft { border-color: var(--line); color: var(--mid); }
.item.lapsed { opacity: 0.6; }

/* Mobile tiles: photo and last name on the stance colour */
.tiles { display: grid; gap: 8px; grid-template-columns: repeat(3, 1fr); touch-action: pan-y; }
.tile { position: relative; padding: 0; border: 0; border-radius: var(--radius-s); overflow: hidden; aspect-ratio: 1; background: var(--bone-dark); display: block; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.tile .tphoto, .tile .flag { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; border: 0; border-radius: 0; }
.tile .band { position: absolute; left: 0; right: 0; bottom: 0; padding: 5px 6px; font: 700 12px/1.1 var(--font-head); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .band.split { padding: 0; display: grid; }
.tile .band.split i { position: absolute; top: 0; bottom: 0; width: 50%; }
.tile .band.split i + i { left: 50%; }
.tile .band.split > span { position: relative; padding: 5px 6px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }
.tgrid { display: none; }

/* Trading cards */
.tcard { position: relative; text-align: left; padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; background: linear-gradient(170deg, #f7f3e8, var(--bone) 55%, var(--bone-dark)); color: var(--black); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 10px 24px -14px rgba(18, 18, 18, 0.45); width: 100%; font: inherit; }
.tcard::before { content: ''; position: absolute; inset: 6px; border: 1px solid rgba(18, 18, 18, 0.14); border-radius: calc(var(--radius) - 5px); pointer-events: none; z-index: 2; }
.tcard-photo { position: relative; display: block; aspect-ratio: 4 / 4.6; margin: 12px 12px 0; border-radius: var(--radius-s); overflow: hidden; background: var(--bone-dark); }
.tcard-photo .tphoto, .tcard-photo .flag { width: 100%; height: 100%; object-fit: cover; object-position: top; border: 0; border-radius: 0; display: block; }
.tcard-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 30%, transparent 70%, rgba(18, 18, 18, 0.28)); }
.tcard-flag { position: absolute; left: 8px; bottom: 8px; z-index: 1; }
.tcard-flag .tflag { width: 34px; height: 24px; object-fit: cover; border-radius: 4px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35); display: grid; place-items: center; font: 700 10px var(--font-head); background: var(--bone); }
.tcard-body { display: grid; gap: 2px; padding: 10px 14px 8px; }
.tcard-name { font: 500 13px/1.15 var(--font-head); text-transform: uppercase; letter-spacing: 0.04em; }
.tcard-name b { font-size: 19px; letter-spacing: -0.01em; text-transform: none; }
.tcard-title { font-size: 12px; color: var(--mid); }
.tcard-nat { font-size: 12px; font-weight: 600; }
.tcard-traits { font-size: 11px; color: var(--green-deep); font-weight: 600; }
.tcard-strips { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; }
.tcard-strips .stance { display: grid; place-items: center; padding: 6px 4px; font: 700 12px/1.1 var(--font-head); text-align: center; }
.tcard-strips .stance i { display: block; font: 500 9px/1 var(--font-body); text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.8; margin-bottom: 2px; font-style: normal; }
button.tcard:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 18px 30px -16px rgba(18, 18, 18, 0.55); }
@media (prefers-reduced-motion: no-preference) { button.tcard { transition: transform 160ms ease, box-shadow 160ms ease; } }

/* Mobile peek: the full card animates out over the grid */
#peek { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 20; transform: translateY(20px) scale(0.96); opacity: 0; transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), opacity 200ms ease; pointer-events: none; }
#peek.show { transform: none; opacity: 1; pointer-events: auto; }
#peek .tcard { grid-template-columns: 42% 1fr; grid-template-rows: auto auto; box-shadow: 0 24px 50px -20px rgba(18, 18, 18, 0.7); }
#peek .tcard-photo { grid-row: 1 / 3; aspect-ratio: auto; margin: 10px 0 10px 10px; }
#peek .tcard-body { padding: 14px 14px 6px; }
#peek .tcard-strips { grid-column: 2; margin: 0 10px 10px 0; border-radius: var(--radius-s); overflow: hidden; }
.peek-hint { margin: 6px 0 0; text-align: center; font-size: 12px; color: var(--mid); }

/* Drawer, full width on mobile */
dialog {
  border: 0; background: var(--glass-strong); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); color: var(--black);
  margin: 0 0 0 auto; height: 100vh; max-height: 100vh; width: 100vw; max-width: 100vw; padding: 18px; overflow-y: auto;
}
dialog::backdrop { background: rgba(18, 18, 18, 0.45); }
.drawer-head { display: flex; gap: 12px; align-items: flex-start; }
.drawer-head .flag { width: 56px; height: 40px; }
dialog section { margin-top: 22px; display: grid; gap: 8px; }
dialog section > h3 { border-bottom: 1px solid var(--black); padding-bottom: 4px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.row > label { flex: 1 1 130px; }
.row > label > select, .row > label > input { width: 100%; }
.item { border-bottom: 1px solid var(--line); padding: 6px 0; font-size: 14px; }
.item small { color: var(--mid); }
form.stack { display: grid; gap: 10px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: 12px; padding: 1px 9px; border: 1px solid var(--black); border-radius: 999px; }
.flag { width: 40px; height: 28px; object-fit: cover; border: 1px solid var(--line); border-radius: 4px; background: var(--bone-dark); flex: none; display: grid; place-items: center; font: 700 11px var(--font-head); }
.flag.photo { object-fit: cover; object-position: top; }
.drawer-head .flag.photo { width: 64px; height: 64px; border-radius: var(--radius-s); }
.suggestion .plus { font: 700 18px/1 var(--font-head); width: 32px; height: 32px; padding: 0; }

#toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--black); color: var(--bone); padding: 8px 16px; margin: 0; z-index: 30; border-radius: 999px; }

/* Network: a full-screen stage over everything */
body.network { overflow: hidden; }
body.network #app > :not(.top) { visibility: hidden; }
body.network .top { position: fixed; left: 12px; right: 12px; top: 8px; background: var(--glass-dark); color: var(--bone); border-color: rgba(235, 228, 210, 0.16); z-index: 12; }
body.network .top .muted { color: rgba(235, 228, 210, 0.6); }
body.network .top button.ghost { color: var(--bone); border-color: rgba(235, 228, 210, 0.4); }
body.network .vote-pill { background: rgba(235, 228, 210, 0.12); }
body.network #filters { visibility: visible; position: fixed; left: 12px; top: 70px; z-index: 12; width: min(560px, calc(100vw - 24px)); }
body.network #filters button { background: var(--glass-dark); color: var(--bone); border-color: rgba(235, 228, 210, 0.25); }
body.network #filters .row-wrap button[aria-pressed="true"], body.network #filters [data-cluster][aria-pressed="true"] { background: var(--bone); color: var(--black); border-color: var(--bone); }
body.network #filters .muted { color: rgba(235, 228, 210, 0.6); }
body.network #filters select { background: var(--glass-dark); color: var(--bone); border-color: rgba(235, 228, 210, 0.25); }
body.network #filters .host-chip.b-undecided, body.network #filters .host-chip.b-unknown, body.network #filters .host-chip.b-recused { color: var(--black); background: var(--bone-dark); }
#stage { position: fixed; inset: 0; z-index: 10; background: var(--ink); background-image: radial-gradient(900px 700px at 50% 40%, rgba(14, 143, 126, 0.16), transparent 70%), radial-gradient(500px 400px at 85% 90%, rgba(215, 232, 75, 0.07), transparent 70%); overflow: hidden; color: var(--bone); opacity: 0; transition: opacity 700ms ease; }
#stage.settled { opacity: 1; }
#stage.instant { transition: none; opacity: 1; }
#stage svg { position: absolute; inset: 0; }
#stage path { fill: none; stroke: var(--lime); stroke-width: 1.2; stroke-linecap: round; opacity: 0.55; filter: url(#glow); stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1600ms cubic-bezier(0.4, 0, 0.2, 1) 700ms; }
#stage.settled path { stroke-dashoffset: 0; }
#stage.live path, #stage.instant path { transition: none; stroke-dasharray: none; stroke-dashoffset: 0; }
#stage path.inferred { stroke-dasharray: 5 6; opacity: 0.4; }
#stage.live path.inferred { stroke-dasharray: 5 6; }
#stage path.inherited { stroke: var(--bone); opacity: 0.3; }
#stage path.interest { stroke: var(--green); stroke-width: 0.9; opacity: 0.4; }
#stage .pulse { fill: #fff; filter: url(#glow); opacity: 0.9; }
.node, .hub { position: absolute; left: 0; top: 0; margin: 0; padding: 0; border-radius: 50%; display: grid; place-items: center; transition: transform 1100ms cubic-bezier(0.22, 1, 0.36, 1), opacity 600ms ease, filter 900ms ease; will-change: transform; filter: blur(0); }
#stage:not(.settled) .node, #stage:not(.settled) .hub { filter: blur(6px); }
#stage.live .node, #stage.live .hub, #stage.instant .node, #stage.instant .hub { transition: box-shadow 200ms ease, opacity 600ms ease; }
.node { background: var(--ink); border: 2px solid rgba(235, 228, 210, 0.5); color: var(--bone); cursor: pointer; overflow: visible; box-shadow: 0 0 0 6px rgba(215, 232, 75, 0.06), 0 0 24px rgba(215, 232, 75, 0.12); }
.node .np { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: top; border: 0; display: grid; place-items: center; background: var(--bone-dark); font: 700 12px var(--font-head); color: var(--black); }
.node .label { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 6px; font: 600 11px/1.1 var(--font-body); white-space: nowrap; pointer-events: none; color: rgba(235, 228, 210, 0.85); letter-spacing: 0.02em; }
.node:hover { z-index: 2; box-shadow: 0 0 0 6px rgba(215, 232, 75, 0.18), 0 0 40px rgba(215, 232, 75, 0.35); }
.node.ring-AUS { border-color: var(--green); box-shadow: 0 0 0 4px rgba(14, 143, 126, 0.35), 0 0 30px rgba(14, 143, 126, 0.5); }
.node.ring-CHI { border-color: var(--red); box-shadow: 0 0 0 4px rgba(210, 38, 27, 0.3), 0 0 30px rgba(210, 38, 27, 0.45); }
.node.ring-IND { border-color: var(--amber); box-shadow: 0 0 0 4px rgba(232, 163, 23, 0.3), 0 0 30px rgba(232, 163, 23, 0.4); }
.node.ring-undecided { border-color: var(--lime); border-style: dashed; }
.node.ring-unknown { border-color: rgba(235, 228, 210, 0.35); }
.node.ring-recused { border-color: rgba(235, 228, 210, 0.2); opacity: 0.6; }
.hub { background: radial-gradient(circle, rgba(215, 232, 75, 0.9), rgba(215, 232, 75, 0.25) 60%, transparent 72%); border: 0; box-shadow: 0 0 30px rgba(215, 232, 75, 0.35); }
.hub span { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 4px; font: 700 11px/1.1 var(--font-head); white-space: nowrap; letter-spacing: 0.06em; text-transform: uppercase; color: var(--lime); }
.const-note { position: absolute; left: 16px; bottom: 10px; margin: 0; font-size: 12px; color: rgba(235, 228, 210, 0.55); max-width: 60vw; }

/* Glass panels nudged into the stage edges */
.glass-panel { position: absolute; width: 320px; max-height: 46vh; display: grid; grid-template-rows: 10px auto 1fr; background: var(--glass-dark); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2); border: 1px solid rgba(235, 228, 210, 0.16); border-radius: var(--radius); color: var(--bone); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8); overflow: hidden; z-index: 11; opacity: 0; transform: translateY(10px); transition: opacity 600ms ease 1400ms, transform 600ms ease 1400ms; }
#stage.settled .glass-panel, #stage.instant .glass-panel { opacity: 1; transform: none; }
#stage.instant .glass-panel { transition: none; }
.glass-panel .grip { height: 10px; cursor: grab; background: linear-gradient(90deg, transparent 35%, rgba(235, 228, 210, 0.35) 35%, rgba(235, 228, 210, 0.35) 65%, transparent 65%) center / 100% 3px no-repeat; touch-action: none; }
.glass-panel.dragging .grip { cursor: grabbing; }
.glass-panel header { display: flex; align-items: center; justify-content: space-between; padding: 2px 14px 8px; }
.glass-panel header h3 { color: var(--lime); }
.glass-panel .x { background: transparent; color: var(--bone); border: 0; padding: 2px 6px; font-size: 16px; line-height: 1; }
.glass-panel .panel-body { overflow-y: auto; padding: 0 14px 12px; font-size: 13px; }
.glass-panel .item { border-color: rgba(235, 228, 210, 0.14); }
.glass-panel .item small, .glass-panel .muted, .glass-panel .empty { color: rgba(235, 228, 210, 0.6); }
.glass-panel .list { border-color: rgba(235, 228, 210, 0.14); }
.glass-panel .list li { border-color: rgba(235, 228, 210, 0.14); }
.glass-panel button.small { background: var(--lime); color: var(--black); border-color: var(--lime); }
.glass-panel button.small.ghost { background: transparent; color: var(--bone); border-color: rgba(235, 228, 210, 0.4); }
.glass-panel strong { color: #fff; }

/* Desktop */
@media (min-width: 760px) {
  #app { padding: 16px 20px 60px; gap: 22px; }
  .top { gap: 14px; padding: 12px 18px; }
  .top .sub { display: inline; }
  .votes-desktop { display: flex; }
  .votes-mobile { display: none; }
  #scorecard { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; }
  .two-col { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; }
  .sorts { display: flex; }
  .tiles { display: none; }
  .tgrid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
  #peek { display: none; }
  dialog { width: min(580px, 100vw); padding: 22px; border-left: 1px solid rgba(18, 18, 18, 0.12); }
  .glass-panel { max-height: 52vh; }
}
@media (min-width: 1100px) {
  .tgrid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .node, .hub, #stage, #stage path, .glass-panel, #peek, button.tcard { transition: none; }
  #stage:not(.settled) .node, #stage:not(.settled) .hub { filter: none; }
}
