:root {
  --cream: #fff8e7; --paper: #fffdf6; --gold: #f2b736; --gold-d: #d9951a; --brown: #5b3a1e; --brown-l: #8a6a4a;
  --blue: #2f7fd6; --blue-d: #1f5fa8; --green: #3fa66b; --red: #e4572e; --line: #ecd9ae; --shadow: 0 8px 0 rgba(91, 58, 30, .18), 0 14px 30px rgba(40, 25, 10, .25);
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #7cc4f7; font-family: var(--font); color: var(--brown); user-select: none; -webkit-user-select: none; touch-action: none; }
body.big { font-size: 1.18rem; } body.big .card-text, body.big .dialog-text, body.big .opt-label { font-size: 1.3rem; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
button { font-family: inherit; color: inherit; cursor: pointer; border: 0; }
button:focus-visible, input:focus-visible { outline: 4px solid #1d6fe0; outline-offset: 3px; }
[hidden] { display: none !important; }
kbd { display: inline-grid; place-items: center; min-width: 1.9em; height: 1.9em; padding: 0 .4em; border-radius: .5em; background: #fff; border: 2px solid var(--brown); border-bottom-width: 4px; font: 800 .85em var(--font); color: var(--brown); }

#loading { position: fixed; inset: 0; display: grid; place-items: center; text-align: center; background: linear-gradient(#2f86e6, #9fd6fb); color: #fff; font-weight: 800; font-size: 1.5rem; z-index: 50; padding: 24px; }

/* ---------- botões ---------- */
.btn { padding: .75em 1.3em; border-radius: 999px; background: #fff; border: 3px solid var(--line); border-bottom-width: 6px; font-weight: 800; font-size: 1.05rem; min-height: 52px; transition: transform .08s; }
.btn:hover { transform: translateY(-2px); } .btn:active { transform: translateY(2px); border-bottom-width: 3px; }
.btn.primary { background: linear-gradient(#ffd45e, var(--gold)); border-color: var(--gold-d); color: #4a2c0c; }
.btn.huge { font-size: 1.5rem; padding: .7em 2em; min-height: 68px; }
.btn.ghost { background: transparent; border-color: transparent; text-decoration: underline; min-height: 44px; }
.btn.danger { background: #fff0ec; border-color: #f0b8a8; color: #a8321a; }
.btn.small { min-height: 40px; padding: .3em .9em; font-size: .9rem; }
.btn-round { width: 52px; height: 52px; flex: none; border-radius: 50%; background: #fff; border: 3px solid var(--line); border-bottom-width: 5px; font-size: 1.3rem; display: grid; place-items: center; }
.row { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 14px; } .row.wrap { flex-wrap: wrap; }

/* ---------- tela inicial ---------- */
#title { position: fixed; inset: 0; display: grid; place-items: center; z-index: 20; background: radial-gradient(ellipse at center, rgba(255, 248, 231, 0) 30%, rgba(30, 80, 150, .35)); transition: opacity .5s; padding: 16px; }
#title.hide { opacity: 0; pointer-events: none; }
.title-card { background: rgba(255, 252, 240, .93); border: 5px solid #fff; border-radius: 36px; padding: 26px 40px 28px; text-align: center; box-shadow: var(--shadow); display: grid; gap: 10px; justify-items: center; max-width: 520px; backdrop-filter: blur(4px); }
.logo-cross { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(#ffd45e, var(--gold)); color: #fff; font-size: 2.2rem; display: grid; place-items: center; border: 4px solid #fff; box-shadow: 0 4px 0 var(--gold-d); }
.title-card h1 { margin: 4px 0 0; font-size: clamp(2.4rem, 7vw, 3.6rem); line-height: 1; color: var(--blue-d); letter-spacing: -.01em; text-shadow: 0 3px 0 #fff; }
.title-card h1 span { color: var(--gold-d); font-size: .6em; }
.title-card p { margin: 0 0 8px; font-size: 1.15rem; font-weight: 600; color: var(--brown-l); }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
#hud > * { pointer-events: auto; }
#chip { position: absolute; top: 12px; left: 12px; display: flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; border-radius: 999px; background: rgba(255, 252, 240, .95); border: 3px solid #fff; box-shadow: 0 4px 0 rgba(91, 58, 30, .25); text-align: left; }
#chip-pic { width: 58px; height: 58px; border-radius: 50%; background: #bfe3ff center 40%/122% no-repeat; border: 3px solid var(--blue); flex: none; }
.chip-info { display: grid; gap: 3px; min-width: 130px; } .chip-info b { font-size: .95rem; } .chip-info small { font-weight: 700; color: var(--brown-l); }
.bar { display: block; height: 10px; border-radius: 9px; background: #eadfc4; overflow: hidden; } .bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffd45e, var(--gold-d)); border-radius: 9px; transition: width .5s; }
#objective { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); max-width: min(46vw, 560px); display: flex; gap: 10px; align-items: center; padding: 10px 18px; border-radius: 22px; background: rgba(31, 95, 168, .92); color: #fff; font-weight: 800; font-size: 1.02rem; border: 3px solid #fff; box-shadow: 0 4px 0 rgba(0, 0, 0, .2); text-align: left; line-height: 1.2; }
.obj-ico { font-size: 1.4rem; }
#topbtns { position: absolute; top: 12px; right: 12px; display: flex; gap: 8px; }
.hud-btn { width: 68px; height: 68px; border-radius: 20px; background: rgba(255, 252, 240, .95); border: 3px solid #fff; box-shadow: 0 4px 0 rgba(91, 58, 30, .25); font-size: 1.7rem; display: grid; place-items: center; line-height: 1; padding: 4px 0 2px; }
.hud-btn small { font-size: .68rem; font-weight: 800; } .hud-btn:hover { transform: translateY(-2px); }
#prompt { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); display: flex; gap: 10px; align-items: center; padding: 10px 22px 10px 12px; border-radius: 999px; background: linear-gradient(#ffd45e, var(--gold)); border: 3px solid #fff; box-shadow: 0 5px 0 var(--gold-d); font-weight: 800; font-size: 1.15rem; color: #4a2c0c; animation: pop .25s; white-space: nowrap; }
@keyframes pop { from { transform: translateX(-50%) scale(.7); opacity: 0; } }
#tut { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; gap: 16px; padding: 10px 18px; border-radius: 18px; background: rgba(255, 252, 240, .93); border: 3px solid #fff; font-weight: 700; white-space: nowrap; }
.keys { display: flex; gap: 4px; align-items: center; } .touch-tip { display: none; }
#joy, #act { display: none; }
body.touch #joy { display: block; position: absolute; left: 22px; bottom: 26px; width: 136px; height: 136px; border-radius: 50%; background: rgba(255, 255, 255, .35); border: 4px solid rgba(255, 255, 255, .85); touch-action: none; }
#joy-knob { position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; margin: -30px; border-radius: 50%; background: #fff; box-shadow: 0 3px 0 rgba(0, 0, 0, .25); }
body.touch #act { display: grid; place-items: center; position: absolute; right: 26px; bottom: 40px; width: 92px; height: 92px; border-radius: 50%; font-size: 2.2rem; background: rgba(255, 255, 255, .5); border: 4px solid #fff; opacity: .55; }
body.touch #act.on { background: linear-gradient(#ffd45e, var(--gold)); opacity: 1; box-shadow: 0 5px 0 var(--gold-d); animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(1.08); } }
body.touch #prompt kbd, body.touch .keys { display: none; } body.touch .touch-tip { display: inline; } body.touch #prompt { bottom: 150px; padding-left: 22px; }
#toasts { position: absolute; top: 96px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; width: min(92vw, 560px); z-index: 40; }
.toast { padding: 10px 18px; border-radius: 16px; background: rgba(255, 252, 240, .97); border: 3px solid #fff; box-shadow: 0 4px 0 rgba(91, 58, 30, .22); font-weight: 700; animation: drop .3s; transition: opacity .5s, transform .5s; text-align: center; }
.toast.good { background: #eafbe9; border-color: #9fdca8; } .toast.quest { background: #fff3c9; border-color: var(--gold); } .toast.out { opacity: 0; transform: translateY(-10px); }
@keyframes drop { from { transform: translateY(-16px); opacity: 0; } }

/* ---------- camadas / modais ---------- */
#layer { position: fixed; inset: 0; z-index: 30; pointer-events: none; }
.modal { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(40, 60, 100, .38); pointer-events: auto; opacity: 0; transition: opacity .18s; overflow: auto; }
.modal.show { opacity: 1; } .modal.bottom { place-items: end center; background: linear-gradient(transparent 45%, rgba(20, 40, 80, .35)); padding-bottom: 22px; }
.modal.right { place-items: center end; background: transparent; padding-right: max(16px, 4vw); pointer-events: none; } .modal.right > * { pointer-events: auto; }
.card, .panel, .dialog { background: var(--paper); border: 5px solid #fff; border-radius: 30px; box-shadow: var(--shadow); animation: rise .22s; }
@keyframes rise { from { transform: translateY(18px) scale(.97); opacity: 0; } }
.card { width: min(94vw, 480px); padding: 22px 24px 24px; text-align: center; display: grid; gap: 8px; justify-items: center; position: relative; max-height: 94vh; overflow: auto; }
.card.wide { width: min(96vw, 760px); }
.card h2, .panel h2 { margin: 2px 0; font-size: 1.6rem; color: var(--blue-d); line-height: 1.15; }
.card-art { width: 150px; height: 150px; border-radius: 28px; background: radial-gradient(#fff, #dff0ff) center/contain no-repeat; border: 4px solid var(--line); font-size: 5rem; display: grid; place-items: center; background-size: 94%; }
.card-art.small { width: 84px; height: 84px; font-size: 2.8rem; border-radius: 22px; }
.card-text { margin: 4px 0; font-size: 1.14rem; line-height: 1.45; font-weight: 600; text-align: left; }
.card-selo, .passo { background: var(--blue); color: #fff; font-weight: 800; font-size: .85rem; padding: 4px 14px; border-radius: 999px; }
.ref { font-size: .78rem; font-weight: 700; color: var(--brown-l); background: #f6ecd2; padding: 5px 12px; border-radius: 10px; text-align: left; justify-self: stretch; }
.pergunta { display: flex; gap: 12px; align-items: center; font-size: 1.3rem; font-weight: 800; line-height: 1.25; text-align: left; margin: 4px 0 6px; }
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; width: 100%; }
.opt { display: grid; justify-items: center; align-content: center; gap: 6px; padding: 14px 10px; min-height: 84px; border-radius: 22px; background: #fff; border: 4px solid var(--line); border-bottom-width: 7px; font-weight: 800; transition: transform .1s; }
.opt:hover:not(:disabled) { transform: translateY(-3px); border-color: var(--gold); }
.opt-emoji { font-size: 2.6rem; line-height: 1; } .opt-label { font-size: 1.08rem; line-height: 1.2; }
.opt-img { width: 118px; height: 118px; background: center/contain no-repeat; }
.opt.sel { border-color: var(--blue); background: #e6f2ff; }
.opt.right { border-color: var(--green); background: #e3f8e6; animation: yay .4s; } .opt.wrong { border-color: #f0a48f; background: #fff1ec; animation: shake .35s; opacity: .7; }
@keyframes shake { 25% { transform: translateX(-7px); } 75% { transform: translateX(7px); } } @keyframes yay { 50% { transform: scale(1.07); } }
.feedback { min-height: 2.6em; font-weight: 800; font-size: 1.08rem; padding: 6px 14px; border-radius: 14px; display: grid; align-items: center; }
.feedback.good { background: #e3f8e6; color: #1f6b3a; } .feedback.try { background: #fff3c9; color: #8a5a00; }
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; margin-bottom: 6px; }
.slot { min-height: 74px; border: 3px dashed var(--line); border-radius: 16px; display: grid; place-items: center; font-size: 1.5rem; padding: 4px; color: var(--brown-l); } .slot.full { border-style: solid; border-color: var(--green); background: #e3f8e6; color: var(--brown); }
.slot b { font-size: .8rem; } .slot small { font-size: .72rem; font-weight: 700; line-height: 1.1; }
.prayer .lines { width: 100%; max-height: 34vh; overflow: auto; display: grid; gap: 4px; padding: 10px; background: #fff; border: 3px solid var(--line); border-radius: 18px; min-height: 64px; }
.line { font-size: 1.25rem; font-weight: 800; color: var(--blue-d); animation: rise .3s; } .sobre { margin: 0; font-weight: 600; font-size: 1.02rem; line-height: 1.4; }
.choose-head { display: flex; gap: 14px; align-items: center; text-align: left; justify-self: stretch; } .choices { display: grid; gap: 10px; width: 100%; } .btn.choice { text-align: left; border-radius: 18px; }

/* diálogo */
.dialog { width: min(96vw, 820px); display: flex; gap: 16px; padding: 16px 20px; align-items: center; }
.dialog-pic { width: 112px; height: 112px; flex: none; border-radius: 50%; background: #cfe9ff center 40%/118% no-repeat; border: 4px solid var(--gold); }
.dialog-body { flex: 1; display: grid; gap: 4px; min-width: 0; }
.dialog-name { justify-self: start; background: var(--blue); color: #fff; font-weight: 800; padding: 3px 14px; border-radius: 999px; font-size: .95rem; }
.dialog-text { margin: 4px 0; font-size: 1.22rem; font-weight: 700; line-height: 1.4; min-height: 3.4em; }
.dialog-row { display: flex; gap: 10px; justify-content: flex-end; align-items: center; }

/* comemoração */
.celebrate { overflow: hidden; } .celebrate h2 { color: var(--gold-d); }
.burst { position: absolute; inset: -40% -40% auto; height: 150%; background: repeating-conic-gradient(from 0deg, rgba(255, 212, 94, .28) 0 12deg, transparent 12deg 24deg); animation: spin 18s linear infinite; pointer-events: none; z-index: 0; }
.celebrate > *:not(.burst) { position: relative; z-index: 1; } @keyframes spin { to { transform: rotate(360deg); } }
.medal { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; font-size: 2.3rem; background: radial-gradient(circle at 35% 30%, #fff3b8, var(--gold) 65%, var(--gold-d)); border: 4px solid #fff; box-shadow: 0 4px 0 var(--gold-d); }
.medal.big { width: 128px; height: 128px; font-size: 4rem; animation: yay .8s; } .medal-name { font-size: 1.15rem; } .xp-gain { font-weight: 800; color: var(--green); font-size: 1.15rem; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; }

/* painéis */
.panel { width: min(96vw, 620px); max-height: 92vh; display: flex; flex-direction: column; padding: 18px 20px 20px; } .panel.big { width: min(96vw, 860px); }
.panel.side { width: min(92vw, 380px); gap: 10px; } .panel.side h2 { text-align: center; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; } .panel-body { overflow: auto; display: grid; gap: 10px; padding: 2px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; } .tab { flex: 1; padding: 10px 8px; min-height: 50px; border-radius: 16px; background: #f6ecd2; border: 3px solid transparent; font-weight: 800; font-size: 1rem; white-space: nowrap; } .tab.on { background: #fff; border-color: var(--gold); }
.tab-view { display: grid; gap: 10px; align-content: start; min-height: 40vh; } .tab-view h3 { margin: 8px 0 0; font-size: 1.1rem; color: var(--blue-d); }
.hint { font-size: .92rem; font-weight: 600; color: var(--brown-l); margin: 4px 0; }
.mission { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 18px; background: #fff; border: 3px solid var(--line); } .mission.locked { opacity: .6; } .mission.active { border-color: var(--gold); background: #fffbe9; } .mission.done { border-color: #9fdca8; background: #f1fbf0; }
.m-ico { font-size: 2.1rem; } .m-txt { flex: 1; display: grid; gap: 2px; } .m-txt span { font-size: .92rem; font-weight: 600; } .m-txt em { font-style: normal; font-weight: 800; color: var(--gold-d); font-size: .88rem; } .m-st { font-size: 1.4rem; } .tag { background: var(--gold); padding: 4px 10px; border-radius: 99px; font-weight: 800; font-size: .8rem; }
.medals, .areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.medal-card, .area { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 14px 10px; border-radius: 20px; background: #f4efe2; border: 3px solid var(--line); } .medal-card span, .area span { font-size: .85rem; font-weight: 600; }
.medal-card:not(.has) { filter: grayscale(1); opacity: .65; } .medal-card.has { background: #fffbe9; border-color: var(--gold); }
.area { background: #fff; } .a-ico { font-size: 2.4rem; } .area em { font-style: normal; font-weight: 800; font-size: .8rem; padding: 2px 10px; border-radius: 99px; background: #eee3c8; } .area em.ok { background: #cdeed2; color: #1f6b3a; } .area.soon { opacity: .75; border-style: dashed; }
.entry { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 16px; background: #fff; border: 3px solid var(--line); text-align: left; } .entry > div:nth-child(2) { display: grid; gap: 2px; flex: 1; } .entry span { font-weight: 600; font-size: .95rem; line-height: 1.35; } .entry small { color: var(--brown-l); font-weight: 700; font-size: .74rem; } .e-ico { font-size: 1.8rem; }
.level-box { display: grid; gap: 6px; justify-items: center; padding: 16px; border-radius: 22px; background: linear-gradient(#e9f4ff, #fff); border: 3px solid #b9d9f7; } .level-box .lv { background: var(--blue); color: #fff; font-weight: 800; padding: 3px 14px; border-radius: 99px; } .level-box b { font-size: 1.6rem; color: var(--blue-d); } .level-box .bar { width: 100%; height: 16px; } .level-box span { font-weight: 700; font-size: .92rem; }
.theme { display: grid; grid-template-columns: minmax(150px, 1.2fr) 2fr auto; gap: 12px; align-items: center; font-weight: 800; } .theme em { font-style: normal; }
.set { display: flex; gap: 14px; align-items: center; padding: 10px 14px; border-radius: 16px; background: #fff; border: 3px solid var(--line); cursor: pointer; } .set input { width: 30px; height: 30px; accent-color: var(--blue); flex: none; } .set div { display: grid; } .set span { font-size: .88rem; font-weight: 600; color: var(--brown-l); }
.prose { font-weight: 600; line-height: 1.5; user-select: text; } .prose h3 { margin: 12px 0 2px; color: var(--blue-d); } .prose p { margin: 4px 0; }
.refs { display: grid; gap: 6px; user-select: text; } .ref-row { display: flex; gap: 10px; padding: 8px 12px; background: #fff; border: 2px solid var(--line); border-radius: 12px; font-size: .88rem; } .ref-row div { display: grid; } .ref-row div span { font-weight: 600; color: var(--brown-l); }
.field { display: grid; gap: 4px; font-weight: 800; } .field input { font: 800 1.1rem var(--font); padding: 10px 14px; border-radius: 14px; border: 3px solid var(--line); color: var(--brown); user-select: text; } .field-t { font-weight: 800; margin-top: 4px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; } .sw { width: 48px; height: 48px; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 0 0 3px var(--line); } .sw.txt { width: auto; padding: 0 14px; border-radius: 99px; background: #fff; font-weight: 800; font-size: .9rem; } .sw.on { box-shadow: 0 0 0 4px var(--blue); }

/* acessibilidade */
body.contrast { --paper: #fff; --brown: #1a1208; --brown-l: #3a2a18; --line: #5b3a1e; --blue: #0b4fa8; --blue-d: #08357a; }
body.contrast .toast, body.contrast #chip, body.contrast .hud-btn, body.contrast #tut { background: #fff; border-color: #1a1208; }
body.calm * { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; } }

@media (max-width: 760px) {
  #objective { top: 88px; max-width: 94vw; width: max-content; font-size: .92rem; padding: 8px 14px; } #toasts { top: 150px; }
  .hud-btn { width: 54px; height: 54px; font-size: 1.4rem; border-radius: 16px; } .hud-btn small { display: none; }
  #chip-pic { width: 46px; height: 46px; } .chip-info { min-width: 96px; } #tut { display: none; }
  .dialog { padding: 12px; gap: 10px; } .dialog-pic { width: 70px; height: 70px; } .dialog-text { font-size: 1.05rem; }
  .card h2 { font-size: 1.3rem; } .pergunta { font-size: 1.1rem; } .opts { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; } .opt-img { width: 84px; height: 84px; } .card-art { width: 110px; height: 110px; font-size: 3.6rem; }
  .modal.right { place-items: end center; padding: 8px; } .panel.side { width: 96vw; max-height: 52vh; } .theme { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-height: 520px) { .card-art { width: 80px; height: 80px; font-size: 2.6rem; } .dialog-text { min-height: 2.4em; } #tut { display: none; } }


/* =====================================================================
   TEMA V2 — visual de "livro de aventuras": molduras douradas, azul real,
   botões redondos como os da referência.
   ===================================================================== */
:root { --gold-l: #ffe08a; --royal: #2468c9; --royal-d: #163f8a; --ink: #4a2c0c; --frame: linear-gradient(160deg, #ffe9a6, #f2b736 45%, #c98a14); }
.card, .panel, .dialog, .title-card { border: 0; background: linear-gradient(#fffdf5, #fff4d8) padding-box, var(--frame) border-box; border: 6px solid transparent; box-shadow: 0 0 0 3px #fff8e0 inset, 0 10px 0 rgba(74, 44, 12, .28), 0 22px 44px rgba(20, 30, 70, .38); border-radius: 32px; }
.card h2, .panel h2 { color: var(--royal-d); font-size: 1.7rem; letter-spacing: -.01em; }
.btn { border-radius: 18px; border: 3px solid #e2c98e; border-bottom-width: 7px; background: linear-gradient(#fff, #fff3d6); color: var(--ink); box-shadow: 0 2px 0 rgba(255, 255, 255, .8) inset; }
.btn.primary { background: linear-gradient(#ffe27a, #f7b520 60%, #e89e0a); border-color: #b9770a; color: #4a2c0c; text-shadow: 0 1px 0 rgba(255, 255, 255, .5); }
.btn.primary:hover { filter: brightness(1.06); }
.btn-round { background: linear-gradient(#5aa2f2, var(--royal)); border: 3px solid #fff; border-bottom-width: 3px; box-shadow: 0 0 0 3px #e8a92e, 0 5px 0 3px #b9770a; color: #fff; }
.btn-round.close { background: linear-gradient(#ff8a70, #e4572e); }
.modal { background: radial-gradient(ellipse at center, rgba(20, 50, 110, .25), rgba(10, 25, 70, .6)); backdrop-filter: blur(3px); }
.modal.bottom { backdrop-filter: none; background: linear-gradient(transparent 40%, rgba(10, 25, 70, .5)); } .modal.right { backdrop-filter: none; background: none; }

/* HUD */
#chip { padding: 6px 20px 6px 6px; background: linear-gradient(#2f7fd6, var(--royal-d)); border: 3px solid #fff; box-shadow: 0 0 0 3px #e8a92e, 0 5px 0 3px rgba(20, 40, 90, .45); color: #fff; }
#chip-pic { width: 66px; height: 66px; border: 4px solid #ffd45e; background-color: #cfe9ff; box-shadow: 0 0 0 3px #fff inset; margin: -4px 0 -4px -4px; }
.chip-info b { font-size: 1rem; text-shadow: 0 1px 0 rgba(0, 0, 0, .3); } .chip-info small { color: #ffe9a6; } #chip .bar { background: rgba(0, 0, 0, .28); height: 11px; border: 1px solid rgba(255, 255, 255, .35); }
#objective { background: linear-gradient(#fffdf5, #ffeec4) padding-box, var(--frame) border-box; border: 4px solid transparent; color: var(--ink); box-shadow: 0 5px 0 rgba(74, 44, 12, .3), 0 10px 20px rgba(0, 0, 0, .2); border-radius: 20px; padding: 9px 20px 9px 12px; font-size: 1.06rem; }
.obj-ico { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(#5aa2f2, var(--royal)); border: 2px solid #fff; font-size: 1.2rem; }
.hud-btn { width: 74px; height: 74px; border-radius: 22px; background: linear-gradient(#5aa2f2, var(--royal) 70%, var(--royal-d)); border: 3px solid #fff; box-shadow: 0 0 0 3px #e8a92e, 0 6px 0 3px #b9770a; color: #fff; font-size: 1.9rem; transition: transform .1s; text-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
.hud-btn small { font-size: .7rem; text-shadow: none; } .hud-btn:active { transform: translateY(3px); }
#prompt { border-radius: 20px; border: 3px solid #fff; box-shadow: 0 0 0 3px #b9770a, 0 7px 0 3px rgba(74, 44, 12, .35); font-size: 1.2rem; padding: 12px 24px 12px 14px; }
#tut { background: rgba(22, 63, 138, .88); color: #fff; border: 3px solid #fff; border-radius: 18px; } #tut kbd { border-color: #163f8a; }
.toast { border-radius: 16px; border: 3px solid #fff; box-shadow: 0 0 0 2px #e8c878, 0 5px 0 rgba(74, 44, 12, .25); font-size: 1.02rem; }
.toast.quest { background: linear-gradient(#fff6cf, #ffe38a); } .toast.good { background: linear-gradient(#f1fff0, #cdf2d2); }

/* tela inicial */
#title { background: radial-gradient(ellipse at 50% 40%, rgba(255, 244, 210, .05) 20%, rgba(18, 50, 120, .55)); }
.title-card { padding: 30px 46px 30px; max-width: 560px; gap: 12px; }
.logo-cross { width: 84px; height: 84px; font-size: 2.8rem; margin-top: -72px; background: linear-gradient(#ffe27a, #f2a71a); box-shadow: 0 0 0 4px #b9770a, 0 8px 0 4px rgba(74, 44, 12, .3); border: 5px solid #fff; }
.title-card h1 { font-size: clamp(2.8rem, 8vw, 4.2rem); color: var(--royal-d); text-shadow: 0 3px 0 #fff, 0 6px 0 rgba(22, 63, 138, .18); font-weight: 900; }
.title-card h1 span { color: #e89e0a; }
.title-card p { font-size: 1.2rem; color: #7a5a36; }

/* diálogo */
.dialog { padding: 18px 22px; gap: 18px; border-radius: 28px; }
.dialog-pic { width: 124px; height: 124px; border: 5px solid #ffd45e; box-shadow: 0 0 0 3px #b9770a, 0 5px 0 3px rgba(74, 44, 12, .25); background-color: #cfe9ff; }
.dialog-name { background: linear-gradient(#5aa2f2, var(--royal)); padding: 4px 16px; font-size: 1rem; box-shadow: 0 2px 0 var(--royal-d); }
.dialog-text { font-size: 1.28rem; color: var(--ink); }

/* cartões e atividades */
.card-art { border: 5px solid #ffd45e; box-shadow: 0 0 0 3px #b9770a; background-color: #e4f2ff; border-radius: 30px; }
.card-selo, .passo { background: linear-gradient(#5aa2f2, var(--royal)); box-shadow: 0 2px 0 var(--royal-d); font-size: .9rem; padding: 5px 16px; }
.opt { border-radius: 22px; border: 4px solid #e2c98e; border-bottom-width: 8px; background: linear-gradient(#fff, #fff6df); }
.opt:hover:not(:disabled) { border-color: #f2b736; background: #fffbe9; }
.rotulo { justify-self: start; font-weight: 800; font-size: .9rem; color: var(--royal-d); background: #e4f0ff; padding: 3px 12px; border-radius: 99px; } .rotulo.trad { color: #8a5a00; background: #fff0c4; margin-top: 4px; }
.card-text.trad { font-style: italic; } .card-foot { margin: 0; font-weight: 700; color: #8a6a4a; font-size: .98rem; }
.card-list { margin: 0; padding-left: 1.6em; text-align: left; font-weight: 700; font-size: 1.08rem; line-height: 1.5; justify-self: stretch; } .card-list li::marker { color: var(--royal); font-weight: 900; }
.line.big { font-size: 1.5rem; text-align: center; padding: 10px 0; }
.rosary .lines { max-height: 26vh; text-align: center; } .rosary .sobre { min-height: 1.4em; font-weight: 800; color: #8a5a00; }
.beads { display: flex; gap: 6px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 6px 0; }
.bead { width: 20px; height: 20px; border-radius: 50%; background: #d7e4f5; border: 2px solid #9bb6d8; transition: all .3s; } .bead.big { width: 28px; height: 28px; background: #f3e3b4; border-color: #d9b45a; }
.bead.cross { width: 34px; height: 34px; display: grid; place-items: center; font-weight: 900; color: #b9770a; background: #fff3c9; border-color: #d9b45a; }
.bead.lit { background: #4f95f0; border-color: #1f5fa8; box-shadow: 0 0 10px #7fb8ff; } .bead.big.lit, .bead.cross.lit { background: #ffc93c; border-color: #b9770a; box-shadow: 0 0 12px #ffd66b; } .bead.now { transform: scale(1.35); }
.map-canvas { width: 100%; height: auto; border-radius: 20px; border: 4px solid #e8c878; display: block; }
.tab { border-radius: 16px; background: #f3e6c4; } .tab.on { background: linear-gradient(#ffe27a, #f7b520); border-color: #b9770a; }
.mission, .entry, .set, .area, .medal-card { border-radius: 18px; border-color: #e8d6a8; }
.medal { box-shadow: 0 0 0 3px #b9770a, 0 5px 0 3px rgba(74, 44, 12, .25); }
body.contrast .card, body.contrast .panel, body.contrast .dialog { background: #fff padding-box, linear-gradient(#1a1208, #1a1208) border-box; }
@media (max-width: 760px) { .hud-btn { width: 56px; height: 56px; font-size: 1.45rem; border-radius: 18px; } #chip-pic { width: 50px; height: 50px; } .dialog-pic { width: 76px; height: 76px; } .bead { width: 14px; height: 14px; } .bead.big { width: 20px; height: 20px; } }

/* ---------- terceira rodada: quadros, menino/menina, legenda do trenzinho ---------- */
.card-art.pic { width: min(64vw, 230px); height: min(78vw, 280px); background-size: contain; background-color: #2a2019; border-radius: 14px; border-width: 6px; }
.opt-img { border-radius: 10px; }
.gen { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .gen-btn { font-size: 1.15rem; min-height: 60px; } .gen-btn.on { background: linear-gradient(#ffe27a, #f7b520); border-color: #b9770a; }
#caption { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); width: min(92vw, 780px); display: flex; gap: 14px; align-items: center; padding: 14px 18px; border-radius: 22px; background: linear-gradient(#fffdf5, #ffeec4) padding-box, var(--frame) border-box; border: 5px solid transparent; box-shadow: 0 6px 0 rgba(74, 44, 12, .3), 0 14px 26px rgba(0, 0, 0, .25); font-size: 1.25rem; font-weight: 800; color: var(--ink); line-height: 1.35; }
#caption-text { flex: 1; }
@media (max-width: 760px) { #caption { font-size: 1rem; padding: 10px 12px; bottom: 14px; } .card-art.pic { height: min(60vw, 220px); } }

/* =====================================================================
   CELULAR: controles na tela, tela sempre deitada e layout compacto
   ===================================================================== */
#jump, #rotate { display: none; }
body.touch #joy { left: max(22px, env(safe-area-inset-left)); bottom: 22px; width: 132px; height: 132px; background: rgba(22, 63, 138, .28); border: 4px solid rgba(255, 255, 255, .9); box-shadow: 0 0 0 3px rgba(232, 169, 46, .9); }
body.touch #joy-knob { width: 58px; height: 58px; margin: -29px; background: linear-gradient(#ffe27a, #f7b520); border: 3px solid #fff; }
body.touch #act { right: max(22px, env(safe-area-inset-right)); bottom: 84px; width: 88px; height: 88px; font-size: 2rem; border: 4px solid #fff; box-shadow: 0 0 0 3px #b9770a; background: rgba(255, 226, 122, .55); opacity: .7; }
body.touch #act.on { opacity: 1; background: linear-gradient(#ffe27a, #f7b520); }
body.touch #jump { display: grid; place-items: center; position: absolute; right: calc(max(22px, env(safe-area-inset-right)) + 98px); bottom: 22px; width: 76px; height: 76px; border-radius: 50%; font-size: 2rem; font-weight: 900; color: #fff; background: linear-gradient(#5aa2f2, var(--royal)); border: 4px solid #fff; box-shadow: 0 0 0 3px #e8a92e, 0 5px 0 3px #b9770a; touch-action: none; }
body.touch #jump:active { transform: translateY(4px); box-shadow: 0 0 0 3px #e8a92e; }
body.touch #tut { display: none; }
body.touch #prompt { bottom: 18px; font-size: 1.02rem; padding: 9px 18px; }
@media (orientation: portrait) {
  body.phone #rotate { display: grid; position: fixed; inset: 0; z-index: 200; place-content: center; justify-items: center; gap: 10px; text-align: center; padding: 24px; background: linear-gradient(#2f7fd6, #163f8a); color: #fff; font-size: 1.15rem; }
  #rotate b { font-size: 1.6rem; } .rot-phone { font-size: 5rem; animation: turn 2.2s ease-in-out infinite; }
  @keyframes turn { 0%, 20% { transform: rotate(0); } 60%, 100% { transform: rotate(-90deg); } }
}
/* tela baixa (celular deitado) */
@media (max-height: 520px) {
  html { font-size: 14px; }
  #chip { top: 8px; left: max(8px, env(safe-area-inset-left)); padding: 4px 12px 4px 4px; gap: 6px; } #chip-pic { width: 42px; height: 42px; margin: 0; border-width: 3px; } .chip-info { min-width: 92px; gap: 1px; } .chip-info b { font-size: .82rem; } .chip-info small { font-size: .7rem; }
  #topbtns { top: 8px; right: max(8px, env(safe-area-inset-right)); gap: 6px; } .hud-btn { width: 48px; height: 48px; font-size: 1.35rem; border-radius: 15px; } .hud-btn small { display: none; }
  #objective { top: 8px; width: auto; max-width: calc(100vw - 390px); font-size: .9rem; padding: 6px 12px 6px 8px; border-width: 3px; } .obj-ico { width: 28px; height: 28px; font-size: .95rem; }
  #toasts { top: 62px; } .toast { padding: 6px 12px; font-size: .9rem; }
  #caption { bottom: 8px; font-size: 1rem; padding: 8px 12px; width: min(70vw, 620px); }
  .modal { padding: 6px; } .modal.bottom { padding-bottom: 8px; }
  .modal.right { place-items: center end; padding: 6px max(8px, env(safe-area-inset-right)) 6px 6px; } .panel.side { width: min(46vw, 340px); max-height: 96vh; padding: 10px 12px; gap: 6px; } .panel.side h2 { font-size: 1.15rem; }
  .card, .panel { max-height: 96vh; border-width: 4px; border-radius: 22px; } .card { padding: 10px 16px 12px; gap: 4px; } .card.wide { width: min(96vw, 720px); } .panel { padding: 10px 12px; }
  .card h2, .panel h2 { font-size: 1.25rem; } .card-art { width: 74px; height: 74px; font-size: 2.4rem; border-width: 3px; border-radius: 18px; } .card-art.small { width: 52px; height: 52px; font-size: 1.7rem; }
  .card-text { font-size: 1.02rem; line-height: 1.35; margin: 2px 0; } .ref { font-size: .7rem; padding: 3px 8px; } .row { margin-top: 6px; }
  .card:has(.card-art.pic) { width: min(96vw, 700px); grid-template-columns: auto 1fr; column-gap: 14px; justify-items: start; }
  .card:has(.card-art.pic) > * { grid-column: 2; } .card:has(.card-art.pic) > .card-art { grid-column: 1; grid-row: 1 / span 12; align-self: center; width: 150px; height: min(74vh, 200px); }
  .card:has(.card-art.pic) > .row { justify-self: center; }
  .btn { min-height: 42px; padding: .45em 1em; font-size: 1rem; } .btn.huge { min-height: 52px; font-size: 1.25rem; } .btn-round { width: 42px; height: 42px; font-size: 1.05rem; }
  .pergunta { font-size: 1.08rem; margin: 2px 0; } .opts { gap: 8px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); } .opt { min-height: 58px; padding: 6px; border-bottom-width: 6px; border-radius: 16px; gap: 2px; }
  .opt-emoji { font-size: 1.7rem; } .opt-label { font-size: .95rem; } .opt-img { width: 62px; height: 62px; } .feedback { min-height: 1.9em; font-size: .95rem; padding: 3px 10px; } .slot { min-height: 46px; font-size: 1.1rem; }
  .dialog { padding: 8px 12px; gap: 10px; border-radius: 20px; width: min(96vw, 760px); } .dialog-pic { width: 64px; height: 64px; border-width: 3px; } .dialog-text { font-size: 1.05rem; min-height: 2.5em; margin: 2px 0; }
  .prayer .lines, .rosary .lines { max-height: 26vh; padding: 6px; } .line { font-size: 1.02rem; } .line.big { font-size: 1.15rem; padding: 4px 0; } .sobre { font-size: .92rem; } .bead { width: 13px; height: 13px; } .bead.big { width: 18px; height: 18px; } .bead.cross { width: 24px; height: 24px; }
  .medal.big { width: 70px; height: 70px; font-size: 2.2rem; } .tab { min-height: 38px; padding: 5px; font-size: .88rem; } .tab-view { min-height: 30vh; } .sw { width: 36px; height: 36px; } .gen-btn { min-height: 44px; font-size: 1rem; } .field input { padding: 6px 10px; font-size: 1rem; }
  .title-card { padding: 12px 30px 14px; gap: 6px; } .logo-cross { width: 52px; height: 52px; font-size: 1.7rem; margin-top: -38px; } .title-card h1 { font-size: 2.3rem; } .title-card p { font-size: 1rem; margin-bottom: 2px; }
  .map-canvas { max-height: 62vh; width: auto; margin: 0 auto; }
}

/* ===== Minimapa e tela de carregamento (5ª rodada) ===== */
#mini { position: absolute; top: 96px; right: 14px; width: 132px; height: 132px; padding: 0; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 0 0 3px #e8a92e, 0 6px 0 3px rgba(20, 40, 90, .35), 0 10px 22px rgba(0, 0, 0, .25); background: #8fcf70; overflow: hidden; cursor: pointer; }
#mini canvas { width: 100%; height: 100%; display: block; border-radius: 50%; }
#mini .mini-n { position: absolute; top: 2px; left: 50%; transform: translateX(-50%); font: 800 .7rem/1 system-ui, sans-serif; color: #fff; background: #d8452f; border-radius: 999px; padding: 2px 5px; display: none; }
#mini:focus-visible { outline: 4px solid #ffd45e; outline-offset: 3px; }
@media (max-height: 520px) { #mini { top: 70px; right: 10px; width: 88px; height: 88px; border-width: 3px; } }
@media (max-width: 620px) and (min-height: 521px) { #mini { width: 96px; height: 96px; } }
#loading { background: radial-gradient(circle at 50% 35%, #5fb0f5, #1f4f9c 70%); color: #fff; font-weight: 800; letter-spacing: .02em; text-shadow: 0 2px 0 rgba(0, 0, 0, .25); }


/* =====================================================================
   TEMA V3 — CARTUM (6ª rodada): contorno escuro, cores chapadas, sombra dura,
   ícones desenhados. Vale para o HUD, os botões e todas as janelas.
   ===================================================================== */
:root { --ol: #3a2414; --cream2: #fff7e3; --yel: #ffc93c; --yel-d: #f0a51e; --blu: #3d8bf2; --blu-d: #2565cf; --grn: #4fc06a; --red2: #f2573f; --hard: 0 5px 0 var(--ol); }
svg { display: block; }
.card, .panel, .dialog, .title-card { background: var(--cream2); border: 4px solid var(--ol); border-radius: 28px; box-shadow: 0 8px 0 var(--ol), 0 18px 34px rgba(20, 20, 50, .35); }
.card h2, .panel h2 { color: var(--blu-d); font-weight: 900; }
.btn { border: 3px solid var(--ol); border-radius: 16px; background: #fff; color: var(--ol); font-weight: 900; box-shadow: 0 4px 0 var(--ol); transition: transform .08s, box-shadow .08s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ol); } .btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--ol); border-bottom-width: 3px; }
.btn.primary { background: var(--yel); border-color: var(--ol); color: var(--ol); text-shadow: none; } .btn.primary:hover { filter: none; background: #ffd55e; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; } .btn.danger { background: #ffe1da; }
.btn-round { background: var(--blu); border: 3px solid var(--ol); box-shadow: 0 4px 0 var(--ol); color: #fff; } .btn-round.close { background: var(--red2); }
.modal { background: rgba(24, 40, 90, .55); backdrop-filter: blur(2px); } .modal.bottom { background: linear-gradient(transparent 45%, rgba(24, 40, 90, .45)); backdrop-filter: none; } .modal.right { background: none; backdrop-filter: none; }

/* HUD */
#chip { top: 12px; left: 12px; gap: 10px; padding: 5px 18px 5px 5px; background: var(--blu); border: 3px solid var(--ol); box-shadow: var(--hard); color: #fff; border-radius: 999px; }
#chip-pic { width: 60px; height: 60px; margin: 0; border: 3px solid var(--ol); background-color: #cfe9ff; box-shadow: none; }
.chip-info b { font-size: 1rem; font-weight: 900; text-shadow: 0 2px 0 rgba(0, 0, 0, .25); } .chip-info small { color: #fff3c4; font-weight: 800; }
#chip .bar { height: 12px; background: #1d4fa8; border: 2px solid var(--ol); } .bar i { background: var(--yel); border-radius: 0; }
#objective { top: 12px; gap: 10px; padding: 6px 20px 6px 8px; background: var(--cream2); border: 3px solid var(--ol); box-shadow: var(--hard); border-radius: 999px; color: var(--ol); font-size: 1.05rem; font-weight: 900; }
.obj-ico { width: 42px; height: 42px; padding: 5px; border-radius: 50%; background: var(--yel); border: 3px solid var(--ol); } .obj-ico svg { width: 100%; height: 100%; }
.obj-col { display: grid; line-height: 1.15; } .obj-col small { font-size: .68rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--blu-d); }
#topbtns { top: 12px; right: 160px; gap: 10px; }
.hud-btn { width: 64px; height: 64px; border-radius: 50%; padding: 0; background: var(--cream2); border: 3px solid var(--ol); box-shadow: var(--hard); color: var(--ol); display: grid; place-items: center; position: relative; transition: transform .08s, box-shadow .08s; text-shadow: none; }
.hud-btn svg { width: 36px; height: 36px; } .hud-btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--ol); background: #fff; } .hud-btn:active { transform: translateY(5px); box-shadow: 0 0 0 var(--ol); }
.hud-btn small { position: absolute; left: 50%; bottom: -15px; transform: translateX(-50%); font-size: .68rem; font-weight: 900; background: var(--ol); color: #fff; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
#mini { top: 12px; right: 12px; width: 136px; height: 136px; border: 4px solid var(--ol); box-shadow: 0 6px 0 var(--ol); overflow: visible; background: #8fcf70; transition: transform .08s; } #mini:hover { transform: translateY(-2px); }
#mini canvas { border-radius: 50%; } #mini .mini-n { display: none; }
.mini-tag { position: absolute; left: 50%; bottom: -12px; transform: translateX(-50%); font: 900 .72rem/1 var(--font); background: var(--yel); color: var(--ol); border: 3px solid var(--ol); border-radius: 99px; padding: 3px 12px; }
#prompt { background: var(--yel); border: 3px solid var(--ol); box-shadow: var(--hard); border-radius: 999px; color: var(--ol); font-weight: 900; padding: 10px 24px 10px 12px; }
kbd { border: 2px solid var(--ol); border-bottom-width: 4px; border-radius: 9px; color: var(--ol); background: #fff; }
#tut { left: 14px; bottom: 14px; transform: none; gap: 12px; padding: 8px 14px; background: rgba(255, 247, 227, .94); color: var(--ol); border: 3px solid var(--ol); border-radius: 18px; box-shadow: 0 4px 0 var(--ol); font-weight: 800; font-size: .92rem; }
#tut kbd { border-color: var(--ol); }
.toast { background: var(--cream2); border: 3px solid var(--ol); box-shadow: 0 4px 0 var(--ol); border-radius: 16px; font-weight: 800; } .toast.quest { background: #ffe58a; } .toast.good { background: #c9f2cf; }
#caption { background: var(--cream2); border: 3px solid var(--ol); box-shadow: var(--hard); }

/* tela inicial */
.title-card { padding: 30px 46px; } .logo-cross { background: var(--yel); border: 4px solid var(--ol); box-shadow: var(--hard); color: var(--ol); }
.title-card h1 { color: var(--blu-d); text-shadow: 0 4px 0 #fff, 0 7px 0 rgba(37, 101, 207, .25); } .title-card h1 span { color: var(--yel-d); }

/* diálogo, cartões e atividades */
.dialog-pic { border: 4px solid var(--ol); box-shadow: 0 4px 0 var(--ol); background-color: #cfe9ff; }
.dialog-name, .card-selo, .passo { background: var(--blu); border: 2px solid var(--ol); box-shadow: 0 2px 0 var(--ol); color: #fff; font-weight: 900; }
.card-art { border: 4px solid var(--ol); box-shadow: 0 4px 0 var(--ol); background-color: #dff0ff; }
.ref { background: #f3e7c6; border: 2px dashed #b99a5c; }
.opts { gap: 16px; }
.opt { border: 3px solid var(--ol); border-bottom-width: 3px; border-radius: 20px; background: #fff; box-shadow: 0 5px 0 var(--ol); padding: 14px 12px; gap: 8px; transition: transform .08s, box-shadow .08s; }
.opt:hover:not(:disabled) { transform: translateY(-3px); box-shadow: 0 8px 0 var(--ol); background: #fffbe9; border-color: var(--ol); } .opt:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 0 0 var(--ol); }
.opt.sel { background: #dcecff; border-color: var(--ol); } .opt.right { background: #c9f2cf; border-color: var(--ol); } .opt.wrong { background: #ffe1da; border-color: var(--ol); }
/* opções com imagem (quadros dos santos): figuras grandes e bem separadas */
.opts:has(.opt-img) { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 22px; padding: 6px 4px 10px; }
.opt:has(.opt-img) { padding: 14px 12px 12px; gap: 10px; }
.opt-img { width: 150px; height: 180px; border-radius: 12px; border: 3px solid var(--ol); background-color: #2a2019; background-size: contain; }
.card.wide:has(.opt-img) { width: min(96vw, 900px); }
.feedback { border: 2px solid transparent; border-radius: 14px; } .feedback.good, .feedback.try { border-color: var(--ol); }
.slot { border: 3px dashed #b99a5c; } .slot.full { border: 3px solid var(--ol); background: #c9f2cf; }
.tab { border: 3px solid var(--ol); background: #f1e2b8; box-shadow: 0 3px 0 var(--ol); font-weight: 900; } .tab.on { background: var(--yel); border-color: var(--ol); }
.mission, .entry, .set, .area, .medal-card { border: 3px solid var(--ol); border-radius: 18px; box-shadow: 0 3px 0 var(--ol); } .mission.active { background: #fff3c0; border-color: var(--ol); } .mission.done { background: #d9f5dd; border-color: var(--ol); } .medal-card.has { border-color: var(--ol); background: #fff3c0; }
.medal { border: 3px solid var(--ol); box-shadow: 0 4px 0 var(--ol); background: var(--yel); }
.level-box { border: 3px solid var(--ol); background: #e2f0ff; } .level-box .bar { border: 2px solid var(--ol); }
.map-canvas { border: 4px solid var(--ol); } .field input { border: 3px solid var(--ol); }
.sw { border: 3px solid var(--ol); box-shadow: 0 3px 0 var(--ol); } .sw.on { box-shadow: 0 0 0 4px var(--yel), 0 0 0 7px var(--ol); } .sw.txt { font-weight: 900; }
.gen-btn.on { background: var(--yel); border-color: var(--ol); }
.bead { border: 2px solid var(--ol); } .lines, .prayer .lines { border: 3px solid var(--ol); }
#loading { background: var(--blu); }
body.contrast .card, body.contrast .panel, body.contrast .dialog { background: #fff; }

/* controles de toque */
body.touch #joy { background: rgba(255, 247, 227, .35); border: 4px solid var(--ol); box-shadow: none; }
body.touch #joy-knob { background: var(--yel); border: 3px solid var(--ol); box-shadow: 0 4px 0 var(--ol); }
body.touch #act { background: rgba(255, 247, 227, .6); border: 4px solid var(--ol); box-shadow: 0 5px 0 var(--ol); opacity: .75; } body.touch #act svg { width: 46px; height: 46px; }
body.touch #act.on { background: var(--yel); opacity: 1; box-shadow: 0 5px 0 var(--ol); }
body.touch #jump { background: var(--blu); border: 4px solid var(--ol); box-shadow: 0 5px 0 var(--ol); } body.touch #jump svg { width: 40px; height: 40px; } body.touch #jump:active { box-shadow: 0 0 0 var(--ol); transform: translateY(5px); }

@media (max-width: 760px) { .hud-btn { width: 54px; height: 54px; border-radius: 50%; } .hud-btn svg { width: 30px; height: 30px; } .hud-btn small { display: none; } #topbtns { right: 124px; } #mini { width: 100px; height: 100px; } #chip-pic { width: 48px; height: 48px; } #objective { top: 84px; } }
@media (max-height: 520px) {
  #chip { top: 8px; padding: 3px 12px 3px 3px; } #chip-pic { width: 42px; height: 42px; border-width: 3px; }
  #topbtns { top: 8px; right: calc(max(8px, env(safe-area-inset-right)) + 100px); gap: 8px; } .hud-btn { width: 46px; height: 46px; box-shadow: 0 4px 0 var(--ol); } .hud-btn svg { width: 26px; height: 26px; } .hud-btn small { display: none; }
  #mini { top: 8px; right: max(8px, env(safe-area-inset-right)); width: 86px; height: 86px; border-width: 3px; } .mini-tag { font-size: .62rem; padding: 2px 8px; bottom: -9px; border-width: 2px; }
  #objective { top: 8px; padding: 3px 14px 3px 5px; max-width: calc(100vw - 420px); font-size: .9rem; } .obj-ico { width: 30px; height: 30px; padding: 3px; border-width: 2px; } .obj-col small { display: none; }
  .card, .panel, .dialog { border-width: 3px; box-shadow: 0 5px 0 var(--ol); }
  .opts:has(.opt-img) { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; padding: 2px; } .opt-img { width: 84px; height: 100px; border-width: 2px; } .opt:has(.opt-img) { padding: 6px; gap: 4px; }
}

/* genuflexão: aparece só dentro da igreja */
#kneel { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 10px; align-items: center; padding: 9px 20px 9px 11px; border-radius: 999px; background: var(--cream2); border: 3px solid var(--ol); box-shadow: var(--hard); font-weight: 900; font-size: 1.05rem; color: var(--ol); animation: pop2 .25s; }
#kneel:hover { background: #fff; transform: translateY(-2px); } #kneel:active { transform: translateY(4px); box-shadow: 0 0 0 var(--ol); }
@keyframes pop2 { from { transform: scale(.7); opacity: 0; } }
body.touch #kneel { right: max(22px, env(safe-area-inset-right)); bottom: 186px; padding: 8px 16px; font-size: .95rem; } body.touch #kneel kbd { display: none; }

/* créditos e apoio */
.title-links { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.title-card .title-by { margin: 2px 0 0; font-size: .92rem; font-weight: 700; color: #7a5a36; }
.title-card .title-by b { color: var(--blu-d); }
.prose .handle { font-weight: 900; color: var(--blu-d); font-size: 1.1rem; margin: -2px 0 6px; }
.support { display: grid; gap: 8px; padding: 12px 14px; border-radius: 18px; background: #fff3c0; border: 3px solid var(--ol); box-shadow: 0 3px 0 var(--ol); }
.support h3 { margin: 0; color: var(--blu-d); }
.support-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 10px; border-radius: 14px; background: #fff; border: 2px solid var(--ol); font-weight: 700; }
.support-t { font-weight: 900; min-width: 7.5em; } .support-row em { color: var(--brown-l); } .support-row code { user-select: text; word-break: break-all; padding: 2px 8px; background: #f3e7c6; border-radius: 8px; }
.support a.btn { text-decoration: none; display: inline-grid; place-items: center; }
@media (max-height: 520px) { .title-card .title-by { font-size: .8rem; } }

/* logo */
.title-card { padding-top: 14px; }
.title-h1 { margin: 0; line-height: 0; } .title-h1 img { width: min(70vw, 420px); height: auto; display: block; filter: drop-shadow(0 6px 0 rgba(58, 36, 20, .25)); animation: logo-in .6s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes logo-in { from { transform: scale(.6) translateY(20px); opacity: 0; } }
#loading { display: grid; place-content: center; justify-items: center; gap: 14px; }
.load-logo { width: min(64vw, 340px); height: auto; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .2)); animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px); } }
@media (max-height: 520px) { .title-h1 img { width: min(34vh, 230px); } .title-card { padding: 8px 26px 10px; gap: 4px; } .title-card p { font-size: .95rem; margin: 0; } .load-logo { width: 200px; } }
@media (max-height: 520px) and (orientation: landscape) {
  .title-card { max-width: min(94vw, 760px); grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 18px; justify-items: center; align-items: center; padding: 10px 22px; }
  .title-h1 { grid-column: 1; grid-row: 1 / span 6; } .title-h1 img { width: min(38vw, 300px); }
  .title-card > :not(.title-h1) { grid-column: 2; }
}

/* =====================================================================
   CELULAR (12ª rodada): tela cheia de verdade, sem rolagem, controles menores
   e proporcionais à altura da tela (iPhone deitado tem só ~390 px de altura)
   ===================================================================== */
html, body { height: 100%; height: 100dvh; overscroll-behavior: none; position: fixed; inset: 0; width: 100%; }
#c { height: 100dvh; }
.install-tip { margin: 2px 0 0; padding: 8px 12px; border-radius: 14px; background: #e4f0ff; border: 2px solid var(--ol); font-size: .88rem; font-weight: 700; line-height: 1.3; max-width: 34em; }

body.touch {
  --safe-l: max(14px, env(safe-area-inset-left)); --safe-r: max(14px, env(safe-area-inset-right)); --safe-b: max(10px, env(safe-area-inset-bottom));
  --joy: clamp(84px, 30vh, 124px); --act: clamp(56px, 18vh, 80px); --jmp: clamp(50px, 15vh, 70px);
}
body.touch #joy { left: var(--safe-l); bottom: var(--safe-b); width: var(--joy); height: var(--joy); border-width: 3px; }
body.touch #joy-knob { width: calc(var(--joy) * .42); height: calc(var(--joy) * .42); margin: calc(var(--joy) * -.21); }
body.touch #act { right: var(--safe-r); bottom: var(--safe-b); width: var(--act); height: var(--act); border-width: 3px; box-shadow: 0 4px 0 var(--ol); }
body.touch #act svg { width: 58%; height: 58%; }
body.touch #jump { right: calc(var(--safe-r) + var(--act) + 14px); bottom: var(--safe-b); width: var(--jmp); height: var(--jmp); border-width: 3px; box-shadow: 0 4px 0 var(--ol); }
body.touch #jump svg { width: 56%; height: 56%; }
body.touch #kneel { right: var(--safe-r); bottom: calc(var(--safe-b) + var(--act) + 12px); padding: 6px 14px; font-size: .85rem; }
body.touch #prompt { bottom: var(--safe-b); font-size: .9rem; padding: 6px 16px 6px 10px; max-width: calc(100vw - var(--joy) - var(--act) - var(--jmp) - 120px); white-space: normal; text-align: left; line-height: 1.15; }
@media (max-height: 460px) {
  html { font-size: 13px; }
  #chip { top: max(6px, env(safe-area-inset-top)); left: var(--safe-l, 8px); padding: 2px 10px 2px 2px; gap: 6px; border-width: 2px; box-shadow: 0 3px 0 var(--ol); } #chip-pic { width: 34px; height: 34px; border-width: 2px; }
  .chip-info { min-width: 74px; } .chip-info b { font-size: .72rem; } .chip-info small { font-size: .62rem; } #chip .bar { height: 8px; }
  #objective { top: max(6px, env(safe-area-inset-top)); padding: 2px 12px 2px 4px; max-width: calc(100vw - 2 * var(--safe-l, 8px) - 330px); font-size: .76rem; border-width: 2px; box-shadow: 0 3px 0 var(--ol); gap: 6px; } .obj-ico { width: 24px; height: 24px; padding: 2px; border-width: 2px; } .obj-col small { display: none; }
  #topbtns { top: max(6px, env(safe-area-inset-top)); right: calc(var(--safe-r, 8px) + 64px); gap: 6px; } .hud-btn { width: 36px; height: 36px; box-shadow: 0 3px 0 var(--ol); border-width: 2px; } .hud-btn svg { width: 20px; height: 20px; } .hud-btn small { display: none; }
  #mini { top: max(6px, env(safe-area-inset-top)); right: var(--safe-r, 8px); width: 58px; height: 58px; border-width: 2px; box-shadow: 0 3px 0 var(--ol); } .mini-tag { display: none; }
  #toasts { top: 46px; } .toast { padding: 4px 10px; font-size: .8rem; }
  .card, .panel, .dialog { max-height: calc(100dvh - 12px); } .dialog { padding: 6px 10px; gap: 8px; } .dialog-pic { width: 52px; height: 52px; } .dialog-text { font-size: .95rem; min-height: 2.2em; }
  .btn { min-height: 38px; font-size: .95rem; } .btn.huge { min-height: 46px; font-size: 1.1rem; }
  #caption { font-size: .9rem; bottom: var(--safe-b, 8px); }
}

/* =====================================================================
   13ª rodada: nada de rolagem. As janelas encolhem para caber (fitToScreen),
   o editor do personagem vira duas colunas e a altura segue a tela VISÍVEL
   ===================================================================== */
:root { --app-h: 100dvh; }
#title, #hud, #layer, #loading { height: var(--app-h); max-height: 100dvh; top: 0; bottom: auto; }
.fit-measure, .fit-measure .panel-body, .fit-measure .lines { max-height: none !important; overflow: visible !important; }
.install-tip { position: fixed; left: 50%; bottom: max(6px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 25; display: flex; gap: 8px; align-items: center; margin: 0; padding: 5px 8px 5px 12px; font-size: .78rem; border-radius: 999px; max-width: 94vw; background: #e4f0ff; border: 2px solid var(--ol); box-shadow: 0 3px 0 var(--ol); font-weight: 700; line-height: 1.2; }
.install-tip button { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--ol); background: #fff; font-weight: 900; line-height: 1; padding: 0; }
.panel.side .grp { display: grid; gap: 4px; }
@media (max-height: 460px) {
  .title-card { gap: 3px; padding: 8px 20px 8px; } .title-card > .title-links .btn { min-height: 30px; padding: 2px 8px; font-size: .85rem; } .title-card .btn.huge { min-height: 42px; font-size: 1.05rem; padding: .3em 1.4em; } .title-card #t-new { min-height: 34px; padding: 2px 14px; }
}
@media (max-height: 460px) {
  .tab-view { grid-template-columns: 1fr 1fr; min-height: 0; gap: 6px 10px; } .tab-view > h3, .tab-view > .hint, .tab-view > .level-box, .tab-view > .theme, .tab-view > .refs { grid-column: 1 / -1; }
  .panel-body:has(> .set) { grid-template-columns: 1fr 1fr; gap: 6px 10px; } .panel-body:has(> .set) > :not(.set) { grid-column: 1 / -1; }
  .mission, .entry, .set, .area, .medal-card { padding: 6px 10px; } .m-ico { font-size: 1.5rem; } .set span, .m-txt span { font-size: .78rem; }
  .map-canvas { max-height: 46vh; } .panel.big { width: min(96vw, 820px); }
}

/* ===== editor do personagem em abas (14ª rodada): um assunto por vez, com respiro ===== */
.panel.side { gap: 12px; }
@media (max-height: 460px) {
  .modal.right { place-items: center end; padding: 6px max(14px, env(safe-area-inset-right)) 6px 6px; }
  .panel.side { width: min(52vw, 440px); padding: 10px 16px 12px; gap: 10px; max-height: none; }
  .panel.side h2 { font-size: 1.05rem; margin: 0; }
}

/* ===== editor numa tela só (15ª rodada) ===== */
.ed-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 26px; align-items: start; }
.ed-col { display: grid; gap: 16px; align-content: start; }
.ed-group { display: grid; gap: 7px; }
.ed-lab { display: flex; align-items: center; gap: 6px; font-weight: 900; font-size: .88rem; color: var(--blu-d); } .ed-lab span { font-size: 1rem; }
.ed-group .swatches { gap: 9px; } .ed-group .gen { gap: 8px; } .ed-group .gen-btn { min-height: 44px; font-size: 1rem; padding: .3em .5em; }
.ed-group input { width: 100%; font: 800 1rem var(--font); padding: 8px 12px; border-radius: 14px; border: 3px solid var(--ol); color: var(--brown); user-select: text; background: #fff; }
.ed-ok { width: 100%; }
@media (max-height: 460px) {
  .panel.side { width: min(72vw, 640px); padding: 10px 18px 12px; gap: 8px; }
  .ed-grid { gap: 10px 26px; } .ed-col { gap: 12px; } .ed-group { gap: 5px; } .ed-lab { font-size: .78rem; }
  .ed-group .sw { width: 32px; height: 32px; border-width: 2px; } .ed-group .swatches { gap: 7px; }
  .ed-group .sw.txt { width: auto; min-width: 0; height: 32px; padding: 0 10px; font-size: .78rem; white-space: nowrap; }
  .ed-group .gen-btn { min-height: 38px; font-size: .9rem; } .ed-group input { padding: 5px 10px; font-size: .92rem; }
  .ed-ok { min-height: 40px; }
}
@media (max-width: 560px) and (orientation: portrait) { .ed-grid { grid-template-columns: 1fr; } }
/* ===== mapa grande (15ª rodada): o mapa ocupa a altura da tela e a lista de lugares fica ao lado ===== */
.map-panel { width: min(96vw, 1000px); }
.map-wrap { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: start; }
.map-wrap .map-canvas { width: auto; height: min(calc(var(--app-h, 100dvh) - 110px), 560px); aspect-ratio: 1100 / 880; max-width: 100%; border-radius: 18px; }
.map-side { display: grid; gap: 8px; align-content: start; } .map-side .hint { margin: 0; font-weight: 800; }
.areas-list { display: grid; gap: 6px; } .area-row { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border: 2px solid var(--ol); border-radius: 12px; background: #fff; font-weight: 800; font-size: .9rem; line-height: 1.15; } .area-row b { flex: 1; } .area-row em { font-style: normal; font-size: .72rem; opacity: .75; } .area-row .a-ico { font-size: 1.15rem; }
.area-row.soon { opacity: .6; border-style: dashed; }
@media (max-height: 460px) {
  .map-panel { width: min(97vw, 900px); padding: 8px 14px 10px; } .map-panel .panel-head { margin-bottom: 4px; }
  .map-wrap { gap: 14px; } .map-wrap .map-canvas { height: calc(var(--app-h, 100dvh) - 72px); }
  .areas-list { grid-template-columns: 1fr 1fr; gap: 5px 8px; } .area-row { padding: 3px 8px; font-size: .72rem; border-width: 2px; gap: 5px; } .area-row .a-ico { font-size: .95rem; } .area-row em { display: none; }
}
@media (max-width: 700px) and (orientation: portrait) { .map-wrap { grid-template-columns: 1fr; } .map-wrap .map-canvas { width: 100%; height: auto; } }
.map-wrap .map-canvas { max-height: none !important; }

/* ===== «Ver minha missão» no mapa (16ª rodada) ===== */
.mission-btn { width: 100%; min-height: 46px; font-size: 1.05rem; }
.mission-card { display: grid; gap: 8px; padding: 10px 12px; border-radius: 16px; background: #fff3c0; border: 3px solid var(--ol); box-shadow: 0 3px 0 var(--ol); text-align: left; }
.mission-card h3 { margin: 0; font-size: 1.1rem; color: var(--blu-d); line-height: 1.2; }
.mc-box { display: grid; gap: 2px; } .mc-box b { font-size: .82rem; color: var(--blu-d); } .mc-box p { margin: 0; font-weight: 700; font-size: .95rem; line-height: 1.35; } .mc-box.now p { font-size: 1.02rem; font-weight: 900; color: var(--ink); }
.mc-text { margin: 0; font-weight: 700; } .mc-steps { margin: 0; padding-left: 1.4em; font-weight: 700; font-size: .9rem; line-height: 1.4; } .mc-steps li::marker { color: var(--blu); font-weight: 900; }
@media (max-height: 460px) {
  .map-side { max-height: calc(var(--app-h, 100dvh) - 72px); overflow: auto; align-content: start; } .mission-btn { min-height: 38px; font-size: .95rem; }
  .mission-card { gap: 5px; padding: 7px 10px; } .mission-card h3 { font-size: .95rem; } .mc-box b { font-size: .7rem; } .mc-box p, .mc-steps { font-size: .76rem; line-height: 1.3; } .mc-box.now p { font-size: .82rem; }
}
@media (max-height: 460px) { .map-side .btn.small { min-height: 30px; padding: 0 12px; font-size: .8rem; } .mission-card { gap: 3px; } .mc-box p, .mc-steps { line-height: 1.25; } .mission-card h3 { font-size: .9rem; } }

/* ===== tela inicial (17ª rodada): logo menor no alto, texto, Jogar e links discretos; assinatura embaixo ===== */
.title-card { display: grid !important; grid-template-columns: 1fr !important; justify-items: center; align-items: center; gap: 10px; padding: 16px 28px 14px; max-width: min(92vw, 560px); text-align: center; }
.title-card > * { grid-column: 1 !important; grid-row: auto !important; }
.title-h1 img { width: auto !important; height: clamp(96px, 36vh, 250px); max-width: 78vw; }
.title-card .tagline { margin: 2px 0 4px; font-size: 1.05rem; font-weight: 700; color: #7a5a36; line-height: 1.35; max-width: 30em; }
.title-card .btn.huge { min-width: 15em; }
.title-card .new-link { font-size: .85rem; min-height: 28px; padding: 0 8px; color: #7a5a36; font-weight: 800; }
.title-links { display: flex; gap: 6px; align-items: center; justify-content: center; margin-top: 2px; color: #a58a64; font-weight: 900; }
.title-links .btn.ghost { min-height: 28px; padding: 0 8px; font-size: .82rem; font-weight: 800; color: #8a6a4a; text-decoration: none; border-radius: 8px; } .title-links .btn.ghost:hover { text-decoration: underline; transform: none; }
.title-card .title-by { margin: 4px 0 0; padding-top: 8px; border-top: 2px dashed #e6d6a8; width: 100%; font-size: .78rem; font-weight: 700; color: #9a7f58; letter-spacing: .01em; } .title-card .title-by b { color: #6a7fb0; font-weight: 800; }
@media (max-height: 520px) {
  .title-card { gap: 4px; padding: 8px 22px 8px; max-width: min(88vw, 520px); }
  .title-h1 img { height: clamp(70px, 30vh, 130px); } .title-card .tagline { font-size: .82rem; margin: 0; }
  .title-card .btn.huge { min-height: 40px; font-size: 1.05rem; padding: .25em 1.4em; min-width: 11em; }
  .title-links { margin: 0; } .title-links .btn.ghost { min-height: 24px; font-size: .74rem; } .title-card .new-link { min-height: 22px; font-size: .74rem; }
  .title-card .title-by { margin: 2px 0 0; padding-top: 4px; font-size: .68rem; }
}
.btn.primary.listening { background: #efe3b8; color: #8a6a4a; cursor: wait; box-shadow: 0 3px 0 var(--ol); } .btn.primary.listening:hover { transform: none; }

/* ===== tela inicial responsiva (18ª rodada): tudo medido em --u, que cresce e encolhe com a tela ===== */
#title .title-card { gap: calc(var(--u, 1px) * 12) !important; padding: calc(var(--u, 1px) * 16) calc(var(--u, 1px) * 34) calc(var(--u, 1px) * 13) !important; border-radius: calc(var(--u, 1px) * 30); width: calc(var(--u, 1px) * 520); max-width: 94vw; zoom: 1 !important; }
#title .title-h1 { margin: 0; line-height: 0; display: block; flex: none; } #title .title-h1 img { height: calc(var(--u, 1px) * 100) !important; width: auto !important; max-width: none !important; display: block; }
#title .tagline { margin: calc(var(--u, 1px) * 2) 0 0 !important; font-size: calc(var(--u, 1px) * 15) !important; line-height: 1.35; }
#title .btn.huge { min-height: calc(var(--u, 1px) * 52) !important; font-size: calc(var(--u, 1px) * 19) !important; padding: 0 calc(var(--u, 1px) * 38) !important; min-width: calc(var(--u, 1px) * 260) !important; margin-top: calc(var(--u, 1px) * 4); border-radius: calc(var(--u, 1px) * 18); }
#title .btn.secondary { min-height: calc(var(--u, 1px) * 40); font-size: calc(var(--u, 1px) * 14.5); padding: 0 calc(var(--u, 1px) * 24); min-width: calc(var(--u, 1px) * 200); background: #fff; border: 3px solid var(--ol); box-shadow: 0 4px 0 var(--ol); border-radius: calc(var(--u, 1px) * 15); font-weight: 900; color: var(--ol); }
#title .btn.secondary:hover { transform: translateY(-2px); } #title .btn.secondary:active { transform: translateY(3px); box-shadow: 0 0 0 var(--ol); }
#title .title-links { margin-top: calc(var(--u, 1px) * 4); gap: calc(var(--u, 1px) * 8); } #title .title-links .btn.ghost { min-height: calc(var(--u, 1px) * 28); font-size: calc(var(--u, 1px) * 13); padding: 0 calc(var(--u, 1px) * 10); }
#title .title-by { margin-top: calc(var(--u, 1px) * 2) !important; padding-top: calc(var(--u, 1px) * 9) !important; font-size: calc(var(--u, 1px) * 12) !important; }
/* tamanho de letra que acompanha a altura da tela (celular pequeno = menor, tablet e computador = maiores) */
html { font-size: clamp(12.5px, calc(2vh + 6px), 17px); }

/* ===== mapa com abas Missões / Lugares e trilha de missões (18ª rodada) ===== */
.map-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .map-tab { min-height: 40px; border-radius: 14px; border: 3px solid var(--ol); background: #f1e2b8; box-shadow: 0 3px 0 var(--ol); font-weight: 900; font-size: .95rem; color: var(--ol); } .map-tab.on { background: var(--yel); transform: translateY(1px); }
.trail { display: flex; gap: 6px; align-items: center; justify-content: space-between; padding: 8px 6px; border-radius: 14px; background: #fff; border: 3px solid var(--ol); position: relative; }
.trail::before { content: ''; position: absolute; left: 22px; right: 22px; top: 50%; height: 4px; border-radius: 4px; background: repeating-linear-gradient(90deg, #cdbb8c 0 8px, transparent 8px 14px); z-index: 0; }
.trail-dot { position: relative; z-index: 1; width: 34px; height: 34px; flex: none; border-radius: 50%; border: 3px solid var(--ol); background: #fff; display: grid; place-items: center; padding: 0; font-size: 1rem; line-height: 1; box-shadow: 0 2px 0 var(--ol); }
.trail-dot.done { background: #bdeec6; } .trail-dot.cur { background: var(--yel); box-shadow: 0 0 0 3px #fff3b0, 0 0 0 5px var(--yel-d); animation: pulse 1.4s infinite; } .trail-dot.next { background: #fff; } .trail-dot.locked { background: #e5dfd0; filter: grayscale(1); opacity: .8; }
.trail-dot.sel { transform: translateY(-3px); box-shadow: 0 5px 0 var(--ol); } .trail-dot i { position: absolute; right: -5px; top: -7px; width: 16px; height: 16px; border-radius: 50%; background: #3fa66b; color: #fff; border: 2px solid var(--ol); font-style: normal; font-size: .62rem; font-weight: 900; display: grid; place-items: center; }
.mission-card h3 { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; } .mission-card h3 em { font-style: normal; font-size: .72rem; padding: 2px 10px; border-radius: 99px; border: 2px solid var(--ol); background: #fff; font-weight: 900; color: var(--ol); } .mission-card h3 em.ok { background: #bdeec6; } .mission-card h3 em.now { background: var(--yel); } .mission-card h3 em.lock { background: #e5dfd0; }
.mc-cols { display: grid; grid-template-columns: 1fr; gap: 6px; } .mc-col { display: grid; gap: 6px; align-content: start; }
@media (max-height: 460px) {
  .map-side { gap: 6px; } .map-tab { min-height: 30px; font-size: .8rem; border-radius: 11px; } .trail { padding: 5px 5px; gap: 3px; } .trail-dot { width: 28px; height: 28px; font-size: .82rem; border-width: 2px; } .trail::before { left: 18px; right: 18px; }
  .mc-cols { grid-template-columns: 1fr 1fr; gap: 4px 12px; } .mission-card h3 em { font-size: .6rem; padding: 1px 7px; }
}

/* ===== Apoie o projeto (19ª rodada): foto do autor, como apoiar sem dinheiro ===== */
.cred-panel { width: min(96vw, 900px); }
.cred-wrap { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 20px 28px; align-items: start; }
.cred-l { display: grid; justify-items: center; text-align: center; gap: 6px; }
.cred-foto { width: clamp(84px, 24vh, 150px); aspect-ratio: 1; border-radius: 50%; border: 4px solid var(--ol); box-shadow: 0 4px 0 var(--ol); background: linear-gradient(160deg, #7fb8f0, #3d8bf2); overflow: hidden; } .cred-foto img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 8%; display: block; }
.cred-nome { margin: 4px 0 0; font-size: 1.25rem; color: var(--blu-d); } .cred-arroba { margin: 0; font-weight: 900; color: #7a5a36; }
.cred-sobre { text-align: left; } .cred-sobre p { margin: 6px 0 0; font-weight: 600; font-size: .95rem; line-height: 1.45; }
.cred-r { display: grid; gap: 12px; align-content: start; } .cred-t { margin: 0; font-size: 1.15rem; color: var(--blu-d); }
.cred-passo { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 16px; background: #fff; border: 3px solid var(--ol); box-shadow: 0 3px 0 var(--ol); text-align: left; }
.cred-n { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 1.2rem; background: var(--yel); border: 3px solid var(--ol); } .cred-pt { display: grid; gap: 8px; } .cred-pt b { font-size: .95rem; line-height: 1.35; }
.cred-btns { display: flex; gap: 8px; flex-wrap: wrap; } .cred-btns a.btn { text-decoration: none; display: inline-grid; place-items: center; min-height: 36px; padding: 0 14px; font-size: .9rem; }
.cred-ig { background: linear-gradient(135deg, #ffe27a, #ff8fb8); } .cred-tt { background: #fff; }
.cred-nota { margin: 0; font-size: .8rem; font-weight: 700; color: #8a6a4a; } .cred-obrigado { margin: 0; font-weight: 900; color: var(--blu-d); }
@media (max-height: 460px) {
  .cred-panel { width: min(97vw, 900px); padding: 8px 14px 10px; } .cred-wrap { gap: 10px 22px; }
  .cred-foto { width: clamp(64px, 21vh, 84px); border-width: 3px; } .cred-nome { font-size: .95rem; margin: 0; } .cred-arroba { font-size: .78rem; } .cred-sobre p { font-size: .72rem; line-height: 1.32; margin-top: 3px; }
  .cred-r { gap: 6px; } .cred-t { font-size: .92rem; } .cred-passo { padding: 5px 9px; gap: 8px; border-width: 2px; border-radius: 12px; } .cred-n { width: 26px; height: 26px; font-size: .85rem; border-width: 2px; } .cred-pt { gap: 4px; } .cred-pt b { font-size: .74rem; line-height: 1.25; }
  .cred-btns a.btn { min-height: 26px; padding: 0 10px; font-size: .72rem; } .cred-nota { font-size: .62rem; } .cred-obrigado { font-size: .78rem; }
}
@media (max-width: 640px) and (orientation: portrait) { .cred-wrap { grid-template-columns: 1fr; } }

/* ===== Pais e catequistas: texto claro, em blocos que abrem e fecham ===== */
.doc-panel { width: min(96vw, 820px); }
.doc-intro { margin: 0 0 10px; font-weight: 700; line-height: 1.5; font-size: 1rem; }
.doc-sec { border: 3px solid var(--ol); border-radius: 16px; background: #fff; box-shadow: 0 3px 0 var(--ol); overflow: hidden; margin-bottom: 8px; }
.doc-sec > summary { cursor: pointer; padding: 12px 14px; font-weight: 900; font-size: 1.02rem; color: var(--blu-d); list-style: none; display: flex; gap: 10px; align-items: center; } .doc-sec > summary::-webkit-details-marker { display: none; } .doc-sec > summary::after { content: '▾'; margin-left: auto; font-size: 1.1rem; transition: transform .2s; } .doc-sec[open] > summary::after { transform: rotate(180deg); } .doc-sec[open] > summary { background: #fff3c0; border-bottom: 3px solid var(--ol); }
.doc-body { padding: 10px 16px 14px; font-weight: 600; line-height: 1.55; user-select: text; font-size: .98rem; } .doc-body p { margin: 8px 0; } .doc-body ul { margin: 6px 0; padding-left: 1.3em; } .doc-body li { margin: 5px 0; } .doc-body h4 { margin: 14px 0 2px; color: var(--blu-d); font-size: 1rem; }
.doc-body a, .refs a { color: #1d5fc0; font-weight: 800; text-decoration: underline; word-break: break-word; }
.doc-aviso { background: #fff3c0; border: 2px dashed #b99a5c; border-radius: 12px; padding: 8px 12px; font-size: .9rem; }
@media (max-height: 460px) { .doc-intro { font-size: .85rem; margin-bottom: 6px; } .doc-sec > summary { padding: 8px 12px; font-size: .9rem; } .doc-body { padding: 6px 12px 10px; font-size: .84rem; line-height: 1.45; } }
.doc-panel .panel-body { display: block; overflow: auto; } .doc-sec { flex: none; }
