/* encode-sans-100 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Encode Sans';
  font-style: normal;
  font-weight: 100;
  src: url('/assets/fonts/encode-sans-v23-latin-100.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* encode-sans-200 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Encode Sans';
  font-style: normal;
  font-weight: 200;
  src: url('/assets/fonts/encode-sans-v23-latin-200.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* encode-sans-300 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Encode Sans';
  font-style: normal;
  font-weight: 300;
  src: url('/assets/fonts/encode-sans-v23-latin-300.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* encode-sans-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Encode Sans';
  font-style: normal;
  font-weight: 400;
  src: url('/assets/fonts/encode-sans-v23-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* encode-sans-500 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Encode Sans';
  font-style: normal;
  font-weight: 500;
  src: url('/assets/fonts/encode-sans-v23-latin-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* encode-sans-600 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Encode Sans';
  font-style: normal;
  font-weight: 600;
  src: url('/assets/fonts/encode-sans-v23-latin-600.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* encode-sans-700 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Encode Sans';
  font-style: normal;
  font-weight: 700;
  src: url('/assets/fonts/encode-sans-v23-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* encode-sans-800 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Encode Sans';
  font-style: normal;
  font-weight: 800;
  src: url('/assets/fonts/encode-sans-v23-latin-800.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* encode-sans-900 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Encode Sans';
  font-style: normal;
  font-weight: 900;
  src: url('/assets/fonts/encode-sans-v23-latin-900.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

:root {
  --bg: #f7f2eb;
  --panel: #ffffff;
  --panel-2: #f1ebe3;
  --accent: #d51b1c;
  --accent-2: #b11516;
  --text: #4b443d;
  --muted: #7b7067;
  --border: #d8d1c8;
  --danger: #d51b1c;
  --success: #3ba37a;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Encode Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding: 0 20px 40px;
}

a {
  color: var(--accent);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  margin: 0 -20px 20px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.logo-slot {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 7px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inline-form {
  margin: 0;
}

.ghost-button {
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease;
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.ghost-button:active {
  transform: translateY(0);
}

.ghost-button.danger {
  color: var(--danger);
  border-color: rgba(242, 122, 138, 0.5);
}

.ghost-button.muted {
  color: var(--muted);
}

.session-pill {
  padding: 8px 12px;
  border-radius: 599px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
}

.session-pill.muted {
  color: var(--muted);
}

.layout {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 10px;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  align-items: center;
  padding: 20px 0;
}

.hero-copy h1 {
  margin: 0 0 10px;
  font-size: 38px;
}

.hero-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.card.nested {
  box-shadow: none;
  width: 100%;
}

.login-card h2 {
  margin: 0 0 12px;
}

.login-form {
  display: grid;
  gap: 12px;
}

.login-form label {
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
}

input,
button {
  font-family: inherit;
}

input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 16px;
}

input:focus {
  outline: 2px solid var(--accent);
  border-color: var(--accent);
}

button {
  padding: 12px 16px;
  border-radius: 6px;
  border: none;
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

button:active {
  transform: translateY(0);
}

.form-error {
  color: var(--danger);
  font-weight: 600;
  margin: 0;
}

.stream-shell {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.stream-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.stream-toggle {
  display: inline-flex;
  gap: 10px;
  background: #ece6de;
  padding: 6px;
  border-radius: 7px;
  border: 1px solid var(--border);
}

.stream-toggle button {
  background: transparent;
  color: var(--text);
  padding: 10px 16px;
  border-radius: 6px;
  border: 1px solid transparent;
  box-shadow: none;
}

.stream-toggle button.active {
  background: var(--accent);
  color: #ffffff;
  border-color: transparent;
}

.stream-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  box-shadow: var(--shadow);
}

.stream-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 4px;
}

.chat-shell {
  margin-top: 16px;
}

.chat-card {
  display: grid;
  gap: 12px;
}

.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 599px;
  font-weight: 700;
  font-size: 12px;
  border: 1px solid var(--border);
}

.pill.success {
  color: var(--success);
  background: rgba(107, 225, 196, 0.1);
}

.pill.error {
  color: var(--danger);
  background: rgba(242, 122, 138, 0.08);
}

.pill.muted {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
}

.chat-messages {
  min-height: 220px;
  max-height: 320px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--panel-2);
}

.chat-message {
  padding: 10px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--border);
  margin-bottom: 10px;
}

.chat-meta {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.chat-body {
  margin: 0;
  color: var(--text);
  font-size: 15px;
}

.chat-form {
  display: grid;
  gap: 10px;
}

.input-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.input-row label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 600;
}

.chat-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.hint {
  color: var(--muted);
  font-size: 13px;
}

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

.admin-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 12px;
}

.admin-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.event-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.event-list li {
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.event-list li.active {
  border-color: rgba(107, 225, 196, 0.6);
}

.event-list li.ended {
  opacity: 0.7;
}

.event-actions {
  display: grid;
  gap: 10px;
}

.file-list {
  list-style: disc;
  margin: 6px 0 0 16px;
  padding: 0;
  color: var(--muted);
}

.download-card {
  margin-top: 12px;
}

.download-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: grid;
  gap: 10px;
}

.download-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.02);
}

.stream-edit-form {
  display: grid;
  gap: 8px;
  margin: 8px 0 14px;
}

.stream-edit-form input[type="url"] {
  width: 100%;
}

.notice-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.notice-overlay.hidden {
  display: none;
}

.notice-card {
  background: #fff;
  color: var(--text);
  max-width: 640px;
  width: 100%;
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
}

.notice-card p {
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 700px) {
  body {
    padding: 0 14px 24px;
  }

  .site-header {
    margin: 0 -14px 14px;
  }

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

  .stream-toggle {
    width: 100%;
    justify-content: space-between;
  }

  .chat-actions {
    align-items: flex-start;
  }
}
