:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: rgba(15, 15, 20, 0.88);
  --panel-strong: #101014;
  --ink: #ffffff;
  --muted: #b9bbc8;
  --line: rgba(255, 255, 255, 0.13);
  --yellow: #fff200;
  --cyan: #08e7f2;
  --pink: #ff174f;
  --green: #77ff63;
  --brand: #08e7f2;
  --ok: #77ff63;
  --warn: #fff200;
  --danger: #ff426d;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 15% 8%, rgba(255, 242, 0, 0.18), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(8, 231, 242, 0.2), transparent 26%),
    radial-gradient(circle at 70% 70%, rgba(255, 23, 79, 0.14), transparent 30%),
    linear-gradient(180deg, #050505 0%, #07070a 48%, #0d0d12 100%);
  color: var(--ink);
  font-family: Segoe UI, Roboto, Arial, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 75%);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 30px;
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  font-size: 24px;
  letter-spacing: 0;
}

h3 {
  font-size: 17px;
}

.topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 28px;
  background: rgba(0, 0, 0, 0.76);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--yellow), var(--cyan));
  color: #050505;
  font-weight: 900;
  box-shadow: 0 0 34px rgba(8, 231, 242, 0.34);
}

.eyebrow,
.section-kicker {
  display: inline-block;
  margin-bottom: 5px;
  color: var(--yellow);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.topbar p {
  margin-top: 6px;
  color: var(--muted);
  max-width: 780px;
}

.status {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.status span,
.live-pill {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.status span:first-child,
.live-pill {
  border-color: rgba(255, 23, 79, 0.45);
  background: rgba(255, 23, 79, 0.14);
  color: #ffd5de;
}

.install-button {
  min-height: 38px;
  border-color: transparent;
  background: linear-gradient(135deg, var(--yellow), var(--cyan));
  color: #050505;
  font-weight: 800;
}

.hero-strip {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(140px, 180px));
  gap: 14px;
  padding: 18px 28px 0;
}

.hero-copy,
.meter-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-copy {
  position: relative;
  overflow: hidden;
  min-height: 170px;
  padding: 22px;
}

.hero-copy::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: min(36vw, 300px);
  height: 88px;
  opacity: 0.75;
  background:
    linear-gradient(90deg, transparent, rgba(255, 242, 0, 0.75), transparent) 0 50% / 100% 3px no-repeat,
    repeating-linear-gradient(90deg, rgba(8, 231, 242, 0.7) 0 5px, transparent 5px 15px);
  clip-path: polygon(0 62%, 8% 38%, 15% 72%, 23% 24%, 31% 68%, 38% 44%, 45% 64%, 52% 30%, 60% 72%, 68% 22%, 75% 64%, 84% 40%, 92% 70%, 100% 50%, 100% 100%, 0 100%);
}

.hero-copy h2 {
  margin-top: 16px;
  font-size: 38px;
}

.hero-copy p {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  max-width: 660px;
  color: var(--muted);
  line-height: 1.5;
}

.meter-card {
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 170px;
  padding: 18px;
}

.meter-card span {
  color: var(--muted);
}

.meter-card strong {
  font-size: 42px;
  color: var(--yellow);
}

.meter-card.accent strong {
  color: var(--cyan);
}

.layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
  gap: 18px;
  padding: 18px 28px 28px;
}

.panel {
  padding: 16px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.days {
  display: grid;
  gap: 12px;
}

.day {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: linear-gradient(90deg, rgba(255, 242, 0, 0.13), rgba(8, 231, 242, 0.12));
}

.day-head h3 {
  color: white;
}

.slots {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.slot {
  display: grid;
  grid-template-columns: 28px minmax(92px, 110px) minmax(92px, 110px) minmax(150px, 1fr) 82px;
  gap: 8px;
  align-items: center;
}

input,
select,
button {
  min-height: 42px;
  max-width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font: inherit;
}

input[type="checkbox"] {
  accent-color: var(--yellow);
}

select option {
  background: #101014;
  color: white;
}

button {
  cursor: pointer;
  font-weight: 700;
}

button:hover {
  border-color: rgba(8, 231, 242, 0.6);
  box-shadow: 0 0 0 3px rgba(8, 231, 242, 0.1);
}

.primary,
#saveSchedule {
  background: linear-gradient(135deg, var(--yellow), var(--cyan));
  color: #050505;
  border-color: transparent;
}

.slot-delete {
  color: #ffd5de;
}

.side-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-self: start;
  position: sticky;
  top: 12px;
}

.app-card {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(255, 242, 0, 0.22);
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(255, 242, 0, 0.13), rgba(8, 231, 242, 0.08));
}

.app-card span {
  color: var(--muted);
  line-height: 1.35;
}

.side-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.toggle-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toggle-line input {
  min-height: auto;
}

.notice {
  border-left: 4px solid var(--yellow);
  border-radius: 8px;
  background: rgba(255, 242, 0, 0.09);
  padding: 10px 12px;
  color: #fff9b8;
  line-height: 1.38;
}

.media-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.media-grid strong {
  color: var(--cyan);
  font-size: 20px;
}

code {
  color: white;
  font-family: Consolas, monospace;
}

dl {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 6px 10px;
  margin: 0;
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  overflow-wrap: anywhere;
}

pre {
  min-height: 130px;
  max-height: 260px;
  overflow: auto;
  border: 1px solid rgba(8, 231, 242, 0.16);
  border-radius: 8px;
  background: #050507;
  color: #dffbff;
  padding: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
  .hero-strip {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .hero-copy {
    grid-column: 1 / -1;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .brand-lockup {
    align-items: flex-start;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }

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

  .hero-strip {
    grid-template-columns: 1fr;
    padding: 12px 12px 0;
  }

  .hero-copy,
  .meter-card {
    min-height: auto;
  }

  .hero-copy h2 {
    font-size: 30px;
  }

  .layout {
    padding: 12px;
    gap: 12px;
  }

  .panel {
    padding: 12px;
  }

  .slot {
    grid-template-columns: 34px minmax(0, 1fr) minmax(0, 1fr);
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
  }

  .slot select,
  .slot button {
    grid-column: 2 / -1;
  }

  .panel-head button,
  .side-panel > button,
  .install-button {
    width: 100%;
  }

  dl {
    grid-template-columns: 90px 1fr;
  }
}

@media (max-width: 430px) {
  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 21px;
  }

  .status span {
    width: 100%;
  }

  .slot {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .slot-start,
  .slot-end,
  .slot select,
  .slot button {
    grid-column: 2 / -1;
  }

  .media-grid,
  dl {
    grid-template-columns: 1fr;
  }
}
