/* আমার বাংলাদেশ — visual system
   Ground: deep bottle green (the flag's field). Marks: flag red for "visited", jute gold for numbers and progress.
   Working surfaces: pale river mist, ruled like a ledger. Type: Tiro Bangla (titles) + Anek Bangla (everything else). */
:root {
  --green-900: #0B2E23;
  --green-800: #0F3B2E;
  --green-700: #1B5A45;
  --green-500: #2E8B6A;
  --green-100: #D9E6DE;
  --mist: #F1F4EF;
  --mist-2: #E3E9E2;
  --paper: #FFFFFF;
  --gold: #E9B949;
  --gold-deep: #A8791A;
  --red: #E4412F;
  --ink: #10261D;
  --muted: #5C6E64;
  --fb: #1877F2;
  --font-display: 'Tiro Bangla', 'Noto Serif Bengali', serif;
  --font-body: 'Anek Bangla', 'Hind Siliguri', system-ui, sans-serif;
  /* aliases used by the share landing page */
  --cream: var(--mist); --cream-2: var(--mist-2); --card: var(--paper); --line: var(--mist-2);
  --green: var(--green-800); --green-ink: var(--green-900); --green-soft: var(--green-100); --ink-2: var(--ink);
  --shadow: 0 18px 40px rgba(11, 46, 35, .18);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font-body); font-size: 16px; line-height: 1.55; background: var(--mist); color: var(--ink); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 1.1em; height: 1.1em; vertical-align: -0.2em; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; max-width: 1180px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 22px; color: var(--green-900); }
.brand small { font-family: var(--font-body); font-weight: 500; color: var(--muted); font-size: 13px; margin-left: 8px; }
.brand-mark { display: inline-block; width: 24px; height: 24px; border-radius: 6px; background: var(--green-800); position: relative; flex: none; }
.brand-mark::after { content: ""; position: absolute; inset: 0; margin: auto; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.topbar-user { display: flex; align-items: center; gap: 10px; }
.avatar-sm { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--mist-2); border: 2px solid var(--green-800); }
.top-name { font-weight: 600; font-size: 14px; }
.icon-btn { background: none; border: 1.5px solid var(--green-100); border-radius: 8px; width: 36px; height: 36px; display: inline-grid; place-items: center; color: var(--muted); }
.icon-btn:hover { color: var(--green-900); border-color: var(--green-700); }

/* ---------- common ---------- */
main { max-width: 1180px; margin: 0 auto; padding: 4px 16px 120px; }
.eyebrow { color: var(--gold-deep); font-weight: 600; font-size: 15px; margin: 0 0 6px; }
.display { font-family: var(--font-display); font-weight: 400; line-height: 1.15; margin: 0; color: var(--green-900); }
h1.display { font-size: clamp(38px, 6.2vw, 62px); }
h2.display { font-size: clamp(28px, 4vw, 38px); }
.lead { font-size: 18px; max-width: 44ch; }
.lead-sm { color: var(--muted); margin: 6px 0 0; }
.hint { color: var(--muted); font-size: 13px; }
.hint code { background: var(--mist-2); padding: 1px 5px; border-radius: 4px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 8px; border: 1.5px solid var(--green-700); background: var(--paper); color: var(--green-900); font-weight: 600; font-size: 15px; min-height: 44px; transition: background .12s, color .12s, border-color .12s; }
.btn:hover { background: var(--green-100); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--gold); border-color: var(--gold); color: var(--green-900); }
.btn-primary:hover { background: #F2C65C; }
.btn-ghost { background: transparent; border-color: var(--green-100); }
.btn-fb { background: var(--fb); border-color: var(--fb); color: #fff; }
.btn-fb:hover { background: #166FE5; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- login: the one bold moment ---------- */
.view-login { margin: 6px -16px 0; padding: 0 16px; }
.login-hero { background: var(--green-800); color: var(--mist); border-radius: 12px; padding: 36px 28px 28px; display: grid; grid-template-columns: 1fr; gap: 24px; align-items: center; position: relative; overflow: hidden; }
.login-hero::before { content: ""; position: absolute; inset: auto -10% -45% auto; width: 60%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgba(233,185,73,.18), transparent 70%); pointer-events: none; }
@media (min-width: 860px) { .login-hero { grid-template-columns: 1.05fr .95fr; gap: 40px; padding: 56px 56px 48px; } }
.login-copy { position: relative; }
.login-copy .eyebrow { color: var(--gold); }
.login-copy h1.display { color: #fff; }
.login-copy .lead { color: rgba(241,244,239,.85); }
.login-map { width: 100%; max-width: 380px; margin: 0 auto; aspect-ratio: 720 / 1000; max-height: 540px; position: relative; }
.login-map svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 20px 30px rgba(0,0,0,.25)); }
.login-map path { fill: var(--green-700); stroke: var(--green-800); stroke-width: 1.4; transition: fill .7s ease; }
.login-map path.lit { fill: var(--red); }
.login-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 26px 0 8px; }
.login-actions .btn-fb { font-size: 17px; padding: 14px 22px; }
.login-note { color: rgba(241,244,239,.7); font-size: 14px; margin: 0; }
.login-points { list-style: none; padding: 0; margin: 28px 0 0; max-width: 640px; }
.login-points li { padding: 12px 0; border-top: 1.5px solid var(--green-100); font-size: 16px; }
.login-points li strong { color: var(--green-900); font-family: var(--font-display); font-size: 20px; font-weight: 400; }
.social-proof { color: var(--gold); font-weight: 600; margin: 8px 0 0; }
.login-hero .hint { color: rgba(241,244,239,.65); }

/* ---------- select ---------- */
.select-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; margin: 14px 0 18px; }
.search-wrap { position: relative; flex: 1 1 280px; max-width: 420px; }
.search-wrap .search-ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-wrap input { width: 100%; padding: 11px 14px 11px 40px; border-radius: 8px; border: 1.5px solid var(--green-100); background: var(--paper); min-height: 44px; }
.search-wrap input:focus { border-color: var(--green-700); outline: none; }
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--green-800); margin-bottom: 18px; overflow-x: auto; }
.tab { background: none; border: none; padding: 10px 16px; font-weight: 600; color: var(--muted); margin-bottom: -2px; border-bottom: 4px solid transparent; white-space: nowrap; min-height: 44px; }
.tab.is-active { color: var(--green-900); border-bottom-color: var(--gold); }
.tab-count { display: inline-block; background: var(--mist-2); color: var(--ink); border-radius: 4px; padding: 0 7px; font-size: 12px; margin-left: 6px; font-variant-numeric: tabular-nums; }
.tab.is-active .tab-count { background: var(--gold); color: var(--green-900); }
.filter-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.filter-chip { border: 1.5px solid var(--green-100); background: transparent; border-radius: 6px; padding: 5px 12px; font-size: 13px; color: var(--ink); }
.filter-chip.is-active { background: var(--green-800); color: #fff; border-color: var(--green-800); }

.group { border-top: 2px solid var(--green-800); margin-bottom: 6px; }
.group-head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; background: none; border: none; text-align: left; min-height: 44px; }
.group-head h3 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 22px; color: var(--green-900); }
.group-head .meta { color: var(--muted); font-size: 13px; font-weight: 500; margin-left: auto; font-variant-numeric: tabular-nums; }
.group-head .chev { transition: transform .2s; color: var(--muted); }
.group.is-open .group-head .chev { transform: rotate(90deg); }
.group-body { display: none; padding: 0 0 16px; }
.group.is-open .group-body { display: block; }
.sub-group { padding: 10px 0 6px; border-top: 1px solid var(--mist-2); }
.sub-group:first-child { border-top: none; padding-top: 0; }
.sub-title { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 15px; font-weight: 700; color: var(--green-900); }
.sub-title .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mist-2); border: 1.5px solid var(--green-100); }
.sub-title .dot.on { background: var(--red); border-color: var(--red); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 6px; border: 1.5px solid var(--green-100); background: var(--paper); font-size: 14px; line-height: 1.2; min-height: 40px; color: var(--ink); transition: background .12s, border-color .12s, color .12s; }
.chip:hover { border-color: var(--green-700); }
.chip .ck { width: 18px; height: 18px; border-radius: 4px; border: 1.5px solid var(--green-100); display: inline-grid; place-items: center; color: transparent; flex: none; }
.chip .ck svg { width: 12px; height: 12px; }
.chip.on { background: var(--green-800); border-color: var(--green-800); color: #fff; }
.chip.on .ck { background: var(--red); border-color: var(--red); color: #fff; }
.chip.auto { background: var(--green-100); border-color: var(--green-100); color: var(--green-900); }
.chip.auto .ck { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.chip .tier { color: var(--gold-deep); }
.chip.on .tier { color: var(--gold); }
.chips-static .chip { cursor: default; }
.chip .chip-sub { color: var(--muted); font-size: 12px; }
.chip.on .chip-sub { color: rgba(255,255,255,.75); }
.upz-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.upz-head select { padding: 10px 12px; border-radius: 8px; border: 1.5px solid var(--green-100); background: var(--paper); min-width: 220px; min-height: 44px; }
.empty { color: var(--muted); padding: 20px 0; }

.sticky-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--green-900); color: var(--mist); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
.sticky-stats { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: rgba(241,244,239,.8); }
.sticky-stats b { color: var(--gold); font-size: 16px; }

/* ---------- report ---------- */
.report-grid { display: grid; grid-template-columns: 1fr; gap: 28px; margin-top: 10px; }
@media (min-width: 980px) { .report-grid { grid-template-columns: 440px 1fr; align-items: start; } .report-card-col { position: sticky; top: 12px; } }
.card-frame { box-shadow: var(--shadow); border-radius: 14px; overflow: hidden; }
.travel-card { aspect-ratio: 4 / 5; padding: 5% 5.5%; display: flex; flex-direction: column; background: var(--green-800); color: var(--mist); position: relative; }
.tc-head { display: flex; align-items: center; gap: 12px; }
.tc-avatar-wrap { position: relative; flex: none; }
.tc-avatar { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; border: 3px solid var(--gold); background: var(--green-700); display: block; }
.tc-avatar-edit { position: absolute; right: -6px; bottom: -6px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--green-800); background: var(--gold); color: var(--green-900); display: grid; place-items: center; padding: 0; }
.tc-avatar-edit svg { width: 14px; height: 14px; }
.tc-titles { flex: 1; min-width: 0; }
.tc-sub { margin: 0; color: var(--gold); font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(24px, 7cqw, 36px); margin: 0; line-height: 1.1; color: #fff; }
.tc-name { margin: 2px 0 0; font-weight: 600; font-size: 14px; color: rgba(241,244,239,.85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-counter { font-family: var(--font-body); font-weight: 800; color: var(--gold); font-size: 34px; line-height: 1; flex: none; }
.tc-counter small { color: rgba(241,244,239,.6); font-size: 18px; font-weight: 700; }
.tc-map { flex: 1; min-height: 0; margin: 10px 0 8px; display: flex; justify-content: center; }
.tc-map svg { height: 100%; width: auto; max-width: 100%; display: block; }
.tc-map path { fill: var(--green-700); stroke: var(--green-800); stroke-width: 1.2; }
.tc-map path.on { fill: var(--red); stroke: #fff; stroke-width: 1.2; }
.tc-map .lbl { font-family: var(--font-body); font-weight: 700; font-size: 22px; fill: #fff; paint-order: stroke; stroke: var(--green-900); stroke-width: 5px; stroke-linejoin: round; text-anchor: middle; }
.tc-map .dot { fill: var(--gold); stroke: var(--green-900); stroke-width: 1.5; }
.tc-progress { height: 8px; border-radius: 999px; background: var(--green-700); overflow: hidden; }
.tc-progress-fill { height: 100%; background: var(--gold); border-radius: 999px; width: 0; transition: width .6s ease; }
.tc-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 8px; font-size: 13px; color: rgba(241,244,239,.7); }
.tc-foot strong { color: #fff; font-size: 15px; }
.tc-brand { border-top: 1px solid rgba(241,244,239,.18); margin-top: 10px; padding-top: 8px; text-align: center; font-size: 12px; font-weight: 600; color: rgba(241,244,239,.85); display: flex; align-items: center; justify-content: center; gap: 6px; }
.tc-brand .brand-mark { width: 16px; height: 16px; border-radius: 4px; background: var(--mist); }
.tc-brand .brand-mark::after { width: 6px; height: 6px; }
.tc-sponsor { text-align: center; font-size: 10px; color: rgba(241,244,239,.55); margin-top: 3px; }
.card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 2px solid var(--green-800); border-bottom: 1px solid var(--mist-2); }
@media (min-width: 640px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: 14px 12px 14px 0; border-right: 1px solid var(--mist-2); }
.stat + .stat { padding-left: 14px; }
.stat:last-child { border-right: none; }
.stat .label { font-size: 13px; color: var(--muted); }
.stat .num { font-weight: 800; font-size: 32px; line-height: 1.1; color: var(--green-900); font-variant-numeric: tabular-nums; }
.stat .num small { font-size: 15px; color: var(--muted); font-weight: 600; }
.stat .bar { height: 4px; border-radius: 999px; background: var(--mist-2); margin-top: 10px; overflow: hidden; }
.stat .bar i { display: block; height: 100%; background: var(--gold); }
.stat.accent .num { color: var(--red); }
.stat.accent .bar i { background: var(--red); }

.panel { border-top: 2px solid var(--green-800); padding: 14px 0 6px; margin-top: 18px; }
.panel-title { margin: 0 0 6px; font-family: var(--font-display); font-weight: 400; font-size: 24px; color: var(--green-900); display: flex; align-items: center; gap: 8px; }
.panel-title .ico { color: var(--gold-deep); width: .85em; height: .85em; }
.panel-sub { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.div-rows { display: grid; gap: 10px; }
.div-row { display: grid; grid-template-columns: 96px 1fr auto; gap: 12px; align-items: center; font-size: 14px; }
.div-row .nm { font-weight: 600; }
.div-row .bar { height: 10px; border-radius: 2px; background: var(--mist-2); overflow: hidden; }
.div-row .bar i { display: block; height: 100%; background: var(--green-700); }
.div-row .bar i.done { background: var(--red); }
.div-row .val { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.div-row .val b { color: var(--green-900); }

.reco-list { display: grid; gap: 0; }
.reco { display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--mist-2); }
.reco:first-child { border-top: none; padding-top: 4px; }
.reco .badge { width: 44px; height: 44px; border-radius: 50%; background: var(--green-800); color: var(--gold); display: grid; place-items: center; font-weight: 800; font-size: 20px; }
.reco h4 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 20px; color: var(--green-900); }
.reco p { margin: 2px 0 8px; color: var(--muted); font-size: 13px; }
.reco .why { display: inline-block; font-family: var(--font-body); background: var(--mist-2); border-radius: 4px; padding: 1px 8px; font-size: 12px; color: var(--ink); margin-left: 8px; vertical-align: middle; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { background: var(--paper); border: 1.5px solid var(--green-100); border-radius: 4px; padding: 3px 10px; font-size: 13px; }
.tag.t1 { border-color: var(--gold); background: #FBF2D6; }

.trip-list { display: grid; gap: 14px; }
.trip { border: 1.5px solid var(--green-100); border-radius: 10px; overflow: hidden; background: var(--paper); }
.trip-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; background: var(--green-800); color: #fff; }
.trip-head h4 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 20px; }
.trip-head .days { background: var(--gold); color: var(--green-900); border-radius: 4px; padding: 2px 10px; font-size: 13px; font-weight: 700; }
.trip-body { padding: 12px 14px; }
.trip-body .route { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.trip-day { display: grid; grid-template-columns: 52px 1fr; gap: 8px; padding: 6px 0; border-top: 1px dashed var(--mist-2); font-size: 14px; }
.trip-day:first-of-type { border-top: none; }
.trip-day .d { font-weight: 700; color: var(--gold-deep); }

.remaining details { border-top: 1px solid var(--mist-2); }
.remaining details:first-child { border-top: none; }
.remaining summary { cursor: pointer; padding: 10px 0; font-weight: 600; display: flex; justify-content: space-between; list-style: none; }
.remaining summary::-webkit-details-marker { display: none; }
.remaining summary .meta { color: var(--muted); font-weight: 500; font-size: 13px; }
.remaining .chips { padding-bottom: 12px; }
.remaining .done-note { color: var(--green-700); font-size: 13px; }

.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--green-900); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 14px; z-index: 50; box-shadow: var(--shadow); max-width: 90vw; }

/* ---------- share ---------- */
.share-box { margin-top: 18px; border-top: 2px solid var(--green-800); padding-top: 14px; }
.btn-big { width: 100%; justify-content: center; font-size: 17px; padding: 14px 18px; }
.share-hint { margin: 8px 0 12px; text-align: center; }
.share-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.share-row .btn { justify-content: center; padding: 10px 8px; font-size: 14px; }
.share-link { display: flex; gap: 8px; margin-top: 10px; }
.share-link input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 8px; border: 1.5px solid var(--green-100); background: var(--paper); font-size: 13px; }
.btn.is-busy { position: relative; color: transparent; }
.btn.is-busy::after { content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(0,0,0,.2); border-top-color: var(--green-900); animation: spin .8s linear infinite; }
.btn-fb.is-busy::after { border-color: rgba(255,255,255,.35); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.panel-compare { background: var(--paper); border: 1.5px solid var(--green-100); border-radius: 10px; padding: 16px; border-top: 1.5px solid var(--green-100); }
.cmp { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; text-align: center; }
.cmp-n { display: block; font-weight: 800; font-size: 44px; line-height: 1; color: var(--red); }
.cmp-n.muted { color: var(--muted); }
.cmp-l { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; }
.cmp-vs { font-weight: 700; color: var(--muted); }
@media (max-width: 420px) { .share-row { grid-template-columns: 1fr 1fr; } .share-row .btn:last-child { grid-column: span 2; } }

/* ---------- credits ---------- */
.site-footer { text-align: center; padding: 18px 16px 110px; font-size: 13px; color: var(--muted); }
.site-footer a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.site-footer a:hover { color: var(--green-900); }

/* ---------- share landing page (server.js) ---------- */
.land .btn-primary { background: var(--gold); color: var(--green-900); }

@media (max-width: 480px) {
  .tc-avatar { width: 52px; height: 52px; }
  .tc-counter { font-size: 28px; }
  .div-row { grid-template-columns: 80px 1fr auto; }
  .login-hero { padding: 28px 20px 24px; }
}

/* ---------- product promo ---------- */
.upsell { margin-top: 22px; border: 2px solid var(--green-800); border-radius: 12px; background: var(--paper); display: grid; grid-template-columns: 1fr; overflow: hidden; }
@media (min-width: 640px) { .upsell { grid-template-columns: 220px 1fr; } }
.upsell-img { display: block; background: var(--green-800); }
.upsell-img img { width: 100%; height: 100%; min-height: 180px; object-fit: cover; display: block; }
.upsell-body { padding: 18px 20px 20px; }
.upsell-kicker { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--gold-deep); }
.upsell-body h3 { margin: 0 0 6px; font-family: var(--font-display); font-weight: 400; font-size: 24px; color: var(--green-900); line-height: 1.2; }
.upsell-body p { margin: 0 0 10px; font-size: 15px; }
.upsell-meta { color: var(--muted); font-size: 14px; }
.upsell-meta strong { color: var(--ink); }
.upsell-body .btn { margin-top: 4px; }
.land-upsell { display: grid; grid-template-columns: 72px 1fr; gap: 14px; align-items: center; text-align: left; margin-top: 28px; padding: 14px; border: 2px solid var(--green-800); border-radius: 12px; background: var(--paper); }
.land-upsell img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; display: block; }
.land-upsell strong { font-family: var(--font-display); font-weight: 400; font-size: 18px; color: var(--green-900); display: block; }
.land-upsell span { font-size: 13px; color: var(--muted); display: block; }
.land-upsell a.go { color: var(--gold-deep); font-weight: 700; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
