/* 연차 꿀조합 플래너 (/leave/) — design pass matching /lab.css tokens and typography.
 * Loaded after /lab.css and leave/leave.css. Selectors only; no content: text injection. */

:root {
  --hol: var(--lab-fb-err, #b42318);
  --hol-soft: #fbe9e7;
  --sat: #1d4ed8;
  --lv: var(--lab-accent, #b83b0a);
  --on-lv: #ffffff;
  --band: #fbe7d9;
  --wk: #8d94a5;
  --best: #166534;
  --best-soft: #e7f4ec;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --hol: var(--lab-fb-err, #ff8f86);
    --hol-soft: #331717;
    --sat: #8ab4ff;
    --lv: var(--lab-accent, #ff8a4c);
    --on-lv: var(--lab-on-ink, #121213);
    --band: #362115;
    --wk: #646a7a;
    --best: #4ade80;
    --best-soft: #13261a;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --hol: var(--lab-fb-err, #ff8f86);
  --hol-soft: #331717;
  --sat: #8ab4ff;
  --lv: var(--lab-accent, #ff8a4c);
  --on-lv: var(--lab-on-ink, #121213);
  --band: #362115;
  --wk: #646a7a;
  --best: #4ade80;
  --best-soft: #13261a;
  color-scheme: dark;
}

/* ---------- base, type & focus ---------- */
html {
  overflow-x: clip;
}

body {
  background: var(--lab-bg);
  color: var(--lab-text);
  font-family: var(--lab-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: anywhere;
  overflow-x: clip;
}

:focus-visible {
  outline: 2px solid var(--lab-accent);
  outline-offset: 2px;
}

.v-wrap {
  max-width: 860px;
  min-height: calc(100dvh - 57px);
  margin: 0 auto;
  padding: 24px 16px 88px;
}

.mono {
  font-family: var(--lab-mono);
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--lab-muted);
}

.n {
  font-family: var(--lab-mono);
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--lab-muted);
  margin-left: 2px;
}

/* ---------- buttons, segmented controls, select & pills ---------- */
.btn {
  height: auto;
  min-height: 38px;
  max-width: 100%;
  padding: 7px 14px;
  border-radius: var(--lab-radius);
  border: 1px solid var(--lab-line-strong);
  background: var(--lab-surface);
  color: var(--lab-text);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
  white-space: normal;
  text-align: center;
  box-shadow: var(--lab-shadow-sm);
  transition: border-color .15s, background-color .15s, color .15s, opacity .15s;
}

.btn:not(.primary):not(.ghost):not(:disabled):hover {
  border-color: var(--lab-text);
  background: var(--lab-surface2);
}

.btn:not(:disabled):active {
  opacity: .84;
}

.btn.primary {
  background: var(--lab-ink);
  border-color: var(--lab-ink);
  color: var(--lab-on-ink);
}

.btn.primary:not(:disabled):hover {
  opacity: .88;
}

.btn.sm {
  height: auto;
  min-height: 34px;
  padding: 6px 12px;
  font-size: 13px;
  border-radius: var(--lab-radius);
}

.btn.ghost {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  padding: 5px 10px 5px 6px;
}

.btn.ghost:not(:disabled):hover {
  background: var(--lab-surface2);
  border-color: var(--lab-line);
}

.btn svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--lab-radius);
  border: 1px solid var(--lab-line-strong);
  background: var(--lab-surface);
  color: var(--lab-text);
  box-shadow: var(--lab-shadow-sm);
  transition: border-color .15s, background-color .15s, opacity .15s;
}

.icon-btn:hover {
  border-color: var(--lab-text);
  background: var(--lab-surface2);
}

.icon-btn:active {
  opacity: .84;
}

.seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 3px;
  max-width: 100%;
  overflow: visible;
  border: 1px solid var(--lab-line-strong);
  border-radius: var(--lab-radius);
  background: var(--lab-surface);
  box-shadow: var(--lab-shadow-sm);
}

.seg button {
  height: auto;
  min-height: 30px;
  padding: 5px 12px;
  border: 0;
  border-radius: calc(var(--lab-radius) - 3px);
  background: transparent;
  color: var(--lab-muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  white-space: normal;
  transition: color .15s, background-color .15s, opacity .15s;
}

.seg button + button {
  border-left: 0;
}

.seg button:not([aria-pressed="true"]):hover {
  color: var(--lab-text);
  background: var(--lab-surface2);
}

.seg button:active {
  opacity: .86;
}

.seg button[aria-pressed="true"] {
  background: var(--lab-ink);
  color: var(--lab-on-ink);
  font-weight: 700;
}

.seg button[aria-pressed="true"]:hover {
  opacity: .9;
}

.seg button:focus-visible {
  outline: 2px solid var(--lab-accent);
  outline-offset: 1px;
  position: relative;
  z-index: 1;
}

.v-sel {
  height: auto;
  min-height: 38px;
  max-width: 100%;
  min-width: 112px;
  padding: 6px 34px 6px 12px;
  border: 1px solid var(--lab-line-strong);
  border-radius: var(--lab-radius);
  background-color: var(--lab-bg);
  color: var(--lab-text);
  font-size: 14.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
  box-shadow: var(--lab-shadow-sm);
  transition: border-color .15s, background-color .15s;
}

.v-sel:hover {
  border-color: var(--lab-muted);
}

.v-sel:focus-visible {
  outline: 2px solid var(--lab-accent);
  outline-offset: -1px;
  border-color: var(--lab-accent);
}

.v-sel option {
  background: var(--lab-surface);
  color: var(--lab-text);
}

.pill {
  display: inline-flex;
  align-items: center;
  height: auto;
  min-height: 24px;
  padding: 2px 10px;
  border: 1px solid var(--lab-line);
  border-radius: 999px;
  background: var(--lab-surface2);
  color: var(--lab-text);
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
  white-space: nowrap;
  flex: none;
}

/* ---------- intro & settings card ---------- */
.v-intro {
  margin-bottom: 18px;
}

.v-intro h1 {
  margin: 2px 0 8px;
  font-size: clamp(1.5rem, 3.2vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.22;
}

.v-intro p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.62;
  color: var(--lab-muted);
  max-width: 62ch;
}

.v-intro .v-src {
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--lab-muted);
  font-variant-numeric: tabular-nums;
}

.v-box {
  margin: 18px 0;
  padding: 18px 20px;
  border: 1px solid var(--lab-line);
  border-radius: 12px;
  background: var(--lab-surface);
  box-shadow: var(--lab-shadow-sm);
  min-width: 0;
}

.v-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  min-width: 0;
}

.v-row + .v-row {
  margin-top: 14px;
}

.v-lab {
  min-width: 104px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--lab-muted);
  line-height: 1.35;
}

.v-set .v-lab {
  min-width: 118px;
}

.v-lab small {
  display: block;
  margin-top: 1px;
  font-size: 12px;
  font-weight: 500;
  color: var(--lab-muted);
}

.v-extra {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--lab-line);
}

.v-extra summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--lab-text);
  border-radius: 6px;
  padding: 2px 0;
  transition: color .15s;
}

.v-extra summary:hover {
  color: var(--lab-accent);
}

.v-extra summary::before {
  color: var(--lab-muted);
  transition: transform .15s, color .15s;
}

.v-extra summary:hover::before {
  color: var(--lab-accent);
}

.v-extra summary .n {
  margin-left: 2px;
}

.v-extra p {
  margin: 10px 0;
  font-size: 13.5px;
  line-height: 1.55;
}

.v-add {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
  min-width: 0;
}

.v-add input,
.v-row input[type="text"] {
  height: auto;
  min-height: 40px;
  min-width: 0;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--lab-line-strong);
  border-radius: var(--lab-radius);
  background: var(--lab-bg);
  color: var(--lab-text);
  font-size: 16px;
  line-height: 1.4;
  transition: border-color .15s, background-color .15s;
}

.v-add input {
  flex: 1 1 160px;
}

.v-add .btn {
  flex: none;
  min-height: 40px;
}

.v-row input[type="text"] {
  flex: 1 1 220px;
}

.v-add input:hover,
.v-row input[type="text"]:hover {
  border-color: var(--lab-muted);
}

.v-add input:focus,
.v-row input[type="text"]:focus {
  outline: 2px solid var(--lab-accent);
  outline-offset: -1px;
  border-color: var(--lab-accent);
}

input::placeholder {
  color: var(--lab-faint);
  opacity: 1;
}

.v-row input[type="text"].need {
  border-color: var(--hol);
  background: var(--hol-soft);
}

.v-row input[type="text"].need:focus {
  border-color: var(--hol);
  outline: 2px solid var(--hol);
  outline-offset: -1px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: auto;
  min-height: 32px;
  max-width: 100%;
  padding: 3px 5px 3px 12px;
  border: 1px solid var(--lab-line-strong);
  border-radius: 999px;
  background: var(--lab-bg);
  color: var(--lab-text);
  font-size: 13.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}

.chip-x {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  color: var(--lab-muted);
  transition: background-color .15s, color .15s;
}

.chip-x:hover {
  background: var(--lab-line);
  color: var(--lab-text);
}

.chip-x:focus-visible {
  outline: 2px solid var(--lab-accent);
  outline-offset: 1px;
}

.v-empty {
  margin: 24px 0;
  padding: 32px 20px;
  text-align: center;
  color: var(--lab-muted);
  font-size: 14.5px;
  line-height: 1.6;
  border: 1px dashed var(--lab-line-strong);
  border-radius: 12px;
  background: var(--lab-surface);
  box-shadow: var(--lab-shadow-sm);
}

/* ---------- sections & headings ---------- */
.v-sec {
  margin-top: 28px;
}

.v-h {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  margin: 0 2px 12px;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.35;
  color: var(--lab-text);
}

.v-h svg {
  width: 18px;
  height: 18px;
  color: var(--lab-accent);
  flex: none;
  align-self: center;
}

.v-h small {
  font-size: 13px;
  font-weight: 500;
  color: var(--lab-muted);
}

.v-box.v-sec .v-h {
  margin: 0 0 14px;
}

/* ---------- top 3 combos & day strips ---------- */
.tops {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.tops li {
  min-width: 0;
}

.top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  align-items: start;
  gap: 10px;
  height: 100%;
  padding: 15px 16px;
  border: 1px solid var(--lab-line);
  border-radius: 12px;
  background: var(--lab-surface);
  box-shadow: var(--lab-shadow-sm);
  color: var(--lab-text);
  text-decoration: none;
  min-width: 0;
  transition: border-color .15s, box-shadow .15s, background-color .15s, opacity .15s;
}

.top:hover {
  border-color: var(--lab-line-strong);
  box-shadow: 0 3px 12px rgba(20, 20, 18, .06);
}

:root[data-theme="dark"] .top:hover {
  box-shadow: 0 3px 12px rgba(0, 0, 0, .3);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .top:hover {
    box-shadow: 0 3px 12px rgba(0, 0, 0, .3);
  }
}

.top:active {
  opacity: .9;
}

.top-n {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--lab-surface2);
  border: 1px solid var(--lab-line-strong);
  color: var(--lab-text);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.tops li:first-child .top-n {
  background: var(--lab-ink);
  border-color: var(--lab-ink);
  color: var(--lab-on-ink);
}

.top-x {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  align-self: center;
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
  color: var(--best);
  background: var(--best-soft);
  border: 1px solid color-mix(in srgb, var(--best) 26%, var(--lab-line));
  border-radius: 999px;
  padding: 2px 9px;
}

.top-b {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  height: 100%;
}

.top-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--lab-muted);
  line-height: 1.35;
}

.top-big {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.35;
  color: var(--lab-text);
}

.top-big em,
.v-head h1 em {
  font-style: normal;
  color: var(--lv);
}

.top-when {
  font-size: 13px;
  color: var(--lab-muted);
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

.strip {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: auto;
  padding-top: 6px;
}

.sq {
  display: inline-block;
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.sq.out {
  background: transparent;
  border: 1.5px solid var(--lab-line-strong);
}

.sq.wk {
  background: var(--wk);
  border: 1px solid var(--wk);
}

.sq.hol {
  background: var(--hol-soft);
  border: 2px solid var(--hol);
}

.sq.lv {
  background: var(--lv);
  border: 1px solid var(--lv);
}

.sq.band {
  background: var(--band);
  border: 1.5px solid color-mix(in srgb, var(--lv) 50%, var(--lab-line-strong));
}

/* ---------- year plan ---------- */
.v-plan .num {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.v-plan .num input {
  width: 64px;
  height: 36px;
  padding: 0 6px;
  text-align: center;
  border: 1px solid var(--lab-line-strong);
  border-radius: var(--lab-radius);
  background: var(--lab-bg);
  color: var(--lab-text);
  font-size: 16px;
  font-weight: 600;
  font-family: var(--lab-mono);
  font-variant-numeric: tabular-nums;
  appearance: textfield;
  -moz-appearance: textfield;
  transition: border-color .15s, background-color .15s;
}

.v-plan .num input::-webkit-inner-spin-button,
.v-plan .num input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.v-plan .num input:hover {
  border-color: var(--lab-muted);
}

.v-plan .num input:focus {
  outline: 2px solid var(--lab-accent);
  outline-offset: -1px;
  border-color: var(--lab-accent);
}

.v-sum {
  margin: 14px 0 12px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--lab-text);
  font-variant-numeric: tabular-nums;
}

.v-sum b {
  font-weight: 700;
}

.v-plan > p.muted {
  margin: 14px 0 0;
  font-size: 14px;
  line-height: 1.55;
}

.plan {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--lab-line);
}

.plan li {
  border-bottom: 1px solid var(--lab-line);
}

.plan li:last-child {
  border-bottom: 0;
}

.plan a {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px -8px;
  padding: 11px 8px;
  border-bottom: 0;
  border-radius: var(--lab-radius);
  color: var(--lab-text);
  text-decoration: none;
  transition: background-color .15s, opacity .15s;
}

.plan a:hover {
  background: var(--lab-surface2);
}

.plan a:active {
  opacity: .88;
}

.plan-t {
  display: grid;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.plan-t b {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.35;
}

.plan-t span {
  font-size: 13px;
  color: var(--lab-muted);
  font-variant-numeric: tabular-nums;
  line-height: 1.45;
}

.plan a:hover .pill {
  background: var(--lab-surface);
  border-color: var(--lab-line-strong);
}

.plan svg {
  width: 16px;
  height: 16px;
  color: var(--lab-muted);
  flex: none;
  transition: transform .15s, color .15s;
}

.plan a:hover svg {
  color: var(--lab-text);
  transform: translateX(2px);
}

/* ---------- all groups & option pills ---------- */
.groups {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.grp {
  padding: 15px 16px;
  border: 1px solid var(--lab-line);
  border-radius: 12px;
  background: var(--lab-surface);
  box-shadow: var(--lab-shadow-sm);
  min-width: 0;
}

.grp-h {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin-bottom: 11px;
}

.grp-h b {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.35;
  color: var(--lab-text);
}

.grp-h .muted {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.opts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: auto;
  min-height: 34px;
  max-width: 100%;
  padding: 5px 13px;
  border: 1px solid var(--lab-line-strong);
  border-radius: 999px;
  background: var(--lab-surface);
  color: var(--lab-text);
  font-size: 13.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  text-decoration: none;
  box-shadow: var(--lab-shadow-sm);
  transition: border-color .15s, background-color .15s, color .15s, opacity .15s;
}

.opt:not(.best):not(.on):hover {
  border-color: var(--lab-text);
  background: var(--lab-surface2);
}

.opt:active {
  opacity: .84;
}

.opt.best {
  border-color: var(--best);
  background: var(--best-soft);
  color: var(--lab-text);
}

.opt.best:not(.on):hover {
  border-color: var(--best);
  background: color-mix(in srgb, var(--best) 14%, var(--lab-surface));
}

.opt-tag {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--best);
  letter-spacing: -.01em;
}

.opt.on {
  background: var(--lab-ink);
  border-color: var(--lab-ink);
  color: var(--lab-on-ink);
  font-weight: 700;
}

.opt.on:hover {
  opacity: .9;
}

/* ---------- break view header & switcher ---------- */
.v-nav {
  margin: -4px 0 10px;
}

.v-nav .btn.ghost {
  color: var(--lab-muted);
  margin-left: -6px;
  min-height: 34px;
  font-size: 13.5px;
}

.v-nav .btn.ghost:hover {
  color: var(--lab-text);
}

.v-kick {
  margin: 0 0 2px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--lab-muted);
}

.v-head h1 {
  margin: 2px 0 6px;
  font-size: clamp(1.375rem, 3.2vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.26;
}

.v-when {
  margin: 0;
  font-size: 14px;
  color: var(--lab-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  font-variant-numeric: tabular-nums;
}

.v-when .pill {
  color: var(--best);
  background: var(--best-soft);
  border-color: color-mix(in srgb, var(--best) 26%, var(--lab-line));
  font-weight: 700;
}

.v-switch {
  margin: 16px 0 4px;
}

/* ---------- calendar & legend ---------- */
.cal-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.cal {
  padding: 15px 16px;
  border: 1px solid var(--lab-line);
  border-radius: 12px;
  background: var(--lab-surface);
  box-shadow: var(--lab-shadow-sm);
  min-width: 0;
}

.cal h3 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--lab-text);
  font-variant-numeric: tabular-nums;
}

.cal-g {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}

.wd {
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  color: var(--lab-muted);
  padding-bottom: 4px;
}

.wd.sun {
  color: var(--hol);
}

.wd.sat {
  color: var(--sat);
}

.cd {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 48px;
  min-width: 0;
  padding: 5px 2px 4px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--lab-text);
  font-size: 14px;
  line-height: 1.2;
}

.cd b {
  font-weight: 600;
  font-family: var(--lab-mono);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

.cd small {
  font-size: 10.5px;
  font-weight: 600;
  margin-top: 2px;
  text-align: center;
  line-height: 1.15;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: normal;
}

.cd.blank {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.cd.sun,
.cd.hol {
  color: var(--hol);
}

.cd.hol b {
  font-weight: 700;
}

.cd.sat {
  color: var(--sat);
}

.cd.in {
  background: var(--band);
  border-color: color-mix(in srgb, var(--lv) 34%, var(--lab-line));
}

.cd.in b {
  font-weight: 700;
}

.cd.lv {
  background: var(--lv);
  border-color: var(--lv);
  color: var(--on-lv);
}

.cd.lv b,
.cd.lv small {
  font-weight: 700;
}

.cd.in.first {
  border-color: var(--lv);
  box-shadow: inset 3px 0 0 var(--lv);
}

.cd.in.last {
  border-color: var(--lv);
  box-shadow: inset -3px 0 0 var(--lv);
}

.cd.in.first.last {
  border-color: var(--lv);
  box-shadow: inset 3px 0 0 var(--lv), inset -3px 0 0 var(--lv);
}

.cd.in.lv.first {
  border-color: var(--lab-ink);
  box-shadow: inset 3px 0 0 var(--on-lv);
}

.cd.in.lv.last {
  border-color: var(--lab-ink);
  box-shadow: inset -3px 0 0 var(--on-lv);
}

.cd.in.lv.first.last {
  border-color: var(--lab-ink);
  box-shadow: inset 3px 0 0 var(--on-lv), inset -3px 0 0 var(--on-lv);
}

.cd.today {
  outline: 1.5px solid var(--lab-ink);
  outline-offset: -2px;
}

.cd.today:not(.in) {
  background: var(--lab-surface2);
  border-color: var(--lab-line-strong);
}

.cd.today.lv {
  outline-color: var(--on-lv);
  outline-offset: -3px;
}

.cd.today b {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 10px 2px 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--lab-muted);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend .red {
  color: var(--hol);
  font-weight: 600;
}

/* ---------- day list & trip hand-off ---------- */
.v-days {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.v-col {
  min-width: 0;
}

.v-days h2,
.v-trip h2 {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.35;
  color: var(--lab-text);
}

.v-days h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}

.v-days ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 14.5px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

.v-days li {
  min-width: 0;
}

.v-days li.lvd {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
}

.v-days li.lvd::before {
  content: "";
  display: inline-block;
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--lv);
  margin-right: 0;
}

.v-days p.muted {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}

.v-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--lab-line);
}

.v-trip h2 {
  margin-bottom: 14px;
}

.v-go {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.v-go .btn {
  min-height: 42px;
  padding: 9px 18px;
}

.v-tip {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
}

/* ---------- toast ---------- */
.v-toast {
  bottom: calc(20px + env(safe-area-inset-bottom));
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  border-radius: var(--lab-radius);
  background: var(--lab-ink);
  color: var(--lab-on-ink);
  box-shadow: var(--lab-shadow-lg);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
}

/* ---------- tablet & desktop (>= 700px / 760px / 960px) ---------- */
@media (min-width: 700px) {
  .cal-wrap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .v-days {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px 24px;
  }

  .v-acts {
    grid-column: 1 / -1;
  }
}

@media (min-width: 760px) {
  .tops {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
}

@media (min-width: 960px) {
  .v-wrap {
    padding: 28px 16px 92px;
  }
}

/* ---------- mobile (<= 520px & 360px) ---------- */
@media (max-width: 520px) {
  .v-go .btn {
    flex: 1 1 100%;
  }
}

@media (max-width: 420px) {
  .v-wrap {
    padding: 16px 12px 76px;
  }

  .v-box {
    padding: 15px 14px;
  }

  .v-lab,
  .v-set .v-lab {
    min-width: 92px;
  }

  .seg button {
    padding: 5px 10px;
    font-size: 12.5px;
  }

  .top {
    padding: 14px;
  }

  .plan a {
    margin: 2px -6px;
    padding: 11px 6px;
  }

  .grp {
    padding: 14px;
  }

  .cal {
    padding: 12px 10px;
  }

  .cal-g {
    gap: 2px;
  }

  .cd {
    min-height: 46px;
    padding: 5px 1px 4px;
  }

  .cd b {
    font-size: 13px;
  }

  .cd small {
    font-size: 9.5px;
    letter-spacing: -.02em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .icon-btn,
  .seg button,
  .v-sel,
  .v-extra summary,
  .v-extra summary::before,
  .v-add input,
  .v-row input[type="text"],
  .chip-x,
  .top,
  .v-plan .num input,
  .plan a,
  .plan svg,
  .opt,
  .v-toast {
    transition: none;
  }
}
