:root {
  color-scheme: light;
  --ink: #182b40;
  --muted: #53667a;
  --line: #dce4ec;
  --bg: #f3f6f9;
  --white: #fff;
  --navy: #14273d;
  --accent: #f6c786;
  --accent-hover: #ffdb9e;
  --radius: 20px;
  font-family: "Inter", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; }
button, input, select { font: inherit; }
button, input, select, summary, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .56; }
a { color: inherit; }
:focus-visible { outline: 3px solid #bf711d; outline-offset: 4px; }
.container { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.topbar { background: var(--white); border-bottom: 1px solid var(--line); }
.top-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; white-space: nowrap; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1rem; letter-spacing: -.02em; }
.brand small { font-size: .72rem; color: var(--muted); margin-top: 3px; }
nav { display: flex; gap: 6px; }
nav button { display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); padding: 11px 14px; font-size: .88rem; white-space: nowrap; }
nav button:hover { background: #f2f5f8; }
nav button[aria-current] { background: #eaf0f6; color: var(--ink); font-weight: 700; }
[data-icon] { display: inline-flex; align-items: center; }
[data-icon] svg { width: 1.2em; height: 1.2em; flex: none; }
h1, h2, h3, p { margin: 0; }
.section-heading { margin: 39px 0 22px; display: flex; justify-content: space-between; align-items: flex-end; gap: 15px; }
h1 { font-size: clamp(1.8rem, 4.1vw, 2.63rem); letter-spacing: -.06em; line-height: 1.12; }
.section-heading p { margin-top: 9px; color: var(--muted); font-size: .95rem; line-height: 1.5; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 42px; padding: 9px 13px; border: 1px solid transparent; border-radius: 9px; font-size: .86rem; font-weight: 680; line-height: 1.18; text-decoration: none; color: var(--ink); text-align: center; }
.button.primary { background: var(--accent); }
.button.primary:hover { background: var(--accent-hover); }
.button.outline { background: var(--white); border-color: var(--line); }
.button.outline:hover { background: #eaf0f6; }
.button.ghost { background: #213a54; border-color: #496078; color: white; }
.button.ghost:hover { background: #2b4867; }
.building-button span:not([data-icon]) { max-width: 200px; overflow-wrap: anywhere; }
.dashboard { display: grid; grid-template-columns: 1.7fr 1fr; gap: 18px; }
.terminal, .next-card { border-radius: var(--radius); }
.terminal { min-height: 305px; background: var(--navy); color: white; padding: 25px 28px; position: relative; isolation: isolate; overflow: hidden; }
.rings { pointer-events: none; position: absolute; right: -81px; bottom: -84px; z-index: -1; width: 390px; fill: none; stroke: #8eabc7; stroke-width: 1; opacity: .18; }
.rings path { stroke-width: 2.5; }
.terminal-top { display: flex; justify-content: space-between; align-items: center; gap: 7px; }
.terminal-top h2 { font-size: .95rem; font-weight: 630; display: flex; align-items: center; gap: 9px; }
.terminal-top h2 span { color: var(--accent); }
.pill { display: inline-flex; gap: 6px; align-items: center; background: #273d55; border-radius: 18px; padding: 6px 9px; font-size: .73rem; white-space: nowrap; }
.pill i { background: #b8c6d5; width: 7px; height: 7px; border-radius: 50%; }
.pill.live { background: #21473f; color: #d1ffeb; }
.pill.live i { background: #96e9c7; }
.clock { font-size: clamp(3rem, 7vw, 5rem); font-weight: 720; font-variant-numeric: tabular-nums; letter-spacing: -.068em; margin-top: 22px; line-height: 1.04; white-space: nowrap; }
.clock span { color: #adc1d7; font-size: .49em; letter-spacing: -.04em; margin-left: .16em; }
.date { color: #c5d3e3; font-size: .85rem; margin-top: 6px; }
.terminal-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 24px; }
.terminal-note { color: #c5d3e3; font-size: .79rem; line-height: 1.45; margin-top: 13px; }
.next-card { min-height: 272px; background: #fff7e9; border: 1px solid #efdfc7; padding: 25px 27px; display: flex; flex-direction: column; }
.next-icon { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; background: #f8e3be; color: #764818; }
.next-icon svg { width: 21px; height: 21px; }
.next-card h2 { margin-top: 15px; color: #654d33; font-size: .85rem; font-weight: 650; }
.next-time { display: block; font-size: 2.75rem; letter-spacing: -.06em; font-weight: 720; color: #2d2a25; margin-top: 7px; font-variant-numeric: tabular-nums; }
.next-summary { display: block; font-size: 1.14rem; font-weight: 690; margin-top: 7px; color: #2d2a25; }
.next-date { color: #715c43; margin-top: 6px; font-size: .81rem; }
.next-footer { color: #715c43; display: flex; align-items: center; gap: 7px; font-size: .77rem; border-top: 1px solid #e9dac3; margin-top: auto; padding-top: 12px; }
#next-event { padding-bottom: 17px; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.today-panel { margin-top: 19px; }
.panel-heading { min-height: 79px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 24px; }
.panel-heading h2 { font-size: 1.08rem; letter-spacing: -.018em; }
.panel-heading p { color: var(--muted); font-size: .81rem; margin-top: 5px; }
.entry { border-top: 1px solid #e7edf2; display: grid; grid-template-columns: 64px 33px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 53px; padding: 9px 24px; }
.entry time { font-variant-numeric: tabular-nums; font-weight: 700; }
.entry .entry-icon { width: 33px; height: 33px; border-radius: 9px; display: grid; place-items: center; background: #edf3f8; color: #3a536b; }
.entry-title { font-size: .91rem; font-weight: 640; }
.entry-detail { color: var(--muted); font-size: .75rem; margin-top: 4px; }
.entry-actions { display: flex; align-items: center; gap: 4px; }
.entry-state { color: var(--muted); font-size: .75rem; text-align: right; }
.entry-state.ok { color: #24664e; }
.icon-button { border: 1px solid transparent; background: transparent; color: var(--ink); border-radius: 8px; min-width: 38px; min-height: 38px; display: inline-grid; place-items: center; padding: 7px; }
.icon-button:hover { background: #edf3f8; }
.empty { border-top: 1px solid #e7edf2; padding: 25px 24px 29px; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.audio-status { background: #e8eff6; border-radius: 9px; color: #283f57; padding: 13px 17px; margin-top: 15px; font-size: .85rem; }
.audio-status.error { background: #fce9e6; color: #8b302c; }
.day-tabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.day-tabs button { color: var(--muted); border: 1px solid transparent; background: transparent; border-radius: 8px; padding: 9px 12px; font-size: .86rem; }
.day-tabs button:hover { background: var(--bg); }
.day-tabs button[aria-pressed="true"] { color: var(--ink); border-color: #d8e1eb; background: #eaf0f6; font-weight: 700; }
.schedule-tools { border-top: 1px solid #e7edf2; padding: 14px 24px; }
.recordings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.recording { display: grid; grid-template-columns: 38px 1fr; align-content: start; align-items: center; gap: 10px; padding: 17px; border: 1px solid var(--line); background: var(--white); border-radius: 13px; }
.recording .entry-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 9px; background: #edf3f8; color: #3a536b; }
.recording h2 { font-size: 1.01rem; }
.recording-audience { grid-column: 1/-1; color: var(--muted); font-size: .79rem; line-height: 1.4; }
.recording-controls { grid-column: 1/-1; display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.recording details { grid-column: 1/-1; color: var(--muted); font-size: .86rem; }
.recording summary { cursor: pointer; padding-block: 6px; }
.recording details p { margin: 9px 0; line-height: 1.5; overflow-wrap: anywhere; }
.recording details p[dir="rtl"] { font-size: 1.09rem; }
.recording-note { grid-column: 1/-1; font-size: .81rem; color: var(--muted); padding: 2px 0 7px; }
.site-footer { padding-block: 24px; display: flex; justify-content: space-between; gap: 10px; font-size: .75rem; color: var(--muted); }
dialog { border: 1px solid var(--line); border-radius: 16px; color: var(--ink); width: min(450px, calc(100% - 26px)); padding: 20px; background: var(--white); }
dialog::backdrop { background: #12243c9c; }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.dialog-heading h2 { font-size: 1.2rem; }
form label:not(.import-button) { display: block; font-size: .88rem; font-weight: 650; margin-bottom: 6px; margin-top: 13px; }
form input:not([type="file"], [type="checkbox"]), form select { width: 100%; min-height: 43px; padding: 8px 10px; border: 1px solid #c6d2de; border-radius: 8px; background: #fff; color: var(--ink); }
.form-hint { color: var(--muted); font-size: .85rem; margin: 9px 0; line-height: 1.5; }
.form-error { color: #9c372c; font-size: .83rem; margin: 10px 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin: 13px 0 0; }
.full-width { width: 100%; margin-top: 12px; }
.import-button { position: relative; overflow: hidden; cursor: pointer; }
.import-button input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.import-button:focus-within { outline: 3px solid #bf711d; outline-offset: 3px; }
.copy-options { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 14px; }
.copy-options label { display: flex !important; gap: 7px; align-items: center; padding: 6px; }
.toast { position: fixed; z-index: 10; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--navy); color: white; padding: 13px 18px; border-radius: 9px; width: max-content; max-width: calc(100% - 30px); box-shadow: 0 7px 25px #12243c33; font-size: .86rem; }
@media (max-width: 720px) {
  .container { width: calc(100% - 32px); }
  .dashboard { grid-template-columns: 1fr; gap: 12px; }
  .terminal { min-height: 260px; padding: 18px; }
  .next-card { min-height: auto; padding: 17px; }
  .clock { font-size: clamp(3rem, 10vw, 4.4rem); }
  .section-heading { margin-top: 25px; }
}
@media (max-width: 490px) {
  .top-inner { flex-wrap: wrap; justify-content: flex-start; gap: 8px; padding-block: 10px 5px; }
  .brand img { width: 35px; height: 35px; }
  nav { flex: 1 0 100%; overflow-x: auto; }
  nav button { flex: 1; padding: 10px 6px; font-size: .8rem; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .section-heading p { font-size: .86rem; }
  .entry { grid-template-columns: 43px 29px minmax(0,1fr) auto; gap: 7px; padding-inline: 12px; }
  .entry-title { font-size: .83rem; }
  .entry time { font-size: .86rem; }
  .entry .entry-icon { width: 28px; height: 28px; }
  .panel-heading, .empty, .schedule-tools { padding-inline: 13px; }
  .panel-heading .button { padding-inline: 8px; font-size: .77rem; }
  .day-tabs { padding: 8px; gap: 2px; }
  .day-tabs button { padding: 8px 5px; flex: 1; font-size: .75rem; }
  .recordings { grid-template-columns: 1fr; }
  .entry-actions .icon-button { min-width: 36px; }
}
.duration { color: var(--muted); font-size: .78rem; align-self: center; }
.schedule-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.schedule-note { padding: 10px 16px; margin: 0 12px 12px; color: #60461e; background: #fff4dc; border-radius: 8px; font-size: .87rem; line-height: 1.5; }
.removed-recordings { margin-top: 16px; padding: 15px 18px; }
.removed-recordings summary { cursor: pointer; font-weight: 670; }
.removed-recordings .form-hint { margin-block: 10px; }
.removed-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 8px; border-bottom: 1px solid var(--line); }
button.danger { color: #91352d; }
#recording-file { width: 100%; }
.recording-unavailable { display: block; color: #91352d; font-size: .74rem; margin-top: 4px; }
.entry-title .entry-detail { display: block; }
.shift-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; margin: 14px 0; padding: 11px; border: 1px solid var(--line); border-radius: 10px; }
.shift-pair legend { color: var(--ink); font-weight: 650; padding-inline: 5px; }

.auth-screen { padding-block: 52px; }
.auth-card { width: min(100%, 420px); margin-inline: auto; padding: clamp(20px, 7vw, 34px); }
.auth-card h1 { margin: 14px 0 0; }
.auth-card > p { margin: 6px 0 18px; }
.auth-card form { margin-top: 24px; }
.auth-card input { width: 100%; }
.auth-card button { margin-top: 12px; }
.account-bar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-block: 12px 18px; }
.account-bar .button { min-height: 35px; font-size: .82rem; }
