:root {
  --bg: #0a0a0c; --bg-soft: #0d0e11; --panel: #0f1014; --fg: #e6e8ed;
  --muted: #6f7480; --muted-2: #4a4e58; --accent: #ef2b2b; --accent-hv: #ff4a4a;
  --ok: #34d27b; --border: #1c1f26;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
* { box-sizing: border-box; }
/* the `hidden` attribute must win over component display rules (.btn.block etc.) */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; line-height: 1.5;
}
a { color: var(--fg); text-decoration: none; }
h1 { font-size: clamp(24px, 4vw, 34px); letter-spacing: -0.02em; margin: 0 0 6px; font-weight: 800; }
h2 { font-size: 18px; letter-spacing: -0.01em; margin: 0; font-weight: 700; }
.muted { color: var(--muted); margin: 0; }
.eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 10px;
}

/* ── topbar ── */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center;
  justify-content: space-between; gap: 16px; padding: 13px 22px;
  border-bottom: 1px solid var(--border); background: rgba(10,10,12,0.82);
  backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 26px; height: 26px; border-radius: 7px; }
.brand span { font-weight: 700; letter-spacing: -0.01em; }
.topbar nav { display: flex; align-items: center; gap: 16px; font-size: 14px; }
.navlink { color: var(--muted); }
.navlink:hover, .navlink.on { color: var(--fg); }
/* hour balance chip + buy CTA, pinned in the header */
.bal {
  display: inline-flex; align-items: baseline; gap: 5px; font-family: var(--mono);
  font-size: 12px; color: var(--muted); padding: 6px 11px; border: 1px solid var(--border);
  border-radius: 9px; background: rgba(255,255,255,0.02); white-space: nowrap;
}
.bal b { color: var(--fg); font-size: 15px; font-weight: 700; }
.topbar nav .btn.sm {
  padding: 7px 14px; font-size: 13px; color: #fff; background: var(--accent); border-color: var(--accent);
}
.topbar nav .btn.sm:hover { background: var(--accent-hv); border-color: var(--accent-hv); }
.who { display: inline-flex; text-decoration: none; border-radius: 50%; }
.avatar {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(239,43,43,0.16); color: #ffd2d2; font-size: 12px; font-weight: 700;
  border: 1px solid rgba(239,43,43,0.3); transition: border-color 0.12s, background 0.12s;
}
.who:hover .avatar { background: rgba(239,43,43,0.28); border-color: var(--accent); }
.logout { margin: 0; }
.logout button {
  background: none; border: 1px solid var(--border); color: var(--muted);
  font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 8px; cursor: pointer;
}
.logout button:hover { color: var(--fg); border-color: var(--muted); }

/* ── layout ── */
.wrap { max-width: 940px; margin: 0 auto; padding: 36px 22px 96px; }
.panel {
  margin-top: 26px; border: 1px solid var(--border); border-radius: 14px;
  background: var(--panel); padding: 20px;
}
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.hint { color: var(--muted); font-size: 13px; }

/* ── hero row + balance ── */
.hero-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.balance-card {
  display: grid; gap: 2px; min-width: 200px; padding: 18px 20px;
  border: 1px solid var(--border); border-radius: 14px; background: var(--panel);
}
.balance-card .lbl { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.balance-card strong { font-size: 40px; font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; }
.balance-card .unit { color: var(--muted); font-size: 13px; margin-bottom: 12px; }

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: 9px; font: inherit; font-size: 14px; font-weight: 600;
  border: 1px solid var(--border); background: rgba(255,255,255,0.03); color: var(--fg); cursor: pointer;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hv); border-color: var(--accent-hv); }
.btn.primary:disabled { opacity: 0.55; cursor: default; }
.btn.ghost { background: none; color: var(--muted); }

/* ── reservation: date strip + slot grid ── */
.date-strip {
  display: flex; gap: 9px; overflow-x: auto; padding: 2px 2px 12px;
  scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
.date-pill {
  flex: none; width: 78px; display: grid; gap: 1px; justify-items: center;
  padding: 11px 8px; border: 1px solid var(--border); border-radius: 12px;
  background: rgba(255,255,255,0.02); color: var(--fg); cursor: pointer;
  font: inherit; transition: border-color 120ms, background 120ms;
}
.date-pill:hover { border-color: var(--muted); }
.date-pill.on { border-color: var(--accent); background: rgba(239,43,43,0.10); }
.date-pill.full { opacity: 0.5; }
.dp-wd { font-size: 11px; color: var(--muted); font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.05em; }
.date-pill.on .dp-wd { color: #ffd2d2; }
.dp-day { font-size: 22px; font-weight: 800; line-height: 1.1; }
.dp-mo { font-size: 11px; color: var(--muted); }
.dp-free { margin-top: 4px; font-size: 10px; font-family: var(--mono); color: var(--muted-2); }
.date-pill.on .dp-free { color: var(--accent); }

.slots { margin-top: 16px; }
.slots[data-loading], .slots-empty { color: var(--muted); }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 8px; }
.slot {
  font-family: var(--mono); font-size: 13px; padding: 11px 6px; text-align: center;
  border: 1px solid var(--border); border-radius: 9px; background: rgba(255,255,255,0.02);
  color: var(--fg); cursor: pointer; transition: border-color 120ms, background 120ms, transform 80ms;
}
.slot:hover { border-color: var(--accent); background: rgba(239,43,43,0.07); }
.slot:active { transform: scale(0.97); }
.slot.taken { color: var(--muted-2); background: rgba(255,255,255,0.01); cursor: not-allowed; border-style: dashed; }
.slot.mine { color: #ffd2d2; background: rgba(239,43,43,0.12); border-color: rgba(239,43,43,0.45); cursor: not-allowed; }
.slot-legend { display: flex; gap: 18px; flex-wrap: wrap; margin: 16px 0 0; color: var(--muted); font-size: 12px; }
.slot-legend span { display: inline-flex; align-items: center; gap: 7px; }
.sw { width: 12px; height: 12px; border-radius: 4px; border: 1px solid var(--border); }
.sw.free { background: rgba(255,255,255,0.04); }
.sw.taken { border-style: dashed; }
.sw.mine { background: rgba(239,43,43,0.5); border-color: rgba(239,43,43,0.6); }

/* ── reservations list ── */
.bookings { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bookings li {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 13px 15px; border: 1px solid var(--border); border-radius: 11px; background: rgba(255,255,255,0.02);
}
.bookings .when { font-weight: 600; }
.bookings .sub { color: var(--muted); font-size: 13px; font-family: var(--mono); }
.bookings .empty, .ledger .empty { color: var(--muted); border: 0; background: none; padding: 6px 0; }
.cancel { background: none; border: 1px solid var(--border); color: var(--muted); font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.cancel:hover { color: var(--accent-hv); border-color: var(--accent); }

/* ── reservation modal (flight-ticket style) ── */
body.modal-open { overflow: hidden; }
.rm { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 18px; }
.rm[hidden] { display: none; }
.rm-bg { position: absolute; inset: 0; background: rgba(4,4,6,0.72); backdrop-filter: blur(3px); }
.rm-card {
  position: relative; z-index: 1; width: 100%; max-width: 430px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 18px;
  padding: 26px 24px 24px; box-shadow: 0 24px 70px rgba(0,0,0,0.6);
  max-height: calc(100vh - 36px); overflow-y: auto;
}
.rm-x {
  position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 9px;
  background: none; border: 1px solid var(--border); color: var(--muted); font-size: 18px;
  line-height: 1; cursor: pointer;
}
.rm-x:hover { color: var(--fg); border-color: var(--muted); }
.rm-card h2 { margin: 0 0 18px; }

.ticket {
  position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 8px; padding: 18px 16px; border: 1px solid var(--border); border-radius: 14px;
  background: linear-gradient(180deg, rgba(239,43,43,0.06), rgba(255,255,255,0.012));
}
/* perforation notches, like a boarding pass */
.ticket::before, .ticket::after {
  content: ""; position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--border); transform: translateY(-50%);
}
.ticket::before { left: -9px; } .ticket::after { right: -9px; }
.leg { display: grid; gap: 3px; text-align: center; min-width: 0; }
.leg-time { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.leg-lbl { font-size: 11px; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.leg-mid { display: grid; justify-items: center; gap: 4px; min-width: 96px; }
.leg-dur { font-size: 12px; font-family: var(--mono); color: var(--accent); }
.leg-line { display: flex; align-items: center; color: var(--muted-2); }
.leg-line i { height: 1px; width: 20px; background: var(--border); }
.leg-line svg { fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin: 0 2px; }
.leg-on { font-size: 12px; color: var(--muted); text-align: center; }

.dur { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0 4px; }
.dur-lbl { font-size: 14px; color: var(--muted); }
.stepper { display: flex; align-items: center; gap: 12px; border: 1px solid var(--border); border-radius: 11px; padding: 5px 8px; }
.stepper button {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: rgba(255,255,255,0.03);
  color: var(--fg); font-size: 20px; line-height: 1; cursor: pointer;
}
.stepper button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-hv); }
.stepper button:disabled { opacity: 0.35; cursor: default; }
.stepper-val { min-width: 64px; text-align: center; font-size: 14px; color: var(--muted); }
.stepper-val b { font-size: 17px; color: var(--fg); }

.summary { margin: 22px 0 18px; border-top: 1px solid var(--border); padding-top: 14px; display: grid; gap: 9px; }
.srow { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.srow span:last-child { color: var(--fg); font-variant-numeric: tabular-nums; }
.srow.total { font-weight: 700; font-size: 15px; padding-top: 11px; border-top: 1px dashed var(--border); }
.srow.total.bad span:last-child { color: var(--accent-hv); }

.btn.block { display: flex; width: 100%; }
.rm-warn { color: var(--accent-hv); background: rgba(239,43,43,0.08); border: 1px solid rgba(239,43,43,0.3); border-radius: 9px; padding: 9px 12px; font-size: 13px; margin: 0 0 12px; }
.rm-buy { margin-top: 10px; }

/* ── billing ── */
.balance-inline { margin: 16px 0 22px; color: var(--muted); }
.balance-inline strong { color: var(--fg); font-size: 18px; }
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.pack {
  display: grid; justify-items: center; gap: 2px; padding: 22px 16px;
  border: 1px solid var(--border); border-radius: 14px; background: var(--panel);
}
.pack .ph { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; }
.pack .phu { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; }
.pack .pprice { margin-top: 10px; font-size: 20px; font-weight: 700; }
.pack .pper { color: var(--muted); font-size: 12px; margin-bottom: 14px; font-family: var(--mono); }
.ledger { width: 100%; border-collapse: collapse; font-size: 14px; }
.ledger th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.ledger td { padding: 9px 8px; border-bottom: 1px solid var(--border); font-family: var(--mono); }
.ledger td:nth-child(2) { font-family: inherit; }
.ledger .pos { color: var(--ok); } .ledger .neg { color: var(--accent-hv); }
.notice { padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px; margin: 16px 0 0; color: var(--fg); }
.notice.ok { border-color: rgba(52,210,123,0.4); background: rgba(52,210,123,0.08); }
.notice.err-notice { border-color: rgba(239,43,43,0.4); background: rgba(239,43,43,0.07); color: #ffd2d2; }

/* ── connections ── */
.ilink { color: var(--muted); border-bottom: 1px dotted var(--muted-2); }
.ilink:hover { color: var(--fg); }
.conns { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.conns .empty { color: var(--muted); }
.conn {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,0.02);
}
.conn-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.conn-plat { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.conn-handle { font-weight: 700; font-size: 15px; }
.conn-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.conn-mode { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.conn-actions { display: flex; align-items: center; gap: 8px; }
.badge { font-family: var(--mono); font-size: 11px; padding: 4px 9px; border-radius: 7px; border: 1px solid var(--border); }
.badge.ok { color: var(--ok); border-color: rgba(52,210,123,0.4); background: rgba(52,210,123,0.08); }
.badge.bad { color: var(--accent-hv); border-color: rgba(239,43,43,0.4); background: rgba(239,43,43,0.08); }
.add-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.btn.disabled { color: var(--muted-2); border-style: dashed; cursor: not-allowed; justify-content: center; }

/* ── publish ── */
.clip-list { display: grid; gap: 12px; }
.clip-card { display: flex; align-items: flex-start; gap: 16px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,0.02); }
.clip-card.discarded { opacity: 0.4; }
.clip-media { flex: none; width: 124px; }
.clip-vid { width: 124px; height: 220px; border-radius: 9px; background: #000; object-fit: cover; border: 1px solid var(--border); display: block; }
.clip-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.clip-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.clip-title { font-weight: 700; font-size: 15px; }
.clip-meta { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.clip-dossier summary { cursor: pointer; color: var(--muted); font-family: var(--mono); font-size: 12px; }
.clip-dossier p { margin: 7px 0 0; color: #c4c8d0; font-size: 13px; line-height: 1.5; }
.clip-dossier .dq { color: var(--muted); font-style: italic; }
.why-sigs { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.why-sigs li { font-size: 12px; color: var(--muted); }
.why-sigs b { color: var(--accent-hv); font-family: var(--mono); font-size: 11px; text-transform: uppercase; margin-right: 6px; }
.clip-copy { display: flex; flex-direction: column; gap: 7px; }
.cp-title, .cp-tags, .cp-caption { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--fg); font: inherit; font-size: 13px; }
.cp-caption { resize: vertical; }
.cp-title:focus, .cp-tags:focus, .cp-caption:focus { outline: none; border-color: var(--accent); }
.cp-gen { align-self: flex-start; background: none; border: 1px solid var(--border); color: var(--muted); font: inherit; font-size: 12px; padding: 5px 11px; border-radius: 7px; cursor: pointer; }
.cp-gen:hover { color: var(--fg); border-color: var(--accent); }
.clip-discard { color: var(--muted); }
.clip-discard:hover { color: var(--accent-hv); border-color: var(--accent); }
.clip-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pub-conns { display: flex; flex-direction: column; gap: 5px; margin-right: 6px; }
.pck { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--fg); cursor: pointer; }
.pck input { accent-color: var(--accent); }

/* ── 3-pane publish workbench ── */
.wb { display: grid; grid-template-columns: 240px minmax(0, 1fr); height: calc(100vh - 56px); }
/* open detail → a real third column the grid shares width with (vs overlaying it) */
.wb.detail-open { grid-template-columns: 240px minmax(0, 1fr) var(--ddetail, min(620px, 44vw)); }
.wb-rail { border-right: 1px solid var(--border); padding: 16px 14px; overflow-x: hidden; overflow-y: auto; }
.wb-center { padding: 0 18px 60px; overflow-y: auto; min-width: 0; }
/* persistent toolbar: sticks to the top of the scrolling clip grid */
.wb-head { position: sticky; top: 0; z-index: 20; background: var(--bg);
  margin: 0 -18px 14px; padding: 14px 18px 0; border-bottom: 1px solid var(--border); }
.wb-rail-sec { margin-bottom: 22px; }
.wb-rail-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.wb-rail-head h3 { margin: 0; font-size: 12px; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.wb-count { font-family: var(--mono); font-size: 11px; color: var(--muted-2); }
.wb-jobs { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.wb-jobs .muted { font-size: 12px; }
.wb-job { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px 9px; border: 1px solid var(--border); border-radius: 9px; background: rgba(255,255,255,0.02); }
.wb-jdot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--muted-2); }
.wb-jdot.ok { background: var(--ok); } .wb-jdot.warn { background: #e8b84b; } .wb-jdot.bad { background: var(--accent); }
.wb-jmain { flex: 1; min-width: 0; overflow: hidden; display: flex; flex-direction: column; }
.wb-jmain b { display: block; max-width: 100%; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-jsub { color: var(--muted); font-family: var(--mono); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-jbtn { font-size: 11px; color: var(--muted); background: none; border: 1px solid var(--border); border-radius: 6px; padding: 3px 7px; cursor: pointer; text-decoration: none; flex: none; }
.wb-jbtn:hover { color: var(--fg); border-color: var(--muted); }
/* mobile-only chrome (the rail becomes an off-canvas drawer ≤860px) */
.wb-railtoggle { display: none; align-items: center; gap: 6px; padding: 7px 11px; border: 1px solid var(--border);
  border-radius: 8px; background: rgba(255,255,255,0.03); color: var(--fg); font: inherit; font-size: 12px; cursor: pointer; }
.wb-rt-count { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.wb-rail-x { display: none; position: absolute; top: 10px; right: 12px; width: 30px; height: 30px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--panel); color: var(--muted); font-size: 18px; cursor: pointer; z-index: 2; }
.wb-scrim { display: none; }

.wb-bar { display: flex; align-items: center; gap: 10px 16px; margin-bottom: 10px; flex-wrap: wrap; justify-content: space-between; }
/* row 2 · status strip — quota, campaign plan, outcomes + the two publish toggles,
   one quiet line with a single source per fact (replaced 3 pills + a banner) */
.wb-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px;
  padding: 8px 0 10px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.wb-st-facts { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; flex: 1; min-width: 0; }
.wb-st-facts .sep { color: var(--muted-2); }
.wb-st b, .wb-stat b { color: var(--fg); font-weight: 600; font-family: var(--mono); }
.wb-st.ok, .wb-stat.ok { color: var(--ok); } .wb-st.ok b, .wb-stat.ok b { color: var(--ok); }
.wb-st.bad, .wb-stat.bad { color: var(--accent-hv); } .wb-st.bad b, .wb-stat.bad b { color: var(--accent-hv); }
.wb-stat.warn { color: #e8b84b; } .wb-stat.warn b { color: #e8b84b; }
.wb-st, .wb-stat { white-space: nowrap; } /* facts flow as atoms, never break mid-phrase */
.wb-stat { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.wb-stat:hover { text-decoration: underline; }
.wb-st-ctl { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.wb-st-ctl .wb-link { background: none; border: 0; color: var(--accent); font: inherit; font-size: 12px;
  cursor: pointer; padding: 0 2px; text-decoration: underline; }
.wb-bar-grp { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wb-sel { padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--fg); font: inherit; font-size: 13px; }
.wb-spacer { flex: 1; }
.wb-pager { display: flex; align-items: center; gap: 6px; }
.wb-page { font-family: var(--mono); font-size: 12px; color: var(--muted); min-width: 48px; text-align: center; }
.wb-ibtn { width: 30px; height: 30px; border: 1px solid var(--border); border-radius: 8px; background: rgba(255,255,255,0.03); color: var(--fg); cursor: pointer; }
.wb-ibtn:hover:not(:disabled) { border-color: var(--accent); } .wb-ibtn:disabled { opacity: 0.4; cursor: default; }

.wb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--wb-card, 150px), 1fr)); gap: 12px; }
.wb-size { width: 88px; accent-color: var(--accent); }
.rm-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 16px; }
.wb-card { position: relative; display: flex; flex-direction: column; padding: 0; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); cursor: pointer; overflow: hidden; text-align: left; color: var(--fg); font: inherit; }
.wb-card:hover { border-color: var(--muted); } .wb-card.on { border-color: var(--accent); }
.wb-thumb { width: 100%; aspect-ratio: 9 / 16; max-height: 360px; object-fit: cover; background: #000; display: block; }
.wb-noimg { display: grid; place-items: center; aspect-ratio: 9 / 16; max-height: 360px;
  background: linear-gradient(160deg, #16181e, #0c0d10); }
.wb-noimg::after { content: "▶"; font-size: 22px; color: var(--muted-2);
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--border); background: rgba(255,255,255,0.02); }
.wb-cstatus { position: absolute; top: 8px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--muted-2); box-shadow: 0 0 0 2px rgba(0,0,0,0.4); }
.wb-cstatus.ok { background: var(--ok); } .wb-cstatus.warn { background: #e8b84b; } .wb-cstatus.bad { background: var(--accent); }
.wb-cstatus.removed { background: #9b59b6; box-shadow: 0 0 0 2px rgba(0,0,0,0.4), 0 0 6px #9b59b6; }
/* per-channel results (2-way sync readout) */
.wb-results { display: flex; flex-direction: column; gap: 7px; margin: 4px 0 2px; }
.wb-res { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 9px; background: rgba(255,255,255,0.02); font-size: 12px; }
.wb-res.bad { border-color: rgba(155,89,182,0.5); background: rgba(155,89,182,0.08); }
.wb-res.live { border-color: rgba(52,210,123,0.35); }
.wb-res.planned { border-color: rgba(232,184,75,0.4); background: rgba(232,184,75,0.06); }
.wb-res-h { color: var(--muted); } .wb-res-h b { color: var(--fg); font-weight: 600; }
.wb-res.bad .wb-res-h b { color: #c78ad8; }
.wb-res.live .wb-res-h b { color: var(--ok); text-transform: capitalize; }
.wb-res.planned .wb-res-h b { color: #e8b84b; }
.wb-stat { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.wb-drift { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
  color: #e8b84b; border: 1px solid rgba(232,184,75,0.4); border-radius: 999px; padding: 1px 7px; }
.wb-stats-btn { align-self: flex-start; font-size: 11px; color: var(--muted); background: none;
  border: 1px solid var(--border); border-radius: 7px; padding: 4px 9px; cursor: pointer; }
.wb-stats-btn:hover { color: var(--fg); border-color: var(--muted); }
.wb-stats-btn:disabled { opacity: 0.5; cursor: default; }
.wb-ctitle { padding: 8px 9px 1px; font-size: 12px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wb-cslug { padding: 0 9px 9px; font-family: var(--mono); font-size: 11px; color: var(--muted); }

/* In-flow third column on wide screens (shares layout width with the grid);
   becomes a full-width fixed overlay on mobile (see the max-width:860px block). */
.wb-detail { position: relative; min-width: 0; height: 100%; background: var(--panel);
  border-left: 1px solid var(--border); display: flex; flex-direction: column; overflow: hidden;
  min-height: 0; padding: 0; }
.wb-detail[hidden] { display: none; }
.wb-d-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.wb-d-meta { flex: 1; min-width: 80px; font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-x { width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 8px; background: none; color: var(--muted); font-size: 16px; cursor: pointer; flex: none; }
.wb-x:hover { color: var(--fg); }
/* Box-style split: tall 9:16 preview on the left, form on the right. */
.wb-d-cols { display: flex; flex: 1; min-height: 0; }
.wb-d-left { flex: 0 0 var(--dleft, 50%); min-width: 0; display: flex; flex-direction: column; gap: 10px; padding: 16px; overflow-y: auto; }
.wb-d-form { flex: 1 1 0; min-width: 0; padding: 16px; overflow-y: auto; }
/* the box takes the CLIP's aspect ratio (set from loadedmetadata; 9:16 default)
   instead of flex-stretching into a letterbox — no black bars */
.wb-d-video { display: block; flex: none; width: auto; max-width: 100%; height: auto;
  max-height: 70vh; aspect-ratio: 9 / 16; margin: 0 auto;
  object-fit: contain; border-radius: 10px; background: #000; }
/* draggable tier boundary: column-resize on desktop, row-resize on phones */
.wb-d-split { flex: none; position: relative; width: 11px; margin: 0 -5px; cursor: col-resize;
  z-index: 2; touch-action: none; }
.wb-d-split::before { content: ""; position: absolute; left: 5px; top: 0; bottom: 0; width: 1px;
  background: var(--border); }
.wb-d-split:hover::before, .wb-d-split.drag::before { width: 3px; left: 4px; background: var(--accent); }
.wb-d-split .grip { display: none; }
/* second boundary: the detail panel's edge against the grid (desktop only) */
.wb-d-edge { position: absolute; left: -5px; top: 0; bottom: 0; width: 10px;
  cursor: col-resize; z-index: 3; touch-action: none; }
.wb-d-edge:hover, .wb-d-edge.drag { background: linear-gradient(90deg, transparent 3px, var(--accent) 3px 6px, transparent 6px); }
.wb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wb-chip { font-family: var(--mono); font-size: 11px; padding: 4px 9px; border-radius: 7px; border: 1px solid var(--border); color: var(--muted); }
.wb-chip.posted { color: var(--ok); border-color: rgba(52,210,123,0.4); }
.wb-chip.planned { color: #e8b84b; border-color: rgba(232,184,75,0.4); }
.wb-chip.failed { color: var(--accent-hv); border-color: rgba(239,43,43,0.4); }
.wb-field { margin-bottom: 11px; }
.wb-flabel { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.wb-cnt { font-family: var(--mono); font-size: 11px; color: var(--muted-2); font-style: normal; }
.wb-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wb-detail textarea.rm-input { resize: vertical; font-size: 13px; }
.wb-detail .rm-input { font-size: 14px; padding: 9px 11px; }
.wb-source { display: block; margin-top: 8px; font-family: var(--mono); font-size: 11px; color: var(--muted-2); }
/* lifecycle "⋯" menu + state badges */
.wb-menu-wrap { position: relative; }
.wb-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 210px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 6px;
  box-shadow: 0 16px 44px rgba(0,0,0,0.5); display: flex; flex-direction: column; gap: 2px; }
.wb-menu[hidden] { display: none; }
.wb-menu button { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  width: 100%; text-align: left; background: none; border: 0; border-radius: 7px; padding: 8px 10px;
  color: var(--fg); font: inherit; font-size: 13px; cursor: pointer; }
.wb-menu button:hover { background: rgba(255,255,255,0.05); }
.wb-menu button.danger { color: var(--accent-hv); }
.wb-menu button.danger:hover { background: rgba(239,43,43,0.1); }
.wb-mhint { font-size: 10px; color: var(--muted-2); font-family: var(--mono); }
.wb-dstate { font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); }
.wb-dstate.arch { color: #e8b84b; border-color: rgba(232,184,75,0.4); background: rgba(232,184,75,0.07); }
.wb-dstate.rej { color: #c78ad8; border-color: rgba(155,89,182,0.5); background: rgba(155,89,182,0.08); }
.wb-cleared { font-size: 12px; color: var(--muted); padding: 28px 14px; text-align: center;
  border: 1px dashed var(--border); border-radius: 10px; background: rgba(255,255,255,0.02); }
/* grid lifecycle badge (top-left, opposite the publish-status dot) */
.wb-clife { position: absolute; top: 8px; left: 8px; font-size: 9.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.03em; padding: 2px 7px; border-radius: 10px;
  background: rgba(0,0,0,0.8); border: 1px solid rgba(255,255,255,0.16); color: #fff; }
.wb-clife.arch { color: #f0c560; } .wb-clife.rej { color: #c78ad8; } .wb-clife.limbo { color: #8ea7ff; }
@media (max-width: 860px) {
  /* single column; the rail is an off-canvas drawer, not stacked content */
  .wb, .wb.detail-open { grid-template-columns: 1fr; height: calc(100vh - 52px); }
  .wb-center { padding: 0 12px 80px; }
  .wb-head { margin: 0 -12px 10px; padding: 10px 12px 0; }

  /* Queue/History drawer (slides in from the left, scrim behind) */
  .wb-railtoggle { display: inline-flex; }
  .wb-rail-x { display: block; }
  .wb-rail { position: fixed; top: 0; left: 0; bottom: 0; width: min(310px, 86vw); z-index: 46;
    background: var(--bg); border-right: 1px solid var(--border); padding: 48px 14px 16px;
    transform: translateX(-102%); transition: transform .22s ease; will-change: transform; }
  .wb.rail-open .wb-rail { transform: translateX(0); box-shadow: 12px 0 44px rgba(0,0,0,0.5); }
  .wb-scrim { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(0,0,0,0.5); }
  .wb-scrim[hidden] { display: none; }

  /* compact toolbar: ☰ Queue + actions share the top row; filters become ONE
     swipeable row below (a 2×2 grid made the sticky header eat half the screen) */
  .wb-bar { gap: 6px 8px; margin-bottom: 8px; }
  .wb-bar-grp { gap: 6px; }
  .wb-actions { margin-left: auto; }
  .wb-actions .btn.sm { padding: 6px 10px; font-size: 12px; }
  .wb-ibtn { width: 28px; height: 28px; }
  .wb-page { min-width: auto; font-size: 11px; }
  .wb-filters { flex-wrap: nowrap; overflow-x: auto; width: 100%; order: 3;
    scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .wb-filters::-webkit-scrollbar { display: none; }
  .wb-filters .wb-sel { flex: none; padding: 7px 9px; font-size: 12px; }
  .wb-size { display: none; }
  .wb-railtoggle { font-size: 11px; padding: 6px 9px; }
  .wb-strip { font-size: 11px; gap: 3px 10px; padding: 6px 0 8px; }
  /* chips on their own row — sharing the line squeezes the facts into a ragged column */
  .wb-st-ctl { flex: 1 0 100%; margin-left: 0; justify-content: flex-end; }

  /* fixed 2-col grid on phones (the size slider is gone) */
  .wb-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  /* detail = full-screen sheet; video + form stack, Publish pinned to the bottom */
  .wb-detail { position: fixed; top: 0; right: 0; bottom: 0; left: 0; width: 100vw; height: 100dvh;
    z-index: 48; box-shadow: none; }
  .wb-d-head { gap: 6px; padding: 10px 12px; position: sticky; top: 0; background: var(--panel); z-index: 2; }
  .wb-d-head .btn.sm, .wb-d-head .wb-x { padding: 7px 11px; }
  .wb-d-cols { flex-direction: column; overflow-y: auto; }
  .wb-d-left { flex: none; padding: 12px 12px 0; }
  .wb-d-video { max-height: var(--dvmax, 58dvh); }
  /* boundary becomes a sheet-style grab pill — drag up/down to give the video more/less room */
  .wb-d-split { width: auto; height: 18px; margin: 0; cursor: row-resize;
    display: grid; place-items: center; border-bottom: 1px solid var(--border); }
  .wb-d-split::before { display: none; }
  .wb-d-split .grip { display: block; width: 44px; height: 4px; border-radius: 999px; background: var(--muted-2); }
  .wb-d-split:hover .grip, .wb-d-split.drag .grip { background: var(--accent); }
  .wb-d-form { flex: none; padding-bottom: 88px; }
  .wb-d-edge { display: none; } /* full-screen sheet has no grid edge */
  /* sticky bottom action bar so Publish is always reachable on a phone */
  .wb-d-form .cp-gen { position: sticky; bottom: 0; }
}

@media (max-width: 420px) {
  .wb-grid { gap: 8px; }
  .wb-strip { font-size: 10.5px; }
}

/* modals + form rows go single-column on a phone */
@media (max-width: 640px) {
  .rm { padding: 0; place-items: stretch; }
  .rm-card { border-radius: 0; max-height: 100dvh; }
  .rm-wide { max-width: 100vw; max-height: 100dvh; }
  .wb-row2, .wb-row3 { grid-template-columns: 1fr; }
  .pl-row { grid-template-columns: 1fr auto; row-gap: 2px; }
  .pl-row .pl-slug { display: none; }
}
.clip-controls select, .pub-when { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--fg); font: inherit; font-size: 13px; }
.btn.pub-go { padding: 8px 16px; }
.btn.sm { padding: 7px 13px; font-size: 13px; }
.jerr { color: var(--accent-hv); cursor: help; }
.results { display: flex; gap: 28px; margin-bottom: 16px; flex-wrap: wrap; }
.rstat { display: flex; flex-direction: column; gap: 1px; }
.rstat .rn { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.rstat .rl { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.ledger td.num, .ledger th.num { text-align: right; }
.clip-group { margin-bottom: 18px; }
.clip-group-head { font-size: 13px; color: var(--muted); margin: 0 0 9px; padding-bottom: 7px; border-bottom: 1px solid var(--border); }
.clip-group-head strong { color: var(--fg); }
.cg-when { color: var(--muted); font-family: var(--mono); font-size: 12px; }
/* reservation modal: slug field */
.rm-field { display: block; margin: 18px 0 4px; }
.rm-flabel { display: block; font-size: 14px; color: var(--muted); margin-bottom: 7px; }
.rm-input { width: 100%; padding: 11px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg); color: var(--fg); font: inherit; font-size: 15px; }
.rm-input:focus { outline: none; border-color: var(--accent); }
@media (max-width: 620px) { .clip-card { flex-direction: column; align-items: stretch; } .clip-controls { justify-content: space-between; } }

/* ── login ── */
main.auth { max-width: 380px; margin: 0 auto; padding: 90px 22px; text-align: center; }
main.auth .brand.big { justify-content: center; margin-bottom: 28px; }
main.auth .brand.big img { width: 40px; height: 40px; }
main.auth .brand.big span { font-size: 20px; }
main.auth h1 { font-size: 28px; }
main.auth .sub { color: var(--muted); margin: 0 0 26px; }
.gbtn {
  display: flex; align-items: center; justify-content: center; gap: 11px; width: 100%;
  padding: 13px; border-radius: 11px; background: #fff; color: #1a1a1a; font-weight: 600; font-size: 15px;
}
.gbtn:hover { background: #f1f1f1; }
.err { color: var(--accent-hv); background: rgba(239,43,43,0.08); border: 1px solid rgba(239,43,43,0.3); border-radius: 9px; padding: 10px 12px; margin: 0 0 18px; font-size: 14px; }
.fine { color: var(--muted-2); font-size: 12px; margin-top: 24px; }
.fine a { color: var(--muted); text-decoration: underline; }

/* ── toast ── */
.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  background: rgba(18,19,24,0.97); border: 1px solid var(--border); border-radius: 11px;
  padding: 12px 18px; font-size: 14px; z-index: 50; box-shadow: 0 12px 36px rgba(0,0,0,0.5); max-width: calc(100vw - 28px);
}
.toast.ok { border-color: rgba(52,210,123,0.4); }
.toast.err { border-color: rgba(239,43,43,0.45); }

/* ── status-strip toggle chips: auto-post + airlock ── */
.wb-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
  border: 1px solid var(--border); border-radius: 999px; background: rgba(255,255,255,0.03);
  color: var(--muted); font: inherit; font-size: 11px; cursor: pointer; }
.wb-chip:hover { border-color: var(--muted); }
.wb-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); flex: 0 0 auto; }
.wb-chip.on { border-color: rgba(239,43,43,0.5); background: rgba(239,43,43,0.10); color: var(--accent-hv); }
.wb-chip.on .dot { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.wb-chip.partial { border-color: rgba(232,184,75,0.5); color: #e8b84b; }
.wb-chip.partial .dot { background: #e8b84b; }
/* airlock ON is a SAFETY state (green), not danger like auto-post ON */
#wbAirlock.on { border-color: rgba(52,210,123,0.5); background: rgba(52,210,123,0.10); color: var(--ok); }
#wbAirlock.on .dot { background: var(--ok); box-shadow: 0 0 6px var(--ok); }
/* persona tint on grid cards — a small trailing tag */
.wb-cpersona { display: inline-block; margin-left: 6px; font-size: 9px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); vertical-align: middle;
  padding: 1px 6px; border: 1px solid var(--border); border-radius: 999px; background: rgba(255,255,255,0.03); }

/* ── library ops modal ── */
.rm-wide { max-width: 680px; max-height: 88vh; overflow-y: auto; }
.wb-row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.lib-group { border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin: 12px 0; }
.lib-group-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted); margin-bottom: 10px; }
.lib-count { font-size: 13px; color: var(--muted); }
.lib-count b { color: var(--fg); font-size: 16px; }
.lib-break { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.lib-break .d { font-size: 11px; font-family: var(--mono); color: var(--muted); border: 1px solid var(--border);
  border-radius: 6px; padding: 2px 7px; }
.lib-break .d b { color: var(--fg); }
.lib-mode-note { font-size: 12px; color: var(--muted); line-height: 1.5; margin-bottom: 10px;
  padding: 7px 10px; background: var(--panel, rgba(255,255,255,0.03)); border: 1px solid var(--border); border-radius: 8px; }
.lib-mode-note b { color: var(--fg); }
.lib-preview { margin: 10px 0; max-height: 220px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; }
.pl-row { display: grid; grid-template-columns: 120px 90px 1fr auto; gap: 8px; padding: 5px 9px;
  font-size: 11px; border-bottom: 1px solid var(--border); align-items: center; }
.pl-row:last-child { border-bottom: none; }
.pl-when { color: var(--accent-hv); font-family: var(--mono); }
.pl-slug { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-meta { color: var(--muted-2); font-family: var(--mono); }
.lib-foot { display: flex; align-items: center; gap: 8px; margin: 10px 0; }
.lib-progress { font-size: 12px; color: var(--fg); }
.lib-manage { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.lib-shift { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.lib-shift .rm-input { width: 58px; padding: 4px 6px; }

/* ── doomscroll: full-screen vertical feed ── */
.pub-doom { position: fixed; inset: 0; z-index: 90; background: #000; display: none; }
.pub-doom.show { display: block; }
.pub-doom-top { position: absolute; top: 0; left: 0; right: 0; z-index: 4; display: flex;
  align-items: center; gap: 10px; padding: 10px 14px; color: #fff;
  background: linear-gradient(rgba(0,0,0,0.65), transparent); }
.pub-doom-top .t { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; }
.pub-doom-count { flex: 1; color: #aaa; font-size: 12px; font-family: var(--mono); }
.pub-doom-feed { height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; }
.pub-doom-feed::-webkit-scrollbar { display: none; }
.pub-doom-item { height: 100%; scroll-snap-align: start; position: relative;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #16181e, #0c0d10); } /* placeholder for posterless clips */
/* poster sits behind the video; video is transparent so the poster shows through
   the load gap (no black flash on scroll). The frame covers it once decoded. */
.pub-doom-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; z-index: 0; }
.pub-doom-item video { position: relative; z-index: 1; height: 100%; max-width: 100%; object-fit: contain; background: transparent; }
.pub-doom-info { position: absolute; left: 16px; bottom: 24px; right: 92px; z-index: 2;
  color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,0.85); pointer-events: none; }
.pub-doom-info .dt { font-size: 15px; font-weight: 700; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pub-doom-info .ds { font-size: 12px; color: #d6d6d6; margin-top: 4px; }
.pub-doom-rail { position: absolute; right: 14px; bottom: 26px; z-index: 3;
  display: flex; flex-direction: column; gap: 12px; align-items: center; }
.pub-doom-grp { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.pub-doom-rail button { width: 50px; height: 50px; border-radius: 50%; cursor: pointer; padding: 0;
  border: 1px solid rgba(255,255,255,0.22); background: rgba(22,22,22,0.72); color: #fff;
  font-size: 19px; display: flex; align-items: center; justify-content: center; }
.pub-doom-rail button:hover { background: rgba(44,44,44,0.92); }
.pub-doom-rail .pub { background: var(--accent); border-color: var(--accent); }
.pub-doom-rail .pub.done { background: #2e6b48; border-color: #2e6b48; }
.pub-doom-rail .lbl { font-size: 10px; color: #fff; opacity: 0.85; }
.pub-doom-empty { position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; color: #888; font-size: 13px; }

@media (max-width: 620px) {
  /* mobile topbar: logo + the page nav links + Buy-hours CTA + avatar. The
     balance pill and Sign-out are hidden (both live on the account page) so the
     real navigation (Reserve/Publish/Connections) stays visible. */
  .topbar { padding: 11px 12px; gap: 8px; }
  .topbar nav { gap: 12px; font-size: 13px; flex-wrap: nowrap; }
  .topbar .brand span { display: none; }     /* logo only — frees room for the links + CTA */
  .navlink { white-space: nowrap; }
  .topbar .bal, .topbar .logout { display: none; }   /* secondary → on the account page */
  .topbar nav .btn.sm.buyhdr { padding: 6px 10px; font-size: 12px; }
  .wrap { padding: 26px 16px 80px; }
  .panel { padding: 16px; }
  .hero-row { flex-direction: column; }
  .balance-card { width: 100%; }
  .slot-grid { grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 7px; }
  .slot { padding: 12px 4px; }
  .date-pill { width: 70px; }
  .leg-time { font-size: 22px; }
  .leg-mid { min-width: 70px; }
  .rm-card { padding: 24px 16px 18px; border-radius: 16px; }
  .dur { flex-direction: column; align-items: stretch; gap: 10px; }
  .stepper { justify-content: space-between; }
}
@media (max-width: 380px) {
  .topbar nav { gap: 10px; font-size: 13px; }
  .leg-time { font-size: 19px; }
  .leg-mid { min-width: 56px; }
}
