/* Unseen List — shared styles */
:root {
  --bg: #f4f6f3;
  --surface: #ffffff;
  --ink: #15201b;
  --muted: #5d6a63;
  --line: #e1e6e2;
  --chip: #eef2ef;
  --brand: #0f6b4f;
  --brand-ink: #ffffff;
  --accent: #f42a41;
  --shadow: 0 1px 2px rgba(20, 32, 27, .06), 0 8px 24px rgba(20, 32, 27, .06);
  --radius: 18px;
  /* map palette (overridden by theme) */
  --m-visited: #4f9d82;
  --m-marker: #f42a41;
  --m-empty: #e6ebe7;
  --m-stroke: #ffffff;
  --m-hover: #a7cec1;
  --m-water: #ffffff;
  --m-label: #15201b;
  --grad-a: #0f6b4f; --grad-b: #1aa37a; --grad-c: #f42a41;
}
:root:not([data-theme="light"]) { color-scheme: light dark; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1412; --surface: #171d1a; --ink: #e9efeb; --muted: #97a39c; --line: #26302b; --chip: #1f2823;
    --brand: #35c594; --brand-ink: #06130e;
    --grad-a: #8fe9c4; --grad-b: #ffffff; --grad-c: #ff8090;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
    --m-empty: #2a3530; --m-stroke: #171d1a; --m-water: #171d1a; --m-label: #e9efeb;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1412; --surface: #171d1a; --ink: #e9efeb; --muted: #97a39c; --line: #26302b; --chip: #1f2823;
  --brand: #35c594; --brand-ink: #06130e;
  --grad-a: #8fe9c4; --grad-b: #ffffff; --grad-c: #ff8090;
  --m-empty: #2a3530; --m-stroke: #171d1a; --m-water: #171d1a; --m-label: #e9efeb;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Noto Sans Bengali", sans-serif;
}
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }

/* top bar */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; }
.logo { text-decoration: none; font-weight: 800; letter-spacing: -.02em; font-size: 20px; display: flex; align-items: center; gap: 8px; }
.logo b { color: var(--brand); }
.logo svg { width: 26px; height: 26px; }
.top-right { display: flex; align-items: center; gap: 12px; }
.nav { display: flex; gap: 6px; }
.seg.lang button { padding: 6px 10px; }
@media (max-width: 480px) { .nav a { padding: 7px 10px; } .top-right { gap: 8px; } }
.nav a { text-decoration: none; font-weight: 600; font-size: 14px; padding: 7px 14px; border-radius: 99px; border: 1px solid transparent; }
.nav a:hover { background: var(--chip); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--bg); }

/* hero */
.hero { text-align: center; padding: 26px 0 18px; }
.hero h1 { font-size: clamp(28px, 4.5vw, 46px); line-height: 1.15; letter-spacing: -.03em; margin: 0 0 8px; font-weight: 800; }
.hero h1 span { background: linear-gradient(90deg, var(--grad-a), var(--grad-b) 55%, var(--grad-c)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { margin: 0 auto; max-width: 620px; color: var(--muted); }

/* app layout */
.app { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; padding-bottom: 48px; }
@media (max-width: 960px) { .app { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

/* stage (map) */
.stage { padding: 18px; }
.stage-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.stage-title { font-size: 20px; font-weight: 800; letter-spacing: -.02em; margin: 0; line-height: 1.2; }
.stage-title small { display: block; font-size: 13px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.count { text-align: right; line-height: 1; }
.count b { font-size: 34px; font-weight: 800; letter-spacing: -.03em; color: var(--brand); }
.count span { color: var(--muted); font-size: 14px; }
.count small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
@media (max-width: 600px) { .stage-top { flex-direction: column; } .count { text-align: left; } }
.bar { height: 6px; border-radius: 99px; background: var(--chip); overflow: hidden; margin: 6px 0 12px; }
.bar i { display: block; height: 100%; width: 0; background: var(--m-visited); border-radius: 99px; transition: width .35s ease; }
.canvas-wrap { position: relative; border-radius: 12px; background: var(--m-water); overflow: hidden; touch-action: none; }
.canvas-wrap svg { display: block; width: 100%; height: auto; max-height: 78vh; margin: 0 auto; user-select: none; }
.canvas-wrap.grabbing { cursor: grabbing; }
.region { fill: var(--m-empty); stroke: var(--m-stroke); stroke-width: .7; stroke-linejoin: round; cursor: pointer; transition: fill .15s; outline: none; }
.region:hover, .region:focus-visible { fill: var(--m-hover); }
.region.on { fill: var(--m-visited); }
.region.on:hover, .region.on:focus-visible { filter: brightness(1.12); }
.labels .lbl { pointer-events: none; }
.labels text { display: none; font-size: 7px; font-weight: 500; fill: var(--muted); text-anchor: middle; paint-order: stroke; stroke: var(--m-water); stroke-width: 2px; stroke-linejoin: round; }
.labels.all text { display: block; }
.labels .pin { display: none; }
.labels .lbl.on text { display: block; font-size: 14px; font-weight: 800; fill: var(--m-label); stroke-width: 3.5px; }
.labels .lbl.on .pin { display: block; animation: drop .3s ease-out; transform-origin: 0 0; }
.labels .pin circle { fill: var(--m-marker); stroke: var(--m-water); stroke-width: 1.8; }
.labels .leader { display: none; stroke: var(--m-marker); stroke-width: 1.2; stroke-linecap: round; fill: none; opacity: .85; }
.labels .lbl.on .leader { display: block; }
@keyframes drop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); font-size: 13px; font-weight: 600; padding: 7px 12px; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--bg); font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 8px; white-space: nowrap; transform: translate(-50%, calc(-100% - 12px)); opacity: 0; transition: opacity .1s; z-index: 2; }
.tip small { display: block; font-weight: 500; opacity: .75; font-size: 12px; }
.tip.show { opacity: 1; }
.zoom { position: absolute; right: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 4px; }
.zoom button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 16px; line-height: 1; }
.stage-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; align-items: center; }
.stage-acts .spacer { flex: 1; }
.btn { border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14px; padding: 8px 14px; border-radius: 10px; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { background: var(--chip); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { filter: brightness(1.08); background: var(--brand); }
.btn svg { width: 16px; height: 16px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--muted); }
.toggle input { accent-color: var(--brand); width: 16px; height: 16px; }
.credit { font-size: 12px; color: var(--muted); margin-top: 12px; }

/* picker */
.picker { padding: 18px; position: sticky; top: 16px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
@media (max-width: 960px) { .picker { position: static; max-height: none; } }
.picker-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.picker-head h2 { font-size: 17px; margin: 0; }
.chip { background: var(--chip); color: var(--muted); font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.search { position: relative; margin-bottom: 10px; }
.search input { width: 100%; padding: 10px 12px 10px 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); outline: none; }
.search input:focus { border-color: var(--brand); }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.pz-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.pz-acts .btn { font-size: 13px; padding: 6px 10px; }
.field { margin-bottom: 10px; }
.field label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .06em; }
.field input { width: 100%; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); outline: none; }
.field input:focus { border-color: var(--brand); }
.themes { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.themes button, .themes .custom { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); padding: 0; background: var(--sw); position: relative; cursor: pointer; display: grid; place-items: center; box-sizing: border-box; }
.themes button[aria-pressed="true"], .themes .custom.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--surface) inset; }
.themes .custom { background: var(--sw, conic-gradient(#f87171, #fbbf24, #4ade80, #60a5fa, #c084fc, #f87171)); }
.themes .custom:not(.on) { background: conic-gradient(#f87171, #fbbf24, #4ade80, #60a5fa, #c084fc, #f87171); }
.themes .custom input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.themes .custom span { font-size: 15px; font-weight: 800; color: #fff; text-shadow: 0 0 3px rgba(0,0,0,.5); pointer-events: none; }
.themes .custom.on span { display: none; }
.groups { overflow: auto; flex: 1; min-height: 0; margin: 0 -6px; padding: 0 6px; scrollbar-width: thin; }
.group { border-top: 1px solid var(--line); }
.group summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 10px 2px; font-weight: 700; font-size: 14px; }
.group summary::-webkit-details-marker { display: none; }
.group summary .chip { font-weight: 600; }
.group summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); margin-right: 10px; transition: transform .15s; }
.group[open] summary::before { transform: rotate(45deg); }
.group summary span { flex: 1; }
.row { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 8px; cursor: pointer; font-size: 14.5px; }
.row:hover { background: var(--chip); }
.row input { accent-color: var(--m-visited); width: 17px; height: 17px; margin: 0; flex: none; }
.row .flag { width: 22px; text-align: center; flex: none; font-size: 16px; }
.row small { color: var(--muted); margin-left: auto; font-size: 13px; }
.hide { display: none !important; }
.empty { color: var(--muted); font-size: 14px; padding: 16px 4px; text-align: center; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 14px; opacity: 0; transition: all .2s; pointer-events: none; z-index: 10; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* landing */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; padding: 10px 0 60px; }
.cards a { text-decoration: none; padding: 24px; display: flex; flex-direction: column; gap: 10px; transition: transform .15s, box-shadow .15s; }
.cards a:hover { transform: translateY(-2px); }
.cards .art { height: 180px; border-radius: 12px; background: var(--chip); display: grid; place-items: center; overflow: hidden; }
.cards .art svg { width: 100%; height: 100%; }
.cards .art .region { cursor: default; }
.cards h2 { margin: 6px 0 0; font-size: 22px; letter-spacing: -.02em; }
.cards p { margin: 0; color: var(--muted); }
.cards .go { color: var(--brand); font-weight: 700; margin-top: auto; }

footer { border-top: 1px solid var(--line); padding: 20px 0 40px; color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
footer a { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
