/* Panthers Booking — gaya asas
   Warna jenama: merah & hitam.
   Reka bentuk bermula dari saiz telefon, kemudian dibesarkan untuk komputer. */

:root {
  --color-bg: #0b0b0d;          /* latar hitam */
  --color-surface: #16161a;     /* latar kad/bahagian */
  --color-border: #2a2a30;
  --color-text: #f5f5f5;
  --color-text-muted: #a1a1aa;
  --color-red: #e10600;         /* merah jenama: latar butang (teks putih di atasnya) */
  --color-red-hover: #b80500;   /* lebih gelap supaya teks putih kekal mudah dibaca */
  --color-red-text: #ff3b30;    /* merah lebih terang untuk TEKS di atas latar hitam */
  --color-success: #22c55e;     /* hijau: pembayaran disahkan */
  --color-warning: #f59e0b;     /* kuning: belum disahkan / sedang disemak */
  --color-unpaid: #a78bfa;      /* ungu: slot Belum dibayar — Bayar kemudian (K-065) */
  /* Carta jualan (K-057): 2 siri, disahkan dengan validate_palette.js pada permukaan kad #16161a
     (CVD ΔE 26.8, kontras ≥ 3:1). Merah jenama TIDAK digunakan untuk data. */
  --chart-actual: #3987e5;      /* biru: jualan sebenar (bar) */
  --chart-target: #d95926;      /* jingga: sasaran (garis pendek) */
  --max-width: 1100px;
  --radius: 8px;
  /* Kawalan borang browser (ikon kalendar, senarai pilihan) dalam tema gelap — supaya kelihatan */
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Atribut "hidden" mesti sentiasa menyembunyikan elemen, walaupun kelasnya menetapkan display
   (contoh: senarai bergaya grid). Tanpa ini, kandungan lama boleh kelihatan (ditemui oleh ujian, K-028). */
[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.6;
}

main {
  flex: 1;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

/* Kepala halaman */
.site-header {
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  min-height: 64px;
}

/* Logo rasmi (gambar, K-049) di kepala SEMUA halaman: 36px telefon, 44px komputer */
.logo {
  display: block;
  flex-shrink: 0;
  line-height: 0;
}

.logo img {
  display: block;
  width: auto;
  height: 36px;
}

/* Bahagian utama (hero) */
.hero {
  padding: 64px 0 72px;
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-bg) 60%);
  border-bottom: 4px solid var(--color-red);
}

.hero-eyebrow {
  margin: 0 0 8px;
  color: var(--color-red-text);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 8vw, 3.5rem);
  line-height: 1.1;
}

.hero-text {
  max-width: 40ch;
  margin: 0 0 32px;
  color: var(--color-text-muted);
  font-size: 1.125rem;
}

/* Butang (digunakan untuk <a> dan <button>) */
.button {
  font: inherit;
  border: 0;
  cursor: pointer;
  display: inline-block;
  min-height: 48px; /* saiz mudah ditekan dengan jari */
  padding: 12px 28px;
  border-radius: var(--radius);
  background: var(--color-red);
  color: #ffffff;
  font-weight: 700;
  text-align: center; /* teks panjang yang terbelah pada skrin kecil kekal di tengah */
  text-decoration: none;
}

.button:hover {
  background: var(--color-red-hover);
}

.button:disabled {
  background: var(--color-border);
  color: var(--color-text-muted);
  cursor: not-allowed;
}

.button:focus-visible,
.logo:focus-visible {
  outline: 3px solid var(--color-text);
  outline-offset: 3px;
}

/* Kepala halaman dalaman */
.page-header {
  padding: 40px 0 24px;
  border-bottom: 1px solid var(--color-border);
}

.page-header h1 {
  margin: 0 0 8px;
  font-size: clamp(1.75rem, 6vw, 2.5rem);
  line-height: 1.15;
}

.page-header p {
  margin: 0;
  color: var(--color-text-muted);
}

.page-section {
  padding: 24px 0 48px;
}

/* Mesej keadaan: memuatkan / tiada data / ralat */
.status {
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text-muted);
}

.status-error {
  border-color: var(--color-red);
  color: var(--color-text);
}

.status-message {
  margin: 0;
}

.status .button {
  margin-top: 12px;
}

/* Senarai kelas */
.class-list {
  display: grid;
  gap: 24px;
}

.class-card {
  padding: 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.class-card h2 {
  margin: 0 0 4px;
  font-size: 1.375rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.class-meta {
  margin: 0 0 12px;
  color: var(--color-red-text);
  font-weight: 700;
}

.class-description {
  margin: 0 0 16px;
  color: var(--color-text-muted);
  overflow-wrap: anywhere;
}

.no-sessions {
  margin: 0;
  color: var(--color-text-muted);
}

.session-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.session {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
}

.session-date {
  margin: 0;
  font-weight: 700;
}

.session-time {
  margin: 0;
  color: var(--color-text-muted);
}

.session-seats {
  margin: 4px 0 0;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.session-seats-full {
  color: var(--color-red-text);
  font-weight: 700;
}

/* Halaman tempahan */
.container.narrow {
  max-width: 640px;
}

.text-link {
  color: var(--color-text);
}

.text-link:focus-visible {
  outline: 3px solid var(--color-text);
  outline-offset: 3px;
}

.summary-card,
.form-card {
  margin-top: 16px;
  padding: 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.summary-card h2,
.form-card h2 {
  margin: 0 0 12px;
  font-size: 1.25rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.form-card h2:focus {
  outline: none;
}

.summary-line {
  margin: 0;
}

.summary-price {
  margin: 8px 0 0;
  color: var(--color-red-text);
  font-weight: 700;
}

.form-intro {
  margin: 0 0 16px;
  color: var(--color-text-muted);
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
}

.field-hint {
  margin: 0 0 6px;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  color: var(--color-text);
  font: inherit;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

/* Medan yang tidak boleh diubah (contoh: kelas / tarikh / masa sesi sedia ada) */
.field input:disabled,
.field select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  border-color: var(--color-text);
  outline: 3px solid var(--color-text);
  outline-offset: 1px;
}

.field [aria-invalid="true"] {
  border-color: var(--color-red-text);
}

.field-error,
.form-error {
  margin: 6px 0 0;
  color: var(--color-red-text);
  font-size: 0.875rem;
  font-weight: 700;
}

.form-error {
  margin: 0 0 16px;
  font-size: 1rem;
}

.review-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px 16px;
  margin: 0 0 16px;
}

.review-list dt {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.review-list dd {
  margin: 0 0 10px;
  overflow-wrap: anywhere;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button-secondary {
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text);
}

.button-secondary:hover {
  background: var(--color-bg);
}

.notice {
  padding: 12px;
  border-left: 4px solid var(--color-red);
  background: var(--color-bg);
}

.status .actions {
  margin-top: 12px;
}

.status .actions .button {
  margin-top: 0;
}

/* Halaman thank-you: warna sisi kad membezakan keadaan (teks tetap menerangkan status) */
.summary-card h2:focus {
  outline: none;
}

.result-message {
  margin: 0 0 16px;
}

.summary-card[data-status] {
  border-left-width: 6px;
}

.summary-card[data-status="paid"] {
  border-left-color: var(--color-success);
}

.summary-card[data-status="pending_payment"],
.summary-card[data-status="needs_review"] {
  border-left-color: var(--color-warning);
}

.summary-card[data-status="payment_failed"],
.summary-card[data-status="expired"],
.summary-card[data-status="cancelled"] {
  border-left-color: var(--color-red);
}

/* Dashboard admin: kad ringkasan */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 12px;
}

.stat {
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
}

.stat dt {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.stat dd {
  margin: 4px 0 0;
  font-size: 1.5rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.stat-wide {
  grid-column: 1 / -1;
}

.stat-revenue dd {
  color: var(--color-success);
}

.stat-warning {
  border-color: var(--color-warning);
}

.stat-warning dd {
  color: var(--color-warning);
}

/* Admin pages: the menu is in the top bar, like the public site (owner, 2026-11-29; not fixed while scrolling).
   Phone / narrow screen: a second row in the bar that scrolls sideways; 1280px and wider: one row with the logo
   and the language button. */
.admin-page .site-header .container {
  flex-wrap: wrap;
  gap: 4px 8px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.admin-nav {
  order: 3;
  display: flex;
  gap: 4px;
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.admin-nav::-webkit-scrollbar {
  display: none;
}

.admin-nav a {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border-radius: var(--radius);
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.admin-nav a:hover {
  color: var(--color-text);
  background: var(--color-surface);
}

/* aria-current="page": this page; "true": the section of a sub-page (e.g. Sales on the Daily page) */
.admin-nav a[aria-current] {
  color: var(--color-text);
  box-shadow: inset 0 -2px 0 var(--color-red);
}

/* Phone: fade at the right end = more links to scroll to */
@media (max-width: 719px) {
  .admin-nav {
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
    mask-image: linear-gradient(90deg, #000 85%, transparent);
  }
}

/* Tablet: the links wrap (all visible) instead of scrolling */
@media (min-width: 720px) {
  .admin-nav {
    flex-wrap: wrap;
    overflow-x: visible;
  }
}

@media (min-width: 1280px) {
  .admin-page .site-header .container {
    flex-wrap: nowrap;
  }

  .admin-nav {
    order: 0;
    width: auto;
    margin-left: 24px;
  }
}

.admin-nav a:focus-visible,
.admin-subnav a:focus-visible {
  outline: 3px solid var(--color-text);
  outline-offset: 2px;
}

/* Sub-tabs of a section (owner, 2026-11-07): Sales → Monthly | Daily | Import Maybank | Simulator analysis;
   Classes → Overview | Manage classes | Sessions. Under the main menu, underlined when current. */
.admin-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
  margin-top: 16px;
  border-bottom: 1px solid var(--color-border);
}

.admin-subnav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: -1px;
  border-bottom: 3px solid transparent;
  color: var(--color-text-muted);
  font-weight: 700;
  text-decoration: none;
}

.admin-subnav a:hover {
  color: var(--color-text);
}

.admin-subnav a[aria-current="page"] {
  border-bottom-color: var(--color-red);
  color: var(--color-text);
}

/* Urus kelas: kotak semak "Aktif" */
.field-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.field-check input {
  width: 22px;
  min-height: 22px;
  height: 22px;
  margin: 3px 0 0;
  padding: 0;
  flex: none;
  accent-color: var(--color-red);
}

.field-check label {
  margin: 0;
  font-weight: 400;
}

.class-actions {
  margin-top: 8px;
}

.field-hint-after {
  margin: 6px 0 0;
}

/* Tetapan akademi: nombor semasa + pautan semak */
.current-setting {
  margin: 0 0 16px;
  overflow-wrap: anywhere;
}

.current-setting p {
  margin: 0;
}

.current-setting a {
  display: inline-block;
  padding: 10px 0;
  color: var(--color-text);
  text-decoration: underline;
}

/* Dashboard admin: carian dan penapis */
.filter-form {
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
}

.filter-form .field input,
.filter-form .field select {
  background: var(--color-surface);
}

.filter-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 12px;
}

.filter-grid .field-wide {
  grid-column: 1 / -1;
}

.recent-hint {
  margin: 12px 0 0;
}

/* Dashboard admin: senarai tempahan */
.booking-list {
  display: grid;
  gap: 12px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.booking-item {
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
}

.booking-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.booking-ref {
  font-weight: 800;
}

.booking-line {
  margin: 6px 0 0;
  color: var(--color-text-muted);
  overflow-wrap: anywhere;
}

.booking-amount {
  margin: 6px 0 0;
  font-weight: 700;
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
}

.badge-paid {
  border-color: var(--color-success);
  color: var(--color-success);
}

.badge-pending {
  border-color: var(--color-warning);
  color: var(--color-warning);
}

.badge-failed {
  border-color: var(--color-red);
  color: var(--color-red-text);
}

.badge-closed {
  color: var(--color-text-muted);
}

.booking-details {
  margin-top: 8px;
}

.booking-details summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  cursor: pointer;
}

.booking-details summary:focus-visible {
  outline: 3px solid var(--color-text);
  outline-offset: 2px;
}

.booking-details .review-list {
  margin: 4px 0 0;
}

/* Slot simulator: papan hari ini dan pilihan borang (K-056) */
.simulator-board {
  display: grid;
  gap: 12px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.simulator-card {
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
}

.simulator-slots {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.simulator-slots li {
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.board-actions {
  margin-top: 12px;
}

/* Kad simulator = kotak pilihan (K-057): seluruh kepala kad boleh ditekan */
.board-choices {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.board-choices > .field-hint {
  margin: 8px 0 0;
}

.simulator-pick {
  min-height: 44px;
  cursor: pointer;
}

.simulator-pick-name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.simulator-pick input {
  width: 22px;
  height: 22px;
  margin: 0;
  flex: none;
  accent-color: var(--color-red);
}

.simulator-card:has(input:checked) {
  border-color: var(--color-red);
  box-shadow: inset 0 0 0 1px var(--color-red);
}

.simulator-card:has(input:focus-visible) {
  outline: 3px solid var(--color-text);
  outline-offset: 2px;
}

.simulator-card:has(input:disabled) .simulator-pick {
  cursor: not-allowed;
}

.simulator-card:has(input:disabled) .simulator-pick-name {
  opacity: 0.6;
}

.simulator-note {
  margin: 6px 0 0;
  color: var(--color-warning);
  font-size: 0.875rem;
}

/* Open (K-057): butang pada kad papan, mesej papan, senarai "Open belum dibayar" */
.open-actions {
  margin-top: 10px;
}

.board-message {
  margin: 12px 0 0;
}

.unpaid-opens {
  margin: 16px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--color-border);
}

.unpaid-opens h3 {
  margin: 0;
}

.form-notice {
  margin: 0 0 16px;
}

/* Peringatan Belum dibayar pada tarikh lepas (K-065): setiap tarikh = butang seperti pautan */
.reminder {
  margin: 0 0 16px;
  border-left-color: var(--color-unpaid);
}

.reminder-title {
  margin: 0 0 4px;
  font-size: 1.1rem;
}

.reminder-list {
  margin: 4px 0 0;
  padding-left: 20px;
}

.reminder-date {
  margin: 0;
  color: var(--color-text);
  text-align: left;
}

/* Bayaran terus di kaunter (K-059): Tunai / DuitNow QR Maybank dalam paparan bayaran */
.manual-form {
  margin: 16px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--color-border);
}

/* Jualan harian (K-059): tajuk borang Rekod jualan terus */
.manual-form h3 {
  margin: 0 0 6px;
}

/* Import laporan Maybank + Ubah butiran (K-060) */
.file-errors {
  margin: 12px 0 0;
  padding-left: 20px;
}

.import-summary {
  margin: 12px 0;
  font-weight: 700;
}

.bulk-bar {
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
}

.bulk-count {
  margin: 0 0 8px;
  font-weight: 700;
}

.bulk-bar .actions + .actions {
  margin-top: 8px;
}

.item-actions {
  margin-top: 10px;
}

.details-editor {
  margin-top: 8px;
}

.details-group {
  margin: 0 0 16px;
}

/* Butang bawah paparan bayaran (Terima Tunai / QR Maybank, Tempahan baharu): baris sendiri, jarak sama seperti butang */
.payment-actions {
  margin-top: 12px;
}

/* Gambaran slot (K-058): grid 6 simulator × 12:00 tengah hari – 1:00 pagi; skrol mendatar DALAM kotaknya
   sahaja (halaman tidak skrol ke tepi). Status ditulis dalam blok — warna bukan satu-satunya petunjuk. */
.overview-nav {
  display: flex;
  gap: 8px;
}

.overview-nav input {
  flex: 1;
  min-width: 0;
}

.overview-nav .button {
  min-width: 48px;
  padding: 8px 16px;
  font-size: 1.5rem;
  line-height: 1;
}

.overview-scroll {
  margin-top: 12px;
}

.overview {
  min-width: 960px;
}

.overview-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  border-top: 1px solid var(--color-border);
}

.overview-row:first-child {
  border-top: 0;
}

.overview-name {
  position: sticky;
  left: 0;
  z-index: 3;
  padding: 8px;
  border-right: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: 0.875rem;
  font-weight: 700;
}

.overview-inactive {
  color: var(--color-text-muted);
  font-weight: 400;
}

.overview-track {
  position: relative;
  min-height: 72px;
  /* garis setiap 30 minit (26 lajur) */
  background-image: repeating-linear-gradient(to right, var(--color-border) 0 1px, transparent 1px calc(100% / 26));
}

.overview-hours .overview-track {
  min-height: 36px;
  background-image: none;
}

.overview-hour {
  position: absolute;
  top: 10px;
  transform: translateX(-50%);
  color: var(--color-text-muted);
  font-size: 0.75rem;
}

.overview-hour:first-child {
  transform: none;
}

.overview-hour:last-child {
  transform: translateX(-100%);
}

.overview-slot {
  position: absolute;
  top: 6px;
  bottom: 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 2px 6px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-text-muted);
  border-radius: 4px;
  background: var(--color-bg);
  color: var(--color-text);
  font: inherit;
  font-size: 0.75rem;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}

.overview-slot span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.overview-slot-time {
  font-weight: 700;
}

.overview-slot-status {
  color: var(--color-text-muted);
}

.overview-slot-paid {
  border-left-color: var(--color-success);
}

.overview-slot-pending {
  border-left-color: var(--color-warning);
}

.overview-slot-open {
  border-left-color: var(--color-red);
}

.overview-slot-unpaid {
  border-left-color: var(--color-unpaid);
}

.overview-slot:hover,
.overview-slot:focus-visible {
  z-index: 2;
  border-color: var(--color-text);
}

.overview-slot:focus-visible {
  outline: 3px solid var(--color-text);
  outline-offset: 1px;
}

.overview-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0 0 16px;
}

.overview-key::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  border-radius: 2px;
  vertical-align: -1px;
}

.overview-key-paid::before {
  background: var(--color-success);
}

.overview-key-pending::before {
  background: var(--color-warning);
}

.overview-key-open::before {
  background: var(--color-red);
}

.overview-key-unpaid::before {
  background: var(--color-unpaid);
}

.overview-detail {
  margin: 0 0 16px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
}

.overview-detail h3 {
  margin: 0 0 8px;
}

/* Halaman Slot simulator lebar penuh (grid di atas, K-058): borang tempah kekal selebar halaman tempahan */
.slot-form {
  max-width: 640px;
}

.choice-group-title {
  margin: 0 0 6px;
  font-weight: 700;
}

/* Teks untuk pembaca skrin sahaja */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.choice-group {
  min-width: 0;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}

.choice-group legend {
  margin-bottom: 6px;
  padding: 0;
  font-weight: 700;
}

.choice-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

/* Seluruh kotak boleh ditekan (sekurang-kurangnya 48px tinggi) */
.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  cursor: pointer;
  overflow-wrap: anywhere;
}

.choice input {
  width: 22px;
  height: 22px;
  margin: 0;
  flex: none;
  accent-color: var(--color-red);
}

.choice:has(input:checked) {
  border-color: var(--color-red);
}

.choice:has(input:focus-visible) {
  outline: 3px solid var(--color-text);
  outline-offset: 2px;
}

.choice:has(input:disabled) {
  opacity: 0.6;
  cursor: not-allowed;
}

.choice-wide {
  grid-column: 1 / -1;
}

/* Caj (K-066): teks pilihan panjang ("Caj sebagai 30 minit — RM 20.00") — satu lajur pada semua saiz */
.choice-list.charge-list,
.admin-page .board-split .choice-list.charge-list {
  grid-template-columns: minmax(0, 1fr);
}

/* Telefon sangat kecil (320px): satu lajur supaya perkataan seperti "Sekarang" tidak terpecah */
@media (max-width: 359px) {
  .choice-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

.choice-time {
  margin: 12px 0 0;
}

/* Jualan: jadual harian — skrol mendatar DALAM kotak jadual sahaja pada skrin kecil (K-056) */
.table-scroll {
  margin: 0 0 16px;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
}

.table-scroll:focus-visible {
  outline: 3px solid var(--color-text);
  outline-offset: 2px;
}

.sales-table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.sales-table caption {
  padding: 10px 12px;
  font-weight: 700;
  text-align: left;
}

.sales-table th,
.sales-table td {
  padding: 8px 10px;
  border-top: 1px solid var(--color-border);
  text-align: right;
  white-space: nowrap;
}

.sales-table th:nth-child(-n + 2),
.sales-table td:nth-child(-n + 2) {
  text-align: left;
}

.sales-table thead th {
  color: var(--color-text-muted);
  font-size: 0.8125rem;
}

.sales-table tfoot th,
.sales-table tfoot td {
  font-weight: 800;
}

.sales-table .is-empty td {
  color: var(--color-text-muted);
}

/* Kad jumlah jualan: satu lajur pada telefon supaya "RM 1,234.00" tidak terpecah */
.stat-grid.sales-summary {
  grid-template-columns: minmax(0, 1fr);
}

/* Jualan: analisa dan sasaran bulanan (K-056) */
.sales-analysis {
  margin: 0 0 16px;
  padding: 16px 0 0;
  border-top: 1px solid var(--color-border);
}

.sales-analysis h3 {
  margin: 0 0 12px;
}

.target-summary {
  margin: 0 0 8px;
  font-weight: 700;
}

.target-progress {
  height: 12px;
  margin: 0 0 8px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-bg);
}

.target-bar {
  display: block;
  width: 0;
  height: 100%;
  background: var(--color-red);
}

.target-progress.is-reached .target-bar {
  background: var(--color-success);
}

/* Jualan: carta sebenar berbanding sasaran (K-057) — tanda nipis, grid hairline, teks dalam warna teks */
.sales-charts {
  margin: 0 0 16px;
  padding: 16px 0 0;
  border-top: 1px solid var(--color-border);
}

.sales-charts h3 {
  margin: 0 0 12px;
}

.sales-chart {
  margin: 0 0 20px;
}

.chart-title {
  margin: 0 0 6px;
  font-weight: 700;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0 0 6px;
  padding: 0;
  list-style: none;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.chart-legend li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-key {
  display: inline-block;
  flex: none;
}

/* Bar → kotak; sasaran → garis (petunjuk menyerupai tanda dalam carta) */
.legend-actual {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--chart-actual);
}

.legend-target {
  width: 16px;
  height: 2px;
  border-radius: 1px;
  background: var(--chart-target);
}

.chart-plot {
  position: relative;
}

.chart-svg {
  display: block;
  max-width: 100%;
  overflow: visible;
}

.chart-grid {
  stroke: var(--color-border);
  stroke-width: 1;
}

.chart-axis {
  fill: var(--color-text-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.chart-value {
  fill: var(--color-text);
  font-size: 12px;
  font-weight: 700;
}

.chart-bar {
  fill: var(--chart-actual);
}

.chart-target {
  stroke: var(--chart-target);
  stroke-width: 2;
  stroke-linecap: round;
}

.chart-hit {
  fill: transparent;
}

.chart-point.is-active .chart-bar {
  filter: brightness(1.25);
}

.chart-point.is-active .chart-hit {
  fill: rgba(255, 255, 255, 0.04);
}

.chart-tooltip {
  position: absolute;
  top: 0;
  z-index: 1;
  min-width: 150px;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  pointer-events: none;
  font-size: 0.875rem;
}

.tooltip-title {
  margin: 0 0 4px;
  color: var(--color-text-muted);
}

.tooltip-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 2px 0 0;
  color: var(--color-text-muted);
}

.tooltip-row strong {
  color: var(--color-text);
}

/* Analisa sewa simulator (K-060): bar mendatar satu siri — label | bar | nilai (warna --chart-actual) */
.bar-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(0, 6rem) minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  font-size: 0.875rem;
}

.bar-label {
  color: var(--color-text-muted);
  overflow-wrap: anywhere;
}

.bar-track {
  display: block;
  height: 12px;
}

/* Tapak di kiri (segi empat), hujung data bulat 4px */
.bar-fill {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: 0 4px 4px 0;
  background: var(--chart-actual);
}

.bar-value {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.bar-row.is-active .bar-fill {
  filter: brightness(1.25);
}

.chart-note {
  margin: 6px 0 0;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.chart-table {
  margin-top: 6px;
}

.chart-table summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--color-text-muted);
  cursor: pointer;
}

.chart-table .sales-table {
  min-width: 0;
}

.chart-table .sales-table td {
  text-align: right;
}

/* Telefon: label kategori (contoh "September 2035") dan tajuk lajur boleh dua baris supaya 3 lajur muat
   tanpa skrol */
.chart-table .sales-table th {
  white-space: normal;
}

.chart-table .sales-table th,
.chart-table .sales-table td {
  padding: 6px 8px;
}

/* Telefon sangat kecil (320px): jadual data 4 lajur (Analisa, K-060) muat tanpa skrol */
@media (max-width: 359px) {
  .chart-table .sales-table-wide th,
  .chart-table .sales-table-wide td {
    padding: 6px 4px;
  }
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

@media (min-width: 560px) {
  .stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-list {
    grid-template-columns: max-content 1fr;
  }

  .review-list dd {
    margin: 0;
  }

  .simulator-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .choice-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stat-grid.sales-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stat-grid.sales-analysis-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Slot simulator lebar penuh (K-058): 3 kad simulator sebaris */
@media (min-width: 960px) {
  .simulator-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Kaki halaman */
.site-footer {
  padding: 24px 0;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.site-footer p {
  margin: 0;
}

/* Butang yang kelihatan seperti pautan (contoh: "Tetapan privasi" di kaki halaman) */
.link-button {
  min-height: 44px;
  margin: 4px 0 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-text-muted);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.link-button:focus-visible {
  outline: 3px solid var(--color-text);
  outline-offset: 2px;
}

/* Banner persetujuan Meta Pixel (K-032): melekat di bawah skrin, tidak menutup kaki halaman */
.consent-banner {
  position: sticky;
  bottom: 0;
  z-index: 10;
  padding: 12px 0;
  border-top: 2px solid var(--color-red);
  background: var(--color-surface);
}

.consent-title {
  margin: 0 0 4px;
  font-size: 1.125rem;
}

.consent-text,
.consent-current {
  margin: 0 0 10px;
  font-size: 0.875rem;
  line-height: 1.5;
}

.consent-current {
  color: var(--color-text-muted);
}

.consent-actions .button {
  min-width: 120px;
}

/* Komputer dan tablet */
@media (min-width: 768px) {
  .hero {
    padding: 120px 0 128px;
  }

  .class-card {
    padding: 28px;
  }
}

/* =====================================================================
   Halaman utama (K-049) — gaya korporat: gelap + merah, tipografi tegas
   Hanya terpakai pada index.html (kelas "home-*"); halaman lain tidak terjejas.
   ===================================================================== */

.button-small {
  min-height: 44px;
  padding: 10px 18px;
}

/* Kepala halaman: logo, menu bahagian, butang Tempah */
.home-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11, 11, 13, 0.92);
  backdrop-filter: blur(8px);
}

.home-header .container {
  flex-wrap: wrap;
  gap: 4px 8px;
  padding-top: 8px;
  padding-bottom: 8px;
}

/* Pilihan bahasa BM | EN | 中文 (K-050) — dijana oleh deploy/i18n.js */
.lang-switch {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

/* "中文" tidak dipecahkan kepada dua baris pada skrin sempit */
.lang-switch a {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 6px;
  border-radius: var(--radius);
  color: var(--color-text-muted);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
}

.lang-switch a:hover,
.lang-switch a:focus-visible {
  color: var(--color-text);
  background: var(--color-surface);
}

.lang-switch a[aria-current="page"] {
  color: var(--color-text);
  box-shadow: inset 0 -2px 0 var(--color-red);
}

/* Telefon: hanya dua bahasa LAIN dipaparkan, supaya logo + bahasa muat sebaris (hingga 320px) */
@media (max-width: 559px) {
  .lang-switch a[aria-current="page"] {
    display: none;
  }
}

/* Telefon: menu boleh ditatal mendatar di bawah logo (tanpa JavaScript) */
.home-nav {
  order: 3;
  display: flex;
  gap: 4px;
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  /* Pudar di hujung kanan: petunjuk ada lagi pilihan untuk ditatal */
  -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
  mask-image: linear-gradient(90deg, #000 85%, transparent);
}

.home-nav::-webkit-scrollbar {
  display: none;
}

.home-nav a {
  flex: none;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.home-nav a:hover,
.home-nav a:focus-visible {
  color: var(--color-text);
  background: var(--color-surface);
}

/* The menu is on every customer page and blog page (owner, 2026-11-20): the link of the page you are on */
.home-nav a[aria-current="page"] {
  color: var(--color-text);
  box-shadow: inset 0 -2px 0 var(--color-red);
}

/* Header of the pages other than the home page: same rows as the home page (logo + language, menu), not sticky */
.site-header.has-nav .container {
  flex-wrap: wrap;
  gap: 4px 8px;
  padding-top: 8px;
  padding-bottom: 8px;
}

/* Lompatan ke bahagian tidak terlindung oleh kepala halaman yang melekat */
.home section[id] {
  scroll-margin-top: 120px;
}

/* Bahagian atas: gambar studio dengan lapisan gelap supaya teks mudah dibaca */
.home-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 4px solid var(--color-red);
}

.home-hero-image {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

/* Hero video (owner, 2026-11-27): over the picture of its first frame (the same picture is its poster) */
.hero-video-toggle {
  position: absolute; right: 16px; bottom: 16px; z-index: 1; min-height: 44px; padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.35); border-radius: var(--radius); background: rgba(11, 11, 13, 0.6);
  color: #fff; font: inherit; font-size: 0.875rem; cursor: pointer;
}
.hero-video-toggle:hover { background: rgba(11, 11, 13, 0.85); }
.hero-video-toggle:focus-visible { outline: 2px solid var(--color-red); outline-offset: 2px; }

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  /* Lighter shade so the video shows (owner, 2026-11-27); phones: the words cover the full width, so a little darker */
  background: linear-gradient(180deg, rgba(11, 11, 13, 0.5) 0%, rgba(11, 11, 13, 0.62) 60%, rgba(11, 11, 13, 0.9) 100%);
}

@media (min-width: 768px) {
  .home-hero::before {
    background:
      linear-gradient(90deg, rgba(11, 11, 13, 0.62) 0%, rgba(11, 11, 13, 0.4) 55%, rgba(11, 11, 13, 0.22) 100%),
      linear-gradient(180deg, rgba(11, 11, 13, 0) 55%, rgba(11, 11, 13, 0.85) 100%);
  }
}

.home-hero h1,
.home-hero .hero-eyebrow,
.home-hero .hero-text {
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.home-hero-content {
  padding-top: 96px;
  padding-bottom: 72px;
}

.home-hero h1 {
  max-width: 18ch;
  margin: 0 0 16px;
  font-size: clamp(2rem, 7vw, 3.75rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.home-hero .hero-text {
  max-width: 46ch;
  color: #e4e4e7;
}

/* Jalur kredibiliti */
.home-highlights {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

.home-highlights ul {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin: 0 auto;
  padding-top: 0;
  padding-bottom: 0;
  list-style: none;
}

.home-highlights li {
  display: flex;
  flex-direction: column;
  padding: 20px 8px;
}

.home-highlights strong {
  font-size: 1.125rem;
  font-weight: 800;
}

.home-highlights span {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* Bahagian umum */
.home-section {
  padding: 64px 0;
}

.home-section-alt {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.section-eyebrow {
  margin: 0 0 8px;
  padding-left: 12px;
  border-left: 3px solid var(--color-red);
  color: var(--color-red-text);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.home-section h2 {
  max-width: 28ch;
  margin: 0 0 16px;
  text-wrap: balance;
  font-size: clamp(1.625rem, 5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
}

.section-lead {
  max-width: 60ch;
  margin: 0 0 24px;
  color: var(--color-text-muted);
  font-size: 1.125rem;
}

.home-split {
  display: grid;
  gap: 40px;
}

/* Kenapa Panthers */
.feature-list {
  display: grid;
  gap: 16px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.feature {
  padding: 20px 20px 20px 24px;
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-red);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.feature h3,
.step h3 {
  margin: 0 0 6px;
  font-size: 1.125rem;
}

.feature p,
.step p {
  margin: 0;
  color: var(--color-text-muted);
}

.home-figure {
  margin: 0;
}

.home-figure img,
.event-gallery img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
  object-fit: cover;
}

.home-figure img {
  max-height: 560px;
}

/* Sewaan acara */
.event-facts {
  display: grid;
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.event-facts li {
  position: relative;
  padding-left: 22px;
  color: var(--color-text);
}

.event-facts li::before {
  content: "";
  position: absolute;
  top: 0.75em;
  left: 0;
  width: 10px;
  height: 3px;
  background: var(--color-red);
}

.event-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.event-gallery li {
  aspect-ratio: 4 / 3;
}

/* Cara tempah: nombor langkah besar */
.steps {
  display: grid;
  gap: 16px;
  margin: 24px 0 32px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 24px 20px 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  counter-increment: step;
}

.step::before {
  content: "0" counter(step);
  display: block;
  margin-bottom: 8px;
  color: var(--color-red-text);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

/* Lokasi dan waktu operasi */
.home-address {
  margin: 0 0 24px;
  font-style: normal;
  font-size: 1.0625rem;
}

.hours-title {
  margin: 0 0 12px;
  font-size: 1.125rem;
}

.hours {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 24px;
  margin: 0;
}

.hours dt {
  color: var(--color-text-muted);
}

.hours dd {
  margin: 0;
  font-weight: 600;
}

/* Soalan lazim */
.faq {
  display: grid;
  gap: 8px;
  max-width: 760px;
  margin-top: 24px;
}

.faq details {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.faq summary {
  position: relative;
  min-height: 44px;
  padding: 14px 44px 14px 16px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  color: var(--color-red-text);
  font-size: 1.5rem;
  font-weight: 400;
}

.faq details[open] summary::after {
  content: "\2212"; /* tanda tolak */
}

.faq summary:focus-visible {
  outline: 3px solid var(--color-text);
  outline-offset: 2px;
}

.faq details p {
  margin: 0;
  padding: 0 16px 16px;
  color: var(--color-text-muted);
}

/* Kaki halaman */
.home-footer {
  padding: 48px 0 24px;
  border-top: 1px solid var(--color-border);
}

.footer-grid {
  display: grid;
  gap: 24px;
  margin-bottom: 32px;
}

.footer-grid p {
  margin: 0 0 6px;
}

.footer-mark {
  display: block;
  width: 120px;
  height: auto;
  margin-bottom: 12px;
}

.footer-title {
  margin: 0 0 8px;
  color: var(--color-text);
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-footer a {
  color: var(--color-text);
}

/* Ikon jenama WhatsApp / Instagram / Facebook / TikTok (K-055): ikon 24px dalam kawasan tekan 44px,
   tepi kiri ikon sejajar dengan teks di atasnya */
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 0 -10px;
  padding: 0;
  list-style: none;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
}

.footer-grid p > .social-icon {
  margin-left: -10px;
}

.social-icon svg {
  width: 24px;
  height: 24px;
}

.social-icon:hover,
.social-icon:focus-visible {
  background: var(--color-surface);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.footer-legal p {
  margin: 0;
}

.footer-company-logo {
  display: block;
  width: auto;
  height: 32px;
}

@media (min-width: 768px) {
  .logo img {
    height: 44px;
  }

  .home-highlights ul {
    grid-template-columns: repeat(4, 1fr);
  }

  .home-hero-content {
    padding-top: 160px;
    padding-bottom: 120px;
  }

  .home-split {
    grid-template-columns: 3fr 2fr;
    align-items: center;
  }

  .event-gallery {
    grid-template-columns: repeat(4, 1fr);
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: 2fr 2fr 1fr;
  }
}

@media (min-width: 960px) {
  .home-nav {
    order: 0;
    width: auto;
    margin-left: 24px;
    /* Semua pautan muat — tiada pudar */
    -webkit-mask-image: none;
    mask-image: none;
  }

  .home-header .container,
  .site-header.has-nav .container {
    flex-wrap: nowrap;
  }
}

/* 960–1099px: 8 pautan menu BM (termasuk Blog, K-054, "Main di studio", K-062, dan "Panduan", K-063) muat sebaris —
   ruang setiap pautan 3px dan teks 14px (with the 8th link BM at 960px was 58px too wide; measured, all 3 languages fit) */
@media (min-width: 960px) and (max-width: 1099px) {
  .home-nav a {
    padding-left: 3px;
    padding-right: 3px;
    font-size: 0.875rem;
  }
}

/* 1100px and wider: 8 links — 10px instead of 12px each side (BM was 14px too wide) */
@media (min-width: 1100px) {
  .home-nav a {
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* Blog (K-054): senarai artikel dan halaman artikel — dijana oleh deploy/blog.js */
.blog-list {
  display: grid;
  gap: 20px;
}

.blog-card {
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.blog-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.blog-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.blog-card-body {
  padding: 16px 20px 20px;
}

.blog-card h2 {
  margin: 4px 0 8px;
  font-size: 1.25rem;
  line-height: 1.3;
}

.blog-card-body p {
  margin: 0 0 12px;
  color: var(--color-text-muted);
}

.blog-card-link:hover h2,
.blog-card-link:focus-visible h2 {
  text-decoration: underline;
}

.blog-card-link:focus-visible {
  outline: 3px solid var(--color-text);
  outline-offset: -3px;
}

.article-meta {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.article .page-header p:first-child {
  margin-bottom: 16px;
}

.article .page-header .article-meta {
  margin-top: 8px;
}

.article-body {
  line-height: 1.7;
}

.article-body h2 {
  margin: 32px 0 8px;
  font-size: 1.375rem;
  line-height: 1.3;
}

.article-body figure {
  margin: 24px 0;
}

.article-body img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.article-body figcaption {
  margin-top: 8px;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.article-body a:not(.button) {
  color: var(--color-red-text);
  overflow-wrap: anywhere;
}

.article-cover {
  margin-top: 0;
}

.article-cta {
  margin-top: 40px;
  padding: 20px;
  background: var(--color-surface);
  border-left: 4px solid var(--color-red);
  border-radius: var(--radius);
}

.article-cta h2 {
  margin-top: 0;
}

@media (min-width: 768px) {
  .blog-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Admin pages: full-width dashboard layout (K-061, docs/ADMIN_UI.md) — only on converted pages (body.admin-page).
   Phone first: one column (as before); 2 columns from 768px where they fit; full window width up to 1600px. */
.admin-page {
  --max-width: 1600px;
}

/* Stat cards on the page background: card colour so each tile stands out */
.admin-page .kpi-grid {
  margin: 16px 0 0;
}

.admin-page .kpi-grid .stat {
  background: var(--color-surface);
}

.dashboard-bar-row .field {
  margin-bottom: 8px;
}

.dashboard-panel h3,
.dashboard-charts h3 {
  margin: 0 0 12px;
}

.dashboard-charts {
  margin-top: 24px;
}

.dashboard-chart-grid {
  display: grid;
  gap: 16px;
}

.dashboard-chart-grid > .summary-card {
  min-width: 0;
  margin: 0;
}

.admin-page #sales-result > .actions {
  margin-top: 24px;
}

@media (min-width: 768px) {
  .dashboard-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: start;
  }

  .dashboard-chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-wide {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1024px) {
  .admin-page .container {
    padding: 0 24px;
  }

  /* Month (or date) field + its explanation side by side */
  .dashboard-bar-row {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
  }

  .dashboard-bar-row .field-hint {
    margin: 0;
  }

  /* Wide screen: every table column fits — no "scroll the table" hint */
  .admin-page .scroll-hint {
    display: none;
  }

  /* Daily sales: 11 columns since the guides (K-063) — column headings may wrap and cells are a little narrower,
     so the whole table still fits from 1024 px (numbers stay on one line) */
  .admin-page #sales-result .sales-table thead th {
    white-space: normal;
  }

  .admin-page #sales-result .sales-table th,
  .admin-page #sales-result .sales-table td {
    padding-left: 6px;
    padding-right: 6px;
  }

  /* Stat cards: 9 since the guides (K-063) — 3 rows of 3 (a 5-digit total such as "RM 18,935.36" needs ~180 px per card) */
  .admin-page .stat-grid.kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-page .kpi-grid .stat-wide {
    grid-column: auto;
  }

  /* Amount / date fields keep a readable width instead of stretching across a wide panel (Daily check: report only,
     full width since K-065) */
  .dashboard-split .field input,
  .check-column .field input {
    max-width: 320px;
  }
}

/* Wide screens: 2 rows — where the money comes from (total, classes, slots, other sales, guides) | how it was paid
   (payments, CHIP, Cash, QR Maybank). Since the guides (K-063): 9 cards no longer fit in one row with readable numbers. */
@media (min-width: 1280px) {
  .admin-page .stat-grid.kpi-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}


/* Import Maybank report + Simulator rental analysis — full width (K-061, Slice 22.3) */
.dashboard-chart-grid > .sales-chart {
  min-width: 0;
  margin: 0;
}

@media (min-width: 768px) {
  /* Chart measure: the 3 choices on one row */
  .admin-page .measure-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-page .measure-list .choice-wide {
    grid-column: auto;
  }
}

@media (min-width: 1024px) {
  /* Import: report file | preview side by side once a report has been read */
  .import-top:has(#preview-card:not([hidden])) {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr);
    gap: 16px;
    align-items: start;
  }

  /* Import preview: the "new" card across the top, the other 7 in rows of 4 */
  .admin-page .stat-grid.stats-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  /* Import: transactions in 2 columns */
  .admin-page .booking-list.transaction-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  /* Analysis: From | To | quick buttons on one row */
  .admin-page .period-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0 24px;
    align-items: end;
  }

  .admin-page .period-row .actions {
    margin-bottom: 16px;
  }

  .admin-page .period-row .field-error {
    grid-column: 1 / -1;
  }
}

/* Analysis: the 5 summary cards in one row once each card is wide enough for a 5-digit total */
@media (min-width: 1280px) {
  .admin-page .stat-grid.stats-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .admin-page .stats-5 .stat-wide {
    grid-column: auto;
  }
}

/* Simulator slots — full width (K-061, Slice 22.4): the time grid already uses the whole width; from 1280 px the
   simulator board and the booking form sit side by side, so a booking is made without scrolling down. Beside the form
   the board has 2 simulator cards per row on a laptop and 3 from 1500 px (a card needs ~300 px for the Open controls,
   so 6 in a row would leave no room for the form); the form's choices in 2 columns. Phones: one column, as before. */
@media (min-width: 1280px) {
  .admin-page .board-split {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(400px, 1fr);
    gap: 16px;
    align-items: start;
  }

  .admin-page .board-split .simulator-board,
  .admin-page .board-split .choice-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1500px) {
  .admin-page .board-split .simulator-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Dashboard, Classes, Sessions, Settings — full width (K-061, Slice 22.5). Phones: one column, as before. */
/* Settings: little content — a small card under the title instead of a line across the whole page */
.admin-page .small-card {
  max-width: 640px;
}

/* Opening days (K-068, Settings): a weekday row = "Monday — Open" choice + opening time; date exceptions as a list */
.opening-list {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
}

.opening-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 7.5rem;
  gap: 8px;
  align-items: center;
}

.opening-row .opening-time {
  margin: 0;
}

.opening-exceptions {
  display: grid;
  gap: 12px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.opening-exception {
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
}

.opening-exception p {
  margin: 0 0 8px;
}

@media (max-width: 359px) {
  .opening-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 1024px) {
  /* Dashboard: summary cards in 2 rows of 3 (the revenue card no longer across the top) */
  .admin-page .stat-grid.stats-6 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-page .stats-6 .stat-wide {
    grid-column: auto;
  }

  /* Dashboard: the 5 filters on one row */
  .admin-page .filter-row .filter-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .admin-page .filter-row .filter-grid .field-wide {
    grid-column: auto;
  }

  /* Dashboard: bookings in 2 columns */
  .admin-page .booking-list.booking-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  /* Classes, Sessions: list | form side by side */
  .admin-page .form-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 480px);
    gap: 16px;
    align-items: start;
  }
}

@media (min-width: 1280px) {
  /* Dashboard: all 6 summary cards in one row (numbers a little smaller so an all-time total such as
     "RM 123,456.78" stays on one line) */
  .admin-page .stat-grid.stats-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .admin-page .stats-6 .stat dd {
    font-size: 1.25rem;
  }

  /* Dashboard: search and the 5 filters on one row (fields lined up at the bottom; buttons below) */
  .admin-page .filter-row {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) minmax(0, 4fr);
    gap: 0 12px;
    align-items: end;
  }

  .admin-page .filter-row > .form-error,
  .admin-page .filter-row > .actions {
    grid-column: 1 / -1;
  }
}

/* Classes, Sessions: the list in 2 columns beside the form */
@media (min-width: 1440px) {
  .admin-page .form-split .booking-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

/* "Play at the studio" price table (K-062): both price columns right-aligned and easy to read; no minimum width,
   so all 3 columns fit on a 320 px phone without sideways scrolling */
.sales-table.price-table {
  min-width: 0;
  font-size: 1rem;
}

/* Headers may wrap ("Happy / Hour") so the price columns stay as narrow as the prices and the row labels get the room */
.sales-table.price-table thead th {
  font-size: 0.875rem;
  white-space: normal;
}

.sales-table.price-table td,
.sales-table.price-table thead th + th {
  text-align: right;
}

.sales-table.price-table td {
  font-weight: 700;
}

.sales-table.price-table tbody th {
  white-space: normal;
}

.play-page #harga .table-scroll {
  max-width: 640px;
}

/* Price section in the style of the owner's price poster (2026-11-27): dark card with a red edge, Happy Hour column
   in red, a clock / ∞ before each duration, big prices; the poster beside the table from 960 px (below it on phones) */
.price-layout { display: grid; gap: 24px; align-items: start; }
@media (min-width: 960px) {
  .price-layout { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px; }
  .price-poster { order: -1; }
}
.play-page #harga .table-scroll.price-card {
  max-width: none;
  border-color: var(--color-red);
  background: linear-gradient(180deg, #19191e 0%, #0d0d10 100%);
  box-shadow: 0 10px 32px rgba(225, 6, 0, 0.16);
}
.sales-table.price-table thead th {
  padding: 14px 12px;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
}
.sales-table.price-table thead th:first-child { text-align: left; }
.sales-table.price-table thead th + th { text-align: center; }
.price-when {
  display: block;
  margin-top: 2px;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  opacity: 0.85;
}
.sales-table.price-table td {
  padding: 14px 12px;
  font-size: 1.25rem;
  font-weight: 800;
  text-align: center;
}
.sales-table.price-table tbody th { padding: 14px 12px; font-weight: 700; }
.sales-table.price-table .price-happy {
  background: linear-gradient(180deg, rgba(225, 6, 0, 0.5) 0%, rgba(140, 0, 0, 0.42) 100%);
  color: #fff;
}
.sales-table.price-table thead th.price-happy { background: var(--color-red); }
.sales-table.price-table tbody th::before {
  content: "";
  display: inline-block;
  width: 1.1em;
  height: 1.1em;
  margin-right: 10px;
  vertical-align: -0.2em;
  background: var(--color-red-text);
  -webkit-mask: var(--price-icon) no-repeat center / contain;
  mask: var(--price-icon) no-repeat center / contain;
  --price-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
}
.sales-table.price-table tr[data-duration="day"] th::before {
  --price-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M7 9a3 3 0 1 0 0 6c2 0 3-1.5 5-3s3-3 5-3a3 3 0 1 1 0 6c-2 0-3-1.5-5-3S9 9 7 9z'/%3E%3C/svg%3E");
}
/* Small phones: less space around the cells so the durations fit on one line */
@media (max-width: 479px) {
  .sales-table.price-table thead th,
  .sales-table.price-table tbody th,
  .sales-table.price-table td { padding: 12px 8px; }
  .sales-table.price-table thead th { font-size: 0.8125rem; letter-spacing: 0; }
  .sales-table.price-table td { font-size: 1.125rem; }
  .sales-table.price-table tbody th::before { margin-right: 6px; }
}
.price-note { margin: 8px 0 0; color: var(--color-text-muted); font-size: 0.875rem; }
.price-poster { margin: 0; }
.price-poster img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(225, 6, 0, 0.5);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(225, 6, 0, 0.18);
}
.price-poster figcaption { margin-top: 12px; }

/* PDF guides shop (K-063): cover + details side by side from 768 px; one column on phones */
.guide-product {
  display: grid;
  gap: 32px;
  align-items: start;
}

.guide-cover {
  max-width: 340px;
  margin: 0;
}

.guide-cover img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}

.guide-product h2 {
  max-width: none;
}

.guide-byline {
  margin: -8px 0 16px;
  color: var(--color-text);
  font-weight: 600;
}

.guide-facts {
  margin: 0 0 24px;
  padding-left: 20px;
  color: var(--color-text-muted);
}

.guide-facts li + li {
  margin-top: 4px;
}

.guide-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin: 0 0 8px;
}

.guide-price-value {
  font-size: 2rem;
  font-weight: 800;
}

.guide-price-note {
  color: var(--color-text-muted);
}

.guide-my-link {
  margin-top: 16px;
}

@media (min-width: 768px) {
  .guide-product {
    grid-template-columns: minmax(220px, 2fr) 3fr;
    gap: 48px;
  }

  .guide-inside,
  .guide-next {
    grid-template-columns: repeat(2, 1fr);
  }

  .guide-next {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Shop (K-071, docs/SHOP.md, Slice 30.3): shop.html, shop-item.html, shop-cart.html, shop-order.html */
.shop-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.shop-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.shop-filter {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.shop-filter[aria-pressed="true"] {
  color: var(--color-text);
  box-shadow: inset 0 -2px 0 var(--color-red);
}

.shop-filter:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 2px;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.shop-card {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.shop-card-link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.shop-card-link:hover .shop-card-name,
.shop-card-link:focus-visible .shop-card-name {
  text-decoration: underline;
}

.shop-card-link:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: -2px;
}

.shop-card-photo,
.shop-item-photo,
.shop-line-photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--color-bg);
}

/* An item without a photo yet */
.shop-photo-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  text-align: center;
}

.shop-card-body {
  padding: 12px;
}

.shop-card-name {
  margin: 0 0 4px;
  font-size: 1rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.shop-card-price {
  margin: 0 0 8px;
  font-weight: 700;
}

.shop-card-note {
  margin: 8px 0 0;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* Availability words: colour + text (never colour alone) */
.shop-badge {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
}

.shop-badge:empty {
  display: none;
}

.shop-badge-in_stock {
  color: var(--color-success);
}

.shop-badge-last_items {
  color: var(--color-warning);
}

.shop-badge-sold_out {
  color: var(--color-text-muted);
}

.shop-badge-preorder {
  color: var(--color-unpaid);
}

.shop-order-link {
  margin-top: 16px;
}

/* One item */
.shop-item {
  display: grid;
  gap: 24px;
}

.shop-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.shop-thumb {
  width: 64px;
  height: 64px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  cursor: pointer;
}

.shop-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-thumb:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 2px;
}

.shop-item-info h1 {
  margin: 0 0 8px;
  font-size: 1.75rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.shop-item-price {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 12px;
  font-size: 1.375rem;
  font-weight: 700;
}

.shop-item-description {
  margin: 0 0 16px;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

/* Cart */
.shop-lines {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.shop-line {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.shop-line-photo {
  border-radius: var(--radius);
}

.shop-line-info p {
  margin: 4px 0 0;
}

.shop-line-name {
  color: var(--color-text);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.shop-line-option,
.shop-line-price {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

.shop-line-controls {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.shop-line-controls input {
  width: 80px;
  min-height: 44px;
  padding: 0 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  color: var(--color-text);
  font: inherit;
}

.shop-line-total {
  margin: 0 auto 0 0;
  font-weight: 700;
}

.shop-delivery {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}

.shop-delivery legend {
  margin-bottom: 8px;
  padding: 0;
  font-weight: 700;
}

.shop-choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 44px;
  padding: 8px 0;
}

.shop-choice input {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.shop-choice-price {
  color: var(--color-text-muted);
}

.shop-totals {
  margin: 16px 0;
}

.shop-total {
  font-size: 1.25rem;
  font-weight: 700;
}

/* Order status: Paid → Ordered → Ready / Shipped → Completed */
.shop-steps {
  display: grid;
  gap: 6px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.shop-step {
  padding: 8px 12px;
  border-left: 4px solid var(--color-border);
  color: var(--color-text-muted);
}

.shop-step-done {
  border-left-color: var(--color-success);
  color: var(--color-text);
}

.shop-step-done::before {
  content: "\2713\00a0";
  color: var(--color-success);
}

.shop-step-current {
  border-left-color: var(--color-red);
  color: var(--color-text);
  font-weight: 700;
}

@media (min-width: 640px) {
  .shop-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .shop-line {
    grid-template-columns: 96px 1fr auto;
  }

  .shop-line-controls {
    grid-column: auto;
    justify-content: flex-end;
  }
}

@media (min-width: 768px) {
  .shop-item {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

@media (min-width: 960px) {
  .shop-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Shop admin: photos of an item (K-071, 30.4b) */
.shop-admin-photos { list-style: none; margin: 0 0 var(--space-3, 12px); padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.shop-admin-photo { display: flex; flex-direction: column; gap: 6px; width: 96px; }
.shop-admin-photo img { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; }
.shop-admin-photo .actions { flex-direction: column; align-items: stretch; gap: 4px; margin: 0; }

/* Public slot times (K-075, slots.html): day buttons, legend, one card per simulator with a timeline and the list of
   times. Free = green, taken = grey, in use (Open) = amber, past / too short = dark. The list carries the meaning (text),
   the timeline is decoration (aria-hidden). */
.slots-note { color: var(--color-text); font-weight: 600; }
.slot-days { display: flex; gap: 8px; margin: 0 0 16px; padding-bottom: 4px; overflow-x: auto; }
.slot-day {
  flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 84px; min-height: 48px; padding: 6px 12px;
  border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface);
  color: var(--color-text); font: inherit; font-weight: 700; cursor: pointer;
}
.slot-day:hover { border-color: var(--color-text-muted); }
.slot-day[aria-pressed="true"] { border-color: var(--color-red); background: var(--color-red); }
.slot-day-closed { color: var(--color-text-muted); font-size: 0.8125rem; font-weight: 400; }
.slot-day[aria-pressed="true"] .slot-day-closed { color: var(--color-text); }
.slot-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0 0 24px; padding: 0; list-style: none; color: var(--color-text-muted); font-size: 0.9375rem; }
.slot-legend li { display: flex; align-items: center; gap: 8px; }
.slot-swatch { display: inline-block; width: 18px; height: 12px; border-radius: 3px; }
.slot-free { background: var(--color-success); }
.slot-taken { background: #71717a; }
.slot-in-use { background: var(--color-warning); }
.slot-past, .slot-gap { background: #2a2a30; }
.slot-sims { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 900px) { .slot-sims { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .slot-sims { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.slot-sim { min-width: 0; padding: 16px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); }
.slot-sim-name { margin: 0 0 12px; font-size: 1.125rem; }
.slot-bar { position: relative; height: 16px; overflow: hidden; border-radius: 4px; background: #1d1d22; }
.slot-part { position: absolute; top: 0; bottom: 0; }
.slot-part + .slot-part { box-shadow: inset 2px 0 0 var(--color-surface); }
.slot-axis { display: flex; justify-content: space-between; margin: 4px 0 12px; color: var(--color-text-muted); font-size: 0.8125rem; }
.slot-times { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.slot-time { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-variant-numeric: tabular-nums; }
.slot-tag { display: inline-block; min-width: 9.5em; padding: 2px 10px; border-left: 4px solid var(--color-border); border-radius: 4px; background: var(--color-bg); font-size: 0.875rem; font-weight: 700; }
.slot-time-free .slot-tag { border-left-color: var(--color-success); }
.slot-time-taken .slot-tag { border-left-color: #71717a; }
.slot-time-in-use .slot-tag { border-left-color: var(--color-warning); }
.slot-time-none { color: var(--color-text-muted); }
.slot-updated { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 24px 0 0; color: var(--color-text-muted); }
.steps-classes { margin: 16px 0 0; }

/* Home page "Latest from the blog" (K-076): the blog cards, 3 in a row on wide screens; headings are h3 here */
.blog-latest { margin: 0 0 24px; }
.blog-card h3 { margin: 4px 0 8px; font-size: 1.125rem; line-height: 1.3; }
.blog-card-link:hover h3, .blog-card-link:focus-visible h3 { text-decoration: underline; }
@media (min-width: 1024px) { .blog-latest { grid-template-columns: repeat(3, 1fr); } }

/* Event rental page (K-078, events.html): bigger gallery, Basic / Premium rig cards, what the site needs, event
   types and the quote form (→ WhatsApp). */
.event-gallery-large { margin: 0; }
/* Top section on the owner's photo (2026-11-27), darkened so the text stays readable: events.html (event photo) and
   play.html (studio photo, .photo-hero) */
.event-hero, .photo-hero { position: relative; isolation: isolate; overflow: hidden; padding: 72px 0 56px; border-bottom: 4px solid var(--color-red); }
.event-hero-image { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 60% 55%; }
.event-hero::before, .photo-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(11, 11, 13, 0.6) 0%, rgba(11, 11, 13, 0.82) 65%, #0b0b0d 100%);
}
.event-hero p, .photo-hero p { color: #d4d4d8; max-width: 52ch; }
.event-hero .section-eyebrow, .photo-hero .section-eyebrow { color: var(--color-red-text); }
.photo-hero h1, .photo-hero p { text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6); }
/* play.html: the photo from its top (the PANTHERS ESPORTS STUDIO wall logo shows), a lighter shade at the top */
.photo-hero .event-hero-image { object-position: 20% 0; }
.photo-hero::before {
  background: linear-gradient(180deg, rgba(11, 11, 13, 0.25) 0%, rgba(11, 11, 13, 0.7) 45%, rgba(11, 11, 13, 0.85) 75%, #0b0b0d 100%);
}
@media (min-width: 1024px) { .event-hero, .photo-hero { padding: 128px 0 104px; } }
.rig-cards { display: grid; gap: 16px; margin: 0 0 24px; }
@media (min-width: 768px) { .rig-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rig-card { padding: 20px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-bg); }
.rig-card-premium { border-color: var(--color-red); }
/* Rig photo at the top of its card (owner, 2026-11-27): the whole picture, red-edged frame */
.rig-photo {
  display: block; width: 100%; height: auto; margin: 0 0 16px;
  border: 1px solid rgba(225, 6, 0, 0.5); border-radius: var(--radius); box-shadow: 0 10px 32px rgba(225, 6, 0, 0.16);
}
.rig-card h3 { margin: 0 0 4px; font-size: 1.5rem; }
.rig-count { margin: 0 0 12px; color: var(--color-red-text); font-weight: 700; }
.rig-list, .event-types { display: grid; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; }
.rig-list li, .event-types li { position: relative; padding-left: 22px; }
.rig-list li::before, .event-types li::before {
  content: ""; position: absolute; top: 0.75em; left: 0; width: 10px; height: 3px; background: var(--color-red);
}
.rig-list { margin: 0; }
/* Event types / Extras as photo cards (owner, 2026-11-27): 1 column on small phones, 2 from 560 px; every photo 4:3 */
.photo-cards { display: grid; gap: 16px; margin: 0 0 32px; padding: 0; list-style: none; }
@media (min-width: 560px) { .photo-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.photo-card {
  overflow: hidden; border: 1px solid rgba(225, 6, 0, 0.45); border-radius: var(--radius);
  background: linear-gradient(180deg, #19191e 0%, #0d0d10 100%); box-shadow: 0 10px 28px rgba(225, 6, 0, 0.12);
}
.photo-card img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.photo-card p { margin: 0; padding: 14px 16px 16px; font-weight: 600; }
/* Extras: the name in bold on its own line, the description in grey under it */
.photo-card p:has(strong) { font-weight: 400; color: var(--color-text-muted); }
.photo-card p strong { display: block; margin-bottom: 4px; color: var(--color-text, #fff); font-size: 1.0625rem; }
.rig-needs { display: grid; gap: 12px; margin: 0; }
@media (min-width: 768px) { .rig-needs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .rig-needs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.rig-needs div { padding: 12px 16px; border: 1px solid var(--color-border); border-radius: var(--radius); }
.rig-needs dt { color: var(--color-text-muted); font-size: 0.875rem; }
.rig-needs dd { margin: 4px 0 0; font-weight: 700; }

/* Panthers eRacing Academy page (K-098, academy.html): result cards, the student's quote, 3 level cards with the price,
   the 100-Day Challenge box. Gold = a win (text #f5c242 on the dark card: contrast above 10:1). */
.result-cards { display: grid; gap: 16px; margin: 0 0 32px; padding: 0; list-style: none; }
@media (min-width: 900px) { .result-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.result-card {
  padding: 20px; border: 1px solid rgba(225, 6, 0, 0.45); border-radius: var(--radius);
  background: linear-gradient(180deg, #19191e 0%, #0d0d10 100%); box-shadow: 0 10px 28px rgba(225, 6, 0, 0.12);
}
.result-card-win { border-color: rgba(245, 194, 66, 0.6); box-shadow: 0 10px 28px rgba(245, 194, 66, 0.12); }
.result-badge {
  display: inline-block; margin: 0; padding: 4px 12px; border-radius: 999px; font-size: 0.875rem; font-weight: 700;
  color: var(--color-red-text); background: rgba(225, 6, 0, 0.15);
}
.result-card-win .result-badge { color: #f5c242; background: rgba(245, 194, 66, 0.14); }
.result-card h3 { margin: 12px 0 8px; font-size: 1.125rem; overflow-wrap: anywhere; }
.result-card p:last-child { margin: 0; color: var(--color-text-muted); }
.academy-quote { margin: 0; padding: 20px 24px; border-left: 4px solid var(--color-red); border-radius: var(--radius); background: var(--color-surface); }
.academy-quote blockquote { margin: 0; }
.academy-quote blockquote p { margin: 0; font-size: 1.125rem; font-style: italic; line-height: 1.6; }
.academy-quote figcaption { margin-top: 12px; color: var(--color-text-muted); }
.academy-quote figcaption strong { color: var(--color-text); }
@media (min-width: 900px) { .level-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.level-card { display: flex; flex-direction: column; }
.level-card .rig-list { margin: 0 0 20px; }
.level-card .button { margin-top: auto; text-align: center; }
.level-price { margin: 4px 0 8px; font-size: 2rem; font-weight: 800; line-height: 1.2; }
.level-price span { font-size: 1rem; font-weight: 400; color: var(--color-text-muted); }
.challenge-box {
  padding: 24px; border: 1px solid rgba(245, 194, 66, 0.55); border-radius: var(--radius);
  background: linear-gradient(180deg, #1a1710 0%, #0d0d10 100%);
}
.challenge-box .section-eyebrow { color: #f5c242; }
.event-form { max-width: 640px; }
.event-form textarea { width: 100%; }
.rig-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rig-pick .field { margin-bottom: 8px; }

/* =====================================================================
   Owner tools — quotations & invoices (K-083, admin-quotes.html, admin-document.html)
   ===================================================================== */
.quote-summary { margin: 0 0 12px; font-weight: 600; }
.quote-form { max-width: 960px; }
.quote-form-grid { display: grid; gap: 0 16px; }
@media (min-width: 720px) {
  .quote-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quote-wide { grid-column: 1 / -1; }
}
.quote-form textarea { width: 100%; }
.quote-lines { display: grid; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.quote-line { display: grid; gap: 8px; align-items: center; padding: 8px; border: 1px solid var(--color-border); border-radius: var(--radius); }
.quote-line-item { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.quote-line-section { grid-template-columns: minmax(0, 1fr) auto auto; background: var(--color-surface); }
.quote-line-item .quote-line-text { grid-column: 1 / -1; }
.quote-line input { width: 100%; min-height: 44px; font-size: 1rem; }
.quote-line-total { font-weight: 700; text-align: right; white-space: nowrap; }
.quote-line-button { min-width: 44px; min-height: 44px; padding: 4px 8px; }
@media (min-width: 720px) {
  .quote-line-item { grid-template-columns: minmax(0, 1fr) 4.5rem 6rem 7.5rem 8.5rem auto auto; }
  .quote-line-item .quote-line-text { grid-column: auto; }
}
.quote-totals { display: grid; grid-template-columns: auto auto; gap: 4px 16px; align-self: end; justify-content: end; margin: 0 0 16px; }
.quote-totals dt { color: var(--color-text-muted); }
.quote-totals dd { margin: 0; font-weight: 700; text-align: right; }
.quote-follow-due { color: var(--color-red-text); font-weight: 700; }
.quote-paid-form { display: grid; gap: 0 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--color-border); }
@media (min-width: 560px) { .quote-paid-form { grid-template-columns: 1fr 1fr; } .quote-paid-form .actions { grid-column: 1 / -1; } }

/* The document: the owner's template (navy bars, grey sections), white A4 sheet on screen and on paper */
/* On screen: the usual dark admin background around the white sheet (owner, 2026-11-28); on paper: white */
.doc-page { min-height: 100vh; background: var(--color-bg); }
.doc-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.doc-status, .doc-hint { max-width: 210mm; margin: 12px auto; padding: 0 16px; }
.doc-page .doc-hint { color: var(--color-text-muted); }
.doc-page main { overflow-x: auto; padding: 0 0 24px; }
.doc-sheet {
  --doc-navy: #0f4c6e;
  box-sizing: border-box; width: 210mm; min-height: 297mm; margin: 12px auto; padding: 14mm 12mm;
  background: #fff; color: #111; font-family: Arial, Helvetica, sans-serif; font-size: 9.5pt; line-height: 1.35;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.6);
}
.doc-sheet p { margin: 0; }
.doc-sheet h1, .doc-sheet h2 { font-family: Arial, Helvetica, sans-serif; letter-spacing: 0; text-transform: none; }
.doc-top { position: relative; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.doc-logo { width: 72mm; height: auto; }
.doc-title-block { text-align: right; }
.doc-title { margin: 0 0 10px; color: var(--doc-navy); font-size: 24pt; font-weight: 700; }
.doc-meta { margin-left: auto; border-collapse: collapse; font-size: 8pt; }
.doc-meta th { padding: 1px 10px 1px 0; font-weight: 400; text-align: left; }
.doc-meta td { min-width: 30mm; padding: 1px 4px; border: 1px solid #111; text-align: left; }
.doc-stamp { position: absolute; top: 30mm; left: 50%; transform: translateX(-50%) rotate(-12deg); padding: 2mm 6mm; border: 3px solid #b3261e; color: #b3261e; font-size: 20pt; font-weight: 700; }
.doc-company { margin: 6mm 0 8mm; font-size: 9pt; }
.doc-strong { font-weight: 700; }
.doc-boxes { display: grid; grid-template-columns: 34% 1fr; gap: 12mm; margin-bottom: 6mm; }
.doc-box { min-height: 28mm; border: 1px solid #111; }
.doc-box p { padding: 0 2mm; }
.doc-box-head { margin: 0 0 1mm; padding: 0.6mm 2mm; background: var(--doc-navy); color: #fff; font-size: 9.5pt; font-weight: 700; }
.doc-lines { width: 100%; border-collapse: collapse; border: 1px solid #111; }
.doc-lines th { padding: 1mm 2mm; background: var(--doc-navy); color: #fff; font-weight: 700; }
.doc-lines td { padding: 0.6mm 2mm; height: 4.6mm; }
.doc-lines .doc-desc { text-align: left; }
.doc-lines .doc-qty { width: 10mm; text-align: center; border-left: 1px solid #111; border-right: 1px solid #111; }
.doc-lines .doc-uom { width: 13mm; text-align: center; border-right: 1px solid #111; }
.doc-lines th.doc-price { width: 30mm; text-align: center; }
.doc-lines .doc-rm { width: 6mm; padding-right: 0; border-left: 1px solid #111; }
.doc-lines .doc-amount { width: 20mm; text-align: right; }
.doc-lines .doc-section td { background: #bfbfbf; font-weight: 700; }
.doc-lines .doc-empty:nth-child(even) td { background: #e8e8e8; }
.doc-bottom { display: grid; grid-template-columns: 1fr 57mm; gap: 6mm; margin-top: 1mm; }
.doc-notes { min-height: 30mm; margin-top: 5mm; border: 1px solid #111; }
.doc-notes-text { padding: 0 2mm 2mm; white-space: pre-line; }
.doc-totals { align-self: start; width: 100%; border-collapse: collapse; }
.doc-totals th { padding: 0.6mm 2mm; font-weight: 400; text-align: left; }
.doc-totals td { padding: 0.6mm 1mm; }
.doc-totals .doc-amount { text-align: right; }
.doc-totals .doc-discount td, .doc-totals .doc-discount th { border-bottom: 1px solid #111; }
.doc-totals .doc-total th { padding-top: 6mm; font-size: 11pt; font-weight: 700; }
.doc-totals .doc-total td { padding-top: 6mm; }
.doc-totals .doc-total-box { background: var(--doc-navy); color: #fff; font-size: 11pt; font-weight: 700; }
.doc-footer { margin-top: 18mm; text-align: center; }
.doc-small { font-size: 7.5pt; }
.doc-thanks { margin: 8mm 0 2mm !important; font-size: 11pt; font-weight: 700; }
.doc-contact { padding-top: 1mm; border-top: 1px solid #111; }
@page { size: A4; margin: 10mm; }
@media print {
  .doc-page { background: #fff; }
  .doc-page .site-header, .doc-status, .doc-hint { display: none !important; }
  .doc-page main { overflow: visible; padding: 0; }
  .doc-sheet { width: auto; min-height: 0; margin: 0; padding: 0; box-shadow: none; }
  .doc-sheet * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* =====================================================================
   Owner tools — market prices (K-085, admin-market.html)
   ===================================================================== */
.market-tabs .shop-filter[aria-selected="true"] { color: var(--color-text); box-shadow: inset 0 -2px 0 var(--color-red); }
.market-filters .field-check { margin: 8px 0 0; }
#all-table { min-width: 860px; }
#all-table td:nth-child(5) { min-width: 18rem; text-align: left; }
#events-table { min-width: 600px; }
/* Owner tools — spreadsheet tables (K-087, admin-sheet.js): sortable headings; the first column stays on the left
   when the table scrolls sideways (phone) */
.sheet-table th, .sheet-table td { text-align: left; white-space: normal; vertical-align: top; }
.sheet-table thead th { vertical-align: bottom; }
.sheet-table .num { text-align: right; white-space: nowrap; }
.sheet-table tr > :first-child { position: sticky; left: 0; z-index: 1; width: 13rem; min-width: 13rem; background: var(--color-bg); box-shadow: 1px 0 0 var(--color-border); }
/* Scrolling to a cell (keyboard, links) keeps it clear of the fixed first column */
.table-scroll:has(> .sheet-table) { scroll-padding-left: 14rem; }
@media (max-width: 479px) {
  .sheet-table tr > :first-child { width: 8rem; min-width: 8rem; }
  .table-scroll:has(> .sheet-table) { scroll-padding-left: 9rem; }
}
.sort-button { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: inherit; cursor: pointer; }
.sort-button:focus-visible { outline: 3px solid var(--color-text); outline-offset: 2px; }
.sheet-table th.num .sort-button { justify-content: flex-end; }
.sort-arrow { color: var(--color-text-muted); font-size: 0.75em; }
[aria-sort="ascending"] .sort-arrow, [aria-sort="descending"] .sort-arrow { color: var(--color-text); }
.sheet-list { margin: 0; padding: 0; list-style: none; }
.sheet-list li + li { margin-top: 2px; }
.sheet-list a { overflow-wrap: anywhere; }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 6px; min-width: 11rem; }
.sheet-actions .button { min-height: 36px; padding: 4px 10px; font-size: 0.875rem; }
.sheet-table .badge { white-space: nowrap; }
.sheet-table .col-mid { min-width: 11rem; }
.sheet-table .col-wide { min-width: 16rem; }
#product-table { min-width: 1500px; }
#check-table { min-width: 1150px; }
#place-table { min-width: 1900px; }

/* Owner tools — equipment prices (K-086, admin-gear.html) */
#best-table { min-width: 900px; }
#best-table td:nth-child(2) { white-space: nowrap; }
#best-table td:nth-child(4) { text-align: left; }
#best-table .badge { margin-left: 4px; white-space: nowrap; }
#panel-compare h2 { margin-top: 28px; }
#panel-compare h2:first-child { margin-top: 8px; }
.market-table th, .market-table td { white-space: normal; }
.market-table tbody th { min-width: 9rem; }
.market-chart .bar-row { grid-template-columns: minmax(0, 40%) minmax(0, 1fr) auto; }
.market-changes { margin: 0 0 16px; padding-left: 20px; }
.market-changes li { margin: 0 0 6px; }
.market-muted { color: var(--color-text-muted); }
.market-price-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  grid-template-areas: "basis basis basis" "minutes price remove" "label label label";
}
.market-price-row .market-basis { grid-area: basis; }
.market-price-row .market-minutes { grid-area: minutes; }
.market-price-row .market-label { grid-area: label; }
.market-price-row .market-sen { grid-area: price; }
.market-price-row .quote-line-button { grid-area: remove; }
.market-price-row select { width: 100%; min-height: 44px; font-size: 1rem; }
@media (min-width: 720px) {
  .market-price-row { grid-template-columns: minmax(0, 1.3fr) 5.5rem minmax(0, 1fr) 7.5rem auto; grid-template-areas: "basis minutes label price remove"; }
}
/* =====================================================================
   Owner tools — trading dashboard (K-088, admin-trading.html)
   ===================================================================== */
.trading-disclaimer { margin-bottom: 16px; }
.trading-bar p { margin: 0 0 8px; }
.trading-market-hours { font-weight: 600; }
.trading-price { font-size: 1.125rem; font-weight: 600; }
.trading-bias { margin: 12px 0 20px; }
.trading-bias-line { margin: 0 0 8px; font-size: 1.125rem; }
.trading-bias h3 { margin: 12px 0 8px; font-size: 1rem; }
.trading-signals { margin: 0; padding: 0; list-style: none; }
.trading-signals li { margin: 0 0 8px; }
.trading-signals .badge { min-width: 2.75rem; text-align: center; }
.trading-line { margin: 0 0 8px; }
#panel-market h3 { margin-top: 24px; }
#panel-overview h2 { margin-top: 28px; }
#panel-overview h2:first-child { margin-top: 8px; }
#summary-table { min-width: 980px; }
#us-events-table { min-width: 640px; }
#record-table { min-width: 900px; }
#day-table, #week-table { min-width: 0; }
#indicator-table, #hits-table { min-width: 0; max-width: 640px; }
/* Market tab (42.4): today's and this week's plan side by side on a wide screen */
.trading-plans { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 32px; }
@media (min-width: 900px) {
  .trading-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.trading-chart-hint { margin: 6px 0 16px; }
/* TradingView news frames (42.5): one market (market tab) / all markets (News tab) */
.trading-news-box { height: 460px; overflow: hidden; border: 1px solid var(--color-border); border-radius: 8px; background: #131722; }
.trading-news-all { height: 680px; }
.trading-calendar-box { height: 520px; overflow: hidden; border: 1px solid var(--color-border); border-radius: 8px; background: #131722; }
.sheet-note { display: block; margin-top: 4px; color: var(--color-text-muted); font-size: 0.875rem; }
/* TradingView chart: TradingView's own site in a frame (no TradingView code on this page) */
.trading-chart { display: block; width: 100%; height: 100%; border: 0; }
/* Trading chart settings (owner, 2026-11-29): indicators + time frame, kept in this browser */
.trading-chart-settings { margin: 0 0 12px; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-surface); }
.trading-chart-settings summary { min-height: 44px; display: flex; align-items: center; padding: 0 14px; font-weight: 600; cursor: pointer; }
.trading-chart-settings summary:focus-visible { outline: 3px solid var(--color-text); outline-offset: 2px; }
.trading-chart-settings-body { padding: 0 14px 12px; }
.trading-chart-settings-body .field { margin-bottom: 8px; }
.trading-indicator-list { margin: 0; padding: 0; border: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 16px; }
.trading-indicator-list legend { padding: 0; margin-bottom: 6px; font-weight: 600; }
.trading-indicator-list .field-check { margin: 0; }
.trading-chart-settings-body select { max-width: 16rem; }
/* Our own trading chart (42.7): Lightweight Charts in a box like the TradingView frame; switch our chart / TradingView */
.trading-own-chart { height: 500px; overflow: hidden; border: 1px solid var(--color-border); border-radius: 8px; background: #131722; }
.trading-colour { width: 36px; height: 28px; margin-left: 8px; padding: 0; border: 1px solid var(--color-border); border-radius: 4px; background: none; cursor: pointer; }
/* Market header and sub-tabs like TradingView's symbol page (owner, 2026-11-29, Slice 42.8) */
.trading-head { display: flex; align-items: center; gap: 14px; margin: 8px 0 4px; }
.trading-head h2 { margin: 0; }
.trading-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; font-weight: 800; font-size: 1.05rem; color: #fff; background: #555; }
.trading-icon[data-market="xauusd"] { background: #d4a017; color: #1a1a1a; }
.trading-icon[data-market="btcusd"] { background: #f7931a; font-size: 1.6rem; }
.trading-icon[data-market="spy"] { background: #1e5bb8; font-size: 0.85rem; }
.trading-icon[data-market="voo"] { background: #8e2c3e; font-size: 0.85rem; }
.trading-subtitle { margin: 2px 0 0; color: var(--color-text-muted); }
/* Scalping setup card (K-096) */
.scalp-sides { margin: 0 0 12px; }
.scalp-card { margin: 0 0 16px; padding: 16px; border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface); }
.scalp-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; }
.scalp-side { padding: 4px 14px; border-radius: 999px; font-weight: 800; letter-spacing: 0.04em; background: var(--color-bg); color: var(--color-text-muted); }
.scalp-side[data-side="buy"] { background: rgba(34, 197, 94, 0.15); color: var(--color-success); }
.scalp-side[data-side="sell"] { background: rgba(239, 83, 80, 0.15); color: #ef5350; }
.scalp-state { font-weight: 700; color: var(--color-text-muted); }
.scalp-state[data-state="enter"] { color: var(--color-success); }
.scalp-state[data-state="wait"] { color: var(--color-warning); }
.scalp-levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0 8px; }
.scalp-tile { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-bg); }
.scalp-tile span { color: var(--color-text-muted); font-size: 0.85rem; }
.scalp-tile strong { font-size: clamp(0.85rem, 3.4vw, 1.15rem); white-space: nowrap; } /* a price never breaks over two lines */
.scalp-tile-zone { grid-column: 1 / -1; }
.scalp-loss { color: #ef5350; }
.scalp-gain { color: var(--color-success); }
.scalp-summary { margin: 0 0 12px; color: var(--color-text-muted); }
.scalp-chart-box { padding: 10px; border: 1px solid var(--color-border); border-radius: 10px; background: #131722; }
.scalp-chart-title { margin: 0 0 6px; color: #f0b90b; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.scalp-chart { height: 320px; }
.scalp-why-title { margin: 16px 0 8px; color: #f0b90b; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; }
.scalp-why { display: grid; gap: 6px; margin: 0 0 10px; padding: 0; list-style: none; }
.scalp-why .scalp-fail { color: var(--color-text-muted); }
.scalp-why .scalp-verdict { margin-top: 4px; font-weight: 700; }
.scalp-rules { margin: 0 0 16px; }
.scalp-rules ol { margin: 8px 0 0; padding-left: 20px; color: var(--color-text-muted); }
@media (max-width: 600px) {
  .scalp-chart { height: 260px; }
  .scalp-card { padding: 12px; }
  .scalp-levels { gap: 6px; }
  .scalp-tile { padding: 8px; }
}
/* News headlines strip (K-095): scrolls slowly from right to left; two copies of the list, the track moves half its width */
.news-strip { position: relative; overflow: hidden; margin: 0 0 12px; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-surface); }
.news-track { display: flex; width: max-content; animation: news-scroll var(--news-seconds, 90s) linear infinite; }
.news-strip:hover .news-track, .news-strip:focus-within .news-track { animation-play-state: paused; }
.news-list { display: flex; flex: none; margin: 0; padding: 0; list-style: none; }
.news-item { display: flex; align-items: baseline; gap: 8px; padding: 10px 0 10px 28px; white-space: nowrap; }
.news-item::before { content: "•"; margin-right: 4px; color: var(--color-red-text); }
.news-market { padding: 0 8px; border: 1px solid var(--color-border); border-radius: 999px; font-size: 0.8rem; color: var(--color-text-muted); }
.news-link { color: var(--color-text); font-weight: 600; text-decoration: none; }
.news-link:hover, .news-link:focus-visible { text-decoration: underline; }
.news-meta { color: var(--color-text-muted); font-size: 0.85rem; }
.news-empty { margin: 0; padding: 10px 14px; color: var(--color-text-muted); }
@keyframes news-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .news-track { animation: none; }
  .news-strip { overflow-x: auto; }
  .news-list[aria-hidden="true"] { display: none; }
}
.trading-ticker { height: 78px; margin: 0 0 12px; overflow: hidden; border: 1px solid var(--color-border); border-radius: 8px; background: #131722; }
.trading-big-price { margin: 8px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.trading-price-now { font-size: 2.5rem; font-weight: 800; line-height: 1.1; }
.trading-currency { color: var(--color-text-muted); font-weight: 600; }
.trading-change { font-size: 1.125rem; font-weight: 700; }
.trading-change.is-up { color: var(--color-success); }
.trading-change.is-down { color: var(--color-red-text); }
.trading-subtabs { margin-top: 12px; }
.trading-intervals { margin: 0 0 8px; }
.trading-intervals .shop-filter { min-width: 3.25rem; }
.trading-intervals .shop-filter[aria-pressed="true"] { color: var(--color-text); box-shadow: inset 0 -2px 0 var(--color-red); }
.trading-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 16px 0; }
.trading-stats > div { padding: 10px 12px; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-surface); }
.trading-stats dt { color: var(--color-text-muted); font-size: 0.875rem; }
.trading-stats dd { margin: 2px 0 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.trading-gauge { position: relative; margin: 0 0 14px; padding-bottom: 12px; }
.trading-gauge-bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.trading-gauge-part { padding: 8px 4px; border-radius: 4px; background: #1f2430; color: var(--color-text-muted); font-size: 0.8125rem; text-align: center; }
.trading-gauge-part[data-zone="0"].is-active, .trading-gauge-part[data-zone="1"].is-active { background: rgba(239, 83, 80, 0.25); color: var(--color-red-text); font-weight: 700; }
.trading-gauge-part[data-zone="2"].is-active { background: #2a2e39; color: var(--color-text); font-weight: 700; }
.trading-gauge-part[data-zone="3"].is-active, .trading-gauge-part[data-zone="4"].is-active { background: rgba(38, 166, 154, 0.25); color: var(--color-success); font-weight: 700; }
.trading-gauge-marker { position: absolute; bottom: 0; width: 0; height: 0; margin-left: -7px; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 9px solid var(--color-text); }
@media (max-width: 599px) {
  .trading-price-now { font-size: 2rem; }
  .trading-icon { width: 44px; height: 44px; }
  .trading-gauge-part { font-size: 0.6875rem; padding: 6px 2px; }
}
