/* Interface compartilhada dos capítulos. */
#chapterMenu{position:absolute;top:60px;left:50%;transform:translateX(-50%);pointer-events:auto;z-index:3;border:1px solid rgba(240,210,147,.35);border-radius:999px;background:rgba(14,28,44,.8);color:#f4ead2;padding:8px 13px;font:900 10px var(--sans);letter-spacing:.1em}
#chapterMenu:hover,#chapterMenu:focus-visible{background:#31485b;outline:2px solid #91f5db;outline-offset:3px}
#controllerHud{top:102px}
#overlay{display:flex}
#modal{width:min(840px,100%);margin:auto;flex:none}
#modal h1{font-size:clamp(32px,6vw,52px)}
#modal .subtitle{font-size:clamp(12px,2vw,17px);letter-spacing:.14em}
#chapterSelect{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:18px 0 14px;text-align:left}
.chapter-card{position:relative;min-height:98px;border:1px solid #596e7c;border-radius:12px;padding:13px 12px;color:#d4e0e6;background:rgba(5,18,30,.64);text-align:left;transition:background .2s,border-color .2s}
.chapter-card:hover{background:#243e50}
.chapter-card[aria-pressed="true"]{border-color:#f0d293;background:linear-gradient(140deg,#344d54,#203441);box-shadow:inset 0 0 0 1px rgba(240,210,147,.18)}
.chapter-card:focus-visible,#play:focus-visible,#restartChapter:focus-visible{outline:2px solid #91f5db;outline-offset:3px}
.chapter-card small{display:block;color:#b6cbd5;font-size:9px;font-weight:900;letter-spacing:.15em}
.chapter-card strong{display:block;font:700 15px/1.4 var(--serif);color:#f5e3ba;margin:5px 0}
.chapter-card span{display:block;color:#a9ead5;font-size:10px;line-height:1.4}
#saveNote{font-size:10px!important;line-height:1.5!important;margin:8px 0!important;color:#adc4cf!important}
#graphicsLabel{display:flex;align-items:center;justify-content:center;gap:10px;margin:10px 0 14px;font-size:12px;color:#d4e0e6}
#graphicsMode{font:700 12px var(--sans);color:#f5e3ba;background:#142b3c;border:1px solid #728384;border-radius:8px;padding:8px 10px;max-width:100%}
#graphicsMode:focus-visible{outline:2px solid #91f5db;outline-offset:2px}
body[data-graphics="auto"] .box,body[data-graphics="performance"] .box{backdrop-filter:none;-webkit-backdrop-filter:none;background:rgba(12,28,44,.94)}
body[data-graphics="auto"] #pause,body[data-graphics="performance"] #pause{backdrop-filter:none;-webkit-backdrop-filter:none}
body[data-graphics="auto"] #interact,body[data-graphics="performance"] #interact{animation:none}
#restartChapter{border:0;background:none;color:#ceb78b;text-decoration:underline;font-size:11px;padding:10px 14px;display:none;margin:3px auto 0}
#noahInventory{color:#f5d894!important;font-size:11px!important;margin:6px 0 0!important;line-height:1.5!important}
#noahInventory:empty{display:none}
#quest h2{overflow-wrap:break-word}
body.noah-chapter #quest{width:min(380px,calc(100% - 210px))}
body.noah-chapter #days i{height:7px}
body.abraham-chapter #quest{width:min(380px,calc(100% - 210px))}
body.abraham-chapter #days i{height:7px}
body.joseph-chapter #quest{width:min(380px,calc(100% - 210px))}
body.joseph-chapter #days i{height:7px}
body.moses-chapter #quest{width:min(380px,calc(100% - 210px))}
body.moses-chapter #days i{height:7px}
#mobileActions button{touch-action:none}
@media(max-width:760px),(pointer:coarse){
  #chapterMenu{top:calc(max(8px,env(safe-area-inset-top)) + 148px);right:max(8px,env(safe-area-inset-right));left:auto;transform:none;width:40px;height:40px;padding:0;font-size:18px}
  #chapterMenu .ct{display:none}
  #controllerHud{top:auto;bottom:8px;max-width:90vw;overflow:hidden;text-overflow:ellipsis;font-size:9px}
  #modal{width:min(540px,100%)}
  #chapterSelect{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0 10px}
  .chapter-card{padding:10px;min-height:86px}
  .chapter-card strong{font-size:12px}
  .chapter-card small{font-size:8px}
  .chapter-card span{font-size:9px}
  body.noah-chapter #quest{width:min(300px,calc(100% - 112px))}
  body.abraham-chapter #quest{width:min(300px,calc(100% - 112px))}
  body.joseph-chapter #quest{width:min(300px,calc(100% - 112px))}
  body.moses-chapter #quest{width:min(300px,calc(100% - 112px))}
  #chooseMoses{grid-column:1/-1}
  #noahInventory{font-size:10px!important}
  #modal .keys,#modal .touchkeys{margin:10px 0}
}
@media(max-height:600px) and (min-width:600px){#chapterSelect{grid-template-columns:repeat(5,minmax(0,1fr))}#chooseMoses{grid-column:auto}}
@media(max-width:480px){
  #chapterSelect{gap:6px}
  .chapter-card{padding:9px 6px;min-height:100px}
  .chapter-card strong{font-size:11px}
  .chapter-card span{font-size:9px}
}
@media(max-height:600px){
  #modal{padding:18px 22px}
  #modal .glyph,#modal .divider{display:none}
  #modal h1{font-size:32px;margin:8px 0}
  #modal p{font-size:12px;line-height:1.5}
  #chapterSelect{margin:10px 0}
  .chapter-card{min-height:76px;padding:9px}
}
