:root {
    --color-bg: #08181e;
    --color-bg-soft: #0d242b;
    --color-surface: #122c33;
    --color-surface-light: #183840;
    --color-gold: #d8ac59;
    --color-gold-light: #f1d28f;
    --color-text: #f7f0df;
    --color-muted: #aabbb7;
    --color-line: rgba(224, 190, 116, 0.25);
    --font-display: Georgia, "Times New Roman", serif;
    --font-ui: Inter, "Segoe UI", Arial, sans-serif;
    --container: 1180px;
    --header-height: 76px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-ui);
    line-height: 1.5;
}

body.menu-open {
    overflow: hidden;
}

a {
    color: inherit;
}

.presence-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 5px;
    border: 1px solid rgba(207, 255, 218, 0.8);
    border-radius: 50%;
    background: #42d978;
    box-shadow: 0 0 0 3px rgba(66, 217, 120, 0.12), 0 0 8px rgba(66, 217, 120, 0.5);
    vertical-align: middle;
}

button,
input {
    font: inherit;
}

/* Comboboxes no tema náutico (em vez do fundo branco nativo). Vale para todos
   os <select> do jogo/owner; páginas específicas ainda podem sobrescrever. */
select {
    font: inherit;
    color: var(--color-text);
    background-color: var(--color-surface);
    border: 1px solid var(--color-line);
    border-radius: 8px;
    padding: 10px 38px 10px 12px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%23d8ac59' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.75 6 6.25 11 1.75'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(216, 172, 89, 0.18);
}

select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* A lista aberta (options) segue o tom escuro nos navegadores que respeitam. */
select option,
select optgroup {
    background-color: var(--color-bg-soft);
    color: var(--color-text);
}

.container {
    width: min(calc(100% - 40px), var(--container));
    margin-inline: auto;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    position: fixed;
    z-index: 20;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: linear-gradient(180deg, rgba(7, 23, 29, 0.96), rgba(7, 23, 29, 0.68));
    border-bottom: 1px solid var(--color-line);
    backdrop-filter: blur(10px);
    transition: background-color 180ms ease, box-shadow 180ms ease;
}

.site-header.is-scrolled {
    background: rgba(7, 23, 29, 0.97);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.site-header__inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand__mark {
    width: 50px;
    height: 56px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.42));
}

.brand__mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand__text strong,
.brand__text small {
    display: block;
}

.brand__text strong {
    color: #fff1cf;
    font-family: var(--font-display);
    font-size: 1.15rem;
    letter-spacing: 0.035em;
}

.brand__text small {
    margin-top: 1px;
    color: #9bb2b0;
    font-size: 0.64rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.main-nav a {
    position: relative;
    color: #d6e0dc;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-decoration: none;
}

.main-nav a:not(.main-nav__login)::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -8px;
    left: 0;
    height: 1px;
    background: var(--color-gold);
    transform: scaleX(0);
    transition: transform 160ms ease;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
    transform: scaleX(1);
}

/* Bolinha de novidades no link do Perfil: telegramas não lidos, pedidos de
   amizade e itens no inventário (ver App\Services\ProfileNoticeService). */
.main-nav__profile {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.main-nav__notice {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border: 1px solid #f5c487;
    border-radius: 999px;
    background: #a53f32;
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.48);
    color: #fff6df;
    font-size: 0.65rem;
    font-weight: 800;
    line-height: 1;
}

/* Atalho da Armada quando a conta está em mais de uma (uma por mundo) — ver
   views/partials/header_armada_link.php. É um <details>, então o estado aberto
   é do próprio HTML: nada de JS para abrir, fechar ou fechar no Esc. */
.main-nav__armadas {
    position: relative;
}

.main-nav__armadas > summary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #d6e0dc;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    list-style: none;
}

/* O triângulo padrão do <details> destoa do resto do cabeçalho; o "caret"
   abaixo acompanha a fonte e gira ao abrir. */
.main-nav__armadas > summary::-webkit-details-marker {
    display: none;
}

.main-nav__armadas > summary::after {
    content: "▾";
    color: var(--color-gold);
    font-size: 0.7rem;
    transition: transform 160ms ease;
}

.main-nav__armadas[open] > summary::after {
    transform: rotate(180deg);
}

.main-nav__armadas-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border: 1px solid rgba(241, 210, 143, 0.65);
    border-radius: 999px;
    color: var(--color-gold-light);
    font-size: 0.65rem;
    font-weight: 800;
    line-height: 1;
}

.main-nav__armadas-list {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 40;
    min-width: 250px;
    margin: 0;
    padding: 6px;
    list-style: none;
    border: 1px solid var(--color-line);
    border-radius: 6px;
    background: #071d1f;
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.45);
}

.main-nav__armadas-link {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 9px 11px;
    border-radius: 4px;
}

.main-nav__armadas-link:hover,
.main-nav__armadas-link:focus-visible {
    background: rgba(241, 210, 143, 0.1);
}

/* O sublinhado dourado do .main-nav a atravessaria a linha inteira do menu. */
.main-nav__armadas-link::after {
    content: none !important;
}

.main-nav__armadas-link strong {
    color: var(--color-gold-light);
    font-family: var(--font-display);
    font-size: 0.86rem;
    font-weight: 700;
}

.main-nav__armadas-link small {
    color: var(--color-muted);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* A do mundo em contexto: é a que o atalho abriria se fosse link direto. */
.main-nav__armadas-link.is-current {
    box-shadow: inset 2px 0 0 var(--color-gold);
}

.main-nav__login {
    padding: 9px 16px;
    border: 1px solid rgba(241, 210, 143, 0.65);
    border-radius: 4px;
    color: var(--color-gold-light) !important;
}

/* Contagem regressiva até o mundo oficial — ver views/partials/launch_countdown.php */
.launch-countdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 6px 14px;
    border: 1px solid rgba(241, 210, 143, 0.55);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(216, 172, 89, 0.16), rgba(8, 24, 29, 0.4));
    box-shadow: 0 0 0 1px rgba(241, 210, 143, 0.08) inset;
    white-space: nowrap;
}

.launch-countdown__label {
    color: var(--color-muted);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.launch-countdown__time {
    color: var(--color-gold-light);
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.launch-countdown--live .launch-countdown__time {
    color: #8fe3a2;
}

.main-nav__captain {
    color: var(--color-gold-light);
    font-family: var(--font-display);
    font-size: 0.82rem;
}

.main-nav__logout {
    margin: 0;
}

.main-nav__logout button {
    padding: 9px 16px;
    border: 1px solid rgba(241, 210, 143, 0.65);
    border-radius: 4px;
    background: transparent;
    color: var(--color-gold-light);
    cursor: pointer;
    font-size: 0.74rem;
    font-weight: 700;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 1px solid var(--color-line);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
}

.menu-toggle > span:not(.sr-only) {
    display: block;
    height: 1px;
    margin: 5px 0;
    background: var(--color-gold-light);
}

.hero {
    position: relative;
    min-height: min(760px, 92svh);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    isolation: isolate;
    overflow: hidden;
    padding: 88px 0 82px;
    background: #142d35 url("../images/landing/porto-hero.webp") center / cover no-repeat;
}

/*
 * O vídeo cobre o hero por trás do overlay. Enquanto ele não entra (celular,
 * movimento reduzido, economia de dados ou falha de rede), fica valendo a
 * imagem de fundo da .hero, que é o mesmo quadro do poster.
 */
.hero__video {
    position: absolute;
    z-index: -2;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 600ms ease;
    pointer-events: none;
}

.hero__video.is-playing {
    opacity: 1;
}

.hero__overlay {
    position: absolute;
    z-index: -1;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(5, 17, 22, 0.94) 0%, rgba(5, 17, 22, 0.77) 35%, rgba(5, 17, 22, 0.18) 70%, rgba(5, 17, 22, 0.08) 100%),
        linear-gradient(0deg, rgba(5, 17, 22, 0.82) 0%, transparent 37%, rgba(4, 14, 18, 0.18) 100%);
}

.hero__content {
    min-width: 0;
    padding-top: var(--header-height);
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--color-gold);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.19em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 760px;
    margin: 0;
    color: #fff5dc;
    font-family: var(--font-display);
    font-size: 5.5rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 0.92;
    text-shadow: 0 5px 24px rgba(0, 0, 0, 0.44);
}

.hero__lead {
    max-width: 610px;
    margin: 28px 0 0;
    color: #d0dcd7;
    font-size: clamp(1rem, 1.5vw, 1.18rem);
    line-height: 1.72;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 36px;
}

.hero__promise {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0 0;
    color: #c4d3ce;
    font-size: 0.7rem;
    letter-spacing: 0.025em;
}

.hero__promise::before {
    content: "";
    width: 28px;
    height: 1px;
    background: linear-gradient(90deg, rgba(216, 172, 89, 0.92), rgba(216, 172, 89, 0));
}

.button {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 15px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.035em;
    text-decoration: none;
    transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

/* Iconografia vetorial compartilhada pelos comandos de ação. */
.action-icon,
.ui-icon,
.info-icon {
    width: 1.2em;
    height: 1.2em;
    flex: 0 0 auto;
    display: inline-block;
    vertical-align: -0.16em;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Ícones ilustrados canônicos para ações recorrentes fora do cabeçalho. */
.game-icon {
    display: block;
    width: 1.6em;
    height: 1.6em;
    flex: 0 0 auto;
    object-fit: contain;
    filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.34));
}

.button__game-icon {
    width: 24px;
    height: 24px;
    margin: -3px 1px -3px -3px;
}

.inline-game-icon {
    display: inline-block;
    width: 22px;
    height: 22px;
    margin-right: 5px;
    vertical-align: -6px;
}

.semantic-link-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 4px;
    object-fit: contain;
    vertical-align: -5px;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

img.ui-icon {
    border-radius: 0.22em;
    object-fit: cover;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.34);
}

.button:hover,
.button:focus-visible {
    transform: translateY(-2px);
}

.button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
    box-shadow: none;
    filter: grayscale(0.3);
}

.button:disabled:hover,
.button:disabled:focus-visible {
    transform: none;
}

.button--primary {
    background: linear-gradient(180deg, rgba(18, 58, 65, 0.96), rgba(7, 31, 38, 0.98));
    border-color: rgba(226, 188, 112, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 239, 194, 0.08), 0 5px 14px rgba(0, 0, 0, 0.2);
    color: #f3db9f;
}

.button--primary:hover,
.button--primary:focus-visible {
    border-color: #f1d28f;
    background: linear-gradient(180deg, rgba(25, 73, 80, 0.98), rgba(9, 38, 45, 0.99));
    color: #fff0c8;
}

.button--secondary {
    background: rgba(8, 28, 34, 0.62);
    border-color: rgba(241, 210, 143, 0.62);
    color: #f5e6c1;
    backdrop-filter: blur(8px);
}

.button--hero-primary,
.button--hero-secondary {
    min-height: 48px;
    padding: 13px 22px;
    font-size: 0.82rem;
}

.button--hero-primary {
    position: relative;
    overflow: hidden;
    border-color: rgba(250, 217, 142, 0.92);
    background:
        linear-gradient(180deg, rgba(248, 210, 129, 0.2), rgba(203, 139, 54, 0.14)),
        linear-gradient(180deg, rgba(23, 73, 78, 0.98), rgba(8, 34, 41, 1));
    box-shadow:
        inset 0 1px 0 rgba(255, 243, 205, 0.22),
        0 12px 26px rgba(0, 0, 0, 0.34),
        0 0 0 4px rgba(216, 172, 89, 0.08),
        0 0 28px rgba(216, 172, 89, 0.16);
    color: #fff1c3;
}

.button--hero-primary::after {
    content: "";
    position: absolute;
    inset: 1px auto 1px -42%;
    width: 36%;
    background: linear-gradient(90deg, transparent, rgba(255, 245, 213, 0.18), transparent);
    transform: skewX(-18deg);
    transition: left 220ms ease;
}

.button--hero-primary:hover,
.button--hero-primary:focus-visible {
    border-color: #ffe1a0;
    background:
        linear-gradient(180deg, rgba(255, 225, 160, 0.25), rgba(216, 158, 70, 0.17)),
        linear-gradient(180deg, rgba(28, 86, 91, 0.99), rgba(10, 42, 49, 1));
    box-shadow:
        inset 0 1px 0 rgba(255, 249, 226, 0.26),
        0 16px 30px rgba(0, 0, 0, 0.38),
        0 0 0 4px rgba(216, 172, 89, 0.12),
        0 0 34px rgba(216, 172, 89, 0.22);
}

.button--hero-primary:hover::after,
.button--hero-primary:focus-visible::after {
    left: 112%;
}

.button--hero-secondary {
    border-color: rgba(241, 210, 143, 0.34);
    background: rgba(6, 24, 30, 0.44);
    color: #e8d7ae;
    box-shadow: inset 0 1px 0 rgba(255, 244, 207, 0.06);
}

.button--hero-secondary:hover,
.button--hero-secondary:focus-visible {
    border-color: rgba(241, 210, 143, 0.72);
    background: rgba(10, 38, 45, 0.7);
    color: #fff0c8;
}

.button--quiet {
    background: linear-gradient(180deg, rgba(10, 42, 49, 0.84), rgba(5, 24, 31, 0.9));
    border-color: rgba(216, 172, 89, 0.42);
    box-shadow: inset 0 1px 0 rgba(255, 244, 207, 0.08), 0 6px 14px rgba(0, 0, 0, 0.18);
    color: #ead39c;
    backdrop-filter: blur(8px);
}

.button--quiet:hover,
.button--quiet:focus-visible {
    border-color: rgba(241, 210, 143, 0.68);
    background: linear-gradient(180deg, rgba(14, 57, 65, 0.9), rgba(7, 31, 38, 0.94));
    color: #f5e6c1;
}

.button--compact {
    min-width: 0;
    padding: 8px 13px;
    font-size: 0.74rem;
    letter-spacing: 0.02em;
}

.button--compact.button--primary {
    box-shadow: inset 0 1px 0 rgba(255, 239, 194, 0.07), 0 4px 11px rgba(0, 0, 0, 0.18);
}

/* Botão "Continuar com o Google" (ver views/partials/google_signin_button.php)
   — mesma família visual de .button--secondary, só com o "G" oficial do
   Google (colorido, nunca recolorido) no lugar do ícone do jogo. */
.button--google {
    width: 100%;
}

.button__google-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.hero__status {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 22px;
    color: #9fb3af;
    font-size: 0.73rem;
}

.hero__features {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}

.hero__features li {
    display: flex;
    align-items: baseline;
    gap: 8px;
    color: #bdccc7;
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.5;
}

.hero__features li::before {
    content: "";
    width: 4px;
    height: 4px;
    flex: 0 0 4px;
    align-self: center;
    background: var(--color-gold);
}

.hero__status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d8ac59;
    box-shadow: 0 0 0 5px rgba(216, 172, 89, 0.12);
}

.hero__scroll {
    position: absolute;
    bottom: 24px;
    left: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #b5c6c1;
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-decoration: none;
    text-transform: uppercase;
    transform: translateX(-50%);
}

.landing-start {
    padding: 56px 0;
    border-block: 1px solid var(--color-line);
    background: #102b32;
}

.landing-start h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    line-height: 1.2;
    letter-spacing: 0;
    color: var(--color-gold-light);
}

.landing-start p {
    max-width: 620px;
    line-height: 1.6;
}

.landing-start .button {
    margin-top: 12px;
    max-width: 100%;
    white-space: normal;
    min-height: 48px;
}

.landing-start__login {
    display: inline-block;
    margin: 20px;
    color: var(--color-gold-light);
}

.first-session {
    padding: 90px 0;
    border-top: 1px solid var(--color-line);
    background:
        radial-gradient(circle at 12% 30%, rgba(48, 95, 96, 0.17), transparent 38%),
        #091b21;
}

.first-session__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
    align-items: center;
    gap: 58px;
}

.first-session__scene {
    position: relative;
    overflow: hidden;
    margin: 0;
    border: 1px solid rgba(216, 172, 89, 0.28);
    border-radius: 10px;
    background: #102f37;
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.28);
}

.first-session__scene::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 58%, rgba(4, 18, 23, 0.82));
    pointer-events: none;
}

.first-session__scene img {
    width: 100%;
    height: auto;
    min-height: 370px;
    display: block;
    object-fit: cover;
}

.first-session__scene figcaption {
    position: absolute;
    z-index: 1;
    right: 18px;
    bottom: 15px;
    left: 18px;
    color: #e8d7ae;
    font-size: 0.72rem;
}

.first-session__copy h2 {
    margin: 0;
    color: #fff1cf;
    font-family: var(--font-display);
    font-size: clamp(2.1rem, 4vw, 3.7rem);
    line-height: 1.02;
}

.first-session__copy > p:not(.eyebrow) {
    margin: 18px 0 0;
    color: var(--color-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

.first-session__steps {
    display: grid;
    gap: 8px;
    margin: 26px 0 0;
    padding: 0;
    list-style: none;
}

.first-session__steps li {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px 14px;
    border: 1px solid rgba(216, 172, 89, 0.15);
    border-radius: 6px;
    background: rgba(13, 43, 50, 0.66);
}

.first-session__steps li > span {
    color: var(--color-gold);
    font-family: var(--font-display);
    font-size: 0.78rem;
}

.first-session__steps strong,
.first-session__steps small {
    display: block;
}

.first-session__steps strong {
    color: #eddfbc;
    font-size: 0.8rem;
}

.first-session__steps small {
    margin-top: 2px;
    color: #8fa7a1;
    font-size: 0.68rem;
}

.feature-section {
    padding: 92px 0 100px;
    background: #0b1d23;
    border-top: 1px solid var(--color-line);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

.first-session,
.feature-section,
.news-section,
.world-section {
    scroll-margin-top: calc(var(--header-height) + 16px);
}

.feature-card {
    min-height: 245px;
    padding: 24px;
    border: 1px solid rgba(214, 182, 112, 0.17);
    border-radius: 6px;
    background: linear-gradient(160deg, rgba(24, 56, 64, 0.88), rgba(8, 26, 32, 0.92));
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
}

.feature-card__mark {
    display: inline-grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid rgba(241, 210, 143, 0.48);
    border-radius: 50%;
    color: var(--color-gold-light);
    font-family: var(--font-display);
    font-size: 0.88rem;
}

.feature-card h3 {
    margin: 28px 0 12px;
    color: #f9edce;
    font-family: var(--font-display);
    font-size: 1.35rem;
    line-height: 1.14;
}

.feature-card p {
    margin: 0;
    color: #aebfba;
    font-size: 0.82rem;
    line-height: 1.68;
}

.news-section {
    padding: 100px 0 110px;
    background:
        radial-gradient(circle at 80% 10%, rgba(46, 91, 93, 0.19), transparent 35%),
        var(--color-bg-soft);
    border-top: 1px solid var(--color-line);
}

.section-heading {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    align-items: end;
    gap: 70px;
    margin-bottom: 40px;
}

.section-heading h2,
.world-section h2 {
    margin: 0;
    color: #fff1cf;
    font-family: var(--font-display);
    font-size: clamp(2.1rem, 4vw, 3.7rem);
    line-height: 1.02;
}

.section-heading > p,
.world-section__content > p {
    margin: 0;
    color: var(--color-muted);
    font-size: 0.92rem;
    line-height: 1.75;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.news-empty {
    padding: 34px;
    border: 1px solid rgba(214, 182, 112, 0.2);
    border-radius: 6px;
    background: rgba(14, 42, 49, 0.72);
    text-align: center;
}

.news-empty strong {
    color: var(--color-gold-light);
    font-family: var(--font-display);
    font-size: 1.35rem;
}

.news-empty p {
    margin: 7px 0 0;
    color: var(--color-muted);
    font-size: 0.82rem;
}

.news-card {
    min-height: 285px;
    display: flex;
    flex-direction: column;
    padding: 26px;
    border: 1px solid rgba(214, 182, 112, 0.17);
    border-radius: 6px;
    background: linear-gradient(145deg, rgba(25, 57, 64, 0.86), rgba(12, 37, 44, 0.92));
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.14);
    transition: transform 180ms ease, border-color 180ms ease;
}

.news-card:hover {
    border-color: rgba(216, 172, 89, 0.48);
    transform: translateY(-4px);
}

.news-card__meta {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: #829b96;
    font-size: 0.65rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.news-card__meta span {
    color: var(--color-gold);
}

.news-card h3 {
    margin: 28px 0 13px;
    color: #f9edce;
    font-family: var(--font-display);
    font-size: 1.45rem;
    line-height: 1.15;
}

.news-card p {
    margin: 0;
    color: #aebfba;
    font-size: 0.81rem;
    line-height: 1.7;
}

.news-card__link {
    margin-top: auto;
    padding-top: 20px;
    color: #d6b874;
    font-size: 0.71rem;
    font-weight: 700;
}

.world-section {
    padding: 90px 0;
    background: #091b21;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.world-section__content {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 90px;
}

.site-footer {
    padding: 28px 0;
    background: #061419;
    border-top: 1px solid var(--color-line);
}

.site-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand--footer .brand__mark {
    width: 40px;
    height: 44px;
}

.site-footer p {
    margin: 0;
    color: #728985;
    font-size: 0.7rem;
}

/* Links do rodapé (Fórum, Área do Desenvolvedor). */
.site-footer__links {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border: 1px solid var(--color-line);
    border-radius: 999px;
    background: rgba(216, 172, 89, 0.06);
    color: var(--color-gold-light);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition: border-color 140ms ease, background 140ms ease, color 140ms ease, transform 140ms ease;
}

.footer-link svg {
    width: 16px;
    height: 16px;
    color: var(--color-gold);
    transition: color 140ms ease;
}

.footer-link:hover,
.footer-link:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(216, 172, 89, 0.7);
    background: rgba(216, 172, 89, 0.14);
    color: #fff0cb;
    outline: none;
}

.footer-link:hover svg,
.footer-link:focus-visible svg {
    color: var(--color-gold-light);
}

.footer-link.is-current {
    border-color: rgba(216, 172, 89, 0.7);
    background: rgba(216, 172, 89, 0.14);
    color: #fff0cb;
}

/* Area do Desenvolvedor ------------------------------------------------ */
.developer-page {
    background: #06171d;
}

.developer-main {
    min-height: 100svh;
    padding-top: var(--header-height);
    background:
        linear-gradient(180deg, rgba(5, 20, 25, 0.7), #06171d 520px),
        url("../images/port/scene.png?v=20260725-roads") center top / cover no-repeat;
}

.developer-hero {
    padding: clamp(46px, 8vw, 86px) 0 34px;
}

.developer-hero__inner {
    max-width: 860px;
}

.developer-hero h1 {
    margin: 6px 0 0;
    color: #fff0cb;
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 6vw, 5.4rem);
    line-height: 0.95;
}

.developer-hero p:not(.eyebrow) {
    max-width: 620px;
    margin: 16px 0 0;
    color: #c3d3cf;
    font-size: clamp(0.98rem, 2vw, 1.12rem);
    line-height: 1.55;
}

.developer-board {
    padding-bottom: 74px;
}

.developer-timeline {
    display: grid;
    gap: 14px;
}

.developer-update {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 18px;
    padding: 18px;
    border: 1px solid rgba(216, 172, 89, 0.26);
    border-radius: 8px;
    background: rgba(8, 30, 37, 0.92);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.developer-update__stamp {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.developer-update__stamp span {
    color: #f1d28f;
    font-family: var(--font-display);
    font-size: 1.35rem;
}

.developer-update__stamp time {
    color: #7f9994;
    font-size: 0.72rem;
    font-weight: 800;
}

.developer-update__body h2 {
    margin: 0;
    color: #fff0cb;
    font-family: var(--font-display);
    font-size: 1.45rem;
}

.developer-update__body p {
    margin: 10px 0 0;
    color: #dbe8e4;
    font-size: 0.9rem;
    line-height: 1.55;
}

.developer-update__summary {
    color: #f0d490 !important;
    font-weight: 700;
}

/* Corpo da nota: fica recolhido para a lista não virar uma parede de texto, e
   abre quando o jogador clica. */
.developer-update__more {
    margin-top: 12px;
}

.developer-update__more summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-gold-light);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 700;
}

.developer-update__more summary:hover,
.developer-update__more summary:focus-visible {
    color: #fff0cb;
}

.developer-update__more[open] summary {
    margin-bottom: 2px;
}

.developer-empty {
    padding: 28px;
    border: 1px dashed rgba(216, 172, 89, 0.36);
    border-radius: 8px;
    background: rgba(8, 30, 37, 0.72);
    text-align: center;
}

.developer-empty strong {
    color: #fff0cb;
}

.developer-empty p {
    margin: 8px 0 0;
    color: #9fb3ae;
}

@media (max-width: 720px) {
    .developer-update {
        grid-template-columns: 1fr;
    }
}

.toast {
    position: fixed;
    z-index: 50;
    right: 22px;
    bottom: 22px;
    width: min(360px, calc(100% - 44px));
    padding: 16px 18px;
    border: 1px solid rgba(241, 210, 143, 0.55);
    border-radius: 5px;
    background: rgba(10, 31, 37, 0.97);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.36);
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px);
    transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.toast strong,
.toast span {
    display: block;
}

/* Aviso de sessão expirada (assets/js/main.js): tem um botão para voltar ao
   login, então precisa receber clique — o toast comum é só decorativo. */
.toast--session {
    z-index: 120;
    pointer-events: auto;
}

.toast--session .button {
    display: block;
    margin-top: 12px;
    text-align: center;
}

.toast strong {
    color: var(--color-gold-light);
    font-family: var(--font-display);
}

.toast span {
    margin-top: 4px;
    color: #aabcb7;
    font-size: 0.75rem;
}

/* Toast naval compartilhado por avisos do porto e recompensas. A base escura
   mantém o conteúdo legível sem parecer um modal ou cobrir a ação atual. */
.naval-toast-stack {
    position: fixed;
    z-index: 12020;
    top: calc(var(--header-height) + 14px);
    right: 18px;
    width: min(360px, calc(100vw - 32px));
    display: grid;
    gap: 10px;
    pointer-events: none;
}

.naval-toast {
    --naval-toast-accent: #d8b56a;
    --naval-toast-accent-soft: rgba(216, 181, 106, 0.13);
    --naval-toast-accent-line: rgba(216, 181, 106, 0.46);
    position: relative;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 24px;
    gap: 11px;
    align-items: start;
    overflow: hidden;
    padding: 13px 11px 14px 13px;
    border: 1px solid var(--naval-toast-accent-line);
    border-radius: 12px;
    background:
        radial-gradient(circle at 0 0, var(--naval-toast-accent-soft), transparent 42%),
        linear-gradient(145deg, rgba(16, 48, 56, 0.98), rgba(6, 24, 30, 0.985));
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 246, 218, 0.06);
    color: #e7efec;
    opacity: 0;
    pointer-events: auto;
    transform: translateX(24px) scale(0.985);
    transition: opacity 220ms ease, transform 220ms ease;
}

.naval-toast::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--naval-toast-accent);
    box-shadow: 0 0 14px var(--naval-toast-accent-soft);
}

.naval-toast--success {
    --naval-toast-accent: #74c79a;
    --naval-toast-accent-soft: rgba(116, 199, 154, 0.13);
    --naval-toast-accent-line: rgba(116, 199, 154, 0.46);
}

.naval-toast--error {
    --naval-toast-accent: #e48272;
    --naval-toast-accent-soft: rgba(228, 130, 114, 0.13);
    --naval-toast-accent-line: rgba(228, 130, 114, 0.46);
}

.naval-toast--reward {
    --naval-toast-accent: #e0b85f;
    --naval-toast-accent-soft: rgba(224, 184, 95, 0.14);
    --naval-toast-accent-line: rgba(224, 184, 95, 0.5);
}

.naval-toast.is-visible {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.naval-toast.is-leaving {
    opacity: 0;
    transform: translateX(18px) scale(0.985);
}

.naval-toast__icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid var(--naval-toast-accent-line);
    border-radius: 10px;
    background: var(--naval-toast-accent-soft);
    color: var(--naval-toast-accent);
}

.naval-toast__icon .ui-icon {
    width: 18px;
    height: 18px;
}

.naval-toast__content {
    min-width: 0;
}

.naval-toast__title,
.naval-toast__text {
    display: block;
}

.naval-toast__title {
    color: #fff0c9;
    font-family: var(--font-display);
    font-size: 0.98rem;
    line-height: 1.2;
}

.naval-toast__text {
    margin-top: 4px;
    color: #b8cbc6;
    font-size: 0.76rem;
    line-height: 1.45;
}

.naval-toast__text--resources {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    font-variant-numeric: tabular-nums;
}

.naval-toast__res-lead {
    width: 100%;
    color: #b8cbc6;
}

.naval-toast__res-entry {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #f4d98c;
    font-weight: 700;
}

.naval-toast__res-icon {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    object-fit: contain;
}

.naval-toast__close {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #7f9994;
    cursor: pointer;
}

.naval-toast__close:hover,
.naval-toast__close:focus-visible {
    background: rgba(255, 255, 255, 0.06);
    color: #f2d89b;
    outline: none;
}

.naval-toast__close .ui-icon {
    width: 14px;
    height: 14px;
}

.naval-toast__progress {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--naval-toast-accent-soft);
}

.naval-toast__progress::after {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    background: var(--naval-toast-accent);
    transform-origin: left;
    animation: naval-toast-life var(--naval-toast-duration, 5200ms) linear forwards;
}

.naval-toast.is-paused .naval-toast__progress::after {
    animation-play-state: paused;
}

@keyframes naval-toast-life {
    to { transform: scaleX(0); }
}

@media (max-width: 600px) {
    .naval-toast-stack {
        right: 10px;
        left: 10px;
        width: auto;
    }
}

@media (max-width: 980px) {
    :root {
        --header-height: 68px;
    }

    .menu-toggle {
        display: block;
    }

    .main-nav {
        position: fixed;
        top: var(--header-height);
        right: 0;
        /* Altura explícita em vez de bottom:0. O `backdrop-filter` do header o
           torna o containing block deste nav fixo; com bottom:0 a caixa colapsava
           (altura ~0) e o fundo não pintava, deixando o menu "transparente".
           dvh evita a sobra da barra do navegador no celular. */
        height: calc(100vh - var(--header-height));
        height: calc(100dvh - var(--header-height));
        width: min(320px, 85vw);
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 25px;
        overflow-y: auto;
        background: #071d1f;
        border-left: 1px solid var(--color-line);
        box-shadow: -16px 0 35px rgba(0, 0, 0, 0.45);
        /* Fechado, o menu não participa do foco nem ocupa espaço fora da tela. */
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        transition: opacity 200ms ease, visibility 200ms ease;
    }

    .main-nav.is-open {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }

    body.menu-open .chat-dock,
    body.menu-open .rewards-dock {
        visibility: hidden;
    }

    .main-nav a {
        padding: 15px 4px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    /* Menu em coluna: a bolinha vai para a ponta direita da linha. */
    .main-nav__notice {
        margin-left: auto;
    }

    /* No menu-gaveta a lista não flutua: um dropdown absoluto vazaria os 320px
       da gaveta. Ela abre no lugar, empurrando os itens de baixo. */
    .main-nav__armadas > summary {
        padding: 15px 4px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .main-nav__armadas > summary::after {
        margin-left: auto;
    }

    .main-nav__armadas-list {
        position: static;
        min-width: 0;
        padding: 6px 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .main-nav__armadas-link {
        padding: 10px 12px;
        border-bottom: 0;
    }

    .main-nav__login {
        margin-top: 18px;
        text-align: center;
    }

    .launch-countdown {
        align-self: stretch;
        margin-bottom: 10px;
    }

    .main-nav__captain {
        padding: 15px 4px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .main-nav__logout {
        margin-top: 18px;
    }

    .main-nav__logout button {
        width: 100%;
    }

    .hero {
        min-height: auto;
        padding: 104px 0 78px;
        background-position: 61% center;
    }

    .hero__overlay {
        background: linear-gradient(90deg, rgba(5, 17, 22, 0.94), rgba(5, 17, 22, 0.62));
    }

    .section-heading,
    .world-section__content,
    .first-session__layout {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-card {
        min-height: 240px;
    }
}

@media (max-width: 520px) {
    .hero {
        min-height: 0;
        padding: 28px 0 32px;
    }

    .container {
        width: min(calc(100% - 28px), var(--container));
    }

    .brand__text small {
        display: none;
    }

    .hero h1 {
        font-size: 3rem;
        line-height: 0.98;
    }

    .hero__lead {
        font-size: 0.94rem;
    }

    .hero__actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .hero__features {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px 16px;
    }

    .hero__features li {
        font-size: 0.75rem;
    }

    .hero__status {
        display: none;
    }

    .button {
        width: 100%;
    }

    .hero__scroll {
        display: none;
    }

    .feature-section,
    .news-section,
    .first-session {
        padding: 75px 0;
    }

    .first-session__scene img {
        min-height: 250px;
    }

    .first-session__copy h2,
    .section-heading h2,
    .world-section h2 {
        font-size: 2rem;
        line-height: 1.2;
        letter-spacing: 0;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .site-footer__inner {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }

    .naval-toast__progress::after {
        animation: none;
    }
}

/* Diálogo naval padrão ----------------------------------------------------
 * Substitui as caixas nativas do navegador por uma ordem em pergaminho.
 * O <dialog> mantém foco, teclado e leitura por tecnologias assistivas. */
.naval-dialog {
    width: min(540px, calc(100vw - 32px));
    max-width: none;
    padding: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    color: #302519;
}

.naval-dialog::backdrop {
    background:
        radial-gradient(circle at center, rgba(18, 47, 54, 0.42), rgba(2, 10, 14, 0.88)),
        rgba(2, 10, 14, 0.78);
    backdrop-filter: blur(4px);
}

.naval-dialog__paper {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    padding: 54px 54px 38px;
    overflow: hidden;
    border: 1px solid #c69b54;
    border-radius: 8px 8px 18px 18px;
    background:
        linear-gradient(90deg, rgba(93, 59, 24, 0.12), transparent 11%, transparent 89%, rgba(93, 59, 24, 0.14)),
        repeating-linear-gradient(0deg, rgba(96, 65, 30, 0.035) 0, rgba(96, 65, 30, 0.035) 1px, transparent 1px, transparent 6px),
        linear-gradient(145deg, #f0dfb5, #ddc38d 58%, #ead4a5);
    box-shadow:
        0 28px 70px rgba(0, 0, 0, 0.64),
        inset 0 0 42px rgba(96, 55, 20, 0.2);
    isolation: isolate;
}

.naval-dialog__paper::before,
.naval-dialog__paper::after {
    content: "";
    position: absolute;
    z-index: -1;
    left: 24px;
    right: 24px;
    height: 18px;
    border: 1px solid #c49750;
    border-radius: 50%;
    background: linear-gradient(180deg, #ead5a7, #b88745);
    box-shadow: 0 4px 9px rgba(53, 31, 12, 0.3);
}

.naval-dialog__paper::before {
    top: -8px;
}

.naval-dialog__paper::after {
    bottom: -9px;
    transform: rotate(180deg);
}

.naval-dialog__cord {
    position: absolute;
    left: 50%;
    width: 110px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #98713b 24%, #98713b 76%, transparent);
    transform: translateX(-50%);
}

.naval-dialog__cord--top {
    top: 28px;
}

.naval-dialog__cord--bottom {
    bottom: 25px;
}

.naval-dialog__seal {
    position: absolute;
    top: 18px;
    right: 24px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(85, 185, 173, 0.74);
    border-radius: 50%;
    background: rgba(19, 56, 61, 0.16);
    box-shadow: 0 4px 10px rgba(22, 61, 67, 0.18);
    color: #1d6f73;
}

.naval-dialog__seal .info-icon {
    width: 28px;
    height: 28px;
    stroke-width: 1.85;
}

.naval-dialog__eyebrow {
    margin: 0 0 7px;
    color: #76532b;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.naval-dialog__title {
    margin: 0;
    color: #213c3d;
    font-family: var(--font-display);
    font-size: clamp(1.55rem, 4vw, 2rem);
}

.naval-dialog__message {
    margin: 18px 0 28px;
    color: #493a28;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.02rem;
    line-height: 1.65;
}

.naval-dialog__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.naval-dialog__button {
    min-width: 116px;
    padding: 10px 18px;
    border: 1px solid #806038;
    border-radius: 5px;
    font: 800 0.74rem/1 var(--font-body);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.naval-dialog__button:hover,
.naval-dialog__button:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 5px 12px rgba(61, 39, 19, 0.24);
}

.naval-dialog__button--reject {
    background: rgba(255, 247, 222, 0.46);
    color: #62472c;
}

.naval-dialog__button--accept {
    border-color: #173e43;
    background: linear-gradient(180deg, #28565b, #14383d);
    color: #f2d89d;
}

body:has(.naval-dialog[open]) {
    overflow: hidden;
}

@media (max-width: 520px) {
    .naval-dialog__paper {
        padding: 50px 28px 34px;
    }

    .naval-dialog__actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .naval-dialog__button {
        min-width: 0;
    }
}
