  /* Committed single-theme design: this page IS the night of Tisha B'Av,
     turning to dawn as the building rises. */
  :root {
    --night-0: #06080f;
    --night-1: #0c1120;
    --stone:   #d3c39d;
    --gold:    #d9a84e;
    --gold-hi: #f4d488;
    --ink:     #ece4d2;
    --ink-dim: #a99f8a;
    --ember:   #b0563a;
  }
  html, body { background: var(--night-0); }
  body {
    margin: 0;
    color: var(--ink);
    font-family: Georgia, 'Times New Roman', 'SBL Hebrew', 'David', serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
  }
  .wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 20px 60px;
    display: flex;
    flex-direction: column;
    gap: 22px;
  }
  .lang-toggle {
    display: flex;
    justify-content: center;
    gap: 6px;
  }
  .lang-toggle button {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 12.5px;
    letter-spacing: 0.04em;
    background: none;
    color: #5d6780;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 6px 14px;
    cursor: pointer;
  }
  .lang-toggle button:hover { color: var(--ink-dim); }
  .lang-toggle button.active {
    color: var(--gold-hi);
    border-color: #3a3552;
    background: rgba(217, 168, 78, 0.06);
  }
  header { text-align: center; display: flex; flex-direction: column; gap: 10px; }
  .eyebrow {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 12px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
  }
  h1 {
    margin: 0;
    font-size: clamp(26px, 4.6vw, 44px);
    font-weight: 500;
    line-height: 1.15;
    text-wrap: balance;
    letter-spacing: 0.01em;
  }
  h1 .heb { color: var(--gold-hi); }
  .sub {
    margin: 0 auto;
    max-width: 58ch;
    color: var(--ink-dim);
    font-size: clamp(15px, 1.8vw, 17px);
    line-height: 1.6;
  }
  .scene {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 30px 80px -30px rgba(0,0,0,0.9);
    border: 1px solid #1c2338;
    background: var(--night-1);
    touch-action: pan-y;
  }
  .scene canvas { display: block; width: 100%; height: 100%; cursor: grab; }
  .scene canvas:active { cursor: grabbing; }
  .hint {
    position: absolute; right: 12px; bottom: 10px;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 11px; letter-spacing: 0.08em;
    color: rgba(236,228,210,0.45);
    pointer-events: none;
  }
  .complete-banner {
    position: absolute; inset: 0;
    display: none;
    align-items: center; justify-content: flex-start;
    flex-direction: column; gap: 8px;
    text-align: center;
    padding-top: 26px;
    pointer-events: none;
  }
  .complete-banner > div { width: 100%; }
  .complete-banner.show { display: flex; }
  .complete-banner .big {
    font-size: clamp(24px, 4vw, 40px);
    color: var(--gold-hi);
    text-shadow: 0 0 30px rgba(217,168,78,0.6);
  }
  .status-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    direction: ltr; /* numbers and times always read left-to-right */
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 13.5px;
    letter-spacing: 0.03em;
    color: var(--ink-dim);
    margin-top: -8px;
  }
  .live { display: inline-flex; align-items: center; gap: 7px; }
  .live-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #5dd97a;
    box-shadow: 0 0 8px rgba(93, 217, 122, 0.8);
    animation: livepulse 2s ease-in-out infinite;
  }
  @keyframes livepulse { 50% { opacity: 0.4; } }
  .clock { font-variant-numeric: tabular-nums; }
  .fast-card {
    width: min(460px, 100%);
    margin: 4px auto 0;
    border: 1px solid #26304e;
    border-radius: 10px;
    background:
      radial-gradient(130% 90% at 50% 0%, rgba(217, 168, 78, 0.09), transparent 55%),
      linear-gradient(180deg, #0f1526, #0b101d);
    box-shadow: 0 18px 50px -24px rgba(0, 0, 0, 0.85);
    padding: 22px 20px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
  }
  .fast-card[hidden] { display: none; }
  .fast-title {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    justify-content: center;
  }
  .fast-title .heb-title {
    color: var(--gold-hi);
    font-size: 19px;
    letter-spacing: 0.04em;
    direction: rtl;
  }
  .fast-title .rule {
    flex: 1;
    max-width: 90px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(217, 168, 78, 0.45));
  }
  .fast-title .rule:last-child {
    background: linear-gradient(90deg, rgba(217, 168, 78, 0.45), transparent);
  }
  .fast-sub {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 11px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--ink-dim);
    margin-top: -6px;
  }
  .fast-timer {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 2px 0;
    direction: ltr; /* hours : minutes : seconds stays left-to-right in RTL */
  }
  .fast-timer .seg { min-width: 62px; }
  .fast-timer .num {
    font-size: 42px;
    line-height: 1;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
  }
  .fast-timer .lab {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 9.5px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #5d6780;
    margin-top: 7px;
  }
  .fast-timer .colon {
    font-size: 34px;
    line-height: 1.2;
    color: #3c4667;
  }
  .fast-over {
    font-size: 21px;
    color: var(--gold-hi);
    line-height: 1.5;
  }
  .fast-over span { font-size: 15px; color: var(--ink-dim); }
  .fast-over[hidden], .fast-timer[hidden] { display: none; }
  .fast-meta {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 12.5px;
    letter-spacing: 0.02em;
    color: var(--ink-dim);
  }
  .fast-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 2px;
  }
  #fastSelect {
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
    font-size: 14px;
    background: rgba(22, 29, 49, 0.7)
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23a99f8a' fill='none' stroke-width='1.4'/%3E%3C/svg%3E")
      no-repeat right 12px center;
    color: var(--ink);
    border: 1px solid #2a3352;
    border-radius: 999px;
    padding: 9px 32px 9px 16px;
    max-width: 100%;
    cursor: pointer;
  }
  #fastSelect:focus-visible { outline: 1px solid var(--gold); outline-offset: 2px; }
  .loc-btn {
    background: none;
    border: none;
    color: #5d6780;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
  }
  .loc-btn:hover { color: var(--ink-dim); }
  .panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
  }
  .count-line {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }
  .count {
    display: inline-block;
    font-size: clamp(34px, 5vw, 54px);
    color: var(--gold-hi);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
  }
  .count.bump { animation: countbump 0.6s ease; }
  @keyframes countbump {
    25% { transform: scale(1.1); text-shadow: 0 0 24px rgba(244, 212, 136, 0.75); }
  }
  @media (prefers-reduced-motion: reduce) {
    .count.bump { animation: none; }
  }
  .count-of { color: var(--ink-dim); font-size: clamp(14px, 1.8vw, 17px); }
  .place-btn {
    font-family: inherit;
    font-size: clamp(17px, 2.2vw, 21px);
    color: #14100a;
    background: linear-gradient(180deg, var(--gold-hi), var(--gold));
    border: none; border-radius: 4px;
    padding: 15px 34px; cursor: pointer;
    letter-spacing: 0.02em;
    box-shadow: 0 6px 24px -6px rgba(217,168,78,0.55);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }
  .place-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 30px -6px rgba(217,168,78,0.7); }
  .place-btn:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
  .place-btn:disabled {
    cursor: default; background: #232b42; color: var(--ink-dim);
    box-shadow: none; transform: none;
  }
  .placed-msg {
    display: none; color: var(--gold);
    font-size: clamp(15px, 1.9vw, 18px); line-height: 1.5;
  }
  .placed-msg.show { display: block; }
  .placed-msg .num { color: var(--gold-hi); font-variant-numeric: tabular-nums; }
  .verse {
    text-align: center; color: var(--ink-dim);
    font-size: clamp(16px, 2vw, 19px); line-height: 1.7; margin-top: 8px;
  }
  .verse .heb { color: var(--ink); font-size: 1.15em; direction: rtl; display: block; }
  .verse .cite {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
    display: block; margin-top: 6px;
  }
  .proto-note {
    text-align: center;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 12.5px; line-height: 1.6;
    color: #756e5c;
    max-width: 64ch; margin: 0 auto;
  }
  details.demo {
    margin: 4px auto 0;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 12.5px; color: var(--ink-dim); text-align: center;
  }
  details.demo summary { cursor: pointer; color: #5d6780; }
  details.demo .row { display: flex; gap: 8px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
  details.demo button {
    font-family: inherit; font-size: 12.5px;
    background: #161d31; color: var(--ink-dim);
    border: 1px solid #273052; border-radius: 4px;
    padding: 7px 14px; cursor: pointer;
  }
  details.demo button:hover { color: var(--ink); border-color: #3a466f; }
  .nogl {
    padding: 60px 20px; text-align: center; color: var(--ink-dim);
  }
  @media (prefers-reduced-motion: reduce) {
    .place-btn { transition: none; }
    .live-dot { animation: none; }
  }

  /* mobile-first: most visitors arrive on phones */
  @media (max-width: 640px) {
    .wrap { padding: 18px 12px 44px; gap: 18px; }
    .sub { font-size: 14.5px; }
    .place-btn {
      width: 100%;
      max-width: 430px;
      padding: 17px 16px;
      font-size: 18px;
    }
    .count { font-size: 40px; }
    .status-row { flex-wrap: wrap; gap: 8px 22px; }
    .hint { font-size: 10px; right: 8px; bottom: 7px; }
    .placed-msg, .verse { font-size: 15px; }
    details.demo button { padding: 10px 16px; }
  }
