html, body { margin: 0; height: 100%; }
body.shell, body { background: #141416; color: #F5F5F7; font-family: Inter, system-ui, sans-serif; overflow: hidden; }

/* aparelho */
.stagewrap { position: fixed; inset: 0 0 0 300px; display: flex; align-items: center; justify-content: center; }
.phone {
  --s: 1;
  position: relative;
  width: calc(390px * var(--s));
  height: calc(844px * var(--s));
  border-radius: calc(52px * var(--s));
  box-shadow: 0 0 0 calc(10px * var(--s)) #0b0b0c, 0 0 0 calc(11px * var(--s)) #2c2c30, 0 40px 90px rgba(0, 0, 0, .6);
  overflow: hidden;
  background: #202125;
}
.stage { position: absolute; left: 0; top: 0; width: 390px; height: 844px; transform: scale(var(--s)); transform-origin: 0 0; overflow: hidden; }
.dc-root { width: 390px; height: 844px; }

/* lista de telas */
.side {
  position: fixed; left: 0; top: 0; bottom: 0; width: 300px; box-sizing: border-box;
  padding: 22px 16px 16px; display: flex; flex-direction: column; gap: 14px;
  background: #18181b; border-right: 1px solid rgba(255, 255, 255, .06); z-index: 20;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; }
.brand span { display: flex; flex-direction: column; }
.brand strong { font-size: 16px; font-weight: 600; }
.brand small { font-size: 12px; color: rgba(235, 235, 245, .55); }
#screens { flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #333 transparent; }
#screens section { margin-bottom: 14px; }
#screens h2 { margin: 0 8px 6px; font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: #E8C878; }
#screens a { display: block; padding: 7px 10px; border-radius: 10px; font-size: 13.5px; color: rgba(235, 235, 245, .78); text-decoration: none; }
#screens a:hover { background: rgba(255, 255, 255, .05); color: #F5F5F7; }
#screens a[aria-current="page"] { background: rgba(232, 200, 120, .14); color: #F5F5F7; box-shadow: inset 0 0 0 1px rgba(232, 200, 120, .35); }
.loading, .note { margin: 0 8px; font-size: 12px; color: rgba(235, 235, 245, .45); line-height: 1.45; }

.toggle {
  display: none; position: fixed; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 30;
  height: 40px; padding: 0 14px; border: 0; border-radius: 999px; gap: 8px; align-items: center;
  font: 600 13px Inter, system-ui, sans-serif; color: #1A1408; background: #E3C277; box-shadow: 0 10px 24px rgba(0, 0, 0, .45); cursor: pointer;
}
.scrim-shell { display: none; }

/* telas médias: lista vira gaveta */
@media (max-width: 899px) {
  .stagewrap { inset: 0; }
  .side { transform: translateX(-100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); box-shadow: 20px 0 50px rgba(0, 0, 0, .5); }
  .drawer-open .side { transform: none; }
  .drawer-open .scrim-shell { display: block; position: fixed; inset: 0; z-index: 15; background: rgba(0, 0, 0, .45); }
  .toggle { display: inline-flex; }
}

/* celular: o app ocupa a tela inteira, como o aplicativo instalado */
body.is-mobile { background: #202125; overflow-x: hidden; overflow-y: auto; overscroll-behavior: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
body.is-mobile .stagewrap { position: static; display: block; }
body.is-mobile .phone { width: 100vw; height: var(--ph); border-radius: 0; box-shadow: none; }
body.is-mobile .stage { width: 390px; height: var(--lh); }
body.is-mobile .dc-root { width: 390px; height: var(--lh); }
body.is-mobile .dc-root > div { height: var(--lh) !important; }
.hint { display: none; }
body.is-mobile .hint.on {
  display: flex; position: fixed; left: 10px; right: 10px; top: calc(10px + env(safe-area-inset-top)); z-index: 40;
  align-items: center; gap: 10px; padding: 12px 12px 12px 16px; border-radius: 18px; font-size: 13px; line-height: 1.4;
  background: rgba(40, 40, 44, .92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: inset 1px 1px 0 -.3px rgba(255, 226, 160, .8), inset 0 0 0 1px rgba(214, 172, 88, .3), 0 12px 30px rgba(0, 0, 0, .5);
  animation: hintIn .5s cubic-bezier(.2, .8, .2, 1) both;
}
.hint button { flex-shrink: 0; height: 32px; padding: 0 12px; border: 0; border-radius: 999px; font: 600 12px Inter, system-ui, sans-serif; background: #E3C277; color: #1A1408; }
@keyframes hintIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: none; } }
body.is-mobile .side { box-shadow: none; }
body.is-mobile .toggle { display: none; }
body.is-mobile.show-toggle .toggle { display: inline-flex; opacity: .85; }
