body {
  min-width: 320px;
  background:
    linear-gradient(90deg, transparent 0, transparent calc(50% - 590px), rgba(240, 236, 228, 0.025) calc(50% - 590px), rgba(240, 236, 228, 0.025) calc(50% - 589px), transparent calc(50% - 589px)),
    var(--ui-canvas);
}

body.is-editing {
  padding-bottom: 76px;
}

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

.site-header,
main {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  border-top: 3px solid var(--ui-accent);
  border-bottom: 1px solid var(--ui-line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--ui-line-strong);
  border-radius: var(--ui-radius-sm);
  background: var(--ui-surface);
  color: var(--ui-text);
  font-family: var(--ui-font-display);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 14px;
  line-height: 1.1;
}

.brand small {
  margin-top: 3px;
  color: var(--ui-text-soft);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

nav {
  display: flex;
  align-self: stretch;
  gap: 2px;
}

nav a {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-bottom: 2px solid transparent;
  color: var(--ui-text-muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: color var(--ui-motion-fast), border-color var(--ui-motion-fast);
}

nav a:hover {
  border-bottom-color: var(--ui-accent);
  color: var(--ui-text);
}

.admin-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 7px max(20px, calc((100% - 1180px) / 2));
  border-bottom: 1px solid var(--ui-line-strong);
  background: rgba(25, 28, 30, 0.96);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px);
}

.admin-bar[hidden] {
  display: none;
}

.admin-bar a {
  color: var(--ui-accent-hover);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.admin-bar span {
  margin-right: auto;
  color: var(--ui-text-muted);
  font-size: 11px;
}

.admin-bar form {
  margin: 0;
}

.admin-bar button,
.inline-editor button,
.edit-actions button {
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-md);
  background: var(--ui-surface-raised);
  color: var(--ui-text);
  font-weight: 700;
  cursor: pointer;
}

.admin-bar button:hover,
.inline-editor button:hover,
.edit-actions button:hover {
  border-color: var(--ui-line-strong);
  background: var(--ui-surface-strong);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  align-items: end;
  gap: clamp(30px, 6vw, 90px);
  min-height: 0;
  padding: 52px 0 44px;
  border-bottom: 1px solid var(--ui-line);
}

.eyebrow {
  margin: 0 0 11px;
  color: var(--ui-accent-hover);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1 {
  max-width: 780px;
  margin-bottom: 18px;
  font-family: var(--ui-font-display);
  font-size: clamp(42px, 5.5vw, 64px);
  font-stretch: condensed;
  font-weight: 850;
  line-height: 0.96;
  letter-spacing: -0.055em;
}

h1 em {
  color: var(--ui-accent);
  font-style: normal;
}

.lead {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--ui-text-muted);
  font-size: 16px;
  line-height: 1.55;
}

.hero-mark {
  position: relative;
  display: flex;
  align-items: flex-end;
  width: 230px;
  height: 144px;
  overflow: hidden;
  border: 1px solid var(--ui-line-strong);
  border-radius: var(--ui-radius-md);
  background:
    linear-gradient(135deg, transparent 0 61%, rgba(231, 98, 79, 0.12) 61% 62%, transparent 62%),
    var(--ui-surface);
}

.hero-mark::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 18px;
  width: 4px;
  background: var(--ui-accent);
}

.hero-mark::after {
  content: "LIVE · VIDEO · GAMES";
  position: absolute;
  top: 17px;
  right: 18px;
  color: var(--ui-text-soft);
  font-family: var(--ui-font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.hero-mark span {
  margin: 0 0 16px 38px;
  color: var(--ui-text);
  font-family: var(--ui-font-display);
  font-size: 48px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.07em;
}

.section {
  padding: 48px 0;
  border-bottom: 1px solid var(--ui-line);
  scroll-margin-top: 58px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-head h2 {
  margin: 0;
  font-family: var(--ui-font-display);
  font-size: clamp(28px, 3.6vw, 38px);
  font-stretch: condensed;
  font-weight: 820;
  line-height: 1;
  letter-spacing: -0.035em;
}

.section-head > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 28px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-sm);
  color: var(--ui-text-soft);
  font-family: var(--ui-font-mono);
  font-size: 10px;
  font-weight: 700;
}

.section-intro {
  margin: -12px 0 20px;
  color: var(--ui-text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.video-card {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(290px, 0.65fr);
  min-height: 330px;
  overflow: hidden;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-lg);
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow-raised);
}

.video-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 280px;
  overflow: hidden;
  border-right: 1px solid var(--ui-line);
  background:
    linear-gradient(145deg, rgba(132, 169, 216, 0.11), transparent 42%),
    linear-gradient(315deg, rgba(231, 98, 79, 0.13), transparent 40%),
    #101214 center / cover;
  text-decoration: none;
}

.video-visual::after {
  content: "";
  position: absolute;
  inset: 12px;
  pointer-events: none;
  border: 1px solid rgba(240, 236, 228, 0.09);
  border-radius: var(--ui-radius-md);
}

.video-visual:not(.disabled) {
  cursor: pointer;
}

.video-visual.disabled {
  pointer-events: none;
}

.play {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  padding-left: 3px;
  border: 1px solid var(--ui-line-strong);
  border-radius: 50%;
  background: rgba(18, 20, 22, 0.78);
  color: var(--ui-text);
  font-size: 17px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

.video-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(26px, 3.5vw, 42px);
}

.video-copy > b {
  margin-bottom: 17px;
  padding: 4px 7px;
  border: 1px solid rgba(231, 98, 79, 0.45);
  border-radius: var(--ui-radius-sm);
  background: var(--ui-accent-soft);
  color: #ff9a8c;
  font-family: var(--ui-font-mono);
  font-size: 9px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.video-copy h3 {
  margin-bottom: 11px;
  font-family: var(--ui-font-display);
  font-size: clamp(23px, 2.8vw, 31px);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.video-copy p {
  margin-bottom: 15px;
  color: var(--ui-text-muted);
  font-size: 13px;
  line-height: 1.55;
}

.video-copy time {
  margin-bottom: 16px;
  color: var(--ui-link);
  font-family: var(--ui-font-mono);
  font-size: 10px;
}

.schedule-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: 14px;
}

.calendar,
.events {
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-md);
  background: var(--ui-surface);
}

.calendar {
  padding: 20px;
}

.calendar-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 17px;
}

.calendar-head strong {
  font-size: 16px;
}

.calendar-head span {
  color: var(--ui-text-muted);
  font-size: 10px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.weekday {
  padding-bottom: 6px;
  color: var(--ui-text-soft);
  font-family: var(--ui-font-mono);
  font-size: 8px;
  font-weight: 700;
  text-align: center;
}

.calendar-day {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid transparent;
  border-radius: var(--ui-radius-sm);
  color: #d0ccc5;
  font-size: 11px;
}

.calendar-day.today {
  border-color: var(--ui-line-strong);
  color: var(--ui-text);
}

.calendar-day.stream {
  border-color: var(--ui-accent);
  background: var(--ui-accent);
  color: #fffaf3;
  font-weight: 850;
}

.events {
  min-height: 300px;
  overflow: hidden;
}

.event {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 16px;
  min-height: 94px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--ui-line);
  text-decoration: none;
  transition: background var(--ui-motion-fast);
}

a.event:hover {
  background: var(--ui-surface-raised);
}

.event:last-child {
  border-bottom: 0;
}

.event time {
  display: grid;
  justify-items: center;
  padding-right: 14px;
  border-right: 1px solid var(--ui-line);
}

.event time b {
  font-family: var(--ui-font-display);
  font-size: 22px;
  line-height: 1;
}

.event time span,
.event-copy > span {
  color: var(--ui-link);
  font-family: var(--ui-font-mono);
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
}

.event h3 {
  margin: 5px 0 0;
  font-size: 15px;
  line-height: 1.2;
}

.event p {
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--ui-text-muted);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 300px;
  padding: 34px;
}

.empty strong {
  font-family: var(--ui-font-display);
  font-size: 22px;
}

.empty p {
  margin-bottom: 0;
  color: var(--ui-text-muted);
  font-size: 13px;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.game {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 15px;
  min-height: 138px;
  padding: 11px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-md);
  background: var(--ui-surface);
}

.game.funded {
  border-color: rgba(120, 173, 136, 0.46);
  background: linear-gradient(90deg, var(--ui-positive-soft), transparent 38%), var(--ui-surface);
}

.cover {
  display: grid;
  place-items: center;
  width: 76px;
  aspect-ratio: 2 / 3;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-sm);
  background: #0e1012 center / cover;
  color: var(--ui-text-soft);
  font-family: var(--ui-font-display);
  font-size: 17px;
  font-weight: 900;
}

.game-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.game-state {
  display: flex;
  justify-content: space-between;
  color: var(--ui-positive);
  font-family: var(--ui-font-mono);
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
}

.game h3 {
  margin: 9px 0 auto;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.amounts {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 11px 0 5px;
}

.amounts strong {
  color: var(--ui-text);
  font-size: 15px;
}

.amounts span,
.game-meta {
  color: var(--ui-text-muted);
  font-size: 9px;
}

.meter {
  height: 5px;
  overflow: hidden;
  border-radius: 0;
  background: #0d0f10;
}

.meter span {
  display: block;
  height: 100%;
  background: var(--ui-positive);
}

.game-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
}

.expand {
  width: 100%;
  min-height: 42px;
  margin-top: 12px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-md);
  background: transparent;
  color: var(--ui-text-muted);
  font-weight: 750;
  cursor: pointer;
}

.expand:hover {
  border-color: var(--ui-line-strong);
  background: var(--ui-surface);
  color: var(--ui-text);
}

.inline-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  margin-top: 16px;
  padding: 20px;
  border: 1px solid rgba(231, 98, 79, 0.55);
  border-radius: var(--ui-radius-md);
  background: var(--ui-surface);
}

.inline-editor[hidden] {
  display: none;
}

.inline-editor h3,
.inline-editor .editor-title {
  grid-column: 1 / -1;
}

.inline-editor label {
  display: grid;
  gap: 6px;
  color: var(--ui-text-muted);
  font-size: 11px;
  font-weight: 700;
}

.inline-editor label.wide {
  grid-column: 1 / -1;
}

.inline-editor input,
.inline-editor textarea {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-md);
  outline: none;
  background: #101214;
  color: var(--ui-text);
  resize: vertical;
}

.inline-editor input:focus,
.inline-editor textarea:focus {
  border-color: var(--ui-link);
}

.inline-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.editor-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

#streamEditors {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
}

.stream-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-md);
  background: #151719;
}

.stream-editor .remove-stream {
  grid-column: 1 / -1;
  justify-self: end;
  border-color: rgba(225, 106, 106, 0.4);
  color: #f29a9a;
}

.edit-actions {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-height: 62px;
  padding: 8px max(20px, calc((100% - 1180px) / 2));
  border-top: 1px solid var(--ui-line-strong);
  background: rgba(18, 20, 22, 0.97);
  box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.26);
}

.edit-actions[hidden] {
  display: none;
}

.edit-actions span {
  margin-right: auto;
  color: var(--ui-text-muted);
  font-size: 11px;
}

.edit-actions .primary {
  border-color: var(--ui-accent);
  background: var(--ui-accent);
  color: #fffaf3;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 30px;
  }

  .hero-mark {
    width: 190px;
    height: 124px;
  }

  .video-card,
  .schedule-layout {
    grid-template-columns: 1fr;
  }

  .video-visual {
    min-height: 300px;
    border-right: 0;
    border-bottom: 1px solid var(--ui-line);
  }
}

@media (max-width: 650px) {
  .site-header,
  main {
    width: calc(100% - 28px);
  }

  .site-header {
    min-height: 60px;
  }

  nav {
    display: none;
  }

  .brand small {
    display: none;
  }

  .admin-bar {
    flex-wrap: wrap;
  }

  .admin-bar span {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 36px 0 32px;
  }

  .hero-mark {
    display: none;
  }

  h1 {
    font-size: clamp(38px, 12vw, 48px);
  }

  .lead {
    font-size: 14px;
  }

  .section {
    padding: 36px 0;
  }

  .section-head {
    margin-bottom: 18px;
  }

  .section-head h2 {
    font-size: 28px;
  }

  .video-visual {
    min-height: 210px;
  }

  .video-copy {
    padding: 24px 20px;
  }

  .calendar {
    padding: 17px 12px;
  }

  .events,
  .empty {
    min-height: 190px;
  }

  .event {
    grid-template-columns: 44px minmax(0, 1fr) 14px;
    gap: 10px;
    min-height: 86px;
    padding: 11px 10px;
  }

  .event time {
    padding-right: 9px;
  }

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

  .game {
    grid-template-columns: 70px minmax(0, 1fr);
    min-height: 128px;
    gap: 12px;
    padding: 9px;
  }

  .cover {
    width: 70px;
  }

  .inline-editor,
  .stream-editor {
    grid-template-columns: 1fr;
  }

  .inline-editor label.wide,
  .stream-editor label.wide {
    grid-column: auto;
  }

  .inline-action {
    grid-template-columns: 1fr;
  }

  .edit-actions span {
    display: none;
  }
}
