/* ============ cores e medidas ============ */
:root {
  --red: #e3262f;
  --yellow: #f5c400;
  --green: #2fa84f;
  --blue: #1f6fd1;
  --black: #151515;
  --felt: #1c7547;
  --felt-dark: #0b3a24;
  --cur: #ffffff; /* cor da vez — o JS troca */
  --cw: clamp(58px, 11vw, 92px); /* largura da carta */
  --font-fun: 'Lilita One', 'Arial Black', Impact, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: 'Nunito', system-ui, sans-serif;
  color: #fff;
  background: radial-gradient(circle at 50% 42%, var(--felt), var(--felt-dark) 75%);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; cursor: pointer; }
.hidden { display: none !important; }

/* ============ tela inicial ============ */
.screen { height: 100%; }
#start { display: grid; place-items: center; padding: 16px; overflow-y: auto; }
#start .start-box { margin: auto 0; }
.start-box {
  width: min(360px, 100%);
  display: flex; flex-direction: column; gap: 16px;
  background: rgba(0, 0, 0, .28);
  padding: 28px 24px; border-radius: 22px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
}
.logo {
  align-self: center; position: relative;
  font-family: var(--font-fun); font-size: 64px; line-height: 1.1;
  color: var(--yellow);
  background: linear-gradient(160deg, #8e2bc4, #3b0a57);
  padding: 6px 30px 10px; border-radius: 22px;
  transform: rotate(-4deg); margin: 10px 0 14px;
  text-shadow: 3px 3px 0 #000; border: 5px solid #fff;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .3);
}
.logo-devil {
  position: absolute; top: -22px; right: -20px; font-size: 40px; text-shadow: none;
  transform: rotate(14deg);
}
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 800; }
.field input {
  padding: 10px 12px; border-radius: 10px; border: 0;
  font: inherit; font-size: 17px;
}
.seg { display: flex; gap: 6px; }
.seg button {
  flex: 1; padding: 9px 0; border-radius: 10px; border: 2px solid rgba(255, 255, 255, .35);
  background: transparent; color: #fff; font-weight: 800;
}
.seg button.on { background: #fff; color: var(--felt-dark); border-color: #fff; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 700; }
.check input { width: 20px; height: 20px; }
.check small { opacity: .7; }
.big {
  padding: 14px; border: 0; border-radius: 14px;
  background: var(--yellow); color: #000;
  font-family: var(--font-fun); font-size: 24px; letter-spacing: 1px;
  box-shadow: 0 5px 0 #b38f00;
}
.big:active { transform: translateY(3px); box-shadow: 0 2px 0 #b38f00; }
.link { background: none; border: 0; color: #fff; text-decoration: underline; opacity: .85; }

/* ============ mesa ============ */
#table {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) auto minmax(80px, 1fr);
  grid-template-rows: auto auto 1fr auto;
  grid-template-areas:
    "bar bar bar"
    ". top ."
    "left center right"
    "me me me";
  position: relative;
}
.topbar {
  grid-area: bar;
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 14px; font-weight: 800; opacity: .9;
}
.icon {
  width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: rgba(0, 0, 0, .25); color: #fff; font-size: 17px;
}
#slot-top { grid-area: top; }
#slot-left { grid-area: left; }
#slot-right { grid-area: right; }
.slot { display: flex; justify-content: center; align-items: center; padding: 6px; min-width: 0; }

/* ---- adversário ---- */
.opp {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 12px; border-radius: 16px;
  background: rgba(0, 0, 0, .18);
  transition: box-shadow .25s, background .25s;
  position: relative; max-width: 100%;
}
.opp.turn { background: rgba(255, 255, 255, .14); box-shadow: 0 0 0 3px var(--yellow), 0 0 22px var(--yellow); }
.opp-head { display: flex; align-items: center; gap: 6px; font-weight: 800; white-space: nowrap; }
.avatar { font-size: 26px; }
.opp-score { font-size: 12px; opacity: .75; }
.fan { display: flex; --cw: 30px; }
.fan .card + .card { margin-left: -20px; }
.count {
  position: absolute; top: -8px; right: -8px;
  min-width: 28px; height: 28px; padding: 0 6px; border-radius: 14px;
  display: grid; place-items: center;
  background: #fff; color: #000; font-weight: 800;
}
.badge-uno {
  position: absolute; bottom: -12px;
  font-family: var(--font-fun); color: var(--yellow); background: var(--red);
  padding: 1px 10px; border-radius: 10px; font-size: 16px;
  border: 2px solid #fff; transform: rotate(-6deg);
}

/* ---- centro ---- */
#center {
  grid-area: center;
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 10px;
  min-height: calc(var(--cw) * 2.6);
}
#ring {
  position: absolute; left: 50%; top: 50%;
  width: calc(var(--cw) * 3.6); aspect-ratio: 1;
  transform: translate(-50%, -58%);
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--cur) 35%, transparent), transparent 70%);
  transition: background .4s;
  pointer-events: none;
}
#dir {
  position: absolute; left: 50%; top: 50%;
  width: calc(var(--cw) * 3.3); aspect-ratio: 1;
  transform: translate(-50%, -58%);
  color: var(--cur); opacity: .8;
  pointer-events: none; transition: color .4s;
}
#dir svg { width: 100%; height: 100%; animation: spin 14s linear infinite; }
#dir path { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
#dir path[d^="M0"] { fill: currentColor; stroke: none; }
#dir.ccw { transform: translate(-50%, -58%) scaleX(-1); }
@keyframes spin { to { transform: rotate(360deg); } }

.piles { display: flex; gap: calc(var(--cw) * .45); align-items: center; position: relative; }
#deck { position: relative; cursor: pointer; }
#deck::before, #deck::after {
  /* efeito de pilha grossa */
  content: ''; position: absolute; inset: 0;
  border-radius: calc(var(--cw) * .12); background: #333;
}
#deck::before { transform: translate(4px, 4px); }
#deck::after { transform: translate(2px, 2px); background: #222; }
#deck .card { position: relative; z-index: 1; }
#deck.pulse .card { animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.06); box-shadow: 0 0 0 4px var(--yellow), 0 0 24px var(--yellow); } }
#pending {
  position: absolute; z-index: 2; top: -12px; right: -12px;
  background: var(--red); border: 3px solid #fff; border-radius: 20px;
  padding: 2px 10px; font-family: var(--font-fun); font-size: 20px;
}
#discard { position: relative; width: var(--cw); height: calc(var(--cw) * 1.5); }
#discard .card { position: absolute; inset: 0; }
#status {
  position: relative; min-height: 1.6em;
  font-weight: 800; font-size: clamp(14px, 2.4vw, 18px); text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, .5);
}

/* ---- você ---- */
#me { grid-area: me; padding: 4px 10px 14px; border-radius: 22px 22px 0 0; transition: background .25s; }
#me.turn { background: linear-gradient(to top, rgba(245, 196, 0, .22), transparent); }
.me-bar { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; flex-wrap: wrap; }
#me-name { font-weight: 800; font-size: 17px; }
#me-score { font-size: 13px; opacity: .75; }
#btn-uno, #btn-pass, #btn-catch {
  border: 3px solid #fff; border-radius: 30px; padding: 6px 18px;
  font-family: var(--font-fun); font-size: 20px; letter-spacing: 1px;
}
#btn-uno { background: var(--red); color: var(--yellow); animation: wobble 1s ease-in-out infinite; }
#btn-pass { background: rgba(0, 0, 0, .35); color: #fff; }
#btn-catch {
  position: absolute; left: 50%; top: 42%; transform: translateX(-50%);
  background: var(--yellow); color: #000; z-index: 20;
  font-size: 26px; padding: 10px 26px;
  animation: wobble .6s ease-in-out infinite;
}
@keyframes wobble { 50% { rotate: -5deg; scale: 1.06; } }

#hand {
  display: flex; justify-content: center;
  padding-top: 18px; min-height: calc(var(--cw) * 1.5 + 22px);
  --gap: 6px;
}
#hand .card + .card { margin-left: var(--gap); }
#hand .card { transition: transform .15s, filter .2s; cursor: pointer; }
#hand .card.playable { transform: translateY(-10px); }
#hand .card.playable:hover { transform: translateY(-20px); z-index: 5; }
#hand .card.dim { filter: brightness(.6) saturate(.7); }
#hand .card.new { box-shadow: 0 0 0 3px var(--yellow), 0 0 18px var(--yellow); }
#hand.deal .card { animation: deal .4s both; animation-delay: calc(var(--i) * 55ms); }
@keyframes deal { from { opacity: 0; transform: translateY(-160px) scale(.6); } }
.shake { animation: shake .3s !important; }
@keyframes shake { 25% { translate: -6px 0; } 75% { translate: 6px 0; } }

/* ============ a carta ============ */
.card {
  --c: var(--black);
  width: var(--cw); height: calc(var(--cw) * 1.5);
  border-radius: calc(var(--cw) * .12);
  background: #fff;
  position: relative; flex: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
  user-select: none;
}
.card.c-red { --c: var(--red); }
.card.c-yellow { --c: var(--yellow); }
.card.c-green { --c: var(--green); }
.card.c-blue { --c: var(--blue); }
.card .face {
  position: absolute; inset: calc(var(--cw) * .065);
  border-radius: calc(var(--cw) * .08);
  background: var(--c); overflow: hidden;
}
.card .oval {
  position: absolute; left: 50%; top: 50%;
  width: 78%; height: 104%;
  background: #fff; border-radius: 50%;
  transform: translate(-50%, -50%) rotate(28deg);
  display: grid; place-items: center;
}
.card .sym {
  transform: rotate(-28deg);
  font-family: var(--font-fun);
  font-size: calc(var(--cw) * .56); line-height: 1;
  color: var(--c);
  text-shadow: calc(var(--cw) * .025) calc(var(--cw) * .025) 0 #000;
  -webkit-text-stroke: calc(var(--cw) * .012) #000;
}
.card .corner {
  position: absolute; z-index: 1;
  font-family: var(--font-fun); font-size: calc(var(--cw) * .2); line-height: 1;
  color: #fff; text-shadow: 1px 1px 0 #000;
}
.card .corner.tl { top: calc(var(--cw) * .1); left: calc(var(--cw) * .12); }
.card .corner.br { bottom: calc(var(--cw) * .1); right: calc(var(--cw) * .12); transform: rotate(180deg); }
.card .u { text-decoration: underline; } /* 6 e 9 sublinhados */
.card.v-skip .sym, .card.v-reverse .sym { font-size: calc(var(--cw) * .5); }
.card.v-draw2 .sym, .card.v-wild4 .sym { font-size: calc(var(--cw) * .4); }

/* coringa: oval com as 4 cores */
.card.c-black .oval {
  background: conic-gradient(var(--red) 0 25%, var(--blue) 0 50%, var(--yellow) 0 75%, var(--green) 0);
}
.card.c-black .sym { color: #fff; }
/* coringa na mesa mostra a cor escolhida em volta */
#discard .card.chosen { box-shadow: 0 0 0 4px var(--cur), 0 4px 14px rgba(0, 0, 0, .5); }

/* verso */
/* verso do Mal-mal!: roxo com MAL MAL */
.card.back .face { background: radial-gradient(circle at 50% 40%, #8e2bc4, #2a0838 75%); }
.card.back .oval { background: #1a0426; border: calc(var(--cw) * .03) solid var(--yellow); }
.card.back .sym {
  color: var(--yellow); font-size: calc(var(--cw) * .22); line-height: .95; text-align: center;
  transform: rotate(-28deg);
}
.fan .card.back .sym { display: none; }

/* carta voando (animação) */
.flyer { position: fixed; z-index: 50; pointer-events: none; }

/* ============ avisos ============ */
#toasts {
  position: absolute; left: 50%; top: 56px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  pointer-events: none; z-index: 30;
}
.toast {
  background: rgba(0, 0, 0, .78); padding: 7px 16px; border-radius: 20px;
  font-weight: 800; white-space: nowrap;
  animation: toast 2.4s forwards;
}
@keyframes toast {
  0% { opacity: 0; transform: translateY(-8px); }
  10%, 80% { opacity: 1; transform: none; }
  100% { opacity: 0; }
}
.bubble {
  position: absolute; z-index: 40; pointer-events: none;
  font-family: var(--font-fun); font-size: 30px;
  color: var(--yellow); background: var(--red);
  padding: 4px 16px; border-radius: 22px; border: 3px solid #fff;
  animation: bubble 1.3s forwards;
}
@keyframes bubble {
  0% { opacity: 0; transform: translate(-50%, 0) scale(.4); }
  20% { opacity: 1; transform: translate(-50%, -20px) scale(1.15) rotate(-6deg); }
  80% { opacity: 1; transform: translate(-50%, -26px) scale(1) rotate(-6deg); }
  100% { opacity: 0; transform: translate(-50%, -40px); }
}

/* ============ janelas ============ */
.modal {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center; padding: 16px;
  background: rgba(0, 0, 0, .55);
}
.modal-box {
  width: min(380px, 100%);
  background: #fff; color: #111;
  border-radius: 22px; padding: 22px;
  display: flex; flex-direction: column; gap: 14px; text-align: center;
  animation: pop .25s;
  max-height: 100%; overflow: auto;
}
.modal-box h2 { margin: 0; font-family: var(--font-fun); font-weight: 400; font-size: 28px; }
.modal-box .link { color: #555; }
@keyframes pop { from { transform: scale(.8); opacity: 0; } }
.colors { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.swatch { aspect-ratio: 1.4; border: 0; border-radius: 16px; box-shadow: 0 4px 0 rgba(0, 0, 0, .25); }
.swatch:hover { transform: scale(1.05); }
.swatch.red { background: var(--red); }
.swatch.yellow { background: var(--yellow); }
.swatch.green { background: var(--green); }
.swatch.blue { background: var(--blue); }
#round-points { margin: 0; font-weight: 800; font-size: 18px; }
#scoreboard { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; text-align: left; }
#scoreboard li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-weight: 800; }
#scoreboard .bar { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: #eee; overflow: hidden; }
#scoreboard .bar i { display: block; height: 100%; background: var(--green); border-radius: 4px; transition: width .8s; }
#scoreboard li.win .bar i { background: var(--yellow); }
.rules { text-align: left; }
.rules h2 { text-align: center; }
.rules ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; line-height: 1.4; }

/* confete */
.confetti {
  position: fixed; top: -12px; z-index: 70; width: 10px; height: 14px;
  pointer-events: none; animation: fall linear forwards;
}
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* ============ regras da casa ============ */
.rule-list { display: flex; flex-direction: column; gap: 6px; }
.rule {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px;
  padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .08);
  cursor: pointer; font-weight: 800;
}
.rule small { grid-column: 1; font-weight: 600; opacity: .75; font-size: 12px; line-height: 1.3; }
.rule input { position: absolute; opacity: 0; pointer-events: none; }
.switch {
  grid-column: 2; grid-row: 1 / span 2;
  width: 44px; height: 26px; border-radius: 13px; background: rgba(0, 0, 0, .35);
  position: relative; transition: background .2s;
}
.switch::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; transition: transform .2s;
}
.rule input:checked + .switch { background: var(--yellow); }
.rule input:checked + .switch::after { transform: translateX(18px); }
.topbar-right { display: flex; gap: 8px; }
.house-btn {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px; border-radius: 12px; border: 2px solid rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .08); color: #fff; font-weight: 800; font-size: 16px;
}
.house-btn:hover { border-color: var(--yellow); }
#house-count { font-size: 13px; opacity: .85; }
/* a janela das regras é branca: as regras ficam escuras lá dentro */
.house-box { width: min(560px, 100%); text-align: left; }
.house-box h2 { text-align: center; }
.house-box .rule { background: #f3f3f3; color: #111; }
.house-box .switch { background: #ccc; }
@media (min-width: 760px) { .house-box .rule-list { display: grid; grid-template-columns: 1fr 1fr; } }
.rules h3 { margin: 6px 0 0; font-family: var(--font-fun); font-weight: 400; }
#rules-house li.off { opacity: .45; }

/* ============ carta Estaca Zero ============ */
.card.v-freeze .face { background: linear-gradient(160deg, #a5e3ff, #1d7fc4); }
.card.v-freeze .oval { background: #fff; }
.card.v-freeze .sym { color: #1d7fc4; -webkit-text-stroke: 0; text-shadow: none; font-size: calc(var(--cw) * .5); }
.card.v-freeze .corner { font-size: calc(var(--cw) * .18); }

/* ============ cortar ============ */
#hand .card.cut {
  transform: translateY(-12px);
  box-shadow: 0 0 0 3px #ff8a00, 0 0 20px #ff8a00;
  animation: cutpulse .9s ease-in-out infinite;
}
@keyframes cutpulse { 50% { box-shadow: 0 0 0 4px #ffb347, 0 0 30px #ff8a00; } }
#status.cut-msg { color: #ffb347; }

/* ============ arrastar / pilha ============ */
#hand .card, #tray .card { touch-action: none; }
.card.dragging { opacity: .25; }
.flyer.drag .card { transform: rotate(-6deg) scale(1.08); box-shadow: 0 12px 30px rgba(0, 0, 0, .5); }
body.dragging-on, body.dragging-on * { cursor: grabbing !important; user-select: none; }
#tray {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: fit-content; max-width: 100%; min-height: 40px;
  margin: 0 auto 2px; padding: 6px 12px;
  border: 2px dashed rgba(255, 255, 255, .35); border-radius: 14px;
  transition: background .15s, border-color .15s;
}
#tray.has .tray-hint { display: none; }
.tray-hint { font-size: 13px; opacity: .75; }
.tray-cards { display: flex; gap: 4px; --cw: clamp(44px, 8vw, 66px); }
.tray-cards .card { cursor: grab; }
.tray-cards .ord {
  position: absolute; z-index: 2; top: -9px; left: 50%; transform: translateX(-50%);
  background: #000; color: #fff; font-size: 11px; font-weight: 800;
  padding: 0 6px; border-radius: 8px; white-space: nowrap;
}
#tray.drop-hover { border-color: var(--yellow); background: rgba(245, 196, 0, .15); }
#tray.bad { border-color: #ff6b6b; }
#discard.drop-hover { filter: drop-shadow(0 0 14px var(--yellow)); }
#btn-tray-play {
  border: 3px solid #fff; border-radius: 30px; padding: 5px 16px;
  background: var(--green); color: #fff; font-family: var(--font-fun); font-size: 18px;
}
#btn-tray-play:disabled { background: #666; opacity: .7; cursor: not-allowed; }
#btn-tray-clear { width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .35); color: #fff; }

/* ============ troca de mão ============ */
.sub { margin: 0; color: #555; }
.swap-options { display: flex; flex-direction: column; gap: 8px; }
.swap-options button {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; border-radius: 14px; border: 2px solid #ddd; background: #fafafa;
  font-weight: 800; font-size: 17px;
}
.swap-options button:hover { border-color: var(--yellow); background: #fff8d6; }

/* ============ online ============ */
.btn-row .big { font-size: 20px; }
.big.online { background: #8e5bd8; color: #fff; box-shadow: 0 5px 0 #5f3a99; }
.big.online:active { box-shadow: 0 2px 0 #5f3a99; }
.big:disabled { opacity: .6; cursor: not-allowed; }
.online-card { display: flex; flex-direction: column; gap: 14px; background: rgba(0, 0, 0, .25); border-radius: 18px; padding: 18px; }
.join-row { display: flex; gap: 10px; }
.join-row input {
  flex: 1; min-width: 0; padding: 10px 14px; border-radius: 14px; border: 0;
  font-family: var(--font-fun); font-size: 28px; letter-spacing: 6px; text-transform: uppercase; text-align: center;
}
.room-code { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.room-code span { font-weight: 800; opacity: .8; }
.room-code b {
  font-family: var(--font-fun); font-weight: 400; font-size: 56px; letter-spacing: 10px;
  color: var(--yellow); text-shadow: 3px 3px 0 #000;
}
#seat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
#seat-list li {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px;
  background: rgba(255, 255, 255, .1); font-weight: 800; font-size: 17px;
}
#seat-list li .tag { margin-left: auto; font-size: 12px; opacity: .75; }
#seat-list li button { border: 0; background: rgba(0, 0, 0, .35); color: #fff; border-radius: 50%; width: 28px; height: 28px; }
#seat-list li.empty { opacity: .45; font-weight: 700; }
#host-controls { display: flex; flex-direction: column; gap: 10px; }
.online-status { margin: 0; min-height: 1.4em; font-weight: 800; text-align: center; }
.online-status.bad { color: #ffb3b3; }

/* ============ modo treino ============ */
.big.alt { background: #3aa0e0; color: #fff; box-shadow: 0 5px 0 #1d6f9f; }
.big.alt:active { box-shadow: 0 2px 0 #1d6f9f; }
#training, #online { display: grid; place-items: start center; padding: 16px; overflow-y: auto; }
.train-box { width: min(640px, 100%); display: flex; flex-direction: column; gap: 14px; margin: auto 0; }
.train-head { display: flex; align-items: center; gap: 12px; }
.train-head h1 { flex: 1; margin: 0; font-family: var(--font-fun); font-weight: 400; font-size: 34px; }
#train-count { font-weight: 800; opacity: .8; font-size: 14px; }
.train-intro { margin: 0; font-weight: 700; opacity: .9; }
.chapter { background: rgba(0, 0, 0, .25); border-radius: 18px; padding: 14px 16px; margin-bottom: 12px; }
.chapter h2 { margin: 0 0 10px; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.ch-num {
  flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--yellow); color: #000; font-family: var(--font-fun); font-weight: 400;
}
.lessons { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.lesson-btn {
  display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 10px 12px; border-radius: 12px; border: 2px solid rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .08); color: #fff; font-weight: 800;
}
.lesson-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .18); border-color: var(--yellow); }
.lesson-btn:disabled { opacity: .45; cursor: not-allowed; }
.lesson-btn.done { border-color: var(--green); }
.l-num {
  flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0, 0, 0, .35); font-size: 14px;
}
.lesson-btn.done .l-num { background: var(--green); }

/* professor: vira uma faixa entre a mesa e a sua mão */
#table.lesson {
  grid-template-rows: auto auto 1fr auto auto;
  grid-template-areas:
    "bar bar bar"
    ". top ."
    "left center right"
    "coach coach coach"
    "me me me";
}
#coach {
  grid-area: coach;
  display: flex; align-items: center; gap: 12px;
  width: min(760px, calc(100% - 24px)); margin: 2px auto 0;
  padding: 10px 14px; border-radius: 18px;
  background: #fffdf3; color: #222;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
}
#coach.oops { box-shadow: 0 0 0 3px #ff6b6b, 0 6px 18px rgba(0, 0, 0, .3); animation: shake .35s; }
.coach-avatar { font-size: 38px; line-height: 1; }
.coach-body { flex: 1; display: flex; flex-direction: column; }
.coach-name { font-size: 12px; font-weight: 800; color: #b07d00; text-transform: uppercase; letter-spacing: 1px; }
#coach-text { font-weight: 700; font-size: 16px; line-height: 1.35; }
#coach-next {
  flex: none; border: 0; border-radius: 20px; padding: 8px 16px;
  background: var(--yellow); color: #000; font-weight: 800; box-shadow: 0 3px 0 #b38f00;
  animation: wobble 1.2s ease-in-out infinite;
}
#modal-lesson p { margin: 0; font-weight: 700; font-size: 17px; line-height: 1.4; }

/* dicas: o que o professor quer que você clique */
#hand .card.hint { transform: translateY(-16px); box-shadow: 0 0 0 4px #3be0ff, 0 0 24px #3be0ff; }
#hand .card.hint::after {
  content: '👇'; position: absolute; top: -40px; left: 50%; transform: translateX(-50%);
  font-size: 26px; animation: bob .8s ease-in-out infinite;
}
@keyframes bob { 50% { top: -48px; } }
#deck.hint .card, #btn-uno.hint, #btn-catch.hint, #btn-pass.hint { box-shadow: 0 0 0 4px #3be0ff, 0 0 26px #3be0ff; }
#tray.hint { border-color: #3be0ff; background: rgba(59, 224, 255, .1); }

.row2 { display: contents; }
.seg button.evil.on { background: var(--red); color: var(--yellow); border-color: var(--red); }
#level-help { margin: 2px 0 0; }
#round-label .lvl-evil { color: #ff6b6b; }
.mode-help { margin: -4px 0 0; font-size: 13px; font-weight: 700; opacity: .85; line-height: 1.35; }
/* placar do caótico */
.batidas { color: var(--yellow); font-weight: 800; }
#round-label.chaos { color: var(--yellow); }

/* tela larga: regras em duas colunas pra o botão Jogar caber sem rolar */
@media (min-width: 760px) {
  .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .start-box { width: 700px; padding: 20px 26px; gap: 12px; }
  .start-box .logo { font-size: 48px; margin: 12px 0 6px; }
}

/* ============ celular ============ */
@media (max-width: 600px) {
  #table { grid-template-columns: minmax(64px, 1fr) auto minmax(64px, 1fr); }
  .opp { padding: 8px; }
  .opp-head { flex-direction: column; gap: 0; font-size: 13px; }
  .fan { display: none; }
  .avatar { font-size: 30px; }
  #coach { padding: 8px 10px; gap: 8px; }
  .coach-avatar { font-size: 28px; }
  #coach-text { font-size: 14px; }
}
