/* Spaceghost Scrobbles. Tokens copied from melodica-web's web/app.css (v0.4.0 look:
   ink/gold, two fixed-size body glows, shadowed rail, cover wash). System fonts only. */
:root {
  color-scheme: dark;
  --ink: #0b0e14; --ink-2: #111622;
  --glass: rgba(24, 31, 46, 0.62); --solid: #151b28;
  --line: rgba(216, 178, 106, 0.22); --line-2: #2a3448; --control-line: #616c80;
  --text: #ece6d6; --muted: #a3acbc;
  --gold: #d8b26a; --gold-2: #f0d9a4; --aether: #6fd6d0; --warn: #e0a860;
  --on-accent: #0b0e14;
  --glow-a: rgba(111, 214, 208, 0.13); --glow-g: rgba(216, 178, 106, 0.10);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --cover-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); --bar-shadow: 0 -12px 30px rgba(0, 0, 0, 0.3);
  --err: #f0998f;
  --wash-opacity: 0.55; --quiet: 0.78;
  --bar-h: 0px;
  --display: "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", "Iowan Old Style", Georgia, serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "JetBrains Mono", "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;
  --radius: 14px;
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --ink: #f5f0e4; --ink-2: #efe7d6; --glass: rgba(255, 252, 244, 0.78); --solid: #fffbf2;
    --line: rgba(134, 97, 31, 0.32); --line-2: #d8ccb6; --control-line: #948466;
    --text: #1c212b; --muted: #535c6b; --gold: #7d5a1a; --gold-2: #5e430f; --aether: #0b6f6a; --warn: #8a500a;
    --on-accent: #ffffff; --glow-a: rgba(12, 122, 116, 0.10); --glow-g: rgba(134, 97, 31, 0.10);
    --shadow: 0 14px 36px rgba(60, 45, 15, 0.16);
    --cover-shadow: 0 14px 36px rgba(60, 45, 15, 0.2); --bar-shadow: 0 -8px 24px rgba(60, 45, 15, 0.12);
    --err: #a3261a;
    --wash-opacity: 0.3; --quiet: 1; /* the light --muted has no contrast to spare */
  }
}


*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--ink); color: var(--text); -webkit-text-size-adjust: 100%; height: 100%; }
body {
  margin: 0; min-height: 100%; display: flex; flex-direction: column;
  font: 15px/1.5 var(--body);
  background:
    radial-gradient(900px 480px at 85% -140px, var(--glow-a), transparent 70%),
    radial-gradient(800px 420px at 8% -160px, var(--glow-g), transparent 70%),
    linear-gradient(var(--ink), var(--ink-2));
}
a { color: var(--aether); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: 0.015em; margin: 0; }
h1 { color: var(--gold-2); font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.15; }
h2 { color: var(--gold-2); font-size: 1.3rem; }
p { margin: 0; }
.muted { color: var(--muted); }
.fine { color: var(--muted); font-size: 0.8rem; }
.center { text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; left: 12px; top: 12px; width: auto; height: auto; clip: auto; z-index: 10; background: var(--solid); padding: 0.4rem 0.8rem; border-radius: 8px; }
.eyebrow { font: 600 0.7rem/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); display: flex; align-items: center; gap: 0.4rem; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: var(--solid); border: 1px solid var(--control-line); border-radius: 10px; padding: 0.4rem 0.8rem; min-height: 40px; }
button:hover { border-color: var(--gold); }
button.link { background: none; border: 0; padding: 0 0.3rem; color: var(--aether); }
button.primary, .pill.primary { background: var(--gold); color: var(--on-accent); border-color: var(--gold-2); font-weight: 600; }
input[type=text] { background: var(--solid); border: 1px solid var(--control-line); border-radius: 10px; padding: 0.5rem 0.75rem; min-height: 40px; width: 100%; }
input:focus-visible, button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--aether); outline-offset: 2px; }
.pill { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 40px; padding: 0.35rem 0.95rem; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); color: var(--text); }
.pill:hover { border-color: var(--gold); text-decoration: none; }
.pill[aria-current] { background: var(--gold); color: var(--on-accent); border-color: var(--gold-2); }

/* header / footer */
.top { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 0.55rem max(16px, env(safe-area-inset-right)) 0.55rem max(16px, env(safe-area-inset-left)); border-bottom: 1px solid var(--line); }
.brand-link { display: inline-flex; align-items: baseline; gap: 0.35rem; text-decoration: none !important; }
.brand { font: 1.5rem/1.2 var(--display); color: var(--gold-2); }
.brand-tag { font: 600 0.6rem var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.tabs { display: flex; gap: 0.25rem; flex: 1; flex-wrap: wrap; }
.tabs a { padding: 0.35rem 0.8rem; border-radius: 999px; color: var(--muted); border: 1px solid transparent; }
.tabs a:hover { color: var(--text); border-color: var(--line); text-decoration: none; }
.tabs a[aria-current] { color: var(--gold-2); border-color: var(--line); background: var(--glass); }
.top-right { display: flex; align-items: center; gap: 0.5rem; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.3rem 1.5rem; padding: 0.6rem max(16px, env(safe-area-inset-right)) max(0.7rem, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); border-top: 1px solid var(--line); color: var(--muted); font: 0.74rem/1.5 var(--mono); }

.app { flex: 1; padding: 16px max(16px, env(safe-area-inset-right)) 24px max(16px, env(safe-area-inset-left)); width: 100%; max-width: 1240px; margin: 0 auto; }
.card { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.2rem 1.3rem; min-width: 0; }
.card.narrow { max-width: 38rem; margin: 2rem auto; display: grid; gap: 0.8rem; }
.hero { max-width: 44rem; margin: 3rem auto; display: grid; gap: 1rem; padding: 2rem; }
.lede { font-size: 1.08rem; color: var(--text); }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* dashboard layout: rail + stage + shelf */
.layout { display: grid; grid-template-columns: minmax(15rem, 18rem) minmax(0, 1fr); grid-template-areas: "rail stage" "rail shelf"; gap: 0 1.5rem; align-items: start; }
.rail { grid-area: rail; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; display: flex; flex-direction: column; gap: 0.9rem; background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.rail-head h2 { font-size: 1.35rem; }
.count { font: 0.72rem var(--mono); color: var(--muted); margin-left: 0.3rem; vertical-align: 0.15em; }
.who { display: flex; gap: 0.75rem; align-items: center; }
.avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--solid); border: 1px solid var(--line-2); color: var(--gold); overflow: hidden; flex: none; font-family: var(--display); }
.avatar img, img.avatar { width: 100%; height: 100%; object-fit: cover; }
.avatar.big { width: 48px; height: 48px; font-size: 1.4rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4rem; margin: 0; }
.stats div { background: var(--solid); border: 1px solid var(--line-2); border-radius: 10px; padding: 0.45rem 0.55rem; }
.stats dt { font: 600 0.62rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.stats dd { margin: 0; font: 1.3rem/1.2 var(--display); color: var(--gold-2); font-variant-numeric: tabular-nums; }
.mini { border-top: 1px solid var(--line-2); padding-top: 0.8rem; display: grid; gap: 0.35rem; }
.mini b { color: var(--gold-2); font: 1.1rem var(--display); }
.settings { border-top: 1px solid var(--line-2); padding-top: 0.8rem; display: grid; gap: 0.5rem; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; min-height: 40px; cursor: pointer; }
.toggle input { appearance: none; -webkit-appearance: none; width: 42px; height: 24px; border-radius: 999px; background: var(--control-line); position: relative; cursor: pointer; flex: none; transition: background 0.2s ease; margin: 0; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text); transition: transform 0.2s ease; }
.toggle input:checked { background: var(--gold); }
.toggle input:checked::after { transform: translateX(18px); background: var(--on-accent); }
.toggle input:focus-visible { outline: 2px solid var(--aether); outline-offset: 2px; }
.namerow { display: flex; gap: 0.4rem; }

.stage { grid-area: stage; position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center; gap: 0.9rem; padding: 1.6rem 1.2rem 1.2rem; }
.wash { position: absolute; left: 50%; top: 42%; width: min(140%, 60rem); height: 150%; transform: translate(-50%, -50%); object-fit: cover; z-index: -1; pointer-events: none; filter: blur(64px) saturate(1.3); opacity: var(--wash-opacity); -webkit-mask-image: radial-gradient(ellipse 50% 36% at 50% 42%, #000 0%, rgba(0,0,0,.6) 35%, transparent 72%); mask-image: radial-gradient(ellipse 50% 36% at 50% 42%, #000 0%, rgba(0,0,0,.6) 35%, transparent 72%); transition: opacity 1.2s ease; }
.stage.idle .wash, .wash[src="data:,"] { opacity: 0; }
.art { margin: 0; width: min(100%, 30vh, 300px); aspect-ratio: 1; }
.cover { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 12px; background: var(--solid); box-shadow: var(--cover-shadow), 0 0 0 1px var(--line); transition: opacity 0.5s ease; }
.cover[src="data:,"] { background: radial-gradient(circle at 30% 30%, var(--line-2), var(--solid)); }
.stage.idle .cover { opacity: 0.6; }
.meta { text-align: center; max-width: 42rem; width: 100%; }
.meta .eyebrow { justify-content: center; }
.title { overflow-wrap: anywhere; }
.artist { font-size: 1.1rem; margin-top: 0.3rem; }
.album { color: var(--muted); }
.artist:empty, .album:empty { display: none; }

.shelf { grid-area: shelf; background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.1rem; min-width: 0; }
.shelf-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.4rem; }
.history { list-style: none; margin: 0; padding: 0; }
.hist { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 0.7rem; align-items: center; padding: 0.45rem 0.2rem; border-bottom: 1px solid var(--line-2); }
.hist:last-child { border-bottom: 0; }
.hist-cover { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--ink-2); box-shadow: 0 0 0 1px var(--line-2); }
.hist-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.hist-title { font-family: var(--display); font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-artist { font-size: 0.82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-when { font: 0.72rem var(--mono); color: var(--muted); text-align: right; white-space: nowrap; }
.hist-when small { display: block; color: var(--gold); opacity: 0.85; }
.hist.fresh { animation: rise 0.6s ease both; }
.sess { list-style: none; display: flex; align-items: center; gap: 0.6rem; margin: 0.9rem 0 0.2rem; font: 600 0.66rem var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.sess::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.sentinel { height: 1px; }
.loading { text-align: center; padding: 0.8rem; font: 0.8rem var(--mono); color: var(--muted); }

/* live */
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--aether); box-shadow: 0 0 0 0 var(--aether); animation: pulse 1.8s ease-out infinite; display: inline-block; }
.badge { display: inline-flex; align-items: center; gap: 0.35rem; font: 600 0.62rem var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--aether); border: 1px solid color-mix(in srgb, var(--aether) 45%, transparent); border-radius: 999px; padding: 0.1rem 0.5rem; background: color-mix(in srgb, var(--aether) 10%, transparent); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--aether) 70%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes flash { 0% { box-shadow: 0 0 0 0 var(--gold-2); } 100% { box-shadow: 0 0 0 10px transparent; } }

/* crew */
.crew-layout { grid-template-areas: "rail main"; }
.crew-main { grid-area: main; display: grid; gap: 1.2rem; min-width: 0; }
.crew-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.25rem; }
.crew-list li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 0.6rem; align-items: center; padding: 0.4rem 0.5rem; border-radius: 10px; }
.crew-list li:hover { background: var(--solid); }
.crew-list li.you { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 55%, transparent); background: color-mix(in srgb, var(--gold) 8%, var(--solid)); }
.crew-list .avatar { width: 34px; height: 34px; }
.crew-list .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crew-list .nm small { display: block; font: 0.7rem var(--mono); color: var(--muted); }
.crew-list .held { font: 600 0.72rem var(--mono); color: var(--gold); text-align: right; white-space: nowrap; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: middle; }
.live-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 0.9rem; }
.live-strip:empty::before { content: "Nobody in the crew is listening right now."; color: var(--muted); font-size: 0.9rem; }
.live-card { position: relative; overflow: hidden; isolation: isolate; display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 0.8rem; align-items: center; padding: 0.8rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--glass); box-shadow: var(--shadow); animation: rise 0.5s ease both; }
.live-card .bg { position: absolute; inset: -20%; z-index: -1; width: 140%; height: 140%; object-fit: cover; filter: blur(40px) saturate(1.3); opacity: calc(var(--wash-opacity) * 0.7); }
.live-card .cover { width: 72px; height: 72px; }
.live-card .who-line { display: flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; color: var(--muted); }
.live-card .who-line img { width: 20px; height: 20px; border-radius: 50%; }
.live-card .t { font: 1.02rem/1.25 var(--display); color: var(--gold-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-card .a { font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-card progress { width: 100%; height: 3px; appearance: none; border: 0; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.live-card progress::-webkit-progress-bar { background: var(--line-2); }
.live-card progress::-webkit-progress-value { background: var(--aether); }
.live-card progress::-moz-progress-bar { background: var(--aether); }
.map-head { display: flex; flex-wrap: wrap; align-items: end; gap: 0.8rem; justify-content: space-between; margin-bottom: 0.8rem; }
.map-head > div:first-child { margin-right: auto; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--solid); }
.seg button { border: 0; background: none; border-radius: 999px; min-height: 36px; padding: 0.2rem 0.85rem; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--gold); color: var(--on-accent); }
.treemap { position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 260px; border-radius: 12px; overflow: hidden; background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.tile { position: absolute; padding: 6px 8px; overflow: hidden; border: 1px solid rgba(0,0,0,.35); border-radius: 6px; color: #10131a; transition: left .6s ease, top .6s ease, width .6s ease, height .6s ease, background-color .6s ease; display: flex; flex-direction: column; justify-content: space-between; }
.tile b { font: 600 0.82rem/1.15 var(--body); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tile small { font: 0.66rem var(--mono); opacity: 0.8; display: flex; align-items: center; gap: 4px; }
.tile small img { width: 14px; height: 14px; border-radius: 50%; }
.tile.contested { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.22) 0 6px, transparent 6px 12px); }
.tile.contested::after { content: "contested"; position: absolute; top: 4px; right: 6px; font: 700 0.55rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; background: rgba(0,0,0,.55); color: #fff; padding: 1px 5px; border-radius: 999px; }
.tile.captured { animation: flash 1.2s ease-out 2; }
.tile.small b, .tile.small small { display: none; }
.legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin-top: 0.7rem; font-size: 0.82rem; color: var(--muted); }
.legend span { display: inline-flex; gap: 0.35rem; align-items: center; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 1.2rem; }
.standings, .captures, .board { list-style: none; margin: 0.4rem 0 0; padding: 0; counter-reset: n; }
.standings li, .board li { counter-increment: n; display: grid; grid-template-columns: 1.8rem minmax(0, 1fr) auto; gap: 0.5rem; align-items: center; padding: 0.45rem 0; border-top: 1px solid var(--line-2); }
.standings li:first-child, .board li:first-child, .captures li:first-child { border-top: 0; }
.standings li::before, .board li::before { content: counter(n, decimal-leading-zero); color: var(--gold); font: 600 0.75rem var(--mono); }
.standings .p { display: flex; gap: 0.5rem; align-items: center; min-width: 0; }
.standings em, .board em { font: 600 0.8rem var(--mono); color: var(--aether); font-style: normal; text-align: right; }
.board span { min-width: 0; overflow-wrap: anywhere; }
.board small { display: block; color: var(--muted); }
.board b { font-weight: 400; font-family: var(--display); }
.captures li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 0.6rem; align-items: start; padding: 0.5rem 0; border-top: 1px solid var(--line-2); font-size: 0.9rem; }
.captures li.new { animation: rise 0.6s ease both; }
.captures img { width: 26px; height: 26px; border-radius: 50%; }
.captures b { color: var(--gold-2); font-weight: 600; }
.captures time { display: block; font: 0.7rem var(--mono); color: var(--muted); }
.board-head { display: grid; gap: 0.6rem; margin: 0.5rem 0 1rem; }
.pills { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.boards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 1.2rem; margin-bottom: 1rem; }
.listen audio { width: 100%; }

@media (max-width: 860px) {
  .layout, .crew-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "stage" "rail" "shelf"; gap: 1rem; }
  .crew-layout { grid-template-areas: "main" "rail"; }
  .rail { position: static; max-height: none; overflow: visible; }
  .wash { display: none; }
  .treemap { aspect-ratio: 3 / 4; }
}
@media (max-width: 420px) {
  .app { padding-left: 12px; padding-right: 12px; }
  .tabs a { padding: 0.3rem 0.6rem; }
  .hist { grid-template-columns: 40px minmax(0, 1fr); }
  .hist-when { grid-column: 2; text-align: left; }
  .hist-when small { display: inline; margin-left: 0.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------------------------------------------------------------- conquest */
.conquest { display: flex; flex-direction: column; gap: 0.9rem; margin-bottom: 1rem; }
.conquest h3 { color: var(--gold-2); font-size: 1rem; margin: 0 0 0.5rem; }
.reserve { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.reserve .chip { display: inline-flex; gap: 0.3rem; align-items: baseline; padding: 0.25rem 0.7rem; border: 1px solid var(--line); border-radius: 999px; font: 0.78rem var(--mono); color: var(--muted); }
.reserve .chip b { color: var(--gold-2); font-size: 1rem; }
.rules summary { cursor: pointer; color: var(--gold); font: 600 0.78rem var(--mono); }
.rules ul { margin: 0.4rem 0 0; padding-left: 1.1rem; color: var(--muted); font-size: 0.86rem; }
.regions { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 0.8rem; }
.region { border: 1px solid var(--line-2); border-radius: calc(var(--radius) - 4px); padding: 0.7rem 0.8rem; background: color-mix(in srgb, var(--glass) 70%, transparent); min-width: 0; }
.region.held { border-color: var(--gold); box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold) 35%, transparent) inset; }
.region header { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.4rem; }
.region header h3 { margin: 0; }
.crown { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--gold-2); font: 600 0.74rem var(--mono); }
.crown img, .provinces img { width: 22px; height: 22px; border-radius: 50%; }
.provinces { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.provinces li { display: grid; grid-template-columns: minmax(0, 1fr) 64px auto auto; align-items: center; gap: 0.5rem; padding: 0.3rem 0.4rem; border-radius: 8px; }
.provinces li.mine { background: color-mix(in srgb, var(--gold) 10%, transparent); }
.provinces li.live { outline: 1px dashed var(--aether); }
.provinces .pv { min-width: 0; display: flex; flex-direction: column; }
.provinces .pv b { font-size: 0.88rem; text-transform: capitalize; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.provinces .pv small { color: var(--muted); font-size: 0.72rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.provinces .hold { display: inline-flex; align-items: center; gap: 0.25rem; font: 600 0.8rem var(--mono); }
.provinces .hold em { font-style: normal; color: var(--gold-2); }
.provinces .badge { grid-column: 1 / -1; justify-self: start; }
.armybar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--line-2); }
.armybar i { display: block; height: 100%; }
.moves { display: inline-flex; gap: 0.25rem; }
button.mini { min-height: 32px; min-width: 32px; padding: 0 0.45rem; border-radius: 8px; font-size: 0.95rem; }
button.mini.attack { border-color: var(--warn); color: var(--warn); }
.trophies { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.trophies li { display: flex; align-items: center; gap: 0.45rem; font-size: 0.86rem; }
.trophies img { width: 22px; height: 22px; border-radius: 50%; }
.game-dialog { border: 1px solid var(--line); border-radius: var(--radius); background: var(--solid, #151b28); color: var(--text); padding: 1.1rem 1.2rem; max-width: min(420px, calc(100vw - 32px)); }
.game-dialog::backdrop { background: rgba(0, 0, 0, 0.55); }
.game-dialog label { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; margin: 0.5rem 0; }
.game-dialog input, .game-dialog select { min-height: 40px; max-width: 60%; }
@media (max-width: 560px) {
  .regions { grid-template-columns: 1fr; }
  .provinces li { grid-template-columns: minmax(0, 1fr) 48px auto auto; }
}

/* ---------------------------------------------------------------- fantasy map */
.fmap { position: relative; border: 5px double var(--gold) !important; padding: 0; border-radius: calc(var(--radius) - 2px); overflow: hidden; border: 1px solid var(--line); box-shadow: inset 0 0 0 1px rgba(0,0,0,.25), var(--shadow); background: #d9cba5; }
.fmap-svg { display: block; width: 100%; aspect-ratio: 16 / 10; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.fmap-svg:active { cursor: grabbing; }
.fmap-svg text { font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif; paint-order: stroke; }
.fm-land-label { font-style: italic; letter-spacing: .2em; stroke: rgba(243,231,201,.8); stroke-width: 5px; font-weight: 700; transition: opacity .25s; }
.fm-land-crown { stroke: rgba(243,231,201,.8); stroke-width: 4px; letter-spacing: .06em; transition: opacity .25s; }
.fm-prov-label { font-style: italic; stroke: rgba(243,231,201,.85); stroke-width: 3.5px; opacity: 0; transition: opacity .25s; }
.fm-town-label { stroke: rgba(243,231,201,.9); stroke-width: 2.6px; opacity: 0; transition: opacity .25s; }
.fm-town-label.cap { font-weight: 700; opacity: 1; }
.fmap-svg[data-zoom="2"] .fm-prov-label, .fmap-svg[data-zoom="3"] .fm-prov-label { opacity: 1; }
.fmap-svg[data-zoom="2"] .fm-town-label, .fmap-svg[data-zoom="3"] .fm-town-label { opacity: 1; }
.fmap-svg[data-zoom="2"] .fm-land-label { opacity: .5; }
.fmap-svg[data-zoom="3"] .fm-land-label, .fmap-svg[data-zoom="3"] .fm-land-crown { opacity: .15; }
.fm-scale-t { font-size: 11px; font-style: italic; }
.fm-cart-title { font-size: 27px; font-style: italic; font-weight: 600; letter-spacing: .04em; }
.fm-cart-sub { font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; }
.fm-compass-n { font-size: 16px; font-weight: 700; }
.fm-troops { font: 700 8.5px/1 ui-monospace, "SF Mono", Menlo, monospace !important; fill: #fff; stroke: rgba(0,0,0,.6); stroke-width: 2px; }
.fm-prov { cursor: pointer; outline: none; }
.fm-prov:hover path, .fm-prov:focus-visible path { filter: brightness(1.08) saturate(1.15); }
.fm-prov:focus-visible path { stroke: #fff; stroke-width: 2.5; }
.fm-pulse { fill: none; stroke: #6fd6d0; stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: fm-pulse 1.6s ease-out infinite; }
@keyframes fm-pulse { from { opacity: .95; transform: scale(.4); } to { opacity: 0; transform: scale(2.2); } }
@media (prefers-reduced-motion: reduce) { .fm-pulse { animation: none; opacity: .8; } }
.fmap-ctl { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 6px; }
.fmap-ctl button { min-width: 40px; min-height: 40px; padding: 0; font-size: 1.2rem; background: rgba(239,226,194,.92); color: #4a3517; border-color: #8a6a3a; }
.fmap-crumb { position: absolute; left: 10px; bottom: 10px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; max-width: calc(100% - 70px); }
.fmap-crumb button { min-height: 32px; padding: 0.15rem 0.6rem; border-radius: 999px; font: italic 600 0.82rem Georgia, serif; background: rgba(239,226,194,.92); color: #4a3517; border-color: #8a6a3a; }
.fmap-crumb button[aria-current] { background: #4a3517; color: #efe2c2; }
.fmap-crumb .sep { color: #4a3517; text-shadow: 0 0 3px #efe2c2; }
.fmap-panel { margin-top: 0.8rem; }
.fmap-panel header { display: flex; justify-content: space-between; align-items: start; gap: 0.6rem; }
.fmap-panel h3 { text-transform: capitalize; }
.fmap-panel h4 { margin: 0.8rem 0 0.3rem; font-size: 0.85rem; color: var(--gold); }
.fmap-panel .towns { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.3rem 0.8rem; }
.fmap-panel .towns li { display: flex; flex-direction: column; font-size: 0.86rem; }
.fmap-panel .towns li.live b::after { content: " ●"; color: var(--aether); }
.fmap-panel .towns small { color: var(--muted); }
.ledger summary { cursor: pointer; color: var(--gold); font: 600 0.8rem var(--mono); margin: 0.2rem 0 0.6rem; }
@media (prefers-color-scheme: dark) {
  .fmap { background: #141a28; }
  .fm-land-label, .fm-land-crown, .fm-prov-label, .fm-town-label { stroke: rgba(22,28,42,.85); }
  .fmap-ctl button, .fmap-crumb button { background: rgba(27,33,48,.92); color: #d8c69a; border-color: #6b5a3a; }
  .fmap-crumb button[aria-current] { background: #d8c69a; color: #1b2130; }
  .fmap-crumb .sep { color: #d8c69a; text-shadow: 0 0 3px #1b2130; }
}
@media (max-width: 560px) {
  .fmap-svg { aspect-ratio: 4 / 5; }
}

/* ---------------------------------------------------------------- /melodica/* pages */
.top.sui { gap: 0.6rem 1rem; }
.who-name { font: 0.78rem var(--mono); }
.sui-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem); gap: 1.2rem; align-items: start; }
.sui-cols > :only-child { grid-column: 1 / -1; }
.sui-toast { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 20; max-width: calc(100vw - 32px); background: var(--solid); color: var(--text); border: 1px solid var(--warn); border-radius: 10px; padding: 0.6rem 0.9rem; box-shadow: var(--shadow); }
[data-mount="nowplaying"] { margin-top: 1.2rem; }
.sui-cols [data-mount="nowplaying"] { margin-top: 0; }
@media (max-width: 860px) {
  .sui-cols { grid-template-columns: minmax(0, 1fr); }
}

/* FFXIV view: the Eorzea map (web/eorzea.imba). Schematic, no game art. */
.eorzea-stage { border: 1px solid var(--line); border-radius: var(--radius); background: var(--ink-2); padding: 0.5rem; }
.eorzea-svg { display: block; width: 100%; max-height: 34rem; aspect-ratio: 1 / 1; margin: 0 auto; }
.eorzea-svg .zone rect { fill: var(--muted); fill-opacity: 0.18; stroke: var(--line-2); stroke-width: 0.3; }
.eorzea-svg .zone.city rect { stroke: var(--gold); }
.eorzea-svg .zone.housing rect { stroke: var(--aether); }
.eorzea-svg .zone.hot rect { stroke-width: 0.5; }
.eorzea-svg .zone rect.cell { fill: var(--gold); stroke: none; }
.eorzea-list { list-style: none; margin: 0.8rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr)); gap: 0.4rem 1rem; }
.eorzea-list li { display: flex; justify-content: space-between; gap: 0.6rem; }
.eorzea-list em { font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; }
ffxiv-eorzea, scrobble-leaderboard, scrobble-listens, scrobble-now-playing { display: block; min-width: 0; }
.view-stack { display: grid; gap: 1.2rem; }

/* Narrow screens: the nav gets its own row so no link is cut off by the account controls. */
@media (max-width: 520px) { .top > .sui-nav { flex: 1 1 100%; } }
