/* Mystery Times — tema "dossiê à luz de vela"
   Noite de ardósia azul, velino envelhecido, latão e lacre vermelho. */
:root {
  --night: #14222B;
  --night-2: #1C2F3A;
  --night-3: #27404D;
  --vellum: #EADFC4;
  --vellum-2: #DCCDA8;
  --ink: #2B2117;
  --ink-soft: #5E4E3A;
  --brass: #C4A15A;
  --brass-dim: #8E7641;
  --seal: #8A2432;
  --seal-2: #A83244;
  --mist: #A9CBD0;
  --fell: "IM Fell English", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --body: "Spectral", "Iowan Old Style", Georgia, serif;
  --r: 6px;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: inherit; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--night);
  background-image: radial-gradient(ellipse at 30% 0%, #203744 0%, var(--night) 60%);
  background-attachment: fixed;
  color: var(--vellum);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
body.login {
  background-color: #14222B;
  background-image:
    radial-gradient(ellipse at center, rgba(20,34,43,.16) 0%, rgba(20,34,43,.38) 78%),
    url("../img/login-16x9.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
@media (max-aspect-ratio: 4/3) {
  body.login {
    background-image:
      radial-gradient(ellipse at center, rgba(20,34,43,.16) 0%, rgba(20,34,43,.38) 78%),
      url("../img/login-4x3.jpg");
  }
}
h1, h2, h3 { font-family: var(--fell); font-weight: 400; line-height: 1.15; margin: 0; }
p { margin: 0 0 .7em; }
.prose p:last-child { margin-bottom: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.muted { color: var(--ink-soft); font-size: .9rem; }
.empty { opacity: .6; font-style: italic; }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; margin-top: 1rem; }

/* ---------- botões ---------- */
.btn {
  appearance: none; border: 1px solid var(--brass-dim); background: transparent;
  color: inherit; padding: .6rem 1.05rem; border-radius: var(--r);
  font-family: var(--body); font-size: 1rem; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: .4rem; min-height: 44px;
}
.btn:hover { border-color: var(--brass); }
.btn.ghost { border-color: transparent; opacity: .85; }
.btn.ghost:hover { opacity: 1; border-color: var(--brass-dim); }
.btn.icon { padding: .4rem .7rem; font-size: 1.2rem; }
.seal-btn { background: var(--seal); border-color: var(--seal); color: #F6ECD8; font-weight: 600; }
.seal-btn:hover { background: var(--seal-2); border-color: var(--seal-2); }
.brass-btn { background: var(--brass); border-color: var(--brass); color: var(--night); font-weight: 600; }
.brass-btn:hover { background: #d4b56e; border-color: #d4b56e; }
.paper .btn:not(.seal-btn), .modal .btn:not(.seal-btn) { color: var(--ink); }

/* ---------- selo (retrato) ---------- */
.seal {
  --s: 44px; width: var(--s); height: var(--s); flex: none; border-radius: 50%;
  display: inline-grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 35% 30%, #F3E8CF, var(--vellum-2));
  box-shadow: inset 0 0 0 2px var(--brass), inset 0 0 0 4px var(--vellum-2);
  font-size: calc(var(--s) * .5);
}
.seal img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 14%; }
.seal.sm { --s: 32px; } .seal.md { --s: 56px; } .seal.lg { --s: 112px; }

/* ---------- tela inicial ---------- */
.home { max-width: 980px; margin: 0 auto; padding: 4rem 1.5rem 2rem; }
.home-head h1 { font-size: clamp(3.2rem, 9vw, 6rem); color: var(--brass); letter-spacing: .01em; }
.home-head p { font-size: 1.15rem; max-width: 34em; opacity: .85; margin-top: .5rem; }
.shelf { margin-top: 1.6rem; display: grid; gap: 1.5rem; }
.shelf-nav { display: flex; align-items: center; flex-wrap: wrap; gap: .8rem 1rem; margin-top: 2.2rem; }
.shelf-nav h2 { margin: 0; font-size: 2rem; color: var(--brass); }
.case-date { font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.case-file {
  display: grid; grid-template-columns: minmax(320px, 48%) 1fr; background: var(--vellum); color: var(--ink);
  border-radius: 3px 12px 12px 3px; overflow: hidden; box-shadow: 0 18px 40px rgba(0,0,0,.35);
}
.case-cover { background: var(--night-2); display: grid; place-items: center; font-size: 4rem; border-right: 6px double var(--brass-dim); }
.case-cover.has-img { position: relative; padding: 0; min-height: 280px; overflow: hidden; }
.case-cover.has-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.case-body { padding: 1.6rem 1.8rem; }
.case-series { font-style: italic; color: var(--brass-dim); margin: 0 0 .2rem; }
.case-body h2 { font-size: 2.2rem; }
.case-tag { font-size: 1.1rem; margin-top: .6rem; }
.case-meta { color: var(--ink-soft); font-size: .95rem; display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; }
.case-meta .level { margin: 0; display: inline-flex; align-items: center; line-height: 1.2; padding: .18rem .6rem; }
.case-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.home-foot { margin-top: 2rem; }
.case-status { margin: .15rem 0 .7rem; color: var(--ink-soft); font-size: .95rem; }
.case-status b { color: var(--ink); font-weight: 600; }
.case-status.is-new {
  display: inline-flex; align-items: center; margin: 0;
  background: var(--night); color: var(--brass); border: 1px solid var(--night);
  font-family: var(--body); font-weight: 600; font-size: .8rem; line-height: 1.2;
  letter-spacing: .04em; padding: .18rem .6rem; border-radius: 999px;
}
/* ---------- estante ---------- */
.shelf-page {
  --shelf-w: 1080px;
  --shelf-pad: max(40px, calc((100% - var(--shelf-w)) / 2));
  min-height: 100%;
}
.shelf-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px var(--shelf-pad) 18px; border-bottom: 1px solid var(--night-3);
  background: rgba(14, 26, 34, .6);
}
.shelf-bar h1 { font-size: 30px; color: var(--brass); }
.shelf-pills { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.shelf-pill {
  appearance: none; min-height: 44px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--night-3); background: var(--night-2); color: var(--vellum);
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 15px;
}
.shelf-count { color: var(--brass); font-variant-numeric: tabular-nums; }
.shelf-avatar {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brass); color: var(--night); font-family: var(--fell); font-size: 16px; line-height: 1;
}
.shelf-main {
  width: 100%; max-width: calc(var(--shelf-w) + 80px); margin: 0 auto;
  padding: 36px 40px 64px; display: flex; flex-direction: column; gap: 0;
}
.shelf-main > .shelf-fresh { margin-bottom: 28px; }
.shelf-section { display: flex; flex-direction: column; gap: 12px; }
.shelf-kicker {
  margin: 0; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--mist);
}
.shelf-rule {
  display: flex; align-items: center; gap: 14px; margin: 40px 0 34px; color: var(--brass-dim);
}
.shelf-rule::before, .shelf-rule::after {
  content: ""; flex: 1; height: 3px;
  border-top: 1px solid rgba(142, 118, 65, .55); border-bottom: 1px solid rgba(142, 118, 65, .25);
}
.shelf-rule::before { mask-image: linear-gradient(90deg, transparent, #000 40%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%); }
.shelf-rule::after { mask-image: linear-gradient(270deg, transparent, #000 40%); -webkit-mask-image: linear-gradient(270deg, transparent, #000 40%); }
.shelf-rule span { font-size: 12px; line-height: 1; }
.shelf-fresh {
  display: flex; align-items: center; gap: 14px;
  background: var(--night-2); border: 1px solid var(--brass-dim); border-radius: 12px; padding: 10px 14px;
}
.shelf-fresh-seal { --s: 52px; }
.shelf-fresh-copy { flex: 1; display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.shelf-fresh-kicker { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--brass); }
.shelf-fresh-copy b { font-family: var(--fell); font-weight: 400; font-size: 21px; }
.shelf-continue, .shelf-card {
  background-color: var(--vellum);
  background-image:
    radial-gradient(ellipse at 15% 0%, rgba(255, 252, 240, .55) 0%, transparent 55%),
    radial-gradient(ellipse at 100% 100%, rgba(142, 118, 65, .16) 0%, transparent 60%),
    repeating-linear-gradient(0deg, rgba(94, 78, 58, .025) 0 1px, transparent 1px 3px);
}
.shelf-continue {
  display: grid; grid-template-columns: 240px minmax(0, 1fr); align-items: stretch;
  color: var(--ink); border-radius: 3px 10px 10px 3px; overflow: hidden;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 14px 32px rgba(0, 0, 0, .28);
}
.shelf-continue-cover {
  width: 240px; aspect-ratio: 1 / 1; border-right: 6px double var(--brass-dim);
  overflow: hidden; background: var(--night-2); display: grid; place-items: center; font-size: 4rem;
}
.shelf-continue-cover img { width: 100%; height: 100%; object-fit: cover; }
.shelf-continue-body {
  position: relative; padding: 26px 32px; display: flex; flex-direction: column; gap: 8px; min-width: 0;
}
.shelf-continue-body::after {
  content: ""; position: absolute; inset: 8px; pointer-events: none;
  border: 1px solid rgba(142, 118, 65, .35); border-radius: 2px 6px 6px 2px;
}
.shelf-continue .shelf-series { font-style: italic; color: var(--brass-dim); margin: 0; }
.shelf-continue h2 { font-size: 36px; line-height: 1.1; color: var(--ink); margin: 0; }
.shelf-continue-body > p { margin: 0; font-size: 17px; line-height: 1.5; color: #3A2E22; max-width: 52ch; }
.shelf-continue .seal-btn { position: relative; z-index: 1; margin-top: auto; align-self: flex-start; }
.shelf-pack { display: flex; flex-direction: column; gap: 18px; }
.shelf-pack-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.shelf-pack-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.shelf-pack-thumb {
  flex: none; width: 52px; height: 52px; border-radius: 4px; overflow: hidden;
  background: var(--night-2); border: 1px solid var(--night-3);
  display: grid; place-items: center; font-size: 24px;
}
.shelf-pack-thumb img { width: 100%; height: 100%; object-fit: cover; }
.shelf-pack-head h2 { font-size: 30px; line-height: 1.1; color: var(--brass); }
.shelf-pack-head p { margin: 2px 0 0; font-size: 15px; color: var(--mist); }
.shelf-pack-count { margin: 0; font-size: 15px; color: var(--mist); white-space: nowrap; font-variant-numeric: tabular-nums; }
.shelf-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.shelf-card {
  appearance: none; display: flex; flex-direction: column; text-align: left; width: 100%;
  color: var(--ink); border: 0; padding: 0; cursor: pointer;
  border-radius: 3px 8px 8px 3px; overflow: hidden;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .25);
  transition: transform .18s ease, box-shadow .18s ease;
}
.shelf-card:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--brass), 0 14px 30px rgba(0, 0, 0, .32); }
.shelf-cover {
  position: relative; aspect-ratio: 1 / 1; background: var(--night-2);
  border-bottom: 6px double var(--brass-dim); overflow: hidden; display: grid; place-items: center;
}
.shelf-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shelf-emoji { font-size: 2.4rem; }
.shelf-tag {
  position: absolute; top: 10px; left: 10px; z-index: 1;
  font-size: 13px; font-weight: 600; letter-spacing: .03em;
  padding: 4px 11px; border-radius: 999px; line-height: 1.2;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .3);
}
.shelf-tag.is-new { background: var(--brass); color: var(--night); }
.shelf-tag.is-play { background: var(--vellum); color: var(--ink); }
.shelf-seal {
  --s: 60px; position: absolute; top: 12px; right: 12px; z-index: 1;
  box-shadow:
    inset 0 0 0 2px var(--brass),
    inset 0 0 0 4px var(--vellum-2),
    0 0 0 1px rgba(20, 16, 12, .4),
    0 0 10px rgba(0, 0, 0, .55),
    0 8px 16px rgba(0, 0, 0, .45);
}
.shelf-seal img { object-position: center; }
.shelf-card-body { flex: 1; padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.shelf-card h3 { font-size: 21px; margin: 0; color: var(--ink); }
.shelf-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: auto; }
.shelf-card .mode-badge {
  background: #E6B325; color: #2B2117; font-weight: 600; border-radius: 999px; padding: 1px 9px;
}
.mode-badge {
  display: inline-flex; align-items: center; font-size: 13px; line-height: 1.2;
  padding: 1px 8px; border-radius: 4px; background: var(--vellum-2); color: var(--ink); font-style: normal;
}
.mode-badge.online { background: var(--night-2); color: var(--vellum); }
.shelf-card .level { margin: 0; font-size: 13px; padding: 1px 9px; }
@media (max-width: 760px) {
  .shelf-bar { padding: 16px 16px 14px; flex-wrap: wrap; }
  .shelf-bar h1 { font-size: 26px; }
  .shelf-main { padding: 20px 0 40px; }
  .shelf-fresh, .shelf-section, .shelf-pack-head, .shelf-rule, .shelf-main > .empty { margin-left: 16px; margin-right: 16px; }
  .shelf-rule { margin-top: 28px; margin-bottom: 24px; }
  .shelf-pack { gap: 14px; }
  .shelf-pack-thumb { width: 44px; height: 44px; }
  .shelf-pack-head h2 { font-size: 24px; }
  .shelf-continue-body::after { display: none; }
  .shelf-continue { grid-template-columns: 110px minmax(0, 1fr); align-items: center; border-radius: 12px; }
  .shelf-continue-cover { width: 110px; height: 110px; border-right: 0; }
  .shelf-continue-body { padding: 10px 12px; justify-content: center; gap: 4px; }
  .shelf-continue h2 { font-size: 20px; }
  .shelf-continue-body > p:not(.shelf-series) { display: none; }
  .shelf-continue .shelf-series { font-size: 12.5px; }
  .shelf-fresh { flex-wrap: wrap; }
  .shelf-grid {
    display: flex; gap: 12px; overflow-x: auto; padding: 0 16px 8px;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  }
  .shelf-card { flex: none; width: 170px; scroll-snap-align: start; }
  .shelf-pack-head { align-items: flex-start; flex-direction: column; }
}

/* ---------- sala de troféus ---------- */
.trophy-page { min-height: 100%; padding: 22px 40px 40px; display: flex; flex-direction: column; gap: 26px; }
.trophy-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.trophy-back {
  display: block; margin: 0 0 4px; border: 0; background: none; padding: 0; cursor: pointer;
  font-size: 15px; color: var(--mist);
}
.trophy-head h1 { font-size: 50px; line-height: 1.05; color: var(--brass); }
.trophy-stats { margin: 4px 0 0; font-size: 16px; color: var(--mist); }
.trophy-pack { display: flex; flex-direction: column; gap: 14px; padding-top: 18px; border-top: 3px double var(--brass-dim); }
.trophy-pack-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.trophy-pack-head h2 { margin: 0; font-size: 28px; color: var(--vellum); }
.trophy-pack-count { margin: 0; font-size: 15px; color: var(--mist); }
.trophy-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.trophy-tile {
  appearance: none; position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 20px 10px 16px; border-radius: 10px; text-align: center; color: var(--vellum); font: inherit;
}
.trophy-tile.is-earned { border: 1px solid var(--brass-dim); background: var(--night-2); cursor: pointer; }
.trophy-tile.is-locked { border: 1px solid var(--night-3); background: transparent; cursor: default; }
.trophy-seal { --s: 104px; font-size: 46px; }
.trophy-seal.on {
  background: radial-gradient(circle at 35% 30%, #F3E8CF, #DCCDA8);
  box-shadow: inset 0 0 0 2px #C4A15A, inset 0 0 0 5px #DCCDA8, inset 0 0 0 6px #8E7641;
}
.trophy-seal.off {
  background: #14222B; color: var(--mist); opacity: .7;
  box-shadow: inset 0 0 0 1px #27404D;
}
.trophy-seal img { object-position: center; }
.trophy-name { font-family: var(--fell); font-size: 19px; line-height: 1.2; }
.trophy-tile.is-locked .trophy-name,
.trophy-case,
.trophy-tile.is-locked .trophy-when { color: var(--mist); }
.trophy-case { font-size: 13.5px; line-height: 1.3; }
.trophy-when { font-size: 13px; }
.trophy-tile.is-earned .trophy-when { color: var(--brass); }
.trophy-nova {
  position: absolute; top: 10px; right: 10px; z-index: 1;
  font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  background: var(--seal); color: #F6ECD8;
}
@media (max-width: 760px) {
  .trophy-page { padding: 16px 16px 28px; gap: 18px; }
  .trophy-head { flex-direction: column; align-items: stretch; }
  .trophy-head h1 { font-size: 34px; }
  .trophy-head .brass-btn { width: 100%; justify-content: center; }
  .trophy-pack-head h2 { font-size: 22px; }
  .trophy-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 8px; }
  .trophy-tile { gap: 6px; padding: 0; border: 0; background: transparent; }
  .trophy-seal { --s: 84px; font-size: 36px; }
  .trophy-name { font-size: 13.5px; }
}

/* ---------- compartilhar ---------- */
.share-screen {
  position: fixed; inset: 0; z-index: 80; color: var(--vellum);
  background: rgba(8, 14, 18, .9);
  display: flex; align-items: center; justify-content: center; gap: 48px;
  padding: 40px;
}
.share-preview {
  width: min(320px, 70vh); aspect-ratio: 9 / 16; flex: none;
  border-radius: 14px; overflow: hidden; background: var(--night);
  box-shadow: 0 30px 60px rgba(0, 0, 0, .6);
  display: grid; place-items: center;
}
.share-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.share-status { margin: 0; padding: 1rem; text-align: center; color: var(--mist); }
.share-side { display: flex; flex-direction: column; gap: 12px; width: 300px; }
.share-side h2 { font-size: 30px; line-height: 1.1; color: var(--vellum); }
.share-ig { min-height: 50px; border-radius: 8px; justify-content: center; }
.share-dl { min-height: 48px; border-radius: 8px; justify-content: center; color: var(--vellum); }
.share-dismiss {
  min-height: 44px; border: 0; background: none; color: var(--mist);
  font: inherit; font-size: 16px; cursor: pointer;
}
.share-screen .btn:disabled { opacity: .55; cursor: default; }
@media (max-width: 760px) {
  .share-screen {
    background: #0B151B; flex-direction: column; align-items: center; justify-content: flex-start;
    padding: 60px 20px 30px; gap: 16px; overflow: auto;
  }
  .share-preview { width: min(252px, 46vh); border-radius: 12px; }
  .share-side { width: min(100%, 360px); }
  .share-side h2 { text-align: center; font-size: 26px; }
  .share-ig, .share-dl { width: 100%; border-radius: 10px; }
}

/* ---------- menu da conta ---------- */
.account-menu { position: fixed; inset: 0; z-index: 60; }
.account-menu-backdrop { position: absolute; inset: 0; border: 0; background: transparent; cursor: default; }
.account-grab { display: none; }
.account-menu-card {
  position: absolute; top: 80px; right: 40px; width: 300px;
  background: var(--vellum); color: var(--ink); border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .5); overflow: hidden;
}
.account-menu-who {
  display: flex; gap: 12px; align-items: center; padding: 16px 18px;
  border-bottom: 1px solid var(--vellum-2);
}
.account-avatar {
  width: 44px; height: 44px; flex: none; border-radius: 50%;
  display: grid; place-items: center; background: var(--night); color: var(--brass);
  font-weight: 600; font-size: 18px;
}
.account-menu-who b { display: block; font-weight: 600; }
.account-email { display: block; font-size: 14px; color: var(--ink-soft); }
.account-menu-card button[data-act] {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  min-height: 46px; padding: 0 18px; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 17px; color: var(--ink); text-align: left;
}
.account-menu-card button[data-act] span { font-size: 14px; color: var(--ink-soft); }
.account-menu-card button.account-out { color: var(--seal); border-top: 1px solid var(--vellum-2); }
.account-page { min-height: 100%; padding: 22px 40px 40px; display: flex; flex-direction: column; gap: 18px; }
.account-page h1 { font-size: 50px; line-height: 1.05; color: var(--brass); }
.account-block {
  background: var(--vellum); color: var(--ink); border-radius: 6px;
  padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; max-width: 620px;
}
.account-block h2 { font-size: 24px; color: var(--ink); }
.account-block label { display: flex; flex-direction: column; gap: 5px; font-size: 15px; color: var(--ink-soft); }
.account-block input {
  font: inherit; font-size: 17px; color: var(--ink); padding: 11px 12px;
  border: 1px solid var(--brass-dim); border-radius: 6px; background: #F6EEDC;
}
.account-block input[readonly] { color: var(--ink-soft); border-color: var(--vellum-2); background: var(--vellum); }
.account-hint { margin: 0; font-size: 13.5px; color: var(--ink-soft); }
.account-block .btn { color: var(--ink); }
.account-block .seal-btn { color: #F6ECD8; }
.account-save.is-saved, .account-block .seal-btn.is-saved { background: #3C6B3F; border-color: #3C6B3F; }
.account-sent { margin: 0; font-size: 15px; color: #3C6B3F; }
.account-sent[hidden] { display: none; }
@media (max-width: 760px) {
  .account-menu { background: rgba(8, 14, 18, .7); display: flex; flex-direction: column; justify-content: flex-end; }
  .account-menu-backdrop { position: relative; flex: 1; }
  .account-grab {
    display: block; align-self: center; width: 40px; height: 5px; margin: 10px auto 0;
    border-radius: 999px; background: #B8A988;
  }
  .account-menu-card {
    position: relative; top: auto; right: auto; width: 100%;
    border-radius: 16px 16px 0 0; padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }
  .account-menu-card button[data-act] { min-height: 52px; border-top: 1px solid var(--vellum-2); }
  .account-page { padding: 16px 16px 28px; }
  .account-page h1 { font-size: 34px; }
}

/* ---------- porta de entrada ---------- */
.gate { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: stretch; }
.gate-back {
  align-self: flex-start; padding: 20px 32px; font-size: 15px; color: #EADFC4;
  text-decoration: none; text-shadow: 0 1px 6px rgba(0,0,0,.7);
}
.gate-wrap { width: 100%; max-width: 440px; margin: 16px auto 0; }
.gate-tabs { display: flex; gap: 4px; padding: 0 10px; }
.gate-tab {
  flex: 1; min-height: 46px; border: 0; border-radius: 6px 6px 0 0; background: #3A5260; color: #EADFC4;
  font: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
}
.gate-tab.is-on { background: #EADFC4; color: #2B2117; }
.gate-card {
  display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 440px; margin: 0;
  padding: 30px 28px 24px; border-radius: 3px; background: #EADFC4; color: #2B2117;
  box-shadow: inset 0 0 0 7px #EADFC4, inset 0 0 0 8px #8E7641, 0 28px 60px rgba(0,0,0,.45);
}
.gate-card h1 { font-family: var(--fell); font-size: 46px; line-height: 1; font-weight: 400; color: #2B2117; margin: 0; }
.gate-stage { font-family: var(--fell); font-size: 28px; line-height: 1.1; font-weight: 400; margin: 0; }
.gate-rule { display: block; height: 3px; border-top: 1px solid #8E7641; border-bottom: 1px solid #C4A15A; }
.gate-lede, .gate-copy, .gate-note { margin: 0; color: #5E4E3A; }
.gate-lede { font-style: italic; }
.gate-copy b { color: #2B2117; font-weight: 600; }
.gate-note { font-size: 15px; }
.gate-field { display: flex; flex-direction: column; gap: 5px; }
.gate-field label, .gate-labelrow { font-size: 15px; color: #5E4E3A; }
.gate-labelrow { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.gate-card input {
  font: inherit; font-size: 17px; width: 100%; min-height: 46px; padding: 0 12px; color: #2B2117;
  border: 1px solid #8E7641; border-radius: 6px; background: #F6EEDC;
}
.gate-pass { display: flex; align-items: center; border: 1px solid #8E7641; border-radius: 6px; background: #F6EEDC; }
.gate-pass input { flex: 1; min-width: 0; border: 0; border-radius: 0; background: transparent; outline: none; }
.gate-eye {
  min-height: 44px; padding: 0 12px; border: 0; background: none; color: #5E4E3A;
  font: inherit; font-size: 14px; cursor: pointer;
}
.gate-help { font-size: 13.5px; color: #5E4E3A; }
.gate-help.is-ok { color: #3C6B3F; }
.gate-error { margin: 0; font-size: 15px; color: #8A2432; }
.gate-submit, .gate-secondary {
  width: 100%; margin: 0; min-height: 48px; border-radius: 6px; font: inherit; font-weight: 600; cursor: pointer;
}
.gate-submit { border: 0; background: #8A2432; color: #F6ECD8; font-size: 17px; }
.gate-secondary { border: 1px solid #8E7641; background: transparent; color: #2B2117; font-size: 16px; }
.gate-submit:disabled, .gate-secondary:disabled { cursor: default; opacity: .65; }
.gate-link {
  background: none; border: 0; padding: 6px 0; margin: 0; color: #8A2432; cursor: pointer;
  font: inherit; font-size: 15px; text-decoration: underline; text-underline-offset: 3px;
}
.gate-backlink { align-self: center; padding: 8px; color: #5E4E3A; }
.gate-legal { margin: 0; font-size: 13.5px; color: #5E4E3A; }
.gate-legal a { color: #5E4E3A; }
@media (max-width: 760px) {
  .gate-back { padding: 52px 20px 8px; }
  .gate-wrap { max-width: none; width: auto; margin: 16px 14px 0; }
}

/* ---------- telas de papel (intro, relatório) ---------- */
.paper-screen { min-height: 100%; display: grid; place-items: center; padding: 2rem 1rem; }
.paper {
  background: var(--vellum); color: var(--ink); max-width: 640px; width: 100%;
  padding: clamp(1.6rem, 4vw, 3rem); border-radius: 4px; box-shadow: 0 30px 60px rgba(0,0,0,.45);
  position: relative;
}
.paper.wide { max-width: 820px; }
.paper h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: 1rem; }
.paper .prose { font-size: 1.12rem; line-height: 1.7; }
.intro .prose p { margin-bottom: 1em; }
.page-count { font-style: italic; color: var(--brass-dim); }
.paper form label { display: block; font-size: 1.15rem; margin: 1rem 0 .5rem; }
.paper input, .notes, .answer, .kw input, .scanner input {
  font: inherit; font-size: 1.1rem; width: 100%; padding: .7rem .9rem; border-radius: var(--r);
  border: 1px solid var(--brass-dim); background: #F6EEDC; color: var(--ink);
}
.paper form .btn { margin-top: 1rem; }
.setup { padding-left: 1.3rem; }
.setup li { margin-bottom: .6rem; }
.how { border-top: 1px solid var(--vellum-2); margin-top: 1.4rem; padding-top: 1rem; }
.how h2 { font-size: 1.5rem; margin-bottom: .5rem; }
#go { margin-top: 1rem; }

/* ---------- partida: estilos novos no fim do arquivo ---------- */

/* entradas do diário (detalhe da carta) */
.feed { flex: 1; overflow: auto; padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .8rem; }
.entry { margin: 0; }
.entry time { font-variant-numeric: tabular-nums; color: var(--brass); font-size: .85rem; }
.entry-meta { font-size: .88rem; margin-bottom: .25rem; opacity: .9; }
.topic { font-style: italic; opacity: .7; }
.entry.speech, .entry.narration { display: grid; grid-template-columns: auto 1fr; column-gap: .7rem; }
.entry.speech .entry-meta, .entry.narration .entry-meta { grid-column: 1 / -1; }
.entry.narration .prose { grid-column: 1 / -1; font-style: italic; opacity: .9; }
.entry.speech .prose { background: var(--night-3); padding: .6rem .8rem; border-radius: 2px 10px 10px 10px; }
.entry.owl { display: grid; grid-template-columns: auto 1fr; column-gap: .7rem; }
.entry.owl .entry-meta { grid-column: 1 / -1; }
.entry.owl .prose { background: #EFE3C6; color: var(--ink); padding: .7rem .9rem; border-radius: 2px; box-shadow: 0 6px 14px rgba(0,0,0,.25); }
.entry.memory { background: linear-gradient(160deg, rgba(169,203,208,.18), rgba(169,203,208,.05)); border: 1px solid rgba(169,203,208,.4); border-radius: 10px; padding: .9rem 1rem; }
.entry.memory .prose { color: #E4F0F1; font-size: 1.05rem; }
.entry.line { font-size: .92rem; opacity: .85; }
.entry.travel { opacity: .6; font-style: italic; }
.entry.instruction { border-left: 3px solid var(--seal-2); padding: .4rem .7rem; background: rgba(138,36,50,.18); font-weight: 600; }
.entry.solved { color: var(--brass); }

/* ---------- modais ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(8,14,18,.84); display: grid; place-items: center; padding: 1rem; z-index: 70; animation: fade .18s ease-out; }
.modal { background: var(--vellum); color: var(--ink); border-radius: 6px; max-width: 560px; width: 100%; max-height: 92vh; overflow: auto; padding: 1.4rem; box-shadow: 0 30px 60px rgba(0,0,0,.5); }
.modal.small { max-width: 440px; }
.modal h2 { font-size: 1.7rem; }
.modal.case-sheet {
  width: min(900px, calc(100vw - 2rem)); height: 420px; max-width: none; max-height: none;
  padding: 0; overflow: hidden;
}
.case-sheet-grab { display: none; }
.case-sheet-layout { display: grid; grid-template-columns: 420px minmax(0, 1fr); height: 420px; }
.case-sheet-cover {
  width: 420px; height: 420px; background: var(--night-2); overflow: hidden;
  border-right: 6px double var(--brass-dim); display: grid; place-items: center; font-size: 5rem;
}
.case-sheet-cover img { width: 100%; height: 100%; object-fit: cover; }
.case-sheet-body {
  position: relative; min-width: 0; overflow: auto;
  display: flex; flex-direction: column; justify-content: center; gap: 12px;
  padding: 24px 28px;
}
.case-sheet-x {
  position: absolute; top: 8px; right: 8px; z-index: 1;
  width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer;
  color: var(--ink-soft); font-size: 26px; line-height: 1;
}
.case-sheet-pack { margin: 0; font-style: italic; color: var(--brass-dim); }
.case-sheet h2 { margin: 0; padding-right: 36px; font-size: 34px; line-height: 1.1; color: var(--ink); }
.case-sheet-tag { margin: 0; font-size: 17px; line-height: 1.5; color: #3A2E22; }
.case-sheet-seals { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.case-sheet .level { margin: 0; }
.case-sheet .mode-badge { background: var(--vellum-2); color: var(--ink); }
.case-sheet .mode-badge.online { background: var(--night-2); color: var(--vellum); }
.case-sheet-status {
  display: inline-flex; align-items: center; font-size: 13px; font-weight: 600; line-height: 1.2;
  padding: 1px 8px; border-radius: 4px;
}
.case-sheet-status.is-new { background: var(--brass); color: var(--night); }
.case-sheet-status.is-play { background: var(--vellum-2); color: var(--ink); }
.case-sheet-status.is-done { background: #3C6B3F; color: #F6ECD8; }
.case-sheet-badge {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-top: 1px solid var(--vellum-2); border-bottom: 1px solid var(--vellum-2);
}
.case-sheet-seal { --s: 52px; }
.case-sheet-seal.off {
  background: var(--night); color: var(--mist); opacity: .7;
  box-shadow: inset 0 0 0 1px var(--night-3); font-family: var(--fell);
}
.case-sheet-seal img { object-position: center; }
.case-sheet-badge-copy { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.case-sheet-badge-copy b { font-family: var(--fell); font-weight: 400; font-size: 19px; }
.case-sheet-note { font-size: 14px; color: var(--ink-soft); }
.case-sheet-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 760px) {
  .backdrop.case-backdrop { align-items: end; justify-items: stretch; padding: 0; }
  .modal.case-sheet {
    width: 100%; height: auto; max-height: 92vh; overflow: auto;
    border-radius: 16px 16px 0 0;
    display: flex; flex-direction: column; gap: 12px;
    padding: 10px 18px calc(28px + env(safe-area-inset-bottom, 0px));
  }
  .case-sheet-grab {
    display: block; align-self: center; width: 40px; height: 5px; border-radius: 999px; background: #B8A988;
  }
  .case-sheet-layout {
    height: auto; position: relative;
    grid-template-columns: 96px minmax(0, 1fr); column-gap: 12px; row-gap: 12px; align-items: center;
  }
  .case-sheet-body { display: contents; }
  .case-sheet-cover {
    grid-column: 1; grid-row: 1; width: 96px; height: 96px;
    border-right: 0; border-radius: 6px; font-size: 2.4rem;
  }
  .case-sheet-head { grid-column: 2; grid-row: 1; min-width: 0; }
  .case-sheet-pack { font-size: 13px; }
  .case-sheet h2 { font-size: 24px; padding-right: 28px; }
  .case-sheet-tag { grid-column: 1 / -1; font-size: 15.5px; }
  .case-sheet-seals, .case-sheet-badge, .case-sheet-actions { grid-column: 1 / -1; }
  .case-sheet-actions { flex-direction: column; }
  .case-sheet-actions .btn { width: 100%; justify-content: center; }
  .case-sheet-actions .btn:not(.seal-btn) { border-color: transparent; color: var(--ink-soft); }
}
.sheet { max-width: 640px; padding: 0; }
.sheet.wide { max-width: 900px; }
.sheet header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.3rem; border-bottom: 1px solid var(--vellum-2); position: sticky; top: 0; background: var(--vellum); z-index: 1; }
.sheet-body { padding: 1.2rem 1.3rem 1.4rem; }
.owl-head { font-style: italic; color: var(--brass-dim); }
.loc-list { display: grid; gap: .5rem; }
.loc { display: flex; gap: .8rem; align-items: center; text-align: left; padding: .8rem 1rem; border-radius: var(--r); border: 1px solid var(--vellum-2); background: #F4EAD2; cursor: pointer; color: var(--ink); }
.loc b { display: block; } .loc small { color: var(--ink-soft); }
.loc-icon { font-size: 1.8rem; }
.loc.here { opacity: .6; cursor: default; border-color: var(--brass); }
.dest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .9rem; }
@media (max-width: 560px) { .dest-grid { grid-template-columns: 1fr 1fr; gap: .65rem; } }
.dest {
  appearance: none; display: flex; flex-direction: column; width: 100%; margin: 0; padding: 0;
  text-align: left; border-radius: 8px; border: 1px solid #4A6748; background: #D7E6D8;
  overflow: hidden; cursor: pointer; color: var(--ink); box-shadow: 0 8px 18px rgba(28, 51, 40, .12);
}
.dest .pic { position: relative; aspect-ratio: 4 / 3; background: #c5d4c6; overflow: hidden; }
.dest .pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.dest .pic .fallback { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.2rem; }
.dest .meta { display: block; padding: .65rem .7rem .75rem; }
.dest b { display: block; font-family: var(--fell); font-size: 1.12rem; font-weight: 400; line-height: 1.15; }
.dest small { display: block; margin-top: .2rem; color: var(--ink-soft); font-size: .82rem; }
.dest.here { cursor: default; box-shadow: inset 0 0 0 2px var(--brass); }
.dest:not(:disabled):hover { transform: translateY(-2px); }
.tabs { display: flex; gap: .3rem; margin-bottom: 1rem; border-bottom: 1px solid var(--vellum-2); }
.tab { background: none; border: 0; padding: .6rem .9rem; cursor: pointer; border-bottom: 3px solid transparent; color: var(--ink); }
.tab.on { border-color: var(--seal); font-weight: 600; }
.tab small { opacity: .6; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; }
.mini-card { display: flex; flex-direction: column; align-items: center; gap: .3rem; text-align: center; padding: .9rem .5rem; border-radius: var(--r); border: 1px solid var(--vellum-2); background: #F4EAD2; cursor: pointer; color: var(--ink); line-height: 1.2; }
.mini-card small { color: var(--ink-soft); }
.card-detail { display: grid; grid-template-columns: 260px 1fr; gap: 1.2rem; align-items: start; }
.card-notes h3 { font-size: 1.3rem; margin-bottom: .6rem; }
.card-notes .entry { margin-bottom: .8rem; }
.card-notes .entry .prose { background: #F4EAD2; padding: .6rem .8rem; border-radius: var(--r); }
.card-notes .entry.memory .prose { background: #DCEBEC; }
.solved-list { padding-left: 1.2rem; }
.notes { min-height: 50vh; resize: vertical; line-height: 1.6; }

/* ---------- carta (revelação) ---------- */
.reveal-modal { background: transparent; box-shadow: none; color: var(--vellum); text-align: center; max-width: 420px; overflow: visible; }
.reveal-kicker { font-family: var(--fell); font-size: 1.5rem; color: var(--brass); }
.reveal-instr { font-size: 1.1rem; margin: 1.2rem 0; text-wrap: balance; }
.flip { perspective: 1200px; width: min(300px, 76vw); aspect-ratio: 63 / 88; margin: 0 auto; }
.flip-inner { position: relative; width: 100%; height: 100%; transition: transform .9s cubic-bezier(.3,.7,.2,1); transform-style: preserve-3d; }
.flip.flipped .flip-inner { transform: rotateY(180deg); }
.card-back, .card-front { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 12px; }
.card-back {
  background: #243044; border: 2px solid var(--brass); box-shadow: inset 0 0 0 8px #243044, inset 0 0 0 9px var(--brass-dim), 0 20px 40px rgba(0,0,0,.5);
  display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--brass);
}
.card-back.kind-ev { background: #3A2428; border-color: var(--seal); box-shadow: inset 0 0 0 8px #3A2428, inset 0 0 0 9px var(--seal), 0 20px 40px rgba(0,0,0,.5); }
.card-back.kind-loc { background: #1C3328; border-color: #6E8A62; box-shadow: inset 0 0 0 8px #1C3328, inset 0 0 0 9px #6E8A62, 0 20px 40px rgba(0,0,0,.5); }
.back-mark { font-family: var(--fell); font-size: 7rem; line-height: 1; }
.back-deck { font-style: italic; opacity: .8; margin-top: .4rem; }
.card-front {
  transform: rotateY(180deg); background: #F3E0C4; color: var(--ink); padding: 1.4rem 1.2rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .5rem;
  box-shadow: inset 0 0 0 6px #F3E0C4, inset 0 0 0 7px var(--brass-dim), 0 20px 40px rgba(0,0,0,.5);
}
.card-front.static { position: relative; transform: none; min-height: 360px; }
.card-front h3 { font-size: 1.6rem; }
.card-front .role { font-style: italic; color: var(--ink-soft); margin: 0; }
.card-front .blurb { font-size: .95rem; margin: .3rem 0 0; }
.card-front .code { font-size: .85rem; color: var(--brass-dim); margin-top: auto; }

/* ---------- enigmas ---------- */
.puzzle .prose { font-size: 1.1rem; }
.lock-note { display: flex; gap: .75rem; align-items: flex-start; margin: 1rem 0 0; padding: .75rem .9rem; border: 1px solid var(--seal); background: rgba(138, 36, 50, .08); text-align: left; }
.lock-seal { flex: none; width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; background: var(--seal); color: #F6ECD8; box-shadow: inset 0 0 0 2px #F6ECD8, inset 0 0 0 3px var(--seal); font-size: 1.05rem; }
.pzform { display: flex; flex-direction: column; gap: 1rem; align-items: center; margin: 1.2rem 0 .4rem; }
.pzform.stack { align-items: stretch; }
.seq-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.seq-item { display: flex; align-items: center; gap: .55rem; padding: .4rem .45rem .4rem .55rem; background: #F4EAD2; border: 1px solid var(--vellum-2); border-radius: var(--r); }
.seq-item:focus { outline: 2px solid var(--brass); outline-offset: 2px; }
.seq-item.dragging { opacity: .72; border-color: var(--brass); }
.seq-face { display: flex; align-items: center; gap: .6rem; flex: 1; min-width: 0; cursor: grab; touch-action: none; }
.seq-moves { display: flex; flex-direction: column; flex: none; }
.seq-moves button { background: none; border: 0; color: var(--brass-dim); font-size: 1.15rem; width: 44px; height: 36px; cursor: pointer; }
.seq-moves button:hover { color: var(--seal); }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .7rem; }
.choice-card { position: relative; display: flex; flex-direction: column; align-items: stretch; width: 100%; margin: 0; padding: 0; overflow: hidden; text-align: center; color: var(--ink); background: #F4EAD2; border: 2px solid var(--vellum-2); border-radius: 8px; cursor: pointer; }
.choice-card.on { border-color: var(--seal); box-shadow: inset 0 0 0 1px var(--seal); }
.choice-tick { display: none; position: absolute; top: .4rem; right: .4rem; z-index: 1; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--seal); color: #F6ECD8; place-items: center; font-size: .95rem; }
.choice-card.on .choice-tick { display: grid; }
.opt-pic { position: relative; width: 64px; aspect-ratio: 1 / 1; flex: none; border-radius: 6px; overflow: hidden; background: #cbbfa6; }
.opt-pic.wide { width: 100%; aspect-ratio: 1 / 1; border-radius: 0; }
.seq-face .opt-pic.wide { width: 96px; border-radius: 6px; }
.opt-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.opt-pic.fallback { display: grid; place-items: center; font-size: 1.6rem; }
.opt-label { display: block; padding: .45rem .5rem .6rem; line-height: 1.25; }
.seq-face .opt-label { padding: 0; }
.dials { display: flex; gap: .5rem; }
.dial { display: flex; flex-direction: column; align-items: center; background: var(--night); border-radius: 10px; padding: .3rem; box-shadow: inset 0 0 0 2px var(--brass-dim); }
.dial button { background: none; border: 0; color: var(--brass); font-size: 1.3rem; width: 52px; height: 42px; cursor: pointer; }
.dial input { width: 52px; height: 64px; text-align: center; font-family: var(--fell); font-size: 2.6rem; border: 0; background: var(--vellum); color: var(--ink); border-radius: 4px; padding: 0; }
.answer { text-align: center; font-size: 1.3rem; }
.wrong { color: var(--seal); text-align: center; min-height: 1.4em; font-style: italic; }
.hint-line { background: #F4EAD2; padding: .5rem .8rem; border-left: 3px solid var(--brass); }
.shake { animation: shake .4s; }

/* ---------- relatório ---------- */
.question { border: 0; border-top: 1px solid var(--vellum-2); padding: 1.2rem 0 .4rem; margin: 0; }
.question legend { font-family: var(--fell); font-size: 1.35rem; display: flex; gap: .6rem; align-items: baseline; flex-wrap: wrap; }
.question legend small { font-family: var(--body); font-size: .85rem; color: var(--ink-soft); }
.qn { color: var(--seal); }
.opts { display: grid; gap: .4rem; margin-top: .6rem; }
.people-opts { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.opt { display: flex; align-items: center; gap: .6rem; padding: .6rem .8rem; border: 1px solid var(--vellum-2); border-radius: var(--r); cursor: pointer; background: #F4EAD2; }
.opt input { accent-color: var(--seal); width: 1.1rem; height: 1.1rem; }
.opt:has(input:checked) { border-color: var(--seal); box-shadow: inset 3px 0 0 var(--seal); }
.verdict { text-align: center; margin: 1rem 0 1.6rem; }
.score { font-size: 1.1rem; margin: 0; }
.score b { font-family: var(--fell); font-weight: 400; font-size: 4.5rem; color: var(--seal); display: block; line-height: 1; }
.verdict h1 { font-size: 2.6rem; margin: .3rem 0; }
.breakdown { list-style: none; padding: 0; margin: 0 0 1.4rem; }
.breakdown li { display: grid; grid-template-columns: 2rem 1fr auto; gap: .6rem; padding: .7rem 0; border-top: 1px solid var(--vellum-2); align-items: start; }
.breakdown li > span { font-size: 1.2rem; }
.breakdown .ok > span { color: #3C6B3F; } .breakdown .miss > span { color: var(--seal); }
.breakdown p { margin: .1rem 0 0; font-size: .95rem; color: var(--ink-soft); }
.breakdown em { font-style: normal; font-family: var(--fell); font-size: 1.4rem; }
.solution { background: #F4EAD2; padding: .8rem 1rem; border-radius: var(--r); margin-bottom: 1.4rem; }
.solution summary { cursor: pointer; font-family: var(--fell); font-size: 1.3rem; }
.epilogue h2 { font-size: 1.8rem; margin-bottom: .6rem; }
.epilogue .prose { font-size: 1.1rem; line-height: 1.75; }

/* ---------- leitor ---------- */
.scanner { position: fixed; inset: 0; z-index: 80; background: rgba(8,14,18,.92); display: grid; place-items: center; padding: 1rem; }
.scanner-box { width: min(520px, 100%); display: flex; flex-direction: column; gap: .9rem; }
.scanner-title { font-size: 1.7rem; color: var(--brass); text-align: center; }
.scanner-view { position: relative; aspect-ratio: 1; background: #000; border-radius: 12px; overflow: hidden; }
.scanner-view video { width: 100%; height: 100%; object-fit: cover; }
.scanner-frame { position: absolute; inset: 18%; border: 3px solid var(--brass); border-radius: 14px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.scanner-status { position: absolute; left: 0; right: 0; bottom: .8rem; text-align: center; margin: 0; font-size: .95rem; padding: 0 1rem; }
.scanner-manual label { display: block; font-size: .9rem; opacity: .8; margin-bottom: .3rem; }
.scanner-manual .row { flex-wrap: nowrap; }
.scanner .btn { color: var(--vellum); }

/* ---------- toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px);
  background: var(--vellum); color: var(--ink); padding: .6rem 1.1rem; border-radius: 999px; box-shadow: 0 10px 24px rgba(0,0,0,.4);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 100; max-width: 90vw; text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.error { background: var(--seal); color: #fff; }

/* ---------- aviso de novidade ---------- */
.news-screen {
  position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(8, 14, 18, .92);
  animation: news-fade .35s ease-out both;
}
.news-card {
  position: relative; width: 440px; display: flex; flex-direction: column; align-items: center; gap: 16px;
  animation: news-rise .8s cubic-bezier(.2, .8, .2, 1) .1s both;
}
.news-frame {
  position: relative; width: 440px; height: 440px; border-radius: 6px; overflow: hidden;
  background: var(--night-2);
  box-shadow: inset 0 0 0 1px var(--brass-dim), 0 30px 80px rgba(196, 161, 90, .25), 0 30px 60px rgba(0, 0, 0, .6);
}
.news-art {
  position: absolute; inset: 0; display: grid; place-items: center; font-size: 160px; line-height: 1;
  animation: news-pop .9s cubic-bezier(.3, 1.4, .5, 1) .3s both;
}
.news-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.news-shade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 45%;
  background: linear-gradient(180deg, rgba(20, 34, 43, 0) 0%, rgba(20, 34, 43, .92) 100%);
}
.news-shine {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(243, 232, 207, .22) 50%, transparent 65%);
  background-size: 250% 100%;
  animation: news-shine 2.6s ease-in-out .9s 2 both;
}
.news-badge {
  position: absolute; top: 16px; left: 16px; display: flex; align-items: center; gap: 8px;
  animation: news-in .5s ease-out .7s both;
}
.news-spark {
  width: 34px; height: 34px; border-radius: 50%; background: var(--seal); color: #F6ECD8;
  box-shadow: inset 0 0 0 2px #F6ECD8, inset 0 0 0 3px var(--seal);
  display: grid; place-items: center; font-size: 15px;
}
.news-tag {
  font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 11px; border-radius: 999px;
}
.news-tag.is-pack { background: var(--brass); color: var(--night); }
.news-tag.is-case { background: var(--vellum); color: var(--ink); }
.news-caption {
  position: absolute; left: 20px; right: 20px; bottom: 18px; display: flex; flex-direction: column; gap: 2px;
  text-align: left; animation: news-in .6s ease-out .85s both;
}
.news-meta { font-size: 13px; color: var(--brass); }
.news-caption h2 {
  margin: 0; font-size: 40px; line-height: 1.05; color: #F6ECD8;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .6);
}
.news-desc {
  margin: 0; font-size: 17px; line-height: 1.45; color: var(--vellum); text-align: center; max-width: 420px;
  animation: news-fade .5s ease-out 1s both;
}
.news-actions {
  display: flex; flex-direction: row; justify-content: center; align-items: center; gap: 8px;
  animation: news-fade .5s ease-out 1.1s both;
}
.news-actions .brass-btn { min-height: 50px; padding: 0 28px; }
.news-later {
  min-height: 48px; padding: 0 20px; border: 0; background: none; color: var(--mist);
  font: inherit; font-size: 16px; cursor: pointer;
}
@keyframes news-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes news-rise {
  from { opacity: 0; transform: translateY(36px) scale(.94); }
  to { opacity: 1; transform: none; }
}
@keyframes news-pop {
  from { opacity: 0; transform: scale(.55) rotate(-12deg); }
  to { opacity: 1; transform: none; }
}
@keyframes news-shine { from { background-position: 130% 0; } to { background-position: -130% 0; } }
@keyframes news-in {
  from { opacity: 0; transform: translateX(-18px); }
  to { opacity: 1; transform: none; }
}
@media (max-width: 760px) {
  .news-screen { align-items: flex-end; padding: 0; }
  .news-card {
    width: 100%; gap: 14px; padding: 0 0 calc(30px + env(safe-area-inset-bottom, 0px));
    background: var(--night); border-radius: 20px 20px 0 0; overflow: hidden;
  }
  .news-frame { width: 100%; height: auto; aspect-ratio: 1 / 1; border-radius: 0; box-shadow: none; }
  .news-caption h2 { font-size: 34px; }
  .news-desc { font-size: 15.5px; padding: 0 20px; }
  .news-actions { flex-direction: column; width: 100%; padding: 0 20px; }
  .news-actions .brass-btn, .news-later { width: 100%; justify-content: center; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* ---------- responsivo ---------- */
@media (max-width: 860px) {
  .card-detail { grid-template-columns: 1fr; }
  .case-file { grid-template-columns: 1fr; }
  .case-cover { border-right: 0; border-bottom: 6px double var(--brass-dim); padding: 1rem; font-size: 3rem; min-height: 0; }
  .case-cover.has-img { aspect-ratio: 4 / 3; padding: 0; min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* nível do cartucho */
.level { display: inline-block; font-size: .8rem; padding: .1rem .55rem; border-radius: 999px; border: 1px solid currentColor; margin-right: .4rem; font-style: normal; }
.level-principiante { color: #3C6B3F; }
.level-intermediario { color: var(--brass-dim); }
.level-avancado { color: var(--seal); }
.level-perito { color: #4E1622; }
.home-foot { display: flex; gap: .5rem; flex-wrap: wrap; }

/* carta com retrato */
.card-front.has-portrait { justify-content: flex-start; padding: .7rem .7rem 1rem; gap: .35rem; }
.card-front .portrait { position: relative; width: 100%; flex: none; height: auto; aspect-ratio: 1 / 1; border-radius: 7px; overflow: hidden; background: #cbbfa6; }
.card-front .portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.card-front.kind-ev.has-portrait .portrait,
.card-front.kind-loc.has-portrait .portrait { aspect-ratio: 1 / 1; }
.card-front.has-portrait h3 { font-size: 1.4rem; margin-top: .3rem; }
.card-front.has-portrait .blurb { font-size: .85rem; }
.card-front.static.has-portrait { min-height: 440px; }

.tab .file-dot { display: inline-block; margin-left: .35rem; background: var(--seal-2); color: #fff; border-radius: 999px; font-style: normal; font-size: .72rem; padding: 0 .4rem; vertical-align: 1px; }
.file-groups { display: flex; flex-direction: column; gap: .85rem; }
.file-group h3 { margin: 0 0 .35rem; font-size: .85rem; letter-spacing: .04em; }
.file-view { display: block; max-height: min(70vh, 100%); overflow: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 720px) {
  .modal.file-sheet { width: calc(100vw - 1.2rem); max-height: calc(100vh - 1.2rem); }
  .file-view { max-height: calc(100vh - 7.5rem); }
}

/* ================= partida ================= */
.msi {
  font-family: "Material Symbols Outlined"; font-weight: 300; font-style: normal; font-size: 24px; line-height: 1;
  letter-spacing: normal; text-transform: none; display: inline-block; white-space: nowrap; direction: ltr;
  font-feature-settings: "liga"; font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24;
  -webkit-font-smoothing: antialiased;
}
.msi-fill { font-variation-settings: "FILL" 1, "wght" 300, "GRAD" 0, "opsz" 24; }
.art {
  position: relative; display: block; overflow: hidden; aspect-ratio: 1 / 1; color: var(--brass);
  background: repeating-linear-gradient(135deg, var(--night-2) 0 8px, #203744 8px 16px);
}
.art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.art-mark { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--fell); font-size: 2em; line-height: 1; }
.art > .msi { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 28px; }

/* botões da partida */
.line-btn {
  flex: none; min-height: 44px; padding: 0 14px; border: 1px solid var(--brass-dim); border-radius: 6px;
  background: transparent; color: var(--vellum); font: inherit; font-size: 15px; cursor: pointer; white-space: nowrap;
}
.line-btn:hover { border-color: var(--brass); }
.seal-pill {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border: 0; border-radius: 999px; background: var(--seal); color: #F6ECD8; font: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer; white-space: nowrap; box-shadow: 0 10px 24px rgba(0,0,0,.35); transition: background .15s, box-shadow .3s;
}
.seal-pill:hover { background: var(--seal-2); }
.seal-pill.big { min-height: 52px; padding: 0 28px; font-size: 17px; }
.seal-pill.glow { min-height: 56px; padding: 0 30px; font-size: 18px; box-shadow: 0 0 0 3px rgba(196,161,90,.4), 0 12px 28px rgba(0,0,0,.55); }
.line-pill {
  min-height: 44px; padding: 0 16px; border: 1px solid var(--brass-dim); border-radius: 999px;
  background: rgba(14,26,34,.6); color: var(--brass); font: inherit; font-size: 15px; cursor: pointer;
}
.line-pill:hover { border-color: var(--brass); }
.brass-pill {
  min-height: 52px; padding: 0 26px; border: 0; border-radius: 6px; background: var(--brass); color: var(--night);
  font: inherit; font-size: 16.5px; font-weight: 600; cursor: pointer;
}
.brass-pill:hover { background: #d4b56e; }

/* cena "No local" */
.game {
  position: fixed; inset: 0; isolation: isolate; overflow: hidden; background: var(--night);
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  padding-top: env(safe-area-inset-top, 0px);
}
.game-top {
  position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 14px 28px 12px 16px;
  background: linear-gradient(180deg, rgba(14,26,34,.85), rgba(14,26,34,0));
}
.top-menu {
  flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 999px;
  background: transparent; color: var(--vellum); cursor: pointer;
}
.top-menu:hover { background: rgba(234,223,196,.1); }
.case-name { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.case-name span { font-size: 12.5px; font-style: italic; color: var(--mist); }
.case-name b { font-family: var(--fell); font-weight: 400; font-size: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clock { flex: none; display: flex; flex-direction: column; align-items: flex-end; line-height: 1; }
.clock b { font-family: var(--fell); font-weight: 400; font-size: 34px; color: var(--brass); }
.clock span { font-size: 12px; color: var(--mist); margin-top: 3px; }

.scene { min-height: 0; display: grid; }
.scene-hero {
  position: absolute; inset: 0; z-index: -1;
  background: repeating-linear-gradient(135deg, #1C2F3A 0 16px, #203744 16px 32px);
}
.scene-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scene-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(14,26,34,.92) 0%, rgba(14,26,34,.35) 55%, rgba(14,26,34,.75) 100%);
}
.scene-caption { display: none; }
.scene-body {
  min-height: 0; display: grid; grid-template-columns: minmax(0, 480px) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr);
  gap: 24px; padding: 12px 32px 0;
}
.scene-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.scene-side { min-width: 0; min-height: 0; display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
.pend-pill { align-self: flex-end; }
.scene-people { width: 100%; margin-top: auto; padding-bottom: 16px; }

.place-card {
  align-self: start; max-height: 100%; overflow-y: auto; background: rgba(234,223,196,.97); color: var(--ink);
  border-radius: 8px; padding: 22px 24px; display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 20px 50px rgba(0,0,0,.5); animation: rise .45s ease-out both;
}
.place-kind { margin: 0; font-size: 13px; font-style: italic; color: var(--brass-dim); }
.place-title h1 { font-size: 34px; line-height: 1.1; }
.place-desc { font-size: 16.5px; line-height: 1.6; }
.spot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.spot-tile {
  display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 6px 12px 6px 6px; border-radius: 6px;
  border: 1px dashed var(--brass-dim); background: #F4EAD2; color: var(--ink); font: inherit; font-size: 15px;
  text-align: left; cursor: pointer; transition: transform .15s, border-color .15s;
}
.spot-tile:hover { border-style: solid; transform: translateY(-1px); }
.spot-tile.is-seen { border-style: solid; opacity: .72; }
.spot-thumb { flex: none; width: 52px; border-radius: 4px; font-size: 12px; }
.spot-thumb > .msi { font-size: 22px; }
.spot-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.spot-text small { margin-top: 2px; font-size: 12px; font-style: italic; color: var(--ink-soft); }

.scene-people { display: flex; flex-direction: column; gap: 10px; min-width: 0; max-width: 100%; container-type: inline-size; }
.scene-label { margin: 0; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--vellum); text-shadow: 0 1px 6px rgba(0,0,0,.8); }
.here-more { letter-spacing: 0; text-transform: none; font-size: 13px; font-style: italic; color: var(--brass); }
.here-scroll { min-width: 0; }
.here-scroll.is-scroll {
  max-height: calc(1.6 * ((100cqi - 36px) / 4 + 96px));
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--brass) transparent;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 36px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 36px), transparent);
}
.here-scroll.is-scroll::-webkit-scrollbar { width: 6px; }
.here-scroll.is-scroll::-webkit-scrollbar-thumb { background: var(--brass); border-radius: 99px; }
.here-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: start; }
.here-card {
  position: relative; display: flex; flex-direction: column; padding: 0; border: 0; border-radius: 8px; overflow: hidden;
  background: #F3E0C4; color: var(--ink); font: inherit; text-align: left; cursor: pointer;
  box-shadow: 0 12px 24px rgba(0,0,0,.45); transition: transform .15s, box-shadow .15s;
}
.here-card:hover { transform: translateY(-4px); }
.here-card.is-on { box-shadow: 0 0 0 2px var(--brass), 0 12px 24px rgba(0,0,0,.45); }
.here-art-wrap { position: relative; display: block; }
.here-card .here-art { width: 100%; aspect-ratio: 1; border-radius: 0; }
.here-foot { flex: none; min-height: 72px; display: flex; flex-direction: column; gap: 2px; padding: 6px 8px 8px; }
.here-name {
  font-size: 13px; font-weight: 600; line-height: 1.15; max-height: 2.4em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.here-foot small { font-size: 12px; font-style: italic; color: var(--ink-soft); line-height: 1.2; }
.here-art-wrap .pz-lock { width: 56px; height: 56px; }
.here-art-wrap .pz-lock .msi { font-size: 28px; }
.people-row { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding: 4px; }
.person-card {
  flex: none; width: 150px; display: flex; flex-direction: column; padding: 0; border: 0; border-radius: 8px; overflow: hidden;
  background: var(--vellum); color: var(--ink); font: inherit; text-align: left; cursor: pointer;
  box-shadow: 0 0 0 2px transparent, 0 14px 30px rgba(0,0,0,.5); transition: transform .15s, box-shadow .15s;
}
.person-card:hover { transform: translateY(-3px); }
.person-card.is-on { box-shadow: 0 0 0 2px var(--brass), 0 14px 30px rgba(0,0,0,.5); }
.person-art { width: 100%; font-size: 24px; }
.person-text { display: flex; flex-direction: column; padding: 8px 10px; line-height: 1.2; }
.person-text b { font-weight: 600; font-size: 15px; }
.person-text small { font-size: 12.5px; color: var(--ink-soft); }

.pend-pill {
  max-width: 440px; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 14px; border-radius: 999px;
  background: rgba(20,34,43,.86); border: 1px solid var(--brass-dim); box-shadow: 0 10px 24px rgba(0,0,0,.4);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); animation: fadeIn .3s ease-out both;
}
.pend-dot { flex: none; width: 8px; height: 8px; border-radius: 999px; background: var(--brass); }
.pend-text { flex: 1; min-width: 0; font-size: 14.5px; line-height: 1.3; }
.pend-pill button {
  flex: none; min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--brass); color: var(--night);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}

/* conversa */
.talk-card {
  align-self: stretch; min-height: 0; margin-bottom: 16px; display: flex; flex-direction: column; overflow: hidden;
  background: rgba(20,34,43,.94); border: 1px solid var(--brass-dim); border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0,0,0,.5); animation: rise .35s ease-out both;
}
.talk-head { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px; border-bottom: 1px solid var(--night-3); }
.talk-portrait { width: 96px; border-radius: 6px; font-size: 20px; }
.talk-who h2 { font-size: 26px; }
.talk-who p { margin: 0; font-size: 14px; font-style: italic; color: var(--mist); }
.talk-feed { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.bubble-row { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; animation: rise .35s ease-out both; }
.bubble-row.is-me { align-items: flex-end; }
.bubble-meta { font-size: 12.5px; color: var(--mist); }
.bubble-meta b { font-weight: 600; color: var(--brass); }
.bubble {
  max-width: 88%; padding: 10px 12px; border-radius: 2px 10px 10px 10px; background: var(--night-3); color: #F6ECD8;
  font-size: 15.5px; line-height: 1.5;
}
.is-me .bubble { border-radius: 10px 2px 10px 10px; background: var(--vellum); color: var(--ink); }
.is-memory .bubble { background: linear-gradient(160deg, rgba(169,203,208,.22), rgba(169,203,208,.08)); border: 1px solid rgba(169,203,208,.4); }
.talk-ask { display: flex; gap: 8px; padding: 12px 12px 6px; border-top: 1px solid var(--night-3); }
.talk-ask input {
  flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; border: 1px solid var(--night-3); border-radius: 6px;
  background: #0E1A22; color: var(--vellum); font: inherit; font-size: 15px;
}
.talk-cost { margin: 0; padding: 0 12px 10px; font-size: 12.5px; color: var(--mist); }

/* barra de ações */
.game-bar { position: relative; z-index: 2; display: flex; justify-content: center; padding: 10px 12px calc(18px + env(safe-area-inset-bottom, 0px)); }
.bar-pill {
  display: flex; align-items: center; gap: 3px; padding: 4px; border-radius: 999px; background: rgba(20,34,43,.78);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: inset 0 0 0 1px rgba(234,223,196,.14), 0 18px 40px rgba(0,0,0,.5);
}
.bar-btn {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 7px; height: 48px; min-width: 48px;
  padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--vellum);
  font: inherit; font-size: 16.5px; cursor: pointer; white-space: nowrap;
}
.bar-btn:hover { background: rgba(234,223,196,.1); }
.bar-btn.is-on { background: var(--vellum); color: var(--ink); font-weight: 600; }
.bar-btn:not(.bar-scan) .msi { display: none; }
.bar-pill.is-split { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; width: 100%; gap: 0; }
.bar-side {
  display: flex; align-items: center; justify-content: flex-end; min-width: 0;
  gap: var(--bar-gap, 3px);
  padding-left: calc(var(--bar-gap, 3px) + var(--bar-extra, 0px));
  padding-right: var(--bar-gap, 3px);
}
.bar-side.is-right {
  justify-content: flex-start;
  padding-left: var(--bar-gap, 3px);
  padding-right: calc(var(--bar-gap, 3px) + var(--bar-extra, 0px));
}
.bar-pill.is-split .bar-scan { margin-left: 0; margin-right: 0; }
.bar-scan {
  gap: 0; width: 58px; height: 58px; min-width: 58px; padding: 0; margin: -8px 6px; background: var(--seal); color: #F6ECD8;
  box-shadow: 0 0 0 3px rgba(196,161,90,.45), 0 10px 22px rgba(0,0,0,.5);
}
.bar-scan:hover { background: var(--seal-2); }
.bar-scan .bar-ico { width: 28px; height: 28px; display: grid; place-items: center; }
.bar-scan .msi { font-size: 26px; }
.hint-top {
  flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; margin-right: 8px; padding: 0 14px;
  border: 1px solid var(--brass); border-radius: 999px; background: transparent; color: var(--brass);
  font: inherit; font-size: 15px; cursor: pointer;
}
.hint-top:hover { background: rgba(196,161,90,.12); }
.hint-top .msi { font-size: 20px; color: var(--brass); }
.report-top {
  flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border: 1px solid rgba(234,223,196,.45); border-radius: 999px; background: transparent; color: var(--vellum);
  font: inherit; font-size: 15px; white-space: nowrap; cursor: pointer;
}
.report-top:hover { background: rgba(234,223,196,.1); }
.report-top .msi { font-size: 20px; }
.bar-badge { font-style: normal; font-size: 11px; line-height: 1.5; padding: 0 6px; border-radius: 999px; background: var(--seal-2); color: #fff; }

/* telas imersivas */
.imm {
  position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; overflow: hidden; color: var(--vellum);
  background: #0E1A22; animation: fadeIn .3s ease-out both;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
}
.imm-bg { position: absolute; inset: 0; background: repeating-linear-gradient(135deg, #1C2F3A 0 18px, #203744 18px 36px); }
.imm-bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.imm-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14,26,34,.8) 0%, rgba(14,26,34,.1) 28%, rgba(14,26,34,.4) 50%, rgba(14,26,34,.97) 100%);
}
.imm-head { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px 28px; }
.imm-kicker { margin: 0; display: flex; flex-direction: column; line-height: 1.2; }
.imm-kicker span { font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.imm-kicker small { font-size: 14px; color: var(--vellum); }
.imm-pill {
  flex: none; min-height: 44px; padding: 0 16px; border: 1px solid rgba(234,223,196,.5); border-radius: 999px;
  background: rgba(14,26,34,.5); color: var(--vellum); font: inherit; font-size: 15px; cursor: pointer;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.imm-pill:hover { border-color: var(--vellum); }
.imm-x {
  flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(234,223,196,.5);
  border-radius: 999px; background: rgba(14,26,34,.6); color: var(--vellum); cursor: pointer;
}
.imm-fill { position: relative; flex: 1; min-height: 0; }
.imm-foot { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 12px; padding: 0 40px 36px; animation: rise .45s ease-out both; }
.imm-name { font-size: 60px; line-height: 1.02; color: #F6ECD8; text-shadow: 0 2px 18px rgba(0,0,0,.6); }
.imm-type { margin: 0; font-size: 14px; font-style: italic; color: var(--brass); }
.imm-desc { max-width: 680px; font-size: 18px; line-height: 1.55; text-wrap: pretty; }
.imm-time { margin: 0; font-size: 14.5px; color: var(--brass); }
.imm-instr { margin: 0; max-width: 520px; padding: 10px 14px; border-left: 3px solid var(--seal-2); background: rgba(138,36,50,.25); font-weight: 600; }
.imm-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.imm-empty { margin: auto; padding: 24px; color: var(--mist); font-style: italic; text-align: center; }
.imm-title { margin: 0; font-family: var(--fell); font-size: 30px; color: var(--brass); text-align: center; }
.here-pill { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--brass); border-radius: 999px; color: var(--brass); font-size: 15px; }

/* nova carta */
.imm-reveal { background: rgba(8,14,18,.92); align-items: center; justify-content: center; gap: 16px; padding: 24px; text-align: center; overflow-y: auto; }
#rvstage { display: flex; flex-direction: column; align-items: center; gap: 16px; width: min(420px, 100%); }
.tcard {
  width: 280px; aspect-ratio: 63 / 88; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px;
  overflow: hidden; border-radius: 12px; background: #F3E0C4; color: var(--ink); text-align: center;
  box-shadow: inset 0 0 0 6px #F3E0C4, inset 0 0 0 7px var(--brass-dim), 0 24px 50px rgba(0,0,0,.55);
}
.tcard-art { flex: 1 1 0; min-height: 60px; aspect-ratio: auto; width: 100%; border-radius: 7px; font-size: 20px; }
.tcard.kind-ev .tcard-art { background: repeating-linear-gradient(135deg, #3A2428 0 8px, #4A2E33 8px 16px); }
.tcard.kind-loc .tcard-art { background: repeating-linear-gradient(135deg, #1C3328 0 8px, #24402F 8px 16px); }
.tcard-name { font-family: var(--fell); font-weight: 400; font-size: 22px; line-height: 1.1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tcard-sub { font-size: 13px; font-style: italic; color: var(--ink-soft); }
.tcard-blurb { font-size: 13.5px; line-height: 1.35; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tcard-code { margin-top: auto; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--brass-dim); }
.flip-in { animation: flipIn .9s cubic-bezier(.3,.7,.2,1) both; }
.reveal-note {
  width: 100%; margin: 0; padding: 12px 14px; border-left: 3px solid var(--seal-2); background: rgba(138,36,50,.2);
  text-align: left; font-size: 15.5px; font-weight: 600; line-height: 1.45;
}
.rv-count { margin: -8px 0 0; min-height: 1.2em; font-size: 14px; letter-spacing: .08em; color: var(--brass); }
.rv-wait {
  width: 280px; aspect-ratio: 63 / 88; display: grid; place-items: center; margin: 0 auto;
  border: 2px dashed rgba(196,161,90,.55); border-radius: 12px; color: var(--brass);
  font-family: var(--fell); font-size: 22px;
}
.seal-pill:disabled { opacity: .45; cursor: default; }

/* aparatar */
.travel-anim { display: flex; flex-direction: column; gap: 8px; max-width: 620px; animation: rise .45s ease-out both; }
.dest-row { display: flex; gap: 12px; overflow-x: auto; padding: 6px 4px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.dest-thumb {
  position: relative; flex: none; width: 120px; display: flex; flex-direction: column; gap: 6px; padding: 0; border: 0;
  background: none; color: var(--vellum); font: inherit; font-size: 14px; line-height: 1.2; text-align: left;
  cursor: pointer; opacity: .75; scroll-snap-align: start;
}
.dest-thumb.is-on { opacity: 1; }
.dest-art {
  width: 100%; border-radius: 8px; font-size: 18px; box-shadow: 0 0 0 1px rgba(234,223,196,.25), 0 8px 18px rgba(0,0,0,.45);
  background: repeating-linear-gradient(135deg, #1C3328 0 8px, #24402F 8px 16px);
}
.dest-thumb.is-on .dest-art { box-shadow: 0 0 0 3px var(--brass), 0 8px 18px rgba(0,0,0,.45); }
.dest-here {
  position: absolute; left: 6px; top: 6px; z-index: 1; font-style: normal; font-size: 11.5px; padding: 1px 7px;
  border-radius: 999px; background: var(--night); color: var(--brass); border: 1px solid var(--brass);
}
.whirl-layer {
  position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; animation: fadeIn .25s ease-out both;
  background: radial-gradient(circle at center, rgba(196,161,90,.35) 0%, rgba(14,26,34,0) 60%), #0E1A22;
}
.whirl { display: flex; flex-direction: column; align-items: center; gap: 10px; animation: whirl 1.3s cubic-bezier(.5,0,.3,1) both; }
.whirl-ring { width: 120px; height: 120px; border-radius: 999px; border: 2px solid var(--brass); border-top-color: transparent; border-left-color: transparent; }
.whirl b { font-family: var(--fell); font-weight: 400; font-size: 26px; color: #F6ECD8; text-align: center; }

/* lista de enigmas */
.imm-puzzles { background: rgba(8,14,18,.62); backdrop-filter: blur(12px) saturate(.9); -webkit-backdrop-filter: blur(12px) saturate(.9); }
.pz-deck {
  position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: safe center; gap: 24px;
  overflow-x: auto; scrollbar-width: none; padding: 0 40px 40px;
}
.pz-card {
  flex: none; width: 260px; padding: 0; border: 0; border-radius: 14px; overflow: hidden; background: #1A1714; color: var(--vellum);
  font: inherit; text-align: left; cursor: pointer; transition: transform .2s;
  box-shadow: 0 0 0 2px var(--brass-dim), 0 24px 50px rgba(0,0,0,.6); animation: deal .5s cubic-bezier(.2,.8,.2,1) backwards;
}
.pz-card:nth-child(2) { animation-delay: .08s; }
.pz-card:nth-child(3) { animation-delay: .16s; }
.pz-card:nth-child(4) { animation-delay: .24s; }
.pz-card:nth-child(n+5) { animation-delay: .32s; }
.pz-card:hover:not(:disabled) { transform: translateY(-6px); }
.pz-card.is-done { filter: saturate(.6) brightness(.62); cursor: default; box-shadow: 0 0 0 2px #3C6B3F, 0 24px 50px rgba(0,0,0,.6); }
.pz-card-art { position: relative; display: block; aspect-ratio: 1 / 1; background: radial-gradient(circle at 50% 40%, #4A443A, #1A1714 70%); color: var(--brass); }
.pz-card-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.pz-card-art > .msi { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 44px; }
.pz-lock {
  position: absolute; top: 50%; left: 50%; z-index: 2; width: 84px; height: 84px; transform: translate(-50%, -50%);
  display: grid; place-items: center; border-radius: 999px; background: rgba(14,20,24,.78);
  box-shadow: inset 0 0 0 2px var(--brass); color: var(--brass);
}
.pz-lock .msi { position: static; transform: none; font-size: 44px; }
.pz-lock.is-open { background: rgba(60,107,63,.85); box-shadow: inset 0 0 0 2px #8FBF8A; color: #F6ECD8; }
.pz-tag { position: absolute; top: 10px; left: 10px; z-index: 1; font-style: normal; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--brass); color: var(--night); }
.is-done .pz-tag { background: #3C6B3F; color: #F6ECD8; }
.pz-card-text { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px 14px; line-height: 1.2; }
.pz-card-text b { font-family: var(--fell); font-weight: 400; font-size: 22px; color: #F6ECD8; }
.pz-card-text small { font-size: 13.5px; color: var(--mist); }

/* enigma aberto */
.imm-puzzle .imm-shade { background: radial-gradient(ellipse at 50% 45%, rgba(14,26,34,.35), rgba(14,26,34,.94) 72%); }
.pz-crumb { display: flex; flex-direction: column; gap: 2px; padding: 8px 14px; border-left: 3px solid var(--brass); background: linear-gradient(90deg, rgba(14,26,34,.85), rgba(14,26,34,0)); }
.pz-back { align-self: flex-start; min-height: 24px; padding: 0; border: 0; background: none; font: inherit; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--brass); cursor: pointer; }
.pz-title { font-family: var(--fell); font-size: 30px; line-height: 1.1; color: #F6ECD8; }
.pz-stage { position: relative; z-index: 1; flex: 1; min-height: 0; margin: 0; display: flex; flex-direction: column; overflow-y: auto; }
.lock-obj, .lock-board { flex: none; margin: auto; }
.lock-obj {
  width: min(560px, calc(100% - 24px)); padding: 28px 32px; border-radius: 18px; display: flex; flex-direction: column; align-items: center; gap: 16px;
  background: linear-gradient(160deg, #6B6458 0%, #3E3A33 40%, #2B2823 100%);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.25), inset 0 -3px 0 rgba(0,0,0,.5), 0 0 0 6px #1E1B17, 0 0 0 8px var(--brass-dim), 0 30px 70px rgba(0,0,0,.75), 0 0 0 rgba(196,161,90,0);
  transition: box-shadow .8s ease-out;
}
.lock-obj.is-open {
  box-shadow: inset 0 2px 0 rgba(255,255,255,.25), inset 0 -3px 0 rgba(0,0,0,.5), 0 0 0 6px #1E1B17, 0 0 0 8px var(--brass), 0 30px 70px rgba(0,0,0,.75), 0 0 90px rgba(196,161,90,.6);
}
.lock-inscr { max-width: 480px; font-family: var(--fell); font-style: italic; font-size: 22px; line-height: 1.35; color: #D8CBAA; text-align: center; text-shadow: 0 1px 0 rgba(0,0,0,.7), 0 -1px 0 rgba(255,255,255,.15); }
.lock-inscr p { margin: 0 0 .4em; }
.wheels { display: flex; gap: 10px; }
.wheel { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.wheel-btn { width: 60px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 8px; background: rgba(0,0,0,.35); color: var(--brass); cursor: pointer; }
.wheel-btn:hover:not(:disabled) { background: rgba(0,0,0,.55); }
.wheel-num {
  width: 60px; height: 84px; padding: 0; border: 0; border-radius: 6px; text-align: center; caret-color: transparent;
  background: linear-gradient(180deg, #1A1714 0%, #EADFC4 22%, #F6ECD8 50%, #EADFC4 78%, #1A1714 100%);
  box-shadow: inset 0 0 0 2px var(--brass-dim), inset 0 6px 10px rgba(0,0,0,.35), inset 0 -6px 10px rgba(0,0,0,.35);
  font-family: var(--fell); font-size: 44px; color: var(--ink);
}
.wheel-num:focus { outline: 2px solid var(--brass); outline-offset: 2px; }
.lock-text {
  width: 100%; max-width: 360px; min-height: 56px; padding: 0 16px; border: 0; border-radius: 6px; text-align: center;
  background: linear-gradient(180deg, #EADFC4, #F6ECD8); box-shadow: inset 0 0 0 2px var(--brass-dim), inset 0 4px 8px rgba(0,0,0,.25);
  font-family: var(--fell); font-size: 26px; color: var(--ink);
}
.lock-msg { min-height: 22px; font-size: 15px; font-weight: 600; text-align: center; }
.lock-msg.is-wrong { color: #E79A9A; }
.lock-msg.is-open { max-width: 460px; font-weight: 400; font-size: 17px; color: #F3E3B5; }
.lock-board {
  width: min(980px, calc(100% - 24px)); padding: 24px; border-radius: 16px; display: flex; flex-direction: column; align-items: center; gap: 14px;
  background: rgba(14,26,34,.72); border: 1px solid var(--brass-dim); box-shadow: 0 30px 70px rgba(0,0,0,.6), 0 0 0 rgba(196,161,90,0);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: box-shadow .8s ease-out, border-color .8s;
}
.lock-board.is-open { border-color: var(--brass); box-shadow: 0 30px 70px rgba(0,0,0,.6), 0 0 90px rgba(196,161,90,.5); }
.lock-board .lock-inscr { font-size: 20px; }
.board-help { margin: 0; font-size: 14px; color: var(--mist); }
.imm-puzzle .choice-grid { width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.imm-puzzle .choice-card, .imm-puzzle .seq-item {
  flex: none; width: 150px; padding: 8px; border: 0; border-radius: 12px; background: #F3E0C4; color: var(--ink);
  box-shadow: inset 0 0 0 4px #F3E0C4, inset 0 0 0 5px var(--brass-dim), 0 14px 30px rgba(0,0,0,.45);
  transition: transform .15s, box-shadow .15s; animation: deal .45s cubic-bezier(.2,.8,.2,1) backwards;
}
.imm-puzzle .choice-card:nth-child(2), .imm-puzzle .seq-item:nth-child(2) { animation-delay: .06s; }
.imm-puzzle .choice-card:nth-child(3), .imm-puzzle .seq-item:nth-child(3) { animation-delay: .12s; }
.imm-puzzle .choice-card:nth-child(n+4), .imm-puzzle .seq-item:nth-child(n+4) { animation-delay: .18s; }
.imm-puzzle .choice-card:hover:not(:disabled) { transform: translateY(-4px); }
.imm-puzzle .choice-card.on {
  transform: translateY(-8px);
  box-shadow: inset 0 0 0 4px #F3E0C4, inset 0 0 0 5px var(--seal), 0 0 0 3px var(--brass), 0 18px 34px rgba(0,0,0,.5);
}
.choice-tick .msi { font-size: 18px; }
.choice-card .opt-pic, .seq-face .opt-pic, .imm-puzzle .opt-pic { width: 100%; border-radius: 6px; font-size: 18px; background: repeating-linear-gradient(135deg, var(--night-2) 0 8px, #203744 8px 16px); }
.imm-puzzle .opt-label { padding: 8px 4px 2px; font-family: var(--fell); font-size: 16px; line-height: 1.15; color: var(--ink); text-align: center; }
.imm-puzzle .seq-list { max-width: 100%; display: flex; flex-direction: row; gap: 12px; overflow-x: auto; padding: 6px 4px 12px; justify-content: safe center; }
.imm-puzzle .seq-item { display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
.imm-puzzle .seq-item.dragging { opacity: .85; transform: scale(1.04); }
.imm-puzzle .seq-face { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
.imm-puzzle .seq-moves { display: flex; flex-direction: row; justify-content: space-between; }
.imm-puzzle .seq-moves button { width: 44px; height: 32px; display: grid; place-items: center; }
.pz-foot { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding: 16px 28px 26px; }
.pz-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; max-width: 420px; }
.pz-env { margin: 0; font-size: 13.5px; line-height: 1.35; }
.pz-env b { color: #F6ECD8; }
.pz-hints p { margin: 0 0 4px; padding: 6px 10px; border-left: 2px solid var(--brass); background: rgba(14,26,34,.6); font-size: 14px; }
.pz-side .line-pill { align-self: flex-start; }
.pz-main { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.pz-cost { margin: 0; font-size: 12.5px; color: var(--mist); }
.shake { animation: shake .45s; }

/* arquivo / mesa */
.imm-archive { background: #0B1419; }
.table-felt {
  position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; margin: 0 24px 24px; overflow: hidden;
  border-radius: 16px;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(196,161,90,.1), transparent 60%),
    repeating-linear-gradient(92deg, rgba(255,255,255,.018) 0 2px, rgba(0,0,0,.03) 2px 7px),
    #182A33;
  box-shadow: inset 0 18px 40px rgba(0,0,0,.45), inset 0 0 0 1px rgba(10,18,23,.9);
}
.table-grid {
  flex: 1; min-height: 0; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 22px 16px; align-content: start; padding: 28px 22px 40px;
  scrollbar-width: thin; scrollbar-color: var(--brass) transparent;
}
.table-card {
  position: relative; display: block; width: 100%; aspect-ratio: 63 / 88; padding: 0; border: 0; border-radius: 8px;
  background: transparent; cursor: pointer; transform: translate(var(--dx), var(--dy)) rotate(var(--rot));
  transition: transform .18s ease; container-type: inline-size;
}
.table-card.tilt-0 { --rot: -2.5deg; --dx: 0px; --dy: 2px; }
.table-card.tilt-1 { --rot: 1.8deg; --dx: 3px; --dy: -3px; }
.table-card.tilt-2 { --rot: -1deg; --dx: -2px; --dy: 4px; }
.table-card.tilt-3 { --rot: 3deg; --dx: 4px; --dy: 0px; }
.table-card.tilt-4 { --rot: -3.2deg; --dx: -3px; --dy: -2px; }
.table-card.tilt-5 { --rot: .8deg; --dx: 1px; --dy: 3px; }
.table-card.tilt-6 { --rot: 2.4deg; --dx: -4px; --dy: 1px; }
.table-card.tilt-7 { --rot: -1.6deg; --dx: 2px; --dy: -4px; }
.table-card.is-break { grid-column-start: 1; }
.table-card:hover { z-index: 2; transform: translate(var(--dx), calc(var(--dy) - 14px)) rotate(0deg); }
.table-card.is-held { visibility: hidden; }
.mesa-face {
  display: flex; flex-direction: column; height: 100%; gap: 3.2cqi; padding: 5.5cqi 5cqi 4cqi; overflow: hidden;
  border-radius: 10px; background: #F3E0C4; color: var(--ink);
  box-shadow: inset 0 0 0 5px #F3E0C4, inset 0 0 0 6px var(--brass-dim), 0 14px 24px rgba(0,0,0,.45);
}
.mesa-art { flex: 1 1 auto; width: 100%; min-height: 0; aspect-ratio: auto; border-radius: 6px; }
.mesa-name {
  flex: none; height: 2.5em; padding: 0 .2em; font-family: var(--fell); font-weight: 400;
  font-size: clamp(14px, 8.4cqi, 22px); line-height: 1.25; text-align: center;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.mesa-code {
  flex: none; padding-bottom: .15em; font-size: clamp(11px, 5.2cqi, 14px); letter-spacing: .12em;
  text-transform: uppercase; color: var(--brass-dim); text-align: center;
}
.table-hold {
  position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  background: rgba(8,14,18,.72); padding: 20px;
}
.table-hold-card .tcard { width: 280px; }
.table-hold-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* coruja ao chefe */
.imm-hint { align-items: center; justify-content: center; background: rgba(8,14,18,.72); padding: 24px; }
.hint-sheet {
  width: min(860px, 100%); max-height: min(760px, 100%); display: grid; grid-template-columns: 240px minmax(0, 1fr);
  background: var(--night-2); border: 1px solid var(--night-3); border-radius: 12px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.55);
}
.hint-chief { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 18px; background: #101920; border-right: 1px solid var(--night-3); }
.hint-x { position: absolute; top: 12px; right: 12px; }
.hint-portrait { display: block; width: 100%; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--night-3); }
.hint-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.hint-portrait b { display: grid; place-items: center; width: 100%; height: 100%; font-family: var(--fell); font-size: 42px; color: var(--brass); }
.hint-chief-copy { display: flex; flex-direction: column; gap: 4px; }
.hint-chief-copy p { margin: 0; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--brass); }
.hint-chief-copy b { font-family: var(--fell); font-weight: 400; font-size: 26px; line-height: 1.1; }
.hint-chief-copy small { font-size: 14px; font-style: italic; color: var(--mist); }
.hint-rule { margin-top: 8px; font-size: 13.5px; line-height: 1.45; color: var(--mist); }
.hint-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.hint-steps { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 18px; padding: 20px 22px; }
.hint-steps h2 { margin: 0 0 8px; font-size: 22px; }
.hint-topics, .hint-levels { display: flex; flex-direction: column; gap: 8px; }
.hint-topic, .hint-level {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 52px; padding: 8px 14px;
  border: 1px solid var(--night-3); border-radius: 8px; background: transparent; color: var(--vellum);
  font: inherit; font-size: 16px; text-align: left; cursor: pointer;
}
.hint-topic small, .hint-level small { flex: none; font-size: 13px; color: var(--brass); }
.hint-topic.is-on { border-color: var(--brass); background: rgba(196,161,90,.12); }
.hint-level.is-on { border-color: var(--vellum); background: var(--vellum); color: var(--ink); }
.hint-level.is-on small { color: var(--ink-soft); }
.hint-level:disabled { opacity: .45; cursor: default; }
.hint-level.is-done { opacity: .7; }
.hint-prev { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.hint-prev p { margin: 0; padding: 8px 12px; border-left: 2px solid var(--brass); background: rgba(14,26,34,.55); font-size: 14.5px; line-height: 1.45; }
.hint-note { margin: 10px 0 0; font-size: 13.5px; color: var(--mist); }
.hint-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--night-3); }
.hint-foot span { font-size: 14px; color: var(--brass); }
.hint-fly { min-height: 320px; display: grid; place-items: center; text-align: center; padding: 24px; }
.hint-fly p { margin: 8px 0 0; color: var(--brass); }
.hint-main.is-reply { overflow: auto; padding: 22px; gap: 14px; }
.hint-letter {
  display: flex; flex-direction: column; gap: 10px; padding: 22px 24px; border-radius: 8px; background: var(--vellum); color: var(--ink);
}
.hint-stamp {
  align-self: flex-start; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 999px;
  background: var(--seal); color: #F6ECD8; font-family: var(--fell); font-size: 22px;
  animation: stamp .7s cubic-bezier(.3,1.6,.5,1) both;
}
.hint-about { margin: 0; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--brass-dim); }
.hint-text { font-family: var(--fell); font-size: 21px; line-height: 1.4; }
.hint-sign { margin: 0; font-family: var(--fell); font-size: 24px; text-align: right; }
.hint-logged { margin: 0; font-size: 14px; color: var(--mist); }
.hint-reply-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* arquivo: carrossel 3D (legado, fora da mesa) */
.imm-archive { background: #0B1419; }
.arch-head { flex-wrap: wrap; }
.seg { display: flex; padding: 3px; gap: 3px; border-radius: 999px; background: rgba(14,26,34,.7); border: 1px solid var(--night-3); }
.arch-head .seg { order: 3; width: 100%; max-width: 440px; margin: 0 auto; }
.seg-btn {
  flex: 1; min-height: 38px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--vellum);
  font: inherit; font-size: 14.5px; cursor: pointer; white-space: nowrap;
}
.seg-btn.is-on { background: var(--vellum); color: var(--ink); }
.seg-btn small { opacity: .7; }
.flow-stage {
  --fw: min(300px, calc((100vh - 240px) * .716)); position: relative; z-index: 1; flex: 1; min-height: 0;
  perspective: 1400px; touch-action: pan-y; overscroll-behavior: contain; user-select: none; -webkit-user-select: none;
}
.flow-card {
  position: absolute; left: 50%; top: 50%; width: var(--fw); margin-left: calc(var(--fw) / -2); margin-top: calc(var(--fw) * -.6984);
  padding: 0; border: 0; background: none; font: inherit; cursor: pointer; transform-style: preserve-3d;
  transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .3s, filter .3s;
}
.flow-card .tcard { width: 100%; padding: 14px; box-shadow: inset 0 0 0 7px #F3E0C4, inset 0 0 0 8px var(--brass-dim), 0 30px 60px rgba(0,0,0,.55); }
.flow-card:focus-visible { outline: none; }
.flow-card:focus-visible .tcard { outline: 2px solid var(--brass); outline-offset: 4px; }
.flow-card[data-pos="0"] { z-index: 5; transform: none; }
.flow-card[data-pos="-1"] { z-index: 4; filter: brightness(.6); transform: translateX(calc(var(--fw) * -.78)) translateZ(-160px) rotateY(38deg); }
.flow-card[data-pos="1"] { z-index: 4; filter: brightness(.6); transform: translateX(calc(var(--fw) * .78)) translateZ(-160px) rotateY(-38deg); }
.flow-card[data-pos="-2"] { z-index: 3; filter: brightness(.45); opacity: .85; transform: translateX(calc(var(--fw) * -1.38)) translateZ(-320px) rotateY(38deg); }
.flow-card[data-pos="2"] { z-index: 3; filter: brightness(.45); opacity: .85; transform: translateX(calc(var(--fw) * 1.38)) translateZ(-320px) rotateY(-38deg); }
.flow-card[data-pos="-3"] { z-index: 2; opacity: 0; pointer-events: none; transform: translateX(calc(var(--fw) * -1.9)) translateZ(-480px) rotateY(38deg); }
.flow-card[data-pos="3"] { z-index: 2; opacity: 0; pointer-events: none; transform: translateX(calc(var(--fw) * 1.9)) translateZ(-480px) rotateY(-38deg); }
.flow-card[data-pos="far"] { opacity: 0; pointer-events: none; transform: translateZ(-600px); }
.flow-stage.is-files { display: flex; align-items: flex-start; perspective: none; padding-bottom: 24px; }
.files-panel { width: min(640px, calc(100% - 32px)); max-height: 100%; margin: 0 auto; overflow: auto; padding: 18px 20px; border-radius: 8px; background: var(--vellum); color: var(--ink); }

/* diário */
.imm-diary { flex-direction: row; justify-content: flex-end; background: rgba(8,14,18,.6); }
.diary-scrim { flex: 1; }
.diary-panel { width: 440px; max-width: 100%; height: 100%; display: flex; flex-direction: column; background: var(--night-2); border-left: 1px solid var(--night-3); animation: rise .35s ease-out both; }
.diary-panel header { display: flex; justify-content: space-between; align-items: center; padding: 16px 12px 12px 20px; border-bottom: 1px solid var(--night-3); }
.diary-panel h2 { font-size: 26px; }
.diary-panel .imm-x { border: 0; background: none; color: var(--mist); }
.diary-filters { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid var(--night-3); }
.chip { min-height: 30px; padding: 0 12px; border: 1px solid var(--night-3); border-radius: 999px; background: transparent; color: var(--mist); font: inherit; font-size: 13px; cursor: pointer; }
.chip.is-on { background: var(--vellum); border-color: var(--vellum); color: var(--ink); }
.diary-list { flex: 1; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.diary-row { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 8px; font-size: 15px; line-height: 1.45; }
.diary-row time { padding-top: 2px; font-size: 13.5px; font-variant-numeric: tabular-nums; color: var(--brass); }
.diary-entry b { font-weight: 600; }
.is-speech > b, .is-narration > b { display: block; margin-bottom: 2px; }
.diary-entry.is-speech { padding: 8px 10px; border-radius: 4px; background: var(--night-3); }
.diary-entry.is-narration .prose { font-style: italic; color: #DCD2B8; }
.diary-entry.is-instr { padding: 6px 10px; border-left: 3px solid var(--seal-2); background: rgba(138,36,50,.2); font-weight: 600; }
.diary-entry.is-quiet { color: var(--mist); font-style: italic; }
.diary-entry.is-solved { color: var(--brass); }

/* mais e menu do caso */
.imm-more { justify-content: flex-end; align-items: center; padding: 0 12px calc(92px + env(safe-area-inset-bottom, 0px)); background: rgba(8,14,18,.45); animation-duration: .2s; }
.more-card {
  display: flex; align-items: center; gap: 3px; max-width: 100%; padding: 4px; border-radius: 999px;
  background: rgba(20,34,43,.86); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: inset 0 0 0 1px rgba(234,223,196,.14), 0 18px 40px rgba(0,0,0,.5); animation: rise .25s ease-out both;
}
.more-item {
  display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 18px; border: 0; border-radius: 999px;
  background: transparent; color: var(--vellum); font: inherit; font-size: 16.5px; white-space: nowrap; cursor: pointer;
}
.more-item:hover { background: rgba(234,223,196,.1); }
.more-item .msi { font-size: 21px; color: var(--brass); }
.more-item.is-seal { background: var(--seal); color: #F6ECD8; font-weight: 600; }
.more-item.is-seal .msi { color: #F6ECD8; }
.more-item.is-seal:hover { background: var(--seal-2); }
.imm-casemenu { align-items: flex-start; padding: 70px 16px 0; background: rgba(8,14,18,.5); animation-duration: .2s; }
.casemenu-card { width: 320px; max-width: 100%; overflow: hidden; border-radius: 10px; background: var(--vellum); color: var(--ink); box-shadow: 0 20px 50px rgba(0,0,0,.5); animation: rise .25s ease-out both; }
.casemenu-card header { display: flex; flex-direction: column; padding: 14px 18px; line-height: 1.3; border-bottom: 1px solid var(--vellum-2); }
.casemenu-card header span { font-size: 13px; font-style: italic; color: var(--brass-dim); }
.casemenu-card header b { font-family: var(--fell); font-weight: 400; font-size: 22px; }
.casemenu-card header small { font-size: 13.5px; color: var(--ink-soft); }
.casemenu-card button {
  width: 100%; min-height: 54px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px;
  padding: 6px 18px; border: 0; border-top: 1px solid var(--vellum-2); background: none; color: var(--ink);
  font: inherit; font-size: 17px; text-align: left; cursor: pointer;
}
.casemenu-card header + button { border-top: 0; }
.casemenu-card button small { font-size: 13px; color: var(--ink-soft); }
.casemenu-card button:hover { background: #F4EAD2; }

/* anotações */
.imm-notes { background: radial-gradient(ellipse at 50% 50%, #203744 0%, #14222B 55%, #0A1217 100%); }
.nb-tabs { display: none; }
.notebook {
  position: relative; z-index: 1; flex: 1; min-height: 0; width: min(1000px, calc(100% - 48px)); margin: 0 auto 28px;
  display: grid; grid-template-columns: 340px minmax(0, 1fr); overflow: hidden; border-radius: 6px;
  box-shadow: 0 30px 60px rgba(0,0,0,.55); animation: rise .4s ease-out both;
}
.nb-people {
  min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 22px; background: #E4D7B8; color: var(--ink);
  border-right: 2px solid rgba(43,33,23,.22); box-shadow: inset -14px 0 18px -14px rgba(43,33,23,.4);
}
.nb-people h2, .nb-page h2 { font-size: 28px; margin-bottom: 4px; }
.nb-person {
  display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer;
}
.nb-person:hover { background: rgba(255,247,230,.55); }
.nb-art { width: 52px; border-radius: 6px; font-size: 12px; }
.nb-person b { display: block; font-weight: 600; font-size: 15.5px; line-height: 1.2; }
.nb-person small { display: block; font-size: 13px; color: var(--ink-soft); }
.nb-page { min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 22px 24px 20px; background: var(--vellum); color: var(--ink); }
.nb-lines {
  flex: 1; width: 100%; min-height: 200px; padding: 0 2px; border: 0; outline: none; resize: none;
  font-family: var(--body); font-size: 17px; line-height: 32px; color: var(--ink);
  background: repeating-linear-gradient(180deg, transparent 0 31px, rgba(142,118,65,.35) 31px 32px); background-attachment: local;
}
.nb-cited { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; border-top: 1px dashed var(--brass-dim); }
.nb-cited-label { margin: 0; font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--brass-dim); }
.nb-cited-label i { letter-spacing: 0; text-transform: none; }
.nb-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 34px; }
.nb-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px 0 4px; border: 1px solid var(--brass-dim);
  border-radius: 999px; background: #F4EAD2; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer;
}
.nb-chip:hover { background: #FFF7E6; border-color: var(--ink); }
.nb-chip:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--brass); }
.nb-chip-art { width: 26px; border-radius: 999px; font-size: 5.5px; }
.nb-none { font-size: 14px; font-style: italic; color: var(--ink-soft); }

/* relatório */
.imm-screen {
  position: fixed; inset: 0; display: flex; flex-direction: column; overflow: hidden; color: var(--vellum);
  background: radial-gradient(ellipse at 30% 40%, #203744 0%, #14222B 55%, #0A1217 100%); animation: fadeIn .3s ease-out both;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
}
.rp-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px; padding: 0 32px 28px; }
.rp-chief { display: flex; flex-direction: column; gap: 12px; }
.rp-portrait { width: 100%; border-radius: 8px; font-size: 40px; box-shadow: 0 0 0 2px var(--brass-dim), 0 20px 40px rgba(0,0,0,.5); }
.rp-portrait > .msi { font-size: 64px; }
.rp-chief-text { display: flex; flex-direction: column; line-height: 1.2; }
.rp-chief-text b { font-family: var(--fell); font-weight: 400; font-size: 26px; color: #F6ECD8; }
.rp-chief-text small { font-size: 14px; font-style: italic; color: var(--mist); }
.rp-talk { min-height: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--night-3); border-radius: 10px; background: rgba(14,26,34,.6); }
.rp-feed { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.rp-feed > :first-child { margin-top: auto; }
.rp-feed .bubble { font-size: 16px; }
.rp-feed .is-question .bubble { font-family: var(--fell); font-size: 21px; line-height: 1.3; background: #2E4A58; }
.card-bubble { display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; }
.card-bubble .tray-art { flex: none; width: 44px; border-radius: 6px; font-size: 10px; }
.card-bubble > span:last-child { display: flex; flex-direction: column; line-height: 1.2; }
.card-bubble small { font-size: 12px; color: var(--brass-dim); }
.card-bubble b { font-weight: 600; font-size: 15.5px; }
.rp-dock { padding: 12px 14px 14px; border-top: 1px solid var(--night-3); background: rgba(10,18,23,.6); }
.rp-dock-label { margin: 0 0 6px; font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--brass); }
.rp-tray { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 6px 2px 4px; }
.tray-card {
  flex: none; width: 128px; display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 0; border-radius: 10px;
  background: #F3E0C4; color: var(--ink); font: inherit; text-align: center; cursor: pointer;
  box-shadow: inset 0 0 0 4px #F3E0C4, inset 0 0 0 5px var(--brass-dim); transition: transform .15s;
  animation: deal .4s cubic-bezier(.2,.8,.2,1) backwards;
}
.tray-card:nth-child(2) { animation-delay: .05s; }
.tray-card:nth-child(3) { animation-delay: .1s; }
.tray-card:nth-child(n+4) { animation-delay: .15s; }
.tray-card:hover { transform: translateY(-4px); }
.tray-art { width: 100%; border-radius: 6px; font-size: 13px; }
.tray-label { min-height: 2.3em; display: flex; align-items: center; justify-content: center; font-family: var(--fell); font-size: 15px; line-height: 1.15; }
.tray-card.is-text { width: 170px; min-height: 124px; justify-content: center; }
.tray-card.is-text .tray-label { font-size: 16.5px; }
.rp-final { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.rp-final .line-pill { color: var(--vellum); }

/* entrega e parecer */
.deliver-screen { align-items: center; justify-content: center; gap: 22px; padding: 24px; overflow-y: auto; }
.deliver-wrap { position: relative; width: min(520px, 100%); margin-bottom: 30px; animation: rise .5s ease-out both; }
.doc-sheet {
  position: relative; padding: 36px 40px; border-radius: 3px; background: var(--vellum); color: var(--ink);
  box-shadow: inset 0 0 0 7px var(--vellum), inset 0 0 0 8px var(--brass-dim), 0 30px 60px rgba(0,0,0,.55);
}
.doc-sheet.is-blank { display: flex; flex-direction: column; padding-bottom: 72px; }
.doc-org { margin: 0; font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--brass-dim); }
.doc-head h1 { margin-top: 2px; font-size: 38px; line-height: 1.05; }
.doc-rule { display: block; height: 3px; margin-top: 8px; border-top: 1px solid var(--brass-dim); border-bottom: 1px solid var(--brass); }
.doc-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 8px 0 0; font-size: 14.5px; color: var(--ink-soft); }
.doc-meta b { font-weight: 600; color: var(--ink); }
.doc-blank { display: block; height: 1px; margin-top: 24px; background: #B8A988; }
.doc-blank.is-mid { width: 86%; }
.doc-blank.is-short { width: 64%; }
.doc-wait { align-self: flex-end; margin: 20px 0 0; font-family: var(--fell); font-style: italic; font-size: 15px; color: var(--ink-soft); }
.wax-seal {
  position: absolute; left: 50%; bottom: -38px; width: 120px; height: 120px; margin-left: -60px; display: grid; place-items: center;
  border-radius: 999px; background: radial-gradient(circle at 38% 32%, #B23A4C 0%, var(--seal) 55%, #5E1622 100%);
  box-shadow: inset 0 0 0 6px rgba(0,0,0,.18), inset 0 0 0 9px rgba(246,236,216,.25), 0 14px 30px rgba(0,0,0,.5);
  transform: rotate(-8deg); animation: stamp .7s .45s cubic-bezier(.3,1.6,.5,1) both;
}
.wax-seal span { font-family: var(--fell); font-size: 19px; line-height: 1.05; color: #F6ECD8; text-align: center; }
.deliver-screen .brass-pill { animation: rise .4s 1s ease-out both; }
.result-scroll { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 40px 24px 48px; }
.result-screen .doc-sheet { flex: none; width: 100%; max-width: 720px; animation: rise .5s ease-out both; }
.result-screen .doc-head { padding-right: 120px; }
.doc-badge {
  position: absolute; top: 28px; right: 32px; width: 96px; height: 96px; display: grid; place-items: center; overflow: hidden;
  border-radius: 999px; color: var(--brass-dim); background: radial-gradient(circle at 35% 30%, #F3E8CF, var(--vellum-2));
  box-shadow: inset 0 0 0 3px var(--brass), inset 0 0 0 7px var(--vellum-2), inset 0 0 0 8px var(--brass-dim), 0 10px 22px rgba(43,33,23,.35);
  transform: rotate(8deg); animation: stamp .8s .6s cubic-bezier(.3,1.6,.5,1) both;
}
.doc-badge img { width: 74%; height: 74%; border-radius: 999px; object-fit: cover; }
.doc-badge .msi { font-size: 44px; }
.doc-rows { display: flex; flex-direction: column; margin-top: 20px; }
.doc-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) 56px; gap: 10px; align-items: baseline; padding: 12px 0; border-bottom: 1px dashed #B8A988; }
.doc-mark { font-family: var(--fell); font-size: 26px; line-height: 1; }
.is-ok .doc-mark { color: #3C6B3F; }
.is-miss .doc-mark { color: var(--seal); }
.is-extra .doc-mark { color: var(--brass-dim); }
.is-extra .doc-mark .msi { font-size: 22px; }
.doc-answer { display: flex; flex-direction: column; gap: 2px; min-width: 0; line-height: 1.35; }
.doc-answer i { font-size: 13.5px; color: var(--ink-soft); }
.doc-answer > span { font-size: 16.5px; }
.doc-answer > .doc-right { font-size: 14.5px; color: var(--seal); }
.doc-pts { text-align: right; font-family: var(--fell); font-weight: 400; font-size: 22px; }
.is-miss .doc-pts { color: var(--ink-soft); }
.doc-total { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding-top: 14px; }
.doc-total span { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--brass-dim); }
.doc-total b { font-family: var(--fell); font-weight: 400; font-size: 56px; line-height: 1; }
.doc-total small { font-family: var(--body); font-size: 15px; color: var(--ink-soft); }
.doc-section { margin-top: 20px; }
.doc-section h2 { margin: 0 0 6px; font-family: var(--body); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--brass-dim); }
.doc-section .prose { font-size: 16px; line-height: 1.65; }
.doc-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-top: 26px; }
.doc-rank { display: flex; flex-direction: column; gap: 10px; max-width: 340px; }
.doc-rank p { margin: 0; font-size: 14px; font-style: italic; color: var(--ink-soft); }
.rank-stamp {
  align-self: flex-start; display: inline-block; margin: 0 0 8px 4px; padding: 6px 14px; border: 3px double var(--seal); border-radius: 4px;
  font-family: var(--fell); font-size: 26px; letter-spacing: .04em; color: var(--seal);
  transform: rotate(-6deg); animation: stamp .7s .9s cubic-bezier(.3,1.6,.5,1) both;
}
.doc-sign { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.doc-sign i { font-family: var(--fell); font-size: 26px; }
.doc-sign-line { width: 170px; margin-top: 2px; border-top: 1px solid var(--ink); }
.doc-sign small { font-size: 13px; color: var(--ink-soft); }
.result-real { margin: 0; font-size: 14px; color: var(--mist); }
.result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.result-actions .line-pill { min-height: 52px; padding: 0 22px; border-radius: 6px; color: var(--vellum); }

/* leitor */
.scanner-title { font-family: var(--fell); font-weight: 400; }

@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes stamp {
  0% { transform: scale(2.4) rotate(-18deg); opacity: 0; }
  70% { transform: scale(.92) rotate(-6deg); opacity: 1; }
  100% { transform: scale(1) rotate(-8deg); opacity: 1; }
}
@keyframes deal { 0% { opacity: 0; transform: translateY(80px) rotate(-12deg) scale(.85); } 100% { opacity: 1; transform: none; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-12px); } 40% { transform: translateX(10px); } 60% { transform: translateX(-7px); } 80% { transform: translateX(4px); } }
@keyframes whirl { 0% { transform: rotate(-200deg) scale(.4); opacity: 0; } 60% { opacity: 1; } 100% { transform: rotate(0) scale(1); opacity: 1; } }
@keyframes flipIn {
  0% { transform: perspective(900px) rotateY(180deg) scale(.9); opacity: .4; }
  100% { transform: perspective(900px) rotateY(0) scale(1); opacity: 1; }
}

/* partida no desktop: moldura central */
@media (min-width: 1200px) {
  .game, .imm, .imm-screen { --frame: max(40px, calc((100vw - 1240px) / 2)); }
  .game-top { padding-left: calc(var(--frame) - 12px); padding-right: var(--frame); }
  .scene-body { grid-template-columns: minmax(0, 500px) minmax(0, 1fr); gap: 40px; padding: 20px var(--frame) 0; }
  .imm-head, .imm-foot, .pz-foot, .pz-deck, .rp-body { padding-left: var(--frame); padding-right: var(--frame); }
  .imm-casemenu { padding-left: calc(var(--frame) - 12px); }
  .imm-foot { padding-bottom: 48px; }
}

/* partida no celular */
@media (max-width: 760px) {
  .game-top { padding: 8px 16px 8px 6px; background: var(--night); border-bottom: 1px solid var(--night-3); }
  .case-name b { font-size: 19px; }
  .clock b { font-size: 28px; }
  .scene { display: flex; flex-direction: column; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .scene-body { display: contents; }
  .scene-main, .scene-side { display: contents; }
  .scene-hero { position: relative; inset: auto; z-index: auto; flex: none; aspect-ratio: 4 / 3; }
  .is-talking .scene-hero { aspect-ratio: 16 / 7; }
  .scene-hero::after { background: linear-gradient(180deg, rgba(20,34,43,0) 40%, rgba(20,34,43,.95)); }
  .scene-caption { display: block; position: absolute; left: 16px; right: 16px; bottom: 26px; z-index: 1; }
  .scene-caption small { display: block; font-size: 12.5px; font-style: italic; color: var(--brass); }
  .scene-caption b { display: block; font-family: var(--fell); font-weight: 400; font-size: 26px; line-height: 1.1; color: #F6ECD8; }
  .pend-pill { order: -1; flex: none; max-width: none; margin: 8px 12px; }
  .place-card { position: relative; flex: none; max-height: none; overflow: visible; margin: -14px 12px 0; padding: 14px 16px 18px; border-radius: 12px; }
  .place-title { display: none; }
  .spot-tile { min-height: 52px; padding: 6px 10px 6px 6px; font-size: 14.5px; }
  .spot-thumb { width: 44px; }
  .scene-people { flex: none; align-self: stretch; width: auto; margin-top: 0; padding: 14px 12px 16px; }
  .here-more { display: none; }
  .here-scroll, .here-scroll.is-scroll { max-height: none; overflow: visible; mask-image: none; -webkit-mask-image: none; }
  .here-grid { display: flex; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .here-card { flex: none; width: 120px; }
  .scene-label { color: var(--mist); text-shadow: none; }
  .person-card { width: 120px; }
  .person-text { padding: 6px 8px; }
  .person-text b { font-size: 13.5px; }
  .person-text small { display: none; }
  .talk-card { flex: none; margin: -14px 12px 0; border-radius: 12px; }
  .talk-feed { overflow: visible; }
  .talk-head { grid-template-columns: 64px minmax(0, 1fr) auto; }
  .talk-portrait { width: 64px; }
  .talk-who h2 { font-size: 22px; }
  .talk-ask { flex-wrap: wrap; }
  .talk-ask input { flex-basis: 100%; }
  .talk-ask .line-btn, .talk-ask .seal-pill { flex: 1; }

  .game-bar { padding: 0; background: #0E1A22; border-top: 1px solid var(--night-3); }
  .bar-pill {
    width: 100%; height: calc(84px + env(safe-area-inset-bottom, 0px)); padding: 0 6px calc(14px + env(safe-area-inset-bottom, 0px));
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: center;
    border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .only-wide, .bar-label { display: none; }
  .bar-btn { height: 52px; padding: 0; color: var(--mist); }
  .bar-btn:hover { background: transparent; color: var(--vellum); }
  .bar-btn:not(.bar-scan) .msi { display: inline-block; font-size: 26px; }
  .bar-scan { width: 52px; height: 52px; min-width: 52px; margin: -10px auto 0; justify-self: center; color: #F6ECD8; }
  .bar-scan:hover { color: #F6ECD8; background: var(--seal-2); }
  .bar-badge { position: absolute; top: 4px; left: calc(50% + 6px); font-size: 10.5px; padding: 0 5px; }

  .imm-head { padding: 14px 16px; }
  .imm-foot { padding: 0 20px 24px; }
  .imm-name { font-size: 38px; }
  .imm-desc { font-size: 16px; }
  .imm-title { font-size: 24px; }
  .tcard { width: 240px; }
  .rv-wait, .table-hold-card .tcard { width: 230px; }
  .table-felt { margin: 0 10px 10px; }
  .table-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 14px 10px; padding: 16px 12px 28px; }
  .mesa-name { font-size: clamp(13px, 8.4cqi, 16px); }
  .mesa-code { font-size: clamp(10px, 5.2cqi, 12px); }
  .diary-scrim { display: none; }
  .diary-panel { width: 100%; max-width: 100%; border-left: 0; }
  .imm-diary { background: var(--night-2); }
  .imm-hint { align-items: stretch; justify-content: flex-end; padding: 0; }
  .hint-sheet { width: 100%; max-width: 100%; max-height: 92%; grid-template-columns: 1fr; border-radius: 16px 16px 0 0; overflow: auto; }
  .hint-chief { flex-direction: row; align-items: center; gap: 12px; padding: 12px 56px 12px 12px; border-right: 0; border-bottom: 1px solid var(--night-3); }
  .hint-portrait { width: 72px; flex: none; }
  .hint-portrait b { font-size: 24px; }
  .hint-chief-copy b { font-size: 20px; }
  .hint-rule { margin-top: 2px; }
  .dest-thumb { width: 92px; font-size: 12.5px; }
  .imm-more { align-items: stretch; padding: 0 0 calc(84px + env(safe-area-inset-bottom, 0px)); }
  .more-card {
    flex-direction: column; align-items: stretch; gap: 0; padding: 6px 0; border-radius: 16px 16px 0 0;
    background: #0E1A22; box-shadow: inset 0 1px 0 var(--night-3), 0 -12px 30px rgba(0,0,0,.4); backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .more-item { height: 56px; padding: 0 22px; gap: 14px; border-radius: 0; font-size: 17px; }
  .more-item + .more-item { box-shadow: inset 0 1px 0 var(--night-3); }
  .more-item .msi { font-size: 24px; }
  .more-item.is-seal { background: transparent; color: #E39AA3; font-weight: 600; }
  .more-item.is-seal .msi { color: #E39AA3; }
  .more-item.is-seal:hover { background: rgba(234,223,196,.06); }

  .pz-deck { flex-direction: column; align-items: stretch; justify-content: flex-start; overflow-x: hidden; overflow-y: auto; gap: 12px; padding: 4px 16px 24px; }
  .pz-card { width: 100%; display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; }
  .pz-card .pz-lock { width: 56px; height: 56px; }
  .pz-card .pz-lock .msi { font-size: 28px; }
  .pz-card-art { width: 112px; }
  .pz-card-text b { font-size: 20px; }
  .pz-title { font-size: 24px; }
  .lock-obj { padding: 20px 14px; gap: 12px; }
  .lock-inscr { font-size: 18px; }
  .wheels { gap: 6px; }
  .wheel-btn, .wheel-num { width: 48px; }
  .wheel-num { height: 70px; font-size: 36px; }
  .lock-board { padding: 16px 12px; }
  .imm-puzzle .choice-card { width: calc(50% - 8px); }
  .imm-puzzle .seq-list { flex-direction: column; overflow: visible; width: 100%; }
  .imm-puzzle .seq-item { width: 100%; flex-direction: row; align-items: center; }
  .imm-puzzle .seq-face { flex: 1; flex-direction: row; align-items: center; gap: 10px; }
  .imm-puzzle .seq-face .opt-pic { width: 56px; flex: none; }
  .imm-puzzle .seq-face .opt-label { padding: 0; text-align: left; }
  .imm-puzzle .seq-moves { flex-direction: column; }
  .imm-puzzle .seq-moves .msi { transform: rotate(90deg); }
  .pz-foot { flex-direction: column; align-items: stretch; padding: 12px 16px 18px; }
  .pz-main { align-items: stretch; }

  .flow-stage { --fw: min(230px, calc((100vh - 230px) * .716)); }
  .flow-stage { --fw: min(230px, calc((100vh - 230px) * .716)); }

  .nb-tabs { display: flex; margin: 0 16px 12px; }
  .notebook { width: calc(100% - 24px); margin: 0 auto 16px; grid-template-columns: 1fr; }
  .notebook.show-notes .nb-people, .notebook.show-people .nb-page { display: none; }
  .nb-people { border-right: 0; box-shadow: none; }

  .rp-body { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); gap: 12px; padding: 0 12px 12px; }
  .rp-chief { flex-direction: row; align-items: center; }
  .rp-portrait { width: 64px; flex: none; font-size: 14px; }
  .rp-portrait > .msi { font-size: 32px; }
  .rp-chief-text b { font-size: 20px; }
  .tray-card { width: 108px; }
  .tray-card.is-text { width: 150px; }
  .rp-final { flex-direction: column-reverse; align-items: stretch; }

  .doc-sheet { padding: 26px 20px; }
  .doc-head h1 { font-size: 28px; }
  .result-screen .doc-head { padding-right: 70px; }
  .doc-badge { top: 18px; right: 16px; width: 64px; height: 64px; }
  .doc-total b { font-size: 44px; }
  .rank-stamp { font-size: 20px; }
  .result-scroll { padding: 20px 12px 32px; }
  .result-actions { flex-direction: column; width: 100%; }
}

/* Casos só de vitrine (sem acesso premium) e tela de planos */
.shelf-tag.is-lock { display: inline-flex; align-items: center; gap: 4px; background: var(--night); color: var(--brass); border: 1px solid var(--brass-dim); }
.shelf-tag.is-lock .msi { font-size: 14px; }
.shelf-card.is-locked .shelf-cover img, .shelf-card.is-locked .shelf-emoji { filter: grayscale(.55) brightness(.8); }
.plans-sheet { max-width: 520px; display: flex; flex-direction: column; gap: 14px; position: relative; }
.plans-sheet h2 { margin: 0; padding-right: 36px; font-size: 30px; line-height: 1.1; }
.plans-lead { margin: 0; font-size: 17px; line-height: 1.5; color: #3A2E22; }
.plans-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.plan { position: relative; padding: 16px 14px; border: 1px solid var(--brass-dim); border-radius: 8px; background: #F3EAD2; text-align: center; }
.plan.is-best { border-width: 2px; border-color: var(--seal); }
.plan h3 { margin: 0 0 6px; font-family: var(--fell); font-size: 20px; font-weight: 400; }
.plan-price { margin: 0; font-size: 26px; font-weight: 600; color: var(--ink); }
.plan-price small { font-size: 14px; font-weight: 400; color: var(--ink-soft); }
.plan-sub { margin: 4px 0 0; font-size: 14px; color: var(--ink-soft); }
.plan-flag { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); padding: 2px 10px; border-radius: 999px; background: var(--seal); color: #F6ECD8; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.plans-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 16px; color: #3A2E22; }
.plans-note { margin: 0; font-size: 15px; color: var(--ink-soft); }
.plans-actions { display: flex; justify-content: flex-end; }
@media (max-width: 520px) { .plans-grid { grid-template-columns: 1fr; } }

/* Escolha do plano e CPF */
button.plan { font: inherit; color: inherit; cursor: pointer; }
.plan[aria-checked="true"] { border-width: 2px; border-color: var(--seal); background: #FBF4DF; box-shadow: 0 0 0 3px rgba(138, 36, 50, .14); }
.plan[aria-checked="false"] { border-width: 1px; border-color: var(--brass-dim); background: #F3EAD2; box-shadow: none; }
.plan.is-best[aria-checked="false"] { border-width: 1px; }
.plans-field { display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: var(--ink-soft); }
.plans-field input { min-height: 46px; padding: 0 12px; border: 1px solid var(--brass-dim); border-radius: 6px; background: #FBF6EA; color: var(--ink); font: inherit; font-size: 17px; letter-spacing: .04em; }
.plans-help { font-size: 13.5px; line-height: 1.4; color: var(--ink-soft); }
.plans-error { margin: 0; padding: 8px 10px; border-radius: 6px; background: #F4D9DB; color: #6B1822; font-size: 15px; }

/* Convite para assinar: fim do caso e estante */
.upsell { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; align-items: center; max-width: 720px; margin: 22px auto 0; padding: 16px; background: var(--night-2); border: 1px solid var(--brass-dim); border-radius: 12px; color: var(--vellum); }
.upsell-cover { aspect-ratio: 1 / 1; display: grid; place-items: center; overflow: hidden; border-radius: 8px; background: var(--night); font-size: 3rem; }
.upsell-cover img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.4) brightness(.85); }
.upsell-body { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.upsell-body h2 { margin: 0; font-size: 26px; line-height: 1.15; color: var(--brass); }
.upsell-body p { margin: 0; font-size: 16px; line-height: 1.45; }
.upsell-kicker { font-size: 13px !important; letter-spacing: .12em; text-transform: uppercase; color: var(--mist); }
.upsell-note { color: var(--mist); font-size: 14.5px !important; }
.shelf-upsell { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin: 0 0 22px; padding: 12px 16px; background: var(--night-2); border: 1px solid var(--brass-dim); border-radius: 12px; }
.shelf-upsell div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.shelf-upsell b { font-family: var(--fell); font-weight: 400; font-size: 19px; color: var(--brass); }
.shelf-upsell span { font-size: 15px; color: var(--mist); }
.case-sheet-dur { display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border: 1px solid var(--brass-dim); border-radius: 999px; font-size: 13px; color: var(--ink-soft); }
@media (max-width: 560px) {
  .upsell { grid-template-columns: 1fr; }
  .upsell-cover { aspect-ratio: 16 / 9; }
  .shelf-upsell { flex-direction: column; align-items: flex-start; }
}
