/* Japan, spring '27: clean, warm and a little bouncy. */

:root {
  --bg: #f7f3ec;
  --ink: #2b2723;
  --muted: #7a7168;
  --muted2: #8b8278;
  --faint: #a8a097;
  --card: #fffdf9;
  --line: rgba(43, 39, 35, .08);
  --line2: rgba(43, 39, 35, .15);
  --chip: #efe9df;
  --btn: #f3eee6;
  --accent: oklch(0.64 0.15 28);
  --accent-d: oklch(0.5 0.14 28);
  --ok: oklch(0.62 0.13 150);
  --ok-bg: oklch(0.93 0.06 150);
  --ok-fg: oklch(0.42 0.11 150);
  --warn-bg: oklch(0.94 0.06 75);
  --warn-fg: oklch(0.45 0.12 60);
  --bad-bg: oklch(0.93 0.05 25);
  --bad-fg: oklch(0.52 0.16 25);
  --sky: oklch(0.93 0.035 220);
  --surface: #fff;
  --surface-2: #faf7f2;
  --glass: rgba(255, 253, 249, .95);
  --frost: rgba(255, 255, 255, .78);
  --frost-2: rgba(255, 255, 255, .5);
  --dash: var(--dash);
  --btn-h: var(--btn-h);
  --on-ink: #fff;
  --accent-soft: oklch(0.95 0.035 28);
  --topbar: rgba(247, 243, 236, .86);
  --stripe-a: #fbf9f5;
  --stripe-b: #f2ede4;
  --air-a: oklch(0.965 0.02 225);
  --air-b: oklch(0.935 0.04 225);
  --air-fg: oklch(0.42 0.11 245);
  --air-sh: oklch(0.84 0.06 230);
  --sea: oklch(0.93 0.035 220);
  --wave: oklch(0.86 0.04 220);
  --land: #fffdf9;
  --land-stroke: oklch(0.84 0.03 60);
  --land-2: #eee7db;
  --land-2-stroke: #e0d6c6;
  --land-shadow: oklch(0.8 0.04 220);
  --sea-label: oklch(0.6 0.05 225);
  --casing: #fff;
  --ghost-route: rgba(43, 39, 35, .22);
  --r: 26px;
  --shadow-card: 0 0 0 1px var(--line), 0 14px 34px -24px rgba(43, 39, 35, .35);
  --shadow-pop: 0 24px 60px -24px rgba(43, 39, 35, .5), 0 0 0 1px var(--line);
  --font-d: 'Bricolage Grotesque', system-ui, sans-serif;
  --font: Figtree, system-ui, -apple-system, sans-serif;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: light;
}

/* Anything with a hue (--h) gets a matching family of colours. */
.hue {
  --c-bg: oklch(0.91 0.06 var(--h));
  --c-fg: oklch(0.42 0.11 var(--h));
  --c-sh: oklch(0.8 0.1 var(--h));
  --c-soft: oklch(0.965 0.025 var(--h));
  --c-solid: oklch(0.62 0.15 var(--h));
  --c-dark: oklch(0.5 0.13 var(--h));
  --c-line: oklch(0.86 0.06 var(--h));
  --c-text: oklch(0.32 0.08 var(--h));
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
h1, h2, h3 { font-family: var(--font-d); margin: 0; letter-spacing: -0.015em; }
h2 { font-size: 20px; font-weight: 700; }
p { margin: 0; }
a { color: var(--accent-d); }
code { background: var(--chip); padding: 1px 6px; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.warn { color: var(--warn-fg); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2.5px solid oklch(0.6 0.15 250); outline-offset: 2px; }
::selection { background: oklch(0.88 0.07 28); }
body.modal-open { overflow: hidden; }

/* ---------- keyframes ---------- */
@keyframes rise { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
@keyframes popIn { from { transform: scale(.92) translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes modalIn { from { transform: translateY(26px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes segIn { from { transform: scaleX(.2); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes evIn { from { transform: scale(.88); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes barIn { from { transform: translateX(-14px) scaleX(.9); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pinDrop { 0% { transform: translate(-50%, -160%) scale(.4); opacity: 0; } 60% { transform: translate(-50%, -42%) scale(1.12); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
@keyframes ring { from { transform: scale(.7); opacity: .9; } to { transform: scale(1.9); opacity: 0; } }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-5px); } }
@keyframes planeBob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-2px) rotate(-8deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes wiggle { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(5deg) scale(1.04); } }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(16deg); } 20%, 40% { transform: rotate(-8deg); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes heart { 0% { transform: scale(1); } 40% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes stamp { 0% { transform: rotate(8deg) scale(2.4); opacity: 0; } 100% { transform: rotate(8deg) scale(1); opacity: 1; } }
@keyframes sunPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
@keyframes waves { from { transform: translateX(0); } to { transform: translateX(46px); } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes toastIn { from { transform: translateY(24px) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sway { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
@keyframes fall { 0% { transform: translate(0, -20px) rotate(0) scale(var(--s)); } 100% { transform: translate(var(--drift), 108vh) rotate(560deg) scale(var(--s)); } }
@keyframes fallLocal { 0% { transform: translate(0, -20px) rotate(0) scale(var(--s)); opacity: 0; } 10% { opacity: .9; } 90% { opacity: .9; } 100% { transform: translate(var(--drift), 560px) rotate(520deg) scale(var(--s)); opacity: 0; } }

/* ---------- buttons & chips ---------- */
.btn { border: 0; border-radius: 999px; padding: 10px 16px; font-weight: 600; font-size: 14px; background: var(--btn); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; transition: transform .18s var(--spring), background .15s, box-shadow .15s; }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.97); }
.btn:disabled { opacity: .45; }
.btn-ink { background: var(--ink); color: var(--on-ink); box-shadow: 0 3px 0 #000; }
.btn-ink:active:not(:disabled) { box-shadow: 0 1px 0 #000; }
.btn-chunky { background: var(--surface); color: var(--ink); font-family: var(--font-d); font-weight: 700; box-shadow: 0 4px 0 rgba(43, 39, 35, .22), 0 0 0 1.5px var(--line2); }
.btn-small { padding: 6px 12px; font-size: 13px; }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--btn); }
.btn-danger { background: transparent; color: var(--bad-fg); }
.btn-danger:hover { background: var(--bad-bg); }
.btn-danger.sure { background: var(--bad-fg); color: #fff; animation: shake .4s; }
.round-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--btn); font-size: 18px; line-height: 1; transition: transform .18s var(--spring), background .15s; }
.round-btn:hover:not(:disabled) { background: var(--btn-h); transform: scale(1.08); }
.round-btn:disabled { opacity: .35; }
.chip-btn { border: 0; background: var(--frost); border-radius: 999px; padding: 7px 12px; font-weight: 600; font-size: 13px; box-shadow: 0 4px 14px -6px rgba(0, 0, 0, .35); display: inline-flex; align-items: center; gap: 6px; transition: transform .18s var(--spring); }
.chip-btn:hover { transform: translateY(-1px); }
.tag-btn { border: 0; background: var(--btn); border-radius: 10px; padding: 7px 10px; font-size: 13px; font-weight: 600; text-decoration: none; color: var(--ink); white-space: nowrap; }
.tag-btn:hover { background: var(--btn-h); }
.dashed-btn { width: 100%; border: 2px dashed var(--dash); background: transparent; border-radius: 18px; padding: 12px; font-weight: 700; font-size: 14px; color: var(--muted); transition: all .2s; }
.dashed-btn:hover { border-color: var(--accent); color: var(--accent-d); background: var(--accent-soft); }
.link-btn { border: 0; background: none; color: var(--muted); text-decoration: underline; font-size: 13px; margin-top: 18px; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; padding: 4px 11px; border-radius: 999px; background: var(--chip); white-space: nowrap; }
.pill-ok { background: var(--ok-bg); color: var(--ok-fg); }
.pill-warn { background: var(--warn-bg); color: var(--warn-fg); }
.pill-bad { background: var(--bad-bg); color: var(--bad-fg); animation: shake .5s; }
.seg-toggle { display: flex; gap: 4px; background: var(--chip); padding: 4px; border-radius: 999px; }
.seg-toggle button { border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; font-weight: 600; font-size: 13.5px; color: var(--muted); transition: all .2s; white-space: nowrap; }
.seg-toggle button.on { background: var(--surface); color: var(--ink); box-shadow: 0 2px 8px -2px rgba(43, 39, 35, .25); }
.seg-toggle.small button { padding: 5px 10px; font-size: 12.5px; }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; display: inline-block; animation: spin .7s linear infinite; }
.push-right { margin-left: auto; }
.rel { position: relative; }
.kbd { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; border: 2px dashed var(--dash); font-weight: 700; }

/* ---------- avatars ---------- */
.av { --s: 26px; width: var(--s); height: var(--s); border-radius: 50%; background: var(--c-solid); color: #fff; display: inline-grid; place-items: center; font: 700 calc(var(--s) * .4)/1 var(--font); border: 2px solid var(--card); flex: none; position: relative; transition: transform .2s var(--spring); letter-spacing: -.02em; }
.avs { display: inline-flex; align-items: center; padding-left: 6px; }
.avs > .av { margin-left: -6px; }
.avs > .av:hover { transform: translateY(-3px); z-index: 2; }
.av-ring { box-shadow: 0 0 0 2.5px var(--ink); z-index: 1; }
.av-more { background: var(--chip); color: var(--muted); }
.av-bot { border-radius: 32%; font-size: calc(var(--s) * .5); }

/* ---------- header ---------- */
.topbar { position: sticky; top: 0; z-index: 40; background: var(--topbar); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1320px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; min-width: 0; }
.logo { width: 42px; height: 42px; flex: none; border-radius: 13px; background: var(--accent); color: #fff; display: grid; place-items: center; font: 800 20px/1 var(--font-d); transform: rotate(-6deg); box-shadow: 0 4px 0 var(--accent-d); transition: transform .35s var(--spring); }
.brand:hover .logo { transform: rotate(8deg) scale(1.08); }
.logo-big { width: 86px; height: 86px; font-size: 42px; border-radius: 26px; box-shadow: 0 7px 0 var(--accent-d); }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-title { font: 800 20px/1.1 var(--font-d); white-space: nowrap; }
.brand-sub { font-size: 13px; color: var(--muted); white-space: nowrap; }
.tabs { margin: 0 auto; display: flex; gap: 4px; background: var(--chip); padding: 4px; border-radius: 999px; }
.tabs a { padding: 9px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--muted); text-decoration: none; transition: all .2s; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { background: var(--surface); color: var(--ink); box-shadow: 0 2px 8px -2px rgba(43, 39, 35, .25); }
.top-right { display: flex; align-items: center; gap: 12px; }
.me-btn { border: 0; background: none; padding: 4px; border-radius: 999px; }
.me-btn:hover { background: var(--frost); }
.countdown { font: 700 13px var(--font-d); padding: 7px 12px; background: var(--surface); border-radius: 999px; box-shadow: 0 0 0 1px var(--line); white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.cd-emoji { display: inline-block; animation: spin 8s linear infinite; }
.sync-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); flex: none; transition: background .3s; }
.sync-dot.saving { background: oklch(0.76 0.14 75); animation: pulse .9s infinite; }
.sync-dot.offline { background: var(--bad-fg); animation: pulse 1.6s infinite; }

/* ---------- page & cards ---------- */
.page { max-width: 1320px; margin: 0 auto; padding: 22px 20px 60px; }
.card { background: var(--card); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow-card); animation: rise .55s both; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px 14px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head p { font-size: 13.5px; margin-top: 2px; }
.plan-page > * + * { margin-top: 20px; }
.map-wrap { position: relative; }
.foot { text-align: center; color: var(--faint); font-size: 13px; padding: 0 20px 40px; }
.hint { margin: 12px 4px 0; font-size: 12.5px; color: var(--muted2); }

/* ---------- timeline ---------- */
.tl-card { animation-delay: .05s; }
.tl-scroll { overflow-x: auto; margin: 0 -20px; padding: 8px 20px 6px; scrollbar-width: thin; }
.tl-grid { position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(46px, 1fr)); grid-template-rows: auto 54px 26px; row-gap: 8px; min-width: calc(var(--n) * 46px); }
.tl-grid.dragging { cursor: ew-resize; user-select: none; }
.tl-day { grid-row: 1; border: 0; background: none; display: flex; flex-direction: column; align-items: center; padding: 5px 0 4px; border-radius: 12px; transition: background .15s, transform .2s var(--spring); }
.tl-day:hover { background: var(--btn); transform: translateY(-2px); }
.tl-wd { font-size: 10.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.tl-dn { font: 800 18px/1.1 var(--font-d); transition: transform .25s var(--spring), color .2s; }
.tl-mon { font-size: 10px; font-weight: 800; color: var(--accent-d); text-transform: uppercase; letter-spacing: .05em; }
.tl-day.weekend .tl-wd { color: var(--accent-d); }
.tl-day.playing { background: var(--surface); box-shadow: 0 0 0 2px var(--accent); }
.tl-day.playing .tl-dn { color: var(--accent); transform: scale(1.18); }
.tl-seg { grid-row: 2; margin: 0 2px; border-radius: 16px; border: 0; display: flex; align-items: center; gap: 8px; padding: 0 10px; background: var(--c-bg); color: var(--c-fg); box-shadow: 0 4px 0 var(--c-sh); font-size: 13px; overflow: hidden; white-space: nowrap; transform-origin: left center; transition: transform .2s var(--spring), box-shadow .2s; animation: segIn .7s var(--spring) both; animation-delay: calc(.1s + var(--i) * 25ms); min-width: 0; text-align: left; }
button.tl-seg:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--c-sh); }
.tl-seg.sel { box-shadow: 0 4px 0 var(--c-sh), 0 0 0 2.5px var(--c-fg); }
.tl-code { font: 800 11.5px/1 var(--font-d); background: var(--frost); border-radius: 8px; padding: 5px 6px; flex: none; }
.tl-seg-text { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tl-seg-text b { font-family: var(--font-d); font-size: 14px; }
.tl-nights { opacity: .7; font-weight: 700; font-size: 12px; }
.tl-air { background: repeating-linear-gradient(-45deg, var(--air-a) 0 8px, var(--air-b) 8px 16px); color: var(--air-fg); box-shadow: 0 4px 0 var(--air-sh); justify-content: center; gap: 4px; padding: 0 4px; font-weight: 700; font-size: 12px; }
.tl-plane { display: inline-block; font-size: 15px; animation: planeBob 2.4s ease-in-out infinite; }
.tl-gap { background: repeating-linear-gradient(-45deg, var(--stripe-a) 0 6px, var(--stripe-b) 6px 12px); color: var(--muted); justify-content: center; box-shadow: 0 4px 0 var(--dash); font-weight: 700; font-size: 12px; }
.tl-nohotel { grid-row: 2; margin: 0 2px 0 0; border-radius: 0 16px 16px 0; background: repeating-linear-gradient(-45deg, var(--frost-2) 0 5px, transparent 5px 10px); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 4px; z-index: 1; pointer-events: auto; }
.tl-nohotel span { font-size: 9.5px; font-weight: 800; color: var(--muted); background: var(--frost); padding: 0 5px; border-radius: 6px; white-space: nowrap; }
.tl-handle { grid-row: 2; justify-self: start; position: relative; z-index: 3; width: 24px; margin-left: -12px; display: grid; place-items: center; cursor: ew-resize; touch-action: none; }
.tl-grip { width: 9px; height: 34px; border-radius: 99px; background: var(--surface) linear-gradient(90deg, transparent 3px, var(--line2) 3px 4px, transparent 4px 5px, var(--line2) 5px 6px, transparent 6px) center / 9px 14px no-repeat; box-shadow: 0 0 0 1.5px var(--line2), 0 3px 8px rgba(0, 0, 0, .14); transition: transform .2s var(--spring), background-color .2s; }
.tl-handle:hover .tl-grip, .tl-handle.active .tl-grip, .tl-handle:focus-visible .tl-grip { transform: scaleY(1.2) scaleX(1.15); background-color: var(--ink); }
.tl-drag-tip { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--on-ink); font-size: 12px; font-weight: 600; padding: 5px 9px; border-radius: 9px; white-space: nowrap; animation: pop .2s var(--spring); }
.tl-marks { grid-row: 3; display: flex; justify-content: center; align-items: center; gap: 1px; font-size: 14px; line-height: 1; }
.tl-mark { animation: pop .45s var(--spring) both; }
.tl-cursor { position: absolute; top: -14px; transform: translateX(-50%); font-size: 18px; transition: left .25s ease; pointer-events: none; z-index: 4; }
.tl-cursor span { display: inline-block; animation: bob .45s ease-in-out infinite alternate; }
.tl-note { margin-top: 10px; font-size: 13px; font-weight: 600; }
.tl-note.bad { color: var(--bad-fg); }

/* ---------- map ---------- */
.map-wrap { position: relative; }
.petals-local { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 6; border-radius: var(--r); }
.petals-local .petal { animation-name: fallLocal; }
.map-card { padding: 0; overflow: hidden; position: relative; background: var(--sky); animation-delay: .1s; }
.map-stage { position: relative; width: 100%; aspect-ratio: 1000 / 582; max-height: min(500px, 64vh); overflow: hidden; }
.map-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.sea-waves { animation: waves 9s linear infinite; }
.sea { fill: var(--sea); }
.wave-line { fill: none; stroke: var(--wave); stroke-width: 1.6; stroke-linecap: round; }
.paper-shadow { flood-color: var(--land-shadow); }
.land-jp { fill: var(--land); stroke: var(--land-stroke); stroke-width: 1.2; stroke-linejoin: round; }
.land-other { fill: var(--land-2); stroke: var(--land-2-stroke); stroke-width: 1; }
.sea-label { font: italic 600 15px var(--font-d); fill: var(--sea-label); letter-spacing: .1em; }
.land-label { fill: #b9ae9e; font-style: normal; }
.sun-core { fill: oklch(0.68 0.17 28); }
.sun-glow { fill: oklch(0.82 0.11 40 / .35); animation: sunPulse 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.fuji-body { fill: oklch(0.74 0.06 250); }
.fuji-snow { fill: #fff; }
.leg-reveal { fill: none; stroke: #fff; stroke-width: 22; stroke-dasharray: 1 1; stroke-dashoffset: 0; }
.leg-casing { fill: none; stroke: var(--casing); stroke-width: 8; stroke-linecap: round; }
.leg-line { fill: none; stroke: var(--ink); stroke-width: 3.2; stroke-linecap: round; }
.leg-fly .leg-casing { stroke-width: 6; opacity: .65; }
.leg-fly .leg-line { stroke: oklch(0.56 0.13 245); stroke-width: 2.6; stroke-dasharray: 9 8; }
/* Pins sit in a box with the map's own proportions, centred like the SVG. */
.map-overlay { position: absolute; top: 0; left: 50%; height: 100%; max-width: 100%; aspect-ratio: 1000 / 582; transform: translateX(-50%); pointer-events: none; }
.pin { position: absolute; width: 32px; height: 32px; transform: translate(-50%, -50%); pointer-events: auto; border: 0; background: none; padding: 0; animation: pinDrop .7s var(--spring) both; animation-delay: calc(.3s + var(--i) * .12s); z-index: 2; }
.pin-dot { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; background: var(--c-solid); color: #fff; display: grid; place-items: center; font: 800 14px/1 var(--font-d); border: 3px solid #fff; box-shadow: 0 3px 0 var(--c-dark), 0 8px 16px -6px rgba(0, 0, 0, .35); transition: transform .25s var(--spring); }
.pin-label { position: absolute; left: 50%; bottom: calc(100% + 5px); transform: translateX(-50%); background: var(--surface); padding: 3px 9px; border-radius: 999px; font: 700 12.5px var(--font-d); white-space: nowrap; box-shadow: 0 4px 12px -6px rgba(0, 0, 0, .4); color: var(--c-fg); transition: transform .25s var(--spring); }
.pin-label small { opacity: .65; font-weight: 700; }
.pin.below .pin-label { bottom: auto; top: calc(100% + 5px); }
.pin:hover .pin-dot, .pin.sel .pin-dot, .pin:focus-visible .pin-dot { transform: scale(1.2); }
.pin:hover .pin-label { transform: translateX(-50%) scale(1.06); }
.pin.sel::before { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 3px solid var(--c-solid); animation: ring 1.4s ease-out infinite; }
.map-dot { position: absolute; transform: translate(-6px, -6px); display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.map-dot i { width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 3px solid oklch(0.56 0.13 245); }
.map-dot b { font: 700 12.5px var(--font-d); color: var(--ink); }
.map-edge { position: absolute; left: 14px; top: 56px; z-index: 3; font: 700 11.5px var(--font-d); background: var(--frost); color: oklch(0.45 0.11 245); padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.token { position: absolute; left: -100px; top: -100px; transform: translate(-50%, -50%); pointer-events: none; z-index: 5; }
.tok-inner { display: grid; place-items: center; }
.tok-inner > * { display: none; }
.token[data-kind="fly"] .tok-plane, .token[data-kind="train"] .tok-train, .token[data-kind="stay"] .tok-stay { display: block; }
.tok-plane { width: 38px; height: 38px; transform: rotate(var(--a)); fill: #fff; stroke: oklch(0.4 0.12 250); stroke-width: 1.8; stroke-linejoin: round; filter: drop-shadow(0 6px 4px rgba(20, 40, 80, .25)); }
.tok-train { width: 48px; height: 24px; transform: rotate(var(--ta)) scaleX(var(--flip)); filter: drop-shadow(0 4px 3px rgba(0, 0, 0, .2)); }
.tok-train .tb { fill: #fff; stroke: var(--ink); stroke-width: 1.5; }
.tok-train .ts { stroke: oklch(0.56 0.15 250); stroke-width: 2.2; }
.tok-train .tw { fill: oklch(0.5 0.12 250); }
.tok-stay { font-size: 22px; animation: bob .4s ease-in-out infinite alternate; }
.map-badge { position: absolute; left: 14px; top: 14px; background: var(--glass); padding: 7px 13px; border-radius: 999px; box-shadow: 0 6px 18px -8px rgba(43, 39, 35, .4); font-size: 13px; z-index: 3; max-width: calc(100% - 28px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-badge-live { font-weight: 700; font-variant-numeric: tabular-nums; }
.map-controls { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; pointer-events: none; }
.map-controls > * { pointer-events: auto; }
.day-stepper { display: flex; align-items: center; gap: 4px; background: var(--glass); padding: 5px; border-radius: 999px; box-shadow: 0 8px 20px -10px rgba(43, 39, 35, .45); }
.day-stepper .round-btn { width: 34px; height: 34px; font-size: 17px; }
.ds-label { min-width: 138px; text-align: center; font-size: 13px; white-space: nowrap; animation: pop .3s var(--spring); font-variant-numeric: tabular-nums; }
.ds-label b { font-family: var(--font-d); margin-right: 3px; }
.leg-ghost { fill: none; stroke: var(--ghost-route); stroke-width: 3; stroke-dasharray: 1 8; stroke-linecap: round; }
.leg-ghost-fly { stroke: oklch(0.56 0.13 245 / .35); }
.pin.here .pin-dot { transform: scale(1.22); box-shadow: 0 3px 0 var(--c-dark), 0 0 0 5px oklch(1 0 0 / .7), 0 8px 16px -6px rgba(0, 0, 0, .35); }
.map-tip { position: absolute; right: 14px; top: 14px; z-index: 3; background: var(--surface); border-radius: 14px; padding: 9px 13px; font-size: 13px; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .4); animation: popIn .2s var(--spring); border-left: 4px solid var(--c-solid); }
.map-tip b { font-family: var(--font-d); color: var(--c-fg); }
.map-tip span { color: var(--muted); }

/* ---------- route editor ---------- */
.route-card { animation-delay: .15s; }
.route-flight { display: flex; gap: 12px; align-items: center; padding: 9px 12px; border-radius: 16px; background: repeating-linear-gradient(-45deg, var(--air-a) 0 8px, var(--air-b) 8px 16px); color: oklch(0.38 0.08 245); font-size: 14px; cursor: pointer; transition: transform .2s var(--spring); }
.route-flight:hover { transform: translateX(3px); }
.route-flight small { color: oklch(0.5 0.06 240); }
.rf-icon { width: 34px; height: 34px; flex: none; display: grid; place-items: center; background: var(--surface); border-radius: 12px; font-size: 17px; box-shadow: 0 3px 0 oklch(0.85 0.05 230); color: oklch(0.5 0.14 250); }
.route-flight:hover .rf-icon { animation: planeBob .8s ease-in-out; }
.route-list { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.route-row { display: flex; align-items: center; gap: 12px; padding: 7px 8px; border-radius: 18px; transition: background .25s; animation: rise .45s both; animation-delay: calc(.2s + var(--i) * 60ms); }
.route-row:hover { background: var(--c-soft); }
.route-row.sel { background: var(--c-bg); }
.route-row.out { opacity: .5; }
.code-chip { width: 46px; height: 46px; flex: none; border: 0; border-radius: 15px; background: var(--c-bg); color: var(--c-fg); font: 700 15px/1 var(--font-d); box-shadow: 0 3px 0 var(--c-sh); transition: transform .25s var(--spring); display: grid; place-items: center; }
.code-chip:hover { transform: translateY(-2px) rotate(-5deg); }
.route-row.sel .code-chip { background: var(--surface); }
.code-chip.small { width: 28px; height: 28px; font-size: 11px; border-radius: 9px; box-shadow: 0 2px 0 var(--c-sh); background: var(--surface); }
.route-info { flex: 1; min-width: 0; }
.route-info b { font-family: var(--font-d); font-size: 15.5px; }
.route-info .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stepper { display: flex; align-items: center; gap: 2px; background: var(--surface); border-radius: 999px; padding: 3px; box-shadow: 0 0 0 1px var(--line); flex: none; }
.stepper button { width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--btn); font-weight: 700; font-size: 16px; line-height: 1; transition: transform .15s var(--spring), background .15s; }
.stepper button:hover:not(:disabled) { background: var(--c-bg); color: var(--c-fg); }
.stepper button:active:not(:disabled) { transform: scale(.82); }
.stepper button:disabled { opacity: .3; }
.stepper-n { min-width: 66px; text-align: center; font-size: 13px; }
.stepper-n b { display: inline-block; font-size: 14px; }
.stepper-n.bump b { animation: pop .4s var(--spring); }
.row-tools { display: flex; gap: 1px; opacity: 0; transition: opacity .2s; }
.route-row:hover .row-tools, .route-row:focus-within .row-tools { opacity: 1; }
.row-tools button { width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent; color: var(--faint); font-size: 13px; }
.row-tools button:hover:not(:disabled) { background: var(--surface); color: var(--ink); }
.row-tools button:disabled { opacity: .3; }
.route-gap { margin: 6px 0; padding: 10px 12px; border-radius: 14px; background: var(--warn-bg); color: var(--warn-fg); font-size: 13.5px; font-weight: 600; animation: pop .35s var(--spring); }
.route-gap.bad { background: var(--bad-bg); color: var(--bad-fg); }
.add-stop { position: relative; margin: 8px 0 10px; }
.place-pop { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; }
/* Lift whatever holds an open popover above its neighbours. */
.card:has(.popover), .wish-col:has(.popover), .wish-card:has(.popover), .plan-grid > :has(.popover) { position: relative; z-index: 20; }
.popover { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-pop); padding: 10px; animation: popIn .25s var(--spring) both; transform-origin: top center; }
.place-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 6px; max-height: 290px; overflow: auto; }
.place-opt { border: 0; background: var(--btn); border-radius: 14px; padding: 8px 10px; text-align: left; display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; transition: transform .18s var(--spring), background .15s; }
.place-opt span { grid-row: span 2; font-size: 20px; }
.place-opt b { font: 700 13.5px var(--font-d); }
.place-opt small { color: var(--muted); font-size: 11.5px; }
.place-opt:hover { background: var(--accent-soft); transform: translateY(-2px); }

/* ---------- calendar ---------- */
.cal-card { padding: 20px 20px 14px; animation-delay: .2s; }
.cal-toolbar { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-range { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.cal-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.filter { display: flex; gap: 0; }
.filter-av { border: 0; background: none; padding: 2px; border-radius: 50%; transition: opacity .2s, transform .2s var(--spring); }
.filter-av:hover { transform: translateY(-2px); }
.filter-av.off { opacity: .32; }
.filter-av.on { transform: translateY(-2px); }
.filter-av.on .av { box-shadow: 0 0 0 2.5px var(--ink); }
.nav-btns { display: flex; gap: 6px; }
.day-strip { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 4px; margin-bottom: 14px; }
.strip-day { border: 0; height: 30px; border-radius: 8px; background: var(--c-bg); color: var(--c-fg); opacity: .42; font: 700 11.5px/1 var(--font-d); transition: all .25s var(--spring); padding: 0; min-width: 0; }
.strip-day:hover { opacity: .8; transform: translateY(-2px); }
.strip-day.in { opacity: 1; transform: scaleY(1.14); box-shadow: 0 2px 0 var(--c-sh); }
.strip-day.air { background: var(--air-b); color: var(--air-fg); }
.strip-day.gap { background: repeating-linear-gradient(-45deg, var(--stripe-a) 0 5px, var(--stripe-b) 5px 10px); color: var(--muted); }

/* All days side by side in one scroller: --n days fit on screen (at least --minw wide each),
   the rest are a sideways scroll away. The header sticks to the top, the hours to the left. */
.cal-frame { position: relative; }
.cal-grid { --gw: 52px; border-radius: 18px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); background: var(--surface); }
.cal-inner { --colw: max(var(--minw), calc((100cqw - var(--gw) - var(--sbw, 0px)) / var(--n))); width: calc(var(--gw) + var(--cols) * var(--colw)); }
.cal-head-row { display: grid; grid-template-columns: var(--gw) repeat(var(--cols), var(--colw)); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 8; background: var(--surface); box-shadow: 0 6px 12px -10px rgba(43, 39, 35, .3); }
.cal-gutter-head { background: var(--surface-2); position: sticky; left: 0; z-index: 1; }
.cal-arrow { position: absolute; top: 50%; z-index: 9; width: 42px; height: 42px; margin-top: -21px; border-radius: 50%; border: 0; background: var(--surface); color: var(--ink); font-size: 24px; line-height: 1; box-shadow: 0 0 0 1px var(--line), 0 8px 18px -8px rgba(43, 39, 35, .45); transition: transform .18s var(--spring), opacity .2s, background .15s; }
.cal-arrow.prev { left: -15px; }
.cal-arrow.next { right: -15px; }
.cal-arrow:hover:not(:disabled) { transform: scale(1.1); background: var(--btn-h); }
.cal-arrow:disabled { opacity: 0; pointer-events: none; }
.cal-dh { padding: 10px 10px 8px; background: var(--c-soft); border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; min-width: 0; animation: fade .3s both; }
.cal-dh.air { background: var(--air-a); }
.dh-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dh-num { width: 38px; height: 38px; border-radius: 12px; background: var(--c-bg); color: var(--c-fg); display: grid; place-items: center; font: 800 18px/1 var(--font-d); box-shadow: 0 3px 0 var(--c-sh); flex: none; }
.cal-dh.air .dh-num { background: oklch(0.92 0.045 225); color: oklch(0.42 0.11 245); box-shadow: 0 3px 0 oklch(0.84 0.06 230); }
.dh-meta { min-width: 0; display: flex; flex-direction: column; }
.dh-wd { font-size: 11px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.dh-city { font: 700 15px/1.15 var(--font-d); color: var(--c-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-dh.air .dh-city { color: oklch(0.42 0.11 245); }
.dh-flight { margin-left: auto; width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; background: oklch(0.56 0.14 250); color: #fff; font-size: 13px; animation: planeBob 2.4s ease-in-out infinite; }
.dh-move { font-size: 11.5px; font-weight: 700; color: var(--c-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dh-title { width: calc(100% + 12px); border: 0; background: transparent; font-size: 12.5px; font-weight: 600; padding: 4px 6px; margin: 0 -6px; border-radius: 8px; color: var(--ink); text-overflow: ellipsis; }
.dh-title:hover { background: var(--frost); }
.dh-title:focus { background: var(--surface); outline: 2px solid var(--c-line, var(--line2)); }
.dh-title::placeholder { color: var(--faint); font-weight: 500; }
.dh-stay { border: 0; background: var(--frost); border-radius: 8px; padding: 4px 7px; font-size: 11.5px; text-align: left; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background .15s; }
.dh-stay:hover { background: var(--surface); color: var(--ink); }
.dh-stay.booked { background: var(--ok-bg); color: var(--ok-fg); }
.dh-stay.none { background: transparent; }

.cal-scroll { max-height: min(88vh, 1040px); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; container-type: inline-size; scroll-snap-type: x proximity; scroll-padding-left: var(--gw); }
.cal-body { position: relative; display: grid; grid-template-columns: var(--gw) calc(var(--cols) * var(--colw)); }
.cal-gutter { position: sticky; left: 0; z-index: 7; background: var(--surface-2); }
.cal-gutter span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.cal-cols { position: relative; display: grid; grid-template-columns: repeat(var(--cols), var(--colw)); touch-action: pan-x pan-y; user-select: none; -webkit-user-select: none; }
.cal-col { position: relative; border-left: 1px solid var(--line); cursor: cell; scroll-snap-align: start;
  background:
    repeating-linear-gradient(to bottom, transparent 0 calc(var(--hh) - 1px), var(--line) calc(var(--hh) - 1px) var(--hh)),
    linear-gradient(to bottom, rgba(43, 39, 35, .028) 0 calc(var(--hh) * 7), transparent calc(var(--hh) * 7) calc(var(--hh) * 22), rgba(43, 39, 35, .028) calc(var(--hh) * 22));
}
/* The free strip on the right of a day: drag there to add a plan at a time that's already taken. */
.cal-col { --gut: clamp(14px, 12%, 36px); }
.cal-col::after { content: ''; position: absolute; top: 0; bottom: 0; right: 0; width: var(--gut); transition: background .2s; }
.cal-col:hover::after { background: color-mix(in oklab, var(--ink) 5%, transparent); }
.cal-col.air { background-color: var(--air-a); }
.cal-col.nohotel { background-color: #fdfbf7; }
.cal-cols.dragging, .cal-cols.dragging * { cursor: grabbing !important; }

.ev { position: absolute; border-radius: 11px; background: var(--c-bg); color: var(--c-text); border-left: 4px solid var(--c-solid); box-shadow: 0 1px 0 var(--c-sh); overflow: hidden; cursor: grab; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s var(--spring), opacity .25s, filter .25s; animation: evIn .4s var(--spring) both; z-index: 1; }
.ev:hover { box-shadow: 0 10px 22px -10px rgba(43, 39, 35, .45); transform: translateY(-1px); z-index: 3; }
.ev.dragging { box-shadow: 0 16px 34px -12px rgba(43, 39, 35, .55); transform: scale(1.03) rotate(-1.2deg); z-index: 6; animation: none; opacity: .95; }
.ev.dim { opacity: .25; filter: grayscale(.7); }
.ev.ev-option { outline: 1.5px dashed var(--c-solid); outline-offset: -1.5px; }
.ev-opt { display: inline-block; font-size: 9px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; background: var(--frost); padding: 0 5px; border-radius: 99px; margin-right: 5px; vertical-align: 1px; }
.ev.drop-over { outline: 3px dashed var(--c-solid); outline-offset: -3px; }
.ev-img { flex: none; height: min(46%, 100px); background: center / cover no-repeat; }
.ev-body { padding: 5px 7px 4px; min-height: 0; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow: hidden; }
.ev-title { display: flex; align-items: flex-start; gap: 5px; font-weight: 700; font-size: 12.5px; line-height: 1.22; }
.ev-name { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ev-emoji { flex: none; }
.ev-thumb { width: 20px; height: 20px; border-radius: 6px; background: center / cover no-repeat; flex: none; box-shadow: 0 0 0 1.5px #fff; }
.ev-time { font-size: 11px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.ev-foot { display: flex; align-items: center; gap: 4px; margin-top: auto; flex-wrap: wrap; padding-top: 2px; }
.ev-foot .avs { padding-left: 5px; }
.ev-foot .avs > .av { margin-left: -5px; border-width: 1.5px; border-color: var(--c-bg); }
.ev-badge { font-size: 10.5px; font-weight: 700; background: var(--frost); padding: 1px 6px; border-radius: 99px; white-space: nowrap; }
.ev-badge.all { background: var(--ok-bg); color: var(--ok-fg); }
.ev-by { font-size: 10.5px; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.size-xs .ev-body { flex-direction: row; align-items: center; padding: 2px 6px; }
.size-xs .ev-name { -webkit-line-clamp: 1; }
.size-sm .ev-name { -webkit-line-clamp: 1; }
.size-md .ev-by, .size-lg .ev-by { order: 3; }
.ev-resize { position: absolute; left: 0; right: 0; bottom: 0; height: 9px; cursor: ns-resize; }
.ev-resize::after { content: ''; position: absolute; left: 50%; bottom: 3px; width: 22px; height: 3px; margin-left: -11px; border-radius: 3px; background: currentColor; opacity: 0; transition: opacity .2s; }
.ev:hover .ev-resize::after { opacity: .35; }
.ev-busy { position: absolute; inset: 0; background: var(--frost); display: grid; place-items: center; }
.ev-ghost { position: absolute; left: 3px; right: 3px; border-radius: 11px; background: oklch(0.92 0.05 28 / .7); border: 2px dashed var(--accent); padding: 4px 8px; font-size: 12px; font-weight: 700; color: var(--accent-d); pointer-events: none; z-index: 4; font-variant-numeric: tabular-nums; }

/* Flights look like little boarding passes. */
.ev-flight { color: oklch(0.32 0.11 250); border-left: 0; cursor: pointer; padding: 5px 10px; gap: 1px;
  background:
    radial-gradient(circle at 0 50%, #fff 0 6px, transparent 6.5px),
    radial-gradient(circle at 100% 50%, #fff 0 6px, transparent 6.5px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .22) 0 6px, transparent 6px 12px),
    linear-gradient(165deg, oklch(0.93 0.05 230), oklch(0.86 0.08 238));
  box-shadow: inset 0 0 0 1.5px oklch(0.74 0.1 240), 0 2px 0 oklch(0.78 0.08 240); }
.ev-flight { overflow: clip; }
.fl-sticky { position: sticky; top: 6px; display: flex; flex-direction: column; gap: 1px; }
.ev-flight::after { content: 'FLIGHT'; position: absolute; right: 7px; top: 6px; font: 800 9px var(--font-d); letter-spacing: .12em; color: #fff; background: oklch(0.56 0.14 250); padding: 2px 5px; border-radius: 5px; }
.ev-flight.size-xs::after { display: none; }
.fl-top { display: flex; align-items: center; gap: 6px; font: 800 13px var(--font-d); padding-right: 50px; }
.fl-icon { width: 20px; height: 20px; flex: none; border-radius: 50%; background: oklch(0.56 0.14 250); color: #fff; display: grid; place-items: center; font-size: 11px; animation: planeBob 2.4s ease-in-out infinite; }
.fl-cont { font-size: 10px; font-weight: 600; opacity: .7; }
.fl-route { display: flex; align-items: center; gap: 6px; font: 800 15px var(--font-d); letter-spacing: .05em; }
.fl-route i { flex: 1; border-top: 2px dashed currentColor; opacity: .35; min-width: 8px; max-width: 70px; }
.fl-time { font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.size-xs.ev-flight .fl-route { display: none; }

/* ---------- stays board ---------- */
.stays { animation: fade .3s both; }
.stays-sum { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.stays-scroll { overflow-x: auto; border-radius: 18px; box-shadow: 0 0 0 1px var(--line); background: var(--surface); scrollbar-width: thin; scroll-snap-type: x proximity; }
.sg-day { scroll-snap-align: start; }
.stays-grid { --cw: 124px; --lh: 138px; position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(var(--cw), 1fr)); grid-template-rows: auto auto calc(var(--lanes) * var(--lh) + 64px); min-width: calc(var(--n) * var(--cw)); }
.sg-day { grid-row: 1; padding: 8px 4px; text-align: center; font-size: 11.5px; border-left: 1px solid var(--line); background: var(--c-soft); color: var(--muted); white-space: nowrap; }
.sg-day b { font: 800 16px var(--font-d); color: var(--ink); }
.sg-day.off { background: var(--surface-2); color: var(--faint); }
.sg-band { grid-row: 2; margin: 8px 3px 4px; padding: 6px 6px 6px 8px; border-radius: 14px; background: var(--c-bg); color: var(--c-fg); box-shadow: 0 3px 0 var(--c-sh); display: flex; align-items: center; gap: 7px; font-size: 13px; white-space: nowrap; overflow: hidden; min-width: 0; animation: segIn .6s var(--spring) both; transform-origin: left; }
.sg-band b { font-family: var(--font-d); font-size: 14.5px; }
.sg-status { font-size: 11.5px; font-weight: 700; background: var(--frost); padding: 2px 8px; border-radius: 99px; overflow: hidden; text-overflow: ellipsis; }
.sg-status.ok { background: var(--ok-bg); color: var(--ok-fg); }
.sg-add { margin-left: auto; border: 0; background: var(--surface); border-radius: 99px; padding: 4px 10px; font-weight: 700; font-size: 12px; color: var(--c-fg); flex: none; transition: transform .2s var(--spring); }
.sg-add:hover { transform: scale(1.08); }
.sg-col { grid-row: 3; border-left: 1px solid var(--line); display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding: 10px 6px; }
.sg-col.off { background: repeating-linear-gradient(-45deg, var(--stripe-a) 0 8px, var(--stripe-b) 8px 16px); justify-content: flex-start; }
.sg-off { font-size: 11.5px; color: var(--faint); font-weight: 600; margin-top: 8px; text-align: center; }
.sg-plus { width: 38px; height: 38px; border-radius: 12px; border: 2px dashed var(--dash); background: var(--surface); font-size: 19px; color: var(--muted); transition: all .25s var(--spring); }
.sg-plus:hover { border-color: var(--accent); color: var(--accent); transform: scale(1.12) rotate(90deg); }
.sg-lanes { grid-row: 3; grid-column: 1 / -1; position: relative; pointer-events: none; }
.stay-bar { position: absolute; left: calc(var(--a) * 100% / var(--n) + 4px); width: calc(var(--len) * 100% / var(--n) - 8px); top: calc(var(--lane) * var(--lh) + 10px); height: calc(var(--lh) - 14px); pointer-events: auto; background: var(--surface); border: 2px dashed var(--c-line); border-radius: 16px; display: flex; overflow: hidden; cursor: pointer; transition: transform .2s var(--spring), box-shadow .2s; animation: barIn .5s var(--spring) both; }
.stay-bar:hover { transform: translateY(-3px); box-shadow: 0 12px 26px -14px rgba(43, 39, 35, .45); }
.stay-bar.booked { background: var(--c-bg); border: 2px solid var(--c-solid); box-shadow: 0 3px 0 var(--c-sh); }
.sb-img { width: 96px; flex: none; background: var(--c-soft) center / cover no-repeat; display: grid; place-items: center; font-size: 30px; }
.stay-bar.booked .sb-img { background-color: var(--frost-2); }
.sb-body { padding: 8px 10px; min-width: 0; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sb-top { display: flex; gap: 6px; align-items: center; }
.sb-type { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--c-fg); }
.sb-booked { font-size: 10.5px; font-weight: 800; background: var(--ok); color: #fff; padding: 1px 7px; border-radius: 99px; animation: pop .45s var(--spring); white-space: nowrap; }
.sb-name { font: 700 14px/1.2 var(--font-d); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sb-price { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-foot { margin-top: auto; display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); min-width: 0; }
.sb-by { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stay-bar.narrow { flex-direction: column; }
.stay-bar.narrow .sb-img { width: 100%; height: 34px; font-size: 18px; }
.stay-bar.narrow .sb-body { padding: 6px 8px; }
.stay-bar.narrow .sb-name { -webkit-line-clamp: 1; font-size: 13px; }
.stay-bar.narrow .sb-foot .avs, .stay-bar.narrow .sb-by, .stay-bar.narrow .sb-type { display: none; }
.vote { border: 0; background: var(--btn); border-radius: 99px; padding: 3px 9px; font-size: 12px; font-weight: 700; color: var(--muted); transition: transform .2s var(--spring), background .2s; white-space: nowrap; }
.vote:hover { transform: scale(1.08); }
.vote.on { background: oklch(0.92 0.06 10); color: oklch(0.55 0.19 10); animation: heart .45s var(--spring); }
.vote.big { padding: 10px 16px; font-size: 14px; }
.stays-empty { position: absolute; left: calc(100% / var(--n) + 10px); top: 26px; max-width: 340px; color: var(--muted); font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.stays-empty b { color: var(--ink); font-family: var(--font-d); font-size: 16px; }
.stays-empty-art { font-size: 42px; display: inline-block; animation: sway 3s ease-in-out infinite; transform-origin: top center; width: fit-content; }

/* ---------- modals ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 100; background: rgba(43, 39, 35, .34); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); display: grid; place-items: center; padding: 20px; animation: fade .2s both; }
.modal { position: relative; width: min(560px, 100%); background: var(--card); border-radius: 28px; box-shadow: var(--shadow-pop); animation: modalIn .45s var(--spring) both; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow-y: auto; overscroll-behavior: contain; }
.modal-wide { width: min(960px, 100%); }
.modal.who { width: min(540px, 100%); }
.modal-x { position: absolute; right: 14px; top: 14px; z-index: 5; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--frost); box-shadow: 0 4px 14px -6px rgba(0, 0, 0, .4); font-size: 14px; transition: transform .2s var(--spring); }
.modal.no-x .modal-x { display: none; }
.modal-x:hover { transform: rotate(90deg) scale(1.08); }
.photo-drop { position: relative; background: var(--c-bg); display: grid; place-items: center; overflow: hidden;
  background-image: radial-gradient(circle at 16% 28%, rgba(255, 255, 255, .5) 0 34px, transparent 35px), radial-gradient(circle at 86% 74%, rgba(255, 255, 255, .35) 0 58px, transparent 59px), radial-gradient(circle at 70% 18%, rgba(255, 255, 255, .3) 0 14px, transparent 15px); }
.photo-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; animation: fade .4s; }
.photo-drop.over { outline: 4px dashed var(--c-solid); outline-offset: -12px; }
.photo-emoji { font-size: 78px; line-height: 1; animation: bob 2.6s ease-in-out infinite alternate; filter: drop-shadow(0 8px 0 var(--c-sh)); }
.photo-actions { position: absolute; left: 18px; right: 60px; bottom: 14px; display: flex; flex-wrap: wrap; gap: 6px; z-index: 2; }
.photo-actions a.chip-btn { text-decoration: none; color: var(--ink); }
.photo-actions .chip-btn { animation: popIn .2s var(--spring) both; }
.photo-toggle { opacity: .88; }
.photo-toggle:hover, .photo-drop:hover .photo-toggle { opacity: 1; }
.photo-close { padding: 7px 10px; }
.photo-link { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 3; display: flex; align-items: center; gap: 6px; padding: 5px 5px 5px 12px; border-radius: 999px; background: var(--glass); box-shadow: 0 8px 24px -10px rgba(0, 0, 0, .45); animation: popIn .25s var(--spring); }
.photo-link input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 14px; padding: 6px 2px; color: var(--ink); }
.photo-link input:focus { outline: none; }
.em-cover { height: 210px; border-radius: 28px 28px 0 0; }
.flight-cover { background: linear-gradient(165deg, oklch(0.9 0.06 228), oklch(0.8 0.1 242)); }
.flight-cover .photo-emoji { display: none; }
.pass { position: absolute; inset: 26px 30px 60px; background: var(--surface); border-radius: 18px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 12px 24px; box-shadow: 0 14px 30px -14px rgba(0, 30, 80, .55); animation: modalIn .5s .1s var(--spring) both; }
.pass-side { display: flex; flex-direction: column; font-size: 12.5px; color: var(--muted); }
.pass-side:last-child { text-align: right; align-items: flex-end; }
.pass-side b { color: var(--ink); font: 700 15px var(--font-d); }
.pass-code { font: 800 40px/1 var(--font-d); color: oklch(0.35 0.11 250); letter-spacing: .02em; }
.pass-mid { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 0 12px; }
.pass-plane { font-size: 22px; color: oklch(0.56 0.14 250); animation: planeBob 2.4s ease-in-out infinite; }
.pass-no { font: 800 13px var(--font-d); color: var(--muted); letter-spacing: .06em; }
.pass-line { width: 90px; border-top: 2px dashed var(--line2); }
.em-body { padding: 18px 28px 22px; }
.em-title-row { display: flex; align-items: center; gap: 10px; }
.em-title { flex: 1; border: 0; background: transparent; font: 800 27px/1.15 var(--font-d); padding: 6px 8px; margin-left: -8px; border-radius: 12px; min-width: 0; letter-spacing: -.015em; }
.em-title:hover { background: var(--btn); }
.em-title:focus { background: var(--surface); outline: 2px solid var(--line2); }
.em-title::placeholder { color: var(--faint); }
.emoji-pick { position: relative; flex: none; }
.emoji-btn { border: 0; background: var(--btn); border-radius: 14px; width: 42px; height: 42px; font-size: 22px; display: grid; place-items: center; transition: transform .25s var(--spring); }
.emoji-btn:hover { transform: rotate(-10deg) scale(1.1); }
.emoji-lg { width: 50px; height: 50px; font-size: 28px; border-radius: 16px; }
.emoji-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; display: grid; grid-template-columns: repeat(7, 38px); gap: 2px; width: max-content; }
.emoji-opt { width: 38px; height: 38px; border: 0; background: transparent; border-radius: 10px; font-size: 20px; transition: transform .15s var(--spring); }
.emoji-opt:hover, .emoji-opt.on { background: var(--btn); transform: scale(1.18); }
.color-dots { display: flex; gap: 7px; margin: 8px 0 2px; flex-wrap: wrap; }
.color-dot { width: 22px; height: 22px; border-radius: 50%; border: 3px solid #fff; background: oklch(0.72 0.13 var(--h)); box-shadow: 0 0 0 1px var(--line2); transition: transform .2s var(--spring); padding: 0; }
.color-dot:hover { transform: scale(1.15); }
.color-dot.on { transform: scale(1.22); box-shadow: 0 0 0 2px var(--ink); }
.em-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 0 30px; margin-top: 6px; }
.field { margin-top: 16px; }
.field-label { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 7px; }
.input, .when select, .mini select, input[type="time"] { border: 0; background: var(--btn); border-radius: 12px; padding: 9px 12px; font-size: 14px; min-width: 0; }
.input:focus, .when select:focus, .mini select:focus, input[type="time"]:focus { outline: 2px solid var(--line2); background: var(--surface); }
textarea.input { width: 100%; resize: none; line-height: 1.5; min-height: 70px; display: block; }
.when { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.when-times { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.where { display: flex; gap: 8px; align-items: center; }
.where .input { flex: 1 1 180px; min-width: 0; }
.mini { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.people-toggle { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pt { border: 0; display: flex; align-items: center; gap: 6px; padding: 4px 11px 4px 4px; border-radius: 999px; background: var(--btn); font-weight: 600; font-size: 13px; color: var(--muted); transition: all .2s var(--spring); }
.pt .av { filter: grayscale(1); opacity: .45; transition: all .2s; }
.pt:hover { transform: translateY(-1px); }
.pt:active { transform: scale(.93); }
.pt.on { background: var(--c-bg); color: var(--c-fg); }
.pt.on .av { filter: none; opacity: 1; }
.pt-check { display: none; font-weight: 800; }
.pt.on .pt-check { display: inline; animation: pop .3s var(--spring); }
.pt-all { border: 0; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600; text-decoration: underline; }

.cl-progress { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.cl-bar { flex: 1; height: 8px; background: var(--btn); border-radius: 99px; overflow: hidden; }
.cl-bar i { display: block; height: 100%; background: linear-gradient(90deg, oklch(0.76 0.14 150), oklch(0.72 0.14 175)); border-radius: 99px; transition: width .6s var(--spring); }
.checklist ul { list-style: none; margin: 0; padding: 0; }
.cl-item { display: flex; align-items: center; gap: 8px; padding: 2px 0; animation: rise .3s both; }
.cl-box { width: 24px; height: 24px; flex: none; border-radius: 8px; border: 2px solid var(--dash); background: var(--surface); display: grid; place-items: center; padding: 0; transition: all .25s var(--spring); }
.cl-box svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 16; stroke-dashoffset: 16; transition: stroke-dashoffset .3s .08s; }
.cl-box:hover { border-color: var(--ok); transform: scale(1.08); }
.cl-item.done .cl-box { background: var(--ok); border-color: var(--ok); transform: scale(1.06); }
.cl-item.done .cl-box svg { stroke-dashoffset: 0; }
.cl-text { flex: 1; border: 0; background: transparent; padding: 5px 6px; border-radius: 8px; font-size: 14px; min-width: 0; transition: color .3s; }
.cl-item.done .cl-text { text-decoration: line-through; color: var(--faint); }
.cl-text:focus { background: var(--btn); outline: none; }
.cl-del { border: 0; background: transparent; color: var(--faint); opacity: 0; width: 24px; height: 24px; border-radius: 50%; flex: none; }
.cl-item:hover .cl-del, .cl-del:focus-visible { opacity: 1; }
.cl-del:hover { background: var(--bad-bg); color: var(--bad-fg); }
.cl-add { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.cl-plus { width: 24px; height: 24px; border-radius: 8px; border: 2px dashed var(--dash); display: grid; place-items: center; color: var(--faint); font-weight: 700; flex: none; }
.cl-add input { flex: 1; border: 0; background: transparent; padding: 6px; font-size: 14px; min-width: 0; border-radius: 8px; }
.cl-add input:focus { outline: none; background: var(--btn); }

.comments { display: flex; flex-direction: column; gap: 10px; }
.comment { display: flex; gap: 8px; align-items: flex-start; animation: rise .3s both; }
.bubble { background: var(--btn); border-radius: 4px 16px 16px 16px; padding: 7px 11px; min-width: 0; flex: 1; }
.comment.mine .bubble { background: var(--accent-soft); }
.c-meta { font-size: 12px; display: flex; gap: 6px; align-items: baseline; }
.c-meta span { color: var(--faint); }
.c-del { border: 0; background: none; color: var(--faint); margin-left: auto; font-size: 11px; opacity: 0; }
.comment:hover .c-del { opacity: 1; }
.c-text { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-add { display: flex; gap: 8px; align-items: flex-end; }
.comment-add textarea { flex: 1; border: 0; background: var(--btn); border-radius: 16px; padding: 8px 12px; resize: none; font-size: 14px; max-height: 140px; min-width: 0; }
.comment-add textarea:focus { outline: 2px solid var(--line2); background: var(--surface); }

.em-foot { display: flex; align-items: center; gap: 8px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.by-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.by-line b { color: var(--ink); }
.spacer { flex: 1; }
.type-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.type-chip { border: 0; background: var(--btn); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; transition: transform .2s var(--spring); }
.type-chip:hover { transform: translateY(-1px); }
.type-chip.on { background: var(--ink); color: var(--on-ink); animation: pop .3s var(--spring); }
.price-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.price-input { width: 130px; }
.price-row + p { margin-top: 6px; }
.vote-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.book-btn { width: 100%; border: 2px dashed var(--ok); background: transparent; color: var(--ok-fg); border-radius: 16px; padding: 12px; font: 700 15px var(--font-d); transition: all .25s var(--spring); }
.book-btn:hover { background: var(--ok-bg); transform: translateY(-1px); }
.book-btn.on { background: var(--ok); color: #fff; border-style: solid; box-shadow: 0 4px 0 oklch(0.5 0.12 150); }
.book-btn small { font: 500 12px var(--font); opacity: .9; }
.booked-stamp { position: absolute; right: 64px; top: 24px; z-index: 2; transform: rotate(8deg); border: 3px solid var(--ok); color: var(--ok-fg); background: var(--frost); font: 800 18px var(--font-d); padding: 4px 12px; border-radius: 10px; animation: stamp .55s var(--spring) both; text-transform: uppercase; letter-spacing: .06em; }
.gone { padding: 40px 30px; text-align: center; }
.gone h3 { font-size: 22px; margin: 8px 0 4px; }
.gone .btn { margin-top: 16px; }

.who-body { padding: 36px 28px 28px; text-align: center; }
.who-body h2 { font-size: 26px; margin-top: 6px; }
.who-body p { margin-top: 6px; }
.big-emoji { font-size: 54px; display: inline-block; line-height: 1; }
.wave { animation: wave 1.8s ease-in-out infinite; transform-origin: 70% 75%; }
.who-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(86px, 1fr)); gap: 10px; margin-top: 22px; }
.who-opt { border: 0; background: var(--c-soft); border-radius: 20px; padding: 16px 8px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; font: 700 15px var(--font-d); transition: transform .25s var(--spring), background .2s; animation: pop .5s var(--spring) both; animation-delay: calc(.1s + var(--i) * 70ms); }
.who-opt:hover { transform: translateY(-5px) rotate(-3deg); background: var(--c-bg); }
.who-opt.on { box-shadow: 0 0 0 3px var(--c-solid); }

/* ---------- wishlists ---------- */
.page-head { margin: 6px 0 20px; animation: rise .5s both; }
.page-head h1 { font-size: 36px; font-weight: 800; }
.page-head p { max-width: 560px; margin-top: 6px; }
.wish-cols { display: grid; grid-template-columns: repeat(5, minmax(244px, 1fr)); gap: 14px; overflow-x: auto; padding: 4px 2px 12px; align-items: start; scrollbar-width: thin; }
.wish-col { background: var(--c-soft); border-radius: 24px; padding: 14px; animation: rise .5s both; animation-delay: calc(var(--i) * 70ms); box-shadow: 0 0 0 1px oklch(0.91 0.035 var(--h)); }
.wish-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.wish-head b { display: block; font: 700 17px/1.2 var(--font-d); }
.wish-head .small { display: block; }
.wish-add { background: var(--surface); border-radius: 18px; padding: 8px 10px 10px; margin-bottom: 10px; box-shadow: 0 0 0 2px var(--c-line); }
.wish-add-row { display: flex; gap: 8px; align-items: center; }
.wish-add-row.wrap { flex-wrap: wrap; margin-top: 6px; gap: 5px; }
.wish-add input { flex: 1; border: 0; background: transparent; font-size: 14px; padding: 8px 2px; min-width: 0; }
.wish-add input:focus { outline: none; }
.city-chip { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--c-bg); color: var(--c-fg); border: 0; white-space: nowrap; }
.city-chip.any { background: var(--chip); color: var(--muted); }
.city-chip.pick { opacity: .5; transition: all .2s var(--spring); padding: 4px 10px; }
.city-chip.pick:hover { opacity: .85; }
.city-chip.pick.on { opacity: 1; box-shadow: 0 0 0 2px currentColor; transform: scale(1.05); }
.wish-list { display: flex; flex-direction: column; gap: 10px; }
.wish-card { position: relative; background: var(--surface); border-radius: 18px; padding: 12px; box-shadow: 0 2px 0 oklch(0.89 0.04 var(--h)); animation: rise .45s both; transition: transform .25s var(--spring), box-shadow .2s; }
.wish-card:hover { transform: translateY(-2px) rotate(-.5deg); box-shadow: 0 10px 20px -12px rgba(43, 39, 35, .35); }
.wish-main { display: flex; gap: 10px; align-items: flex-start; }
.wish-emoji { width: 40px; height: 40px; flex: none; border-radius: 13px; background: var(--c-soft); display: grid; place-items: center; font-size: 20px; transition: transform .3s var(--spring); }
.wish-card:hover .wish-emoji { transform: rotate(-12deg) scale(1.12); }
.wish-text { flex: 1; min-width: 0; }
.wish-text b { font: 700 14.5px/1.25 var(--font-d); display: block; }
.wish-tags { margin-top: 4px; }
.wish-note { font-size: 12px; color: var(--muted); margin-top: 5px; }
.wish-del { border: 0; background: none; color: var(--faint); opacity: 0; width: 24px; height: 24px; border-radius: 50%; flex: none; }
.wish-card:hover .wish-del, .wish-del:focus-visible { opacity: 1; }
.wish-del:hover { background: var(--bad-bg); color: var(--bad-fg); }
.wish-actions { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.metoo { border: 0; background: var(--btn); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; transition: all .2s var(--spring); white-space: nowrap; }
.metoo:hover { transform: scale(1.05); }
.metoo.on { background: oklch(0.62 0.16 25); color: #fff; box-shadow: 0 3px 0 oklch(0.5 0.15 25); animation: pop .35s var(--spring); }
.sched-chip { border: 0; background: var(--ok-bg); color: var(--ok-fg); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; white-space: nowrap; transition: transform .2s var(--spring); }
.sched-chip:hover { transform: scale(1.05); }
.day-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 25; width: 250px; }
.day-pop-title { font-size: 12px; font-weight: 800; color: var(--muted); margin: 2px 4px 8px; text-transform: uppercase; letter-spacing: .06em; }
.day-pop-grid { display: flex; flex-wrap: wrap; gap: 5px; max-height: 230px; overflow: auto; }
.day-opt { border: 0; background: var(--c-bg); color: var(--c-fg); border-radius: 10px; padding: 6px 9px; font-size: 12.5px; font-weight: 700; transition: all .2s var(--spring); }
.day-opt:hover { transform: translateY(-2px); box-shadow: 0 3px 0 var(--c-sh); }
.wish-card.impossible { background: var(--surface-2); }
.wish-card.impossible .wish-text b { text-decoration: line-through; text-decoration-color: rgba(0, 0, 0, .3); color: var(--muted); }
.sticker { position: absolute; right: 12px; top: -9px; transform: rotate(6deg); background: oklch(0.68 0.16 25); color: #fff; font: 800 11px var(--font-d); padding: 3px 9px; border-radius: 8px; box-shadow: 0 2px 0 oklch(0.5 0.14 25); }
.wish-empty { color: var(--muted); font-size: 13px; text-align: center; padding: 18px 8px; }

/* ---------- toasts, confetti, petals ---------- */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: var(--on-ink); padding: 10px 18px; border-radius: 22px; font-weight: 600; font-size: 14px; box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .5); animation: toastIn .45s var(--spring) both; max-width: min(560px, 90vw); text-align: center; line-height: 1.4; }
.toast.error { background: var(--bad-fg); }
.confetti { position: fixed; z-index: 300; width: 8px; height: 11px; border-radius: 2px; pointer-events: none; }
.petals { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.petal { position: absolute; top: -20px; width: 13px; height: 11px; background: linear-gradient(135deg, #ffd6e0, #f5a3ba); border-radius: 80% 0 80% 0; opacity: .85; animation: fall linear infinite; }

/* ---------- login & boot ---------- */
.login-body { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 20px; overflow: hidden;
  background: radial-gradient(circle at 15% 10%, oklch(0.95 0.04 10), transparent 42%), radial-gradient(circle at 90% 92%, oklch(0.94 0.04 225), transparent 46%), var(--bg); }
.login-card { position: relative; z-index: 3; background: var(--card); border-radius: 32px; padding: 42px 34px 34px; width: min(420px, 100%); text-align: center; box-shadow: var(--shadow-pop); animation: modalIn .6s var(--spring) both; }
.login-card .logo-big { margin: 0 auto 20px; animation: wiggle 3.2s ease-in-out infinite; }
.login-card h1 { font-size: 31px; font-weight: 800; }
.login-card p { margin-top: 6px; }
.login-card form { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.login-card input { border: 0; background: var(--btn); border-radius: 16px; padding: 14px 16px; font-size: 16px; text-align: center; }
.login-card input:focus { outline: 2.5px solid var(--accent); background: var(--surface); }
.login-card .btn { justify-content: center; padding: 14px; font-size: 16px; }
.login-error { color: var(--bad-fg); font-weight: 600; margin-top: 14px !important; }
.shake { animation: shake .5s, modalIn .6s var(--spring) both; }
.boot { min-height: 70vh; display: grid; place-items: center; padding: 20px; }
.boot .spin { animation: wiggle .9s ease-in-out infinite; }
.boot-card { max-width: 440px; text-align: center; }
.boot-card p { margin-top: 8px; }

/* ---------- smaller screens ---------- */
@media (max-width: 760px) {
  .topbar-in { flex-wrap: wrap; gap: 8px 10px; padding: 8px 14px; }
  .brand-sub { display: none; }
  .brand-title { font-size: 18px; }
  .logo { width: 36px; height: 36px; font-size: 17px; border-radius: 11px; }
  .tabs { order: 3; width: 100%; margin: 0; }
  .tabs { gap: 2px; }
  .tabs a { flex: 1; text-align: center; padding: 8px 4px; font-size: 13px; min-width: 0; }
  .top-right { margin-left: auto; gap: 8px; }
  .countdown { padding: 5px 9px; font-size: 12px; }
  .me-btn .av { --s: 26px !important; }
  html { scroll-padding-top: 120px; }
  .page { padding: 14px 12px 50px; }
  .card { padding: 16px; border-radius: 22px; }
  .tl-scroll { margin: 0 -16px; padding: 8px 16px 6px; }
  .cal-card { padding: 14px 10px 10px; }
  .cal-toolbar { gap: 8px; }
  .cal-tools { margin-left: 0; width: 100%; }
  .cal-tools .btn-ink { margin-left: auto; }
  .cal-grid { --gw: 40px; }
  .cal-scroll { max-height: 78vh; } /* leave room to scroll the page past it on a phone */
  .cal-arrow { width: 36px; height: 36px; margin-top: -18px; font-size: 20px; }
  .cal-arrow.prev { left: -8px; }
  .cal-arrow.next { right: -8px; }
  .cal-gutter span { right: 4px; font-size: 10px; }
  .em-cover { height: 170px; border-radius: 24px 24px 0 0; }
  .em-body { padding: 14px 18px 18px; }
  .em-title { font-size: 22px; }
  .em-grid { grid-template-columns: 1fr; }
  .pass { inset: 18px 16px 56px; padding: 10px 14px; }
  .pass-code { font-size: 30px; }
  .pass-line { width: 50px; }
  .wish-cols { grid-template-columns: repeat(5, 84vw); scroll-snap-type: x mandatory; }
  .wish-col { scroll-snap-align: start; }
  .page-head h1 { font-size: 30px; }
  .route-row { gap: 8px; }
  .map-edge, .map-dot small, .sea-label { display: none; }
  .pin-label { font-size: 11px; padding: 2px 7px; }
  .map-badge { font-size: 12px; padding: 5px 10px; }
  .map-play { padding: 8px 12px; font-size: 13px; }
  .ds-label { min-width: 104px; font-size: 12px; }
  .map-controls { position: relative; left: auto; right: auto; bottom: auto; padding: 10px 10px 12px; background: transparent; flex-wrap: nowrap; }
  .map-controls .day-stepper { box-shadow: 0 0 0 1px var(--line); }
  .code-chip { width: 40px; height: 40px; font-size: 13px; }
  .stepper-n { min-width: 56px; }
}
@media (max-width: 640px) {
  .modal-wrap { padding: 0; align-items: end; }
  .modal { border-radius: 24px 24px 0 0; max-height: 94vh; max-height: 94dvh; animation: sheetUp .38s cubic-bezier(.2, .8, .2, 1) both; }
}
@media (hover: none) {
  .row-tools, .cl-del, .wish-del, .c-del { opacity: 1; }
}
/* Less motion: keep quick feedback, drop the looping decorations. */
@media (prefers-reduced-motion: reduce) {
  .petals, .petals-local { display: none; }
  .tl-plane, .fl-icon, .dh-flight, .pass-plane, .cd-emoji, .sun-glow, .sea-waves, .photo-emoji, .stays-empty-art, .wave,
  .tl-cursor span, .login-card .logo-big, .pin.sel::before, .tok-stay { animation: none !important; }
  .card, .wish-col, .route-row, .tl-seg, .sg-band, .stay-bar, .ev, .pin { animation-duration: .2s !important; }
}


/* ---------- calendar views ---------- */
/* Total: a month calendar. Each week is split into morning / afternoon / evening rows that line up across the week. */
.mv-grid { display: flex; flex-direction: column; gap: 1px; background: var(--line2); border: 1px solid var(--line2); border-radius: 16px; overflow: hidden; }
.mv-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); column-gap: 1px; }
.mv-wd { background: var(--surface-2); padding: 8px 8px 6px; font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; text-align: center; }
.mv-cell { display: flex; flex-direction: column; min-height: 150px; background: var(--surface); min-width: 0; position: relative; cursor: pointer; transition: background .2s; box-shadow: inset 0 3px 0 var(--c-solid); }
.mv-cell:hover { background: var(--c-soft); }
.mv-cell.air { box-shadow: inset 0 3px 0 oklch(0.62 0.13 245); }
.mv-cell.out { background: var(--surface-2); box-shadow: none; cursor: default; }
.mv-cell.over { background: var(--c-bg); box-shadow: inset 0 0 0 2px var(--c-solid); }
.mv-top { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; padding: 7px 6px 5px 4px; min-width: 0; }
.mv-num { border: 0; background: none; min-width: 28px; height: 28px; padding: 0 7px; border-radius: 999px; font: 800 14px/1 var(--font-d); color: var(--ink); transition: background .15s, color .15s, transform .2s var(--spring); white-space: nowrap; flex: none; }
.mv-num small { font-size: 10.5px; color: var(--muted); font-weight: 700; }
.mv-cell:hover button.mv-num, button.mv-num:focus-visible { background: var(--c-bg); color: var(--c-fg); transform: scale(1.08); }
.mv-cell.out .mv-num { color: var(--faint); display: inline-flex; align-items: center; }
.mv-city { font-size: 11.5px; font-weight: 700; color: var(--c-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.mv-cell.air .mv-city { color: oklch(0.55 0.13 245); }
.mv-daytitle { flex-basis: 100%; font-size: 11.5px; line-height: 1.3; color: var(--muted); padding: 2px 3px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mv-list { display: flex; flex-direction: column; gap: 4px; padding: 2px 5px 8px; min-width: 0; }
.mv-ev { border: 0; display: flex; flex-direction: column; gap: 1px; width: 100%; padding: 4px 6px 5px 8px; border-radius: 8px; background: var(--c-soft); box-shadow: inset 3px 0 0 var(--c-solid), 0 0 0 1px var(--c-line); text-align: left; color: var(--c-text); cursor: grab; min-width: 0; transition: background .15s, opacity .2s, transform .2s var(--spring); }
.mv-ev:hover { background: var(--c-bg); transform: translateY(-1px); }
.mv-ev.flight { background: oklch(0.6 0.13 245); box-shadow: none; color: #fff; cursor: pointer; }
.mv-ev.opt { outline: 1.5px dashed var(--c-solid); outline-offset: -1.5px; }
.mv-ev.flight:hover { background: oklch(0.54 0.14 245); }
.mv-ev.dim { opacity: .3; }
.mv-when { font-size: 10.5px; font-weight: 700; color: var(--c-fg); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv-ev.flight .mv-when { color: rgba(255, 255, 255, .85); }
.mv-name { font-size: 12.5px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mv-emoji { font-size: 12px; }
@media (max-width: 760px) {
  .mv-top { justify-content: center; padding: 6px 0 3px; }
  .mv-num { min-width: 24px; height: 24px; padding: 0 4px; font-size: 12.5px; }
  .mv-city, .mv-daytitle, .mv-when, .mv-txt, .mv-num small { display: none; }
  .mv-cell { min-height: 84px; }
  .mv-list { padding: 2px 2px 5px; gap: 2px; }
  .mv-ev { align-items: center; padding: 2px 0; border-radius: 6px; background: var(--c-bg); box-shadow: none; }
  .mv-name { font-size: 11px; line-height: 1.15; }
  .mv-wd { font-size: 10px; letter-spacing: .02em; padding: 6px 2px; }
}

/* Day popup: one day of the calendar in focus. */
.modal.day-focus { width: min(720px, 100%); }
.dp-body { padding: 16px 18px 14px; }
.dp-bar { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; padding-right: 46px; margin-bottom: 12px; }
.dp-title { font-size: 21px; line-height: 1.1; }
.dp-title small { display: block; font: 600 12.5px var(--font); color: var(--muted); margin-top: 3px; }
.dp-title small b { color: var(--c-fg); }
.dp-title.air small b { color: oklch(0.55 0.13 245); }
.dp-bar .btn { margin-left: auto; }
.day-focus .cal-scroll { max-height: max(300px, calc(100dvh - 280px)); }
.dp-hint { margin-top: 10px; }
.day-focus .dh-top { display: none; }
.day-focus .cal-dh { padding-top: 8px; }
@media (max-width: 760px) {
  .dp-body { padding: 14px 12px 12px; }
  .dp-bar { padding-right: 40px; }
  .dp-bar .btn { margin-left: 0; width: 100%; order: 3; }
  .dp-title { font-size: 18px; }
  .day-focus .cal-scroll { max-height: max(280px, calc(94dvh - 200px)); }
}

/* ---------- route planner: one compact strip ---------- */
.route-card { animation-delay: .25s; padding: 16px 20px; }
.rp-head { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 10px; }
.rp-head h2 { font-size: 18px; }
.rp-hint { font-size: 12.5px; color: var(--muted2); margin-left: auto; }
.rp-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.rp-arrow { color: var(--faint); font-weight: 800; font-size: 16px; }
.rp-flight { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 12px; font-size: 12.5px; color: oklch(0.38 0.08 245);
  background: repeating-linear-gradient(-45deg, var(--air-a) 0 8px, var(--air-b) 8px 16px); }
.rp-flight small { color: oklch(0.5 0.06 240); }
.rp-stop { position: relative; display: flex; align-items: center; gap: 8px; padding: 5px 6px 5px 5px; border-radius: 14px; background: var(--c-soft); box-shadow: inset 0 0 0 1px var(--c-line); animation: rise .4s both; animation-delay: calc(.1s + var(--i) * 50ms); transition: background .2s, box-shadow .2s; }
.rp-stop.sel { background: var(--c-bg); box-shadow: inset 0 0 0 2px var(--c-solid); }
.rp-stop.out { opacity: .5; }
.rp-text { display: flex; flex-direction: column; line-height: 1.15; }
.rp-text b { font: 700 14px var(--font-d); }
.rp-text small { font-size: 11px; color: var(--muted); white-space: nowrap; }
.stepper.sm { padding: 2px; }
.stepper.sm button { width: 24px; height: 24px; font-size: 14px; }
.stepper.sm .stepper-n { min-width: 30px; font-size: 12px; }
.rp-tools { display: flex; gap: 0; width: 0; overflow: hidden; opacity: 0; transition: width .2s, opacity .2s; }
.rp-stop:hover .rp-tools, .rp-stop:focus-within .rp-tools { width: 66px; opacity: 1; }
.rp-tools button { width: 22px; height: 22px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 12px; padding: 0; flex: none; }
.rp-tools button:hover:not(:disabled) { background: var(--surface); color: var(--ink); }
.rp-tools button:disabled { opacity: .3; }
.rp-add-wrap { position: relative; }
.rp-add { border: 2px dashed var(--dash); background: transparent; border-radius: 12px; padding: 8px 12px; font-weight: 700; font-size: 13px; color: var(--muted); transition: all .2s; }
.rp-add:hover { border-color: var(--accent); color: var(--accent-d); background: var(--accent-soft); }
.rp-add-wrap .place-pop { top: auto; bottom: calc(100% + 8px); left: 50%; right: auto; transform: translateX(-50%); width: min(520px, calc(100vw - 40px)); }
.route-card .route-gap { margin: 10px 0 0; padding: 8px 12px; font-size: 13px; }
@media (hover: none) { .rp-tools { width: 66px; opacity: 1; } }
@media (max-width: 760px) { .rp-hint { display: none; } .rp-add-wrap .place-pop { left: 0; transform: none; } }

/* ---------- wish editing ---------- */
.wish-add-btn { width: 100%; margin-bottom: 10px; border: 2px dashed var(--c-line); background: var(--frost-2); border-radius: 14px; padding: 9px; font-weight: 700; font-size: 13px; color: var(--c-fg); transition: all .2s var(--spring); }
.wish-add-btn:hover { background: var(--surface); border-style: solid; transform: translateY(-1px); }
.wish-add .wish-add-row + .wish-add-row { margin-top: 8px; }
.wish-edit { border: 0; background: none; color: var(--faint); opacity: 0; width: 26px; height: 26px; border-radius: 50%; flex: none; font-size: 14px; transition: opacity .15s, background .15s; }
.wish-card:hover .wish-edit, .wish-edit:focus-visible { opacity: 1; }
.wish-edit:hover { background: var(--c-soft); color: var(--c-fg); }
.wish-by { font-size: 11px; color: var(--faint); margin-top: 3px; }
.wish-card.editing { box-shadow: 0 0 0 2px var(--c-solid); display: flex; flex-direction: column; gap: 8px; }
.wish-card.editing:hover { transform: none; }
.wish-edit-title { flex: 1; min-width: 0; border: 0; background: var(--btn); border-radius: 10px; padding: 8px 10px; font: 700 14px var(--font-d); }
.wish-edit-title:focus, .wish-edit-note:focus { outline: 2px solid var(--line2); background: var(--surface); }
.wish-edit-note { border: 0; background: var(--btn); border-radius: 10px; padding: 8px 10px; font-size: 13px; resize: vertical; min-height: 44px; }
.wish-check { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.wish-card.editing .btn-danger { padding: 6px 10px; font-size: 13px; }
@media (hover: none) { .wish-edit { opacity: 1; } }


/* ---------- attachments ---------- */
.attachments { display: flex; flex-direction: column; gap: 6px; border-radius: 14px; transition: box-shadow .2s; }
.attachments.over { box-shadow: 0 0 0 3px oklch(0.75 0.12 250); }
.att { display: flex; align-items: center; gap: 4px; background: var(--btn); border-radius: 12px; padding: 6px; animation: rise .3s both; }
.att-main { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-decoration: none; color: var(--ink); }
.att-thumb { width: 40px; height: 40px; border-radius: 9px; background: var(--surface) center / cover no-repeat; flex: none; }
.att-icon { width: 40px; height: 40px; border-radius: 9px; background: var(--surface); display: grid; place-items: center; font-size: 20px; flex: none; transition: transform .25s var(--spring); }
.att:hover .att-icon { transform: rotate(-8deg) scale(1.08); }
.att-text { display: flex; flex-direction: column; min-width: 0; }
.att-text b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-text small { font-size: 11.5px; color: var(--muted); }
.att-main:hover b { text-decoration: underline; }
.att-btn { width: 30px; height: 30px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; text-decoration: none; font-size: 13px; flex: none; }
.att-btn:hover { background: var(--surface); color: var(--ink); }
.att-del:hover { background: var(--bad-bg); color: var(--bad-fg); }
.att-add { border: 2px dashed var(--dash); background: transparent; border-radius: 12px; padding: 10px; font-size: 13px; font-weight: 600; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; transition: all .2s; }
.att-add small { font-weight: 500; color: var(--faint); }
.att-add:hover:not(:disabled) { border-color: oklch(0.6 0.12 250); color: oklch(0.45 0.12 250); background: oklch(0.97 0.02 250); }

.who-last { font: 700 10.5px var(--font); background: var(--c-solid); color: #fff; padding: 1px 8px; border-radius: 99px; margin-top: -3px; }

@media (max-width: 760px) {
}
@media (prefers-reduced-motion: reduce) {
}


/* ---------- dark mode ---------- */
:root[data-theme="dark"] {
  --bg: #16141a;
  --ink: #f1ece6;
  --muted: #aaa29a;
  --muted2: #9a928a;
  --faint: #6f6861;
  --card: #211e25;
  --line: rgba(255, 255, 255, .08);
  --line2: rgba(255, 255, 255, .15);
  --chip: #2f2b33;
  --btn: #2c2830;
  --btn-h: #38333d;
  --surface: #29252d;
  --surface-2: #1c1a20;
  --glass: rgba(33, 30, 37, .94);
  --frost: rgba(0, 0, 0, .28);
  --frost-2: rgba(0, 0, 0, .18);
  --dash: #4a4450;
  --on-ink: #16141a;
  --accent: oklch(0.7 0.15 28);
  --accent-d: oklch(0.78 0.13 28);
  --accent-soft: oklch(0.32 0.06 28);
  --ok: oklch(0.66 0.13 150);
  --ok-bg: oklch(0.33 0.06 150);
  --ok-fg: oklch(0.86 0.1 150);
  --warn-bg: oklch(0.35 0.06 75);
  --warn-fg: oklch(0.88 0.1 80);
  --bad-bg: oklch(0.34 0.08 25);
  --bad-fg: oklch(0.8 0.13 25);
  --sky: oklch(0.29 0.04 240);
  --topbar: rgba(22, 20, 26, .86);
  --stripe-a: #221f26;
  --stripe-b: #1b191f;
  --air-a: oklch(0.28 0.035 240);
  --air-b: oklch(0.32 0.05 240);
  --air-fg: oklch(0.85 0.09 240);
  --air-sh: oklch(0.22 0.04 240);
  --sea: oklch(0.29 0.04 240);
  --wave: oklch(0.36 0.05 240);
  --land: #3a3540;
  --land-stroke: #4d4655;
  --land-2: #2d2932;
  --land-2-stroke: #39343f;
  --land-shadow: oklch(0.22 0.03 240);
  --sea-label: oklch(0.6 0.05 240);
  --casing: #1d2733;
  --ghost-route: rgba(255, 255, 255, .25);
  --shadow-card: 0 0 0 1px var(--line), 0 16px 36px -24px rgba(0, 0, 0, .8);
  --shadow-pop: 0 24px 60px -20px rgba(0, 0, 0, .8), 0 0 0 1px var(--line);
  color-scheme: dark;
}
:root[data-theme="dark"] .hue {
  --c-bg: oklch(0.38 0.07 var(--h));
  --c-fg: oklch(0.87 0.1 var(--h));
  --c-sh: oklch(0.27 0.06 var(--h));
  --c-soft: oklch(0.27 0.03 var(--h));
  --c-solid: oklch(0.66 0.14 var(--h));
  --c-dark: oklch(0.42 0.12 var(--h));
  --c-line: oklch(0.4 0.06 var(--h));
  --c-text: oklch(0.93 0.05 var(--h));
}
:root[data-theme="dark"] ::selection { background: oklch(0.45 0.1 28); }
:root[data-theme="dark"] .btn-ink { box-shadow: 0 3px 0 rgba(255, 255, 255, .25); }
:root[data-theme="dark"] .btn-chunky { box-shadow: 0 4px 0 rgba(0, 0, 0, .5), 0 0 0 1.5px var(--line2); }
:root[data-theme="dark"] .ev-flight {
  color: oklch(0.92 0.06 240);
  background: radial-gradient(circle at 0 50%, var(--surface) 0 6px, transparent 6.5px), radial-gradient(circle at 100% 50%, var(--surface) 0 6px, transparent 6.5px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .05) 0 6px, transparent 6px 12px), linear-gradient(165deg, oklch(0.36 0.06 240), oklch(0.3 0.07 245));
  box-shadow: inset 0 0 0 1.5px oklch(0.5 0.1 240), 0 2px 0 oklch(0.2 0.04 240);
}
:root[data-theme="dark"] .flight-cover { background: linear-gradient(165deg, oklch(0.36 0.07 235), oklch(0.28 0.08 245)); }
:root[data-theme="dark"] .pass-code { color: oklch(0.85 0.1 240); }
:root[data-theme="dark"] .rf-icon { color: oklch(0.8 0.12 240); box-shadow: 0 3px 0 var(--air-sh); }
:root[data-theme="dark"] .route-flight, :root[data-theme="dark"] .rp-flight { color: var(--air-fg); }
:root[data-theme="dark"] .route-flight small, :root[data-theme="dark"] .rp-flight small { color: oklch(0.72 0.06 240); }
:root[data-theme="dark"] .att-add:hover:not(:disabled) { background: oklch(0.3 0.04 250); color: oklch(0.85 0.1 250); }
:root[data-theme="dark"] .photo-drop { background-image: radial-gradient(circle at 16% 28%, rgba(255, 255, 255, .08) 0 34px, transparent 35px), radial-gradient(circle at 86% 74%, rgba(255, 255, 255, .06) 0 58px, transparent 59px); }
:root[data-theme="dark"] .login-body { background: radial-gradient(circle at 15% 10%, oklch(0.3 0.06 10), transparent 42%), radial-gradient(circle at 90% 92%, oklch(0.28 0.05 240), transparent 46%), var(--bg); }
:root[data-theme="dark"] .modal-wrap { background: rgba(0, 0, 0, .55); }
:root[data-theme="dark"] .vote.on { background: oklch(0.36 0.09 10); color: oklch(0.85 0.12 10); }
:root[data-theme="dark"] .metoo.on { box-shadow: 0 3px 0 oklch(0.38 0.12 25); }
:root[data-theme="dark"] .pin-label { box-shadow: 0 4px 12px -6px rgba(0, 0, 0, .8); }
:root[data-theme="dark"] .fuji-body { fill: oklch(0.55 0.05 250); }
:root[data-theme="dark"] .petal { opacity: .6; }
:root[data-theme="dark"] .mv-ev.flight { background: oklch(0.45 0.11 245); }

/* The colour change sweeps in as a circle from the button you pressed. */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { animation: theme-reveal .6s cubic-bezier(.3, .7, .2, 1); }
@keyframes theme-reveal { from { clip-path: circle(0 at var(--vx, 50%) var(--vy, 50%)); } to { clip-path: circle(150vmax at var(--vx, 50%) var(--vy, 50%)); } }

/* ---------- settings ---------- */
.settings-page { max-width: 760px; margin: 0 auto; }
.settings-page .card + .card { margin-top: 16px; }
.set-card h2 { margin-bottom: 4px; }
.set-card > p { margin-bottom: 14px; font-size: 14px; }
.theme-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.theme-opt { border: 0; padding: 10px; border-radius: 20px; background: var(--btn); display: flex; flex-direction: column; gap: 10px; align-items: stretch; text-align: left; transition: transform .25s var(--spring), box-shadow .2s; }
.theme-opt:hover { transform: translateY(-3px); }
.theme-opt.on { box-shadow: 0 0 0 3px var(--accent); background: var(--surface); }
.theme-opt b { font: 700 15px var(--font-d); display: flex; align-items: center; gap: 6px; }
.theme-opt small { color: var(--muted); font-size: 12px; }
.theme-check { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 12px; animation: pop .35s var(--spring); }
/* Little drawings of the app in each theme. */
.mini { position: relative; height: 86px; border-radius: 14px; overflow: hidden; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.mini.light { background: #f7f3ec; }
.mini.dark { background: #16141a; }
.mini.auto { background: linear-gradient(115deg, #f7f3ec 0 50%, #16141a 50% 100%); }
.mini i { display: block; height: 10px; border-radius: 6px; }
.mini.light i { background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06); }
.mini.dark i { background: #29252d; }
.mini.auto i { background: linear-gradient(115deg, #fff 0 50%, #29252d 50% 100%); }
.mini i:nth-child(1) { width: 60%; background: oklch(0.64 0.15 28) !important; }
.mini i:nth-child(3) { width: 80%; }
.mini .mini-icon { position: absolute; right: 10px; bottom: 6px; font-size: 26px; transition: transform .4s var(--spring); }
.theme-opt:hover .mini-icon { transform: rotate(-20deg) scale(1.15); }
.me-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.me-row .me-name { font: 700 18px var(--font-d); }
.me-row .btn { margin-left: auto; }
.set-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
@media (max-width: 600px) {
  .theme-opts { grid-template-columns: minmax(0, 1fr); }
  .mini { height: 64px; }
}

/* Stays: website button on each bar, and the picture fetched from a stay's website. */
.sb-site { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; min-width: 0; max-width: 62%; padding: 2px 8px; border-radius: 999px; background: var(--surface); box-shadow: 0 0 0 1px var(--c-line); color: var(--c-fg); font-size: 11px; font-weight: 700; text-decoration: none; white-space: nowrap; transition: background .15s, transform .2s var(--spring); }
.sb-site span { overflow: hidden; text-overflow: ellipsis; }
.sb-site:hover { background: var(--c-bg); transform: scale(1.05); }
.stay-bar.narrow .sb-site span { display: none; }
.photo-from, .photo-grab { position: absolute; left: 18px; top: 16px; z-index: 2; display: inline-flex; align-items: center; gap: 8px; max-width: calc(100% - 160px); padding: 5px 11px; border-radius: 999px; background: var(--frost); box-shadow: 0 4px 14px -6px rgba(0, 0, 0, .35); font-size: 12px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: popIn .25s var(--spring); }
.where { flex-wrap: wrap; }

/* ---------- feedback and questions for Claude ---------- */
.fb-card { animation-delay: .25s; }
.fb-spark { color: oklch(0.6 0.12 200); }
.fb-form { display: flex; flex-direction: column; gap: 10px; }
.fb-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.fb-kind { border: 0; background: var(--btn); border-radius: 999px; padding: 7px 12px; font-weight: 600; font-size: 13px; color: var(--muted); transition: background .15s, color .15s; }
.fb-kind:hover { color: var(--ink); }
.fb-kind.on { background: var(--ink); color: var(--card); }
.fb-input { border: 0; background: var(--btn); border-radius: 16px; padding: 10px 14px; font: inherit; font-size: 14.5px; resize: vertical; min-height: 84px; color: var(--ink); }
.fb-send { display: flex; align-items: center; gap: 10px; }
.fb-from { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.fb-list { margin-top: 20px; display: flex; flex-direction: column; gap: 14px; }
.fb-sub { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 800; }
.fb-list .link-btn { align-self: flex-start; }
.fb-msg { display: flex; flex-direction: column; gap: 8px; animation: rise .3s both; }
.fb-row { display: flex; gap: 10px; align-items: flex-start; }
.fb-answer { margin-left: 40px; }
.fb-bubble { flex: 1; min-width: 0; background: var(--btn); border-radius: 4px 16px 16px 16px; padding: 8px 12px; }
.fb-bubble.claude { background: oklch(0.95 0.035 200); }
:root[data-theme="dark"] .fb-bubble.claude { background: oklch(0.33 0.05 200); }
.fb-meta { display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; font-size: 12.5px; }
.fb-chip { font-size: 11.5px; font-weight: 700; background: var(--surface); padding: 1px 8px; border-radius: 99px; }
.fb-time { color: var(--faint); }
.fb-status { margin-left: auto; font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 99px; background: var(--chip); color: var(--muted); white-space: nowrap; }
.fb-status.ok { background: var(--ok-bg); color: var(--ok-fg); }
.fb-status.new { background: var(--accent-soft); color: var(--accent-d); }
.fb-del { border: 0; background: transparent; color: var(--faint); width: 22px; height: 22px; border-radius: 50%; font-size: 11px; display: grid; place-items: center; }
.fb-del:hover { background: var(--bad-bg); color: var(--bad-fg); }
.fb-text { font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 3px; }
.fb-text a { color: inherit; }
.answers-page { max-width: 860px; margin: 0 auto; }
.answers-page .fb-card h2 { margin-bottom: 10px; }
.answers-list { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.ans-wait { margin: 8px 0 0 40px; }
.ans-empty { margin-top: 16px; }

/* ---------- call planner ---------- */
.call-page { max-width: 1240px; margin: 0 auto; }
.cp-bar { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 14px; animation: rise .5s .05s both; }
.cp-week { display: flex; align-items: center; gap: 4px; background: var(--card); border-radius: 999px; padding: 5px; box-shadow: var(--shadow-card); }
.cp-week-label { min-width: 200px; text-align: center; display: flex; flex-direction: column; line-height: 1.15; }
.cp-week-label b { font: 800 16px var(--font-d); }
.cp-week-label small { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.cp-tz { font-size: 13px; color: var(--muted); }
.cp-who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; animation: rise .5s .1s both; }
.cp-person { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow-card); transition: opacity .2s; }
.cp-person-t { display: flex; flex-direction: column; line-height: 1.15; }
.cp-person-t b { font-size: 13.5px; }
.cp-person-t small { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.cp-person.done small { color: var(--ok-fg); }
.cp-person.cant small { color: var(--bad-fg); }
.cp-person.wait .av { filter: grayscale(1); opacity: .5; }
.cp-person.me { box-shadow: 0 0 0 2px var(--ink); }
.cp-count { font-size: 13px; font-weight: 700; color: var(--muted); margin-left: 4px; }
.cp-invite { margin-left: auto; }
.cp-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.cp-results { animation-delay: .1s; }
.cp-card .card-head p { max-width: 520px; }

/* The two hour grids: a time column, then Monday to Sunday. */
.cp-grid { --row: 27px; display: grid; grid-template-columns: 46px repeat(7, minmax(0, 1fr)); gap: 3px; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.cp-edit { touch-action: pan-y; }
.cp-corner { display: block; }
.cp-dh { border: 0; background: transparent; padding: 2px 0 6px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; line-height: 1.1; color: var(--muted); font-size: 11.5px; font-weight: 700; }
.cp-dh b { font: 800 17px var(--font-d); color: var(--ink); }
.cp-dh.today b { color: var(--accent-d); }
button.cp-dh:hover:not(:disabled), button.cp-hl:hover:not(:disabled) { background: var(--btn); color: var(--ink); }
.cp-hl { border: 0; background: transparent; height: var(--row); padding: 0 6px 0 0; border-radius: 8px; text-align: right; font-size: 11px; font-weight: 600; color: var(--muted2); font-variant-numeric: tabular-nums; line-height: var(--row); }
.cp-cell { height: var(--row); padding: 0; border: 0; border-radius: 7px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); transition: background .12s, box-shadow .12s, transform .15s var(--spring); }
.cp-edit .cp-cell { cursor: pointer; }
.cp-edit .cp-cell:hover:not(.past) { box-shadow: inset 0 0 0 2px var(--c-line); }
.cp-edit .cp-cell.on { background: var(--c-solid); box-shadow: inset 0 -2px 0 var(--c-dark); }
.cp-edit .cp-cell.pv-on { background: var(--c-bg); box-shadow: inset 0 0 0 2px var(--c-solid); transform: scale(.94); }
.cp-edit .cp-cell.pv-off { background: var(--surface-2); box-shadow: inset 0 0 0 2px var(--c-line); transform: scale(.94); }
.cp-cell.past { cursor: default; background: repeating-linear-gradient(-45deg, var(--stripe-a) 0 4px, var(--stripe-b) 4px 8px); box-shadow: none; }
.cp-edit .cp-cell.past.on { background: repeating-linear-gradient(-45deg, var(--c-bg) 0 4px, var(--stripe-b) 4px 8px); }
.cp-grid-wrap { position: relative; }
.cp-edit.off { opacity: .35; filter: grayscale(1); pointer-events: none; }
.cp-off { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; animation: popIn .25s var(--spring); }
.cp-off > span { font-size: 40px; }
.cp-off b { font: 700 17px var(--font-d); }
.cp-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* Everyone: greener means more people are free; solid green with a tick means all five. */
.cp-heat .cp-cell { --k: 0; background: color-mix(in oklch, var(--ok) calc(var(--k) * 70%), var(--surface-2)); font-size: 11px; font-weight: 800; color: var(--ok-fg); }
.cp-heat .cp-cell.hi { color: #fff; }
.cp-heat .cp-cell.all { background: var(--ok); color: #fff; box-shadow: inset 0 -2px 0 oklch(0.48 0.12 150); }
.cp-heat .cp-cell:hover { transform: scale(1.06); }
.cp-heat .cp-cell.sel { box-shadow: 0 0 0 2.5px var(--ink); position: relative; z-index: 1; }
.cp-heat .cp-cell.picked { background: var(--accent); color: #fff; box-shadow: inset 0 -2px 0 var(--accent-d); }
.cp-heat .cp-cell.picked.sel { box-shadow: 0 0 0 2.5px var(--ink); }
.cp-heat .cp-cell.past { color: transparent; }
.cp-sub { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; margin: 20px 0 10px; }
.cp-legend { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.cp-legend i { --k: 0; width: 18px; height: 14px; border-radius: 4px; display: inline-grid; place-items: center; font: 800 9px var(--font); font-style: normal; color: #fff; background: color-mix(in oklch, var(--ok) calc(var(--k) * 70%), var(--surface-2)); box-shadow: inset 0 0 0 1px var(--line); }
.cp-legend i.all { background: var(--ok); }
.cp-legend span { margin-left: 4px; }

/* Times that work, and the picked one. */
.cp-wins { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cp-win { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; padding: 8px 8px 8px 14px; border-radius: 16px; background: var(--ok-bg); color: var(--ok-fg); animation: rise .3s both; }
.cp-win.part { background: var(--btn); color: var(--ink); }
.cp-win-when { display: inline-flex; gap: 8px; align-items: baseline; font-variant-numeric: tabular-nums; }
.cp-win-when b { font: 700 15px var(--font-d); }
.cp-win-when span { font-weight: 700; font-size: 14px; }
.cp-win-len { font-size: 12px; font-weight: 800; padding: 1px 8px; border-radius: 99px; background: var(--surface); color: var(--muted); }
.cp-win-miss { font-size: 12.5px; color: var(--muted); }
.cp-win .btn, .cp-win-picked { margin-left: auto; }
.cp-win .btn { background: var(--surface); }
.cp-win-picked { font-size: 13px; font-weight: 700; color: var(--accent-d); padding: 6px 10px; }
.cp-wins .link-btn { margin-top: 2px; }
.cp-pick { display: flex; align-items: center; gap: 12px 14px; flex-wrap: wrap; padding: 14px 16px; border-radius: 20px; background: var(--accent-soft); margin-bottom: 14px; animation: popIn .3s var(--spring) both; }
.cp-pick-icon { font-size: 30px; display: inline-block; animation: wiggle 2.4s ease-in-out infinite; }
.cp-pick-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 220px; }
.cp-pick-text small { font-size: 12px; font-weight: 700; color: var(--accent-d); text-transform: uppercase; letter-spacing: .05em; }
.cp-pick-text b { font: 800 19px/1.2 var(--font-d); }
.cp-pick-meta { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.cp-pick-meta .avs > .av { border-color: var(--accent-soft); }
.cp-pick-warn { font-size: 12.5px; font-weight: 600; color: var(--warn-fg); }
.cp-pick-btns { display: flex; gap: 6px; flex-wrap: wrap; }

/* Who's free at the hour you tapped. */
.cp-detail { margin-top: 12px; padding: 12px 14px; border-radius: 16px; background: var(--btn); display: flex; flex-direction: column; gap: 8px; animation: popIn .2s var(--spring); }
.cp-dhead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cp-dhead b { font: 700 15px var(--font-d); }
.cp-dhead .btn { margin-left: auto; background: var(--surface); }
.cp-drow { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; font-size: 13px; }
.cp-tag { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 99px; min-width: 52px; text-align: center; }
.cp-tag.ok { background: var(--ok-bg); color: var(--ok-fg); }
.cp-tag.no { background: var(--bad-bg); color: var(--bad-fg); }
.cp-tag.wait { background: var(--chip); color: var(--muted); }
.cp-dname { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }

@media (max-width: 1000px) {
  .cp-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .cp-grid { --row: 30px; grid-template-columns: 40px repeat(7, minmax(0, 1fr)); gap: 2px; }
  .cp-hl { font-size: 10px; padding-right: 4px; }
  .cp-week { width: 100%; justify-content: space-between; }
  .cp-week-label { min-width: 0; }
  .cp-invite { margin-left: 0; }
  .cp-who { gap: 6px; }
  .cp-person { padding-right: 10px; }
}
/* Five tabs don't fit side by side on a phone: icon above the label. */
@media (max-width: 520px) {
  .tabs { border-radius: 18px; }
  .tabs a { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 2px 6px; border-radius: 14px; font-size: 11.5px; line-height: 1.15; }
  .tab-i { font-size: 16px; line-height: 1.2; }
}
@media (prefers-reduced-motion: reduce) {
  .cp-pick-icon { animation: none; }
}
