:root {
  color-scheme: dark;
  --bg: #0b0e0b;
  --card: #151a15;
  --card-soft: #111511;
  --line: rgba(255, 255, 255, 0.11);
  --muted: #a9b0a8;
  --text: #f7f8f4;
  --live: #dfff38;
  --live-ink: #172000;
  --warning: #ffbf47;
  --danger: #ff6b61;
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; overflow-x: hidden; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.skip-link { position: fixed; z-index: 50; top: 10px; left: 10px; padding: 10px 14px; border-radius: 10px; background: var(--text); color: #111; transform: translateY(-160%); }
.skip-link:focus { transform: none; }

.event-header { position: relative; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; padding: 11px 16px; border-bottom: 1px solid var(--line); background: rgba(11, 14, 11, 0.94); }
.event-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.event-logo { width: 42px; height: 42px; padding: 4px; border: 1px solid rgba(255,255,255,.2); border-radius: 10px; object-fit: contain; flex: 0 0 auto; background: #eef1eb; box-shadow: 0 2px 12px rgba(0,0,0,.22); }
.event-identity div { min-width: 0; }
.event-identity strong, .event-identity span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event-identity strong { font-size: 14px; letter-spacing: -0.01em; }
.event-identity span { margin-top: 2px; color: var(--muted); font-size: 12px; }
.day-switcher { display: grid; grid-template-columns: 32px minmax(88px,auto) 32px; align-items: center; gap: 5px; min-width: 0; }
.day-switcher button { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: #151a15; font-size: 23px; line-height: 1; cursor: pointer; }
.day-switcher button:disabled { opacity: .24; cursor: default; }
.day-switcher div { min-width: 0; text-align: center; }
.day-switcher span, .day-switcher strong { display: block; white-space: nowrap; }
.day-switcher span { color: var(--live); font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.day-switcher strong { margin-top: 2px; color: #cbd1c9; font-size: 11px; }
.event-status-tools { display: flex; align-items: center; justify-content: flex-end; gap: 12px; min-width: 0; }
.connection-state { display: flex; align-items: center; gap: 7px; flex: 0 1 auto; min-width: 0; color: var(--muted); font-size: 12px; }
.notification-toggle { min-height: 32px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 10px; display: inline-flex; align-items: center; gap: 6px; color: #aab2aa; background: #121612; font: inherit; font-size: 11px; font-weight: 750; cursor: pointer; }
.notification-toggle:hover { color: var(--text); border-color: #596a42; }
.notification-toggle svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.notification-toggle.is-active { color: var(--live); border-color: rgba(91,255,122,.35); background: rgba(91,255,122,.07); }
.notification-toggle.is-blocked { color: #d0a09c; }
.notification-toggle.is-unsupported { color: #d7c58a; border-color: rgba(215,197,138,.35); }
.notification-toggle[hidden] { display: none; }
.notification-toggle:disabled { opacity: .55; cursor: wait; }
.notification-feedback { position: fixed; z-index: 40; top: 76px; right: 14px; width: min(390px,calc(100% - 28px)); padding: 11px 13px; border: 1px solid rgba(88,225,108,.35); border-radius: 12px; color: #dfffe4; background: #142218f2; box-shadow: 0 14px 38px rgba(0,0,0,.4); font-size: 12px; line-height: 1.4; }
.notification-feedback.is-warning { border-color: rgba(255,191,71,.42); color: #ffe4ae; background: #2a2112f2; }
.notification-feedback.is-neutral { border-color: var(--line); color: #d8ded6; background: #171c17f2; }
.notification-feedback[hidden] { display: none; }
.connection-state > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.connection-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 4px rgba(223, 255, 56, 0.1); }
.connection-state.is-offline .connection-dot { background: var(--danger); box-shadow: none; }

.program-board { position: relative; isolation: isolate; width: min(100%, 1080px); min-height: calc(100svh - 68px); margin: 0 auto; overflow: hidden; padding: 24px 16px 28px; }
.ambient { position: absolute; z-index: -1; width: 520px; height: 520px; top: -300px; right: -310px; border-radius: 50%; opacity: .25; background: radial-gradient(circle, rgba(223,255,56,.86), rgba(223,255,56,0) 68%); animation: ambient-breathe 5s ease-in-out infinite alternate; }

.board-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.board-heading p { margin: 0; color: var(--live); font-size: 12px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.board-heading h1 { margin: 5px 0 0; font-size: clamp(27px, 8vw, 46px); line-height: 1; letter-spacing: -.045em; }
.board-clock { text-align: right; }
.board-clock span, .board-clock time { display: block; }
.board-clock span { color: var(--muted); font-size: 12px; }
.board-clock time { margin-top: 2px; font-size: 18px; font-weight: 850; font-variant-numeric: tabular-nums; }

.operation-note { display: flex; align-items: center; gap: 10px; margin-top: 20px; padding: 11px 13px; border: 1px solid rgba(255,191,71,.16); border-radius: 14px; color: #ffe2aa; background: rgba(255,191,71,.08); }
.operation-note.is-on-time { border-color: rgba(88,225,108,.28); color: #a8f3b2; background: rgba(88,225,108,.08); }
.operation-note.is-delayed { border-color: rgba(255,191,71,.26); color: #ffe2aa; background: rgba(255,191,71,.08); }
.operation-note.is-critical { border-color: rgba(255,90,82,.38); color: #ffaaa5; background: rgba(255,74,66,.11); }
.operation-note svg { width: 19px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.operation-note strong, .operation-note span { display: block; }
.operation-note strong { font-size: 13px; }
.operation-note span { margin-top: 2px; color: var(--muted); font-size: 12px; }

.program-list { display: grid; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.program-card { --state-color: var(--live); position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card-soft); transition: border-color 280ms ease, background 280ms ease, transform 280ms ease; }
.program-card.tone-on-time { --state-color: #58e16c; }
.program-card.tone-delayed { --state-color: #ffbf47; }
.program-card.tone-critical { --state-color: #ff5a52; }
.program-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: transparent; }
.program-card[data-status="done"] { opacity: .58; }
.program-card[data-status="next"] { background: #171c17; }
.program-card[data-status="awaiting"] { border-color: var(--state-color); background: linear-gradient(125deg, color-mix(in srgb, var(--state-color) 8%, #151a15), #151a15 65%); }
.program-card[data-status="awaiting"] .card-state { color: var(--state-color); }
.program-card[data-status="unconfirmed"] { opacity: .45; }
.program-card[data-status="live"] { border-color: var(--state-color); background: linear-gradient(125deg, rgba(255,255,255,.055), rgba(21,26,21,.96) 58%); box-shadow: 0 14px 42px rgba(0,0,0,.28), 0 0 24px color-mix(in srgb, var(--state-color) 12%, transparent); animation: live-card-breathe 2.8s ease-in-out infinite; }
.program-card[data-status="live"]::before { z-index: 2; background: var(--state-color); animation: live-edge 1.7s ease-in-out infinite; }
.program-card[data-status="live"]::after { content: ""; position: absolute; z-index: 3; inset: 0; padding: 1px; border-radius: inherit; pointer-events: none; background: conic-gradient(from var(--border-angle), transparent 0 68%, var(--state-color) 78%, transparent 89%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: border-sweep 3.4s linear infinite; }
.program-card-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 54px minmax(0,1fr) auto; gap: 10px; align-items: center; min-height: 68px; padding: 11px 12px; }
.program-card[data-status="live"] .program-card-inner::before { content: ""; position: absolute; z-index: 0; inset: 0; opacity: .45; pointer-events: none; background: linear-gradient(105deg, transparent 22%, color-mix(in srgb, var(--state-color) 9%, transparent) 47%, transparent 72%); transform: translateX(-110%); animation: stage-light 4.6s ease-in-out infinite; }
.program-card[data-status="live"] .program-card-inner > * { position: relative; z-index: 1; }
.card-time { align-self: start; padding-top: 2px; color: #d2d7d0; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.card-copy { min-width: 0; }
.kind-label { display: block; margin: 0 0 3px; color: #91a18c; font-size: 8px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.card-copy h2 { margin: 0; overflow-wrap: anywhere; font-size: 16px; line-height: 1.12; letter-spacing: -.02em; }
.card-copy > span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.card-state { justify-self: end; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.live-state-stack { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.now-marker { display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 6px 11px; border-radius: 999px; color: #10140f; background: var(--state-color); font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; animation: marker-breathe 1.5s ease-in-out infinite; }
.now-marker b { font-weight: 950; }
.elapsed-clock { display: flex; align-items: baseline; justify-content: center; color: #c5cdc3; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: center; }
.elapsed-clock b { color: var(--text); font-size: 17px; line-height: 1; letter-spacing: .035em; text-shadow: 0 0 14px color-mix(in srgb, var(--state-color) 24%, transparent); }
.live-equalizer { display: inline-flex; align-items: flex-end; gap: 2px; width: 16px; height: 13px; }
.live-equalizer i { display: block; width: 2px; min-height: 3px; border-radius: 2px; background: currentColor; transform-origin: center bottom; animation: equalizer .62s ease-in-out infinite alternate; }
.live-equalizer i:nth-child(1) { height: 45%; animation-delay: -.18s; }
.live-equalizer i:nth-child(2) { height: 100%; animation-delay: -.48s; }
.live-equalizer i:nth-child(3) { height: 68%; animation-delay: -.28s; }
.live-equalizer i:nth-child(4) { height: 35%; animation-delay: -.58s; }
.next-marker { color: var(--text); }

.live-details { display: none; grid-column: 1 / -1; margin-top: 2px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.1); }
.program-card[data-status="live"] .program-card-inner { min-height: 166px; align-content: start; padding: 15px 14px; }
.program-card[data-status="live"] .card-time { color: var(--state-color); font-size: 14px; }
.program-card[data-status="live"] .card-copy h2 { font-size: clamp(24px, 7vw, 37px); }
.program-card[data-status="live"] .card-copy > span { color: #ced4cc; }
.program-card[data-status="live"] .live-details { display: block; }
.timing-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 13px; color: #d5dbd3; font-size: 12px; }
.timing-summary strong { color: var(--warning); font-size: 13px; }
.progress-track { height: 5px; margin-top: 13px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.12); }
.progress-track span { display: block; width: 100%; height: 100%; background: var(--state-color); transform: scaleX(var(--progress, 0)); transform-origin: left; transition: transform 500ms linear; }
.progress-labels { display: flex; justify-content: space-between; gap: 12px; margin-top: 7px; color: var(--muted); font-size: 11px; }
.progress-labels span { flex: 1 1 0; min-width: 0; }
.progress-labels span:last-child { text-align: right; }
.progress-labels b { color: var(--text); font-variant-numeric: tabular-nums; }

.board-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.panel-signature { display: flex; align-items: center; gap: 7px; min-width: 0; color: #7f877e; font-size: 10px; white-space: nowrap; opacity: .72; }
.ditado-signature { width: 76px; height: 22px; object-fit: contain; filter: brightness(1.7) contrast(1.08); mix-blend-mode: normal; opacity: 1; }
.ligadao-signature { width: 49px; height: 17px; object-fit: contain; }
.share-link { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 5px 2px; border: 0; color: #cbd1c9; background: transparent; font-size: 13px; font-weight: 750; cursor: pointer; }
.share-link:hover { color: var(--text); }
.share-link svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.share-dialog { width: min(92vw, 500px); padding: 0; border: 1px solid var(--line); border-radius: 22px; color: var(--text); background: #121612; box-shadow: 0 28px 90px rgba(0,0,0,.62); }
.share-dialog::backdrop { background: rgba(4,6,4,.76); backdrop-filter: blur(5px); }
.share-sheet { padding: 20px; }
.share-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.share-heading span { color: var(--live); font-size: 11px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.share-heading h2 { margin: 5px 0 0; font-size: 22px; letter-spacing: -.03em; }
.dialog-close { width: 36px; height: 36px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: transparent; font-size: 24px; line-height: 1; cursor: pointer; }
.share-option { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 12px; align-items: center; width: 100%; min-height: 74px; margin-top: 8px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 15px; color: var(--text); background: #181d18; text-align: left; cursor: pointer; }
.share-option:hover { border-color: rgba(223,255,56,.42); background: #1c221c; }
.share-option > span:nth-child(2) { min-width: 0; }
.share-option strong, .share-option small { display: block; }
.share-option strong { font-size: 14px; }
.share-option small { margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.share-option > i { color: var(--muted); font-size: 26px; font-style: normal; }
.share-option-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: #1d1300; background: var(--warning); font-size: 10px; font-weight: 900; }
.share-option-icon.is-live { background: var(--live); }
.share-option-icon.is-live i { width: 9px; height: 9px; border-radius: 50%; background: #142000; box-shadow: 0 0 0 6px rgba(20,32,0,.14); }
.share-feedback { min-height: 17px; margin: 12px 0 0; color: var(--live); font-size: 12px; text-align: center; }

.offline-banner { position: fixed; z-index: 30; left: 12px; right: 12px; bottom: 12px; padding: 12px 16px; border-radius: 12px; color: #2a1b00; background: var(--warning); font-size: 13px; font-weight: 750; text-align: center; }

@media (min-width: 720px) {
  .event-header { position: sticky; top: 0; padding: 13px 28px; }
  .program-board { padding: 38px 28px 32px; }
  .operation-note { max-width: 620px; }
  .program-list { gap: 10px; margin-top: 22px; }
  .program-card-inner { grid-template-columns: 84px minmax(0,1fr) 150px; min-height: 76px; padding: 13px 18px; }
  .program-card[data-status="live"] .program-card-inner { min-height: 182px; padding: 18px 20px; }
  .program-card[data-status="live"] .live-details { grid-column: 2 / -1; }
  .card-time { font-size: 14px; }
  .card-copy h2 { font-size: 18px; }
}

/* Modo painel: composição fixa para TV e monitores em formato paisagem. */
@media (min-width: 900px) {
  html, body { width: 100%; height: 100%; overflow: hidden; }
  .event-header { position: relative; height: 68px; min-height: 68px; padding: 9px clamp(28px, 4vw, 72px); }
  .event-logo { width: 40px; height: 40px; }
  .program-board {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: clamp(10px, 1.35vh, 16px);
    width: 100%;
    max-width: none;
    height: calc(100vh - 68px);
    min-height: 0;
    padding: clamp(18px, 2.5vh, 30px) clamp(34px, 5vw, 92px) 34px;
  }
  .board-heading h1 { font-size: clamp(32px, 3.1vw, 52px); }
  .operation-note { width: min(100%, 720px); max-width: none; margin: 0; padding: clamp(8px, 1.1vh, 12px) 14px; }
  .program-list {
    display: flex;
    flex-direction: column;
    gap: clamp(6px, 1vh, 11px);
    min-height: 0;
    margin: 0;
    padding: 8px 10px 12px 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #657067 #1a201b;
  }
  .program-list::-webkit-scrollbar { width: 8px; }
  .program-list::-webkit-scrollbar-track { border-radius: 99px; background: #1a201b; }
  .program-list::-webkit-scrollbar-thumb { border: 2px solid #1a201b; border-radius: 99px; background: #657067; }
  .program-card { flex: 0 0 auto; min-height: clamp(48px, 8vh, 76px); }
  .program-card[data-status="live"] { flex: 0 0 auto; min-height: 0; }
  .program-card-inner { height: 100%; min-height: 0; padding-top: clamp(8px, 1.2vh, 16px); padding-bottom: clamp(8px, 1.2vh, 16px); }
  .program-card[data-status="live"] .program-card-inner { height: auto; min-height: clamp(142px, 18vh, 166px); padding-top: clamp(8px, 1.2vh, 16px); padding-bottom: clamp(8px, 1.2vh, 16px); }
  .program-card[data-status="live"] .live-details { align-self: end; margin-top: 0; padding-top: clamp(7px, 1vh, 12px); }
  .timing-summary { font-size: clamp(11px, 1.15vh, 13px); }
  .progress-track { margin-top: clamp(7px, 1vh, 12px); }
  .progress-labels { margin-top: clamp(4px, .7vh, 7px); }
  .board-actions { display: flex; min-height: 26px; margin: 0; }
  .share-link { min-height: 26px; padding: 0; font-size: 12px; }
}

@media (min-width: 900px) and (max-height: 760px) {
  .event-header { height: 60px; min-height: 60px; }
  .event-logo { width: 36px; height: 36px; }
  .program-board { height: calc(100vh - 60px); padding-top: 12px; gap: 8px; }
  .board-heading p { font-size: 11px; }
  .board-heading h1 { margin-top: 2px; font-size: clamp(28px, 3vw, 40px); }
  .board-clock span { display: none; }
  .operation-note span { display: none; }
  .program-list { gap: 6px; }
  .program-card[data-status="live"] .program-card-inner { min-height: 134px; }
  .program-card[data-status="live"] .card-copy h2 { font-size: clamp(23px, 3vw, 33px); }
  .program-card[data-status="live"] .live-details { padding-top: 6px; }
  .timing-summary { gap: 4px 10px; }
}

@media (min-width: 900px) and (min-height: 621px) and (max-height: 820px) {
  .program-card:not([data-status="live"]) .program-card-inner { padding-top: 6px; padding-bottom: 6px; }
  .program-card:not([data-status="live"]) .card-copy > span { display: none; }
}

@media (min-width: 900px) and (max-height: 620px) {
  .event-header { height: 50px; min-height: 50px; padding-top: 5px; padding-bottom: 5px; }
  .event-logo { width: 32px; height: 32px; }
  .program-board { height: calc(100vh - 50px); padding: 7px clamp(24px, 4vw, 64px) 7px; gap: 5px; }
  .board-heading p { display: none; }
  .board-heading h1 { margin: 0; font-size: clamp(24px, 2.5vw, 34px); }
  .board-clock time { font-size: 16px; }
  .operation-note { min-height: 28px; padding: 5px 10px; }
  .operation-note svg { width: 15px; }
  .operation-note strong { font-size: 11px; }
  .program-list { gap: 4px; }
  .program-card { flex-basis: 31px; }
  .program-card-inner { min-height: 0; height: 100%; padding: 3px 12px; }
  .program-card:not([data-status="live"]) .card-copy > span { display: none; }
  .program-card:not([data-status="live"]) .card-copy h2 { font-size: 14px; }
  .program-card:not([data-status="live"]) .kind-label { margin-bottom: 1px; font-size: 7px; }
  .program-card[data-status="live"] { flex: 0 0 auto; min-height: 0; }
  .program-card[data-status="live"] .program-card-inner { height: auto; min-height: 126px; padding: 6px 14px; }
  .program-card[data-status="live"] .card-copy h2 { font-size: clamp(20px, 2.3vw, 27px); }
  .program-card[data-status="live"] .card-copy > span { margin-top: 2px; font-size: 10px; }
  .program-card[data-status="live"] .live-details { padding-top: 4px; }
  .timing-summary { gap: 2px 8px; font-size: 9px; }
  .timing-summary strong { font-size: 9px; }
  .progress-track { margin-top: 4px; }
  .progress-labels { margin-top: 2px; font-size: 8px; }
  .board-actions { min-height: 22px; }
  .panel-signature { font-size: 8px; }
  .share-link { min-height: 22px; font-size: 11px; }
}

@media (max-width: 430px) {
  .event-header { gap: 6px; padding-left: 10px; padding-right: 10px; }
  .event-identity { gap: 6px; }
  .event-identity span { display: none; }
  .event-identity strong { max-width: 92px; font-size: 12px; }
  .day-switcher { grid-template-columns: 27px minmax(73px,auto) 27px; gap: 3px; }
  .day-switcher button { width: 27px; height: 29px; border-radius: 8px; font-size: 20px; }
  .day-switcher strong { font-size: 9px; }
  .day-switcher span { font-size: 8px; }
  .connection-state { max-width: 26px; }
  .connection-state > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .event-status-tools { gap: 5px; }
  .notification-toggle { position: relative; z-index: 2; width: 44px; min-width: 44px; min-height: 44px; padding: 8px; justify-content: center; touch-action: manipulation; }
  .notification-toggle svg { width: 20px; height: 20px; }
  .notification-toggle > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .program-card-inner { grid-template-columns: 48px minmax(0,1fr) auto; gap: 8px; }
  .program-card[data-status="live"] .program-card-inner { grid-template-columns: 48px minmax(0,1fr); }
  .program-card[data-status="live"] .card-state { grid-column: 1 / -1; grid-row: 1; justify-self: start; }
  .program-card[data-status="live"] .live-state-stack { align-items: flex-start; }
  .program-card[data-status="live"] .card-time { grid-column: 1; grid-row: 2; }
  .program-card[data-status="live"] .card-copy { grid-column: 2; grid-row: 2; }
  .program-card[data-status="live"] .live-details { grid-column: 1 / -1; grid-row: 3; }
}

@media (max-width: 899px) {
  .notification-feedback { top: 66px; right: 10px; width: calc(100% - 20px); }
  .share-dialog { width: 100%; max-width: none; margin: auto 0 0; border-width: 1px 0 0; border-radius: 22px 22px 0 0; }
  .share-sheet { padding-bottom: max(20px, env(safe-area-inset-bottom)); }
}

@media (min-width: 720px) and (max-width: 899px) and (max-height: 619px) {
  .program-board { padding-top: 14px; padding-bottom: 18px; }
  .operation-note { margin-top: 12px; }
  .program-list { gap: 6px; margin-top: 12px; }
  .program-card-inner { min-height: 52px; padding: 7px 14px; }
  .program-card:not([data-status="live"]) .card-copy > span { display: none; }
  .program-card[data-status="live"] .program-card-inner { min-height: 134px; padding: 9px 14px; }
  .program-card[data-status="live"] .card-copy h2 { font-size: clamp(24px, 3.2vw, 29px); }
  .program-card[data-status="live"] .live-details { padding-top: 7px; }
  .progress-track { margin-top: 8px; }
  .progress-labels { margin-top: 4px; }
}

@media (max-width: 899px) and (min-height: 620px) {
  body.mobile-fit { height: 100svh; overflow: hidden; }
  .mobile-fit .event-header { height: 58px; min-height: 58px; padding-top: 8px; padding-bottom: 8px; }
  .mobile-fit .event-logo { width: 36px; height: 36px; }
  .mobile-fit .program-board { display: grid; grid-template-rows: auto auto minmax(0,1fr) auto; gap: 8px; height: calc(100svh - 58px); min-height: 0; padding-top: 12px; padding-bottom: 10px; }
  .mobile-fit .board-heading h1 { margin-top: 2px; font-size: 27px; }
  .mobile-fit .board-heading p { font-size: 10px; }
  .mobile-fit .board-clock span { display: none; }
  .mobile-fit .operation-note { margin: 0; padding: 8px 11px; }
  .mobile-fit .operation-note span { display: none; }
  .mobile-fit .program-list { display: flex; flex-direction: column; gap: 5px; min-height: 0; margin: 0; }
  .mobile-fit .program-card { flex: 1 1 44px; min-height: 36px; }
  .mobile-fit .program-card[data-status="live"] { flex: 0 0 auto; min-height: 0; }
  .mobile-fit .program-card-inner { height: 100%; min-height: 0; padding: 5px 10px; }
  .mobile-fit .program-card:not([data-status="live"]) .card-copy > span { display: none; }
  .mobile-fit .program-card:not([data-status="live"]) .kind-label { margin-bottom: 1px; font-size: 7px; }
  .mobile-fit .program-card[data-status="live"] .program-card-inner { height: auto; min-height: 136px; padding: 7px 10px; }
  .mobile-fit .program-card[data-status="live"] .live-details { align-self: end; padding-top: 6px; }
  .mobile-fit .program-card[data-status="live"] .card-copy h2 { font-size: clamp(21px, 6.5vw, 29px); }
  .mobile-fit .card-copy > span { margin-top: 1px; font-size: 10px; }
  .mobile-fit .card-state { font-size: 9px; }
  .mobile-fit .now-marker { min-height: 26px; padding: 4px 8px; font-size: 8px; }
  .mobile-fit .live-state-stack { gap: 4px; }
  .mobile-fit .elapsed-clock { padding-right: 0; }
  .mobile-fit .elapsed-clock b { font-size: 14px; }
  .mobile-fit .live-equalizer { width: 14px; height: 11px; }
  .mobile-fit .timing-summary { gap: 3px 8px; font-size: 10px; }
  .mobile-fit .timing-summary strong { font-size: 10px; }
  .mobile-fit .progress-track { margin-top: 6px; }
  .mobile-fit .progress-labels { margin-top: 3px; font-size: 9px; }
  .mobile-fit .board-actions { min-height: 32px; margin: 0; }
  .mobile-fit .panel-signature { gap: 5px; font-size: 8px; }
  .mobile-fit .ditado-signature { width: 59px; height: 18px; }
  .mobile-fit .ligadao-signature { width: 39px; height: 14px; }
  .mobile-fit .share-link { margin-left: auto; min-height: 30px; font-size: 12px; }
}

@media (max-height: 720px) and (max-width: 719px) {
  .program-board { padding-top: 18px; }
  .operation-note { margin-top: 14px; }
  .program-list { gap: 6px; margin-top: 12px; }
  .program-card-inner { min-height: 60px; padding-top: 9px; padding-bottom: 9px; }
  .program-card[data-status="live"] .program-card-inner { min-height: 148px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

@keyframes live-pulse { 70% { box-shadow: 0 0 0 7px rgba(23,32,0,0); } 100% { box-shadow: 0 0 0 0 rgba(23,32,0,0); } }
@keyframes marker-breathe { 50% { filter: brightness(1.25); box-shadow: 0 0 26px color-mix(in srgb, var(--state-color) 48%, transparent); } }
@keyframes equalizer { from { transform: scaleY(.35); } to { transform: scaleY(1); } }
@keyframes live-edge { 50% { box-shadow: 0 0 18px 3px var(--state-color); filter: brightness(1.3); } }
@keyframes live-card-breathe { 50% { box-shadow: 0 16px 46px rgba(0,0,0,.34), 0 0 34px color-mix(in srgb, var(--state-color) 19%, transparent); } }
@keyframes stage-light { 0%, 22% { transform: translateX(-110%); opacity: 0; } 45% { opacity: .7; } 72%, 100% { transform: translateX(110%); opacity: 0; } }
@keyframes border-sweep { to { --border-angle: 360deg; } }
@keyframes ambient-breathe { to { opacity: .35; transform: scale(1.08); } }
@keyframes spin { to { transform: rotate(360deg); } }

@property --border-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

body.event-selection-mode{height:auto;min-height:100svh;overflow:auto}.event-selection-mode>.event-header,.event-selection-mode>.program-board,.event-selection-mode>.offline-banner{display:none!important}.event-picker{width:min(980px,calc(100% - 32px));min-height:100svh;margin:auto;padding:28px 0;display:flex;flex-direction:column}.event-picker[hidden]{display:none}.event-picker>header{display:flex;align-items:center;justify-content:space-between;padding-bottom:24px;border-bottom:1px solid var(--line)}.event-picker>header img{width:122px;height:38px;object-fit:contain}.event-picker>header span{color:var(--muted);font-size:11px;font-weight:800;letter-spacing:.11em;text-transform:uppercase}.event-picker>section{padding:clamp(45px,8vh,82px) 0}.event-picker>section>p{margin:0 0 8px;color:var(--accent);font-size:10px;font-weight:900;letter-spacing:.13em;text-transform:uppercase}.event-picker>section>h1{max-width:700px;margin:0;font-size:clamp(34px,6vw,58px);line-height:1;letter-spacing:-.045em}.event-picker>section>span{display:block;margin-top:16px;color:var(--muted);font-size:14px}.event-picker-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:34px}.event-picker-card{display:grid;grid-template-columns:72px minmax(0,1fr) auto;align-items:center;gap:15px;min-height:104px;padding:15px;border:1px solid var(--line);border-radius:17px;background:linear-gradient(145deg,#181e18,#121612);color:var(--text);text-decoration:none;transition:.18s}.event-picker-card:hover{border-color:#596a42;transform:translateY(-2px)}.event-picker-logo{width:72px;height:72px;border:1px solid #303830;border-radius:14px;background:#0e120e;display:grid;place-items:center;overflow:hidden}.event-picker-logo img{width:100%;height:100%;padding:6px;object-fit:contain}.event-picker-logo span{font-size:8px;color:#667064;text-transform:uppercase}.event-picker-copy{min-width:0}.event-picker-copy strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:18px}.event-picker-copy span{display:block;margin-top:5px;color:var(--muted);font-size:11px}.event-picker-card>b{width:34px;height:34px;border-radius:50%;background:var(--accent);color:#11160a;display:grid;place-items:center;font-size:20px}.event-picker>footer{margin-top:auto;padding-top:22px;border-top:1px solid var(--line);display:flex;align-items:center;gap:10px;color:#69736b;font-size:9px;letter-spacing:.08em;text-transform:uppercase}.event-picker>footer img{width:76px;height:28px;object-fit:contain;opacity:.7}@media(max-width:680px){.event-picker{width:calc(100% - 24px);padding-top:18px}.event-picker>header img{width:104px}.event-picker>section{padding:38px 0}.event-picker>section>h1{font-size:36px}.event-picker-grid{grid-template-columns:1fr;margin-top:26px}.event-picker-card{grid-template-columns:60px minmax(0,1fr) auto;min-height:88px;padding:12px}.event-picker-logo{width:60px;height:60px}.event-picker-copy strong{font-size:16px}}
.overnight-label{display:block;margin-top:3px;color:#d8ad58;font-size:8px;font-style:normal;font-weight:800;letter-spacing:.05em;text-transform:uppercase}
@media(max-width:899px){.mobile-fit .overnight-label{margin-top:1px;font-size:6px}}
