/* ===================================================================== */
/* FAKE NEWS — Escape Game styling                                       */
/* Look: dark newsroom / breaking-news vibe                              */
/* ===================================================================== */

* { box-sizing: border-box; }

:root {
  --bg: #0a0d12;
  --bg-2: #131820;
  --bg-3: #1c232e;
  --line: #28303d;
  --ink: #e8edf3;
  --ink-dim: #aab3c0;
  --ink-mute: #6f7785;
  --accent: #ff2e3a;        /* breaking-news red */
  --accent-soft: #ff6b73;
  --warn: #ffb02e;
  --ok: #3ddc84;
  --primary: #4f8cff;
}

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: #000; padding: 1px 6px; border-radius: 4px; font-size: .9em; color: var(--accent-soft); }

h1, h2, h3 { line-height: 1.15; margin: 0 0 .6rem; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 800; }
h2 { font-size: 1.25rem; font-weight: 700; }
.muted { color: var(--ink-dim); }
.tiny { font-size: .8rem; color: var(--ink-mute); }
.center { text-align: center; }

/* Breaking news tag */
.breaking-tag {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: .8rem;
  letter-spacing: .15em;
  padding: .3rem .65rem;
  border-radius: 3px;
  text-transform: uppercase;
  margin-bottom: .6rem;
}
.breaking-tag.small { font-size: .65rem; padding: .2rem .5rem; }
.breaking-tag.pulse { animation: pulse 1.6s infinite; }
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(255,46,58,.7); }
  50%     { box-shadow: 0 0 0 10px rgba(255,46,58,0); }
}

/* Buttons */
button, .btn-primary, .btn-secondary, .btn-ghost, .btn-danger {
  font: inherit;
  border: 0;
  border-radius: 7px;
  padding: .65rem 1.1rem;
  cursor: pointer;
  font-weight: 600;
  transition: transform .05s, background .15s;
}
button:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: #6ea0ff; }
.btn-secondary { background: var(--bg-3); color: var(--ink); }
.btn-secondary:hover { background: #2a3342; }
.btn-ghost { background: transparent; color: var(--ink-dim); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--bg-2); color: var(--ink); }
.btn-danger { background: #c1232f; color: #fff; }
.btn-danger:hover { background: var(--accent); }
button.small { padding: .35rem .7rem; font-size: .85rem; }

/* Forms */
label { display: block; margin: .8rem 0 .3rem; font-weight: 600; color: var(--ink-dim); font-size: .9rem; }
label.check { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
input[type="text"], input[type="password"], input[type="number"], select, textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: .65rem .8rem;
  border-radius: 6px;
  font: inherit;
  font-size: 16px;  /* prevents iOS zoom-on-focus */
}
input[type="file"] { padding: .4rem; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--primary); outline-offset: -1px; border-color: transparent; }
textarea { resize: vertical; min-height: 80px; }
.big-input { font-size: 1.1rem; font-weight: 700; }

/* Flash */
.flash-stack { position: fixed; top: 12px; right: 12px; z-index: 9999; display: flex; flex-direction: column; gap: 6px; }
.flash { padding: .7rem 1rem; border-radius: 6px; background: var(--bg-3); border-left: 4px solid var(--primary); color: var(--ink); }
.flash-success { border-color: var(--ok); }
.flash-error   { border-color: var(--accent); }

/* ===================================================================== */
/* GATE & LOGIN                                                          */
/* ===================================================================== */
.gate-page { display: flex; min-height: 100vh; background:
  radial-gradient(1200px 800px at 20% 10%, #1b2333 0%, transparent 60%),
  radial-gradient(800px 600px at 90% 90%, #2a1018 0%, transparent 60%),
  var(--bg);
}
.gate-wrap { margin: auto; padding: 2rem 1rem; width: 100%; max-width: 460px; }
.gate-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
}
.gate-card h1 { margin-bottom: .2rem; }
.gate-card .btn-primary { width: 100%; margin-top: 1rem; }

/* ===================================================================== */
/* ADMIN                                                                 */
/* ===================================================================== */
.admin-page { background: var(--bg); }
.admin-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  padding: .6rem 1rem;
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: .6rem; }
.admin-nav { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; flex: 1; }
.admin-nav a { color: var(--ink-dim); padding: .4rem .7rem; border-radius: 6px; }
.admin-nav a:hover { background: var(--bg-3); color: var(--ink); text-decoration: none; }
.admin-nav a.active { background: var(--bg-3); color: var(--ink); }
.admin-nav .spacer { flex: 1; }
.admin-nav .who { color: var(--ink-mute); font-size: .9rem; }
.admin-nav .logout { color: var(--accent-soft); font-weight: 600; }

.admin-main { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem 4rem; }
.admin-main h1 { margin-top: .5rem; }

.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.2rem;
  margin: 1rem 0;
}
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: .5rem; }
.card .btn-primary, .card .btn-secondary, .card .btn-danger, .card .btn-ghost { margin-top: .3rem; }

.row { display: flex; align-items: center; gap: .6rem; }
.row.gap { gap: .6rem; }
.row.wrap { flex-wrap: wrap; }
.row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.row-form { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.row-form input { flex: 1; min-width: 160px; }

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

/* Tables */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table thead th { color: var(--ink-mute); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.table.compact th, .table.compact td { padding: .4rem .5rem; font-size: .92rem; }
.table .actions { display: flex; gap: .4rem; flex-wrap: wrap; }

.culprit-badge { background: var(--accent); color: #fff; font-weight: 700; padding: .15rem .5rem; border-radius: 4px; font-size: .7rem; letter-spacing: .1em; margin-left: .4rem; }
.culprit-badge.small { font-size: .6rem; }

.role-card .role-head { display: flex; align-items: center; gap: .8rem; margin-bottom: .5rem; }
.role-thumb { max-width: 140px; max-height: 140px; border-radius: 8px; margin-bottom: .5rem; }

.station-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.station-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 800;
}

/* Master view */
.master-status {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}
.master-status h2 { margin: .2rem 0 0; font-size: 1.4rem; }

.station-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .5rem;
  margin: 1rem 0;
}
.station-pill {
  background: var(--bg-3); color: var(--ink);
  border: 1px solid var(--line);
  text-align: left;
  display: flex; flex-direction: column; gap: .15rem;
  padding: .8rem;
}
.station-pill .num { font-size: .75rem; color: var(--ink-mute); }
.station-pill .ttl { font-weight: 700; }
.station-pill.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.station-pill.active .num { color: rgba(255,255,255,.85); }

/* ===================================================================== */
/* PLAY VIEW                                                             */
/* ===================================================================== */
.play-page {
  background:
    radial-gradient(1000px 700px at 50% 0, #161e2c 0%, transparent 60%),
    var(--bg);
  min-height: 100vh;
}

.play-top {
  position: sticky; top: 0; z-index: 30;
  background: rgba(10,13,18,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand-row {
  display: flex; align-items: center; gap: .8rem;
  padding: .55rem 1rem;
}
.brand-row .breaking-tag { margin: 0; }
.user-tag { color: var(--ink-dim); font-size: .9rem; margin-left: auto; }
.logout-link { color: var(--ink-mute); font-size: .85rem; }

.timer-bar {
  text-align: center;
  padding: .55rem 1rem;
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: .05em;
  color: var(--ink-dim);
}
.timer-bar.active { color: var(--ink); background: #1a2230; }
.timer-bar.warning { color: var(--warn); background: #2a230f; }
.timer-bar.critical {
  color: #fff;
  background: var(--accent);
  animation: critical-blink 1s infinite;
}
@keyframes critical-blink {
  0%,100% { background: var(--accent); }
  50%     { background: #c1232f; }
}

.stage { max-width: 760px; margin: 0 auto; padding: 1.5rem 1rem 4rem; }
.phase { animation: fadein .4s; }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.phase-lobby { text-align: center; padding-top: 3rem; }
.lead { font-size: 1.1rem; color: var(--ink-dim); max-width: 50ch; margin: 0 auto 1rem; }
.loader {
  width: 28px; height: 28px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 2rem auto;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Role card */
.role-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.role-card h2 { font-size: 2rem; margin: .3rem 0 1rem; }
.role-section { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.role-section h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-mute); margin-bottom: .3rem; }
.role-section.secret { background: #1a1410; border-radius: 8px; padding: .8rem 1rem; border: 1px dashed var(--warn); }
.role-section.secret h3 { color: var(--warn); }
.culprit-warning { background: #2a1014; border-radius: 8px; padding: .8rem 1rem; border: 1px solid var(--accent); }
.culprit-warning h3 { color: #fff; font-size: 1rem; }
#role-image { max-width: 100%; max-height: 260px; border-radius: 8px; }

/* News flash (videos / outros) */
.news-flash {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.2rem;
}
.news-flash h1 { margin-top: .6rem; }
.success-flash { border-color: var(--ok); }
.danger-flash { border-color: var(--accent); }
.result-box { margin-top: 1rem; padding: 1rem; background: var(--bg-3); border-radius: 8px; }
.result-box .ok { color: var(--ok); font-size: 1.1rem; font-weight: 700; }
.result-box .bad { color: var(--accent-soft); font-size: 1.1rem; font-weight: 700; }

/* Phone */
.phone-box { text-align: center; margin-top: 1.5rem; }
.phone-icon { font-size: 3rem; }
.phone-number {
  display: block; margin-top: .5rem;
  font-size: clamp(1.6rem, 6vw, 2.5rem);
  font-weight: 800;
  letter-spacing: .05em;
  color: var(--ok);
}

/* Station */
.station-progress { display: flex; gap: .35rem; margin-bottom: 1rem; flex-wrap: wrap; }
.station-progress .dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--bg-3); color: var(--ink-mute);
  font-size: .75rem; font-weight: 700;
}
.station-progress .dot.done { background: var(--ok); color: #022; }
.station-progress .dot.active { background: var(--accent); color: #fff; box-shadow: 0 0 0 3px rgba(255,46,58,.25); }

.station-content {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.2rem;
}
.station-content h2 { font-size: 1.4rem; }
.station-content #station-image { max-width: 100%; max-height: 50vh; border-radius: 8px; margin: .5rem 0; }
.prose { line-height: 1.55; color: var(--ink); white-space: normal; }

#answer-form { margin-top: 1.2rem; }
#answer-form input { font-size: 1.05rem; }
#answer-form .btn-primary { margin-top: .6rem; }
.success { color: var(--ok); }

/* Choices (player view) */
.choice-options { display: grid; gap: .55rem; margin-top: .5rem; }
.choice-btn {
  display: flex; align-items: center; gap: .8rem;
  text-align: left;
  background: var(--bg-3);
  border: 2px solid var(--line);
  color: var(--ink);
  padding: .9rem 1rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  width: 100%;
  cursor: pointer;
  transition: all .12s;
}
.choice-btn:hover { border-color: var(--primary); background: #1c2433; }
.choice-btn.selected {
  border-color: var(--accent);
  background: #2a1014;
  box-shadow: 0 0 0 3px rgba(255,46,58,.18);
}
.choice-bullet {
  display: inline-block; width: 18px; height: 18px;
  border: 2px solid var(--ink-mute);
  border-radius: 50%;
  flex: 0 0 auto;
}
.choice-btn.selected .choice-bullet {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 3px var(--bg-3);
}
.choice-label { flex: 1; }

/* Tally bars (player + admin) */
.tally-box, .admin-tally { margin-top: 1rem; }
.tally-box { padding: .8rem 0; border-top: 1px solid var(--line); }
.tally-row {
  display: grid;
  grid-template-columns: 1fr 2fr 36px;
  gap: .6rem;
  align-items: center;
  margin: .35rem 0;
}
.tally-label { font-size: .9rem; color: var(--ink); }
.tally-bar {
  background: var(--bg-3);
  border-radius: 4px;
  height: 18px;
  overflow: hidden;
  position: relative;
}
.tally-bar > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent-soft));
  transition: width .35s ease;
}
.tally-row.mine .tally-bar > span { background: linear-gradient(90deg, var(--accent), var(--accent-soft)); }
.tally-row.correct .tally-label { color: var(--ok); font-weight: 700; }
.tally-count { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-dim); font-weight: 700; }
.tag-ok { background: var(--ok); color: #022; padding: 1px 6px; border-radius: 3px; font-size: .65rem; font-weight: 800; letter-spacing: .05em; margin-left: .3rem; }

/* Admin: choice editor */
.choice-row {
  display: grid;
  grid-template-columns: 60px 1fr 40px;
  gap: .4rem;
  align-items: center;
  margin: .35rem 0;
}
.choice-row .check { margin: 0; justify-content: center; }
.player-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: .35rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .6rem;
  margin-top: .3rem;
}
.player-check { padding: .25rem .35rem; border-radius: 4px; }
.player-check:hover { background: var(--bg-3); }

hr.sep { border: 0; border-top: 1px solid var(--line); margin: 1.2rem 0; }

/* Username tag (used in admin tables) */
.username-tag {
  display: inline-block;
  background: var(--bg-3);
  color: var(--ink-dim);
  padding: 1px 8px;
  border-radius: 4px;
  font-size: .8rem;
  font-family: monospace;
}

/* Setup checklist on admin master */
.setup-checklist { border-color: var(--primary); }
.setup-checklist h2 { color: var(--primary); }
.checklist { list-style: none; padding: 0; margin: .8rem 0; }
.checklist li {
  display: flex; align-items: center; gap: .6rem;
  padding: .5rem .6rem; margin: .25rem 0;
  background: var(--bg-3); border-radius: 6px;
}
.checklist li.done { opacity: .55; }
.checklist .check-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  background: var(--bg); border: 2px solid var(--line); border-radius: 50%;
  font-weight: 700;
}
.checklist li.done .check-icon { background: var(--ok); color: #022; border-color: var(--ok); }
.checklist a { color: var(--ink); text-decoration: none; font-weight: 600; flex: 1; }
.checklist a:hover { text-decoration: underline; }

/* Login cards (printable) */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}
.login-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.2rem;
  page-break-inside: avoid;
}
.login-card h2.card-name {
  margin: .4rem 0 .8rem;
  font-size: 1.6rem;
}
.login-cred { background: var(--bg-3); border-radius: 8px; padding: .7rem 1rem; margin: .5rem 0; }
.login-row { display: flex; justify-content: space-between; padding: .25rem 0; align-items: baseline; }
.login-row .lbl { color: var(--ink-mute); font-size: .85rem; }
.login-row .val { font-size: 1.05rem; font-family: monospace; letter-spacing: .03em; }
.login-row .val.pw { color: var(--accent-soft); font-size: 1.2rem; font-weight: 800; }
.login-row .val.pw.plain { color: var(--ok); }
.login-row .val.muted-val { color: var(--ink-mute); font-size: .8rem; font-family: inherit; font-weight: normal; }
.login-url { display: flex; justify-content: space-between; align-items: baseline; padding: .4rem 0; font-size: .85rem; color: var(--ink-dim); }
.login-url .val { font-family: monospace; }
.qr-wrap { display: flex; justify-content: center; padding: .8rem 0; }
.card-foot { margin-top: .5rem; text-align: center; }

/* Player view: role pill + modal + menu */
.role-pill {
  background: var(--bg-3);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: .35rem .7rem;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  margin-left: .3rem;
}
.role-pill:hover { background: var(--bg); border-color: var(--accent); }
.play-menu { position: relative; }
.play-menu summary {
  list-style: none;
  cursor: pointer;
  padding: .35rem .55rem;
  border-radius: 6px;
  color: var(--ink-dim);
  font-size: 1.2rem;
  user-select: none;
}
.play-menu summary::-webkit-details-marker { display: none; }
.play-menu summary:hover { background: var(--bg-3); color: var(--ink); }
.play-menu[open] > summary { background: var(--bg-3); }
.play-menu .logout-link {
  position: absolute;
  right: 0; top: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .5rem .8rem;
  color: var(--accent-soft);
  font-weight: 600;
  font-size: .85rem;
  white-space: nowrap;
  margin-top: 4px;
  z-index: 100;
}

.role-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.85);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  padding: 1rem;
}
.role-modal[hidden] { display: none; }
.preview-banner + .play-top { padding-top: .5rem; }
.role-modal-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}
.role-modal-close {
  position: absolute; top: .5rem; right: .5rem;
  background: var(--bg-3);
  color: var(--ink);
  border: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
}

/* Big play button overlay for video tap-to-play */
.video-wrap { position: relative; }
.big-play-btn {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 220px; height: 60px;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 30px;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  z-index: 5;
}
.big-play-btn:hover { background: var(--accent-soft); }
.intro-no-video {
  background: var(--bg-3);
  text-align: center;
  padding: 2rem 1rem;
  border-radius: 8px;
  margin: 0;
}

/* Confirm-Antwort prominenter */
#answer-confirm {
  display: block;
  margin-top: .8rem;
  background: rgba(61,220,132,.15);
  border-left: 4px solid var(--ok);
  padding: .55rem .8rem;
  border-radius: 4px;
  font-size: .95rem;
  color: var(--ok);
  font-weight: 600;
}

/* Preview banner */
.preview-banner {
  background: var(--warn);
  color: #1a1410;
  text-align: center;
  padding: .35rem 1rem;
  font-size: .85rem;
  font-weight: 600;
}

/* Video status indicator (next to admin buttons) */
.video-status { color: var(--warn); margin-left: .25rem; font-size: .9em; }

/* Upload preview */
.upload-preview {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .4rem;
  margin: .3rem 0;
  text-align: center;
}
.upload-preview img,
.upload-preview video {
  max-width: 100%;
  max-height: 180px;
  border-radius: 4px;
  display: block;
  margin: 0 auto;
  background: #000;
}
.upload-preview .muted { word-break: break-all; margin-top: .25rem; }

/* Master block dynamic rendering */
.block-buttons { gap: .55rem; }
.block-note { background: var(--bg-3); padding: .55rem .8rem; border-radius: 6px; border-left: 3px solid var(--primary); }
.compound-widget {
  background: var(--bg-3);
  padding: .6rem .8rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}
.compound-widget label { margin: 0; }

/* Layout editor */
.layout-block { border-left: 4px solid var(--primary); }
.layout-block-head {
  display: flex; align-items: center; gap: .4rem;
  margin-bottom: .6rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--line);
}
.layout-block-num {
  background: var(--primary); color: #fff;
  padding: 2px 8px; border-radius: 4px;
  font-weight: 700; font-size: .8rem;
}
.layout-block details { margin: .5rem 0; }
.layout-block details summary {
  cursor: pointer;
  padding: .4rem .6rem;
  background: var(--bg-3);
  border-radius: 6px;
  font-weight: 600;
  color: var(--ink-dim);
  list-style: none;
}
.layout-block details summary:hover { color: var(--ink); }
.layout-block details[open] summary { background: var(--bg); }

.layout-button-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem;
  margin: .25rem 0;
  background: var(--bg-3);
  border-radius: 6px;
}
.layout-button-meta { flex: 1; min-width: 0; }
.layout-button-meta strong { display: block; }
.layout-button-meta .muted { word-break: break-all; }
.layout-button-actions { display: flex; gap: .25rem; flex-shrink: 0; }

.kind-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .03em;
  background: var(--bg);
  color: var(--ink-dim);
  margin-right: .4rem;
  border: 1px solid var(--line);
}
.kind-tag.kind-note { background: var(--primary); color: #fff; border-color: var(--primary); }
.kind-tag.kind-set_phase { background: #2a3342; color: var(--accent-soft); }
.kind-tag.kind-show_intro { background: var(--accent); color: #fff; border-color: var(--accent); }
.kind-tag.kind-timer_starter,
.kind-tag.kind-station_picker,
.kind-tag.kind-accused_finisher { background: var(--warn); color: #1a1410; border-color: var(--warn); }

.add-button-fields { padding: .8rem; background: var(--bg); border-radius: 6px; }
.add-button-fields label { font-size: .85rem; }

/* Direct content-edit link inside each button row */
.edit-content-link {
  display: inline-block;
  margin-top: .25rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}
.edit-content-link:hover { text-decoration: underline; color: var(--accent-soft); }

/* Info card on layout editor */
.info-card { border-left: 4px solid var(--warn); background: linear-gradient(180deg, var(--bg-2), var(--bg-3)); }
.info-card h3 { color: var(--warn); margin-bottom: .3rem; }
.info-list {
  margin: .6rem 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: .35rem;
}
.info-list li {
  background: var(--bg-3);
  padding: .45rem .7rem;
  border-radius: 6px;
  font-size: .9rem;
}
.info-list li a { color: var(--ink); font-weight: 600; }
.info-list li a:hover { color: var(--primary); }

@media (max-width: 600px) {
  .cards-grid { grid-template-columns: 1fr; }
  .play-menu .logout-link { right: 0; }
}

/* Mobile tweaks */
@media (max-width: 600px) {
  .row.two { grid-template-columns: 1fr; }
  .admin-nav { gap: .25rem; }
  .admin-nav a { padding: .3rem .5rem; font-size: .9rem; }
  .admin-nav .who { display: none; }
  .tally-row { grid-template-columns: 1fr 1.5fr 30px; }
}
