/* الحجوزات: بطل مضغوط، النهارده، المتاح في المدن، بتخلص بسرعة، اختار قطعتك، سجل الحجز. */
.hero-grid { grid-template-columns: minmax(0, 1fr); }
.bk-section, #turn { scroll-margin-top: 112px; }
.bk-section { margin-top: 30px; }
@media (max-width: 960px) { .bk-section, #turn { scroll-margin-top: 140px; } }
.bk-section .section-head { margin-bottom: 12px; }
.bk-card { padding: 16px 18px; }
.bk-card .card-title { margin-bottom: 12px; }

/* البطل */
.hero--compact { padding: clamp(20px, 2.4vw, 30px); gap: clamp(18px, 3vw, 40px); }
.hero-grid .hero--compact h1 { font-size: clamp(28px, 3.2vw, 42px); }
.hero--compact .lede { margin-top: 10px; }
.bk-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.bk-cta a { display: inline-flex; align-items: center; height: 42px; padding: 0 20px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; text-decoration: none; }
.bk-cta .btn-solid { background: var(--grad-gold); box-shadow: var(--glow-gold); color: var(--obsidian); }
.btn-ghost { border: 1px solid rgba(255, 255, 255, .3); color: #f4f1e8; background: transparent; }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); }
.hero-figure { gap: 14px; padding: 18px 20px; }
.hero-grid .hero--compact .hero-num { font-size: clamp(42px, 4.4vw, 58px); }
.hero-phase .viz-stack { height: 12px; background: rgba(255, 255, 255, .14); }
.hero-phase .viz-seg.is-booked { background: var(--gold); }
.hero-phase .viz-seg.is-free { background: rgba(255, 255, 255, .42); }
.hero-phase-legend span { display: inline-flex; align-items: center; gap: 6px; }
.hero-phase-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 0; font-size: 13px; color: rgba(244, 241, 232, .6); }
.hero-phase-legend b { font-family: var(--display); color: #fff; font-weight: 600; }
.hero-today { display: flex; align-items: center; gap: 14px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .12); }
.hero-donut { flex: none; width: 72px; }
.hero .viz-donut-track { stroke: rgba(255, 255, 255, .14); }
.hero .viz-donut-arc { stroke: var(--gold); }
.hero .viz-donut-num { fill: #fff; font-size: 17px; }
.hero-today .hero-label { display: block; }
.hero-today[hidden], .hero-donut[hidden] { display: none; }
.hero :focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
.hero-today-val { display: block; margin-top: 4px; font-family: var(--display); font-size: 20px; font-weight: 600; color: #fff; }

/* النهارده: العنوان فوق القيمة */
.bk-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.bk-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.bk-tile > span { font-size: 13px; color: var(--ink-3); }
.bk-tile b { font-family: var(--display); font-size: clamp(22px, 2.4vw, 30px); font-weight: 600; letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.bk-tile-val { display: flex; align-items: center; gap: 10px; }
.bk-mini { width: 44px; }
.bk-mini .viz-donut-num { display: none; }
.bk-hour-note { margin: 0; padding: 10px 0 4px; text-align: center; font-size: 13px; font-weight: 600; color: var(--ink-2); }

/* صفوف الأشرطة: المدن والمناطق والساخن */
.bk-rows { display: grid; gap: 2px; }
.bk-row { display: grid; grid-template-columns: minmax(150px, 1.3fr) minmax(90px, 1fr) auto auto auto; align-items: center; gap: 6px 14px; padding: 8px 4px; border-bottom: 1px solid var(--line-2, var(--line)); font-size: 13px; }
.bk-rows > .bk-row:last-child, .bk-crow:last-child > .bk-row:first-child { border-bottom: 0; }
.bk-trow { grid-template-columns: minmax(150px, 1.6fr) minmax(70px, 1fr) auto; }
.bk-hrow { grid-template-columns: minmax(170px, 1.6fr) minmax(80px, 1fr) auto auto auto auto; }
.bk-place { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; min-width: 0; }
.bk-sep { font-style: normal; color: var(--ink-4); }
.bk-zname { min-width: 0; padding: 2px 4px; border: 0; border-radius: 6px; background: none; color: var(--ink); font: inherit; font-weight: 600; text-align: start; cursor: pointer; }
.bk-zname:hover { background: var(--surface-3); }
.bk-zrow.is-on .bk-zname { color: var(--brand); }
.bk-num, .bk-pct, .bk-from { white-space: nowrap; color: var(--ink-3); font-size: 13px; }
.bk-num b, .bk-from b { font-family: var(--display); color: var(--ink); font-weight: 600; font-size: 13px; }
.bk-sb .viz-stack { height: 9px; }
.viz-seg.is-free { background: color-mix(in srgb, var(--brand) 16%, var(--surface-3)); }
.bk-zones { margin: 2px 0 8px; padding-inline-start: 14px; border-inline-start: 2px solid var(--brand-soft); }
.bk-zrow { grid-template-columns: minmax(140px, 1.3fr) minmax(90px, 1fr) auto auto auto; }
.bk-maplink { grid-column: 1 / -1; justify-self: start; font-size: 13px; font-weight: 600; color: var(--brand); text-underline-offset: 3px; }
.bk-soldout { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line-2, var(--line)); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); }

.city-chip {
  display: inline-flex; align-items: center; padding: 3px 11px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer;
}
button.city-chip:hover { background: var(--brand-soft); border-color: var(--brand-mid); }
.city-chip:focus-visible, .bk-zname:focus-visible, .bk-sort button:focus-visible, .bk-cta a:focus-visible, .btn-ghost:focus-visible, .bk-maplink:focus-visible, .map-link-btn:focus-visible, .serial-form button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.city-chip.is-on { background: var(--grad-brand); border-color: transparent; box-shadow: var(--glow-brand); color: var(--on-brand); }
.city-chip.is-muted { background: var(--surface-3); color: var(--ink-3); font-weight: 500; cursor: default; }

.bk-badge { padding: 2px 9px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; background: var(--surface-3); color: var(--ink-3); }
.bk-badge.is-coral { background: color-mix(in srgb, var(--copper) 14%, transparent); color: var(--copper); }
.bk-badge.is-gold { background: color-mix(in srgb, var(--gold) 20%, transparent); color: var(--ink); }
.bk-up { font-size: 13px; font-weight: 600; color: var(--copper); white-space: nowrap; }

/* اختار قطعتك */
.bk-section .toolbar { margin-bottom: 12px; }
.bk-picker { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.bk-picker-main { display: grid; gap: 12px; min-width: 0; }
.bk-hist .viz-cols { height: 100px; }
.viz-col.is-on .viz-col-bar i { background: var(--grad-gold); }
.bk-sort { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); }
.bk-sort button { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.bk-sort button[aria-pressed="true"] { background: var(--grad-brand); border-color: transparent; box-shadow: var(--glow-brand); color: var(--on-brand); }
.plots-table .city-cell-line { display: block; margin-top: 3px; }
.plot-card-down { margin-top: 4px; font-size: 13px; color: var(--ink-3); }
.plot-card-down b { font-family: var(--display); font-size: 15px; color: var(--brand); }

/* شريط موضع المقدم داخل مدى المنطقة */
.dp-bar { display: block; width: 64px; height: 4px; margin-top: 5px; overflow: hidden; border-radius: 999px; background: var(--surface-3); }
.dp-bar i { display: block; height: 100%; min-width: 3px; border-radius: 999px; background: var(--brand); }
.plot-card .dp-bar { width: 100%; margin-top: 7px; }
.zone-head > th, .plot-zone-head { padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line-2, var(--line)); text-align: start; font-size: 13px; }
.plot-zone-head { margin-top: 6px; border-radius: var(--radius-xs); }
.zh-name { color: var(--ink); font-weight: 600; }
.zh-count { color: var(--ink-3); font-size: 13px; }
/* city is secondary in rows: small outline pill, hit area grown by ::after, never the solid .is-on fill */
.plots-table .city-chip, .plot-card .city-chip, .plot-zone-head .city-chip, .zone-head .city-chip, .feed-item .city-chip {
  position: relative; min-height: 0; padding: 1px 8px; font-size: 11px; font-weight: 500; line-height: 1.5;
  background: var(--brand-soft); border-color: var(--brand-mid); color: var(--brand);
}
.plots-table .city-chip::after, .plot-card .city-chip::after, .plot-zone-head .city-chip::after, .zone-head .city-chip::after, .feed-item .city-chip::after { content: ""; position: absolute; inset: -12px -6px; }
.plots-table .city-chip.is-on, .plot-card .city-chip.is-on, .plot-zone-head .city-chip.is-on, .feed-item .city-chip.is-on { background: var(--brand-soft); border-color: var(--brand-mid); color: var(--brand); }
.zone-cell-line .bk-zname, .plot-card-place .bk-zname, .feed-title .bk-zname { padding: 0; font-size: 14px; }
.zone-cell-line .bk-zname:hover, .plot-card-place .bk-zname:hover, .feed-title .bk-zname:hover { background: none; color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.feed-title .bk-zname { font-size: inherit; display: inline; min-height: 0; }

/* اعرف دورك */
.win-meter { position: relative; }
.win-mark { position: absolute; top: 50%; width: 11px; height: 11px; margin: 1px 0 0 0; border: 2px solid var(--surface); border-radius: 50%; background: var(--gold); transform: translate(50%, -50%); box-shadow: 0 0 0 1px var(--ink-3); }
.win-mark.is-out { background: var(--copper); }
.win-mark-note { margin: 6px 0 0; font-size: 13px; font-weight: 600; color: var(--ink); }
.elig-body { display: grid; gap: 12px; padding: 14px 18px 18px; }
.serial-form { display: flex; gap: 8px; }
.serial-form .select { flex: 1 1 0; width: 0; min-width: 0; height: 44px; font-size: 14px; }
.serial-form .btn-solid { height: 44px; }

/* الحجز بالساعة */
.bk-clock-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 14px; align-items: stretch; }
.bk-clock { display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; justify-items: center; padding: 22px; }
.bk-clock .clock { width: 460px; max-width: 100%; }
.bk-clock .clock svg { max-width: none; }
.bk-clock-grid .elig { align-self: start; }
.bk-hour-note { font-size: 15px; }
.range-field { display: flex; align-items: center; gap: 8px; }
.range-field label { font-size: 13px; color: var(--ink-3); }
.range-field .select { width: 110px; cursor: text; }

/* سجل الحجز اليومي */
.log-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: 14px; align-items: start; }
.bk-stack { display: grid; gap: 14px; min-width: 0; }
.bk-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: -4px 0 10px; font-size: 13px; color: var(--ink-3); }
.bk-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; }
.sw--bar { width: 10px; height: 10px; border-radius: 3px; background: var(--brand); }
.sw--booked { width: 10px; height: 10px; border-radius: 3px; background: var(--gold); }
.sw--free { width: 10px; height: 10px; border-radius: 3px; background: rgba(255, 255, 255, .42); }
.bk-legend .sw--free { background: color-mix(in srgb, var(--brand) 16%, var(--surface-3)); }
.bk-legend .sw--booked { background: var(--brand); }
.sw--line { width: 14px; height: 3px; border-radius: 2px; background: var(--gold); }
#winCols .viz-cols { height: 90px; }
#dayCols .viz-cols { height: 190px; padding-top: 14px; }
#dayCols .viz-col-label { font-size: 13px; }
.log-grid .feed-item b { font-family: var(--display); }
.card-foot .btn-small { width: 100%; }

/* الأقسام المطوية */
.bk-fold { margin-top: 12px; border: 1px solid var(--line-2, var(--line)); border-radius: var(--radius-sm); background: var(--surface); }
.bk-fold--lg { margin-top: 30px; }
.bk-fold > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; list-style: none; border-radius: var(--radius-sm); background: var(--surface-3); transition: background .15s var(--ease); }
.bk-fold > summary:hover { background: color-mix(in srgb, var(--brand) 8%, var(--surface-3)); }
.bk-fold[open] > summary { border-end-start-radius: 0; border-end-end-radius: 0; }
.bk-fold > summary::-webkit-details-marker { display: none; }
.bk-fold > summary::after { content: ""; flex: none; width: 8px; height: 8px; margin-inline-start: auto; border: solid var(--brand); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s var(--ease); }
.bk-fold[open] > summary::after { transform: rotate(-135deg); }
.bk-fold > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.bk-fold > .bk-rows, .bk-fold > .table-wrap { margin: 0; padding: 4px 14px 14px; }

@media (max-width: 960px) {
  .bk-clock-grid, .bk-picker, .log-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .bk-row, .bk-trow, .bk-hrow, .bk-zrow { grid-template-columns: minmax(0, 1fr) auto; }
  .bk-row > .bk-place, .bk-zrow > .bk-zname { grid-column: 1 / -1; }
  .bk-row > .bk-sb { grid-column: 1 / -1; }
  .bk-tiles { gap: 8px; }
  .bk-tile { padding: 12px; }
  .bk-card { padding: 14px 16px; }
  .elig-body { padding: 14px 16px 18px; }
}
@media (max-width: 560px) {
  .bk-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bk-tiles .bk-tile:first-child { grid-column: 1 / -1; }
  .hero-figure { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .bk-fold > summary::after, .window-progress i { transition: none; }
}
.bk-row > .city-chip { justify-self: start; }
.elig { min-width: 0; }
.serial-form .btn-solid { width: auto; }

/* histogram: labelled buckets, empty ones muted */
#budgetHist .viz-col-label { white-space: normal; line-height: 1.25; font-size: 13px; }
.viz-col:disabled { opacity: .4; cursor: default; }
.viz-col:disabled:hover .viz-col-bar i { background: var(--grad-bar); }
#todayRange { white-space: nowrap; }
@media (max-width: 560px) {
  #todayRange { font-size: clamp(16px, 5vw, 22px); }
  .bk-cta { display: grid; grid-template-columns: 1fr 1fr; }
  .bk-cta a { justify-content: center; }
  .bk-cta .btn-solid { grid-column: 1 / -1; }
}

/* sortable table headers */
.th-sort { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px; margin: -2px -4px; border: 0; border-radius: 6px; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.th-sort:hover { color: var(--brand); }
.th-sort:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.th-arrow { display: inline-block; min-width: 1em; font-size: 13px; color: var(--brand); }

/* today's zone shares */
.viz-seg.is-c4 { background: color-mix(in srgb, var(--brand) 50%, var(--surface)); }
.viz-seg.is-c5 { background: color-mix(in srgb, var(--gold) 50%, var(--surface)); }
.sw--zone { width: 10px; height: 10px; border-radius: 3px; background: var(--brand); }
.sw--zone.is-gold { background: var(--gold); }
.sw--zone.is-coral { background: var(--copper); }
.sw--zone.is-c4 { background: color-mix(in srgb, var(--brand) 50%, var(--surface)); }
.sw--zone.is-c5 { background: color-mix(in srgb, var(--gold) 50%, var(--surface)); }
.sw--zone.is-muted { background: var(--ink-4); }
#tzStack { margin-bottom: 10px; }
#tzStack .viz-stack { height: 14px; }

/* ---------- tap targets: 32px desktop, 44px on phones ---------- */
button.city-chip, .map-link-btn, .bk-sort button, .bk-zname, .bk-maplink, .th-sort, .bk-fold > summary { min-height: 32px; }
.bk-zname, .bk-maplink, .th-sort { display: inline-flex; align-items: center; }
@media (max-width: 640px) {
  button.city-chip, .bk-sort button, .bk-zname, .bk-maplink, .th-sort, .bk-fold > summary,
  .select, .btn-clear, .btn-small { min-height: 44px; }
}
