:root {
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  --bg: #f7f5f0;
  --panel: #fff;
  --ink: #1b1b1b;
  --muted: #6f6b63;
  --line: #e6e1d6;
  --chip: #f1ece1;
  --chip-on: #0f6b4b;
  --chip-on-ink: #fff;
  --accent: #0f6b4b;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121513;
    --panel: #1b201d;
    --ink: #eeeee8;
    --muted: #9a9c94;
    --line: #2c332f;
    --chip: #262d29;
    --chip-on: #2fbf7f;
    --chip-on-ink: #0b1410;
    --accent: #2fbf7f;
  }
}
:root[data-theme="dark"] {
  --bg: #121513;
  --panel: #1b201d;
  --ink: #eeeee8;
  --muted: #9a9c94;
  --line: #2c332f;
  --chip: #262d29;
  --chip-on: #2fbf7f;
  --chip-on-ink: #0b1410;
  --accent: #2fbf7f;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-padding-top: env(safe-area-inset-top, 0px);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    "Hind Siliguri", "Noto Sans Bengali", "Kalpurush", system-ui, sans-serif;
  line-height: 1.4;
}
.app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 820px) {
  .app {
    grid-template-columns: 1fr;
  }
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}
.list-panel {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 32px);
  position: sticky;
  top: 16px;
}
@media (max-width: 820px) {
  .list-panel {
    position: static;
    max-height: 60vh;
    order: 2;
  }
}
.head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.head h2 {
  font-size: 15px;
  margin: 0;
  font-weight: 700;
}
.badge {
  background: var(--chip);
  color: var(--accent);
  font-weight: 700;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 99px;
}
.search {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--chip);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}
.search:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.tools {
  margin: 8px 0 6px;
  font-size: 12px;
  display: flex;
  gap: 12px;
}
.link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}
.link:hover {
  color: var(--ink);
}
.scroll {
  overflow: auto;
  flex: 1;
  padding-right: 4px;
  min-height: 0;
}
.div {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.div:last-child {
  border: 0;
}
.div-h {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.div-h b {
  font-size: 13px;
}
.div-h span.c {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  margin-left: 4px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  border: 0;
  background: var(--chip);
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
  padding: 6px 11px;
  border-radius: 99px;
  cursor: pointer;
  transition: background 0.12s;
}
.chip:hover {
  filter: brightness(0.96);
}
.chip[aria-pressed="true"] {
  background: var(--chip-on);
  color: var(--chip-on-ink);
}
.chip.hot {
  outline: 2px solid var(--accent);
}
.right .panel {
  margin-bottom: 12px;
}
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.themes {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
}
.sw {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
}
.sw[aria-pressed="true"] {
  border-color: var(--ink);
}
.namein {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--chip);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  min-width: 180px;
}
label.chk {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  cursor: pointer;
}
.mapwrap {
  position: relative;
}
svg#card {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
}
svg#card path.cell {
  cursor: pointer;
  transition: opacity 0.1s;
}
svg#card path.cell:hover {
  opacity: 0.82;
}
svg#card path.cell.hot {
  opacity: 0.7;
}
#tip {
  position: fixed;
  pointer-events: none;
  background: #111;
  color: #fff;
  font-size: 12px;
  padding: 4px 9px;
  border-radius: 7px;
  display: none;
  z-index: 5;
  white-space: nowrap;
}
.btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.btn {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
}
.btn.primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.note {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 0;
}
.note a {
  color: var(--accent);
}
.note code {
  font-size: 11px;
}
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 10;
}
.modal.on {
  display: flex;
}
.modal .box {
  background: var(--panel);
  border-radius: 16px;
  padding: 14px;
  max-width: 560px;
  max-height: 92vh;
  overflow: auto;
  text-align: center;
}
.modal img {
  max-width: 100%;
  border-radius: 10px;
  display: block;
  margin: 0 auto 10px;
}
