/* Breakout mockup styles (judge preview). Builds on /styles.css. */
.preview-banner {
  background: repeating-linear-gradient(135deg, rgba(245, 196, 81, 0.14) 0 14px, rgba(245, 196, 81, 0.08) 14px 28px);
  border-bottom: 1px solid rgba(245, 196, 81, 0.35); color: #fde7ad; font-size: 13.5px; text-align: center; padding: 8px 16px;
}
.preview-banner a { color: #fff; font-weight: 700; }

/* app header (signed-in) */
.app-header .nav a.on { color: var(--text); }
.app-header .nav a.on::after { content: ""; display: block; height: 2px; background: var(--gold); border-radius: 2px; margin-top: 4px; }
.me { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.mini-avatar { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; color: #1a1405; background: linear-gradient(140deg, var(--gold), var(--rose)); }

.page { padding: 40px 0 80px; }
.page-title { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.page-title h1 { font-size: clamp(28px, 4vw, 38px); }
.page-title .sub { color: var(--muted); margin-top: 6px; }

.grid-main { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }
.stack > * + * { margin-top: 20px; }
.panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.panel h2 { font-size: 19px; margin-bottom: 4px; }
.panel .sub { color: var(--dim); font-size: 14px; margin-bottom: 16px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kpi { background: var(--bg-3); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.kpi .n { font-family: var(--display); font-weight: 800; font-size: 28px; line-height: 1; }
.kpi .l { font-size: 13px; color: var(--muted); margin-top: 6px; }
.kpi .d { font-size: 12px; margin-top: 4px; }
.up { color: var(--teal); } .down { color: var(--rose); } .gold { color: var(--gold); }

.tag-pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.tag-pill.live { color: #0b0a0f; background: var(--teal); }
.tag-pill.gold { color: #1a1405; background: var(--gold); }
.tag-pill.rose { color: #fff; background: rgba(251, 113, 133, 0.85); }
.tag-pill.muted { color: var(--muted); border: 1px solid var(--line); }

/* simple trend chart (SVG) */
.trend svg { width: 100%; height: auto; display: block; }
.trend .legend { margin-top: 10px; }

/* notes / feed */
.note { border-left: 3px solid var(--rose); background: var(--bg-3); border-radius: 0 10px 10px 0; padding: 12px 14px; margin-bottom: 10px; }
.note .who-line { font-size: 13px; color: var(--dim); margin-bottom: 4px; }
.note p { margin: 0; color: var(--muted); font-size: 15px; }
.note.pub { border-left-color: var(--teal); }

/* rows / leaderboard */
.rows { display: flex; flex-direction: column; }
.row { display: grid; grid-template-columns: 28px 40px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .rank { font-weight: 800; color: var(--dim); text-align: center; }
.row .av { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; color: #1a1405; }
.row .name { font-weight: 700; }
.row .meta { font-size: 13px; color: var(--dim); }
.row .score { font-family: var(--display); font-weight: 800; font-size: 20px; }

/* thumbnails */
.thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; border: 1px solid var(--line);
  background: radial-gradient(60% 80% at 50% 30%, var(--glow, rgba(245, 196, 81, 0.20)), transparent 70%), linear-gradient(160deg, #221d2e, #0f0d14);
  display: flex; align-items: center; justify-content: center; }
.thumb .play { width: 52px; height: 52px; border-radius: 50%; background: rgba(255, 255, 255, 0.9); display: flex; align-items: center; justify-content: center; }
.thumb .play::before { content: ""; border-left: 16px solid #111; border-top: 10px solid transparent; border-bottom: 10px solid transparent; margin-left: 4px; }
.thumb .cap { position: absolute; left: 12px; bottom: 10px; font-size: 12.5px; color: var(--muted); }
.thumb .badge { position: absolute; right: 10px; top: 10px; }

/* head-to-head rating */
.versus { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: center; }
.vs { font-family: var(--display); font-weight: 800; font-size: 22px; color: var(--dim); }
.contender { text-align: center; }
.contender .label { margin-top: 10px; font-weight: 700; }
.contender .label span { color: var(--dim); font-weight: 400; }
.question { text-align: center; margin: 26px 0 12px; }
.question h2 { font-size: 24px; }
.question p { color: var(--muted); margin: 6px 0 0; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 720px; margin: 0 auto; }
.choice { padding: 16px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.2); background: var(--bg-3); color: var(--text);
  font: inherit; font-weight: 700; cursor: pointer; text-align: center; }
.choice:hover, .choice.on { border-color: var(--gold); background: var(--gold-soft); }
.skill-picks { max-width: 720px; margin: 22px auto 0; }
.skill-pick { display: grid; grid-template-columns: 1fr auto auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.seg { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.seg.on { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }
.progress { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--gold); border-radius: 999px; }
.fine { font-size: 13px; color: var(--dim); }

/* script card */
.script { font-family: Georgia, "Times New Roman", serif; font-size: 17px; line-height: 1.75; color: #ece6d8;
  background: linear-gradient(160deg, rgba(245, 196, 81, 0.06), transparent 60%), var(--bg-3); border: 1px solid rgba(245, 196, 81, 0.25);
  border-radius: 14px; padding: 22px 24px; }
.script .src { font-family: var(--body); font-size: 13px; color: var(--gold); letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; margin-bottom: 10px; }

/* gallery index */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.gallery a.card { display: block; color: var(--text); transition: transform .12s, border-color .12s; }
.gallery a.card:hover { transform: translateY(-2px); border-color: rgba(245, 196, 81, 0.5); text-decoration: none; }
.gallery .who { margin: 0 0 6px; font-size: 13px; color: var(--gold); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }

.badges { display: flex; flex-wrap: wrap; gap: 10px; }
.badge-card { display: flex; gap: 10px; align-items: center; background: var(--bg-3); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.badge-card .em { font-size: 22px; }
.badge-card .t { font-weight: 700; }
.badge-card .s { color: var(--dim); font-size: 12.5px; }
.badge-card.locked { opacity: 0.45; }

.toggle-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.toggle-row:last-child { border-bottom: 0; }
.switch { width: 40px; height: 22px; border-radius: 999px; background: var(--teal); position: relative; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; right: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; }
.switch.off { background: rgba(255, 255, 255, 0.18); }
.switch.off::after { right: auto; left: 3px; }

textarea.mock { width: 100%; min-height: 80px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.16); background: var(--bg);
  color: var(--text); font: inherit; font-size: 15px; padding: 12px; resize: vertical; }
.stars { display: flex; gap: 6px; }
.stars span { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--muted); }
.stars span.on { background: var(--rose-soft); border-color: rgba(251, 113, 133, 0.5); color: #ffd0d7; }

@media (max-width: 860px) {
  .grid-main { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .versus { grid-template-columns: 1fr; }
  .vs { text-align: center; }
  .choices { grid-template-columns: 1fr; }
}
