/* Tëimur: camada mobile. Carregada por último em todas as páginas; só age até 760 px. */
.m-menu-btn,.m-menu{display:none}

@media (max-width:760px){
  /* Base */
  html,body{overflow-x:clip}
  html.m-menu-locked,html.m-menu-locked body{overflow:hidden}
  body{-webkit-text-size-adjust:100%;text-size-adjust:100%}
  img,video,svg{max-width:100%}

  /* Cabeçalho compacto e fixo */
  .site-header{position:sticky!important;top:0!important;z-index:80!important;display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;min-height:62px!important;height:auto!important;padding:8px 14px 8px 18px!important;margin:0!important;background:rgba(255,253,248,.95)!important;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-bottom:1px solid rgba(181,155,99,.22)!important;box-shadow:0 6px 18px rgba(32,61,67,.05)!important}
  .site-header .site-brand{display:block!important;margin:0!important;padding:0!important;flex:0 0 auto}
  .site-header .site-brand img{display:block!important;height:46px!important;width:auto!important;max-width:none!important}
  .site-nav,.language-switch,.journey-nav,.collection-nav,.motion-control{display:none!important}

  /* Botão do menu */
  .m-menu-btn{display:inline-flex;flex-direction:column;justify-content:center;align-items:center;gap:5px;width:46px;height:46px;padding:0;border:1px solid rgba(169,140,82,.45);border-radius:50%;background:#fffdf8;color:#203d43;cursor:pointer;flex:0 0 auto;-webkit-tap-highlight-color:transparent}
  .m-menu-btn span{display:block;width:18px;height:1.5px;border-radius:2px;background:currentColor}
  .m-menu-btn span:nth-child(2){width:12px;margin-left:6px}
  .m-menu-btn:focus-visible{outline:2px solid #a98c52;outline-offset:3px}
  .m-menu-floating{position:fixed;top:14px;right:14px;z-index:90;background:rgba(255,253,248,.92);box-shadow:0 6px 20px rgba(0,0,0,.18)}

  /* Painel do menu */
  .m-menu{display:flex;flex-direction:column;position:fixed;inset:0;z-index:200;overflow-y:auto;padding:14px 24px calc(28px + env(safe-area-inset-bottom));background:radial-gradient(ellipse at 80% 0%,rgba(190,161,108,.18),transparent 55%),#13313a;color:#f4efe3;opacity:0;transform:translateY(-8px);transition:opacity .25s ease,transform .25s ease}
  .m-menu[hidden]{display:none}
  .m-menu.is-open{opacity:1;transform:none}
  .m-menu-head{display:flex;align-items:center;justify-content:space-between;padding-bottom:14px;border-bottom:1px solid rgba(203,178,121,.25)}
  .m-menu-logo{display:block;height:46px;aspect-ratio:var(--universe-ratio,1418/776);background:#e2c98f;-webkit-mask:var(--universe-art,url(assets/brand/universe-pt.svg)) center/contain no-repeat;mask:var(--universe-art,url(assets/brand/universe-pt.svg)) center/contain no-repeat}
  .m-menu-close{width:46px;height:46px;border-radius:50%;border:1px solid rgba(203,178,121,.45);background:transparent;color:#f4efe3;font:300 30px/1 Georgia,serif;cursor:pointer}
  .m-menu-links{display:flex;flex-direction:column;padding:10px 0 6px}
  .m-menu .m-menu-links a{display:flex!important;align-items:baseline;gap:16px;padding:12px 2px;border-bottom:1px solid rgba(203,178,121,.14);color:#f4efe3;text-decoration:none;font:400 25px/1.15 Story,Georgia,serif;letter-spacing:.01em}
  .m-menu-links a small{font:11px/1 Arial,sans-serif;letter-spacing:.18em;color:#cbb279;min-width:20px}
  .m-menu-links a[aria-current=page]{color:#e2c98f}
  .m-menu-links a[aria-current=page]::after{content:'✧';margin-left:auto;font-size:16px;color:#cbb279}
  .m-menu-test{display:block;margin:18px 0 6px;padding:14px 18px;border:1px solid rgba(203,178,121,.55);border-radius:2px;color:#e2c98f;text-decoration:none;text-align:center;font:12px/1.3 Arial,sans-serif;letter-spacing:.22em;text-transform:uppercase}
  .m-menu-foot{margin-top:auto;padding-top:22px;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:14px}
  .m-menu-langs{display:flex;gap:6px}
  .m-menu-langs a{display:inline-flex;align-items:center;justify-content:center;min-width:44px;height:38px;padding:0 10px;border:1px solid rgba(203,178,121,.4);border-radius:20px;color:#f4efe3;text-decoration:none;font:12px Arial,sans-serif;letter-spacing:.14em}
  .m-menu-langs a[aria-current=page]{background:#e2c98f;border-color:#e2c98f;color:#13313a}
  .m-menu-motion{height:38px;padding:0 14px;border:1px solid rgba(203,178,121,.4);border-radius:20px;background:transparent;color:#d9cfb8;font:12px Arial,sans-serif;letter-spacing:.06em}

  /* Tipografia: leitura confortável */
  main p,section p,.home-author p,article p,details p,aside p,figure p{font-size:16px!important;line-height:1.72!important;max-width:none!important;letter-spacing:0!important}
  .book-reading p,.prologue-frame p{font-size:17px!important;line-height:1.75!important}
  .students-scene p{font-size:18px!important;line-height:1.7!important}
  h1:not(.ornamented-title),h2{font-size:clamp(28px,8.6vw,35px)!important;line-height:1.1!important;letter-spacing:.005em!important;overflow-wrap:break-word;hyphens:manual}
  h3{font-size:clamp(22px,6.6vw,27px)!important;line-height:1.15!important}
  .landscape h3{font-size:clamp(28px,8.6vw,35px)!important}
  .archetype-heading h2,.celestial-copy h2,.uniform-info h3,.uniform-name{font-size:clamp(34px,10.5vw,44px)!important}
  .current-year{font-size:60px!important}
  .year-number{font-size:64px!important}
  .orbit-glyph{font-size:150px!important}
  .font-monogram span{font-size:150px!important}

  /* Textos pequenos demais: mínimo legível */
  .eyebrow,span.eyebrow{font-size:11px!important;letter-spacing:.22em!important;line-height:1.6!important}
  .hero-bottom,.academy-coordinate,.model-state,.label,.teacher-role,.current-stage,.alphabet-label,.rune-name,.rune-sound,.celestial-facts span,.portal-base span,.arrival-film span,.orbit-controls span,dt,footer span,footer a,.btn,button.btn,.uniform-stages button,.year-techniques .technique summary b,.technique summary b,.playlist-tracks small,.playlist-status,.music-platforms-note,.detail-toggle,.download-link span,.portal-bar span,small{font-size:11px!important;line-height:1.5!important}
  .teacher-role{letter-spacing:.14em!important}
  .gate small,a small{font-size:10.5px!important}
  .teacher p,.faculty-group-heading p,.faculty-intro p,.year-chapter>p,.year-chapter details p,.technique p,.uniform-note,.erkan-academy-note,.master-gallery .teacher p,.general-gallery .teacher p{font-size:15px!important;line-height:1.65!important}
  .master-gallery .teacher h3,.general-gallery .teacher h3,.teacher h3{font-size:22px!important}
  footer{gap:12px!important;text-align:center!important}
  footer .copyright{font-size:11px!important;line-height:1.6!important}

  /* Botões e alvos de toque */
  .btn,button.btn,a.btn{min-height:46px;display:inline-flex!important;align-items:center;justify-content:center;padding:0 22px!important;letter-spacing:.2em!important}
  .playlist-tracks button{min-height:56px}

  /* Elementos que invadem o texto */
  .students-portrait{margin-bottom:6px!important}
  .book-cover .book-copy p{position:relative;z-index:2}

  /* Livro: o texto da capa não fica mais sob a imagem */
  .book-cover{display:flex!important;flex-direction:column!important}
  .book-cover .book-copy{position:relative!important;z-index:3!important;padding-bottom:18px!important}

  /* Respiro: menos vazio entre blocos */
  .collection-intro,.races-hero,.atlas-hero,.academy-hero,.language-hero,.music-hero,.book-cover{padding-top:34px!important}

  /* Raças: imagens sem estourar a tela */
  .races-gathering,.races-gathering img{max-width:100%!important;width:100%!important;left:auto!important;right:auto!important;margin-left:0!important;margin-right:0!important}

  /* Home: medalhões em grade 3x3, sem carrossel cortado */
  .orbit-menu{position:relative!important;left:auto!important;right:auto!important;bottom:auto!important;width:auto!important;height:auto!important;min-height:0!important;margin:0 -20px 40px!important;padding:0!important}
  .orbit-viewport{height:auto!important;padding:22px 0 30px!important;overflow-x:auto!important;overflow-y:hidden!important}
  .orbit-track .gate{width:96px!important}
  .orbit-track .gate b{font-size:13px!important;line-height:1.2!important;white-space:nowrap}
  .orbit-controls{display:flex!important;justify-content:center!important;align-items:center!important;gap:14px!important;margin-top:4px!important}
  .orbit-controls button{width:40px!important;height:40px!important}
  .portal-home .hero{height:auto!important;min-height:0!important;padding-bottom:10px!important}

  /* Raças: imagem de abertura com altura contida */
  .races-gathering img{max-height:520px!important;object-fit:cover!important;object-position:50% 40%!important}

  /* Home: baleia em fluxo, sem cobrir os medalhões */
  .portal-home .whale-arrival{position:relative!important;inset:auto!important;width:100%!important;height:240px!important;margin:0 0 6px!important;overflow:visible!important;pointer-events:none}
  .portal-home .hero-whale{position:absolute!important;top:0!important;left:4%!important;right:auto!important;width:92%!important;max-width:420px!important;height:auto!important}
  /* Home: texto sobre ilustração com fundo de leitura */
  .academy-flow .copy,.wander .copy{position:relative!important;z-index:4!important;background:linear-gradient(180deg,rgba(255,253,248,.96) 0%,rgba(255,253,248,.96) 82%,rgba(255,253,248,0) 100%);padding-bottom:28px!important}
  .wander .link,.academy-flow .link{position:relative;z-index:5}

  /* Livro: logo duplicado sob o cabeçalho */
  .book-home-brand{display:none!important}

  /* Mapa: paisagens com foto nítida e título abaixo */
  .landscapes .landscape{display:block!important;position:relative!important;height:auto!important;min-height:0!important;margin:0 0 30px!important;padding:0!important}
  .landscapes .landscape::before,.landscapes .landscape::after{display:none!important}
  .landscapes .landscape img{position:relative!important;inset:auto!important;display:block!important;width:100%!important;height:270px!important;object-fit:cover!important;opacity:1!important;filter:none!important;mask-image:none!important;-webkit-mask-image:none!important;transform:none!important}
  .landscapes .landscape>div,.mapa-page .landscapes .landscape.reverse>div{position:relative!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;max-width:none!important;width:auto!important;padding:16px 20px 0!important;background:none!important;transform:none!important}
  .landscapes .landscape>div span{font-size:11px!important;letter-spacing:.22em!important;color:#92774d!important;opacity:1!important}
  .landscapes .landscape h3{color:#203d43!important;opacity:1!important;margin-top:6px!important}

  /* Anariel: mestres em uma coluna, texto com largura de leitura */
  .master-gallery,.general-gallery,.director-gallery{grid-template-columns:1fr!important;gap:34px!important}
  .master-gallery .teacher,.general-gallery .teacher,.director-gallery .teacher{margin-top:0!important}
  .master-gallery .teacher-picture,.general-gallery .teacher-picture,.director-gallery .teacher-picture{height:380px!important}
  .teacher p{max-width:none!important}
  .portal-home .whale-arrival{margin-top:18px!important}
}

@media (max-width:380px){
  .m-menu-links a{font-size:22px;padding:11px 2px}
  h1:not(.ornamented-title),h2{font-size:clamp(26px,8.4vw,32px)!important}
}
