/* PodcastHub Design Lab · Date + time, wave 2 (W2C, Rick, 2026-10-16)
   Uses ONLY tokens.css variables. Page-local values (--local-*) are derived from tokens with color-mix, never a raw colour.
   Built on wave-1 calendar.css option 4 (heat strip) and timeslots.css option 5 (tactile keys), copied and shrunk. */

:root {
  --local-glow: color-mix(in srgb, var(--primary) 45%, transparent);           /* selection glow α .45 (buttons rule 32) */
  --local-sheen: color-mix(in srgb, var(--ph-white) 55%, transparent);
  --local-hi: color-mix(in srgb, var(--ph-white) 85%, transparent);           /* key top-edge light */
  --local-shade: color-mix(in srgb, var(--ph-ink) 9%, transparent);            /* key bottom-edge shade */
  --local-contact: color-mix(in srgb, var(--ph-ink) 14%, transparent);
  --local-drop: color-mix(in srgb, var(--ph-ink) 9%, transparent);
  --local-hatch: color-mix(in srgb, var(--fg-subtle) 22%, transparent);
  --local-deep: var(--primary-active);                                          /* the tactile primary's darker-down stop */
  --local-frost: color-mix(in srgb, var(--surface) 78%, transparent);         /* sticky labels over scrolling keys */
  --local-busy: color-mix(in srgb, var(--fg) 82%, var(--surface));            /* booked gap on the ruler */
  --tw: 56px;                                                                  /* ruler tick width */
}
[data-theme="dark"] {
  --local-glow: color-mix(in srgb, var(--secondary) 50%, transparent);
  --local-hi: color-mix(in srgb, var(--ph-white) 10%, transparent);
  --local-shade: color-mix(in srgb, var(--ph-ink) 60%, transparent);
  --local-contact: transparent; --local-drop: transparent;                     /* dark: lighter fill + border, no shadows */
  --local-hatch: color-mix(in srgb, var(--fg-subtle) 30%, transparent);
  --local-frost: color-mix(in srgb, var(--surface-raised) 80%, transparent);
  --local-busy: color-mix(in srgb, var(--fg) 70%, var(--surface));
}
[dir="rtl"] { --tw: 64px; }                                                    /* «12:30 م» needs the room */

/* the shell's 390 px column + page padding overflows a 390 px phone: page-local fix (same as wave 1) */
@media (max-width: 430px) {
  .options { padding-inline: 0; }
  .option .label { padding-inline: 16px; }
  .option .frame { border-radius: 0; border-inline: 0; }
}

/* ---------- shared bits ---------- */
button { -webkit-tap-highlight-color: transparent; font: inherit; color: inherit; }
.frame.dt { touch-action: manipulation; }
.frame.has-sheet { min-height: 720px; }
.base { position: relative; }
[dir="rtl"] .frame.dt, [dir="rtl"] .frame.dt button { font-family: var(--font-arabic); }
.ctx { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 0 12px; }
.ctx .studio { font: 700 var(--fs-h3)/1.2 var(--font-display); font-stretch: var(--font-display-stretch); }
[dir="rtl"] .ctx .studio { font-family: var(--font-arabic); font-stretch: normal; }
.ctx .ask { font-size: var(--fs-ui); color: var(--fg-muted); }
.lbl { font-size: var(--fs-ui); line-height: 1.3; color: var(--fg-muted); font-weight: 500; }
.flip { display: inline-block; }
[dir="rtl"] .flip { transform: scaleX(-1); }
.tk { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--primary-on); color: var(--primary-fill); flex: none; }
.tk svg { width: 11px; height: 11px; }
.pop-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); display: inline-block; }
.sum { margin-top: 14px; min-height: 76px; padding: 12px 12px 12px 14px; border-radius: var(--r-tile); background: var(--surface); border: 1px solid var(--line-subtle); display: flex; gap: 12px; align-items: center; }
[dir="rtl"] .sum { padding: 12px 14px 12px 12px; }
.sum > div { flex: 1; min-width: 0; }
.sum .tick { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-fill); color: var(--primary-on); }
.sum .tick svg { width: 16px; height: 16px; }
.sum.empty .tick, .sum.half .tick { background: var(--surface-sunken); color: var(--fg-subtle); }
.sum .what { font-size: var(--fs-ui); font-weight: 600; line-height: 1.35; }
.sum .more { font-size: var(--fs-ui); color: var(--fg-muted); line-height: 1.35; }
.sum .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.sum.empty .what { color: var(--fg-muted); font-weight: 500; }
.sum-act { flex: none; min-height: var(--t-min); margin-block: -4px -6px; padding: 0 16px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: var(--surface); font-size: var(--fs-ui); font-weight: 600; cursor: pointer; transition: transform var(--d-180) var(--ease-brand); }
.sum-act:active { transform: scale(var(--press-scale)); }
.next-link { display: block; width: 100%; min-height: var(--t-min); padding: 10px 2px; margin-top: 2px; border: 0; background: none; color: var(--fg-muted); font: 500 var(--fs-ui)/1.4 var(--font-body); cursor: pointer; text-align: start; border-radius: var(--r-chip); }
.next-link .go { color: var(--primary-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.next-link svg { display: inline-block; vertical-align: -3px; margin-inline-start: 2px; color: var(--primary-ink); }

/* the light-up (same recipe as wave 1): glow is a state; only transform/opacity animate */
.lit { box-shadow: 0 0 0 2px var(--primary), 0 0 14px 2px var(--local-glow) !important; }
.lit.pop { animation: pop var(--d-400) var(--ease-brand); }
@keyframes pop { 0% { transform: scale(var(--press-scale)); } 45% { transform: scale(1.045); } 100% { transform: scale(1); } }

/* ---------- the heat strip (wave-1 calendar option 4, 48 px cells) ---------- */
.strip-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.strip-head .m { font-size: var(--fs-ui); font-weight: 600; }
.heat { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.heat .wh { text-align: center; font-size: var(--fs-ui); color: var(--fg-subtle); padding-bottom: 2px; white-space: nowrap; }
[dir="rtl"] .heat .wh { font-size: var(--fs-label); align-self: end; }        /* full Arabic weekday names (rule 15) in a 47 px column: chrome-label size, the one exception */
.hc { position: relative; height: 48px; border-radius: 12px; border: 1px solid transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font: 600 17px/1 var(--font-body); font-variant-numeric: tabular-nums; color: var(--fg); isolation: isolate;
  background: color-mix(in srgb, var(--primary) var(--busy, 8%), var(--surface)); }
button.hc { cursor: pointer; transition: transform var(--d-180) var(--ease-brand); }
button.hc:active { transform: scale(var(--press-scale)); }
.hc.past { background: transparent; color: var(--fg-disabled); font-weight: 500; }
.hc.off { background: repeating-linear-gradient(135deg, var(--local-hatch) 0 2px, transparent 2px 8px); color: var(--fg-disabled); font-weight: 500; }
.hc.full { background: var(--surface); border: 1.5px dashed var(--line-strong); color: var(--fg-subtle); text-decoration: line-through; text-decoration-thickness: 2px; font-weight: 500; }
.hc.today { border-color: var(--primary); border-width: 1.5px; }
.hc[aria-pressed="true"] { background: var(--primary-fill); color: var(--primary-on); box-shadow: 0 0 0 2px var(--primary), 0 0 12px 1px var(--local-glow); }
.hc .tickmark { line-height: 0; } .hc .tickmark svg { width: 13px; height: 13px; }
.heat-legend { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: var(--fs-ui); color: var(--fg-muted); }
.heat-legend .ramp { display: inline-flex; align-items: center; gap: 8px; }
.heat-legend .sw { display: inline-flex; gap: 2px; }
.heat-legend .sw i { width: 12px; height: 14px; border-radius: 3px; background: color-mix(in srgb, var(--primary) var(--busy), var(--surface)); border: 1px solid var(--line-subtle); }
.heat-legend .keys { display: inline-flex; gap: 14px; }
.heat-legend .keys span { display: inline-flex; align-items: center; gap: 6px; }
.heat-legend .keys i { width: 16px; height: 14px; border-radius: 4px; }
.heat-legend .k-off { background: repeating-linear-gradient(135deg, var(--local-hatch) 0 2px, transparent 2px 6px); border: 1px solid var(--line); }
.heat-legend .k-full { border: 1.5px dashed var(--line-strong); }

/* ---------- sheet (options 1, 3, 4): solid surface over plain UI (glass only over media, materials rule 4) ---------- */
.scrim { position: absolute; inset: 0; z-index: 4; background: var(--surface-overlay); opacity: 0; pointer-events: none; transition: opacity var(--d-260) var(--ease-brand); }
.sheet { position: absolute; inset-inline: 0; inset-block-end: 0; z-index: 5; max-height: calc(100% - 120px); display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-sheet) var(--r-sheet) 0 0; border: 1px solid var(--line-subtle); border-block-end: 0; box-shadow: var(--shadow-2);
  transform: translateY(104%); transition: transform 300ms var(--ease-brand); }
[data-theme="dark"] .sheet { background: var(--surface-raised); border-color: var(--line-strong); }
.frame.open .scrim { opacity: 1; pointer-events: auto; }
.frame.open .sheet { transform: none; }
.sheet.dragging { transition: none; }
.sheet.float { inset-inline: 8px; inset-block-end: 8px; border-radius: var(--r-sheet); border-block-end: 1px solid var(--line-subtle); }
.handle { flex: none; display: grid; place-items: center; width: 100%; height: var(--t-min); margin-bottom: -12px; border: 0; background: none; cursor: grab; padding: 0; touch-action: none; }
.handle i { margin-top: -10px; width: 40px; height: 5px; border-radius: 3px; background: var(--line-strong); }
.sheet-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 12px 8px 16px; }
[dir="rtl"] .sheet-head { padding: 0 16px 8px 12px; }
.sheet-head h3 { font-size: var(--fs-h3); }
[dir="rtl"] .sheet-head h3 { font-family: var(--font-arabic); font-stretch: normal; }
.sheet-head .sub, .pop-head .sub { display: block; font-size: var(--fs-ui); color: var(--fg-muted); line-height: 1.35; }
.x { flex: none; width: var(--t-min); height: var(--t-min); border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--fg); transition: transform var(--d-180) var(--ease-brand); }
.x:active { transform: scale(var(--press-scale)); }
.x svg { width: 20px; height: 20px; }
.legend { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; padding: 0 16px 10px; font-size: var(--fs-ui); color: var(--fg-muted); }
.legend .li { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; margin-inline-end: 10px; }
.legend .lg-b { color: var(--fg-disabled); text-decoration-thickness: 1.5px; font-variant-numeric: tabular-nums; }
.legend .lg-s { padding: 0 6px; border-radius: 6px; border: 1.5px dashed var(--line-strong); color: var(--fg-subtle); font-variant-numeric: tabular-nums; }
.why { margin: 10px 0 0; font-size: var(--fs-ui); line-height: 1.45; color: var(--fg-muted); }

/* tactile key, shared by options 1 and 4 (wave-1 timeslots option 5, shrunk) */
.k, .hk, .hh { position: relative; isolation: isolate; border-radius: 12px; border: 1px solid var(--line-subtle); color: var(--fg); display: flex; flex-direction: column; align-items: center; justify-content: center; font-variant-numeric: tabular-nums;
  background: linear-gradient(to bottom, var(--surface-raised), var(--surface)); box-shadow: inset 0 1px 0 var(--local-hi), inset 0 -2px 0 var(--local-shade), 0 1px 2px var(--local-contact), 0 4px 10px var(--local-drop); }
[data-theme="dark"] .k, [data-theme="dark"] .hk, [data-theme="dark"] .hh { border-color: var(--line-strong); background: linear-gradient(to bottom, var(--surface-active), var(--surface-hover)); }
button.k, button.hk, button.hh { cursor: pointer; transition: transform var(--d-180) var(--ease-brand); }
button.k:active, button.hk:active, button.hh:active { transform: translateY(1px) scale(var(--press-scale)); box-shadow: inset 0 2px 5px var(--local-shade); transition-duration: var(--d-80); }
.k.booked, .hk.none, .hh.booked { background: var(--surface-sunken); border-color: transparent; box-shadow: inset 0 2px 5px var(--local-shade); color: var(--fg-disabled); }
[data-theme="dark"] .k.booked, [data-theme="dark"] .hk.none, [data-theme="dark"] .hh.booked { background: var(--surface-sunken); border-color: var(--line); }
.k.booked, .hh.booked .t, .hk.none .t { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.k.short, .hh.short { background: transparent; box-shadow: none; border: 1.5px dashed var(--line-strong); color: var(--fg-subtle); }
[data-theme="dark"] .k.short, [data-theme="dark"] .hh.short { background: transparent; border-color: var(--line-strong); }
.k[aria-pressed="true"], .hh[aria-pressed="true"] { background: linear-gradient(to bottom, var(--primary-fill), var(--local-deep)); color: var(--primary-on); border-color: transparent; box-shadow: var(--tactile-shadow); }
.k.lit, .hh.lit { box-shadow: var(--tactile-shadow), 0 0 0 2px var(--primary), 0 0 14px 2px var(--local-glow) !important; }

/* ═════ OPTION 1 · Bottom sheet keypad ═════ */
.kscroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 16px 16px; scrollbar-width: thin; }
.glabel { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: baseline; margin: 0 -16px 8px; padding: 8px 16px; font-size: var(--fs-ui); font-weight: 600; color: var(--fg);
  background: var(--local-frost); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat)); backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat)); border-block-end: 1px solid var(--line-subtle); }
.glabel span + span { font-weight: 500; color: var(--fg-muted); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .glabel { background: var(--surface); } }
.grp + .grp { margin-top: 8px; }
.kp { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 2px; }
.k { height: var(--t-min); font-size: 17px; font-weight: 600; white-space: nowrap; }
[dir="rtl"] .k { font-size: var(--fs-ui); }
.k .pop-dot { position: absolute; inset-block-start: 5px; inset-inline-end: 5px; width: 6px; height: 6px; }

/* ═════ OPTION 2 · Popover under the day ═════ */
.pop { grid-column: 1 / -1; position: relative; margin: 8px 0 4px; padding: 12px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2); transform-origin: calc((var(--col) + .5) * 100% / 7) 0; }
[dir="rtl"] .pop { transform-origin: calc(100% - (var(--col) + .5) * 100% / 7) 0; }
[data-theme="dark"] .pop { background: var(--surface-raised); border-color: var(--line-strong); }
.pop.grow { animation: grow var(--d-180) var(--ease-brand); }
@keyframes grow { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.pop .arrow { position: absolute; inset-block-start: -8px; inset-inline-start: calc((var(--col) + .5) * (100% + 5px) / 7 - 8px); width: 14px; height: 14px; background: inherit; border-inline-start: 1px solid var(--line); border-block-start: 1px solid var(--line); transform: rotate(45deg); }
[dir="rtl"] .pop .arrow { transform: rotate(-45deg); }
[data-theme="dark"] .pop .arrow { border-color: var(--line-strong); }
.pop-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.pop-head b { font-size: var(--fs-ui); }
.pairs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
[dir="rtl"] .pairs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pair { display: grid; grid-template-columns: 1fr 1fr; height: var(--t-button); border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
[data-theme="dark"] .pair { background: var(--surface-active); border-color: var(--line-strong); }
.half { position: relative; isolation: isolate; display: flex; align-items: center; justify-content: center; border: 0; background: transparent; font-size: var(--fs-ui); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.half + .half { border-inline-start: 1px solid var(--line); }
[data-theme="dark"] .half + .half { border-color: var(--line-strong); }
button.half { cursor: pointer; transition: transform var(--d-180) var(--ease-brand), background-color var(--d-120); }
button.half:active { transform: scale(var(--press-scale)); }
@media (hover: hover) { button.half:hover { background: var(--surface-hover); } }
.half.booked { background: var(--surface-sunken); color: var(--fg-disabled); text-decoration: line-through; text-decoration-thickness: 1.5px; font-weight: 500; }
.half.short { color: var(--fg-subtle); font-weight: 500; }
.half.short::after { content: ""; position: absolute; inset-inline: 10px; inset-block-end: 9px; border-block-end: 1.5px dashed var(--line-strong); }
.half[aria-pressed="true"] { background: var(--primary-fill); color: var(--primary-on); }
.half .pop-dot { position: absolute; inset-block-start: 6px; inset-inline-end: 7px; width: 6px; height: 6px; }
.half .tk { position: absolute; inset-block-start: 3px; inset-inline-end: 4px; width: 14px; height: 14px; }
.half .tk svg { width: 10px; height: 10px; }

/* ═════ OPTION 3 · Wheel ═════ */
.sheet.tall .sheet-head { padding-bottom: 4px; }
.wheel-wrap { flex: none; display: flex; gap: 12px; padding: 4px 16px 0; }
.wheel-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.wbtn { height: var(--t-min); border-radius: var(--r-chip); border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--fg); transition: transform var(--d-180) var(--ease-brand); }
[data-theme="dark"] .wbtn { background: var(--surface-active); border-color: var(--line-strong); }
.wbtn:active { transform: scale(var(--press-scale)); }
.wbtn svg { width: 22px; height: 22px; }
.wheel-box { position: relative; border-radius: 16px; background: var(--surface-sunken); box-shadow: inset 0 2px 6px var(--local-shade); }
[data-theme="dark"] .wheel-box { border: 1px solid var(--line); }
.band { position: absolute; inset-inline: 6px; top: 88px; height: 44px; border-radius: 12px; background: var(--surface); box-shadow: 0 0 0 1.5px var(--primary), 0 0 12px var(--local-glow); pointer-events: none; }
[data-theme="dark"] .band { background: var(--surface-active); }
.wheel { position: relative; height: 220px; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; border-radius: 16px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 30%, black 70%, transparent); mask-image: linear-gradient(to bottom, transparent, black 30%, black 70%, transparent); }
.wheel::-webkit-scrollbar { display: none; }
.wheel:focus-visible { outline-offset: -2px; }
.wtrack { padding-block: 88px; }
.wi { width: 100%; height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 16px; border: 0; background: transparent; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--fg-muted); scroll-snap-align: center; text-align: start; white-space: nowrap; }
button.wi { cursor: pointer; }
.wi .why { margin: 0; display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-ui); font-weight: 500; color: var(--fg-subtle); }
.wi.booked, .wi.short { scroll-snap-align: none; color: var(--fg-disabled); font-weight: 500; }
.wi.booked s, .wi.short s { text-decoration-thickness: 1.5px; }
.wi.short s { text-decoration-style: dashed; }
.wi.mid { color: var(--fg); font-size: 20px; }
.wi.mid .why { color: var(--fg-muted); }
.side { flex: none; width: 128px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.side-row { display: flex; flex-direction: column; gap: 0; }
.side-row b { font: 700 22px/1.2 var(--font-display); font-stretch: var(--font-display-stretch); font-variant-numeric: tabular-nums; white-space: nowrap; }
[dir="rtl"] .side-row b { font-family: var(--font-arabic); font-stretch: normal; }
.side-row.price b { color: var(--primary-ink); }
.len-row { flex: none; display: flex; align-items: center; gap: 10px; margin: 12px 16px 0; padding: 6px 6px 6px 14px; border-radius: var(--r-pill); background: var(--surface-sunken); }
[dir="rtl"] .len-row { padding: 6px 14px 6px 6px; }
.len-row .per { margin-inline-start: auto; font-size: var(--fs-ui); color: var(--fg-muted); white-space: nowrap; padding-inline-end: 8px; }
.mini-step { display: inline-flex; align-items: center; gap: 2px; }
.mini-step button { width: var(--t-min); height: var(--t-min); border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; transition: transform var(--d-180) var(--ease-brand); }
.mini-step button:active:not(:disabled) { transform: scale(var(--press-scale)); }
.mini-step button:disabled { color: var(--fg-disabled); background: transparent; border-color: transparent; cursor: default; }
.mini-step svg { width: 18px; height: 18px; }
.mini-step .v { min-width: 64px; text-align: center; font-size: 17px; font-weight: 700; white-space: nowrap; }
.confirm { flex: none; margin: 12px 16px 16px; height: var(--t-button-lg); border-radius: var(--r-pill); border: 0; font: 600 17px/1 var(--font-body); color: var(--primary-on); cursor: pointer; position: relative;
  background: linear-gradient(to bottom, var(--primary-fill), var(--local-deep)); box-shadow: var(--tactile-shadow); transition: transform var(--d-180) var(--ease-brand); }
[dir="rtl"] .confirm { font-family: var(--font-arabic); }
.confirm:active { transform: scale(var(--press-scale)); box-shadow: var(--tactile-pressed); transition-duration: var(--d-80); }
.confirm-wait { flex: none; margin: 12px 16px 16px; min-height: var(--t-button-lg); padding: 8px 16px; border-radius: var(--r-pill); border: 1.5px dashed var(--line-strong); display: grid; place-items: center; text-align: center; font-size: var(--fs-ui); color: var(--fg-muted); }

/* ═════ OPTION 4 · Two-tier ═════ */
.sheet.float .hgrid { padding: 2px 16px 0; }
.hgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.hk { height: 60px; gap: 1px; }
.hk .t { font: 700 18px/1.15 var(--font-display); font-stretch: var(--font-display-stretch); white-space: nowrap; }
[dir="rtl"] .hk .t { font-family: var(--font-arabic); font-stretch: normal; font-size: 17px; }
.hk .s, .hh .s { font-size: var(--fs-ui); color: var(--fg-muted); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; line-height: 1.2; }
.hk.none .s { color: var(--fg-subtle); }
.hk.open { border: 1.5px solid var(--primary); box-shadow: 0 0 0 1px var(--primary), 0 0 12px var(--local-glow); }
.hk.has .t { color: var(--primary-ink); }
.hk.has .tk { background: var(--primary-fill); color: var(--primary-on); }
.tier { grid-column: 1 / -1; position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px; margin: 2px 0; border-radius: 16px; background: var(--primary-subtle); border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent); animation: drop var(--d-180) var(--ease-brand); }
[data-theme="dark"] .tier { background: var(--primary-muted); }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.tier .notch { position: absolute; inset-block-start: -8px; inset-inline-start: calc((var(--c) + .5) * 25% - 8px); width: 14px; height: 14px; background: inherit; border-inline-start: 1px solid color-mix(in srgb, var(--primary) 30%, transparent); border-block-start: 1px solid color-mix(in srgb, var(--primary) 30%, transparent); transform: rotate(45deg); }
[dir="rtl"] .tier .notch { transform: rotate(-45deg); }
.hh { min-height: 60px; padding: 6px 8px; gap: 2px; }
.hh .t { font-size: 18px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.hh[aria-pressed="true"] .s { color: var(--primary-on); }
.hh.short .t { text-decoration: none; }
.sheet.float .why { padding: 0 16px 16px; }

/* ═════ OPTION 5 · Timeline strip ═════ */
.inline-panel { margin-top: 12px; padding: 12px 0 10px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line-subtle); box-shadow: var(--shadow-1); }
[data-theme="dark"] .inline-panel { background: var(--surface-raised); border-color: var(--line); }
.inline-panel.enter { animation: drop var(--d-260) var(--ease-brand); }
.inline-panel .pop-head { padding: 0 12px; margin-bottom: 8px; }
.lens { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 0 12px 10px; padding: 3px; border-radius: var(--r-pill); background: var(--surface-sunken); }
.lc { min-height: var(--t-min); border-radius: var(--r-pill); border: 0; background: transparent; font-size: var(--fs-ui); font-weight: 600; cursor: pointer; white-space: nowrap; transition: transform var(--d-180) var(--ease-brand); }
.lc:active { transform: scale(var(--press-scale)); }
.lc[aria-pressed="true"] { background: var(--surface); box-shadow: var(--shadow-1); color: var(--primary-ink); }
[data-theme="dark"] .lc[aria-pressed="true"] { background: var(--surface-active); box-shadow: 0 0 0 1px var(--line-strong); color: var(--fg); }
.ruler { -webkit-mask-image: linear-gradient(to right, transparent 0, black 28px, black calc(100% - 28px), transparent); mask-image: linear-gradient(to right, transparent 0, black 28px, black calc(100% - 28px), transparent); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: 12px; scrollbar-width: none; padding: 0 12px; }
.ruler::-webkit-scrollbar { display: none; }
.track { position: relative; width: calc(24 * var(--tw)); height: 100px; margin-inline: 28px; }
.run { position: absolute; inset-block-start: 6px; height: 30px; inset-inline-start: calc(var(--s) * var(--tw)); width: calc(var(--n) * var(--tw) - 4px); margin-inline-start: 2px; border-radius: 9px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.run.free { background: var(--primary-muted); border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent); }
.run.busy { background: var(--local-busy); color: var(--fg-inverse); font-size: var(--fs-ui); font-weight: 600; }
.range { position: absolute; z-index: 1; inset-block-start: 3px; height: 36px; inset-inline-start: calc(var(--s) * var(--tw)); width: calc(var(--n) * var(--tw)); border-radius: 11px; display: flex; align-items: center; justify-content: center; white-space: nowrap;
  background: linear-gradient(to bottom, var(--primary-fill), var(--local-deep)); color: var(--primary-on); font-size: var(--fs-ui); font-weight: 600; box-shadow: var(--tactile-shadow); transform-origin: left center; pointer-events: none; }
[dir="rtl"] .range { transform-origin: right center; }
.range.grow { animation: grow-x var(--d-260) var(--ease-brand); }
@keyframes grow-x { from { transform: scaleX(.12); opacity: .4; } to { transform: none; opacity: 1; } }
.rt { position: absolute; z-index: 2; inset-block: 0; inset-inline-start: calc(var(--i) * var(--tw)); width: var(--tw); border: 0; background: transparent; padding: 0; display: block; scroll-snap-align: start; border-radius: 10px; color: var(--fg-muted); }
button.rt { cursor: pointer; }
@media (hover: hover) { button.rt:hover { background: color-mix(in srgb, var(--fg) 5%, transparent); } }
.rt .tm { position: absolute; inset-inline-start: 0; inset-block-start: 44px; width: 2px; height: 12px; border-radius: 1px; background: var(--line-strong); }
.rt .tl { position: absolute; inset-inline-start: 0; inset-block-start: 62px; transform: translateX(-50%); font-size: var(--fs-ui); font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
[dir="rtl"] .rt .tl { transform: translateX(50%); }
.rt .tl.full { color: var(--fg); font-weight: 600; }
.rt:has(.tl.full) .tm { height: 18px; background: var(--fg-subtle); }
.rt .pop-dot { position: absolute; inset-inline-start: 6px; inset-block-start: 46px; width: 6px; height: 6px; }
.rt.booked { color: var(--fg-disabled); }
.rt.booked .tl { text-decoration: line-through; color: var(--fg-disabled); }
.rt.short .tm { background: transparent; border-inline-start: 2px dashed var(--line-strong); width: 0; }
.rt.short .tl { color: var(--fg-subtle); }
.rt.in .tl { color: var(--primary-ink); font-weight: 700; }
.rt.in .tm { background: var(--primary); }
.rt[aria-pressed="true"] .tm { height: 22px; width: 3px; background: var(--primary); }
.ruler-key { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 6px 12px 0; font-size: var(--fs-ui); color: var(--fg-muted); }
.ruler-key span { display: inline-flex; align-items: center; gap: 6px; }
.ruler-key i { width: 18px; height: 12px; border-radius: 4px; }
.ruler-key .k-free { background: var(--primary-muted); border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent); }
.ruler-key .k-busy { background: var(--local-busy); }
.ruler-key .k-short { width: 0; height: 14px; border-inline-start: 2px dashed var(--line-strong); border-radius: 0; }

/* ---------- reduced motion: no pop, no rise, no grow; state changes jump (motion rule 20) ---------- */
@media (prefers-reduced-motion: reduce) {
  .lit.pop, .pop.grow, .tier, .inline-panel.enter, .range.grow { animation: none !important; }
  .sheet, .scrim, .hc, .k, .hk, .hh, .half, .x, .wbtn, .lc, .confirm, .sum-act, .mini-step button { transition: none !important; }
  button.hc:active, button.k:active, button.hk:active, button.hh:active, button.half:active, .x:active, .wbtn:active, .lc:active, .confirm:active, .sum-act:active { transform: none; }
  .wheel { scroll-behavior: auto; }
}
