/* Musafir One: visited maps. Tokens match the home page. */
@font-face { font-family: Hind; font-weight: 400; font-display: swap; src: url(/fonts/hind-latin-400.woff2) format("woff2"); }
@font-face { font-family: Hind; font-weight: 600; font-display: swap; src: url(/fonts/hind-latin-600.woff2) format("woff2"); }
@font-face { font-family: Hind; font-weight: 700; font-display: swap; src: url(/fonts/hind-latin-700.woff2) format("woff2"); }
:root {
  color-scheme: light dark;
  --sand: #faf7f0; --card: #fffdf9; --ink: #302744; --text: #393343; --muted: #655d6a; --line: #e5ded3;
  --sun: #c28b2d; --gold-text: #8e5512; --focus: #8e5512; --dusk: #302744; --on-dusk: #faf6ee; --dusk-muted: #e3dce9; --star: #f5c780;
  --map-empty: #ddd5c8; --cov-1: #e9dcc0; --cov-2: #ecd39b; --cov-3: #ecc777; --danger: #893825;
  --notice-bg: #eee8de; --notice-ink: #55483b;
  --font: Hind, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --gutter: clamp(1rem, 4vw, 2rem);
}
@media (prefers-color-scheme: dark) {
  :root {
    --sand: #191621; --card: #24202d; --ink: #f6f0e6; --text: #e9e1dc; --muted: #c2b7c5; --line: #49404f;
    --sun: #e9bd68; --gold-text: #e9bd68; --focus: #f1c676; --dusk: #211b2c;
    --map-empty: #453d4d; --cov-1: #57482f; --cov-2: #70582c; --cov-3: #8a6a2c; --danger: #ffc4ac;
    --notice-bg: #322b25; --notice-ink: #e6d1ad;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--sand); color: var(--text); font: 400 1.0625rem/1.6 var(--font); overflow-wrap: break-word; }
h1, h2, h3, p, ul, fieldset { margin: 0; }
ul { padding: 0; list-style: none; }
h1, h2, h3 { color: var(--ink); font-weight: 700; line-height: 1.1; letter-spacing: -.015em; font-variant-ligatures: no-common-ligatures; text-wrap: balance; }
a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .22em; }
svg { display: block; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(100% - 2 * var(--gutter), 1140px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip { position: absolute; top: .5rem; left: .5rem; z-index: 10; padding: .7rem 1.1rem; border-radius: 10px; background: var(--card); color: var(--ink); font-weight: 700; transform: translateY(-250%); }
.skip:focus { transform: none; }

.sky-top { --focus: var(--star); background: var(--dusk); color: var(--on-dusk); }
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 2rem; padding-block: 1.1rem 1rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; min-height: 52px; text-decoration: none; }
.brand-mark { width: 50px; height: 47px; flex: none; }
.wordmark { font-size: 1.62rem; font-weight: 700; letter-spacing: .005em; line-height: 1.05; }
.wm-i { position: relative; display: inline-block; }
.wm-i svg { position: absolute; width: .5em; height: .5em; left: 50%; top: -.52em; margin-left: -.2em; overflow: visible; fill: var(--star); }
.wm-site { margin-left: .26em; color: var(--star); }
.back { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding-inline: .75rem; margin-inline: -.75rem; border-radius: 999px; font-weight: 600; text-decoration: none; }
.back:hover { background: #ffffff1f; text-decoration: underline; }

main { padding-block: clamp(1.5rem, 4vw, 2.75rem) clamp(2.5rem, 6vw, 4rem); }
.kicker { color: var(--gold-text); font-weight: 700; font-size: .95rem; letter-spacing: .08em; text-transform: uppercase; }
h1 { margin-top: .35rem; font-size: clamp(1.9rem, 1.4rem + 2.6vw, 3rem); max-width: 18ch; }
.hint { margin-top: .6rem; color: var(--muted); max-width: 40em; }

.vis { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 1.5rem clamp(1.5rem, 4vw, 3rem); align-items: start; margin-top: 1.5rem; }
.vis.stack { grid-template-columns: 1fr; }
.vis.stack .vis-side { grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); align-items: start; }
.vis > *, .vis-side > * { min-width: 0; }
.vis-shared { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .7rem 1rem; border-radius: 14px; background: var(--notice-bg); color: var(--notice-ink); }
.vis-shared[hidden] { display: none; }
.vis-map { position: relative; margin: 0; padding: clamp(.5rem, 2vw, 1.25rem); border: 1px solid var(--line); border-radius: 20px; background: var(--card); }
.vis-svg { width: 100%; height: auto; max-height: 78vh; touch-action: manipulation; }
.vis-scroll { overflow-x: auto; overscroll-behavior-x: contain; border-radius: 12px; }
.wide .vis-svg { min-width: 880px; max-height: none; }
.vis-swipe { display: none; margin-top: .5rem; color: var(--muted); font-size: .9rem; }
@media (max-width: 960px) { .wide ~ .vis-swipe, .wide .vis-swipe { display: block; } }
.vis-bonus { margin-top: .35rem; color: var(--dusk-muted); font-size: .95rem; }
.vis-bonus:empty { display: none; }
.vis-area { cursor: pointer; }
.vis-area path, .vis-dot { fill: var(--map-empty); stroke: var(--card); stroke-width: 1.2; stroke-linejoin: round; transition: fill .15s ease; }
.vis-area[data-cov="1"] path, .vis-area[data-cov="1"] .vis-dot { fill: var(--cov-1); }
.vis-area[data-cov="2"] path, .vis-area[data-cov="2"] .vis-dot { fill: var(--cov-2); }
.vis-area[data-cov="3"] path, .vis-area[data-cov="3"] .vis-dot { fill: var(--cov-3); }
.vis-area.is-on path, .vis-area.is-on .vis-dot { fill: var(--sun); }
.vis-outline { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; pointer-events: none; }
.vis-tip { position: absolute; z-index: 3; margin: 0; padding: .3rem .75rem; border-radius: 10px; background: var(--ink); color: var(--sand); font-weight: 700; line-height: 1.3; white-space: nowrap; pointer-events: none; transform: translate(-50%, calc(-100% - 14px)); box-shadow: 0 6px 18px -8px #000a; }
.vis-tip.below { transform: translate(-50%, 22px); }
.vis-tip[hidden] { display: none; }
.vis-key { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; margin-top: .75rem; color: var(--muted); font-size: .9rem; }
.vis-key span { display: inline-flex; align-items: center; gap: .4rem; }
.vis-key i { width: 1rem; height: 1rem; border-radius: 4px; background: var(--map-empty); }
.vis-key .k-on { background: var(--sun); }
.vis-key .k-part { background: linear-gradient(90deg, var(--cov-1), var(--cov-3)); width: 2rem; }
.vis-note { margin-top: .6rem; color: var(--muted); font-size: .9rem; }

.vis-side { display: grid; gap: 1.25rem; }
.vis-score { padding: 1.25rem 1.4rem 1.4rem; border-radius: 20px; background: var(--dusk); color: var(--on-dusk); }
.vis-big { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 .6rem; font-weight: 700; line-height: 1; }
.vis-n { font-size: clamp(3.4rem, 2.5rem + 5vw, 5rem); color: var(--star); letter-spacing: -.03em; }
.vis-of { font-size: 1.35rem; }
.vis-pct { margin-top: .5rem; color: var(--dusk-muted); font-weight: 600; }
.vis-bar { height: 12px; margin-top: .5rem; border-radius: 999px; background: #ffffff26; overflow: hidden; }
.vis-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--star); transition: width .3s ease; }

.vis-cov-wrap h2, .vis-actions h2 { font-size: 1.05rem; letter-spacing: 0; }
.vis-cov { display: grid; gap: .1rem; margin-top: .5rem; }
.vis-cov li { display: grid; grid-template-columns: 8.5rem 1fr 3.2rem; align-items: center; gap: .75rem; min-height: 30px; }
.vis-cov-name { font-weight: 600; color: var(--ink); line-height: 1.2; }
.vis-cov-bar { height: 10px; border-radius: 999px; background: var(--map-empty); overflow: hidden; }
.vis-cov-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--sun); transition: width .3s ease; }
.vis-cov b { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }

.vis-buttons { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .6rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .5rem 1.15rem; border: 2px solid var(--ink); border-radius: 999px; background: none; color: var(--ink); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--ink); color: var(--sand); }
.btn.primary { background: var(--ink); color: var(--sand); }
.btn.primary:hover { background: none; color: var(--ink); }
.btn.quiet { border-color: transparent; color: var(--danger); text-decoration: underline; }
.btn.quiet:hover { background: none; color: var(--danger); border-color: var(--danger); }
.vis-status { min-height: 1.6em; margin-top: .4rem; color: var(--muted); font-size: .95rem; }
.vis-private { color: var(--muted); font-size: .92rem; }

.fold { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.fold + .fold, .vis + .fold { margin-top: 1rem; }
.fold summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 56px; padding: .5rem 1.25rem; cursor: pointer; list-style: none; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary h2 { font-size: 1.15rem; letter-spacing: 0; }
.fold summary::after { content: ""; width: .6rem; height: .6rem; flex: none; border-right: 2.5px solid var(--gold-text); border-bottom: 2.5px solid var(--gold-text); transform: rotate(45deg); transition: transform .2s ease; }
.fold[open] summary::after { transform: rotate(-135deg); }
.fold-body { padding: 0 1.25rem 1.25rem; }
.fold-body li { margin-top: .4rem; color: var(--muted); }
.vis-group { margin-top: 1rem; padding: 0; border: 0; min-width: 0; }
.vis-group legend { padding: 0; color: var(--ink); font-weight: 700; }
.vis-count { color: var(--muted); font-weight: 400; }
.vis-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 0 1rem; margin-top: .25rem; }
.vis-check { display: flex; align-items: center; gap: .6rem; min-height: 44px; cursor: pointer; }
.vis-check input { width: 1.35rem; height: 1.35rem; flex: none; margin: 0; accent-color: var(--gold-text); }

.others { margin-top: clamp(2rem, 5vw, 3rem); }
.others h2 { font-size: 1.4rem; }
.others ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .75rem; margin-top: .9rem; }
.others a { display: grid; align-content: center; gap: .1rem; min-height: 72px; padding: .7rem 1.1rem; border: 1px solid var(--line); border-radius: 16px; background: var(--card); text-decoration: none; }
.others a:hover { border-color: var(--gold-text); }
.others a:hover b { text-decoration: underline; }
.others b { color: var(--ink); font-size: 1.1rem; }
.others small { color: var(--muted); font-size: .92rem; }

footer { --focus: var(--star); background: var(--dusk); color: var(--dusk-muted); font-size: .93rem; line-height: 1.55; }
footer .wrap { display: grid; gap: .7rem; padding-block: 1.75rem; }
footer a { color: var(--on-dusk); }
.site-notice { padding: .6rem var(--gutter); background: var(--notice-bg); color: var(--notice-ink); font-size: .875rem; line-height: 1.45; text-align: center; }

@media (max-width: 860px) {
  .vis { grid-template-columns: 1fr; }
  .vis-side { order: -1; }
  .vis-score { position: sticky; top: .5rem; z-index: 2; padding: .7rem 1.1rem .9rem; }
  .vis-n { font-size: 2.6rem; }
  .vis-pct { display: none; }
  .vis-cov-wrap, .vis-actions { order: 3; }
}
@media (max-width: 860px) { .vis-side { display: contents; } .vis-score { order: -1; } }
@media (forced-colors: active) {
  .vis-area path, .vis-dot { fill: Canvas; stroke: CanvasText; }
  .vis-area.is-on path, .vis-area.is-on .vis-dot { fill: Highlight; }
  .btn, .vis-score, .fold, .others a, .vis-tip { border: 2px solid CanvasText; }
  .vis-outline { stroke: Highlight; }
  .vis-bar span, .vis-cov-bar span { background: Highlight; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print { .sky-top, footer { background: none; color: #000; } .vis-actions, .others, .back { display: none; } }
