/* fcastro-camping — liquid glass, minimal, motion with reduced-motion fallbacks. */
:root {
  color-scheme: dark;
  --bg: #0a0c11;
  --ink: #f2f4f7;
  --ink-2: rgba(242, 244, 247, 0.66);
  --ink-3: rgba(242, 244, 247, 0.42);
  --glass: rgba(255, 255, 255, 0.055);
  --glass-2: rgba(255, 255, 255, 0.09);
  --glass-hi: rgba(255, 255, 255, 0.16);
  --edge: rgba(255, 255, 255, 0.11);
  --edge-hi: rgba(255, 255, 255, 0.22);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  --accent: #ffa36b;
  --accent-2: #ff7a59;
  --accent-ink: #1a0d06;
  --ok: #7fe0a8;
  --ok-bg: rgba(127, 224, 168, 0.13);
  --warn: #ffcf7a;
  --warn-bg: rgba(255, 207, 122, 0.13);
  --bad: #ff8f8f;
  --sky: #8fb5ff;
  --blob1: #3a3fb3;
  --blob2: #0f7d72;
  --blob3: #c25a2c;
  --r-lg: 26px;
  --r-md: 18px;
  --r-sm: 12px;
  --spring: cubic-bezier(.3, 1.5, .5, 1);
  --spring-soft: cubic-bezier(.3, 1.3, .4, 1);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, sans-serif;
  --panel-w: 420px;
}
/* theme.js sets data-theme="light"|"dark" (the saved choice, or the system's when "System"). */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #eef0f5;
  --ink: #10131a;
  --ink-2: rgba(16, 19, 26, 0.66);
  --ink-3: rgba(16, 19, 26, 0.45);
  --glass: rgba(255, 255, 255, 0.55);
  --glass-2: rgba(255, 255, 255, 0.75);
  --glass-hi: rgba(255, 255, 255, 0.95);
  --edge: rgba(16, 19, 26, 0.08);
  --edge-hi: rgba(255, 255, 255, 0.9);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 18px 40px -22px rgba(30, 40, 80, 0.35);
  --accent: #f06a2c;
  --accent-2: #e2552a;
  --accent-ink: #ffffff;
  --ok: #13895a;
  --ok-bg: rgba(19, 137, 90, 0.1);
  --warn: #a7620a;
  --warn-bg: rgba(214, 140, 30, 0.13);
  --bad: #c23b3b;
  --sky: #3a6fd8;
  --blob1: #a9b4ff;
  --blob2: #8fe0cf;
  --blob3: #ffc6a3;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; border-radius: 10px; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- backdrop (grain gradient) */
.backdrop { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55; will-change: transform; }
.b1 { width: 60vw; height: 60vw; left: -18vw; top: -22vw; background: var(--blob1); animation: drift1 28s ease-in-out infinite alternate; }
.b2 { width: 50vw; height: 50vw; right: -14vw; top: 18vh; background: var(--blob2); animation: drift2 34s ease-in-out infinite alternate; }
.b3 { width: 46vw; height: 46vw; left: 28vw; bottom: -30vw; background: var(--blob3); opacity: 0.4; animation: drift3 30s ease-in-out infinite alternate; }
.grain {
  position: absolute; inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.22; mix-blend-mode: overlay;
}
@keyframes drift1 { to { transform: translate(12vw, 10vh) scale(1.1); } }
@keyframes drift2 { to { transform: translate(-10vw, -8vh) scale(0.92); } }
@keyframes drift3 { to { transform: translate(-8vw, -12vh) scale(1.08); } }

/* ---------------------------------------------------------------- glass */
.glass {
  background: linear-gradient(160deg, var(--glass-2), var(--glass) 55%);
  border: 1px solid var(--edge);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  backdrop-filter: blur(28px) saturate(170%);
  position: relative;
}
.glass::before { /* specular rim, liquid-glass style */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  padding: 1px;
  background: linear-gradient(150deg, var(--edge-hi), transparent 35%, transparent 70%, rgba(255, 255, 255, 0.08));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}

/* ---------------------------------------------------------------- icons */
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.ic-xs { width: 12px; height: 12px; margin-left: 3px; vertical-align: -1px; opacity: 0.6; }
.ic.draw path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 0.9s var(--ease) forwards; }
.ic.draw path:nth-child(2) { animation-delay: 0.12s; }
.ic.draw path:nth-child(3) { animation-delay: 0.24s; }
.ic.draw path:nth-child(n+4) { animation-delay: 0.32s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.float { animation: float 5s ease-in-out 1s infinite; }
@keyframes float { 50% { transform: translateY(-2px) rotate(-2deg); } }
.spin-hover { transition: transform 0.6s var(--spring-soft); }
.iconbtn:hover .spin-hover { transform: rotate(90deg); }
.ic-ok { color: var(--ok); }
.ic-mute { color: var(--ink-3); }

/* ---------------------------------------------------------------- app layout */
.app {
  position: relative; z-index: 1; height: 100%;
  display: grid; grid-template-columns: 236px minmax(0, 1fr) 0px;
  gap: 16px; padding: 16px;
  transition: grid-template-columns 0.5s var(--spring-soft);
}
body.panel-open .app { grid-template-columns: 236px minmax(0, 1fr) var(--panel-w); }

/* ---------------------------------------------------------------- rail */
.rail { border-radius: var(--r-lg); padding: 18px 12px 14px; display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 8px 6px; }
.brand-mark { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; color: var(--accent-ink); background: linear-gradient(140deg, var(--accent), var(--accent-2)); box-shadow: 0 8px 20px -8px var(--accent-2), inset 0 1px 0 rgba(255, 255, 255, 0.45); }
.brand-mark .ic { width: 22px; height: 22px; stroke-width: 2; }
.brand-name { font: 600 15px/1.1 var(--font-display); }
.brand-year { font-size: 12px; color: var(--ink-3); letter-spacing: 0.04em; }
.months { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; min-height: 0; scrollbar-width: none; }
.mrow {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border: 0; background: none; cursor: pointer; text-align: left;
  padding: 9px 12px; border-radius: 12px; color: var(--ink-2);
  transition: background 0.2s, color 0.2s, transform 0.25s var(--spring);
}
.mrow:hover { background: var(--glass); color: var(--ink); }
.mrow:active { transform: scale(0.97); }
.mrow.is-on { background: var(--glass-hi); color: var(--ink); box-shadow: inset 0 1px 0 var(--edge-hi), 0 6px 16px -10px rgba(0, 0, 0, 0.6); }
.mrow-name { font-weight: 500; }
.mrow-short { display: none; }
.mrow-glyph { display: grid; place-items: center; width: 18px; height: 18px; }
.mrow-glyph .ic { width: 16px; height: 16px; stroke-width: 2.2; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.dot-ok { background: var(--ok); opacity: 0.55; }
.dot-warn { background: var(--warn); }
.dot-stale { box-shadow: 0 0 0 3px var(--warn-bg); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px transparent; } }

.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.progress {
  display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 12px;
  border: 1px solid var(--edge); background: var(--glass); border-radius: 18px; padding: 8px 12px 8px 8px;
  cursor: pointer; text-align: left; position: relative;
  transition: transform 0.3s var(--spring), background 0.2s;
}
.progress:hover { background: var(--glass-2); transform: translateY(-1px); }
.ring { grid-row: 1; grid-column: 1; width: 52px; height: 52px; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--edge); stroke-width: 4; }
.ring-fill { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset 0.9s var(--ease), stroke 0.3s; }
.ring-fill.is-done { stroke: var(--ok); }
.progress-num { grid-row: 1; grid-column: 1; display: grid; place-items: center; font: 600 15px var(--font-display); font-variant-numeric: tabular-nums; }
.progress-num small { font-size: 10px; color: var(--ink-3); font-weight: 500; }
.progress-num .ic { color: var(--ok); stroke-width: 2.4; }
.progress-label { font-weight: 600; font-size: 13.5px; }
.rail-tools { display: flex; gap: 6px; padding: 0 2px; }

.iconbtn {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--edge); background: var(--glass); color: var(--ink-2);
  transition: transform 0.3s var(--spring), background 0.2s, color 0.2s;
}
.iconbtn:hover { background: var(--glass-2); color: var(--ink); transform: translateY(-1px); }
.iconbtn:active { transform: scale(0.92); }

/* ---------------------------------------------------------------- stage */
.stage { min-width: 0; overflow-y: auto; padding: 18px 8px 120px; scrollbar-width: thin; outline: none; }
.stage > * { max-width: 980px; margin-left: auto; margin-right: auto; }
.loading { color: var(--ink-3); padding: 40px; }
.enter [data-i] { animation: up 0.55s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes up { from { opacity: 0; transform: translateY(14px); } }

.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.kicker { font-size: 12.5px; color: var(--ink-3); letter-spacing: 0.02em; }
.hero h1 { font: 700 clamp(40px, 6vw, 64px)/1 var(--font-display); letter-spacing: -0.035em; margin-top: 4px; }
.weekends { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.wk {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2);
  padding: 6px 11px; border-radius: 999px; border: 1px solid var(--edge); background: var(--glass);
  font-variant-numeric: tabular-nums;
}
.wk.is-on { color: var(--ink); background: var(--glass-hi); border-color: var(--edge-hi); }
.wk b { display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; font-size: 10.5px; background: var(--accent); color: var(--accent-ink); }
.wk-dot { width: 6px; height: 6px; border-radius: 50%; }
.wk-dot.kids-0 { background: var(--ok); } .wk-dot.kids-1 { background: var(--warn); } .wk-dot.kids-2 { background: var(--bad); }

/* ---------------------------------------------------------------- pick slots */
.picks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.slot { container-type: inline-size; border-radius: var(--r-lg); min-height: 280px; transition: transform 0.35s var(--spring), box-shadow 0.3s, border-color 0.3s; }
.slot.over { transform: scale(1.015); border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255, 163, 107, 0.18), var(--shadow); }
.slot.over::after {
  content: ""; position: absolute; inset: 8px; border-radius: calc(var(--r-lg) - 8px); pointer-events: none;
  border: 1.5px dashed var(--accent); animation: march 0.8s linear infinite;
}
@keyframes march { to { border-color: var(--accent-2); } }
.is-dragging .slot:not(.over) { border-style: dashed; border-color: var(--edge-hi); }
.slot.pop { animation: pop 0.55s var(--spring); }
@keyframes pop { 0% { transform: scale(0.94); } 100% { transform: none; } }
.slot-empty { display: grid; place-items: center; color: var(--ink-3); }
.slot-empty p { display: flex; gap: 8px; align-items: center; }

.card { height: 100%; padding: 20px 20px 18px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; border-radius: inherit; outline-offset: -3px; }
.card-top { display: flex; align-items: center; gap: 10px; }
.slot-label { font-size: 12px; font-weight: 600; color: var(--ink-3); letter-spacing: 0.04em; text-transform: uppercase; }
.grip { margin-left: auto; color: var(--ink-3); cursor: grab; opacity: 0; transition: opacity 0.2s; }
.grip .ic { stroke-width: 3; }
.slot:hover .grip { opacity: 1; }
.card h3 { font: 650 22px/1.2 var(--font-display); letter-spacing: -0.015em; margin-top: 4px; text-wrap: balance; }
.meta { font-size: 13px; color: var(--ink-3); }
.lift { transition: transform 0.35s var(--spring), box-shadow 0.3s, background 0.2s; }
.lift:hover { transform: translateY(-3px); }
.slot.lift:hover { box-shadow: 0 1px 0 var(--edge-hi) inset, 0 28px 60px -24px rgba(0, 0, 0, 0.7); }
.dragging { opacity: 0.45; transform: scale(0.97) !important; }

.tile { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 18px -10px rgba(0, 0, 0, 0.6); color: #fff; }
.tile .ic { width: 22px; height: 22px; stroke-width: 1.9; }
.tile-lg { width: 54px; height: 54px; border-radius: 17px; }
.tile-lg .ic { width: 26px; height: 26px; }
.tile-tent { background: linear-gradient(140deg, #3fbf8c, #1e8a6a); }
.tile-sun { background: linear-gradient(140deg, #ffb35c, #f0743a); }
.tile-moon { background: linear-gradient(140deg, #7f8cff, #4a4fc9); }
.tile-gear { background: linear-gradient(140deg, #8a93a6, #565e70); }
.tile-cal { background: linear-gradient(140deg, #ff9a7a, #e65a6d); }
.tile-info { background: linear-gradient(140deg, #6fb0ff, #3a72e0); }

.chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 4px 10px 4px 8px; border-radius: 999px; }
.chip .ic { width: 15px; height: 15px; stroke-width: 2.3; }
.chip-ok { color: var(--ok); background: var(--ok-bg); }
.chip-warn { color: var(--warn); background: var(--warn-bg); }

.stats { list-style: none; padding: 0; margin: 6px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats li { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 10px 10px; border-radius: 14px; background: var(--glass); border: 1px solid var(--edge); }
.stats .ic { grid-row: 1 / 3; color: var(--ink-2); }
.stats b { font: 650 16px/1.15 var(--font-display); font-variant-numeric: tabular-nums; }
.stats span { font-size: 11.5px; color: var(--ink-3); line-height: 1.2; }
@container (max-width: 420px) {
  .stats { gap: 6px; }
  .stats li { grid-template-columns: 1fr; row-gap: 4px; padding: 10px; }
  .stats .ic { grid-row: auto; width: 16px; height: 16px; }
  .card h3 { font-size: 20px; }
}
.est { font-size: 10px; font-weight: 600; letter-spacing: 0.04em; color: var(--warn); opacity: 0.85; white-space: nowrap; }

.card-foot { margin-top: auto; padding-top: 6px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.when, .kids { display: inline-flex; align-items: center; gap: 6px; }
.when { font-weight: 600; }
.when .ic, .kids .ic { width: 16px; height: 16px; color: var(--ink-3); }
.kids { color: var(--ink-2); font-size: 12.5px; }
.kids-0 .ic { color: var(--ok); } .kids-1 .ic { color: var(--warn); } .kids-2 .ic { color: var(--bad); }

.reset { margin-top: 10px; text-align: center; }
.link { border: 0; background: none; cursor: pointer; color: var(--ink-2); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 8px; }
.link:hover { color: var(--ink); }
.link .ic { width: 15px; height: 15px; }
.link.danger { color: var(--bad); margin-top: 8px; }

/* ---------------------------------------------------------------- decision bar */
.decide {
  margin-top: 16px; border-radius: 20px; padding: 10px 10px 10px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.decide-state { display: inline-flex; align-items: center; gap: 9px; color: var(--ink-2); font-size: 14px; }
.decide-state .ic { color: var(--accent); }
.decide.is-done .decide-state { color: var(--ink); font-weight: 600; }
.decide.is-done .decide-state .ic { color: var(--ok); stroke-width: 2.3; }
.decide-btns { display: flex; gap: 8px; }
.burst { animation: burst 0.9s var(--ease); }
@keyframes burst { 0% { box-shadow: 0 0 0 0 rgba(127, 224, 168, 0.45), var(--shadow); } 100% { box-shadow: 0 0 0 18px rgba(127, 224, 168, 0), var(--shadow); } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; text-decoration: none;
  height: 40px; padding: 0 16px; border-radius: 13px; font-weight: 600; font-size: 14px;
  border: 1px solid var(--edge); background: var(--glass-2); color: var(--ink);
  transition: transform 0.3s var(--spring), background 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.btn .ic { width: 17px; height: 17px; stroke-width: 2.1; }
.btn:hover { background: var(--glass-hi); transform: translateY(-1px); }
.btn:active { transform: scale(0.96); }
.btn-primary { color: var(--accent-ink); border-color: transparent; background: linear-gradient(140deg, var(--accent), var(--accent-2)); box-shadow: 0 10px 24px -12px var(--accent-2), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.btn-primary:hover { background: linear-gradient(140deg, var(--accent), var(--accent-2)); filter: brightness(1.06); }
.btn-ghost { background: transparent; }
.btn-wide { width: 100%; height: 46px; }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; transform: none; filter: none; }

/* ---------------------------------------------------------------- backups */
.backups { margin-top: 34px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2 { font: 650 19px var(--font-display); letter-spacing: -0.01em; }
.hint { font-size: 12.5px; color: var(--ink-3); display: inline-flex; gap: 4px; align-items: center; }
.hint .ic { width: 14px; height: 14px; stroke-width: 3; }
.mini-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.mini { border-radius: var(--r-md); display: flex; align-items: center; cursor: grab; }
.mini:active { cursor: grabbing; }
.mini-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; border: 0; background: none; text-align: left; cursor: pointer; padding: 12px 6px 12px 12px; border-radius: inherit; }
.mini-rank { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex: none; font-size: 12px; font-weight: 700; color: var(--ink-2); background: var(--glass-2); border: 1px solid var(--edge); }
.mini-body { min-width: 0; display: flex; flex-direction: column; }
.mini-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-meta { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.warn { color: var(--warn); }
.mini-actions { display: flex; gap: 4px; padding-right: 10px; opacity: 0.35; transition: opacity 0.2s; }
.mini:hover .mini-actions, .mini:focus-within .mini-actions { opacity: 1; }
.pickbtn { width: 28px; height: 28px; border-radius: 9px; border: 1px solid var(--edge); background: var(--glass); cursor: pointer; font-size: 12px; font-weight: 700; transition: transform 0.3s var(--spring), background 0.2s; }
.pickbtn:hover { background: var(--accent); color: var(--accent-ink); border-color: transparent; transform: scale(1.08); }
.empty { color: var(--ink-3); padding: 12px; }

/* ---------------------------------------------------------------- side panel */
.panel {
  border-radius: var(--r-lg); overflow-y: auto; overscroll-behavior: contain; min-width: 0;
  opacity: 0; transform: translateX(30px) scale(0.98); pointer-events: none; visibility: hidden;
  transition: opacity 0.3s var(--ease), transform 0.5s var(--spring-soft), visibility 0s 0.3s;
  outline: none; scrollbar-width: thin;
}
body.panel-open .panel { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity 0.3s var(--ease), transform 0.5s var(--spring-soft), visibility 0s; }
.panel.swap [data-i] { animation: up 0.45s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); }
.panel-head { position: sticky; top: 0; z-index: 2; display: flex; gap: 14px; align-items: flex-start; padding: 20px 18px 16px 20px; background: color-mix(in srgb, var(--bg) 62%, transparent); -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%); border-radius: var(--r-lg) var(--r-lg) 0 0; border-bottom: 1px solid var(--edge); }
.panel-titles { flex: 1; min-width: 0; }
.panel-titles h2 { font: 650 21px/1.2 var(--font-display); letter-spacing: -0.015em; margin: 2px 0 3px; outline: none; }
.close { flex: none; }
.panel-body { padding: 4px 20px 28px; display: flex; flex-direction: column; gap: 14px; }
.panel-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ph { font: 600 12px var(--font); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); margin-top: 8px; }
.fine { font-size: 12px; color: var(--ink-3); line-height: 1.5; }
.muted { color: var(--ink-3); }
.src { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--edge-hi); white-space: nowrap; }
.src:hover { color: var(--ink); }

.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.checks li { display: grid; grid-template-columns: 34px 1fr 22px; gap: 12px; align-items: start; padding: 11px 12px; border-radius: 16px; background: var(--glass); border: 1px solid var(--edge); }
.check-ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--glass-2); color: var(--ink-2); }
.pass .check-ic { color: var(--ok); background: var(--ok-bg); }
.fail .check-ic { color: var(--warn); background: var(--warn-bg); }
.check-label { font-size: 12px; color: var(--ink-3); }
.check-value { font-weight: 600; font-size: 14px; line-height: 1.35; }
.check-mark { padding-top: 7px; }
.check-mark .ic { width: 18px; height: 18px; stroke-width: 2.4; }
.pass .check-mark { color: var(--ok); } .fail .check-mark { color: var(--warn); }
.checks details { margin-top: 4px; }
.checks summary { cursor: pointer; font-size: 12px; color: var(--ink-3); list-style: none; display: inline-block; }
.checks summary::-webkit-details-marker { display: none; }
.checks summary::after { content: " ›"; display: inline-block; transition: transform 0.2s; }
.checks details[open] summary::after { transform: rotate(90deg); }
.checks details p { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; line-height: 1.5; }

/* chart: bars grow on open */
.chart { margin: 4px 0 0; padding: 14px 14px 10px; border-radius: 16px; background: var(--glass); border: 1px solid var(--edge); }
.bars { position: relative; height: 110px; display: grid; grid-template-columns: repeat(12, 1fr); gap: 5px; align-items: end; }
.bar { position: relative; height: calc(var(--h) * 1%); min-height: 4px; border-radius: 6px 6px 3px 3px; background: var(--glass-hi); transform-origin: bottom; animation: grow 0.7s var(--spring-soft) both; animation-delay: calc(var(--i) * 30ms + 120ms); }
.bar.ok { background: linear-gradient(var(--ok), color-mix(in srgb, var(--ok) 40%, transparent)); opacity: 0.75; }
.bar.is-on { opacity: 1; box-shadow: 0 0 0 2px var(--ink); }
.bar i { position: absolute; top: -17px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 10px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.bar.is-on i { color: var(--ink); font-weight: 700; }
@keyframes grow { from { transform: scaleY(0); } }
.threshold { position: absolute; left: 0; right: 0; bottom: calc(var(--p) * 1%); border-top: 1px dashed var(--accent); z-index: 1; pointer-events: none; }
.threshold em { position: absolute; right: 0; top: -16px; font: 600 10px var(--font); font-style: normal; color: var(--accent); }
.bar-labels { display: grid; grid-template-columns: repeat(12, 1fr); gap: 5px; margin-top: 6px; text-align: center; font-size: 10.5px; color: var(--ink-3); }
.bar-labels .is-on { color: var(--ink); font-weight: 700; }
.chart figcaption { font-size: 11.5px; color: var(--ink-3); margin-top: 8px; }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.tl-head { font: 600 14px var(--font-display); margin-bottom: 8px; }
.tl-head span { color: var(--ink-3); font-weight: 500; margin-left: 4px; }
.tl-day > ol { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 1.5px dashed var(--edge-hi); display: flex; flex-direction: column; gap: 12px; }
.tl-item, .sources li { display: grid; grid-template-columns: 32px 1fr; gap: 10px; align-items: start; }
.tl-day .tl-item { margin-left: -33px; }
.tl-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--glass-2); border: 1px solid var(--edge); color: var(--ink-2); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.tl-ic .ic { width: 16px; height: 16px; }
.tl-title { font-weight: 600; font-size: 14px; line-height: 1.35; }
.tl-text { font-size: 13px; color: var(--ink-2); line-height: 1.5; margin-top: 2px; }
.tl-src { font-size: 11.5px; margin-top: 3px; }
.sources { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }

.unverified { border-radius: 16px; background: var(--glass); border: 1px solid var(--edge); padding: 12px 14px; }
.unverified summary { cursor: pointer; display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: 14px; }
.unverified summary .ic { color: var(--warn); }
.unverified ul { margin: 10px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--ink-2); }
.unverified b { color: var(--ink); }

/* review list */
.review { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.review-row { width: 100%; display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; text-align: left; cursor: pointer; border: 0; background: none; padding: 9px 10px; border-radius: 12px; transition: background 0.2s; }
.review-row:hover { background: var(--glass-2); }
.review-m { font-weight: 700; font-size: 13px; color: var(--ink-2); }
.review-picks { min-width: 0; display: flex; flex-direction: column; font-size: 13px; }
.review-picks span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--glass-2); color: var(--ink-3); white-space: nowrap; }
.pill-approved { background: var(--ok-bg); color: var(--ok); }
.pill-stale { background: var(--warn-bg); color: var(--warn); }
.stack { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }

/* settings form */
.form { gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--ink-2); }
.field > span { font-weight: 600; }
select, input[type="number"] { height: 42px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--edge); background: var(--glass-2); color: var(--ink); font: inherit; font-size: 14px; }
.coords { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; }
.coords .fine { grid-column: 1 / -1; }
.coords label { display: flex; flex-direction: column; gap: 6px; }
input[type="range"] { accent-color: var(--accent); width: 100%; }
output { color: var(--ink); font-variant-numeric: tabular-nums; }
.switch { display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: center; cursor: pointer; font-size: 14px; font-weight: 600; position: relative; }
.switch small { display: block; font-weight: 400; font-size: 12px; color: var(--ink-3); }
.switch input { position: absolute; opacity: 0; width: 48px; height: 28px; margin: 0; cursor: pointer; }
.knob { width: 48px; height: 28px; border-radius: 999px; background: var(--glass-hi); border: 1px solid var(--edge); position: relative; transition: background 0.25s; }
.knob::after { content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); transition: transform 0.45s var(--spring); }
.switch input:checked + .knob { background: var(--ok); }
.switch input:checked + .knob::after { transform: translateX(20px); }
.switch input:focus-visible + .knob { outline: 2px solid var(--sky); outline-offset: 3px; }

/* ---------------------------------------------------------------- toast */
.toast {
  position: fixed; z-index: 5; left: 50%; bottom: 22px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 18px; border-radius: 16px; font-size: 14px; font-weight: 500;
  transition: transform 0.5s var(--spring), opacity 0.25s;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  :root { --panel-w: 380px; }
  body.panel-open .picks { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .app, body.panel-open .app { grid-template-columns: 88px minmax(0, 1fr); }
  .brand > div, .progress-label { display: none; }
  .brand { justify-content: center; padding: 2px 0 6px; }
  .mrow { justify-content: center; flex-direction: column; gap: 2px; padding: 8px 4px; }
  .mrow-long { display: none; }
  .mrow-short { display: inline; }
  .progress { grid-template-columns: 52px; justify-content: center; padding: 6px; }
  .rail-tools { justify-content: center; flex-wrap: wrap; }
  /* panel floats over the stage as a sheet on the right */
  .panel { position: fixed; top: 16px; right: 16px; bottom: 16px; width: min(var(--panel-w), calc(100vw - 32px)); z-index: 4; }
}
@media (max-width: 720px) {
  body { overflow: auto; }
  .app, body.panel-open .app { display: block; height: auto; padding: 10px 10px 0; }
  .rail { position: sticky; top: 10px; z-index: 3; flex-direction: row; align-items: center; padding: 8px; border-radius: 20px; gap: 8px; }
  .brand { display: none; }
  .months { flex-direction: row; overflow-x: auto; flex: 1; gap: 2px; scroll-snap-type: x proximity; }
  .mrow { flex: none; scroll-snap-align: center; padding: 7px 9px; }
  .rail-foot { margin: 0; flex-direction: row; gap: 6px; }
  .progress { width: 44px; height: 44px; padding: 0; border-radius: 14px; grid-template-columns: 44px; }
  .ring { width: 40px; height: 40px; margin: auto; }
  .progress-num { font-size: 12px; }
  .rail-tools { flex-wrap: nowrap; }
  .rail-tools .iconbtn { width: 44px; height: 44px; }
  .rail-tools [data-kind="sources"] { display: none; }
  .stage { overflow: visible; padding: 22px 6px 110px; }
  .picks { grid-template-columns: 1fr; }
  .slot { min-height: 0; }
  .grip { opacity: 1; }
  .mini-actions { opacity: 1; }
  .decide { position: sticky; bottom: 12px; z-index: 2; }
  .decide-btns { width: 100%; }
  .decide-btns .btn { flex: 1; }
  /* side panel becomes a bottom sheet */
  .panel { position: fixed; left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 86vh; border-radius: 26px 26px 0 0; transform: translateY(40px); }
  body.panel-open .panel { transform: none; }
  .panel-head { border-radius: 26px 26px 0 0; }
  .toast { bottom: 90px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .blob { animation: none; }
  .ic.draw path { stroke-dashoffset: 0; }
}

/* ---------------------------------------------------------------- trips: add slot, remove */
.slot-add {
  grid-column: 1 / -1; min-height: 84px; display: flex; align-items: center; justify-content: center; gap: 14px;
  border-radius: var(--r-lg); border: 1.5px dashed var(--edge-hi); background: color-mix(in srgb, var(--glass) 60%, transparent);
  color: var(--ink-2); text-align: left;
}
.slot-add.is-half { grid-column: auto; min-height: 280px; flex-direction: column; text-align: center; }
.slot-add p { display: flex; flex-direction: column; }
.slot-add b { color: var(--ink); font-weight: 600; }
.slot-add span:not(.add-ic) { font-size: 12.5px; color: var(--ink-3); }
.add-ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--glass-2); border: 1px solid var(--edge); color: var(--accent); transition: transform 0.4s var(--spring); }
.is-dragging .slot-add { border-color: var(--accent); }
.is-dragging .slot-add .add-ic { transform: scale(1.15) rotate(90deg); }
.slot-add.over { background: rgba(255, 163, 107, 0.08); }
.full { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; color: var(--ink-3); padding: 8px; }
.full .ic { width: 15px; height: 15px; }
.iconbtn-sm { width: 30px; height: 30px; border-radius: 10px; }
.iconbtn-sm .ic { width: 15px; height: 15px; stroke-width: 2.2; }
.remove:hover { color: var(--bad); }
.grip + .remove { margin-left: 4px; }

/* ---------------------------------------------------------------- don't miss + activities */
.dm { margin-top: 2px; padding: 10px 12px; border-radius: 14px; background: var(--glass); border: 1px solid var(--edge); }
.dm-h { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.dm-h .ic { width: 14px; height: 14px; stroke-width: 2.2; }
.dm ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.dm li { display: grid; grid-template-columns: 20px 1fr auto; gap: 8px; align-items: center; font-size: 13.5px; }
.dm-ic { color: var(--ink-2); display: grid; place-items: center; }
.dm-ic .ic { width: 16px; height: 16px; }
.dm-name { font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-mi { font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dm-empty { font-size: 12.5px; color: var(--ink-3); }
.acts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.acts li { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-2); padding: 4px 9px 4px 7px; border-radius: 999px; background: var(--glass); border: 1px solid var(--edge); transition: transform 0.3s var(--spring), background 0.2s; }
.acts li:hover { transform: translateY(-2px); background: var(--glass-2); }
.acts li:hover .ic { animation: wiggle 0.5s var(--spring); }
@keyframes wiggle { 30% { transform: rotate(-12deg) scale(1.1); } 60% { transform: rotate(8deg); } }
.acts .ic { width: 14px; height: 14px; color: var(--sky); }
.mini-hl { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.mini-hl .ic { width: 12px; height: 12px; color: var(--accent); flex: none; }
.mini-acts { display: flex; gap: 6px; margin-top: 4px; color: var(--sky); }
.mini-acts .ic { width: 13px; height: 13px; }
.pickbtn-add { color: var(--accent); display: grid; place-items: center; }
.pickbtn-add .ic { width: 14px; height: 14px; stroke-width: 2.4; }
.highlights { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.highlights li { display: grid; grid-template-columns: 32px 1fr; gap: 10px; align-items: start; }
.highlights .muted { font-weight: 400; font-size: 12px; }

/* backup actions float in on hover so names get the full width */
.mini { position: relative; }
.mini-actions {
  position: absolute; right: 8px; top: 8px; padding: 4px; border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 70%, transparent); border: 1px solid var(--edge);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  opacity: 0; transform: translateY(-4px) scale(0.96); pointer-events: none;
  transition: opacity 0.2s, transform 0.35s var(--spring);
}
.mini:hover .mini-actions, .mini:focus-within .mini-actions { opacity: 1; transform: none; pointer-events: auto; }
.mini-main { padding-right: 12px; }
@media (max-width: 720px), (hover: none) {
  .mini { flex-direction: column; align-items: stretch; }
  .mini-actions { position: static; opacity: 1; transform: none; pointer-events: auto; background: none; border: 0; padding: 0 12px 12px 52px; flex-wrap: wrap; }
}
.seg { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 12px; border-radius: 13px; border: 1px solid var(--edge); background: var(--glass); }
.seg-l { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-right: 4px; }
.seg-l .ic { width: 15px; height: 15px; }

/* ---------------------------------------------------------------- header dropdowns */
.pickers { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.dd { position: relative; }
.dd-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 11px; cursor: pointer;
  border-radius: 12px; border: 1px solid var(--edge); background: var(--glass); color: var(--ink-2); font-size: 13.5px; font-weight: 600;
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  transition: background 0.2s, color 0.2s, transform 0.3s var(--spring);
}
.dd-btn:hover, .dd.is-open .dd-btn { background: var(--glass-2); color: var(--ink); }
.dd-btn:active { transform: scale(0.97); }
.dd-btn .ic { width: 16px; height: 16px; }
.dd-chev { transition: transform 0.35s var(--spring); opacity: 0.7; }
.dd.is-open .dd-chev { transform: rotate(180deg); }
.dd-menu {
  position: absolute; z-index: 6; top: calc(100% + 8px); left: 0; min-width: 230px; max-height: min(420px, 60vh); overflow-y: auto;
  list-style: none; margin: 0; padding: 6px; border-radius: 18px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  opacity: 0; transform: translateY(-6px) scale(0.97); transform-origin: top left; pointer-events: none; visibility: hidden;
  transition: opacity 0.18s, transform 0.4s var(--spring), visibility 0s 0.2s;
}
.dd.is-open .dd-menu { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity 0.18s, transform 0.4s var(--spring), visibility 0s; }
.dd.is-open .dd-menu li { animation: up 0.35s var(--ease) both; animation-delay: calc(var(--i, 0) * 22ms); }
.dd-opt {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; cursor: pointer;
  border: 0; background: none; padding: 9px 10px; border-radius: 11px; font-size: 14px; color: var(--ink-2);
  transition: background 0.15s, color 0.15s;
}
.dd-opt:hover, .dd-opt:focus-visible { background: var(--glass-2); color: var(--ink); outline: none; }
.dd-opt.is-on { color: var(--ink); font-weight: 600; }
.dd-opt .ic { width: 16px; height: 16px; color: var(--accent); stroke-width: 2.4; }
.dd-opt-main { display: flex; flex-direction: column; }
.dd-opt small { font-size: 11.5px; font-weight: 400; color: var(--ink-3); }
@media (max-width: 720px) { .dd-menu { min-width: 210px; } }

/* ---------------------------------------------------------------- account */
.acct { position: relative; }
.avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; color: var(--accent-ink); background: linear-gradient(140deg, var(--accent), var(--accent-2)); }
.sync { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.acct .sync { position: absolute; right: 4px; bottom: 4px; box-shadow: 0 0 0 2px var(--bg); }
.sync-saving { background: var(--sky); animation: pulse 1s ease-in-out infinite; }
.sync-error { background: var(--warn); }
.tile-acct { background: linear-gradient(140deg, #b48cff, #6b52e0); }
.acct-card { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; background: var(--glass); border: 1px solid var(--edge); font-weight: 600; font-size: 14px; }
.acct-card .ic { color: var(--sky); }
input[type="email"], input[type="password"], input[type="url"] { height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--edge); background: var(--glass-2); color: var(--ink); font: inherit; font-size: 15px; transition: border-color 0.2s, box-shadow 0.2s; }
input[type="email"]:focus, input[type="password"]:focus, input[type="url"]:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sky) 20%, transparent); }
.auth-error:empty { display: none; }
.auth-error { color: var(--bad); font-size: 13px; }
.shake { animation: shake 0.4s var(--ease); }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.btn.is-busy { opacity: 0.7; cursor: progress; }
.btn.is-busy .ic { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.seg-tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 14px; background: var(--glass); border: 1px solid var(--edge); }
.seg-tabs button { position: relative; z-index: 1; border: 0; background: none; height: 34px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--ink-3); transition: color 0.2s; }
.seg-tabs button.is-on { color: var(--ink); }
.seg-thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 10px; background: var(--glass-hi); box-shadow: inset 0 1px 0 var(--edge-hi), 0 4px 12px -6px rgba(0, 0, 0, 0.5); transition: transform 0.45s var(--spring); }
.seg-thumb.right { transform: translateX(100%); }
.panel-titles h2 { overflow-wrap: anywhere; }
/* dropdowns must float above the cards that follow the header */
.hero { position: relative; z-index: 5; }
@media (max-width: 720px) { .rail { z-index: 8; } }

/* ---------------------------------------------------------------- globe button */
.globe { position: relative; }
.globe.is-on { background: var(--glass-hi); color: var(--ink); border-color: var(--edge-hi); }
.spin-globe path:nth-child(3), .spin-globe path:nth-child(4) { transform-origin: 12px 12px; transition: transform 0.8s var(--spring-soft); }
.globe:hover .spin-globe path:nth-child(3) { transform: scaleX(-1); }
.globe:hover .spin-globe path:nth-child(4) { transform: scaleX(0.35); }
.badge { position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; color: #1a1205; background: var(--warn); box-shadow: 0 0 0 2px var(--bg); animation: pop 0.5s var(--spring); }

/* ---------------------------------------------------------------- map */
.fchips { display: flex; gap: 6px; flex-wrap: wrap; }
.fchip { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px 0 10px; border-radius: 999px; border: 1px solid var(--edge); background: var(--glass); color: var(--ink-3); cursor: pointer; font-size: 13px; font-weight: 600; transition: background 0.2s, color 0.2s, transform 0.3s var(--spring); }
.fchip .ic { width: 15px; height: 15px; }
.fchip b { font-size: 11px; min-width: 18px; height: 18px; border-radius: 999px; display: grid; place-items: center; background: var(--glass-2); color: var(--ink-2); }
.fchip.is-on { color: var(--ink); background: var(--glass-2); border-color: var(--edge-hi); }
.fchip:active { transform: scale(0.95); }
.fchip-planned.is-on .ic { color: var(--accent); }
.fchip-visited.is-on .ic { color: var(--ok); }
.fchip-todo.is-on .ic { color: var(--sky); }

.confirm { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; border-radius: 20px; padding: 12px 12px 12px 14px; margin-bottom: 14px; }
.confirm-ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; color: #1a1205; background: linear-gradient(140deg, #ffd88a, #f5a742); flex: none; }
.confirm p { flex: 1; min-width: 200px; display: flex; flex-direction: column; }
.confirm p span { font-size: 13px; color: var(--ink-3); }

.map-card { position: relative; border-radius: var(--r-lg); overflow: hidden; height: min(62vh, 620px); min-height: 360px; }
.map { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; user-select: none; }
.map.is-panning { cursor: grabbing; }
.map.is-adding { cursor: crosshair; }
.state { fill: color-mix(in srgb, var(--ink) 6%, transparent); stroke: color-mix(in srgb, var(--ink) 34%, transparent); stroke-width: 1.4; vector-effect: non-scaling-stroke; stroke-linejoin: round; transition: fill 0.3s; }
.state:hover { fill: color-mix(in srgb, var(--ink) 10%, transparent); }
.map-card.is-enter .state { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 120ms); }
.map-card.is-enter .state { /* pathLength-free fallback: fade fill in */ fill-opacity: 0; animation: draw 1.6s var(--ease) forwards, fillin 1.2s 0.4s var(--ease) forwards; }
@keyframes fillin { to { fill-opacity: 1; } }
.dots { fill: color-mix(in srgb, var(--ink) 22%, transparent); pointer-events: none; }

.pin { cursor: pointer; outline: none; }
.pin-pop { transform-box: fill-box; transform-origin: center; animation: pinpop 0.55s var(--spring) both; animation-delay: calc(var(--i, 0) * 30ms + 300ms); }
@keyframes pinpop { from { transform: scale(0) translateY(6px); opacity: 0; } }
.pin .halo { opacity: 0.22; transition: opacity 0.2s, transform 0.35s var(--spring); transform-box: fill-box; transform-origin: center; }
.pin .dot { stroke: rgba(255, 255, 255, 0.85); stroke-width: 1.6; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45)); }
.pin .core { fill: #fff; }
.pin .glyph { fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pin-todo .glyph { fill: #fff; stroke: none; }
.pin-planned .dot, .pin-planned .halo { fill: var(--accent); }
.pin-visited .dot, .pin-visited .halo { fill: #36b878; }
.pin-todo .dot, .pin-todo .halo { fill: #4f8ff0; }
.pin-todo .dot.is-done { fill: #7c8597; }
.pin-confirm .dot, .pin-confirm .halo { fill: #f5a742; }
.pin-draft .dot { fill: #fff; } .pin-draft .halo { fill: #fff; }
.pulse { animation: halo 1.8s ease-out infinite; }
@keyframes halo { 0% { transform: scale(0.8); opacity: 0.5; } 100% { transform: scale(2); opacity: 0; } }
.pin:hover .halo, .pin:focus-visible .halo, .pin.is-sel .halo { opacity: 0.45; transform: scale(1.35); }
.pin-label { font: 600 12px var(--font); fill: var(--ink); text-anchor: middle; paint-order: stroke; stroke: color-mix(in srgb, var(--bg) 85%, transparent); stroke-width: 4px; stroke-linejoin: round; opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.pin:hover .pin-label, .pin:focus-visible .pin-label, .pin.is-sel .pin-label { opacity: 1; }
.pin.is-sel .dot { stroke-width: 2.6; }

.map-tools { position: absolute; top: 14px; right: 14px; display: flex; flex-direction: column; gap: 6px; }
.map-tools .iconbtn { background: color-mix(in srgb, var(--bg) 55%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.map-add { position: absolute; left: 14px; bottom: 14px; }
.map-hint { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); margin: 0; padding: 8px 14px; border-radius: 999px; font-size: 13px; color: var(--ink); white-space: nowrap; animation: up 0.4s var(--spring) both; }

.map-lists { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.mlist { border-radius: var(--r-md); padding: 14px 10px 10px; min-width: 0; }
.mlist-h { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 14px; padding: 0 6px 8px; }
.mlist-h b { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.mlist-ic { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; color: #fff; }
.mlist-ic .ic { width: 14px; height: 14px; stroke-width: 2.2; }
.mlist-ic-planned { background: var(--accent); } .mlist-ic-visited { background: #36b878; } .mlist-ic-todo { background: #4f8ff0; }
.mlist ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: 240px; overflow-y: auto; }
.mlist li { display: flex; align-items: center; gap: 4px; }
.mrow2 { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; border: 0; background: none; cursor: pointer; padding: 7px 8px; border-radius: 10px; transition: background 0.15s; }
.mrow2:hover { background: var(--glass-2); }
.mrow2-t { font-size: 13.5px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow2-s { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow2.is-done .mrow2-t { text-decoration: line-through; color: var(--ink-3); }
.tick { width: 26px; height: 26px; flex: none; border-radius: 8px; border: 1.5px solid var(--edge-hi); background: none; cursor: pointer; display: grid; place-items: center; color: transparent; transition: background 0.2s, color 0.2s, transform 0.3s var(--spring); }
.tick .ic { width: 14px; height: 14px; stroke-width: 2.6; }
.tick.is-on { background: #36b878; border-color: transparent; color: #fff; }
.tick:active { transform: scale(0.88); }
.tick.is-on .ic path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 0.4s var(--ease) forwards; }
.mlist-empty { font-size: 12.5px; color: var(--ink-3); padding: 6px 8px; }

.tile-pin-planned { background: linear-gradient(140deg, var(--accent), var(--accent-2)); }
.tile-pin-visited { background: linear-gradient(140deg, #5bd69a, #2a9d65); }
.tile-pin-todo { background: linear-gradient(140deg, #79aaff, #3f74e0); }
.tile-pin-confirm { background: linear-gradient(140deg, #ffd88a, #f5a742); }
textarea { padding: 10px 14px; border-radius: 12px; border: 1px solid var(--edge); background: var(--glass-2); color: var(--ink); font: inherit; font-size: 14px; resize: vertical; }
input[type="text"] { height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--edge); background: var(--glass-2); color: var(--ink); font: inherit; font-size: 15px; }
textarea:focus, input[type="text"]:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sky) 20%, transparent); }
#place-where .ic { width: 13px; height: 13px; vertical-align: -2px; color: var(--accent); }

@media (max-width: 900px) { .map-lists { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .map-card { height: 58vh; min-height: 320px; }
  .map-hint { white-space: normal; width: calc(100% - 28px); text-align: center; }
}

/* ---------------------------------------------------------------- person + info icon motion */
.nod path:first-child { transform-box: fill-box; transform-origin: 50% 100%; }
.iconbtn:hover .nod path:first-child, .iconbtn:focus-visible .nod path:first-child { animation: nod 0.7s var(--spring); }
.iconbtn:hover .nod path:last-child, .iconbtn:focus-visible .nod path:last-child { animation: shrug 0.7s var(--spring); transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes nod { 30% { transform: translateY(-2px) rotate(-8deg); } 60% { transform: translateY(0) rotate(6deg); } }
@keyframes shrug { 40% { transform: scaleY(1.12); } }
.blink-i path:nth-child(3) { transform-box: fill-box; transform-origin: center; }
.iconbtn:hover .blink-i path:nth-child(3), .iconbtn:focus-visible .blink-i path:nth-child(3) { animation: hop 0.6s var(--spring); }
.iconbtn:hover .blink-i path:nth-child(2), .iconbtn:focus-visible .blink-i path:nth-child(2) { stroke-dasharray: 1; animation: redraw 0.5s var(--ease); }
.iconbtn:hover .blink-i path:first-child { animation: ring 0.6s var(--ease); transform-box: fill-box; transform-origin: center; }
@keyframes hop { 40% { transform: translateY(-3px) scale(1.3); } 70% { transform: translateY(0.5px); } }
@keyframes redraw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes ring { 50% { transform: scale(1.08); } }
.acct .avatar { transition: transform 0.4s var(--spring); }
.acct:hover .avatar { transform: rotate(-8deg) scale(1.08); }

/* favorites */
.pin-favorite .dot, .pin-favorite .halo { fill: #ff5f93; }
.pin-favorite .glyph { fill: #fff; stroke: none; }
.fchip-favorite.is-on .ic { color: #ff5f93; }
.mlist-ic-favorite { background: #ff5f93; }
.tile-pin-favorite { background: linear-gradient(140deg, #ff8fb3, #e8457a); }
.fav.is-on { color: #ff5f93; border-color: color-mix(in srgb, #ff5f93 40%, transparent); }
.fav.is-on .ic { fill: #ff5f93; }
.fav.pop .ic, .fav:active .ic { animation: beat 0.5s var(--spring); }
@keyframes beat { 30% { transform: scale(1.35); } 60% { transform: scale(0.9); } }
.map-lists { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1180px) { .map-lists { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .map-lists { grid-template-columns: 1fr; } }
/* three-way segmented control */
.seg-3 { grid-template-columns: repeat(3, 1fr); }
.seg-3 button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg-3 button .ic { width: 14px; height: 14px; }
.seg-3 .seg-thumb { width: calc((100% - 8px) / 3); }
.seg-thumb.pos-0 { transform: translateX(0); }
.seg-thumb.pos-1 { transform: translateX(100%); }
.seg-thumb.pos-2 { transform: translateX(200%); }
.name-form .inline { display: flex; gap: 8px; }
.name-form .inline input { flex: 1; min-width: 0; }

/* ---------------------------------------------------------------- terrain + lakes */
.relief { opacity: 0.6; mix-blend-mode: soft-light; pointer-events: none; image-rendering: smooth; image-rendering: optimizeQuality; }
:root[data-theme="light"] .relief { opacity: 0.45; mix-blend-mode: multiply; }
.map-card.is-enter .terrain { animation: fadein 1.4s 0.6s var(--ease) both; }
@keyframes fadein { from { opacity: 0; } }
.lake { fill: color-mix(in srgb, #7fb4ff 34%, transparent); stroke: color-mix(in srgb, #bcd8ff 60%, transparent); stroke-width: 0.8; vector-effect: non-scaling-stroke; transition: fill 0.2s; }
.lake:hover { fill: color-mix(in srgb, #7fb4ff 55%, transparent); }
.map-card.is-enter .lakes { animation: fadein 1s 1s var(--ease) both; }
.terrain-line { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font-size: 12.5px; color: var(--ink-2); }
.terrain-line span { display: inline-flex; align-items: center; gap: 4px; }
.terrain-line .ic { width: 14px; height: 14px; color: var(--ink-3); }
.terrain.is-new .relief { animation: fadein 1.2s var(--ease) both; }

/* ---------------------------------------------------------------- data sources + refresh */
.sec { font: 600 12px var(--font); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); margin-top: 6px; }
.src-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.switch-sm { grid-template-columns: 40px auto; gap: 10px; font-size: 13px; width: max-content; }
.switch-sm .knob, .switch-sm input { width: 40px; height: 24px; }
.switch-sm .knob::after { width: 18px; height: 18px; }
.switch-sm input:checked + .knob::after { transform: translateX(16px); }
.switch input:disabled + .knob { opacity: 0.5; cursor: not-allowed; }
.src-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.src-form input { width: 100%; font-size: 13px; height: 40px; }
.src-actions { display: flex; align-items: center; gap: 8px; }
.data-job { display: flex; flex-direction: column; gap: 10px; }
.data-job code, .fine code { font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink-2); }
.fine.bad { color: var(--bad); }
.fine.ok { color: var(--ok); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 6px 12px; }
.step { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); }
.step-dot { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--edge-hi); display: grid; place-items: center; flex: none; }
.step-dot .ic { width: 11px; height: 11px; stroke-width: 3; }
.step-running { color: var(--ink); }
.step-running .step-dot { border-color: var(--accent); border-top-color: transparent; animation: spin 0.9s linear infinite; }
.step-done { color: var(--ink-2); }
.step-done .step-dot { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.step-failed { color: var(--bad); }
.step-failed .step-dot { border-color: var(--bad); color: var(--bad); }
@keyframes spin { to { transform: rotate(360deg); } }
.log { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--glass); border: 1px solid var(--edge); font: 11.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; max-height: 150px; overflow: auto; }
@media (prefers-reduced-motion: reduce) { .step-running .step-dot { animation: none; border-top-color: var(--accent); } }

/* ---------------------------------------------------------------- sign-in screen (nobody signed in) */
.gated .rail, .gated .panel { display: none; }
.gated .app { grid-template-columns: 1fr; }
.gated .stage { display: grid; place-items: center; align-content: center; min-height: 100%; padding-bottom: 18px; }
.gate { width: min(420px, calc(100vw - 32px)); padding: 28px 24px; border-radius: var(--r-lg); display: flex; flex-direction: column; gap: 14px; }
.gate-title { font: 700 28px var(--font-display); letter-spacing: -0.02em; }
.gate .brand-mark { align-self: flex-start; }
