/* Stop / Adedonha — usa as variáveis e componentes de bingo/assets/css/common.css. */
main { max-width: 1680px; }
.stop-heading { margin-bottom: 20px; }
.stop-heading h1 { margin-bottom: 6px; font-size: clamp(1.7rem, 2.5vw, 2.2rem); }
.stop-heading p { max-width: 720px; margin: 0; }

/* ---------- Configuração ---------- */
.setup-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.setup-card { padding: 22px; min-width: 0; }
.setup-card h2 { margin: 0 0 14px; }
.setup-card .panel-heading { margin-bottom: 14px; }
.setup-card .panel-heading h2 { margin: 0; }
.setup-wide { grid-column: 1 / -1; }
.add-row { display: flex; gap: 10px; }
.add-row input { min-width: 0; flex: 1; }
.add-row button { flex: none; }
.setup-card .message { margin: 8px 0 0; min-height: 0; }
.setup-card .message:empty { display: none; }
#rounds-custom { margin-top: 10px; }
.chip-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 4px 6px 4px 14px; border-radius: 999px; background: var(--accent-light); border: 1px solid var(--line); font-weight: 650; color: var(--accent-dark); overflow-wrap: anywhere; }
.chip-list.static .chip { padding: 4px 14px; min-height: 36px; font-weight: 600; font-size: .95rem; }
.chip-remove { min-height: 36px; min-width: 36px; width: 36px; padding: 0; border-radius: 50%; font-size: 1.2rem; line-height: 1; border-width: 1px; }
.category-list { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.category-item { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 10px; background: #f6f8fe; padding-right: 6px; min-width: 0; }
.category-label { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; margin: 0; min-height: 48px; padding: 6px 12px; cursor: pointer; font-weight: 600; overflow-wrap: anywhere; }
.category-label input, .check-row input { width: 24px; height: 24px; min-height: 0; flex: none; margin: 0; accent-color: var(--accent); }
.check-row { display: flex; gap: 14px; align-items: flex-start; padding: 14px; margin: 0; background: var(--accent-light); border-radius: 12px; cursor: pointer; }
.check-row input { margin-top: 3px; }
.check-row strong { display: block; }
.check-row small { display: block; font-size: .95rem; font-weight: 400; color: var(--muted); }
.setup-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 12px; }
.setup-actions .message { flex: 1 1 260px; margin: 0; }
.setup-actions .message:empty { display: none; }
#start-game { min-width: 220px; min-height: 60px; font-size: 1.15rem; }

/* ---------- Partida ---------- */
.game-bar { padding: 12px 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.game-title { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-width: 0; }
.game-title h1 { margin: 0; font-size: clamp(1.5rem, 2.5vw, 2.2rem); }
.game-controls { display: flex; flex-wrap: wrap; gap: 10px; }
#round-badge { font-size: .95rem; white-space: normal; }
#round-badge[data-state=playing] { background: #d9f0e0; color: #14532d; }
#round-badge[data-state=paused] { background: #ffe7a8; color: #5f3a05; }
#round-badge[data-state=scoring] { background: var(--ball); color: var(--ink); }
#round-badge[data-state=finished] { background: #e4e6ef; color: #2d3350; }
#game-message { margin: 8px 2px 12px; min-height: 1.5em; }
#game-message:empty { display: none; }
.stop-layout { display: grid; grid-template-columns: minmax(340px, 440px) minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 12px; }
.stop-side { display: grid; gap: 20px; min-width: 0; }
.round-panel { --ball-size: clamp(9.5rem, 14vw, 12rem); padding: 24px 22px; text-align: center; position: sticky; top: 12px; }
.round-panel .eyebrow { font-size: .9rem; margin-bottom: 14px; color: var(--accent-dark); }
.letter-stage { display: grid; place-items: center; margin-bottom: 14px; min-height: var(--ball-size); }
#current-letter { position: relative; isolation: isolate; display: grid; place-items: center; width: var(--ball-size); aspect-ratio: 1; border-radius: 50%; font-size: calc(var(--ball-size) * .5); line-height: 1; font-weight: 800; color: var(--ink); background: radial-gradient(circle at 32% 28%, #ffe68a, var(--ball) 55%, #e8a400); border: 6px solid var(--ink); box-shadow: 0 5px 0 #10185a30; }
#current-letter::before { content: ''; position: absolute; inset: 17%; border-radius: 50%; background: #fff; z-index: -1; box-shadow: inset 0 0 0 3px #1c276022; }
[data-stage=awaiting-letter] #current-letter, [data-stage=finished] #current-letter { color: var(--muted); }
.is-revealed #current-letter { animation: letter-reveal .45s ease-out; }
@keyframes letter-reveal { 0% { opacity: 0; transform: translateY(-28px) scale(.7); } 60% { opacity: 1; transform: translateY(4px) scale(1.04); } 100% { transform: none; } }
.timer { font-size: clamp(2.6rem, 6vw, 3.6rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--ink); margin-bottom: 8px; }
.timer.low { color: var(--danger); text-decoration: underline wavy; text-underline-offset: 8px; }
.timer[data-paused=true] { opacity: .65; }
.timer[data-paused=true]::after { content: ' ⏸'; font-size: .6em; }
.round-hint { margin: 0 0 16px; min-height: 3em; color: var(--ink); font-size: 1.05rem; text-wrap: balance; }
#primary-action { width: 100%; min-height: 72px; font-size: 1.35rem; }
#primary-action[data-kind=draw]::before { content: '🔤'; font-size: 1.3em; line-height: 1; }
#primary-action[data-kind=stop] { min-height: 96px; font-size: 2rem; letter-spacing: .04em; background: var(--dauber); border-color: var(--dauber); }
#primary-action[data-kind=stop]:hover:not(:disabled) { background: #9d1b25; }
.pause-button { width: 100%; margin-top: 10px; }
.round-categories { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 14px; text-align: left; }
.round-categories h2 { font-size: 1rem; margin: 0; }
.round-categories .chip-list { margin-top: 10px; gap: 6px; }

/* Conferência */
.scoring-panel, .final-panel, .board-panel, .history-panel { padding: 20px; }
.scoring-panel h2, .final-panel h2, .history-panel h2 { margin: 0 0 6px; font-size: 1.3rem; }
.board-panel .panel-heading { margin-bottom: 12px; }
.board-panel h2 { margin: 0; font-size: 1.3rem; }
.scoring-lead { margin: 0 0 6px; }
.score-legend { margin: 0 0 14px; padding: 8px 12px; border-radius: 10px; background: var(--accent-light); color: var(--ink); font-size: .95rem; }
#scoring-categories { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.score-category { position: relative; border: 1px solid var(--line); border-radius: 14px; padding: 4px 12px 8px; background: #fbfcff; min-width: 0; }
.score-category legend { font-weight: 800; font-size: 1.1rem; padding: 0 8px; color: var(--accent-dark); }
.quick-all { position: absolute; top: -16px; right: 10px; min-height: 36px; padding: 2px 12px; font-size: .85rem; border-width: 1px; }
.score-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 4px 0; border-bottom: 1px solid #e3e8fa; }
.score-row:last-child { border-bottom: 0; }
.score-name { min-width: 0; overflow-wrap: anywhere; font-weight: 650; }
.seg { display: grid; grid-template-columns: repeat(3, 52px); flex: none; border: 2px solid #7b86bd; border-radius: 10px; overflow: hidden; background: #fff; }
.seg-opt { position: relative; margin: 0; display: block; cursor: pointer; font-weight: 700; }
.seg-opt + .seg-opt { border-left: 1px solid #b7c0e0; }
.seg-opt input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; opacity: 0; cursor: pointer; }
.seg-opt span { display: grid; place-items: center; min-height: 44px; font-size: 1.05rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.seg-opt input:checked + span { background: var(--accent); color: #fff; font-weight: 800; }
.seg-opt input:checked + span::before { content: '✓'; font-size: .7em; margin-right: 2px; }
.seg-opt input:focus-visible + span { outline: 3px solid #bd5b13; outline-offset: -3px; }
.round-summary { margin: 16px 0 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.round-summary h3 { margin: 0 0 8px; }
.round-points { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 18px; }
.round-points li { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.round-points strong { font-variant-numeric: tabular-nums; }
#confirm-round { width: 100%; min-height: 64px; font-size: 1.2rem; }
.final-text { margin: 0; font-size: 1.2rem; font-weight: 700; color: var(--ink); }
.final-panel { background: #fff8e1; border-color: var(--ball); border-width: 2px; }

/* Placar e histórico */
.scoreboard { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.scoreboard li { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 52px; padding: 6px 14px; border-radius: 10px; background: #f1f3fb; border: 1px solid #b7c0e0; }
.scoreboard .leader { background: var(--ball); border: 2px solid var(--ink); }
.scoreboard .pos { font-weight: 800; color: var(--accent-dark); }
.scoreboard .who { font-weight: 650; overflow-wrap: anywhere; }
.scoreboard .pts { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.history details { border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; background: #fbfcff; }
.history summary { min-height: 48px; display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 650; }
.hist-letter { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ball); border: 2px solid var(--ink); font-weight: 800; }
.history .round-points { padding-bottom: 12px; }
.save-status { font-size: .9rem; margin: 12px 0 0; color: var(--muted); }
.save-status.error { color: var(--danger); }

/* ---------- Telas menores ---------- */
@media (max-width: 1000px) {
  .stop-layout { grid-template-columns: 1fr; gap: 16px; }
  .round-panel { position: static; max-width: 640px; width: 100%; margin-inline: auto; }
}
@media (max-width: 700px) {
  .setup-grid { grid-template-columns: 1fr; gap: 14px; }
  .setup-card { padding: 16px; }
  .category-list { grid-template-columns: 1fr; }
  .setup-actions { flex-direction: column; align-items: stretch; }
  .setup-actions button { width: 100%; }
  .game-bar { padding: 10px; }
  .game-controls { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .game-controls button { width: 100%; padding-inline: 8px; min-height: 46px; font-size: .95rem; }
  /* Letra e tempo lado a lado: o painel não fica esticado na vertical. */
  .round-panel { --ball-size: 7.5rem; padding: 14px; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; align-items: center; text-align: left; }
  .round-panel > * { grid-column: 1 / -1; }
  .round-panel .eyebrow { margin-bottom: 8px; }
  .round-panel .letter-stage { grid-column: 1; grid-row: 2 / span 2; margin: 0; min-height: 0; }
  .round-panel .timer { grid-column: 2; grid-row: 2; font-size: 2.4rem; margin: 0; align-self: end; text-align: center; }
  .round-panel .round-hint { grid-column: 2; grid-row: 3; min-height: 0; margin: 4px 0 0; font-size: .95rem; text-align: center; align-self: start; }
  .round-panel[data-stage=awaiting-letter] .round-hint, .round-panel[data-stage=scoring] .round-hint, .round-panel[data-stage=finished] .round-hint { grid-row: 2 / span 2; align-self: center; }
  #primary-action { min-height: 60px; font-size: 1.2rem; margin-top: 14px; }
  #primary-action[data-kind=stop] { min-height: 84px; font-size: 1.8rem; }
  .pause-button { margin-top: 8px; min-height: 46px; }
  .round-categories { margin-top: 14px; padding-top: 10px; }
  .scoring-panel, .final-panel, .board-panel, .history-panel { padding: 14px 12px; }
  #scoring-categories { grid-template-columns: 1fr; gap: 22px; }
  .score-category { padding-inline: 10px; }
  .scoreboard li { padding-inline: 10px; grid-template-columns: 2.4rem minmax(0, 1fr) auto; }
}
@media (max-width: 380px) { .seg { grid-template-columns: repeat(3, 46px); } .round-panel { --ball-size: 6.5rem; } }
@media (prefers-reduced-motion: reduce) { .is-revealed #current-letter { animation: none; } }
