@font-face { font-family: 'Fraunces'; src: url('./assets/fonts/fraunces-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('./assets/fonts/fraunces-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('./assets/fonts/nunito-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('./assets/fonts/nunito-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('./assets/fonts/nunito-latin-800-normal.woff2') format('woff2'); font-weight: 800; font-display: swap; }

:root {
  --ink: #2a1a12;
  --ink-soft: #5d4536;
  --cream: #fbf4e6;
  --paper: #f3e7d0;
  --walnut: #5b3521;
  --walnut-2: #3e2415;
  --gold: #d9a441;
  --gold-2: #f0c96a;
  --coral: #e0493e;
  --teal: #17a2ac;
  --shadow: 0 14px 40px rgba(20, 10, 4, 0.35);
  --radius: 18px;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #2a1a12; color: var(--ink); font-family: var(--body); font-weight: 600; -webkit-font-smoothing: antialiased; }
body { overflow: hidden; overscroll-behavior: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.noscript { color: var(--cream); padding: 2rem; }

#stage { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; touch-action: none; }
#app { position: fixed; inset: 0; pointer-events: none; }
:where(#view) > * { pointer-events: auto; }
dialog { pointer-events: auto; }

/* ---------- botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .7rem 1.25rem; border-radius: 999px; border: 0; font-weight: 800; letter-spacing: .01em; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; text-decoration: none; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn.primary { background: linear-gradient(180deg, #f07a57, #d8412f); color: #fff8ee; box-shadow: 0 4px 0 #9d2a1d, 0 10px 24px rgba(160, 40, 20, .35); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.gold { background: linear-gradient(180deg, #f6d27a, #d9a441); color: var(--walnut-2); box-shadow: 0 4px 0 #9c7224, 0 10px 20px rgba(120, 80, 20, .3); }
.btn.ghost { background: rgba(251, 244, 230, .92); color: var(--walnut); box-shadow: inset 0 0 0 2px rgba(91, 53, 33, .22); }
.btn.ghost:hover { background: #fff; }
.btn.large { min-height: 58px; font-size: 1.12rem; padding: .8rem 1.8rem; }
.icon-btn { width: 48px; height: 48px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(251, 244, 230, .94); color: var(--walnut); box-shadow: 0 3px 0 rgba(62, 36, 21, .35), 0 8px 18px rgba(0, 0, 0, .25); font-size: 1.2rem; }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn[aria-pressed="false"] { opacity: .8; }

/* ---------- abertura ---------- */
.home { position: fixed; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr); background: #2a1a12 url('./assets/img/capa-conexoes.jpg') center / cover no-repeat; overflow: auto; }
.home::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(34, 18, 10, .55) 0%, rgba(34, 18, 10, 0) 55%), linear-gradient(0deg, rgba(34, 18, 10, .45), rgba(34, 18, 10, 0) 35%); }
.home-inner { position: relative; align-self: center; margin: calc(24px + var(--safe-top)) 0 calc(24px + var(--safe-bottom)) 4vw; padding: 34px 36px 26px; max-width: 540px; color: var(--cream); background: linear-gradient(160deg, rgba(42, 24, 14, .86), rgba(30, 16, 9, .78)); border: 1px solid rgba(240, 201, 106, .28); border-radius: 28px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-2); font-weight: 800; }
.home h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2.6rem, 6.4vw, 4.6rem); line-height: .98; margin: .5rem 0 .8rem; letter-spacing: -.01em; text-wrap: balance; }
.home h1 em { font-style: normal; color: var(--gold-2); }
.home .lead { font-size: 1.12rem; line-height: 1.5; color: #f1e3cc; margin: 0 0 1.6rem; max-width: 30em; }
.home-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 1.2rem; }
.home-progress { display: flex; gap: 1.2rem; flex-wrap: wrap; font-size: .95rem; color: #e8d5b5; }
.home-progress strong { color: #fff; font-size: 1.15rem; }
.home-rule { margin-top: 1.4rem; display: flex; gap: .8rem; align-items: center; background: rgba(251, 244, 230, .1); border: 1px solid rgba(240, 201, 106, .3); border-radius: 14px; padding: .8rem 1rem; font-size: .95rem; line-height: 1.4; color: #f4e6cf; backdrop-filter: blur(4px); }
.home-rule .demo { display: flex; align-items: center; flex: none; }
.home-top { position: fixed; top: calc(12px + var(--safe-top)); right: 14px; display: flex; gap: .5rem; z-index: 2; }
.daily-card { margin-top: 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; border-radius: 14px; background: rgba(23, 162, 172, .16); border: 1px solid rgba(23, 162, 172, .45); color: #e7fbfb; }
.daily-card small { display: block; color: #bfe6e6; font-weight: 600; }
.home-foot { margin-top: 1.4rem; font-size: .8rem; color: #cdb898; display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.text-link { background: none; border: 0; padding: .4rem 0; color: #f0c96a; text-decoration: underline; text-underline-offset: 3px; font-weight: 700; min-height: 44px; }

@media (max-width: 700px) {
  .home { background-position: 72% center; }
  .home::before { background: linear-gradient(0deg, rgba(34, 18, 10, .96) 0%, rgba(34, 18, 10, .88) 48%, rgba(34, 18, 10, .15) 78%); }
  .home-inner { align-self: end; margin: 30vh 12px calc(12px + var(--safe-bottom)); padding: 22px 18px 16px; border-radius: 24px; }
  .home h1 { font-size: 2.7rem; }
  .home .lead { font-size: 1rem; margin-bottom: 1.1rem; }
  .home-actions .btn { flex: 1 1 100%; }
}

/* ---------- seleção ---------- */
.select { position: fixed; inset: 0; display: flex; flex-direction: column; background: radial-gradient(120% 90% at 50% 0%, #6a412a 0%, #2a1a12 70%); color: var(--cream); overflow: hidden; }
.select > * { width: 100%; max-width: 1180px; margin-left: auto; margin-right: auto; }
.select-head { display: flex; align-items: center; gap: .8rem; padding: calc(12px + var(--safe-top)) 16px 8px; }
.select-head h2 { font-family: var(--display); font-size: 1.6rem; margin: 0; flex: 1; }
.select-head .total { display: flex; align-items: center; gap: .35rem; font-weight: 800; color: var(--gold-2); }
.tabs { display: flex; gap: .5rem; padding: 6px 16px 10px; overflow-x: auto; scrollbar-width: none; }
.tab { flex: none; display: flex; align-items: center; gap: .55rem; border: 0; border-radius: 999px; padding: .55rem 1rem; min-height: 46px; background: rgba(251, 244, 230, .1); color: #f3e2c7; font-weight: 800; box-shadow: inset 0 0 0 1.5px rgba(240, 201, 106, .25); }
.tab[aria-selected="true"] { background: var(--cream); color: var(--walnut); box-shadow: 0 4px 14px rgba(0, 0, 0, .3); }
.tab .dot { width: 12px; height: 12px; border-radius: 50%; }
.tab .count { font-size: .8rem; opacity: .75; }
.env-banner { margin: 0 auto 10px; width: calc(100% - 32px); max-width: 1148px; border-radius: var(--radius); padding: 14px 16px; display: flex; gap: 14px; align-items: center; background: rgba(251, 244, 230, .08); border: 1px solid rgba(240, 201, 106, .18); }
.env-banner p { margin: .2rem 0 0; color: #e6d3b4; font-size: .92rem; line-height: 1.4; }
.env-banner h3 { margin: 0; font-family: var(--display); font-size: 1.25rem; }
.env-banner img { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--paper); flex: none; border: 2px solid var(--gold); }
.level-grid { flex: 1; overflow-y: auto; padding: 4px 16px calc(24px + var(--safe-bottom)); display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; align-content: start; max-width: 1180px; }
@media (min-width: 900px) { .level-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; } .level-card { min-height: 138px; padding: 14px; } .level-card .num { font-size: 1.9rem; } .stars img { width: 26px; height: 26px; } }
.level-card { position: relative; border: 0; border-radius: 16px; min-height: 118px; padding: 12px 12px 10px; text-align: left; display: flex; flex-direction: column; gap: .3rem; background: linear-gradient(180deg, #fbf4e6, #efe0c4); color: var(--walnut-2); box-shadow: 0 4px 0 #b38b5c, 0 10px 18px rgba(0, 0, 0, .25); }
.level-card .num { font-family: var(--display); font-size: 1.5rem; line-height: 1; color: var(--walnut); }
.level-card .name { font-weight: 800; font-size: .95rem; line-height: 1.2; }
.level-card .meta { font-size: .78rem; color: var(--ink-soft); display: flex; gap: .4rem; align-items: center; }
.level-card .stars { margin-top: auto; }
.level-card[disabled] { background: rgba(251, 244, 230, .12); color: #cbb697; box-shadow: inset 0 0 0 1.5px rgba(240, 201, 106, .2); cursor: not-allowed; }
.level-card[disabled] .num { color: #cbb697; }
.level-card.current { outline: 3px solid var(--gold-2); outline-offset: 2px; }
.stars { display: inline-flex; gap: 2px; align-items: center; }
.stars img { width: 22px; height: 22px; }
.stars img.off { filter: grayscale(1) brightness(.6) opacity(.45); }

/* ---------- jogo ---------- */
.hud-top { position: fixed; top: 0; left: 0; right: 0; display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 12px; padding: calc(10px + var(--safe-top)) 12px 0; pointer-events: none; }
.cap { pointer-events: auto; display: flex; align-items: center; gap: 10px; width: max-content; max-width: 100%; min-width: 0; background: rgba(251, 244, 230, .95); border-radius: 999px; padding: 5px 16px 5px 5px; box-shadow: 0 3px 0 rgba(62, 36, 21, .35), 0 8px 18px rgba(0, 0, 0, .25); }
.cap-right { padding: 5px 5px 5px 16px; margin-left: auto; }
.cap-left { max-width: min(46vw, 520px); }
.cap .t { min-width: 0; }
.cap small { display: block; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cap strong { display: block; font-family: var(--display); font-size: 1.08rem; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cap-btn { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--walnut); color: var(--cream); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .25); }
.cap-btn svg { width: 20px; height: 20px; }
.cap-btn[aria-pressed="false"] { background: #8a6a55; }
.env-short { display: none; }
.stats { display: flex; gap: 12px; flex: none; }
.stat { text-align: center; line-height: 1.05; }
.stat b { display: block; font-size: 1.05rem; font-weight: 800; color: var(--walnut); }
.stat span { font-size: .66rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.toolbar { position: fixed; left: 50%; bottom: calc(12px + var(--safe-bottom)); transform: translateX(-50%); display: flex; gap: 8px; padding: 8px; border-radius: 22px; background: rgba(42, 26, 18, .72); backdrop-filter: blur(8px); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.tool { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 72px; min-height: 58px; border: 0; border-radius: 16px; background: var(--cream); color: var(--walnut); font-weight: 800; font-size: .78rem; box-shadow: 0 3px 0 #b38b5c; padding: 6px 8px; }
.tool svg { width: 22px; height: 22px; }
.tool:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.tool .badge { position: absolute; transform: translate(18px, -18px); background: var(--coral); color: #fff; border-radius: 999px; font-size: .7rem; min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 5px; }
.tool { position: relative; }
.pairs-strip { position: fixed; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; padding: 6px 10px; border-radius: 999px; background: rgba(251, 244, 230, .9); box-shadow: 0 6px 16px rgba(0, 0, 0, .25); }
.chip { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--gold); position: relative; }
.chip svg { width: 16px; height: 16px; }
.chip.done::after { content: ''; position: absolute; right: -3px; bottom: -3px; width: 13px; height: 13px; border-radius: 50%; background: #2e9955 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.2 2.2L9.5 3.6' fill='none' stroke='white' stroke-width='2'/%3E%3C/svg%3E") center/10px no-repeat; border: 1.5px solid #fff; }
.strip-stat { display: none; align-self: center; font-size: .78rem; font-weight: 800; color: var(--walnut); padding: 0 4px 0 6px; white-space: nowrap; }
.chip.selected { transform: scale(1.14); box-shadow: 0 0 0 3px rgba(240, 201, 106, .7); }
.bubble { position: fixed; overflow: hidden; max-width: min(300px, calc(100vw - 24px)); background: var(--cream); color: var(--ink); border-radius: 16px; padding: 10px 14px; box-shadow: 0 10px 26px rgba(0, 0, 0, .3); font-size: .92rem; line-height: 1.35; pointer-events: none; transition: opacity .2s; }
.bubble::before { content: ''; position: absolute; left: -8px; top: 18px; border: 8px solid transparent; border-right-color: var(--cream); border-left: 0; }
#bubble-msg { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.bubble .who { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); font-weight: 800; margin-bottom: 2px; }
.side-panel { position: fixed; left: 16px; top: 86px; bottom: 100px; width: 270px; display: flex; flex-direction: column; gap: 12px; pointer-events: none; }
.side-panel > * { pointer-events: auto; }
.host-card { background: var(--cream); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); display: flex; gap: 12px; align-items: flex-start; }
.host-card img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); background: var(--paper); flex: none; }
.host-card p { margin: 0; font-size: .95rem; line-height: 1.4; }
.host-card .who { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); font-weight: 800; margin-bottom: 3px; }
.projects { background: rgba(251, 244, 230, .92); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); overflow-y: auto; }
.projects h3 { margin: 0 0 8px; font-family: var(--display); font-size: 1.05rem; }
.project { display: flex; gap: 10px; align-items: center; padding: 6px 4px; border-radius: 10px; font-size: .84rem; line-height: 1.2; }
.project .chip { width: 28px; height: 28px; flex: none; }
.project strong { display: block; font-size: .88rem; }
.project span { color: var(--ink-soft); font-size: .76rem; }
.project.alive { background: rgba(46, 153, 85, .12); }
.project.alive strong::after { content: ' ✓'; color: #2e9955; }
.tap-toggle { position: fixed; display: flex; align-items: center; gap: 8px; background: rgba(42, 26, 18, .7); color: var(--cream); padding: 6px 12px; border-radius: 999px; font-size: .8rem; min-height: 40px; }
.tap-toggle input { width: 20px; height: 20px; accent-color: var(--coral); }
#board-kb { position: fixed; pointer-events: none; border-radius: 12px; }
#board-kb:focus-visible { outline: 3px dashed rgba(240, 201, 106, .85); outline-offset: 6px; }
.toast { position: fixed; left: 50%; top: calc(76px + var(--safe-top)); transform: translateX(-50%) translateY(-10px); background: var(--walnut-2); color: var(--cream); padding: 8px 14px; border-radius: 999px; font-size: .88rem; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; box-shadow: var(--shadow); white-space: nowrap; max-width: calc(100vw - 24px); overflow: hidden; text-overflow: ellipsis; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 859px), (max-aspect-ratio: 1/1) {
  .side-panel { display: none; }
  .tap-toggle { display: none; }
  .hud-top { padding-left: 8px; padding-right: 8px; gap: 6px; }
  .env-long { display: none; }
  .env-short { display: inline; }
  .cap-left { max-width: calc(100vw - 16px); padding-right: 14px; gap: 8px; }
  .cap-left .cap-btn { width: 40px; height: 40px; }
  .cap strong { font-size: 1rem; }
  .cap-right { padding: 3px 3px 3px 12px; gap: 8px; }
  .cap-right .cap-btn { width: 32px; height: 32px; }
  .cap-right .cap-btn svg { width: 16px; height: 16px; }
  .stats { gap: 8px; }
  .stat b { font-size: .9rem; }
  .stat span { font-size: .56rem; }
  .tool { min-width: 0; flex: 1; font-size: .72rem; }
  .toolbar { left: 10px; right: 10px; transform: none; }
}
@media (min-width: 860px) and (min-aspect-ratio: 1/1) { .bubble { display: none; } }

/* ---------- diálogos ---------- */
dialog { border: 0; padding: 0; background: transparent; max-width: min(520px, calc(100vw - 24px)); width: 100%; color: var(--ink); }
dialog::backdrop { background: rgba(26, 14, 8, .6); backdrop-filter: blur(3px); }
.sheet { background: linear-gradient(180deg, #fffaf0, #f3e5c9); border-radius: 24px; padding: 22px 22px 18px; box-shadow: var(--shadow), inset 0 0 0 2px rgba(217, 164, 65, .4); max-height: calc(100dvh - 32px); overflow-y: auto; }
.sheet h2 { font-family: var(--display); font-size: 1.7rem; margin: .2rem 0 .5rem; line-height: 1.1; }
.sheet p { line-height: 1.5; margin: .4rem 0; }
.sheet .row { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }
.sheet .row .btn { flex: 1 1 160px; }
.sheet .kicker { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: #a3662a; font-weight: 800; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.victory { text-align: center; position: relative; overflow: hidden; }
.victory .host { width: 132px; height: 132px; border-radius: 50%; object-fit: cover; object-position: top; border: 3px solid var(--gold); background: var(--paper); margin: 0 auto 6px; display: block; }
.victory .stars img { width: 54px; height: 54px; }
.victory .stars img:nth-child(2) { width: 64px; height: 64px; transform: translateY(-6px); }
.born { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: .8rem 0; }
.born span { display: inline-flex; align-items: center; gap: 6px; background: rgba(91, 53, 33, .08); padding: 4px 10px 4px 4px; border-radius: 999px; font-size: .82rem; }
.born .chip { width: 24px; height: 24px; border-width: 1.5px; }
.born .chip svg { width: 13px; height: 13px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid rgba(91, 53, 33, .15); min-height: 52px; }
.settings-row input[type="checkbox"] { width: 24px; height: 24px; accent-color: var(--coral); }
.settings-row input[type="range"] { width: 50%; accent-color: var(--coral); }
.help ol { padding-left: 1.2rem; line-height: 1.5; }
.credits a { color: #9d2a1d; }
.fine { font-size: .82rem; color: var(--ink-soft); }
.loading { position: fixed; inset: 0; display: grid; place-items: center; background: #2a1a12; color: var(--cream); font-family: var(--display); font-size: 1.3rem; z-index: 10; transition: opacity .4s; }
.loading.hide { opacity: 0; pointer-events: none; }
.webgl-error { position: fixed; inset: 0; display: grid; place-items: center; padding: 2rem; text-align: center; color: var(--cream); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.reduced * { transition: none !important; animation: none !important; }

/* 2.1 — desempenho: cada peça da interface sobre o 3D é uma camada própria e isolada.
   Mudar um texto (pares, % cheio, mensagem) repinta só aquela peça, não a tela inteira. */
.cap, .toolbar, #strip, .side-panel, .host-card, .projects, .bubble, .tap-toggle, .toast { contain: layout paint style; will-change: transform; }
.toolbar { backdrop-filter: none; background: rgba(42, 26, 18, .86); }
dialog::backdrop { backdrop-filter: none; background: rgba(26, 14, 8, .66); }

/* ---------- 2.2 — guia "Como jogar" (kit da coleção em como-jogar/) no estilo do jogo ---------- */
.cj-fundo {
  --cj-painel: #2a180e; --cj-painel-2: #45291a; --cj-texto: #fbf4e6; --cj-suave: #e8d5b5;
  --cj-destaque: #f0c96a; --cj-destaque-texto: #3e2415; --cj-borda: #1a0e07; --cj-fonte: var(--body); --cj-raio: 22px;
  background: rgba(26, 14, 8, .72);
}
.cj-fundo .cj-topo h2, .cj-fundo .cj-titulo-cartao { font-family: var(--display); font-weight: 700; }
.cj-fundo .cj-topo h2 { font-size: 1.35rem; }
.cj-fundo .cj-titulo-cartao { font-size: 1.2rem; }
.cj-fundo .cj-anfitria { border-radius: 50%; object-fit: cover; object-position: top; border: 2px solid var(--gold); background: var(--paper); image-rendering: auto; }
.cj-fundo .cj-clipe video { image-rendering: auto; }
.cj-fundo .cj-painel button { font-weight: 800; }
.cj-fundo .cj-prox { border-radius: 999px; }
/* celular deitado: o cartão de controles (lista de teclado e mouse) cabe sem rolagem */
@media (max-height: 520px) and (orientation: landscape) {
  .cj-fundo .cj-lista li { min-height: 30px; }
  .cj-fundo .cj-painel kbd { height: 26px; min-width: 26px; }
  .cj-fundo .cj-gesto svg { width: 26px; height: 26px; }
  .cj-fundo .cj-texto { line-height: 1.25; }
  .cj-fundo .cj-controles { padding: 4px 8px; }
  .cj-fundo .cj-troca { margin-top: 2px; }
}

/* abertura no celular: "Escolher encontro" e "Como jogar" dividem uma linha (o botão novo não empurra o Desafio do dia) */
@media (max-width: 700px) { .home-actions .btn.ghost { flex: 1 1 0; min-width: 0; padding: .6rem .5rem; font-size: .9rem; white-space: nowrap; } }

/* ---------- 2.2 — tutorial jogável (encontro 01) ---------- */
.tut-on #strip { visibility: hidden; }
.tut-bar { position: fixed; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; width: max-content; max-width: calc(100vw - 16px); padding: 4px 5px 4px 14px; border-radius: 999px; background: var(--cream); color: var(--ink); box-shadow: 0 6px 18px rgba(0, 0, 0, .3), inset 0 0 0 2px rgba(217, 164, 65, .6); font-size: .86rem; font-weight: 700; z-index: 3; }
.tut-step { flex: none; font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: #a3662a; font-weight: 800; white-space: nowrap; }
.tut-ctl { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; line-height: 1.2; }
.tut-ico { display: inline-grid; place-items: center; width: 30px; height: 30px; flex: none; color: var(--walnut); }
.tut-ico svg { width: 28px; height: 28px; }
.tut-hand svg path { fill: currentColor; }
.tut-bar kbd, .tut-ghost kbd { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 5px; font: 800 .74rem/1 var(--body); color: var(--walnut-2); background: var(--gold-2); border: 1.5px solid var(--walnut); border-bottom-width: 3px; border-radius: 6px; }
.tut-keys { display: inline-flex; gap: 2px; }
.tut-skip { flex: none; min-height: 44px; min-width: 44px; padding: 0 14px; border: 0; border-radius: 999px; background: rgba(91, 53, 33, .1); color: var(--walnut); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.tut-skip:hover { background: rgba(91, 53, 33, .18); }
@media (max-width: 420px) { .tut-bar { gap: 7px; padding-left: 10px; font-size: .8rem; } .tut-step { font-size: .6rem; } }
/* gesto fantasma: o ponto (0,0) do elemento é o centro da célula; o desenho põe a ponta do dedo/cursor ali */
.tut-ghost { position: fixed; left: 0; top: 0; width: 0; height: 0; pointer-events: none; opacity: 0; z-index: 2; will-change: transform, opacity; }
.tut-ghost.on { opacity: 1; }
.tut-ghost svg { position: absolute; overflow: visible; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .45)); }
.tut-ghost svg path { fill: #fffaf0; stroke: #3e2415; stroke-width: 2.5; stroke-linejoin: round; }
.tut-ghost[data-mode="mao"] svg { width: 58px; height: 58px; left: -24px; top: -11px; }
.tut-ghost kbd { position: absolute; transform: translate(-50%, -50%); height: 32px; min-width: 60px; font-size: .9rem; box-shadow: 0 4px 10px rgba(0, 0, 0, .45); }
.tut-pill { position: fixed; transform: translate(-50%, calc(-100% - 26px)); padding: 6px 12px; border-radius: 999px; background: var(--walnut-2); color: var(--cream); font-size: .84rem; font-weight: 800; white-space: nowrap; pointer-events: none; box-shadow: 0 6px 16px rgba(0, 0, 0, .35); z-index: 3; }
.tut-pill b { color: #ffb4a6; margin-right: 2px; }
.tut-pill::after { content: ''; position: absolute; left: 50%; bottom: -7px; margin-left: -7px; border: 7px solid transparent; border-top-color: var(--walnut-2); border-bottom: 0; }
.tool.tut-alvo { outline: 3px solid var(--gold-2); outline-offset: 2px; animation: tut-pulso 1.1s ease-in-out infinite; }
.stat.tut-alvo { border-radius: 8px; padding: 2px 5px; margin: -2px -5px; background: rgba(240, 201, 106, .5); box-shadow: 0 0 0 2px var(--gold) inset; animation: tut-pulso 1.1s ease-in-out infinite; }
@keyframes tut-pulso { 50% { transform: scale(1.07); } }
