:root {
  --royal-blue: #1438a6;
  --royal-blue-dark: #071f68;
  --cannons-red: #c8102e;
  --cannons-red-dark: #8f0d21;
  --ink-900: #f6f7fa;
  --ink-700: #c8ced8;
  --ink-500: #9ba5b6;
  --line: #343842;
  --paper: #15171c;
  --surface: #0f1115;
  --danger-bg: #341315;
  --danger-text: #ffb8c0;
  --ok-bg: #10291c;
  --ok-text: #9df0bf;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Inter", "Helvetica Neue", sans-serif;
  color: var(--ink-900);
  background: linear-gradient(180deg, var(--royal-blue-dark) 0%, #0a236f 44%, #071847 100%);
}

.shell {
  width: min(860px, 94vw);
  margin: 1.2rem auto;
}

.shell.wide {
  width: min(1380px, 96vw);
}

.brand-strip {
  background: linear-gradient(132deg, #09090b 0%, var(--royal-blue-dark) 58%, var(--cannons-red-dark) 100%);
  border: 1px solid var(--royal-blue);
  border-radius: 8px;
  color: #fff;
  padding: 0.95rem 1rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
}

.brand-strip.compact {
  grid-template-columns: auto 1fr;
}

.brand-strip h1 {
  margin: 0;
  font-size: clamp(1.2rem, 3.3vw, 1.8rem);
}

.brand-strip p {
  margin: 0.25rem 0 0;
  color: rgba(255, 255, 255, 0.87);
}

.quick-links {
  margin-top: 0.55rem;
}

.quick-links a {
  display: inline-block;
  padding: 0.3rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  font-size: 0.92rem;
}

.brand-logo {
  width: min(260px, 34vw);
  height: auto;
}

.brand-mascot {
  width: min(92px, 17vw);
  height: auto;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.24));
}

.card {
  margin-top: 1rem;
  background: var(--paper);
  border: 1px solid rgba(20, 56, 166, 0.72);
  border-radius: 8px;
  padding: 1.1rem;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
}

.meta {
  color: var(--ink-700);
  margin-top: 0;
}

h2 {
  margin: 0;
}

form {
  display: grid;
  gap: 0.85rem;
}

.honeypot-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

label,
fieldset {
  display: grid;
  gap: 0.35rem;
  color: var(--ink-900);
  font-size: 1.02rem;
}

.checkline {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.62rem 0.68rem;
  background: var(--surface);
}

.checkline input {
  width: auto;
  margin: 0;
}

.helper-text {
  margin: 0;
  border-radius: 8px;
  padding: 0.62rem 0.72rem;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-700);
  font-size: 0.95rem;
}

.metadata-status {
  min-height: 2.5rem;
}

.art-preview {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 0.5rem 0.6rem;
  width: fit-content;
  max-width: 100%;
}

.art-preview-caption {
  color: var(--ink-700);
  font-size: 0.92rem;
  word-break: break-word;
}

.captcha-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 0.6rem;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.62rem 0.68rem;
  color: var(--ink-900);
  background: #0c0d10;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--royal-blue);
  box-shadow: 0 0 0 3px rgba(20, 56, 166, 0.28);
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.72rem;
}

legend {
  padding: 0 0.35rem;
  color: var(--ink-700);
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.choice-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.44rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  width: fit-content;
}

.choice-pill input {
  width: auto;
}

button {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.72rem 1rem;
  color: #fff;
  background: var(--cannons-red);
  cursor: pointer;
  width: fit-content;
  font-weight: 600;
}

button:hover {
  filter: brightness(0.96);
}

.tiny-btn {
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  font-size: 0.9rem;
}

.danger-btn {
  background: linear-gradient(125deg, #b91c1c 0%, #9f1b1b 45%, #7c1f1f 100%);
}

.danger-btn:hover {
  background: linear-gradient(125deg, #9f1b1b 0%, #7f1818 45%, #5f1515 100%);
}

.secondary-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-900);
}

.subtle {
  color: var(--ink-700);
}

.inline-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.upload-form {
  margin-top: 0.35rem;
  display: grid;
  gap: 0.45rem;
  justify-items: start;
}

.season-admin {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.9rem;
  margin-bottom: 1rem;
  background: var(--surface);
}

.season-admin h2 {
  font-size: 1.1rem;
  margin-bottom: 0.45rem;
}

.season-create-form {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 0.65rem;
}

.season-list {
  display: grid;
  gap: 0.45rem;
}

.season-current {
  font-weight: 700;
  color: var(--cannons-red);
}

.season-picker {
  margin-bottom: 0.75rem;
  display: grid;
  gap: 0.45rem;
  max-width: 680px;
}

@media (min-width: 680px) {
  .season-picker {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    align-items: end;
  }
}

.alert {
  border: 1px solid #7d2931;
  background: var(--danger-bg);
  color: var(--danger-text);
  border-radius: 8px;
  padding: 0.75rem;
}

.alert h2 {
  font-size: 1rem;
}

.alert-line {
  border: 1px solid #7d2931;
  background: var(--danger-bg);
  color: var(--danger-text);
  border-radius: 8px;
  padding: 0.62rem;
}

.ok-line {
  border: 1px solid #256a43;
  background: var(--ok-bg);
  color: var(--ok-text);
  border-radius: 8px;
  padding: 0.62rem;
}

.summary ul,
.alert ul {
  margin: 0.35rem 0 0;
  padding-left: 1.15rem;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

th,
td {
  border: 1px solid var(--line);
  padding: 0.55rem;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--royal-blue-dark);
  color: var(--ink-900);
}

.songs-table {
  min-width: 860px;
}

.admin-table {
  min-width: 1180px;
}

.admin-page .season-list .inline-form {
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  background: var(--paper);
}

.album-art {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
  display: block;
}

a {
  color: #ff6574;
  font-weight: 600;
}

.admin-link {
  margin-top: 1rem;
  color: var(--ink-700);
}

.clip-cell {
  display: grid;
  gap: 0.45rem;
  align-items: start;
}

.clip-link {
  display: inline-block;
}

.clip-meta,
.clip-status {
  color: var(--ink-700);
  font-size: 0.88rem;
  line-height: 1.35;
}

.clip-status {
  font-style: italic;
}

.admin-request-section + .admin-request-section {
  margin-top: 1.2rem;
}

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

.section-head p {
  margin: 0;
}

.auto-upload-form {
  gap: 0;
}

.auto-upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.upload-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 122px;
  margin: 0;
}

.upload-trigger:disabled {
  cursor: wait;
  opacity: 0.8;
}

.brand-credit {
  width: min(1380px, 96vw);
  margin: 0.8rem auto 1rem;
  color: var(--ink-500);
  font-size: 0.72rem;
  text-align: center;
}

@media (max-width: 1200px) {
  .admin-page .table-wrap {
    overflow: visible;
  }

  .admin-page .admin-table {
    min-width: 0;
    border: 0;
    background: transparent;
  }

  .admin-page .admin-table thead {
    display: none;
  }

  .admin-page .admin-table,
  .admin-page .admin-table tbody,
  .admin-page .admin-table tr,
  .admin-page .admin-table td {
    display: block;
    width: 100%;
  }

  .admin-page .admin-table tr {
    margin-bottom: 0.85rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
  }

  .admin-page .admin-table td {
    border: 0;
    border-bottom: 1px solid var(--line);
    padding: 0.6rem 0.7rem;
    display: grid;
    grid-template-columns: minmax(110px, 38%) 1fr;
    gap: 0.45rem;
    align-items: start;
  }

  .admin-page .admin-table td:last-child {
    border-bottom: 0;
  }

  .admin-page .admin-table td::before {
    content: attr(data-label);
    color: var(--cannons-red);
    font-weight: 700;
  }

  .admin-page .upload-form {
    justify-items: stretch;
  }

  .admin-page .inline-form {
    width: 100%;
  }

  .admin-page .upload-trigger {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .section-head {
    display: grid;
    justify-content: stretch;
  }
}

@media (max-width: 980px) {
  .songs-page .table-wrap {
    overflow: visible;
  }

  .songs-page .songs-table {
    min-width: 0;
    border: 0;
    background: transparent;
  }

  .songs-page .songs-table thead {
    display: none;
  }

  .songs-page .songs-table,
  .songs-page .songs-table tbody,
  .songs-page .songs-table tr,
  .songs-page .songs-table td {
    display: block;
    width: 100%;
  }

  .songs-page .songs-table tr {
    margin-bottom: 0.85rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
  }

  .songs-page .songs-table td {
    border: 0;
    border-bottom: 1px solid var(--line);
    padding: 0.6rem 0.7rem;
    display: grid;
    grid-template-columns: minmax(96px, 36%) 1fr;
    gap: 0.45rem;
    align-items: start;
  }

  .songs-page .songs-table td:last-child {
    border-bottom: 0;
  }

  .songs-page .songs-table td::before {
    content: attr(data-label);
    color: var(--cannons-red);
    font-weight: 700;
  }
}

@media (max-width: 800px) {
  .brand-strip {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .brand-strip.compact {
    grid-template-columns: 1fr;
  }

  .brand-logo {
    width: min(300px, 76vw);
  }

  .brand-mascot {
    width: min(100px, 24vw);
  }

  .admin-page .season-list .inline-form {
    align-items: flex-start;
    gap: 0.35rem;
  }
}

@media (max-width: 600px) {
  .shell {
    width: 96vw;
    margin: 0.8rem auto;
  }

  .card {
    padding: 0.85rem;
  }

  .brand-strip {
    padding: 0.8rem;
    border-radius: 8px;
  }

  .brand-strip h1 {
    font-size: 1.25rem;
  }

  label,
  fieldset {
    font-size: 0.98rem;
  }

  button {
    width: 100%;
  }
}
