:root {
  --orange: #f28c28;
  --orange-ink: #7a3d00;
  --orange-soft: #fff1e3;
  --blue: #2f6fd6;
  --blue-ink: #0e2f66;
  --blue-soft: #e8f0fd;
  --bg: #fafaf8;
  --surface: #ffffff;
  --text: #1b1b1f;
  --muted: #62626b;
  --line: #e4e4e0;
  --radius: 14px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --orange-ink: #ffd2a6;
    --orange-soft: #3a2614;
    --blue-ink: #c9dcff;
    --blue-soft: #16243d;
    --bg: #121214;
    --surface: #1c1c20;
    --text: #f1f1f3;
    --muted: #a3a3ad;
    --line: #2e2e34;
  }
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Hebrew", "Noto Sans Arabic", sans-serif;
  max-width: 560px;
  margin: 0 auto;
  padding: 16px;
}

.sr-only, .offscreen {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.brand { font-size: 1.6rem; margin: 0; display: flex; align-items: center; gap: 4px; letter-spacing: -0.01em; }
.dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.dot-orange { background: var(--orange); }
.dot-blue { background: var(--blue); margin-inline-end: 6px; }

.lang { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.globe { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.lang select {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px;
}

.tagline { color: var(--muted); margin: 8px 0 16px; }

.now-label {
  margin: 0 0 16px; padding: 16px; border-radius: var(--radius);
  font-size: 1.35rem; font-weight: 700; text-align: center;
}
.now-label.is-orange { background: var(--orange); color: #2b1400; }
.now-label.is-blue { background: var(--blue); color: #ffffff; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; position: relative; margin-bottom: 16px; }

.btn {
  font: inherit; font-weight: 600; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 16px; min-height: 44px; cursor: pointer;
}
.btn:hover { border-color: var(--muted); }
.btn:focus-visible, .lang select:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.btn-quiet { background: transparent; }
.btn[hidden] { display: none; }

.toast { color: var(--muted); font-weight: 600; opacity: 0; transition: opacity .2s; }
.toast.show { opacity: 1; }

.saturdays {
  list-style: none; margin: 0; padding: 4px;
  max-height: 60vh; overflow-y: auto; overscroll-behavior: contain;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  position: relative;
}

.sat {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 12px; border-radius: 10px;
}
.sat + .sat { margin-top: 2px; }
.sat.is-past { opacity: .55; }
.sat.is-current.is-orange { background: var(--orange-soft); box-shadow: inset 0 0 0 2px var(--orange); }
.sat.is-current.is-blue { background: var(--blue-soft); box-shadow: inset 0 0 0 2px var(--blue); }

.sat-info { display: flex; flex-direction: column; min-width: 0; }
.sat-tag { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.sat.is-current .sat-tag { color: var(--text); }
.sat-date { font-size: 1.05rem; }

.copy-line {
  flex: none; width: 44px; height: 44px; margin-inline-start: auto;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--muted);
  border: 1px solid var(--line); border-radius: 50%; cursor: pointer;
}
.copy-line:hover { color: var(--text); border-color: var(--muted); }
.copy-line:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.copy-line svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.copy-line .tick { display: none; }
.copy-line.is-done { color: #1d7a3a; border-color: #1d7a3a; }
.copy-line.is-done rect, .copy-line.is-done path:not(.tick) { display: none; }
.copy-line.is-done .tick { display: inline; }
.copy-line.is-failed { color: #b3261e; border-color: #b3261e; }
@media (prefers-color-scheme: dark) { .copy-line.is-done { color: #6fd08c; border-color: #6fd08c; } }
.badge {
  flex: none; min-width: 108px; text-align: center;
  padding: 10px 14px; border-radius: 999px; font-weight: 700; font-size: 1.05rem;
}
.is-orange .badge { background: var(--orange); color: #2b1400; }
.is-blue .badge { background: var(--blue); color: #ffffff; }

.privacy { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; }
.privacy h2 { font-size: 1rem; color: var(--text); margin: 0 0 6px; }
.privacy p { margin: 0; }
.privacy .feedback { margin-top: 12px; }
.feedback a { color: var(--text); font-weight: 600; }
.feedback-hint { font-size: .85rem; }

.qr-dialog {
  border: none; border-radius: var(--radius); padding: 20px;
  background: var(--surface); color: var(--text);
  width: min(92vw, 380px);
}
.qr-dialog::backdrop { background: rgba(0, 0, 0, .5); }
.qr-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.qr-inner canvas { width: 100%; max-width: 300px; height: auto; border-radius: 8px; background: #fff; }
.qr-url { margin: 0; color: var(--muted); font-size: .9rem; word-break: break-all; text-align: center; }
.qr-inner .actions { justify-content: center; margin: 0; }
