/* Jodel-Rating – shared styles */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Space+Grotesk:wght@500;700&family=JetBrains+Mono&display=swap");

:root {
  --bg: #F3F5F1;
  --ink: #1C2420;
  --ink-2: #3F4A43;
  --muted: #56635B;
  --line: #B9C4BD;
  --track: #E6EBE7;
  --card: #FFFFFF;
  --green: #2F6B4F;
  --green-dark: #1F4A36;
  --forest: #1F3329;
  --forest-2: #2A4537;
  --mint: #E3EEE7;
  --red: #C8102E;
  --star: #F2B51D;
  --star-edge: #A86F00;
  --star-off: #8A968E;
  --disabled-bg: #D5DCD7;
  --radius-card: 20px;
  --shadow: 0 1px 2px rgba(28, 36, 32, 0.06);
  --font: Inter, system-ui, sans-serif;
  --font-head: "Space Grotesk", Inter, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); }
a { color: var(--green); }
a:hover { color: var(--green-dark); }
button, input { font-family: inherit; }
[hidden] { display: none !important; }

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

/* ---------- brand ---------- */
.brand { display: flex; align-items: center; gap: 10px; }
.brand__name { font-family: var(--font-head); font-weight: 700; font-size: 16px; letter-spacing: 0.2px; }

/* ---------- buttons ---------- */
.btn {
  height: 54px; border: none; border-radius: 14px; font-size: 17px; font-weight: 600;
  cursor: pointer; padding: 0 20px;
}
.btn--primary { background: var(--red); color: #FFFFFF; }
.btn--primary:disabled { background: var(--disabled-bg); color: var(--ink-2); cursor: not-allowed; }
.btn--outline {
  height: 48px; border: 1.5px solid var(--green); border-radius: 12px;
  background: #FFFFFF; color: var(--green); font-size: 15px;
}
.btn:focus-visible, .star:focus-visible, .pill:focus-visible, .icon-btn:focus-visible, input:focus-visible {
  outline: 3px solid var(--green); outline-offset: 2px;
}

.card {
  background: var(--card); border-radius: var(--radius-card); box-shadow: var(--shadow);
}

.notice {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px;
  background: var(--mint); color: var(--green-dark); font-size: 14px; font-weight: 500;
}
.notice--error { background: #FBE7EA; color: #8A0F22; }

/* ---------- vote page ---------- */
.vote {
  max-width: 440px; min-height: 100vh; margin: 0 auto;
  padding: 20px 24px 28px; display: flex; flex-direction: column; gap: 20px;
}
.player {
  position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 16px;
  background: var(--forest); overflow: hidden;
}
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.song-title { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: 28px; line-height: 1.15; }
.song-performer { margin: 4px 0 0; font-size: 15px; color: var(--muted); }

.rate-card { padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.rate-card__q { margin: 0; font-size: 17px; font-weight: 600; }
.stars { display: flex; gap: 8px; }
.star {
  width: 48px; height: 48px; padding: 0; border: none; background: none; border-radius: 10px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.star polygon { fill: none; stroke: var(--star-off); stroke-width: 1.5; stroke-linejoin: round; }
.star.is-on polygon, .stars--small .is-on polygon { fill: var(--star); stroke: var(--star-edge); }
.stars--small { gap: 4px; }
.stars--small svg polygon { fill: none; stroke: var(--star-off); stroke-width: 1.5; stroke-linejoin: round; }
.rate-card__word { margin: 0; min-height: 20px; font-size: 15px; font-weight: 500; color: var(--ink-2); }

.thanks { padding: 28px 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.thanks__icon {
  width: 72px; height: 72px; border-radius: 50%; background: var(--mint);
  display: flex; align-items: center; justify-content: center;
}
.thanks h2 { margin: 0; font-family: var(--font-head); font-size: 26px; font-weight: 700; }
.thanks p { margin: 0; font-size: 15px; color: var(--ink-2); }

.vote__footer { margin: auto 0 0; text-align: center; font-size: 13px; color: var(--muted); }

.state-box { padding: 32px 24px; text-align: center; display: flex; flex-direction: column; gap: 8px; }
.state-box h1, .state-box h2 { margin: 0; font-family: var(--font-head); font-size: 24px; }
.state-box p { margin: 0; color: var(--ink-2); }

/* ---------- admin ---------- */
.topbar { background: var(--forest); color: #FFFFFF; }
.topbar__inner {
  max-width: 1160px; margin: 0 auto; padding: 16px 32px; display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between; gap: 12px;
}
.topbar h1 { margin: 0; font-family: var(--font-head); font-weight: 500; font-size: 16px; }
.topbar__sep { color: #9FB5A8; }
.chip {
  display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: var(--forest-2); color: #E6EEE9; font-size: 13px;
}

.admin {
  max-width: 1160px; margin: 0 auto; padding: 32px; display: flex; flex-wrap: wrap;
  gap: 32px; align-items: flex-start;
}
.admin__side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.admin__main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }

.form { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.form h2, .results-head h2 { margin: 0; font-family: var(--font-head); font-weight: 700; }
.form h2 { font-size: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.field label span { font-weight: 400; color: var(--muted); }
.field input {
  height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 15px; background: #FFFFFF; color: var(--ink);
}
.field__hint { font-size: 13px; color: var(--muted); }
.form .btn { height: 48px; font-size: 16px; border-radius: 12px; }

.created { background: var(--mint); border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.created__title { display: flex; align-items: center; gap: 8px; color: var(--green-dark); font-size: 14px; font-weight: 600; }
.created__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.created code {
  flex: 1 1 180px; min-width: 0; padding: 10px 12px; border-radius: 10px; background: #FFFFFF;
  font-family: var(--font-mono); font-size: 13px; overflow-wrap: anywhere;
}
.created .btn--outline { height: 44px; font-size: 14px; border-radius: 10px; padding: 0 16px; }

.results-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.results-head h2 { font-size: 24px; }
.results-head__sum { font-size: 14px; color: var(--muted); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line);
  background: #FFFFFF; color: var(--ink); font-size: 14px; font-weight: 500; cursor: pointer;
}
.pill[aria-pressed="true"] { background: var(--forest); border-color: var(--forest); color: #FFFFFF; }

.song {
  padding: 20px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px;
}
.song__info { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.song__info h3 { margin: 0; font-family: var(--font-head); font-size: 18px; font-weight: 700; }
.song__perf { font-size: 14px; color: var(--muted); }
.song__link { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.song__link code { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-2); }
.icon-btn {
  width: 44px; height: 44px; border: none; background: none; border-radius: 10px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.song__avg { flex: 0 0 120px; display: flex; flex-direction: column; gap: 2px; }
.song__avg strong { font-family: var(--font-head); font-size: 40px; font-weight: 700; line-height: 1; }
.song__avg span { font-size: 13px; color: var(--muted); }
.dist { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.dist__row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.dist__row > span:first-child { width: 22px; }
.dist__row > span:last-child { width: 22px; text-align: right; }
.dist__track { flex: 1; height: 8px; border-radius: 4px; background: var(--track); overflow: hidden; }
.dist__fill { height: 8px; border-radius: 4px; background: var(--green); }

.empty { padding: 32px 24px; text-align: center; color: var(--ink-2); }

.no-access { max-width: 440px; margin: 80px auto; padding: 0 24px; }
.song__delete { margin-left: auto; min-height: 40px; padding: 0 16px; color: #9b2c2c; border-color: currentColor; }
