/* Hercules design tokens (from herculesrx.com) */
:root {
  --teal-900: #083333;
  --teal-700: #00504f;
  --teal-500: #008082;
  --teal-400: #00909a;
  --sage-400: #78a4a6;
  --sage-300: #a3b2a4;
  --cream-50: #f9f6ee;
  --red-500: #e70013;

  --bg: var(--cream-50);
  --surface: #ffffff;
  --surface-2: #f1ede2;
  --text: var(--teal-700);
  --heading: var(--teal-900);
  --muted: #4f6f6e;
  --border: #e4e0d6;
  --accent: var(--teal-500);
  --accent-soft: #e3f0ef;
  --hero-bg: var(--teal-900);
  --hero-text: #ffffff;
  --good: var(--teal-500);
  --bad: var(--red-500);
  --radius: 10px;
  --radius-lg: 20px;
  --shadow: 0 2px 8px rgba(8, 51, 51, 0.06);
  --shadow-md: 0 12px 32px rgba(8, 51, 51, 0.1);
  --font-sans: "Source Sans 3", "Source Sans Pro", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Recoleta", "Fraunces", Georgia, "Times New Roman", serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #052323;
    --surface: #0b3535;
    --surface-2: #104141;
    --text: #e6efe9;
    --heading: #ffffff;
    --muted: #9fbcb9;
    --border: #1d4f4f;
    --accent: #3fb6b8;
    --accent-soft: #0f4a4b;
    --hero-bg: #0b3535;
    --good: #3fb6b8;
    --bad: #ff5a66;
    --shadow: none;
    --shadow-md: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .serif { font-family: var(--font-serif); color: var(--heading); font-weight: 500; }

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

main { max-width: 1040px; margin: 0 auto; padding: 28px 16px 64px; }

/* ---------- site header ---------- */

.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.site-header .inner {
  max-width: 1040px; margin: 0 auto; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; min-width: 0; }
.brand img { height: 44px; width: auto; display: block; }
.brand .divider { width: 1px; align-self: stretch; background: var(--border); }
.brand .app-name { font-family: var(--font-serif); font-size: 1.35rem; color: var(--heading); white-space: nowrap; }
.site-header nav { display: flex; gap: 18px; font-size: 0.95rem; }
.site-header nav a { color: var(--text); text-decoration: none; font-weight: 600; white-space: nowrap; }
.site-header nav a:hover { color: var(--accent); }
.logo-dark { display: none !important; }
@media (prefers-color-scheme: dark) {
  .logo-light { display: none !important; }
  .logo-dark { display: block !important; }
}
@media (max-width: 520px) {
  .brand img { height: 34px; }
  .brand .app-name { font-size: 1.1rem; }
}

/* ---------- cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 18px;
}

.eyebrow {
  font-size: 0.8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--sage-400);
}

/* Now playing: dark teal hero, like the herculesrx.com banner */
.now {
  display: flex; gap: 20px; align-items: center;
  background: var(--hero-bg); color: var(--hero-text); border: none;
  padding: 28px; box-shadow: var(--shadow-md);
}
.now .emoji {
  font-size: 2.6rem; line-height: 1; width: 76px; height: 76px; flex: none;
  display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, 0.08);
}
.now .title { font-family: var(--font-serif); font-size: 1.9rem; line-height: 1.15; margin-top: 4px; color: #fff; }
.now .track { color: rgba(255, 255, 255, 0.78); margin-top: 4px; }

.round { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; margin: 30px 0 6px; }
.round h2 { margin: 0; font-size: 1.6rem; }
.countdown { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent); }
.muted { color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin-top: 14px; }

.choice {
  position: relative;
  overflow: hidden;
  text-align: left;
  font: inherit;
  color: inherit;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), transform 0.05s;
}
.choice:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.choice:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.choice:active { transform: scale(0.99); }
.choice:disabled { cursor: not-allowed; opacity: 0.6; box-shadow: none; }
.choice.mine { border-color: var(--accent); background: var(--accent-soft); }
.choice .emoji { font-size: 1.8rem; }
.choice .name { font-family: var(--font-serif); font-size: 1.15rem; color: var(--heading); display: block; margin-top: 6px; }
.choice .desc { color: var(--muted); font-size: 0.9rem; display: block; min-height: 2.6em; }
.choice .votes { display: flex; justify-content: space-between; font-size: 0.85rem; margin-top: 10px; color: var(--muted); font-weight: 600; }
.bar { display: block; height: 6px; border-radius: 3px; background: var(--surface-2); margin-top: 6px; overflow: hidden; }
.bar > span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.4s var(--ease); }
.badge {
  position: absolute; top: 12px; right: 12px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: #fff; background: var(--accent); padding: 2px 8px; border-radius: 999px;
}

.notice { padding: 12px 16px; border-radius: var(--radius); background: var(--surface-2); margin: 14px 0; }
.notice.error { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); }
.notice.good { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--teal-900); color: #fff; padding: 10px 20px; border-radius: 999px;
  font-size: 0.95rem; opacity: 0; transition: opacity 0.2s; pointer-events: none; box-shadow: var(--shadow-md);
}
.toast.show { opacity: 1; }

/* ---------- admin ---------- */

h2.section { font-size: 1.4rem; margin: 0 0 12px; }
label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
input, select, button { font: inherit; color: inherit; }
input[type="text"], input[type="password"], input[type="number"], input[type="time"], select {
  width: 100%; padding: 9px 12px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Pill buttons in the herculesrx.com style */
.btn {
  border: 1.5px solid var(--accent); background: transparent; color: var(--accent);
  padding: 8px 20px; border-radius: 999px; cursor: pointer; text-decoration: none; display: inline-block;
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.btn:hover { background: var(--accent); color: #fff; }
.btn.primary { background: var(--teal-700); border-color: var(--teal-700); color: #fff; }
.btn.primary:hover { background: var(--teal-900); border-color: var(--teal-900); }
.btn.danger { border-color: var(--red-500); color: var(--red-500); }
.btn.danger:hover { background: var(--red-500); color: #fff; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
@media (prefers-color-scheme: dark) {
  .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--teal-900); }
}

.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1 1 160px; }
.row > .btn, .row > .fit { flex: 0 0 auto; }
.days { display: flex; gap: 10px; flex-wrap: wrap; }
.days label, .check { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-size: 0.95rem; margin: 0; font-weight: 400; }
.speakers { display: flex; gap: 14px; flex-wrap: wrap; margin: 8px 0 14px; }
input[type="checkbox"] { accent-color: var(--teal-500); width: 16px; height: 16px; }

.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table th { text-align: left; color: var(--muted); font-weight: 600; padding: 8px; border-bottom: 1px solid var(--border); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; }
.table td { padding: 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table td > input + input { margin-top: 4px; }
.table input[type="text"] { padding: 6px 9px; }
.table .emoji-input { width: 3.2em; text-align: center; }
.table .hint { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }
.table .hint a { font-weight: 600; }
.table .btn { padding: 5px 12px; font-size: 0.75rem; }
.scroll { overflow-x: auto; }
.status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; background: var(--muted); }
.status-dot.on { background: var(--good); }
.status-dot.off { background: var(--bad); }
.hidden { display: none !important; }
code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; font-size: 0.85em; word-break: break-all; }
.mt { margin-top: 14px; }
h3.step { font-family: var(--font-sans); font-size: 0.8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); margin: 22px 0 8px; }
ol.steps { margin: 4px 0 10px; padding-left: 20px; font-size: 0.95rem; }

.site-footer { text-align: center; font-size: 0.85rem; color: var(--muted); padding: 0 16px 32px; }

/* mood schedule editor */
.daypart { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-top: 12px; background: var(--bg); }
.daypart .row > input[type="time"] { flex: 0 0 130px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); font-size: 0.88rem; color: var(--text); font-weight: 400; margin: 0;
}
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:checked) { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip.unlinked { opacity: 0.55; }
.now .why { margin-top: 10px; font-size: 0.9rem; color: var(--sage-400); font-weight: 600; }
.vol-cell { display: flex; align-items: center; gap: 8px; min-width: 150px; }
.vol-cell input[type="range"] { flex: 1; accent-color: var(--teal-500); }
.vol-value { font-variant-numeric: tabular-nums; font-weight: 700; width: 2.2em; text-align: right; }
.btn { max-width: 100%; white-space: normal; }
