/* Aníbal: preto, vermelho, pedra e metal das referências do jogador. */
:root, :root:not([data-theme="light"]), :root[data-theme="dark"], :root[data-theme="light"] {
  color-scheme: dark;
  --paper: #111110;
  --surface: #1c1b19;
  --ink: #f3eadb;
  --graphite: #c3b9a9;
  --faint: #b6aa98;
  --rule: #38342e;
  --rule-strong: #615749;
  --accent: #f18a88;
  --accent-soft: #d4484514;
  --ok: #bad1ac;
  --nil: #ffa2a0;
  --nil-soft: #a8323026;
  --red: #b9323a;
  --stone: #e9dec9;
}

body { background: radial-gradient(ellipse at 0 0, #30241f 0, transparent 45%), var(--paper); }
button, input, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.sheet { max-width: 1320px; padding: 0 36px 28px; }
.masthead { padding: 26px 0 22px; align-items: center; border-bottom: 1px solid var(--rule); }
.brand-lockup { display: flex; align-items: center; gap: 16px; }
.brand-initial { width: 56px; height: 58px; display: flex; align-items: center; justify-content: center; background: var(--red); color: #fff4e3; font: italic 700 38px/1 var(--f-display); border-radius: 3px; box-shadow: inset 0 0 0 1px #ffffff20; }
.brand-initial span { margin-left: -9px; font-size: 25px; padding-top: 15px; }
.wordmark { font: 800 clamp(20px, 2.5vw, 30px)/1.1 var(--f-ui); text-transform: uppercase; letter-spacing: -.045em; }
.wordmark > span { color: #ed7376; }
.brand-caption { margin: 5px 0 0; font: 12px var(--f-mono); text-transform: uppercase; letter-spacing: .12em; color: var(--graphite); }
.brand-caption span { color: var(--ink); }
.masthead-tools { gap: 22px; }
.masthead-meta { font-size: 12px; }
.profile-nav { padding: 6px 12px; border: 1px solid var(--rule); border-radius: 4px; background: #ffffff04; }
.track { height: 3px; background: transparent; overflow: visible; }
.track-fill { background: var(--red); box-shadow: 0 0 16px #e4444430; }
.setup-title { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 32px 0 22px; }
.setup-title h2 { margin: 7px 0 0; font: 700 clamp(30px, 4vw, 46px)/1.12 var(--f-ui); letter-spacing: -.05em; }
.setup-title h2 > span { color: #e3686b; }
.setup-title > p { margin: 0; color: var(--graphite); font-size: 15px; line-height: 1.5; }
.eyebrow { font-size: 12px; line-height: 1.6; letter-spacing: .1em; }
.note { font-size: 14px; line-height: 1.65; }
.mode-row { padding: 0 0 22px; border-bottom: 1px solid var(--rule); }
.seg { border-color: var(--rule-strong); border-radius: 4px; flex-wrap: wrap; }
.seg button { color: var(--graphite); font-size: 14px; min-height: 44px; }
.seg button[aria-pressed="true"] { color: #211b15; background: var(--stone); font-weight: 600; }
.mode-row .seg button { font-size: 14px; }
.setup { grid-template-columns: minmax(290px, .77fr) minmax(0, 1.5fr); gap: 28px; padding-top: 26px; align-items: start; }
.setup-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.players-panel { padding: 24px; background: linear-gradient(150deg, #24211d, #191817); border: 1px solid var(--rule); border-radius: 6px; gap: 22px; }
.roster-row { margin-top: 8px; padding: 6px 0; }
.roster-row .idx { color: #d7967d; font-size: 13px; }
.roster-row input { color: var(--ink); font-weight: 500; }
.roster-row .drop { min-width: 36px; min-height: 44px; }
#addPlayer { margin-top: 10px; padding-left: 0; font-size: 14px; }
.field-row { gap: 10px; padding-top: 18px; }
.field-row > .eyebrow { width: 100%; }
#segTime { width: 100%; display: flex; }
#segTime button { flex: 1; padding: 10px 8px; }
.btn { border-radius: 4px; line-height: 1.4; min-height: 46px; }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff6eb; font-weight: 600; }
.btn-primary:hover { background: #ce3f45; border-color: #ce3f45; color: #fff; }
.btn-primary:disabled { color: #fff; }
.start-bar { margin: 0; padding: 0; border: 0; display: block; }
#startBtn { width: 100%; padding: 17px 20px; font-size: 17px; display: flex; justify-content: space-between; align-items: center; }
#startBtn > span { font-size: 23px; line-height: 1; }
.rules-details { margin-top: 12px; padding: 0 4px; color: var(--graphite); }
.rules-details > summary { cursor: pointer; font-size: 14px; padding: 8px 0; }
.rules-details .note { margin-top: 7px; }
.identity-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; min-width: 0; overflow: hidden; border: 1px solid var(--rule); background: #10110e; border-radius: 6px; }
.identity-art { display: block; width: 100%; height: 255px; object-fit: contain; }
.identity-copy { padding: 18px 18px 18px 4px; display: flex; flex-direction: column; align-items: flex-start; }
.identity-copy .eyebrow { font-size: 12px; }
.signature { font: 52px/1.25 'Allura', cursive; color: #e7d7bb; margin: 6px 0; }
.identity-rule { width: 35px; height: 2px; background: var(--red); margin: 7px 0 16px; }
.identity-team { text-transform: uppercase; letter-spacing: .1em; font-size: 12px; color: #da8b86; }
.identity-band { margin-top: 10px; font: 500 23px/1.1 var(--f-display); text-transform: uppercase; color: #d9ccb6; letter-spacing: .015em; }
.stone-panel, .examples {
  color-scheme: light;
  --paper: #e9dec9; --surface: #ded1bb; --ink: #211d18; --graphite: #665b4d; --faint: #6c604f;
  --rule: #cfc0a8; --rule-strong: #ac987a; --accent: #a02531; --accent-soft: #a025310b; --ok: #336037;
  background: linear-gradient(125deg, #f0e7d6, #e4d6be); color: var(--ink); border: 1px solid #cbb797;
  border-radius: 6px; box-shadow: 0 14px 32px #00000014;
}
#categoriesPanel { padding: 28px; gap: 0; }
.panel-title { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.panel-title h3 { font: 600 28px/1.18 var(--f-display); margin: 6px 0 0; letter-spacing: -.02em; }
.panel-index { font: italic 500 28px var(--f-display); color: #9c8160; white-space: nowrap; }
.category-presets { gap: 6px; margin: 22px 0 12px; }
.category-presets .btn { padding: 8px 12px; font-size: 13px; min-height: 40px; }
.category-presets .btn[aria-pressed="true"] { background: #28231d; border-color: #28231d; color: #fff5e5; }
.category-tip { margin: 0 0 22px; font-size: 14px; }
.cats { display: flex; flex-direction: column; gap: 22px; }
.category-group legend { font: 600 16px/1.4 var(--f-ui); margin-bottom: 4px; }
.category-group > .note { font-size: 13px; margin-bottom: 14px; }
.category-choices { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; counter-reset: category; }
.category-choices .cat { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 9px; min-height: 93px; padding: 12px; font-size: 14px; line-height: 1.35; background: #f8f0e34d; border: 1px solid #c3b294; border-radius: 3px; }
.category-choices .cat::before { counter-increment: category; content: counter(category, decimal-leading-zero); font: 12px var(--f-mono); color: #857156; }
.category-choices .cat[aria-pressed="true"] { background: #fff8ed; border-color: #a8363d; color: #2a211a; box-shadow: inset 0 -2px 0 #a8363d; }
.category-choices .cat[aria-pressed="true"]::after { content: '✓'; position: absolute; top: 9px; right: 11px; color: #a02531; font-size: 14px; font-weight: 700; }
.category-choices .cat:hover { background: #fff9f0; border-color: #a02531; }
.extra-categories { border-top: 1px solid var(--rule); padding-top: 14px; }
.extra-categories > summary { cursor: pointer; color: var(--ink); font-size: 14px; font-weight: 600; padding: 7px 0; }
.extra-categories[open] > .category-group { margin-top: 20px; }
#catNote { font-size: 12px; margin: 16px 0 14px; }
#categoriesPanel > .category-tip:last-child { border-top: 1px solid var(--rule); margin: 0; padding-top: 15px; }
.room-panel { margin-top: 24px; padding: 24px; border: 1px solid var(--rule-strong); background: var(--surface); border-radius: 6px; }
.room-code { color: #f1d4ad; }
.invite-panel { border-radius: 4px; }
.line-input { color: var(--ink); }
.round-grid { grid-template-columns: minmax(0,1.05fr) minmax(0,.95fr); gap: 28px; padding-top: 28px; }
.stage { padding: 25px; border: 1px solid var(--rule); border-radius: 6px; background: linear-gradient(145deg,#24201b,#161513); }
.arena-label { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 15px; border-bottom: 1px solid var(--rule); padding-bottom: 12px; margin-bottom: 12px; }
.arena-label > span:first-child { font: 700 12px var(--f-ui); text-transform: uppercase; letter-spacing: .12em; }
.arena-edition { font: 32px/1 'Allura',cursive; color: #d9c29d; }
.prompt-cat { font: 500 19px/1.5 var(--f-ui); letter-spacing: 0; max-width: 38ch; }
.prompt-description { font-size: 14px; }
.round-signal { display: flex; align-items: center; justify-content: center; gap: 28px; margin: 10px 0; }
.glyph { font: 700 124px/1 var(--f-display); color: #efdfbf; text-shadow: 1px 3px 0 #66563b, 0 15px 32px #0006; margin: 0; }
.turn-display { margin-top: 6px; }
.stage .heard { min-height: 32px; margin-top: 8px; }
.clock { padding: 9px 23px; border: 1px solid #5c4b38; border-radius: 3px; background: #0d0d0b; font-size: 30px; color: #f4e3c5; }
.turn { font-family: var(--f-ui); font-size: 24px; font-weight: 500; color: #e6aa9b; }
.controls { width: 100%; gap: 8px; margin-top: 12px; }
.controls #confirmBtn { flex: 1 1 50%; font-size: 19px; min-height: 50px; }
.controls .pause-button { flex: 1; min-width: 130px; min-height: 50px; }
.pause-button { border-color: #a79576; color: #f3e8d4; background: #e4d3aa0a; }
.pause-button[aria-pressed="true"] { background: var(--stone); color: #251d16; }
.btn-pass { font-size: 13px; border-color: var(--rule-strong); border-radius: 4px; letter-spacing: 0; text-indent: 0; text-transform: none; }
.pause-state { border-color: #967452; color: #f1d4ad; background: #96745217; border-radius: 4px; }
.typed { max-width: none; }
.typed input { font-size: 16px; color: #f4e3c5; }
.typed button { color: #f0b7b0; }
.hint { font: 13px/1.5 var(--f-ui); letter-spacing: 0; }
.folha-side { padding: 24px; min-width: 0; }
.folha-empty { font-size: 15px; line-height: 1.65; padding: 30px 0; }
.folha-head { flex-wrap: wrap; gap: 10px; padding-bottom: 15px; }
table.folha thead th { font-size: 12px; }
.result-kicker { color: #e7a293; font: 13px var(--f-mono); text-transform: uppercase; letter-spacing: .12em; margin: 0 0 18px; }
.bust-title, .final-title { font-family: var(--f-display); color: #f0dec0; line-height: 1.12; }
.bust-head { padding-top: 36px; }
.examples { padding: 26px 28px; margin-top: 28px; }
.example-words { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 20px; }
.example-words > span { font-size: clamp(23px,3vw,34px); line-height: 1.25; padding-top: 8px; }
.final-head { display: flex; justify-content: space-between; align-items: center; gap: 28px; padding: 30px 0; }
.final-copy { min-width: 0; }
.final-edition { color: var(--graphite); font-size: 14px; margin-top: 24px; }
.final-edition > span { font: 38px 'Allura',cursive; color: #e4caa2; margin-left: 8px; }
.victory-trophy { width: min(30%,230px); height: 260px; object-fit: contain; filter: drop-shadow(0 18px 24px #0008); }
.anibal-mascot { width: 110px; height: 110px; object-fit: contain; filter: drop-shadow(0 8px 14px #0005); }
.arena-label .anibal-mascot { width: 52px; height: 52px; }
.brand-lockup .anibal-mascot { width: 62px; height: 62px; }
.board-head { font-size: 12px; letter-spacing: .06em; }
.stand-row.lead { background: linear-gradient(90deg,#a6814218,transparent); }
.stand-row.lead .rank { color: #e3bd77; }
.game-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 38px; padding-top: 20px; border-top: 1px solid var(--rule); color: var(--faint); font-size: 12px; }
.game-footer > span:first-child { font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.footer-edition { font: 30px/1 'Allura',cursive; color: #ddc39e; }
.profile-dialog { border-radius: 6px; background: #1d1b18; }

@media (max-width: 1000px) {
  .sheet { padding-inline: 24px; }
  .setup { grid-template-columns: minmax(270px,.8fr) minmax(0,1.2fr); gap: 20px; }
  #categoriesPanel { padding: 22px; }
  .category-choices { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .identity-art { height: 220px; }
  .identity-copy { padding-right: 10px; }
  .signature { font-size: 44px; }
  .masthead-meta { display: none; }
  .round-grid { grid-template-columns: minmax(0,1fr) minmax(0,.85fr); gap: 20px; }
}
@media (max-width: 760px) {
  .sheet { padding-inline: 16px; }
  .masthead { padding: 18px 0; gap: 12px; }
  .brand-lockup { gap: 10px; }
  .brand-initial { width: 44px; height: 48px; font-size: 32px; }
  .wordmark { font-size: 21px; }
  .brand-caption { font-size: 12px; }
  .profile-nav { padding: 4px 8px; max-width: 160px; }
  .profile-nav > span:last-child { font-size: 13px; }
  .setup-title { padding: 24px 0 20px; align-items: center; }
  .setup-title > p { display: none; }
  .mode-row { gap: 12px; }
  .mode-row > .seg { width: 100%; display: flex; }
  .mode-row .seg button { padding-inline: 10px; flex: 1; }
  .setup { grid-template-columns: 1fr; gap: 20px; padding-top: 20px; }
  .setup-side { display: contents; }
  .players-panel { grid-row: 1; padding: 20px; gap: 18px; }
  #categoriesPanel { grid-row: 3; padding: 22px 18px; }
  .start-bar { grid-row: 2; }
  .identity-card { grid-row: 4; grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .identity-art { height: 240px; }
  .identity-copy { padding: 18px; }
  .signature { font-size: 54px; }
  .panel-title h3 { font-size: 27px; }
  .panel-index { font-size: 24px; }
  .category-presets { flex-wrap: wrap; }
  .category-presets .btn { flex-grow: 1; }
  .category-choices { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .category-choices .cat { min-height: 91px; font-size: 14px; }
  .round-grid { grid-template-columns: 1fr; padding-top: 20px; }
  .stage { padding: 20px 16px; }
  .arena-label { margin-bottom: 12px; }
  .prompt-cat { font-size: 18px; }
  .glyph { font-size: 106px; }
  .turn-display .turn { font-size: 23px; line-height: 1.3; }
  .folha-side { padding: 20px 16px; }
  .examples { padding: 22px 18px; }
  .example-words { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 14px; }
  .final-head { gap: 12px; }
  .victory-trophy { width: 30%; height: 180px; }
  .final-title { font-size: 36px; }
  .room-panel { padding: 20px 16px; }
  .room-top .btn { padding-inline: 12px; }
  .game-footer { flex-wrap: wrap; gap: 14px; }
  .game-footer > span:nth-child(2) { order: 3; flex-basis: 100%; }
  .brand-lockup .anibal-mascot { width: 46px; height: 50px; }
}
@media (max-width: 390px) {
  .brand-lockup { gap: 8px; }
  .wordmark { font-size: 18px; }
  .profile-nav { max-width: 132px; gap: 6px; }
  .profile-nav > span:last-child { font-size: 12px; }
  .profile-nav .avatar { width: 28px; height: 28px; }
}
