/* The ship: the deck painting under the hour's light, the glow over it, brass instruments, and the talk at the
   bottom as night glass. The palette's accent (dourado or soturno) tints the brass and the seal. */
html.em-navio, html.em-navio body { overflow: hidden; background: #071823; }
.navio { position: fixed; inset: 0; overflow: hidden; --latao: #C9A45C; --latao-escuro: #8A6C33; --selo: #8E2F3A; --brilho: #B0B8B4; }
.navio[data-paleta="soturno"] { --latao: #9FB3B6; --latao-escuro: #56666B; --selo: #5E1F2C; --brilho: #78E0D0; }
.navio[data-paleta="dourado"] { --latao: #E6C46E; --latao-escuro: #BE9440; --selo: #B4603F; --brilho: #E6C46E; }
.nv-pintura, .nv-veu, .nv-tela { position: absolute; inset: 0; width: 100%; height: 100%; }
.nv-pintura { background: center 40% / cover no-repeat; }
/* the spirit's figure: beside the ship (phone: left of it, between the dials and the talk; desktop: the left third),
   floating slowly; no background of its own */
.nv-espirito { position: absolute; z-index: 1; left: 24%; top: 30%; height: 34%; transform: translateX(-50%); pointer-events: none; transition: opacity .6s ease; }
.nv-espirito img { display: block; height: 100%; width: auto; filter: drop-shadow(0 0 18px color-mix(in srgb, var(--brilho) 30%, transparent)); animation: nv-boia 6s ease-in-out infinite; }
@media (min-width: 900px) { .nv-espirito { left: 30%; top: 22%; height: 46%; } }
@keyframes nv-boia { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.6%); } }
.nv-veu { pointer-events: none; }

.nv-topo { position: absolute; top: 0; left: 0; right: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: max(14px, env(safe-area-inset-top)) 16px 28px; background: linear-gradient(180deg, rgba(5, 17, 24, .6), transparent); }
.nv-titulo h1 { font-size: clamp(26px, 6vw, 36px); text-shadow: 0 2px 12px rgba(0, 0, 0, .5); }
.nv-titulo h1:focus-visible { outline: none; box-shadow: none; }
.nv-titulo p { font-size: 15px; color: var(--nevoa-baixa); }
.nv-cabine { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); background: rgba(5, 17, 24, .35); }
.nv-pintando { position: absolute; z-index: 2; left: 16px; top: calc(max(14px, env(safe-area-inset-top)) + 70px); font: italic 15px/1.3 var(--letra-titulo); color: var(--perola); opacity: .85; }

/* instruments: brass dials in a row (phone: a strip under the title; desktop: the right side) */
.nv-instrumentos { position: absolute; z-index: 2; display: flex; gap: 10px; left: 16px; right: 16px; top: calc(max(14px, env(safe-area-inset-top)) + 98px); justify-content: center; }
@media (min-width: 900px) { .nv-instrumentos { left: auto; right: 24px; top: 110px; flex-direction: column; width: 150px; } }
.nv-mostrador, .nv-rumo { margin: 0; display: grid; justify-items: center; gap: 2px; padding: 8px 6px 6px; min-width: 72px; border-radius: 12px;
  background: rgba(5, 17, 24, .5); border: 1px solid color-mix(in srgb, var(--latao) 35%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.nv-mostrador figcaption, .nv-rumo figcaption { display: grid; justify-items: center; text-align: center; line-height: 1.15; }
.nv-mostrador figcaption span, .nv-rumo figcaption span { font: 11px/1.2 var(--letra-meta); letter-spacing: .06em; text-transform: uppercase; color: var(--nevoa-baixa); }
.nv-mostrador strong, .nv-rumo strong { font: 400 15px/1.2 var(--letra-titulo); color: var(--perola); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nv-dial { width: 56px; height: 42px; }
.nv-dial-marcas line { stroke: var(--latao); stroke-width: 1.4; stroke-linecap: round; }
.nv-dial-arco { fill: none; stroke: var(--latao-escuro); stroke-width: 1.2; opacity: .7; }
.nv-dial-agulha { stroke: var(--perola); stroke-width: 2; stroke-linecap: round; transition: transform .9s cubic-bezier(.3,1.4,.5,1); }
.nv-dial-eixo { fill: var(--latao); }
.nv-rosa { width: 42px; height: 42px; }
.nv-rosa circle:first-child { fill: none; stroke: var(--latao-escuro); stroke-width: 1.2; }
.nv-rosa path { fill: var(--latao); opacity: .9; } .nv-rosa .nv-rosa-cruz { opacity: .5; }
@media (max-width: 899px) { .nv-rumo { display: none; } }

/* the sealed note */
.nv-bilhete { position: absolute; z-index: 3; left: 50%; transform: translateX(-50%); top: 52%; display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 10px 18px 10px 12px; border: 1px solid #D8C9A8; border-radius: 6px 10px 8px 7px; cursor: pointer;
  background: #EFE6DA; color: #2A3238; font: italic 17px/1.2 var(--letra-titulo); box-shadow: 0 10px 24px rgba(0, 0, 0, .4); animation: nv-flutua 4s ease-in-out infinite; }
.nv-lacre { width: 24px; height: 24px; border-radius: 50% 46% 52% 48%; background: radial-gradient(circle at 35% 35%, color-mix(in srgb, var(--selo) 70%, white), var(--selo)); box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .12); }
@keyframes nv-flutua { 0%, 100% { transform: translate(-50%, 0) rotate(-1deg); } 50% { transform: translate(-50%, -6px) rotate(1deg); } }

/* talk: night glass at the bottom */
.nv-conversa { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; display: grid; gap: 8px; padding: 14px 16px max(14px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, rgba(5, 17, 24, .78) 22%, rgba(5, 17, 24, .92)); }
@media (min-width: 900px) { .nv-conversa { left: 50%; right: auto; width: 640px; transform: translateX(-50%); bottom: 20px; border-radius: 18px; padding: 16px 20px;
  background: rgba(8, 26, 36, .78); border: 1px solid rgba(203, 196, 180, .22); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); } }
.nv-conversa-topo { display: flex; align-items: center; justify-content: space-between; }
.nv-nome { font: 400 19px/1.2 var(--letra-titulo); color: var(--perola); }
.nv-falas { display: grid; gap: 10px; max-height: 34vh; overflow-y: auto; scrollbar-width: thin; }
.nv-linha { display: flex; align-items: flex-end; gap: 10px; }
.nv-linha.eu { justify-content: flex-end; }
.nv-fala.eu { margin: 0; padding: 9px 13px; border-radius: 14px 12px 4px 14px; background: rgba(140, 199, 194, .18); color: var(--nevoa); max-width: 80%; text-wrap: pretty; }
/* the spirit's icon: its painted face later; now a medallion of its glow in the captain's palette */
.nv-icone { flex: none; width: 46px; height: 46px; border-radius: 50%; object-fit: cover; background-color: #F4EEE3;
  border: 1.5px solid color-mix(in srgb, var(--latao) 70%, transparent); box-shadow: 0 0 14px color-mix(in srgb, var(--brilho) 45%, transparent);
  background: radial-gradient(circle at 50% 45%, #FFFDF6 0 9%, var(--brilho) 22%, color-mix(in srgb, var(--brilho) 35%, #0A1E28) 52%, #081A23 78%); }
/* its words: a paper balloon with a tail toward the icon, as the nymphs speak */
.nv-balao { position: relative; max-width: min(84%, 460px); padding: 8px 14px 10px; border-radius: 16px 16px 16px 6px; background: #FBF6EC; color: #24323A;
  border: 1px solid rgba(122, 90, 67, .14); box-shadow: 0 6px 16px rgba(0, 0, 0, .3); }
.nv-balao::before { content: ''; position: absolute; left: -7px; bottom: 10px; width: 14px; height: 14px; background: #FBF6EC; border-left: 1px solid rgba(122, 90, 67, .14); border-bottom: 1px solid rgba(122, 90, 67, .14); transform: rotate(45deg); border-radius: 0 0 0 3px; }
.nv-quem { font: italic 600 15px/1.2 var(--letra-titulo); color: var(--latao-escuro); }
.nv-oque { font: 400 18px/1.35 var(--letra-titulo); text-wrap: pretty; }
.navio[data-paleta="soturno"] .nv-quem { color: #1F4A48; }
.nv-gesto { color: #7A6A55; font-weight: 400; }
.nv-pensa { letter-spacing: .3em; animation: nv-pisca 1.2s ease-in-out infinite; }
@keyframes nv-pisca { 50% { opacity: .35; } }
.nv-escreve { display: flex; gap: 8px; align-items: flex-end; }
.nv-campo { min-height: 48px; resize: none; background: rgba(5, 17, 24, .6); }
.nv-enviar { flex: none; }

/* dialogs (decision, history) reuse the confirm backdrop */
.nv-decisao, .nv-historia { width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); overflow: auto; display: grid; gap: 14px; padding: 24px 22px;
  border-radius: 10px 14px 12px 9px; background: #EFE6DA; color: #2A3238; box-shadow: 0 20px 60px rgba(0, 0, 0, .55); }
.nv-decisao h2, .nv-historia h2 { color: #1F2930; font-size: 26px; }
.nv-dec-selo { width: 40px; height: 40px; border-radius: 50% 46% 52% 48%; background: radial-gradient(circle at 35% 35%, #C4626E, var(--selo, #8E2F3A)); justify-self: center; }
.nv-opcoes { display: grid; gap: 10px; }
.nv-decisao .nv-opcao { justify-content: flex-start; text-align: left; color: #1F2930; background: rgba(255, 255, 255, .35); border-color: #B7A98C; font-weight: 400; }
.nv-decisao .nv-opcao:hover { background: rgba(190, 148, 64, .16); border-color: #8A6C33; }
.nv-decisao .botao:focus-visible { outline-color: #1E5466; box-shadow: 0 0 0 6px rgba(30, 84, 102, .2); }
.nv-decisao > .botao.pequeno { color: #1F2930; border-color: #B7A98C; background: transparent; }
.nv-historia { background: #0E2834; color: var(--nevoa); }
.nv-historia h2 { color: var(--perola); font-size: 22px; }
.nv-historia .botao { color: var(--nevoa); border-color: var(--vidro); }
.nv-hist-topo { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.nv-hist-lista { display: grid; gap: 8px; }

.nv-falha { min-height: 100dvh; display: grid; place-content: center; gap: 14px; padding: 24px; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .nv-espirito img { animation: none; }
  .nv-bilhete { animation: none; }
  .nv-pensa { animation: none; }
  .nv-dial-agulha { transition: none; }
}

/* ---------- the cabin: warm dark wood and a lantern that sways; the sheets and pages are paper */
html.em-cabine, html.em-cabine body { background: #1A1512; }
.cabine { position: relative; min-height: 100dvh; padding: max(16px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)); display: grid; gap: 16px; align-content: start;
  max-width: 820px; margin: 0 auto; --latao: #C9A45C; }
.cabine[data-paleta="soturno"] { --latao: #9FB3B6; } .cabine[data-paleta="dourado"] { --latao: #E6C46E; }
html.em-cabine body { background: radial-gradient(90% 60% at 50% 0%, #3A2A1E 0%, #1F1813 55%, #120E0B 100%) fixed; }
.cb-luz { position: fixed; top: -80px; left: 50%; width: 360px; height: 360px; margin-left: -180px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(230, 196, 110, .28), transparent 65%); animation: cb-balanca 7s ease-in-out infinite; transform-origin: 50% -200px; }
@keyframes cb-balanca { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
.cb-topo { display: flex; align-items: center; gap: 14px; }
.cb-topo h1 { font-size: clamp(28px, 7vw, 40px); }
.cb-topo h1:focus-visible { outline: none; box-shadow: none; }
.cb-abas { display: flex; gap: 6px; border-bottom: 1px solid rgba(203, 196, 180, .2); overflow-x: auto; }
.cb-aba { min-height: 48px; padding: 10px 14px; border: 0; background: none; color: var(--nevoa-baixa); font: 17px/1.2 var(--letra-titulo); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.cb-aba[aria-selected="true"] { color: var(--perola); border-bottom-color: var(--latao); }
.cb-conteudo { display: grid; gap: 14px; outline: none; }
.cb-intro { color: #C9BBA6; font-style: italic; }
.cb-paginas { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.cb-pagina, .cb-ficha { padding: 16px 18px; border-radius: 6px 9px 7px 8px; background: #EFE6DA; color: #2A3238; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.cb-pagina p { white-space: pre-line; }
.cb-quando { font: italic 14px/1.2 var(--letra-titulo); color: #7A6A55; margin-bottom: 6px; }
.cb-vazio { color: #C9BBA6; font-style: italic; }
.cb-escreve { display: grid; gap: 8px; }
.cb-escreve label { font: 400 19px/1.2 var(--letra-titulo); color: var(--perola); }
.cb-campo { background: rgba(18, 14, 11, .7); border-color: #5A4632; }
.cb-linha { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.cb-conta { font: 13px/1 var(--letra-meta); color: #C9BBA6; }
.cb-fichas { display: grid; gap: 14px; }
@media (min-width: 760px) { .cb-fichas { grid-template-columns: 1fr 1fr; } }
.cb-ficha h2 { color: #1F2930; font-size: 24px; margin-bottom: 8px; }
.cb-ficha dl { margin: 0; display: grid; gap: 8px; }
.cb-item dt { font: 12px/1.2 var(--letra-meta); letter-spacing: .08em; text-transform: uppercase; color: #7A6A55; }
.cb-item dd { margin: 2px 0 0; }
.cb-pe { display: grid; gap: 12px; margin-top: 8px; padding-top: 14px; border-top: 1px solid rgba(203, 196, 180, .16); }
.cb-aviso { font: italic 15px/1.3 var(--letra-titulo); color: var(--latao); }
.cb-portas { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cb-porta { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border: 1px dashed rgba(203, 196, 180, .3); border-radius: 10px; color: #A4978A; font-size: 15px; }
@media (prefers-reduced-motion: reduce) { .cb-luz { animation: none; } }

/* the sound toggle */
.som[aria-pressed="false"] { opacity: .7; }
.nv-acoes { display: flex; gap: 8px; align-items: center; }
.nv-acoes .som { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); background: rgba(5, 17, 24, .35); min-height: 48px; }
.cb-som { margin-left: auto; }

.som { width: 48px; height: 48px; min-width: 48px; padding: 0; }
.nv-titulo { min-width: 0; }
.nv-titulo h1 { overflow-wrap: anywhere; }
