:root {
  --bg: #06101d;
  --bg-strong: #040a14;
  --surface: rgba(5, 14, 28, 0.84);
  --surface-soft: rgba(8, 20, 39, 0.88);
  --line: rgba(255, 191, 0, 0.18);
  --line-strong: rgba(255, 191, 0, 0.34);
  --text: #f6f1e7;
  --muted: rgba(239, 232, 217, 0.72);
  --brand: #ffbf00;
  --brand-strong: #0056a6;
  --success: #0056a6;
  --danger: #ffbf00;
  --primary-blue: #0056a6;
  --primary-blue-soft: rgba(0, 84, 166, 0.24);
  --primary-yellow: #ffbf00;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg);
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(130deg, #040b14 0%, #061426 26%, #08203d 58%, #0a2d57 100%);
  z-index: -3;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(0, 84, 166, 0.28), transparent 24%),
    radial-gradient(circle at 76% 14%, rgba(255, 191, 0, 0.12), transparent 14%),
    linear-gradient(180deg, rgba(4, 9, 18, 0.22) 0%, rgba(4, 9, 18, 0.72) 100%);
  z-index: -2;
}

.background-overlay {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 84, 166, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 84, 166, 0.05) 1px, transparent 1px);
  background-size: 108px 108px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.62), transparent 94%);
  z-index: -1;
}

.app-shell {
  min-height: 100vh;
  padding: 18px;
}

.topbar,
.dashboard-grid,
.sponsors-section {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 18px;
}

.brand-pane {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  max-width: 880px;
}

.brand-mark {
  width: 74px;
  height: 74px;
  border-radius: 22px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 191, 0, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(135deg, rgba(10, 18, 36, 0.2), rgba(10, 18, 36, 0.72)),
    url("acicg-100anos.jpeg") center center / cover no-repeat;
}

.eyebrow,
.section-kicker {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand);
}

.topbar h1,
.feature-header h2,
.section-heading h2,
.settings-header h2,
.panel-card h2 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.topbar h1 {
  font-size: clamp(2rem, 4.2vw, 3.3rem);
}

.subtitle,
.panel-copy,
.status-copy,
.settings-copy {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.98rem;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 191, 0, 0.16);
  text-decoration: none;
}

.hero-pill,
.mini-tag,
.status-badge,
.audio-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(8, 19, 37, 0.72);
  color: var(--brand);
  font-size: 0.9rem;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.status-badge.running {
  color: var(--primary-yellow);
  border-color: rgba(255, 191, 0, 0.28);
  background: rgba(255, 191, 0, 0.1);
}

.status-badge.finished,
.audio-badge.error {
  color: var(--primary-yellow);
  border-color: rgba(255, 191, 0, 0.32);
  background: rgba(255, 191, 0, 0.12);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(350px, 0.9fr);
  gap: 18px;
  align-items: stretch;
}

.timer-stage,
.panel-card,
.feature-card,
.settings-content,
.sponsors-section {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(7, 16, 31, 0.88) 0%, rgba(5, 12, 24, 0.95) 100%);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.timer-stage {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
  min-height: 620px;
  padding: 20px;
  border-radius: 28px;
  overflow: hidden;
  position: relative;
}

.timer-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(0, 84, 166, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 191, 0, 0.04), transparent 36%);
  pointer-events: none;
}

.timer-stage-body {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  align-items: center;
  min-height: 0;
}

.timer-stage.finished {
  border-color: rgba(255, 191, 0, 0.38);
  box-shadow: 0 0 0 1px rgba(255, 191, 0, 0.12), 0 32px 95px rgba(255, 191, 0, 0.12);
}

.timer-stage-head,
.feature-header,
.panel-title,
.volume-row,
.settings-header,
.settings-actions,
.sponsor-item-header,
.section-heading,
.status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.timer-stage-head {
  position: relative;
  z-index: 1;
  align-items: flex-start;
}

.status-line {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 10px;
}

.stage-mode-box {
  min-width: 210px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 191, 0, 0.06));
  text-align: right;
}

.timer-meta-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.8rem;
}

.stage-mode-box strong {
  display: block;
  font-size: 1.02rem;
}

.stage-mode-box small {
  display: block;
  margin-top: 6px;
  color: rgba(239, 230, 210, 0.58);
  line-height: 1.45;
}

.display-shell {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 260px;
}

.display-center {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 16px;
}

.round-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 191, 0, 0.3);
  background: rgba(7, 16, 31, 0.78);
  color: #fff4db;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.24);
  cursor: pointer;
}

.round-indicator.active {
  background: linear-gradient(135deg, rgba(255, 191, 0, 0.18) 0%, rgba(0, 84, 166, 0.12) 100%);
  color: var(--primary-yellow);
}

.round-indicator.manual {
  border-color: rgba(0, 84, 166, 0.34);
  box-shadow: 0 10px 26px rgba(0, 84, 166, 0.18);
}

.display-kicker {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(248, 242, 230, 0.72);
}

.display-ring {
  position: absolute;
  width: min(52vw, 560px);
  height: min(52vw, 560px);
  max-width: 560px;
  max-height: 560px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(0, 84, 166, 0.16) 0%, rgba(0, 84, 166, 0.08) 38%, rgba(0, 84, 166, 0) 62%),
    radial-gradient(circle, rgba(0, 84, 166, 0.2) 0, rgba(0, 84, 166, 0.02) 54%, rgba(0, 84, 166, 0) 70%);
  filter: blur(8px);
}

.time-display {
  position: relative;
  z-index: 1;
  text-align: center;
  font-size: clamp(5.4rem, 12vw, 10rem);
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: -0.08em;
  color: #eef4fb;
  text-shadow:
    0 0 54px rgba(0, 84, 166, 0.2),
    0 16px 48px rgba(0, 0, 0, 0.42);
}

.display-foot {
  display: flex;
  justify-content: center;
}

.live-clock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 191, 0, 0.24);
  background: rgba(10, 19, 37, 0.78);
  color: var(--primary-yellow);
  font-size: 0.94rem;
  font-weight: 700;
}

.command-deck {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(255, 191, 0, 0.14);
  background: linear-gradient(180deg, rgba(10, 20, 39, 0.88) 0%, rgba(7, 14, 28, 0.94) 100%);
}

.timer-progress-card,
.history-panel {
  position: relative;
  z-index: 1;
  border-radius: 22px;
  border: 1px solid rgba(255, 191, 0, 0.14);
  background: linear-gradient(180deg, rgba(10, 20, 39, 0.88) 0%, rgba(7, 14, 28, 0.94) 100%);
}

.timer-progress-card {
  padding: 14px 16px;
}

.timer-progress-head,
.history-header,
.history-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.timer-progress-head span {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.timer-progress-head strong {
  font-size: 1rem;
  color: #fff4db;
}

.timer-progress-track {
  width: 100%;
  height: 14px;
  margin-top: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.4);
}

.timer-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0056a6 0%, #0b6bc5 72%, #ffbf00 100%);
  box-shadow: 0 0 18px rgba(0, 84, 166, 0.3);
  transition: width 0.24s ease;
}

.hero-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hero-actions.compact-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero-actions.dual-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 500px;
}

.button-hidden {
  display: none !important;
}

.accent-button {
  background: linear-gradient(135deg, #ffbf00 0%, #ffd04b 100%);
  color: #18130c;
  font-weight: 800;
}

.accent-soft-button {
  background: linear-gradient(135deg, #0056a6 0%, #0c6ec9 100%);
  color: #f2f6fb;
  font-weight: 800;
}

.danger-button {
  background: linear-gradient(135deg, #ffbf00 0%, #ffd45f 100%);
  color: #1b1304;
  font-weight: 800;
}

.danger-outline-button {
  border-color: rgba(255, 191, 0, 0.45);
  color: var(--primary-yellow);
}

.command-row,
.quick-adjustments,
.time-inputs,
.preset-row,
.actions,
.settings-grid,
.sponsor-preview {
  display: grid;
  gap: 12px;
}

.quick-adjustments,
.preset-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

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

.time-inputs label,
.settings-field {
  display: grid;
  gap: 8px;
}

.time-inputs span,
.settings-field span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 191, 0, 0.18);
  background: rgba(8, 18, 35, 0.72);
  color: var(--text);
  outline: 0;
}

input:focus,
select:focus {
  border-color: rgba(255, 191, 0, 0.45);
  box-shadow: 0 0 0 3px rgba(255, 191, 0, 0.12);
}

button {
  min-height: 50px;
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

button:hover {
  transform: translateY(-1px);
}

.primary-button {
  background: linear-gradient(135deg, #0056a6 0%, #0c6ec9 100%);
  color: #eef4fb;
  font-weight: 800;
  box-shadow: 0 18px 38px rgba(0, 84, 166, 0.28);
}

.secondary-button,
.quick-adjustments button,
.preset-button,
.ghost-button {
  color: var(--text);
  border-color: rgba(255, 191, 0, 0.16);
  background: linear-gradient(180deg, rgba(13, 25, 48, 0.95) 0%, rgba(8, 16, 30, 0.95) 100%);
}

.wide-button,
.settings-actions .primary-button {
  width: 100%;
}

.right-rail {
  display: grid;
  gap: 22px;
}

.left-rail {
  display: none;
}

.feature-card,
.panel-card,
.sponsors-section {
  border-radius: 24px;
  padding: 18px;
}

.feature-card {
  display: grid;
  gap: 18px;
}

.feature-header {
  align-items: flex-start;
}

.feature-header h2,
.section-heading h2,
.panel-card h2 {
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
}

.featured-media {
  position: relative;
  min-height: 260px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(135deg, rgba(255, 191, 0, 0.14), rgba(0, 84, 166, 0.18)),
    rgba(6, 12, 24, 0.96);
}

.featured-media.is-buffering::after,
.featured-media.has-error::after {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 191, 0, 0.22);
  background: rgba(6, 12, 24, 0.82);
  color: var(--primary-yellow);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  z-index: 2;
}

.featured-media.is-buffering::after {
  content: "Carregando video...";
}

.featured-media.has-error::after {
  content: "Falha ao carregar a midia";
}

.featured-media img,
.featured-media video,
.featured-media-element {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.featured-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(8, 18, 35, 0.08), rgba(8, 18, 35, 0.84)),
    url("acicg-100anos.jpeg") center center / cover no-repeat;
}

.featured-placeholder strong {
  font-size: 1.22rem;
  margin-bottom: 8px;
}

.featured-placeholder p {
  margin: 0;
  color: rgba(248, 242, 230, 0.84);
}

.compact-panel {
  align-content: start;
}

.sponsors-section {
  margin-top: 18px;
}

.history-panel {
  padding: 18px;
}

.history-header {
  align-items: flex-start;
}

.history-header h2 {
  margin: 0;
  font-size: clamp(1.22rem, 2vw, 1.6rem);
}

.history-table-wrap {
  margin-top: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 191, 0, 0.12);
  overflow: hidden;
  background: rgba(8, 15, 30, 0.85);
}

.history-table {
  width: 100%;
  border-collapse: collapse;
}

.history-table th,
.history-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255, 191, 0, 0.08);
  text-align: left;
  font-size: 0.92rem;
}

.history-table th {
  color: rgba(239, 230, 210, 0.64);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.02);
}

.history-table tbody tr:last-child td {
  border-bottom: 0;
}

.history-table tbody tr.active-row {
  background: rgba(0, 84, 166, 0.12);
}

.history-duration {
  color: #78b6f0;
  font-weight: 700;
}

.history-active {
  color: var(--primary-yellow);
  font-weight: 700;
}

.history-empty {
  text-align: center;
  color: var(--muted);
  padding: 24px 12px;
}

.history-remove {
  min-height: 38px;
  min-width: 38px;
  padding: 0;
  border-radius: 999px;
  border-color: rgba(255, 255, 255, 0.08);
  font-size: 1.1rem;
}

.history-actions {
  margin-top: 18px;
}

.history-actions .ghost-button {
  min-height: 52px;
}

.sponsor-preview {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.sponsor-banner,
.sponsor-editor {
  border-radius: 18px;
  border: 1px solid rgba(255, 191, 0, 0.14);
  background: linear-gradient(180deg, rgba(11, 22, 43, 0.95) 0%, rgba(7, 14, 28, 0.96) 100%);
  overflow: hidden;
}

.sponsor-banner {
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.sponsor-banner:hover,
.sponsor-banner.active {
  transform: translateY(-2px);
  border-color: rgba(255, 191, 0, 0.34);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
}

.sponsor-banner-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, rgba(255, 191, 0, 0.12), rgba(0, 84, 166, 0.08)),
    rgba(5, 11, 22, 0.98);
}

.sponsor-banner-media img,
.sponsor-banner-media video,
.sponsor-media {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  background: #03080f;
}

.sponsor-banner-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: rgba(248, 242, 230, 0.88);
  background:
    linear-gradient(180deg, rgba(8, 18, 35, 0.16), rgba(8, 18, 35, 0.78)),
    url("acicg-100anos.jpeg") center center / cover no-repeat;
}

.sponsor-banner-copy {
  padding: 14px;
}

.sponsor-banner-copy h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.sponsor-banner-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.settings-dialog {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(4, 9, 18, 0.78);
  backdrop-filter: blur(10px);
  z-index: 20;
}

.settings-dialog.hidden {
  display: none;
}

.settings-content {
  width: min(1180px, calc(100vw - 24px));
  border-radius: 24px;
  padding: 22px;
}

.settings-grid {
  margin-top: 22px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-sidecard {
  margin-top: 22px;
}

.sponsor-editor {
  padding: 18px;
}

.editor-meta {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.remove-logo-button {
  min-height: 44px;
  padding: 8px 12px;
}

.settings-actions {
  margin-top: 22px;
}

@media (max-width: 1240px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .sponsor-preview,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .timer-stage {
    order: 1;
  }

  .left-rail,
  .right-rail {
    order: 2;
    position: static;
    height: auto;
    min-height: 0;
  }

  .left-rail {
    display: grid;
  }

  .sponsors-section {
    display: none;
  }

  .timer-stage {
    min-height: auto;
  }
}

@media (min-width: 1180px) and (orientation: landscape) {
  .app-shell {
    min-height: 100dvh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 8px;
    padding: 10px 10px 12px;
  }

  .topbar {
    min-height: 52px;
    margin-bottom: 0;
    padding-top: 2px;
    align-items: center;
    justify-content: center;
    position: relative;
  }

  .brand-pane {
    align-items: center;
    text-align: center;
    max-width: none;
  }

  .brand-mark,
  .eyebrow,
  .subtitle,
  .hero-pill {
    display: none;
  }

  .topbar h1 {
    font-size: clamp(1.65rem, 2vw, 2.25rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
  }

  .topbar-actions {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    gap: 8px;
  }

  .ghost-button {
    min-height: 42px;
    padding: 8px 14px;
  }

  .dashboard-grid {
    grid-template-columns: 500px minmax(0, 1fr) 500px;
    gap: 14px;
    align-items: start;
    min-height: 0;
    height: calc(100dvh - 86px);
  }

  .timer-stage {
    width: 100%;
    max-width: none;
    min-height: 0;
    height: 100%;
    margin: 0;
    gap: 10px;
    padding: 8px 16px 14px;
    border-color: rgba(0, 84, 166, 0.22);
    background: linear-gradient(180deg, rgba(3, 7, 14, 0.96) 0%, rgba(2, 6, 12, 0.98) 100%);
    box-shadow:
      0 18px 48px rgba(0, 0, 0, 0.24),
      inset 0 0 0 1px rgba(255, 191, 0, 0.06);
  }

  .timer-stage-body {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .display-shell {
    min-height: 560px;
    align-self: center;
  }

  .display-ring {
    width: min(52vw, 760px);
    height: min(52vw, 760px);
    max-width: 760px;
    max-height: 760px;
    border: 12px solid var(--primary-blue);
    background: transparent;
    filter: none;
    box-shadow:
      0 0 0 6px rgba(255, 191, 0, 0.06),
      0 0 0 1px rgba(0, 84, 166, 0.12),
      0 0 26px rgba(0, 84, 166, 0.14),
      inset 0 0 40px rgba(255, 191, 0, 0.03);
  }

  .time-display {
    font-size: clamp(7rem, 9.4vw, 10rem);
    color: var(--primary-blue);
    text-shadow:
      0 0 24px rgba(255, 191, 0, 0.16),
      0 0 38px rgba(0, 84, 166, 0.14);
  }

  .display-kicker {
    font-size: 0.92rem;
    color: rgba(255, 191, 0, 0.95);
  }

  .display-center {
    gap: 20px;
  }

  .round-indicator {
    min-height: 46px;
    padding: 0 22px;
    font-size: 1.02rem;
  }

  .live-clock {
    background: transparent;
    border: 0;
    color: var(--primary-yellow);
    padding: 0;
    min-height: 0;
    font-size: 1.08rem;
  }

  .command-deck {
    max-width: 920px;
    width: 100%;
    margin: 0 auto;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .quick-adjustments,
  .preset-row,
  .time-inputs {
    gap: 10px;
  }

  .quick-adjustments button,
  .preset-button,
  .time-inputs input,
  .time-inputs label {
    min-height: 48px;
  }

  .timer-progress-card {
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
    padding: 8px 0 0;
    border: 0;
    background: transparent;
  }

  .timer-progress-head {
    justify-content: center;
    gap: 10px;
  }

  .timer-progress-head span {
    display: none;
  }

  .timer-progress-track {
    height: 16px;
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.08);
  }

  .hero-actions {
    max-width: 920px;
    width: 100%;
    margin: 4px auto 0;
    gap: 12px;
  }

  .hero-actions button {
    min-height: 56px;
    font-weight: 800;
  }

  .primary-button {
    background: linear-gradient(135deg, #0056a6 0%, #0b6bc5 100%);
    color: #eef4fb;
    box-shadow: 0 14px 28px rgba(0, 84, 166, 0.18);
  }

  .accent-button {
    background: linear-gradient(135deg, #ffbf00 0%, #ffd04d 100%);
  }

  .accent-soft-button {
    background: linear-gradient(135deg, #0056a6 0%, #0b6bc5 100%);
  }

  .danger-button {
    background: linear-gradient(135deg, #ffbf00 0%, #ffd75f 100%);
  }

  .history-panel {
    max-width: 920px;
    width: 100%;
    margin: 2px auto 0;
    padding: 8px 0 0;
    border: 0;
    background: transparent;
  }

  .history-header {
    padding: 0;
  }

  .history-header .section-kicker {
    margin-bottom: 4px;
    color: rgba(255, 248, 237, 0.78);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.82rem;
  }

  .history-header h2,
  .history-header .mini-tag {
    display: none;
  }

  .history-table-wrap {
    margin-top: 10px;
    border-radius: 16px;
    border-color: rgba(0, 84, 166, 0.22);
    background: rgba(7, 12, 24, 0.96);
  }

  .history-table th,
  .history-table td {
    padding: 12px 10px;
    font-size: 0.88rem;
  }

  .history-actions {
    margin-top: 12px;
    gap: 12px;
  }

  .history-actions .ghost-button {
    min-height: 48px;
  }

  .left-rail,
  .right-rail {
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 8px;
    position: sticky;
    top: 0;
    height: 100%;
    min-height: 0;
    align-self: stretch;
  }

  .left-rail {
    display: grid;
  }

  .feature-card,
  .panel-card {
    padding: 14px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(6, 12, 24, 0.96) 0%, rgba(4, 9, 18, 0.98) 100%);
    box-shadow: none;
  }

  .feature-header {
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 191, 0, 0.14);
  }

  .feature-header h2 {
    font-size: 1.12rem;
    line-height: 1.2;
  }

  .panel-copy {
    font-size: 0.92rem;
    line-height: 1.55;
  }

  .featured-media {
    min-height: 100%;
    height: 100%;
    border-radius: 14px;
    background:
      linear-gradient(180deg, rgba(0, 84, 166, 0.12), rgba(255, 191, 0, 0.08)),
      rgba(4, 10, 20, 0.98);
  }

  .feature-card {
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 0;
    height: 100%;
  }

  .sponsor-rail .feature-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    gap: 10px;
    padding: 12px 12px 10px;
    overflow: hidden;
  }

  .featured-media-vertical {
    min-height: 0;
    padding: 8px;
  }

  .featured-media-vertical video,
  .featured-media-vertical img,
  .featured-media-vertical .featured-media-element {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: #03080f;
  }

  .sponsor-rail .feature-header {
    flex: 0 0 auto;
    gap: 8px;
    padding-bottom: 6px;
    margin-bottom: 0;
  }

  .sponsor-rail .panel-copy {
    min-height: 0;
    margin-top: 4px;
    font-size: 0.84rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .sponsor-rail .mini-tag {
    min-width: 74px;
    min-height: 34px;
    padding: 0 12px;
    font-size: 0.84rem;
  }

  .sponsor-rail .feature-header h2 {
    font-size: 0.98rem;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .sponsor-rail .featured-media,
  .sponsor-rail .featured-media-vertical {
    flex: 1 1 auto;
    display: grid;
    place-items: center;
    min-height: 0;
    height: auto;
    padding: 8px;
    background:
      linear-gradient(180deg, rgba(0, 84, 166, 0.08), rgba(255, 191, 0, 0.04)),
      #03080f;
  }

  .sponsor-rail .featured-media-vertical video,
  .sponsor-rail .featured-media-vertical img,
  .sponsor-rail .featured-media-vertical .featured-media-element {
    object-fit: contain;
    object-position: center;
  }

  .featured-placeholder {
    padding: 24px 20px;
  }

  .featured-placeholder strong {
    font-size: 1.28rem;
    margin-bottom: 10px;
  }

  .featured-placeholder p {
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .compact-panel {
    align-content: start;
    padding-top: 12px;
  }

  .panel-title {
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 191, 0, 0.12);
  }

  .panel-card h2 {
    font-size: 1.04rem;
  }

  .sponsors-section {
    display: none;
  }

  .status-line {
    justify-content: center;
    margin-top: 4px;
  }

  .status-copy {
    max-width: 520px;
  }

  .history-panel {
    padding: 8px 0 0;
  }

  .history-table th,
  .history-table td {
    padding-top: 11px;
    padding-bottom: 11px;
  }
}

@media (max-width: 860px) {
  .app-shell {
    padding: 12px;
  }

  .topbar,
  .brand-pane,
  .feature-header,
  .section-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .brand-pane {
    gap: 14px;
  }

  .topbar-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .topbar h1 {
    font-size: clamp(1.65rem, 8vw, 2.3rem);
    line-height: 1.08;
  }

  .quick-adjustments,
  .preset-row,
  .actions,
  .time-inputs,
  .hero-actions,
  .history-actions {
    grid-template-columns: 1fr 1fr;
  }

  .display-ring {
    width: min(88vw, 420px);
    height: min(88vw, 420px);
  }

  .time-display {
    font-size: clamp(4.2rem, 17vw, 6.6rem);
  }

  .timer-stage {
    padding: 16px 14px 18px;
  }

  .display-center {
    gap: 14px;
  }

  .hero-actions {
    gap: 10px;
  }

  .left-rail,
  .right-rail {
    gap: 12px;
  }

  .feature-card {
    padding: 14px;
  }

  .featured-media,
  .featured-media-vertical {
    min-height: 280px;
  }

  .history-panel {
    padding: 14px 0 0;
  }
}

@media (max-width: 560px) {
  .quick-adjustments,
  .preset-row,
  .actions,
  .time-inputs,
  .hero-actions,
  .history-actions {
    grid-template-columns: 1fr;
  }

  .timer-stage,
  .panel-card,
  .feature-card,
  .sponsors-section,
  .settings-content {
    border-radius: 24px;
  }

  .brand-mark {
    width: 60px;
    height: 60px;
  }

  .brand-pane {
    gap: 10px;
  }

  .topbar-actions .ghost-button,
  .topbar-actions .link-button {
    width: 100%;
  }

  .time-display {
    font-size: clamp(3.6rem, 18vw, 5rem);
  }

  .display-shell {
    min-height: 260px;
  }

  .round-indicator {
    min-height: 40px;
    padding: 0 16px;
    font-size: 0.9rem;
  }

  .display-kicker {
    font-size: 0.74rem;
    letter-spacing: 0.18em;
  }

  .featured-media,
  .featured-media-vertical {
    min-height: 240px;
  }

  .history-table-wrap {
    overflow-x: auto;
  }

  .history-table {
    min-width: 720px;
  }

  .sponsor-banner-copy p,
  .panel-copy,
  .subtitle,
  .status-copy {
    font-size: 0.92rem;
  }
}
