:root {
  color-scheme: light;
  --bg: #f4f7f6;
  --panel: #ffffff;
  --text: #182322;
  --muted: #61706d;
  --line: #dbe4e1;
  --brand: #0a7f72;
  --brand-dark: #075b52;
  --accent: #c95f31;
  --danger: #b3261e;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
}

.viewer-shell {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 20px;
}

.viewer-hero {
  padding: 32px 0 18px;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  color: #ffffff;
  background: var(--brand);
  font-size: 13px;
}

h1 {
  margin: 18px 0 8px;
  font-size: clamp(30px, 6vw, 56px);
  line-height: 1.08;
  letter-spacing: 0;
}

.viewer-hero p,
.admin-header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.player-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0c1514;
}

.cover-frame,
.video-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0c1514;
}

.cover-frame {
  position: relative;
}

.cover-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.empty-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #d8ece7;
  font-size: clamp(28px, 6vw, 54px);
}

.player-message {
  padding: 14px 18px;
  color: #d8ece7;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.content-section {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 18px;
  margin-top: 20px;
}

.content-section > div,
.admin-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 20px;
}

h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.content-section p {
  margin: 0;
  white-space: pre-line;
  color: var(--muted);
  line-height: 1.8;
}

.admin-shell {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 24px;
}

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

.admin-header h1 {
  margin: 0 0 8px;
  font-size: 30px;
}

.admin-card {
  margin-bottom: 18px;
}

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

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--text);
  background: #ffffff;
  font: inherit;
}

textarea {
  resize: vertical;
}

.wide {
  grid-column: 1 / -1;
}

button,
.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  color: #ffffff;
  background: var(--brand);
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.ghost-link:hover {
  background: var(--brand-dark);
}

.ghost-link {
  color: var(--brand);
  background: transparent;
  border: 1px solid var(--brand);
}

.ghost-link:hover {
  color: #ffffff;
}

.error-text {
  color: var(--danger);
}

.success-text {
  color: var(--brand-dark);
}

@media (max-width: 720px) {
  .viewer-shell,
  .admin-shell {
    padding: 16px;
  }

  .content-section,
  .form-grid,
  .admin-header {
    grid-template-columns: 1fr;
    display: grid;
  }
}
