:root {
  --bg: #eef5f3;
  --surface: #ffffff;
  --surface-soft: #f7faf9;
  --text: #16324f;
  --muted: #5e7285;
  --border: #d8e3e0;
  --primary: #176c43;
  --primary-strong: #105433;
  --primary-soft: #dff4e8;
  --green: #2ead63;
  --blue: #2f80ed;
  --yellow: #f2c94c;
  --purple: #8e5ac8;
  --orange: #f2994a;
  --red: #c83e3e;
  --shadow: 0 14px 38px rgba(16, 46, 62, 0.12);
  --radius: 20px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(46, 173, 99, 0.12), transparent 30%),
    radial-gradient(circle at 92% 0%, rgba(47, 128, 237, 0.11), transparent 28%),
    var(--bg);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button, input, select { font: inherit; }
button { touch-action: manipulation; }

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 4px solid #0d5bd7;
  outline-offset: 3px;
}

img { max-width: 100%; display: block; }

h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.65rem, 5vw, 2.6rem); line-height: 1.12; }
h2 { font-size: clamp(1.4rem, 4vw, 2rem); line-height: 1.18; }
h3 { font-size: 1.15rem; }

.skip-link {
  position: fixed;
  left: 12px;
  top: -80px;
  z-index: 9999;
  background: #fff;
  color: #000;
  padding: 12px 18px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.skip-link:focus { top: 12px; }

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

.noscript-message {
  margin: 20px;
  padding: 18px;
  background: #fff3cd;
  border: 2px solid #d99b00;
  border-radius: 12px;
  color: #4d3700;
}

.app-shell {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: calc(18px + var(--safe-top)) 16px calc(100px + var(--safe-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.brand-button {
  appearance: none;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  padding: 6px;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
}
.brand-button img { width: 58px; height: 58px; object-fit: cover; border-radius: 14px; }
.brand-button strong { display: block; font-size: 1rem; }
.brand-button small { display: block; color: var(--muted); }

.player-turn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 14px;
  box-shadow: 0 6px 18px rgba(16, 46, 62, 0.08);
  font-weight: 700;
}
.player-dot { width: 13px; height: 13px; border-radius: 50%; background: var(--token-color, var(--green)); }

.hero-card,
.panel,
.board-card,
.question-card,
.result-card,
.settings-card,
.rule-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: clamp(20px, 4vw, 38px);
  text-align: center;
}
.hero-logo { width: min(680px, 100%); margin: 0 auto 20px; border-radius: 24px; }
.hero-description { max-width: 760px; margin: 0 auto 26px; color: var(--muted); font-size: 1.05rem; }

.partner-logos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 920px;
  margin: 26px auto 0;
}
.partner-logos img { width: 100%; min-height: 90px; object-fit: contain; background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 8px; }
.hero-card .partner-logos img { min-height: 72px; }

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}
.action-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.action-grid.compact { margin-top: 14px; }

.btn {
  min-height: 54px;
  border: 2px solid transparent;
  border-radius: 15px;
  padding: 12px 16px;
  font-weight: 700;
  color: var(--text);
  background: #edf2f4;
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(16, 46, 62, .12); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .48; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-strong); }
.btn-secondary { background: #fff; border-color: var(--border); }
.btn-danger { background: #fff; color: var(--red); border-color: rgba(200,62,62,.35); }
.btn-warning { background: #fff7df; border-color: #e6b73d; color: #694d00; }
.btn-small { min-height: 42px; padding: 9px 13px; font-size: .94rem; }
.btn-icon { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }

.panel { padding: clamp(18px, 4vw, 32px); }
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.panel-header p { color: var(--muted); margin-bottom: 0; }

.notice {
  border-radius: 14px;
  padding: 13px 15px;
  margin-bottom: 16px;
  background: #e9f4ff;
  border: 1px solid #bcdcff;
  color: #17496f;
}
.notice.success { background: #e4f6eb; border-color: #a9ddbb; color: #13552f; }
.notice.warning { background: #fff7dd; border-color: #ecd084; color: #654b00; }
.notice.error { background: #ffeded; border-color: #efb1b1; color: #7c2020; }

.setup-grid { display: grid; gap: 15px; max-width: 650px; }
.field { display: grid; gap: 7px; }
.field label { font-weight: 700; }
.field input,
.field select {
  width: 100%;
  min-height: 52px;
  border: 2px solid var(--border);
  border-radius: 13px;
  padding: 11px 13px;
  color: var(--text);
  background: #fff;
}
.field-help { font-size: .9rem; color: var(--muted); }
.player-name-fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
  align-items: start;
}
.board-card { padding: 12px; overflow: hidden; }
.board-scroll { width: 100%; overflow: auto; border-radius: 16px; background: #edf3f5; padding: 8px; }
.board-stage { position: relative; width: min(100%, 760px); min-width: 420px; margin: 0 auto; aspect-ratio: 1535 / 2048; }
.board-stage img { width: 100%; height: 100%; object-fit: contain; }

.token {
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  width: clamp(24px, 3vw, 38px);
  height: clamp(24px, 3vw, 38px);
  border-radius: 50%;
  transform: translate(calc(-50% + var(--offset-x)), calc(-50% + var(--offset-y)));
  background: var(--token-color);
  border: 4px solid #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,.32);
  z-index: 5;
  cursor: pointer;
  transition: left .25s ease, top .25s ease, transform .2s ease;
}
.token::after { content: ''; position: absolute; inset: 28%; border-radius: 50%; background: rgba(255,255,255,.82); }
.token.is-current { box-shadow: 0 0 0 5px #fff, 0 0 0 10px rgba(13,91,215,.75), 0 8px 18px rgba(0,0,0,.32); z-index: 8; }
.token.is-moving { animation: tokenPulse .7s infinite alternate; }
.token span { transform: rotate(45deg); display: block; position: absolute; left: -100vw; }

.sidebar { display: grid; gap: 14px; }
.status-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 17px; box-shadow: 0 8px 22px rgba(16,46,62,.09); }
.status-card h2 { margin-bottom: 12px; font-size: 1.2rem; }
.player-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.player-row { display: grid; grid-template-columns: 15px 1fr auto; gap: 9px; align-items: center; padding: 9px; border-radius: 11px; background: var(--surface-soft); }
.player-row.current { background: #e8f0ff; outline: 2px solid #8db8ff; }
.player-row .position { font-weight: 700; font-size: .92rem; }

.category-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.category-button {
  min-height: 135px;
  padding: 18px;
  border: 4px solid transparent;
  border-radius: 19px;
  color: #fff;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  position: relative;
  box-shadow: 0 10px 24px rgba(16,46,62,.13);
}
.category-button small { display: block; margin-top: 8px; font-weight: 600; opacity: .93; }
.category-button.green { background: var(--green); }
.category-button.blue { background: var(--blue); }
.category-button.yellow { background: var(--yellow); color: #4a3a00; }
.category-button.purple { background: var(--purple); }
.category-button.suggested { border-color: #fff; box-shadow: 0 0 0 5px #0d5bd7, 0 12px 26px rgba(13,91,215,.28); }
.suggested-badge { position: absolute; right: 10px; top: 10px; background: #fff; color: #0d3970; padding: 5px 8px; border-radius: 999px; font-size: .75rem; }

.question-card { padding: clamp(18px, 4vw, 32px); }
.question-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 15px; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 6px 10px; font-size: .83rem; font-weight: 800; background: #edf2f4; }
.badge.green { background: #dff4e8; color: #0c6133; }
.badge.blue { background: #e1efff; color: #1356a4; }
.badge.yellow { background: #fff3c4; color: #624b00; }
.badge.purple { background: #eee3f8; color: #603692; }
.question-text { font-size: clamp(1.25rem, 3vw, 1.8rem); line-height: 1.3; margin-bottom: 20px; }
.answer-list { display: grid; gap: 11px; }
.answer-btn { min-height: 58px; text-align: left; background: #fff; border: 2px solid var(--border); border-radius: 14px; padding: 13px 15px; color: var(--text); font-weight: 700; cursor: pointer; }
.answer-btn:hover:not(:disabled) { border-color: #7ea6c7; background: #f3f8fc; }
.answer-btn.correct { background: #dff4e8; border-color: #249953; color: #104e2b; }
.answer-btn.wrong { background: #ffdddd; border-color: #c83e3e; color: #791d1d; }
.answer-marker { display: inline-block; min-width: 26px; font-weight: 900; }
.explanation { margin-top: 16px; padding: 14px; border-radius: 13px; background: var(--surface-soft); border-left: 5px solid #6b879a; }

.dice-display { width: 118px; height: 118px; margin: 18px auto; border-radius: 24px; background: #fff; border: 5px solid var(--text); display: grid; place-items: center; font-size: 3.6rem; font-weight: 900; box-shadow: var(--shadow); }
.dice-display.rolling { animation: diceRoll .65s ease-in-out; }
.number-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; max-width: 520px; margin: 16px auto; }
.number-grid .btn { font-size: 1.45rem; min-height: 70px; }

.movement-summary { text-align: center; font-size: 1.25rem; margin: 16px 0; }
.player-selector { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin: 15px 0; }
.player-choice { border: 2px solid var(--border); background: #fff; border-radius: 999px; padding: 9px 13px; cursor: pointer; font-weight: 700; }
.player-choice.selected { border-color: #0d5bd7; background: #e7f0ff; }

.cards-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 12px; }
.card-back {
  min-height: 170px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(145deg, #c83e3e, #f2994a);
  color: #fff;
  font-size: 2rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(98,42,20,.24);
  position: relative;
  overflow: hidden;
}
.card-back::before { content: ''; position: absolute; inset: 10px; border: 3px solid rgba(255,255,255,.78); border-radius: 12px; }
.card-back span { position: relative; z-index: 2; }
.card-back:disabled { filter: grayscale(1); opacity: .34; cursor: not-allowed; }
.card-result { padding: clamp(22px, 5vw, 42px); text-align: center; }
.card-result.autonomia { border-top: 10px solid var(--green); }
.card-result.armadilha { border-top: 10px solid var(--orange); }
.card-type { text-transform: uppercase; letter-spacing: .08em; font-weight: 900; color: var(--muted); }
.card-consequence { font-size: 1.35rem; font-weight: 900; margin: 18px 0; }

.roulette-wrap { display: grid; place-items: center; padding: 12px 0 24px; }
.roulette {
  width: min(330px, 78vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(var(--green) 0 25%, var(--blue) 25% 50%, var(--yellow) 50% 75%, var(--purple) 75% 100%);
  border: 12px solid #fff;
  box-shadow: 0 0 0 5px #bccbd4, var(--shadow);
  position: relative;
  transition: transform 1.4s cubic-bezier(.2,.8,.25,1);
}
.roulette::after { content: ''; position: absolute; inset: 42%; border-radius: 50%; background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.roulette-pointer { width: 0; height: 0; border-left: 18px solid transparent; border-right: 18px solid transparent; border-top: 34px solid var(--text); margin-bottom: -14px; z-index: 3; }
.roulette-result { text-align: center; font-size: 1.35rem; font-weight: 900; min-height: 40px; }

.rules-layout { display: grid; grid-template-columns: 240px minmax(0,1fr); gap: 16px; }
.rule-steps { display: grid; gap: 8px; align-content: start; }
.rule-step-button { text-align: left; min-height: 46px; border: 1px solid var(--border); border-radius: 11px; background: #fff; padding: 10px; cursor: pointer; font-weight: 700; }
.rule-step-button.active { background: var(--primary); color: #fff; }
.rule-card { padding: clamp(19px, 4vw, 34px); min-height: 320px; }
.rule-card ul { padding-left: 22px; }
.rule-nav { display: flex; gap: 10px; justify-content: space-between; margin-top: 24px; }

.settings-grid { display: grid; gap: 13px; }
.setting-row { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-soft); }
.setting-row p { margin: 4px 0 0; color: var(--muted); font-size: .92rem; }
.toggle { width: 58px; height: 34px; position: relative; display: inline-block; }
.toggle input { position: absolute; opacity: 0; }
.toggle span { position: absolute; inset: 0; border-radius: 999px; background: #8795a1; cursor: pointer; transition: .2s; }
.toggle span::after { content: ''; position: absolute; width: 26px; height: 26px; left: 4px; top: 4px; background: #fff; border-radius: 50%; box-shadow: 0 2px 6px rgba(0,0,0,.25); transition: .2s; }
.toggle input:checked + span { background: var(--primary); }
.toggle input:checked + span::after { transform: translateX(24px); }
.range-row { display: grid; grid-template-columns: 1fr 70px; gap: 10px; align-items: center; }
.range-row input { width: 100%; }

.about-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px; align-items: start; }
.about-list { display: grid; gap: 11px; }
.about-item { padding: 14px; border-radius: 14px; background: var(--surface-soft); border-left: 5px solid var(--green); }

.victory-card { text-align: center; padding: clamp(28px, 7vw, 62px); overflow: hidden; position: relative; }
.victory-emoji { font-size: 5rem; animation: victoryBounce 1s infinite alternate; }
.confetti { position: absolute; width: 12px; height: 24px; background: var(--confetti); top: -30px; left: var(--left); animation: confettiFall 2.8s linear infinite; animation-delay: var(--delay); }

.global-voice-button {
  position: fixed;
  right: 14px;
  bottom: calc(14px + var(--safe-bottom));
  z-index: 1000;
  min-height: 52px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  padding: 10px 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 28px rgba(0,0,0,.22);
  cursor: pointer;
  font-weight: 800;
}
.global-voice-button.is-off { background: #596a77; }

.toast-region { position: fixed; left: 50%; bottom: calc(78px + var(--safe-bottom)); transform: translateX(-50%); z-index: 2000; width: min(92vw, 620px); display: grid; gap: 8px; pointer-events: none; }
.toast { background: #16324f; color: #fff; padding: 13px 16px; border-radius: 13px; box-shadow: var(--shadow); animation: toastIn .2s ease; }
.toast.warning { background: #6b5000; }
.toast.error { background: #8a2525; }
.toast.success { background: #14633a; }

.modal-overlay { position: fixed; inset: 0; z-index: 3000; background: rgba(6,22,31,.65); display: grid; place-items: center; padding: 18px; }
.modal { width: min(560px, 100%); max-height: 90vh; overflow: auto; background: #fff; border-radius: 20px; padding: 22px; box-shadow: 0 24px 70px rgba(0,0,0,.35); }
.modal h2 { margin-bottom: 10px; }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 20px; }

.empty-state { text-align: center; padding: 30px 14px; color: var(--muted); }
.question-browser-list { display: grid; gap: 10px; }
.browser-question { border: 1px solid var(--border); border-radius: 13px; padding: 13px; background: var(--surface-soft); }
.browser-question summary { cursor: pointer; font-weight: 800; }
.browser-question p { margin: 10px 0 0; }

@keyframes tokenPulse { from { filter: brightness(1); } to { filter: brightness(1.25) drop-shadow(0 0 9px rgba(13,91,215,.8)); } }
@keyframes diceRoll { 0% { transform: rotate(0) scale(.86); } 50% { transform: rotate(210deg) scale(1.12); } 100% { transform: rotate(360deg) scale(1); } }
@keyframes victoryBounce { from { transform: translateY(0) scale(1); } to { transform: translateY(-10px) scale(1.06); } }
@keyframes confettiFall { to { transform: translateY(110vh) rotate(620deg); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 950px) {
  .game-layout { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .cards-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .rules-layout { grid-template-columns: 1fr; }
  .rule-steps { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .about-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .app-shell { padding-left: 10px; padding-right: 10px; }
  .topbar { align-items: flex-start; }
  .brand-button small { display: none; }
  .brand-button img { width: 46px; height: 46px; }
  .player-turn { font-size: .9rem; padding: 8px 10px; }
  .action-grid,
  .action-grid.three,
  .category-grid,
  .partner-logos,
  .player-name-fields,
  .sidebar { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .card-back { min-height: 145px; }
  .rule-steps { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .setting-row { grid-template-columns: 1fr auto; }
  .voice-status { display: none; }
  .global-voice-button { width: 54px; padding: 10px; justify-content: center; }
  .board-stage { min-width: 360px; }
}

@media (orientation: landscape) and (max-height: 580px) {
  .app-shell { padding-top: 8px; }
  .hero-logo { max-height: 150px; object-fit: contain; }
  .card-back { min-height: 125px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

.target-highlight {
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  width: clamp(54px, 7vw, 84px);
  height: clamp(54px, 7vw, 84px);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 6px solid #0d5bd7;
  box-shadow: 0 0 0 8px rgba(255,255,255,.82), 0 0 24px 12px rgba(13,91,215,.65);
  z-index: 4;
  pointer-events: none;
  animation: targetPulse .85s infinite alternate;
}

.board-error {
  position: absolute;
  inset: 20% 10% auto;
  z-index: 20;
  text-align: center;
}

@keyframes targetPulse {
  from { transform: translate(-50%, -50%) scale(.9); opacity: .72; }
  to { transform: translate(-50%, -50%) scale(1.08); opacity: 1; }
}

/* Orientação visual da primeira rodada */
.round-guide-hint {
  margin: 0 0 12px;
  padding: 11px 12px;
  border-radius: 12px;
  background: #fff7d7;
  border: 1px solid #e5bf48;
  color: #624b00;
  font-size: .92rem;
}

.is-guided-action {
  position: relative;
  z-index: 1;
  border-color: #0d5bd7 !important;
  animation: guidedActionPulse .8s ease-in-out infinite alternate;
}

.first-action-guide { display: grid; gap: 8px; }
.first-action-guide p { margin: 0; }
.guide-icon { font-size: 3rem; text-align: center; }

/* Hub e pergunta sobre o tabuleiro */
.question-modal-overlay {
  background: rgba(6, 22, 31, .48);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.question-modal {
  width: min(760px, 96vw);
  max-height: 88vh;
  padding: 18px;
  border: 2px solid rgba(255,255,255,.82);
}

.question-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.question-modal-header h2 { margin: 0; font-size: clamp(1.35rem, 4vw, 2rem); }
.question-modal-kicker {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.question-modal-close {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #fff;
  color: var(--text);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.question-modal-body { min-height: 0; }
.question-modal-intro { margin: 0 0 13px; color: var(--muted); }
.question-hub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.question-theme-button {
  min-height: 78px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 11px 12px;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  position: relative;
}
.question-theme-button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(16,46,62,.12); }
.question-theme-button:disabled { opacity: .45; cursor: not-allowed; }
.question-theme-button strong { display: block; font-size: 1rem; }
.question-theme-button small { display: block; margin-top: 2px; color: var(--muted); line-height: 1.2; }
.question-theme-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--theme-color); box-shadow: 0 0 0 4px rgba(0,0,0,.05); }
.question-theme-button.green { --theme-color: var(--green); }
.question-theme-button.blue { --theme-color: var(--blue); }
.question-theme-button.yellow { --theme-color: var(--yellow); }
.question-theme-button.purple { --theme-color: var(--purple); }
.question-theme-button.suggested { border-color: #0d5bd7; background: #f4f8ff; box-shadow: inset 0 0 0 1px #0d5bd7; }
.compact-suggested-badge { padding: 4px 7px; border-radius: 999px; background: #0d5bd7; color: #fff; font-size: .7rem; font-weight: 800; }
.question-modal-footer { display: flex; justify-content: flex-end; margin-top: 14px; }
.question-modal-tools { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.question-modal-tools .question-meta { margin-bottom: 10px; }
.modal-question-text { margin-bottom: 15px; font-size: clamp(1.15rem, 3vw, 1.55rem); }
.modal-result { margin-top: 14px; }
.question-result-actions { grid-template-columns: repeat(2, minmax(0,1fr)); }

@keyframes guidedActionPulse {
  from { box-shadow: 0 0 0 0 rgba(13,91,215,.3), 0 4px 12px rgba(16,46,62,.1); transform: scale(1); }
  to { box-shadow: 0 0 0 8px rgba(13,91,215,.14), 0 0 22px rgba(13,91,215,.55); transform: scale(1.025); }
}

@media (max-width: 620px) {
  .question-modal-overlay { padding: 8px; align-items: end; }
  .question-modal { width: 100%; max-height: 91vh; border-radius: 20px 20px 12px 12px; padding: 15px; }
  .question-hub-grid { grid-template-columns: 1fr; gap: 8px; }
  .question-theme-button { min-height: 68px; }
  .question-modal-tools { display: grid; }
  .question-result-actions { grid-template-columns: 1fr; }
}
