/* Kuna Kove booking — listing-page layout: wide photo mosaic, content column + sticky booking card */
:root {
  --bg: #ffffff;
  --fg: #222022;
  --muted: #6f696c;
  --line: #e3dedf;
  --soft: #f6f3f3;
  --card: #ffffff;
  --accent: #d9465f;
  --accent-2: #c02d6c;
  --on-accent: #ffffff;
  --work: #4b62d6;
  --relax: #128a71;
  --party: #b0249a;
  --off: #bdb6b8;
  --ok: #128a71;
  --ask: #a8640b;
  --danger: #c4314b;
  --shadow: 0 6px 20px rgba(30, 20, 25, .12);
  --sel: #222022;
  --on-sel: #ffffff;
  --t-house-1: #2f3f67; --t-house-2: #e98a6b; --t-hill: #26324f; --t-hill2: #3c4c74; --t-house: #1c2236; --t-win: #ffd27a;
  --t-fairy: linear-gradient(140deg, #f7d6e6, #d7c6f5);
  --t-bunny: linear-gradient(140deg, #fde2cc, #f6c7b9);
  --t-ny: linear-gradient(140deg, #cfd9ea, #a9b6d1);
  --t-studio: linear-gradient(140deg, #3d2f5c, #1f1b33);
  --font: "Figtree", "Helvetica Neue", Arial, system-ui, sans-serif;
  --r: 12px;
  --r-lg: 16px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141213; --fg: #f3eff0; --muted: #a49d9f; --line: #302b2d; --soft: #1e1b1c; --card: #1b1819;
    --accent: #ef637a; --accent-2: #d9468a; --on-accent: #ffffff;
    --work: #8d9cff; --relax: #4cc8a8; --party: #e66fd0; --off: #5a5355; --ok: #4cc8a8; --ask: #e2a14a; --danger: #ff7088;
    --shadow: 0 6px 24px rgba(0, 0, 0, .5); --sel: #f3eff0; --on-sel: #141213;
    --t-house-1: #141b33; --t-house-2: #6a3550; --t-hill: #0f1426; --t-hill2: #1b2440; --t-house: #090c16; --t-win: #f5c25c;
    --t-fairy: linear-gradient(140deg, #5a3550, #43386b);
    --t-bunny: linear-gradient(140deg, #6a4532, #5c3433);
    --t-ny: linear-gradient(140deg, #2d3a55, #222c44);
    --t-studio: linear-gradient(140deg, #3d2f5c, #17142a);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141213; --fg: #f3eff0; --muted: #a49d9f; --line: #302b2d; --soft: #1e1b1c; --card: #1b1819;
  --accent: #ef637a; --accent-2: #d9468a; --on-accent: #ffffff;
  --work: #8d9cff; --relax: #4cc8a8; --party: #e66fd0; --off: #5a5355; --ok: #4cc8a8; --ask: #e2a14a; --danger: #ff7088;
  --shadow: 0 6px 24px rgba(0, 0, 0, .5); --sel: #f3eff0; --on-sel: #141213;
  --t-house-1: #141b33; --t-house-2: #6a3550; --t-hill: #0f1426; --t-hill2: #1b2440; --t-house: #090c16; --t-win: #f5c25c;
  --t-fairy: linear-gradient(140deg, #5a3550, #43386b);
  --t-bunny: linear-gradient(140deg, #6a4532, #5c3433);
  --t-ny: linear-gradient(140deg, #2d3a55, #222c44);
  --t-studio: linear-gradient(140deg, #3d2f5c, #17142a);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.5 var(--font); }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
h1 { font-size: clamp(1.6rem, 3vw, 2rem); font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 1.35rem; font-weight: 650; letter-spacing: -.005em; }
h3 { font-size: 1.05rem; font-weight: 650; }
p { margin: 0; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 24px; padding-block: 24px 48px; }
.wrap.narrow { max-width: 760px; }
@media (max-width: 600px) { .wrap { padding-inline: 16px; } }

/* ---- demo bar ---- */
.demo-bar { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: center;
  padding-block: 8px; padding-inline: 24px; background: var(--soft); border-bottom: 1px solid var(--line); font-size: .85rem; }
.demo-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.demo-actions button { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.demo-actions button.on { background: var(--sel); color: var(--on-sel); border-color: var(--sel); }
.demo-actions button.link { border: 0; background: none; }

/* ---- header ---- */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1120px; margin: 0 auto; padding-inline: 24px; height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--accent); font-weight: 800; font-size: 1.35rem; letter-spacing: -.02em; }
.logo-mark { width: 30px; height: 30px; fill: var(--accent); stroke: none; }
.logo-mark .logo-moon { fill: var(--bg); }
.search-pill { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 999px; padding: 8px 8px 8px 22px;
  background: var(--card); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.05); cursor: pointer; font-size: .9rem; white-space: nowrap; }
.search-pill:hover { box-shadow: var(--shadow); }
.sp-div { width: 1px; height: 22px; background: var(--line); }
.sp-go { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--on-accent); }
.sp-go svg { width: 15px; height: 15px; stroke-width: 2.6; }
.top-right { display: flex; align-items: center; gap: 4px; }
.nav-link { text-decoration: none; font-weight: 600; font-size: .92rem; padding: 10px 14px; border-radius: 999px; white-space: nowrap; }
.nav-link:hover { background: var(--soft); }
.menu-wrap { position: relative; }
.user-btn { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 5px 5px 5px 12px; cursor: pointer; }
.user-btn:hover { box-shadow: var(--shadow); }
.user-btn > svg { width: 16px; height: 16px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--fg); color: var(--bg); display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.avatar svg { width: 18px; height: 18px; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); width: 240px; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); border: 1px solid var(--line); padding: 8px 0; display: flex; flex-direction: column; }
.menu a, .menu button { text-align: left; padding: 11px 16px; background: none; border: 0; text-decoration: none; cursor: pointer; font-size: .92rem; }
.menu a:hover, .menu button:hover { background: var(--soft); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.menu-who { padding: 8px 16px 10px; font-weight: 650; display: flex; flex-direction: column; }
.menu-who small { color: var(--muted); font-weight: 400; }
@media (max-width: 860px) { .search-pill { display: none; } }
@media (max-width: 600px) { .topbar-in { padding-inline: 16px; height: 64px; } .hide-sm { display: none; } .brand span { font-size: 1.15rem; } }

/* ---- title + gallery ---- */
.title-row { display: flex; flex-direction: column; gap: 4px; padding-block: 8px 20px; }
.sub { display: flex; flex-wrap: wrap; gap: 6px; font-weight: 600; font-size: .95rem; }
.sub .dot { color: var(--muted); }
.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 190px 190px; gap: 8px; border-radius: var(--r-lg); overflow: hidden; }
.g-main { grid-row: span 2; position: relative; }
.g-cell { position: relative; display: flex; }
.g-cell .tile { flex: 1; }
.g-label { position: absolute; left: 12px; bottom: 10px; background: rgba(255,255,255,.92); color: #222022; font-size: .8rem; font-weight: 650; padding: 4px 10px; border-radius: 999px; }
.tile { background-size: cover; background-position: center; display: grid; place-items: center; min-height: 100%; }
.tile-emoji { font-size: 3rem; filter: drop-shadow(0 4px 10px rgba(0,0,0,.15)); }
.tile-fairy { background: var(--t-fairy); }
.tile-bunny { background: var(--t-bunny); }
.tile-nyroom { background: var(--t-ny); }
.tile-studio { background: var(--t-studio); }
.tile-house { background: linear-gradient(180deg, var(--t-house-1) 0%, var(--t-house-2) 100%); overflow: hidden; }
.g-main img { width: 100%; height: 100%; object-fit: cover; }
.house-art { width: 100%; height: 100%; stroke: none; }
.house-art .hills2 { fill: var(--t-hill2); } .house-art .hills { fill: var(--t-hill); } .house-art .trees { fill: var(--t-hill); }
.house-art .house { fill: var(--t-house); } .house-art .win { fill: var(--t-win); } .house-art .door { fill: var(--t-win); opacity: .7; } .house-art .moon { fill: #fff3d6; }
@media (max-width: 760px) {
  .gallery { grid-template-columns: 1fr 1fr; grid-template-rows: 220px 120px 120px; margin-inline: -16px; border-radius: 0; }
  .g-main { grid-column: span 2; grid-row: auto; }
}

/* ---- columns ---- */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 72px; padding-top: 32px; align-items: start; }
.col-main { min-width: 0; }
.col-side { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 100px); }
@media (max-width: 959px) { .cols { grid-template-columns: minmax(0, 1fr); gap: 0; } }
.section { padding-block: 32px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.section:first-child { padding-top: 0; }
.host-line { flex-direction: row; justify-content: space-between; align-items: center; gap: 16px; }
.host-avatars { display: flex; }
.host-avatars span { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: var(--on-accent); background: var(--accent); border: 3px solid var(--bg); }
.host-avatars span + span { margin-left: -14px; background: var(--fg); color: var(--bg); }

.modes { gap: 22px; }
.mode { display: grid; grid-template-columns: 28px 1fr; gap: 16px; align-items: start; }
.mode > svg { width: 28px; height: 28px; margin-top: 2px; }
.mode.k-work > svg { color: var(--work); } .mode.k-relax > svg { color: var(--relax); } .mode.k-party > svg { color: var(--party); }
.mode p { color: var(--muted); max-width: 60ch; }

/* ---- room cards ---- */
.rooms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.room-card { text-align: left; background: none; border: 0; padding: 0; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.rc-tile { min-height: 0; width: 100%; aspect-ratio: 4 / 3; max-width: 100%; border-radius: var(--r); margin-bottom: 6px; outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .15s; }
.room-card.on .rc-tile { outline-color: var(--fg); }
.room-card:hover .rc-tile { filter: brightness(.97); }
.rc-name { font-weight: 650; }
.rc-sleeps { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: .9rem; }
.badge { align-self: flex-start; font-size: .78rem; font-weight: 650; padding: 3px 9px; border-radius: 999px; border: 1px solid currentColor; margin-top: 4px; }
.badge.ok { color: var(--ok); } .badge.ask { color: var(--ask); }
@media (max-width: 480px) { .rooms { gap: 12px; } .rc-sleeps { font-size: .82rem; } }

/* ---- legend + calendar ---- */
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .85rem; color: var(--muted); }
.lg { display: inline-flex; align-items: center; gap: 6px; }
.lg i { width: 10px; height: 10px; border-radius: 3px; background: var(--off); }
.lg.k-work i { background: var(--work); } .lg.k-relax i { background: var(--relax); } .lg.k-party i { background: var(--party); }
.lg.lg-off i { background: none; border: 1px solid var(--off); position: relative; overflow: hidden; }
.cal { position: relative; padding-top: 4px; }
.cal-months { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 40px; }
.cal-month h4 { text-align: center; font-size: 1rem; padding-block: 6px 14px; }
.cal-nav { position: absolute; top: 4px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: none; display: grid; place-items: center; cursor: pointer; z-index: 1; }
.cal-nav:hover:not(:disabled) { background: var(--soft); }
.cal-nav:disabled { opacity: .3; cursor: default; }
.cal-nav.prev { left: 0; } .cal-nav.next { right: 0; }
.cal-dow, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow span { text-align: center; font-size: .75rem; font-weight: 600; color: var(--muted); padding-bottom: 6px; }
.cal-day { position: relative; aspect-ratio: 1; max-width: 100%; border: 0; background: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; border-radius: 50%; padding: 0; font-variant-numeric: tabular-nums; }
.cal-day .num { font-weight: 600; font-size: .92rem; line-height: 1.1; }
.cal-day .tag { font-size: .6rem; font-weight: 800; letter-spacing: .04em; line-height: 1; }
.cal-day.k-work .tag { color: var(--work); } .cal-day.k-relax .tag { color: var(--relax); } .cal-day.k-party .tag { color: var(--party); }
.cal-day.k-party { background: color-mix(in srgb, var(--party) 10%, transparent); }
.cal-day:hover:not(:disabled) { box-shadow: inset 0 0 0 1.5px var(--fg); }
.cal-day.today .num { text-decoration: underline; text-underline-offset: 3px; }
.cal-day.off { cursor: default; color: var(--off); }
.cal-day.off .tag { color: var(--off); }
.cal-day.off .num { text-decoration: line-through; }
.cal-day.full:not(.sel) .num { text-decoration: line-through; color: var(--off); }
.cal-day.in-range { background: var(--soft); border-radius: 0; }
.cal-day.sel { background: var(--sel); color: var(--on-sel); }
.cal-day.sel .tag { color: var(--on-sel); opacity: .8; }
.cal-empty { aspect-ratio: 1; }
.clear-dates { align-self: flex-end; }

.link { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; font-weight: 600; cursor: pointer; }

/* ---- booking card ---- */
.book-card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow); background: var(--card); display: flex; flex-direction: column; gap: 16px; }
.cols > .col-main .book-card { margin-block: 24px 8px; }
.bc-price { display: flex; align-items: baseline; gap: 6px; }
.free { font-size: 1.4rem; font-weight: 750; }
.bc-days { margin-left: auto; font-weight: 600; font-size: .9rem; }
.bc-dates { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--muted); border-radius: var(--r); background: none; padding: 0; cursor: pointer; text-align: left; }
.bc-dates span { padding: 10px 12px; display: flex; flex-direction: column; font-size: .9rem; }
.bc-dates span + span { border-left: 1px solid var(--muted); }
.bc-dates small { font-size: .62rem; font-weight: 800; letter-spacing: .06em; }
.bc-rooms { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.bc-rooms legend { font-weight: 650; font-size: .9rem; padding: 0 0 6px; }
.room-opt { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; cursor: pointer; font-size: .9rem; }
.room-opt input { accent-color: var(--fg); margin: 0; }
.room-opt.on { border-color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg); }
.ro-name { font-weight: 600; flex: 1; min-width: 0; }
.ro-st { font-size: .78rem; font-weight: 650; white-space: nowrap; }
.tone-ok .ro-st { color: var(--ok); } .tone-ask .ro-st { color: var(--ask); } .tone-off .ro-st { color: var(--muted); }
.tone-off .ro-name { color: var(--muted); }
.bc-guests { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.bc-guests > div:first-child { display: flex; flex-direction: column; }
.bc-guests small { color: var(--muted); font-size: .8rem; }
.stepper { display: flex; align-items: center; gap: 12px; }
.stepper button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--off); background: var(--card); cursor: pointer; font-size: 1.1rem; line-height: 1; }
.stepper button:hover:not(:disabled) { border-color: var(--fg); }
.stepper button:disabled { opacity: .35; cursor: default; }
.stepper output { min-width: 1.5ch; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.bc-break { list-style: none; margin: 0; padding: 12px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; font-size: .92rem; }
.bc-break li { display: flex; align-items: center; gap: 8px; }
.bc-break i { width: 10px; height: 10px; border-radius: 3px; }
.bc-break .k-work i { background: var(--work); } .bc-break .k-relax i { background: var(--relax); } .bc-break .k-party i { background: var(--party); }
.bc-note { display: flex; flex-direction: column; gap: 6px; font-size: .88rem; font-weight: 600; }
.bc-note textarea, .field input, .field textarea, .apply-bar input { border: 1px solid var(--off); border-radius: 10px; padding: 10px 12px; background: var(--card); font-weight: 400; resize: vertical; width: 100%; }
.bc-note textarea:focus, .field input:focus, .field textarea:focus { outline: none; border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg); }
.bc-err { color: var(--danger); font-size: .9rem; font-weight: 550; }
.bc-hint { color: var(--ask); font-size: .88rem; }
.cta { display: block; width: 100%; text-align: center; text-decoration: none; border: 0; border-radius: 10px; padding: 14px 20px; cursor: pointer; font-weight: 650; font-size: 1rem;
  color: var(--on-accent); background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.cta:hover:not(:disabled) { filter: brightness(1.05); }
.cta:disabled { background: var(--off); cursor: default; }
.cta.inline { display: inline-block; width: auto; margin-top: 16px; }
.bc-fine { text-align: center; font-size: .82rem; color: var(--muted); }

/* ---- allowance ---- */
.meters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.meter { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.meter-top { display: flex; justify-content: space-between; font-size: .92rem; font-variant-numeric: tabular-nums; }
.bar { height: 6px; border-radius: 3px; background: var(--soft); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; }
.meter.k-work .bar i { background: var(--work); } .meter.k-relax .bar i { background: var(--relax); }
@media (max-width: 480px) { .meters { grid-template-columns: 1fr; } }
.rules ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; max-width: 65ch; }

/* ---- trips ---- */
.h-sub { font-size: 1.1rem; margin-block: 28px 14px; }
.trips { display: flex; flex-direction: column; gap: 14px; }
.trip { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; }
.trips.past .trip { opacity: .7; }
.trip-tile { border-radius: 10px; min-height: 110px; height: 100%; }
.trip-tile .tile-emoji { font-size: 2rem; }
.trip-body { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; min-width: 0; }
.trip-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.trip-note { color: var(--muted); font-style: italic; }
.pill { font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.pill.st-confirmed { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.pill.st-pending { background: color-mix(in srgb, var(--ask) 15%, transparent); color: var(--ask); }
.pill.st-declined, .pill.st-cancelled { background: var(--soft); color: var(--muted); }
.inline-confirm { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; font-size: .9rem; }
.btn { border: 1px solid var(--fg); background: var(--card); border-radius: 8px; padding: 8px 14px; font-weight: 600; cursor: pointer; font-size: .9rem; }
.btn.sm { padding: 5px 10px; font-size: .82rem; }
.btn.primary { background: var(--fg); color: var(--bg); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn:disabled { opacity: .4; cursor: default; }
.empty { border: 1px dashed var(--line); border-radius: var(--r-lg); padding: 28px; text-align: center; }
@media (max-width: 480px) { .trip { grid-template-columns: 84px minmax(0, 1fr); } .trip-tile { min-height: 84px; } }

/* ---- host ---- */
.host-head { display: flex; flex-direction: column; gap: 4px; padding-block: 8px 20px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; margin-bottom: 24px; }
.tabs button { border: 0; background: none; padding: 12px 14px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.tabs button.on { color: var(--fg); border-bottom-color: var(--fg); }
.count { background: var(--accent); color: var(--on-accent); border-radius: 999px; font-size: .72rem; padding: 1px 7px; }
.req-list { display: flex; flex-direction: column; gap: 14px; }
.req { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 16px; align-items: center; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; }
.req-tile { border-radius: 10px; min-height: 96px; } .req-tile .tile-emoji { font-size: 1.8rem; }
.req-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.req-act { display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 640px) { .req { grid-template-columns: 72px minmax(0, 1fr); } .req-tile { min-height: 72px; } .req-act { grid-column: 1 / -1; flex-direction: row; } }
.hcal-tools { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 4px; align-self: flex-start; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 8px 14px; border-radius: 999px; font-weight: 600; cursor: pointer; font-size: .9rem; }
.seg button.on { background: var(--fg); color: var(--bg); }
.seg .seg-party.on { background: var(--party); color: #fff; }
.host-cal .cal-months { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.hcal-day { aspect-ratio: 1 / 1.05; max-width: 100%; border: 1px solid var(--line); margin: -1px 0 0 -1px; background: var(--card); text-align: left; padding: 5px 6px; display: flex; flex-direction: column; gap: 1px; cursor: pointer; font-size: .7rem; position: relative; min-width: 0; overflow: hidden; }
.hcal-day .num { font-size: .85rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.hc-kind { font-weight: 700; font-size: .62rem; text-transform: uppercase; letter-spacing: .04em; }
.hcal-day.k-work .hc-kind { color: var(--work); } .hcal-day.k-relax .hc-kind { color: var(--relax); } .hcal-day.k-party .hc-kind { color: var(--party); }
.hcal-day.k-party { background: color-mix(in srgb, var(--party) 10%, var(--card)); }
.hcal-day.blocked { background: repeating-linear-gradient(135deg, var(--soft) 0 6px, var(--card) 6px 12px); }
.hcal-day.blocked .hc-kind { color: var(--muted); }
.hc-occ { margin-top: auto; font-size: .62rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hcal-day.picked { box-shadow: inset 0 0 0 2.5px var(--fg); z-index: 1; }
.hcal-day.past { opacity: .4; cursor: default; }
.apply-bar { position: sticky; bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); margin-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: var(--r-lg); padding: 12px 16px; z-index: 5; }
.apply-bar input { flex: 1 1 200px; width: auto; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--soft); white-space: nowrap; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--soft); padding: 2px 6px; border-radius: 6px; }
.settings { display: flex; flex-direction: column; gap: 14px; max-width: 760px; }
.settings h3, .rooms-h { margin-top: 10px; }
.rooms-h { margin-block: 36px 14px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.fields.three { grid-template-columns: 1fr 1fr 2fr; }
@media (max-width: 640px) { .fields.three { grid-template-columns: 1fr 1fr; } .fields.three .field:last-child { grid-column: 1 / -1; } }
.field { display: flex; flex-direction: column; gap: 6px; font-size: .88rem; font-weight: 600; min-width: 0; }
.field small { font-weight: 400; }
.settings > .btn { align-self: flex-start; }
.room-edit { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
@media (max-width: 400px) { .room-edit { grid-template-columns: 1fr; } }
.re { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.re-head { display: flex; gap: 12px; align-items: center; }
.re-tile { width: 52px; height: 52px; min-height: 0; border-radius: 10px; flex: none; }
.re-tile .tile-emoji { font-size: 1.4rem; }
.re-name { flex: 1; min-width: 0; font-weight: 700; font-size: 1.05rem; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 6px 0; }
.re-flags { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: .88rem; }
.re-flags label { display: flex; gap: 6px; align-items: center; }
.re-flags input { accent-color: var(--fg); }
.re-flags .btn { margin-left: auto; }

/* ---- modal + toast ---- */
.scrim { position: fixed; inset: 0; background: rgba(15, 10, 12, .5); z-index: 50; display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.modal { position: relative; width: 100%; max-width: 480px; background: var(--card); border-radius: var(--r-lg); padding: 28px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); }
.m-x { position: absolute; right: 12px; top: 10px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: none; font-size: 1.5rem; cursor: pointer; line-height: 1; }
.m-x:hover { background: var(--soft); }
.m-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-top: -6px; }
.m-tabs button { border: 0; background: none; padding: 10px 12px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; }
.m-tabs button.on { color: var(--fg); border-bottom-color: var(--fg); }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form .link { align-self: flex-start; }
.booked-head .booked-tile { height: 140px; min-height: 140px; border-radius: var(--r); }
.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 24px); transform: translateX(-50%); background: var(--fg); color: var(--bg); padding: 12px 18px; border-radius: 10px; font-weight: 600; font-size: .92rem; z-index: 60; box-shadow: var(--shadow); max-width: calc(100% - 32px); transition: opacity .3s; }
.toast.out { opacity: 0; }
.foot { border-top: 1px solid var(--line); background: var(--soft); color: var(--muted); font-size: .85rem; }
.foot .wrap { padding-block: 24px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---- invite card (Host portal → Friends) ---- */
.invite { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 24px; align-items: center; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; margin-bottom: 24px; }
.inv-qr { width: 180px; aspect-ratio: 1; max-width: 100%; background: #ffffff; border-radius: var(--r); padding: 8px; display: grid; place-items: center; }
.inv-qr svg { width: 100%; height: 100%; stroke: none; }
.inv-qr svg path, .inv-qr svg rect { stroke: none; }
a.btn { text-decoration: none; display: inline-block; }
.inv-body { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; min-width: 0; }
.inv-link { display: flex; gap: 8px; width: 100%; }
.inv-link input { flex: 1; min-width: 0; border: 1px solid var(--off); border-radius: 8px; padding: 7px 10px; background: var(--soft); font-size: .85rem; }
@media (max-width: 600px) { .invite { grid-template-columns: 1fr; justify-items: center; } .inv-body { align-items: stretch; } }

/* ---- required marker + cancel reason ---- */
.req-mark { color: var(--accent); font-weight: 600; }
.cancel-box { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 6px; }
