/* ACÓLITO SIMULATOR — MISSA TRIDENTINA · style.css
 * Identidade da coleção: painéis de pergaminho com moldura dourada, como um manuscrito
 * iluminado; madeira escura, vinho profundo e dourado envelhecido. Visual único e escuro.
 * Durante a Missa, a cena ocupa a tela inteira e o HUD é mínimo.
 */
:root {
  --gold: #C9A24D; --gold-l: #E8CD7E; --gold-d: #8C6A27;
  --wine: #6A1E2E; --wine-l: #8E2C3E; --cardinal: #8B2027; --marian: #1F3A6E; --violet: #4B244A;
  --ivory: #F5E9CF; --ivory-d: #E6D6B3; --umber: #241C19; --umber-2: #2F2420; --umber-3: #3A2D27;
  --ink: #2A1D17; --ink-soft: #5A463A;
  --f-display: 'Cinzel', 'Trajan Pro', 'Times New Roman', serif;
  --f-body: 'Alegreya', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --f-pixel: 'Silkscreen', 'Courier New', monospace;
  --fs: 16px;
  color-scheme: dark;
}
:root.text-big { --fs: 19px; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body { background: var(--umber); color: var(--ivory); font-family: var(--f-body); font-size: var(--fs); line-height: 1.4; overflow: hidden; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold-l); outline-offset: 2px; }
kbd { font-family: var(--f-pixel); font-size: 0.72em; background: var(--umber); color: var(--gold-l); border: 1px solid var(--gold-d); border-radius: 3px; padding: 1px 5px; white-space: nowrap; }

#app { position: fixed; inset: 0; }
#view-wrap { position: absolute; inset: 0; overflow: hidden; background: #120c0a; }
#view { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: pixelated; image-rendering: crisp-edges; touch-action: none; }

/* ---------------- HUD mínimo ---------------- */
.hud { position: absolute; inset: 0; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud-tl { position: absolute; left: max(10px, env(safe-area-inset-left)); top: max(8px, env(safe-area-inset-top)); max-width: 46%; pointer-events: none;
  background: linear-gradient(rgba(36,28,25,0.86), rgba(36,28,25,0.72)); border: 1px solid var(--gold-d); border-radius: 4px; padding: 5px 10px; }
.hud-phase { font-family: var(--f-display); font-weight: 700; font-size: 0.78em; letter-spacing: 0.06em; color: var(--gold-l); }
.hud-moment { font-size: 0.86em; color: var(--ivory); }
.hud-tr { position: absolute; right: max(10px, env(safe-area-inset-right)); top: max(8px, env(safe-area-inset-top)); display: flex; gap: 8px; align-items: flex-start; }
.role-chip { display: flex; gap: 6px; align-items: center; background: rgba(36,28,25,0.86); border: 1px solid var(--gold-d); border-radius: 4px; padding: 3px 8px 3px 3px; }
.role-chip canvas { width: 26px; height: 46px; image-rendering: pixelated; }
.role-chip b { display: block; font-family: var(--f-display); font-size: 0.74em; color: var(--gold-l); letter-spacing: 0.05em; }
.role-chip span { font-size: 0.8em; color: var(--ivory-d); }
.hud-btns { display: flex; gap: 5px; }
.hbtn { display: inline-flex; align-items: center; gap: 5px; background: rgba(36,28,25,0.9); border: 1px solid var(--gold-d); color: var(--ivory); border-radius: 4px; padding: 6px 9px; cursor: pointer; font-size: 0.82em; min-height: 36px; }
.hbtn:hover { border-color: var(--gold-l); }
.hbtn > span:first-child { color: var(--gold-l); font-family: var(--f-display); font-weight: 700; }
.hbtn.glow { border-color: var(--gold-l); box-shadow: 0 0 0 2px rgba(232,205,126,0.45); }
.task { position: absolute; left: 50%; transform: translateX(-50%); top: max(8px, env(safe-area-inset-top)); max-width: min(46%, 520px); pointer-events: none;
  background: rgba(245,233,207,0.94); color: var(--ink); border: 1px solid var(--gold); border-radius: 4px; padding: 5px 12px; font-size: 0.92em; line-height: 1.25; text-align: center; box-shadow: 0 2px 0 rgba(0,0,0,0.35); transition: opacity 0.4s; }
.task small { display: block; color: var(--ink-soft); font-size: 0.84em; }
.task .where-mark { color: var(--gold-d); }
.task.faint { opacity: 0.55; }
.prompts { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom)); display: flex; gap: 8px; pointer-events: none; flex-wrap: wrap; justify-content: center; max-width: 92%; }
.prompt { background: rgba(36,28,25,0.92); border: 1px solid var(--gold); border-radius: 4px; padding: 5px 10px; font-size: 0.9em; color: var(--ivory); box-shadow: 0 2px 0 rgba(0,0,0,0.4); }
#app.has-dlg .prompts { bottom: calc(118px + env(safe-area-inset-bottom)); }

/* Faixa do título de cada fase */
.banner { position: absolute; left: 50%; top: 22%; transform: translateX(-50%); text-align: center; pointer-events: none; padding: 8px 26px; max-width: 90%;
  background: linear-gradient(90deg, transparent, rgba(36,28,25,0.88) 15%, rgba(36,28,25,0.88) 85%, transparent); border-top: 1px solid var(--gold); border-bottom: 1px solid var(--gold); transition: opacity 0.6s; }
.banner.out { opacity: 0; }
#banner-title { font-family: var(--f-display); font-weight: 700; color: var(--gold-l); letter-spacing: 0.05em; font-size: 1.2em; text-wrap: balance; }
#banner-sub { font-style: italic; color: var(--ivory-d); font-size: 0.9em; }

/* Falas (diálogo litúrgico) */
.dlg { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(52px + env(safe-area-inset-bottom)); width: min(94%, 720px); pointer-events: none;
  background: var(--ivory); color: var(--ink); border: 2px solid var(--gold-d); border-radius: 5px; padding: 8px 14px 9px; box-shadow: 0 0 0 3px rgba(36,28,25,0.85), 0 6px 20px rgba(0,0,0,0.45);
  background-image: radial-gradient(ellipse at 20% 0%, rgba(255,255,255,0.55), transparent 60%); }
.dlg.schola { background-color: #EFE6D2; border-color: var(--marian); }
.dlg-name { font-family: var(--f-display); font-size: 0.76em; font-weight: 700; letter-spacing: 0.06em; color: var(--wine); }
.dlg-text { font-size: 1.08em; line-height: 1.35; max-height: 7.4em; overflow: hidden; }
.dlg-text.quiet { font-style: italic; color: var(--ink-soft); font-size: 0.98em; }
.dlg-text.sung { color: var(--marian); }
.dlg-tr { font-size: 0.86em; color: var(--ink-soft); font-style: italic; margin-top: 2px; }

/* Resposta em latim */
.resp { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(52px + env(safe-area-inset-bottom)); width: min(94%, 720px); z-index: 12;
  background: var(--ivory); color: var(--ink); border: 3px double var(--gold-d); border-radius: 6px; padding: 10px 14px 12px; box-shadow: 0 0 0 4px var(--umber), 0 0 0 6px var(--gold), 0 10px 30px rgba(0,0,0,0.5); max-height: 70%; overflow-y: auto; }
.resp-q { font-family: var(--f-display); font-weight: 700; font-size: 0.82em; letter-spacing: 0.06em; color: var(--cardinal); margin-bottom: 4px; }
.resp-latin { font-size: 1.12em; margin: 2px 0 4px; color: var(--ink); }
.resp-pron { font-family: var(--f-pixel); font-size: 0.66em; color: var(--marian); margin: 0 0 4px; letter-spacing: 0.02em; line-height: 1.6; }
.resp-tr { font-style: italic; color: var(--ink-soft); font-size: 0.9em; margin: 0 0 6px; }
.resp-when { font-size: 0.86em; color: var(--ink-soft); margin: 0 0 6px; }
.resp-wrong { color: var(--cardinal); font-weight: 700; margin: 0; }
.resp-opts { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.resp-opt { text-align: left; background: #FFFBF0; color: var(--ink); border: 2px solid rgba(140,106,39,0.55); border-radius: 4px; padding: 8px 10px; cursor: pointer; font-size: 0.98em; line-height: 1.3; }
.resp-opt:hover, .resp-opt:focus-visible { border-color: var(--cardinal); background: #F8EBD0; }

/* Mensagens curtas */
.toasts { position: absolute; left: 50%; transform: translateX(-50%); top: 76px; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; width: min(92%, 600px); z-index: 11; }
.toast { background: var(--ivory); color: var(--ink); border: 2px solid var(--gold); border-radius: 4px; padding: 6px 12px; font-size: 0.92em; text-align: center; box-shadow: 0 3px 0 rgba(0,0,0,0.4); animation: toastIn 0.25s ease-out; max-width: 100%; transition: opacity 0.45s; }
.toast.lesson::before { content: '✦ '; color: var(--gold-d); }
.toast.gentle { border-color: var(--marian); }
.toast.gentle::before { content: '➜ '; color: var(--marian); }
.toast.help { border-color: var(--violet); background: #EFE3EE; }
.toast.out { opacity: 0; }
@keyframes toastIn { from { transform: translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Controles de toque */
.touch { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 max(14px, env(safe-area-inset-left)) calc(12px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-right)); display: flex; justify-content: space-between; align-items: flex-end; pointer-events: none; z-index: 10; }
.touch > * { pointer-events: auto; }
.dpad { position: relative; width: 124px; height: 124px; border-radius: 50%; touch-action: none; user-select: none; -webkit-user-select: none; opacity: 0.88; }
.dpad-ring { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, rgba(58,45,39,0.85), rgba(36,28,25,0.9)); border: 2px solid var(--gold-d); }
.dpad-knob { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: var(--gold-d); border: 2px solid var(--gold-l); }
.touch-btns { display: flex; gap: 10px; align-items: flex-end; }
.tbtn { border-radius: 50%; border: 3px solid var(--gold); color: var(--ivory); font-family: var(--f-display); font-weight: 700; cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: manipulation; line-height: 1.05; padding: 4px; opacity: 0.94; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; overflow: hidden; }
.tbtn.act { width: 98px; height: 98px; background: var(--cardinal); font-size: 0.72em; }
.tbtn.int { width: 78px; height: 78px; background: var(--marian); font-size: 0.64em; }
.tbtn.int kbd { font-size: 0.9em; }
.tbtn.menu { width: 46px; height: 46px; background: var(--umber-3); font-size: 1.1em; }
.tbtn:active { filter: brightness(1.25); }
#app.touch-on .prompts { bottom: calc(140px + env(safe-area-inset-bottom)); }
#app.touch-on .dlg, #app.touch-on .resp { bottom: calc(136px + env(safe-area-inset-bottom)); }
#app.touch-on.has-dlg .prompts { bottom: calc(240px + env(safe-area-inset-bottom)); }
#app.touch-on .hud-btns .lbl { display: none; }

/* Publicidade: só na tela inicial e no resumo, longe dos botões */
.ad-box { margin: 0; min-height: 0; }
.ad-box.filled { margin-top: 26px; padding-top: 10px; border-top: 1px solid rgba(201,162,77,0.3); }
.ad-box.filled::before { content: 'Publicidade'; display: block; font-size: 0.7em; letter-spacing: 0.08em; color: var(--ivory-d); opacity: 0.7; margin-bottom: 4px; text-align: center; }
.ad-box.unfilled, .ad-box ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }

/* ---------------- Telas ---------------- */
.screen { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; overflow-y: auto; z-index: 20;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.screen.dim { background: rgba(14,9,7,0.72); }
.panel { background: var(--ivory); color: var(--ink); border-radius: 6px; padding: 22px 26px; max-width: 640px; width: 100%; margin: auto;
  border: 3px double var(--gold-d); box-shadow: 0 0 0 4px var(--umber), 0 0 0 6px var(--gold), 0 12px 40px rgba(0,0,0,0.6);
  background-image: radial-gradient(ellipse at 20% 0%, rgba(255,255,255,0.5), transparent 60%), radial-gradient(ellipse at 100% 100%, rgba(140,106,39,0.18), transparent 60%); }
.panel.wide { max-width: 980px; }
.panel.narrow { max-width: 460px; }
.panel h2 { font-family: var(--f-display); font-weight: 700; color: var(--wine); margin: 0 0 6px; font-size: 1.5em; letter-spacing: 0.03em; text-wrap: balance; }
.panel h3 { font-family: var(--f-display); color: var(--cardinal); font-size: 1em; margin: 10px 0 6px; letter-spacing: 0.04em; }
.panel .lead { font-size: 1.06em; }
.small-note { font-size: 0.86em; color: var(--ink-soft); margin: 4px 0 10px; }
.eyebrow { font-family: var(--f-display); font-size: 0.78em; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-d); margin-bottom: 6px; }
.bul { padding-left: 1.1em; margin: 6px 0 10px; } .bul li { margin: 4px 0; } .bul.small { font-size: 0.92em; }
.ref { font-size: 0.88em; color: var(--ink-soft); font-style: italic; }
.row-btns { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.row-btns.wrap .mbtn { flex: 1 1 150px; }
.col-btns { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.mbtn { background: var(--umber); color: var(--ivory); border: 2px solid var(--gold-d); border-radius: 4px; padding: 10px 16px; cursor: pointer; font-family: var(--f-display); font-weight: 700; letter-spacing: 0.04em; font-size: 0.95em; min-height: 44px; }
.mbtn:hover { border-color: var(--gold-l); background: var(--umber-3); }
.mbtn.primary { background: var(--cardinal); border-color: var(--gold); }
.mbtn.primary:hover { background: #A0262E; }
.mbtn.small { font-size: 0.8em; padding: 8px 12px; min-height: 40px; }
.mbtn[disabled] { opacity: 0.45; cursor: not-allowed; }
table.keys { border-collapse: collapse; font-size: 0.92em; }
table.keys td { padding: 3px 8px 3px 0; vertical-align: top; }

/* Tela inicial */
.title-screen { background: radial-gradient(ellipse at 50% 30%, rgba(20,13,11,0.05), rgba(20,13,11,0.55) 70%); align-items: flex-end; }
.title-panel { text-align: center; max-width: 540px; width: 100%; margin: auto auto 4vh; padding: 22px 22px 16px; background: rgba(28,21,18,0.84);
  border: 2px solid var(--gold); border-radius: 6px; box-shadow: 0 0 0 5px rgba(36,28,25,0.88), 0 0 0 7px var(--gold-d), 0 14px 50px rgba(0,0,0,0.65); backdrop-filter: blur(1px); }
.title-orn { height: 10px; margin: 0 auto 10px; width: 70%; background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--wine-l) 50%, var(--gold) 80%, transparent); clip-path: polygon(0 50%, 50% 0, 100% 50%, 50% 100%); }
.title-orn.small { width: 40%; height: 8px; }
.logo { font-family: var(--f-display); font-weight: 900; margin: 0; font-size: clamp(1.8em, 6.6vw, 3em); letter-spacing: 0.06em; color: var(--ivory); line-height: 1.05; text-shadow: 0 3px 0 var(--wine), 0 0 24px rgba(201,162,77,0.25); }
.logo-a { display: inline-block; color: var(--gold-l); font-size: 1.3em; background: var(--wine); padding: 0 0.12em; margin-right: 0.04em; border: 2px solid var(--gold); line-height: 1.05; text-shadow: none; }
.logo-sim { display: block; font-size: 0.5em; letter-spacing: 0.42em; color: var(--gold); margin-top: 4px; text-shadow: none; }
.edition { font-family: var(--f-display); font-weight: 700; color: var(--ivory); background: var(--wine); display: inline-block; margin: 12px 0 0; padding: 4px 16px; border: 1px solid var(--gold); letter-spacing: 0.18em; text-transform: uppercase; font-size: clamp(0.9em, 3.4vw, 1.12em); }
.motto { font-family: var(--f-display); font-style: italic; color: var(--gold-l); font-size: 1.2em; letter-spacing: 0.08em; margin: 8px 0 2px; }
.tagline { font-style: italic; font-size: 1em; color: var(--ivory-d); margin: 4px auto 14px; max-width: 40ch; }
.menu { display: flex; flex-direction: column; gap: 8px; max-width: 360px; margin: 0 auto; }
.menu-row { display: flex; gap: 8px; } .menu-row .mbtn { flex: 1; }
.based { font-family: var(--f-display); font-size: 0.74em; letter-spacing: 0.1em; color: var(--gold); margin: 14px 0 0; opacity: 0.9; }

/* Preparar a partida */
.setup-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
fieldset { border: 1px solid rgba(140,106,39,0.5); border-radius: 4px; padding: 8px 12px 10px; margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
fieldset.span2 { grid-column: 1 / -1; }
legend { font-family: var(--f-display); font-weight: 700; color: var(--wine); padding: 0 4px; font-size: 0.92em; }
legend small, fieldset small { font-family: var(--f-body); font-weight: 400; color: var(--ink-soft); }
fieldset label { display: flex; gap: 6px; align-items: center; }
label.opt { align-items: flex-start; cursor: pointer; }
label.opt b { display: block; font-weight: 700; }
label.opt small { display: block; font-size: 0.86em; }
label.range { display: grid; grid-template-columns: 9em 1fr; }
select, textarea { font: inherit; color: var(--ink); background: #FFFBF0; border: 1px solid var(--gold-d); border-radius: 3px; padding: 6px; width: 100%; }
input[type=checkbox], input[type=radio] { accent-color: var(--cardinal); width: 18px; height: 18px; flex: none; margin-top: 2px; }
input[type=range] { accent-color: var(--cardinal); width: 100%; }
.cal-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; }
.cal-item { display: flex; gap: 8px; align-items: center; text-align: left; background: #FFFBF0; border: 2px solid rgba(140,106,39,0.45); border-radius: 4px; padding: 7px 9px; cursor: pointer; color: var(--ink); font-size: 0.9em; line-height: 1.2; }
.cal-item[aria-pressed="true"] { border-color: var(--cardinal); background: #F8EBD0; }
.cal-item .sw { width: 14px; height: 30px; border: 1px solid var(--gold-d); flex: none; }
.cal-item small { display: block; color: var(--ink-soft); font-size: 0.85em; }
.role-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.role-card { display: flex; gap: 8px; align-items: flex-start; text-align: left; background: #FFFBF0; border: 2px solid rgba(140,106,39,0.45); border-radius: 4px; padding: 8px; cursor: pointer; color: var(--ink); }
.role-card[aria-pressed="true"] { border-color: var(--cardinal); background: #F8EBD0; }
.role-card[disabled] { opacity: 0.5; cursor: not-allowed; }
.role-card canvas { width: 39px; height: 69px; image-rendering: pixelated; flex: none; background: var(--umber); border: 1px solid var(--gold-d); border-radius: 3px;  object-fit: contain; }
.role-card b { font-family: var(--f-display); color: var(--cardinal); display: block; font-size: 0.92em; }
.role-card span { font-size: 0.82em; color: var(--ink-soft); display: block; }
.role-card em { font-size: 0.76em; color: var(--gold-d); font-style: normal; font-family: var(--f-display); letter-spacing: 0.05em; }

/* Treinamento */
.train-list { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-top: 8px; }
.train-btn { display: flex; gap: 10px; align-items: center; text-align: left; background: #FFFBF0; border: 2px solid var(--gold-d); border-radius: 4px; padding: 9px; cursor: pointer; color: var(--ink); }
.train-btn:hover { border-color: var(--cardinal); }
.train-btn canvas { width: 33px; height: 45px; image-rendering: pixelated; flex: none;  object-fit: contain; }
.train-btn b { font-family: var(--f-display); color: var(--cardinal); display: block; font-size: 0.92em; }
.train-btn span { font-size: 0.84em; color: var(--ink-soft); }
.train-btn .st { font-family: var(--f-pixel); font-size: 0.62em; color: #2f5d3a; display: block; margin-top: 2px; }

/* Manual */
.man-cats { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.man-cat { background: #FFFBF0; border: 1px solid var(--gold-d); border-radius: 3px; padding: 5px 9px; cursor: pointer; font-family: var(--f-display); font-size: 0.78em; color: var(--ink); }
.man-cat[aria-selected="true"] { background: var(--wine); color: var(--ivory); }
.man-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px; }
.man-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; align-content: start; max-height: 56vh; overflow-y: auto; padding-right: 4px; }
.man-btn { background: #FFFBF0; border: 2px solid rgba(140,106,39,0.45); border-radius: 4px; padding: 5px 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--ink); font-size: 0.78em; text-align: center; line-height: 1.15; }
.man-btn canvas { width: 33px; height: 45px; image-rendering: pixelated;  object-fit: contain; }
.man-btn[aria-selected="true"] { border-color: var(--cardinal); background: #F8EBD0; }
.man-detail { background: #FFFBF0; border: 1px solid rgba(140,106,39,0.5); border-radius: 4px; padding: 12px 14px; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; align-items: start; align-content: start; min-width: 0; }
.man-detail canvas.big { grid-row: 1 / span 3; }
.man-detail > :not(canvas) { grid-column: 2; min-width: 0; }
.man-detail .speak { justify-self: start; }
.man-detail canvas.big { width: 88px; height: 120px; image-rendering: pixelated; flex: none; background: var(--umber); border: 2px solid var(--gold-d); border-radius: 3px;  object-fit: contain; }
.man-detail h3 { margin-top: 0; font-size: 1.15em; }
.man-detail dl { margin: 6px 0 0; font-size: 0.94em; }
.man-detail dt { font-family: var(--f-display); font-size: 0.8em; color: var(--gold-d); letter-spacing: 0.06em; margin-top: 6px; }
.man-detail dd { margin: 0; }
.man-detail .lat { font-size: 1.05em; }
.man-detail .pron { font-family: var(--f-pixel); font-size: 0.68em; color: var(--marian); line-height: 1.6; }
.speak { margin-top: 8px; }

.resp-list { display: grid; gap: 8px; max-height: 64vh; overflow-y: auto; padding-right: 4px; }
.resp-item { background: #FFFBF0; border-left: 4px solid var(--gold); padding: 6px 10px; font-size: 0.92em; }
.resp-item .p { color: var(--ink-soft); }
.resp-item .s { font-weight: 700; color: var(--wine); }
.resp-item .pr { font-family: var(--f-pixel); font-size: 0.66em; color: var(--marian); line-height: 1.6; }
.resp-item .w { font-size: 0.84em; color: var(--ink-soft); font-style: italic; }

/* Fontes */
.sources-body { display: grid; gap: 10px; }
.src-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px; }
.src-col { background: #FFFBF0; border: 1px solid rgba(140,106,39,0.5); border-radius: 4px; padding: 10px 12px; min-width: 0; }
.src-col li { margin: 5px 0; font-size: 0.92em; }
.tag { font-family: var(--f-pixel); font-size: 0.66em; padding: 1px 5px; border-radius: 3px; color: var(--ivory); margin-right: 4px; }
.tag.fund { background: var(--marian); } .tag.costume { background: var(--wine); } .tag.simpl { background: var(--violet); }
.src-list li { margin: 5px 0; font-size: 0.92em; overflow-wrap: anywhere; }
.src-list a { color: var(--marian); }

/* Resumo */
.summary { text-align: left; }
.summary h2 { text-align: center; letter-spacing: 0.12em; }
#sum-sub { text-align: center; }
.bars { display: grid; gap: 8px; max-width: 560px; margin: 10px auto 6px; }
.bar { display: grid; grid-template-columns: 15em 1fr 3.2em; gap: 10px; align-items: center; font-size: 0.95em; }
.bar .track { height: 12px; border: 1px solid var(--gold-d); background: #FFFBF0; border-radius: 2px; overflow: hidden; }
.bar .fill { height: 100%; background: linear-gradient(90deg, var(--gold-d), var(--gold)); }
.bar b { font-family: var(--f-display); text-align: right; color: var(--wine); }
.rank { text-align: center; font-family: var(--f-display); font-weight: 700; color: var(--cardinal); font-size: 1.2em; margin: 10px 0; letter-spacing: 0.05em; }
.sum-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }

@media (max-width: 760px) {
  .hud-tl { max-width: 52%; padding: 4px 8px; }
  .hud-moment { font-size: 0.8em; }
  .task { top: auto; bottom: calc(14px + env(safe-area-inset-bottom)); max-width: 92%; font-size: 0.86em; }
  #app.touch-on .task { bottom: calc(146px + env(safe-area-inset-bottom)); left: 50%; }
  .prompts { bottom: calc(66px + env(safe-area-inset-bottom)); }
  #app.touch-on .prompts { bottom: calc(196px + env(safe-area-inset-bottom)); }
  .role-chip div { display: none; }
  .hbtn .lbl { display: none; }
  .man-body { grid-template-columns: 1fr; }
  .man-list { max-height: 30vh; }
  .panel { padding: 16px; }
  .bar { grid-template-columns: 9.5em 1fr 3em; font-size: 0.86em; }
  .toasts { top: 64px; }
}
@media (max-width: 460px) {
  .dpad { width: 112px; height: 112px; }
  .tbtn.act { width: 88px; height: 88px; }
  .tbtn.int { width: 70px; height: 70px; }
  .logo { font-size: 1.7em; }
  .title-panel { padding: 16px 14px 12px; }
  .man-detail { grid-template-columns: 1fr; }
  .man-detail canvas.big { grid-row: auto; width: 66px; height: 90px; margin-bottom: 6px; }
  .man-detail > :not(canvas) { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } .banner { transition: none; } }
:root.reduce-motion .toast { animation: none; }
