:root {
  --bg: #140f0b;
  --ink: #f3e6cf;
  --muted: #b8a68a;
  --gold: #e8b866;
  --gold2: #ffcf70;
  --glass: rgba(28, 21, 15, 0.72);
  --line: rgba(232, 184, 102, 0.22);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--sans); overflow: hidden; overscroll-behavior: none; }
canvas#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
[hidden] { display: none !important; }

#hud { position: fixed; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; pointer-events: none; z-index: 5; }
#brand { font-family: var(--serif); font-size: 22px; letter-spacing: .06em; color: var(--gold2); text-shadow: 0 0 18px rgba(255, 190, 90, .35); }
#brand .mark { font-size: 16px; opacity: .8; }
#stats { display: flex; gap: 10px; font-size: 13px; }
#stats > span { background: var(--glass); border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; display: flex; gap: 6px; align-items: center; backdrop-filter: blur(6px); }
#stats > span i { font-style: normal; font-size: 13px; }
#stats b { font-weight: 600; font-variant-numeric: tabular-nums; }

#bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 5;
  display: flex; gap: 4px; padding: 6px; background: var(--glass); border: 1px solid var(--line); border-radius: 22px; backdrop-filter: blur(10px);
  max-width: calc(100vw - 16px); overflow-x: auto; scrollbar-width: none; }
#bar::-webkit-scrollbar { display: none; }
#bar button { flex: 0 0 auto; width: 62px; height: 58px; border: 0; border-radius: 16px; background: transparent; color: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; font: inherit; }
#bar button span { font-size: 22px; line-height: 1; }
#bar button small { font-size: 9.5px; color: var(--muted); max-width: 60px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#bar button:hover, #bar button:focus-visible { background: rgba(232, 184, 102, .12); outline: none; }
#bar button:active { transform: scale(.94); }
@media (max-width: 520px) {
  #bar { gap: 0; padding: 4px; }
  #bar button { width: calc((100vw - 26px) / 8); height: 50px; }
  #bar button small { display: none; }
  #bar button span { font-size: 21px; }
}

#queueBox { position: fixed; top: 34%; left: 50%; transform: translate(-50%, -50%); z-index: 6; text-align: center; background: var(--glass);
  border: 1px solid var(--line); border-radius: 18px; padding: 18px 22px; width: min(340px, calc(100vw - 32px)); backdrop-filter: blur(10px); }
.qTitle { font-family: var(--serif); font-size: 26px; color: var(--gold2); }
.qText { color: var(--muted); margin-top: 6px; font-size: 14px; line-height: 1.45; }

/* Ingresso */
#gate { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 40%, #2a1d12 0%, #0c0805 70%); transition: opacity .9s ease; }
#gate.out { opacity: 0; pointer-events: none; }
.gateInner { text-align: center; padding: 16px; }
#gate h1 { font-family: var(--serif); font-weight: 500; font-size: 54px; letter-spacing: .12em; margin: 18px 0 22px; color: var(--ink); }
#gate p { color: var(--muted); font-size: 14px; margin-top: 16px; }
#enterBtn { font: 600 16px var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: 14px 38px; border-radius: 999px; cursor: pointer;
  color: #1b1209; background: linear-gradient(180deg, var(--gold2), var(--gold)); border: 0; box-shadow: 0 0 40px rgba(255, 190, 90, .35); }
#enterBtn:active { transform: scale(.97); }
.gateFlame { position: relative; width: 40px; height: 120px; margin: 0 auto; }
.gateFlame .flame { position: absolute; left: 50%; top: 4px; width: 22px; height: 40px; transform: translateX(-50%); border-radius: 50% 50% 45% 45% / 65% 65% 35% 35%;
  background: radial-gradient(ellipse at 50% 70%, #fff7da 0%, #ffd27a 35%, #ff9a3c 70%, rgba(255, 120, 40, 0) 100%);
  box-shadow: 0 0 40px 14px rgba(255, 180, 80, .35); animation: flick 2.4s infinite ease-in-out; }
.gateFlame .wick { position: absolute; left: 50%; top: 40px; width: 2px; height: 6px; background: #2b1a0e; transform: translateX(-50%); }
.gateFlame .stick { position: absolute; left: 50%; top: 46px; width: 28px; height: 70px; transform: translateX(-50%); border-radius: 3px; background: linear-gradient(90deg, #d9c8aa, #f6ecd9 45%, #cbb894); }
@keyframes flick { 0%,100% { transform: translateX(-50%) scale(1, 1) rotate(-1deg); } 30% { transform: translateX(-52%) scale(.96, 1.05) rotate(1.5deg); } 60% { transform: translateX(-48%) scale(1.03, .97) rotate(-1deg); } }

/* Pannelli */
#sheet { position: fixed; inset: 0; z-index: 12; display: flex; align-items: flex-end; justify-content: center; background: rgba(5, 3, 2, .45); }
.sheetCard { position: relative; width: min(520px, 100vw); max-height: 82vh; overflow-y: auto; background: #1c150f; border: 1px solid var(--line); border-bottom: 0;
  border-radius: 22px 22px 0 0; padding: 26px 20px calc(22px + env(safe-area-inset-bottom)); animation: up .28s ease; }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.x { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 15px; cursor: pointer; }
.sheetCard h2 { font-family: var(--serif); font-weight: 600; font-size: 28px; margin: 0 0 14px; color: var(--gold2); }
.sheetCard p { color: var(--muted); line-height: 1.5; font-size: 14px; }
.btn { display: block; width: 100%; padding: 14px 16px; border-radius: 14px; border: 0; cursor: pointer; font: 600 15px var(--sans); margin-top: 10px; text-align: center; text-decoration: none; }
.btn.primary { background: linear-gradient(180deg, var(--gold2), var(--gold)); color: #1b1209; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.candleRow { display: flex; justify-content: center; align-items: flex-end; gap: 34px; margin: 6px 0 14px; }
.candleRow .gateFlame { height: 110px; }
.candleRow .big { transform: scale(1.35); transform-origin: bottom; }
.note { font-size: 12.5px !important; text-align: center; margin: 6px 0 0; }

textarea { width: 100%; min-height: 84px; resize: vertical; border-radius: 14px; border: 1px solid var(--line); background: #120d09; color: var(--ink);
  padding: 12px; font: 15px/1.4 var(--sans); }
textarea:focus { outline: 1px solid var(--gold); }
.count { text-align: right; font-size: 11px; color: var(--muted); margin-top: 4px; }
.ints { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.ints li { background: #120d09; border: 1px solid rgba(232, 184, 102, .12); border-radius: 14px; padding: 12px 14px; }
.ints .txt { font-family: var(--serif); font-size: 18px; line-height: 1.35; word-wrap: break-word; }
.ints .row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 12px; color: var(--muted); }
.ints .amen { border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: 999px; padding: 5px 12px; cursor: pointer; font: 500 12.5px var(--sans); }
.ints .amen.done { background: rgba(232, 184, 102, .16); border-color: var(--gold); }
.ints .rep { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; opacity: .6; }

/* Rosario */
#rosary { position: fixed; inset: 0; z-index: 15; background: radial-gradient(ellipse at 50% 35%, #24180f 0%, #0b0705 75%); display: flex; flex-direction: column;
  align-items: center; justify-content: center; touch-action: none; user-select: none; -webkit-user-select: none; padding: 16px; }
#rosMyst { font-family: var(--serif); font-style: italic; color: var(--gold); font-size: 18px; min-height: 24px; text-align: center; }
#rosSvg { width: min(360px, 82vw); height: auto; max-height: 52vh; margin: 8px 0; }
#rosPrayer { text-align: center; max-width: 440px; min-height: 120px; }
#rosName { font-family: var(--serif); font-size: 34px; color: var(--ink); }
#rosText { font-family: var(--serif); font-size: 16px; color: var(--muted); line-height: 1.45; margin-top: 6px; }
#rosHint { position: absolute; bottom: calc(18px + env(safe-area-inset-bottom)); font-size: 12px; color: var(--muted); opacity: .7; text-align: center; padding: 0 20px; }

#toast { position: fixed; left: 50%; top: calc(64px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 30; background: #241a11; border: 1px solid var(--gold);
  color: var(--ink); padding: 10px 16px; border-radius: 999px; font-size: 14px; box-shadow: 0 8px 30px rgba(0,0,0,.4); max-width: calc(100vw - 32px); text-align: center; }
[dir="rtl"] .x { right: auto; left: 12px; }

/* Selettore lingua */
.langPill { pointer-events: auto; cursor: pointer; font: 500 14px var(--sans); color: var(--ink); background: var(--glass); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 16px; margin-top: 18px; backdrop-filter: blur(6px); }
.langPill.small { margin: 0; padding: 5px 10px; font-size: 12.5px; }
.langGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.langBtn { padding: 12px 10px; border-radius: 12px; border: 1px solid var(--line); background: #120d09; color: var(--ink); font: 500 15px var(--sans); cursor: pointer; }
.langBtn.on { border-color: var(--gold); background: rgba(232, 184, 102, .16); }
.langBtn:hover { border-color: var(--gold); }
@media (max-width: 420px) { #stats { gap: 6px; } #stats > span { padding: 4px 8px; } }

/* ---- rifinitura "top 1%": icone SVG, focus visibile, tocchi comodi, movimento ridotto ---- */
.ic { display: inline-block; vertical-align: -0.18em; flex: 0 0 auto; }
#bar button span { display: grid; place-items: center; color: var(--gold2); filter: drop-shadow(0 0 6px rgba(255, 190, 90, .25)); }
#bar button small { letter-spacing: .02em; }
#bar button { min-width: 44px; min-height: 44px; transition: background .2s ease, transform .12s ease; }
#bar { box-shadow: 0 10px 40px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 220, 160, .08); }
#stats > span i { display: grid; place-items: center; color: var(--gold2); }
.sheetCard h2 { display: flex; align-items: center; gap: 10px; }
.sheetCard h2 .ic { color: var(--gold2); }
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; transition: filter .2s ease, transform .12s ease; }
.btn:active { transform: scale(.98); }
.btn.primary:hover { filter: brightness(1.06); }
.ints .amen { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; }
.x { display: grid; place-items: center; }
.langPill { display: inline-flex; align-items: center; gap: 6px; }
button:focus-visible, a:focus-visible, textarea:focus-visible { outline: 2px solid var(--gold2); outline-offset: 2px; }
#brand { font-weight: 600; }
#gate h1 { text-shadow: 0 0 30px rgba(255, 200, 120, .25); }
.sheetCard { box-shadow: 0 -20px 60px rgba(0, 0, 0, .5); background: linear-gradient(180deg, #221810, #17110c); }
@media (prefers-reduced-motion: reduce) {
  .gateFlame .flame { animation: none; }
  .sheetCard { animation: none; }
  #gate { transition: none; }
}

/* Suggerimento del rosario: in alto e ben visibile (richiesta di Giuliano 5/11) */
#rosHint { position: absolute; top: calc(14px + env(safe-area-inset-top)); bottom: auto; left: 50%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px; max-width: calc(100vw - 110px); padding: 10px 18px; border-radius: 999px;
  font: 600 15px/1.3 var(--sans); color: #1b1209; background: linear-gradient(180deg, var(--gold2), var(--gold));
  box-shadow: 0 0 30px rgba(255, 190, 90, .35); opacity: 1; text-align: center; animation: hintPulse 2.4s ease-in-out infinite; }
#rosHint .ic { flex: 0 0 auto; }
#rosary { padding-top: calc(74px + env(safe-area-inset-top)); }
@keyframes hintPulse { 0%, 100% { box-shadow: 0 0 18px rgba(255, 190, 90, .25); } 50% { box-shadow: 0 0 38px rgba(255, 190, 90, .55); } }
@media (prefers-reduced-motion: reduce) { #rosHint { animation: none; } }
@media (max-width: 420px) { #rosHint { font-size: 13.5px; padding: 9px 14px; } }

/* Candela gratis vs cero di sostegno */
.candleChoice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 4px; }
@media (max-width: 460px) { .candleChoice { grid-template-columns: 1fr; } }
.choice { position: relative; display: flex; flex-direction: column; align-items: center; padding: 26px 14px 14px; border-radius: 16px;
  background: #130e0a; border: 1px solid rgba(232, 184, 102, .14); }
.choice.support { border-color: rgba(232, 184, 102, .4); background: linear-gradient(180deg, #24180e, #140e09); }
.choice .gateFlame { height: 104px; margin-bottom: 4px; }
.choice .btn { width: 100%; }
.choice .note { margin: 10px 2px 0; text-align: center; line-height: 1.45; }
.tag { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  font: 700 11px var(--sans); letter-spacing: .08em; padding: 4px 10px; border-radius: 999px; }
.tag.free { color: #bfe8c4; background: rgba(90, 170, 110, .16); border: 1px solid rgba(120, 200, 140, .35); }
.tag.sup { color: #1b1209; background: linear-gradient(180deg, var(--gold2), var(--gold)); }

/* HUD: audio e impostazioni */
.langPill.iconOnly { padding: 5px 8px; }
#flags { position: fixed; top: calc(52px + env(safe-area-inset-top)); right: 16px; z-index: 5; display: flex; gap: 3px; align-items: center; font-size: 15px;
  background: var(--glass); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; backdrop-filter: blur(6px); max-width: calc(100vw - 32px); overflow: hidden; }
#flags .cnt, #flags .more { font: 500 11.5px var(--sans); color: var(--muted); margin-left: 6px; white-space: nowrap; }
#angelus { position: fixed; top: calc(52px + env(safe-area-inset-top)); left: 16px; z-index: 6; display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font: 600 12.5px var(--sans); color: #1b1209; background: linear-gradient(180deg, var(--gold2), var(--gold)); border: 0; border-radius: 999px; padding: 6px 12px;
  box-shadow: 0 0 24px rgba(255, 190, 90, .4); max-width: calc(100vw - 32px); }
@media (max-width: 520px) { #angelus { top: calc(88px + env(safe-area-inset-top)); } #flags { top: calc(52px + env(safe-area-inset-top)); } #stats { gap: 5px; } #stats > span { padding: 4px 7px; } }
.qMore { color: var(--gold2); font-size: 13px; margin: 8px 0 4px; }
#queueBox .btn { margin-top: 12px; }
#gateDed { font: 500 italic 20px var(--serif); color: var(--gold2); margin: -8px 0 18px; }
.latin { font: 17px/1.55 var(--serif) !important; color: var(--ink) !important; }

/* Impostazioni */
.setGroup { background: #120d09; border: 1px solid rgba(232, 184, 102, .14); border-radius: 16px; padding: 6px 12px 12px; margin-bottom: 12px; }
.setRow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; background: none; border: 0; color: var(--ink); font: 500 15px var(--sans); cursor: pointer; padding: 6px 0; text-align: start; }
.setRow > span:not(.sw) { flex: 1; }
.setRow b { font-weight: 500; color: var(--gold2); }
.setRow .ic { color: var(--gold2); }
.sw { width: 44px; height: 26px; border-radius: 999px; background: #3a2c1f; position: relative; transition: background .2s; flex: 0 0 auto; }
.sw i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #cdbfa6; transition: transform .2s; }
.sw.on { background: linear-gradient(180deg, var(--gold2), var(--gold)); }
.sw.on i { transform: translateX(18px); background: #fff7e6; }
[dir="rtl"] .sw.on i { transform: translateX(-18px); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.seg button { flex: 1 1 auto; min-height: 40px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: var(--ink); font: 500 13.5px var(--sans); cursor: pointer; }
.seg button.on { background: rgba(232, 184, 102, .18); border-color: var(--gold); color: var(--gold2); }
.range { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); padding: 2px 0 8px; }
.range input { flex: 1; accent-color: var(--gold); min-height: 32px; }
.setTitle { font: 600 22px var(--serif); color: var(--gold2); padding: 8px 0 2px; }
.setLabel { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
#stPreview { display: block; margin: 4px auto; width: 180px; height: 150px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.swatches button { width: 34px; height: 34px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.swatches button.on { border-color: var(--gold2); box-shadow: 0 0 12px rgba(255, 200, 110, .5); }
.field { width: 100%; min-height: 48px; border-radius: 14px; border: 1px solid var(--line); background: #120d09; color: var(--ink); padding: 0 14px; font: 16px var(--sans); margin-top: 6px; }
.field:focus { outline: 1px solid var(--gold); }
.setRow .sw { flex: 0 0 44px; }

/* fondo delle Impostazioni: Salva / Ripristina / Torna indietro, sempre a portata */
.sheetFoot { position: sticky; bottom: -22px; display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; padding: 12px 0 6px;
  background: linear-gradient(180deg, rgba(23, 17, 12, 0), #17110c 30%); margin-top: 6px; z-index: 2; }
.sheetFoot .btn { margin-top: 0; }
.backBtn { margin-top: 6px; }
#gateDed { font-size: 24px; }
#dedUrl { font-size: 14px; color: var(--gold2); }
#rosAves { margin-top: 6px; font: 500 13px var(--sans); color: var(--muted); text-align: center; max-width: 360px; }
#rosAves b { display: block; color: var(--gold2); font-weight: 600; margin-bottom: 6px; }
#rosAves .bar { display: block; height: 6px; border-radius: 999px; background: #2a1f15; overflow: hidden; margin: 0 auto 6px; width: 240px; }
#rosAves .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold2)); }
.dedHero { display: flex; justify-content: center; padding: 6px 0 2px; }
.dedHero .gateFlame { height: 130px; }
.dedTitle { justify-content: center; text-align: center; font-size: 30px !important; }
.openLink { display: block; text-align: center; font-size: 13px; color: var(--gold2); margin: 8px 0 2px; word-break: break-all; }

/* Guida al primo ingresso */
#tour { position: fixed; inset: 0; z-index: 40; }
#tour .tourHole { position: fixed; border-radius: 16px; border: 2px solid var(--gold2); box-shadow: 0 0 0 9999px rgba(6, 4, 2, .72), 0 0 30px rgba(255, 200, 110, .55);
  transition: all .35s cubic-bezier(.2, .8, .2, 1); pointer-events: none; }
#tour.noHole .tourHole { width: 0 !important; height: 0 !important; left: 50% !important; top: 40% !important; border: 0; }
#tour .tourCard { position: fixed; background: linear-gradient(180deg, #2a1d12, #1a130d); border: 1px solid rgba(232, 184, 102, .45); border-radius: 18px;
  padding: 16px 18px 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); animation: up .3s ease; }
.tourCard h3 { font: 600 24px var(--serif); color: var(--gold2); margin: 6px 0 6px; }
.tourCard p { margin: 0 0 14px; color: #e6d6ba; font-size: 15px; line-height: 1.5; }
.tourDots { display: flex; gap: 5px; }
.tourDots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(232, 184, 102, .3); }
.tourDots i.on { background: var(--gold2); width: 16px; border-radius: 3px; }
.tourBtns { display: flex; justify-content: flex-end; gap: 10px; }
.tourBtns button { min-height: 44px; padding: 0 18px; border-radius: 999px; font: 600 15px var(--sans); cursor: pointer; }
.tSkip { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.tNext { background: linear-gradient(180deg, var(--gold2), var(--gold)); border: 0; color: #1b1209; }
#rosIntro { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; background: rgba(8, 5, 3, .82); padding: 16px; }
.rosIntroCard { max-width: 420px; background: linear-gradient(180deg, #2a1d12, #1a130d); border: 1px solid rgba(232, 184, 102, .45); border-radius: 20px; padding: 22px; text-align: center; }
.rosIntroCard h3 { font: 600 30px var(--serif); color: var(--gold2); margin: 0 0 10px; }
.rosIntroCard p { font-size: 15.5px; line-height: 1.55; color: #e6d6ba; }
@media (prefers-reduced-motion: reduce) { #tour .tourHole { transition: none; } #tour .tourCard { animation: none; } }

/* Contatore comune, visibile a tutti */
#world { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 5;
  display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 8px; max-width: calc(100vw - 32px);
  padding: 8px 16px; border-radius: 999px; cursor: pointer; color: var(--ink); font: 500 13.5px var(--sans);
  background: rgba(28, 21, 15, .82); border: 1px solid rgba(232, 184, 102, .45); backdrop-filter: blur(8px);
  box-shadow: 0 0 26px rgba(255, 190, 90, .22); }
#world .wIcon { color: var(--gold2); display: grid; place-items: center; }
#world .wNum { color: var(--gold2); font: 700 17px var(--sans); font-variant-numeric: tabular-nums; }
#world .wBar { flex-basis: 100%; height: 5px; border-radius: 999px; background: #2a1f15; overflow: hidden; }
#world .wBar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold2)); }
#world.pulse { animation: wPulse .9s ease; }
@keyframes wPulse { 0% { box-shadow: 0 0 0 rgba(255, 200, 110, 0); } 40% { box-shadow: 0 0 40px rgba(255, 200, 110, .7); } 100% { box-shadow: 0 0 26px rgba(255, 190, 90, .22); } }
@media (max-width: 520px) { #world { bottom: calc(72px + env(safe-area-inset-bottom)); font-size: 12.5px; padding: 7px 14px; } }
@media (prefers-reduced-motion: reduce) { #world.pulse { animation: none; } }

/* Cartellone del libro */
.bookCard { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 8px; }
.bookCard img { width: 130px; height: auto; border-radius: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.5); flex: 0 0 auto; }
.bookCard h2 { font-size: 24px !important; margin: 4px 0 8px !important; }
.bookCard p { margin: 0; font-size: 14px; }
.bookKicker { font: 600 11.5px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
@media (max-width: 420px) { .bookCard { flex-direction: column; align-items: center; text-align: center; } .bookCard img { width: 150px; } }
.bookMini { display: flex; gap: 12px; align-items: center; width: 100%; margin-top: 10px; padding: 10px 12px; border-radius: 14px; cursor: pointer; text-align: start;
  background: #120d09; border: 1px solid rgba(232, 184, 102, .35); color: var(--ink); font: 13px/1.4 var(--sans); }
.bookMini img { border-radius: 4px; flex: 0 0 auto; }
.bookMini b { color: var(--gold2); font-weight: 600; }
#world .wTxt { white-space: nowrap; }
#world .wIcon { flex: 0 0 auto; }
@media (max-width: 380px) { #world { font-size: 12px; gap: 6px; } #world .wNum { font-size: 15px; } }
#world { flex-wrap: nowrap; }
#world.adv { flex-wrap: wrap; }

/* preghiere cantate */
#prayList { display: grid; gap: 8px; margin: 10px 0; }
.prayRow { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 58px; padding: 8px 14px; border-radius: 14px; border: 1px solid rgba(212,175,106,.35); background: rgba(255,255,255,.04); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.prayRow b { display: block; font-size: 16px; }
.prayRow small { opacity: .7; font-size: 12px; }
.prayRow .pl { flex: none; font-weight: 700; color: #f3d9a4; white-space: nowrap; }
.prayRow.on { border-color: #d4af6a; background: rgba(212,175,106,.2); }
.praySrc { font-size: 12px; opacity: .75; margin: 6px 0 10px; }
.praySrc a { color: #f3d9a4; }
body.praying #prayBtn { box-shadow: 0 0 0 2px #d4af6a, 0 0 14px rgba(212,175,106,.6); }

/* proporzioni stabili sul telefono: niente zoom, niente rimbalzi, niente selezione del testo con il dito */
html, body { overscroll-behavior: none; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea { -webkit-user-select: text; user-select: text; font-size: 16px; }
button, a, [role="button"] { touch-action: manipulation; }
