:root {
    --ink: #102033;
    --deep: #071522;
    --navy: #0d2639;
    --ocean: #0b5d75;
    --ocean-light: #31a6b8;
    --cream: #fff5dc;
    --paper: #f6e6bd;
    --gold: #f2b84b;
    --gold-dark: #b87319;
    --coral: #e9654b;
    --white: #fffdf7;
    --muted: #6d7b87;
    --success: #3c9b72;
    --danger: #b53e3e;
    --border: rgba(16, 32, 51, 0.16);
    --shadow: 0 24px 70px rgba(3, 17, 29, 0.24);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--cream);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--deep);
}

body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 15% 20%, rgba(242, 184, 75, 0.17), transparent 30rem),
        linear-gradient(135deg, #fff8e6 0%, #f4dfac 100%);
}

button,
input {
    font: inherit;
}

a {
    color: inherit;
}

.site-noise {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.08;
    background-image:
        repeating-linear-gradient(0deg, transparent 0 3px, rgba(7, 21, 34, 0.25) 4px),
        repeating-linear-gradient(90deg, transparent 0 7px, rgba(255, 255, 255, 0.3) 8px);
    mix-blend-mode: multiply;
}

.site-header {
    position: relative;
    z-index: 10;
    width: min(1180px, calc(100% - 40px));
    min-height: 86px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 4px 4px 0 var(--ink);
    font-size: 24px;
}

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

.brand strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.brand small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-nav form {
    margin: 0;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 14px;
    border: 0;
    background: transparent;
    color: var(--ink);
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.nav-link:hover {
    color: var(--ocean);
}

.nav-button {
    appearance: none;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 22px;
    border: 2px solid var(--ink);
    border-radius: 10px;
    color: var(--ink);
    background: var(--white);
    box-shadow: 4px 5px 0 var(--ink);
    font-weight: 900;
    text-decoration: none;
    transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
    cursor: pointer;
}

.button:hover:not(:disabled) {
    transform: translate(2px, 2px);
    box-shadow: 2px 3px 0 var(--ink);
    filter: brightness(1.03);
}

.button:focus-visible,
.nav-link:focus-visible,
input:focus-visible,
.menu-item:focus-visible {
    outline: 3px solid rgba(49, 166, 184, 0.45);
    outline-offset: 3px;
}

.button:disabled {
    cursor: not-allowed;
    opacity: 0.58;
    box-shadow: none;
}

.button-primary {
    background: linear-gradient(180deg, #ffd36d, var(--gold));
}

.button-ghost {
    background: rgba(255, 253, 247, 0.62);
}

.button-small {
    min-height: 42px;
    padding-inline: 15px;
    box-shadow: 3px 4px 0 var(--ink);
    font-size: 14px;
}

.button-full {
    width: 100%;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--coral);
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-shell {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 40px));
    min-height: calc(100vh - 106px);
    margin: 0 auto;
    padding: 54px 0 80px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, 0.86fr);
    align-items: center;
    gap: 70px;
}

.hero-copy h1 {
    max-width: 760px;
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(54px, 7vw, 92px);
    line-height: 0.92;
    letter-spacing: -0.045em;
}

.hero-copy h1 span {
    color: var(--ocean);
}

.hero-lead {
    max-width: 650px;
    margin: 28px 0 0;
    color: #425363;
    font-size: clamp(17px, 2vw, 21px);
    line-height: 1.7;
}

.hero-actions {
    margin-top: 34px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.feature-row {
    margin-top: 42px;
    display: flex;
    gap: 34px;
}

.feature-row div {
    min-width: 110px;
}

.feature-row strong,
.feature-row span {
    display: block;
}

.feature-row strong {
    font-family: Georgia, "Times New Roman", serif;
    color: var(--ocean);
    font-size: 28px;
}

.feature-row span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-art {
    position: relative;
    min-height: 540px;
    overflow: hidden;
    border: 3px solid var(--ink);
    border-radius: 38% 62% 46% 54% / 46% 38% 62% 54%;
    background:
        linear-gradient(180deg, #84d0d4 0 44%, #2c92a9 44% 64%, #0c506a 64% 100%);
    box-shadow: 14px 16px 0 var(--ink), var(--shadow);
}

.sun-disc {
    position: absolute;
    top: 70px;
    right: 70px;
    width: 160px;
    height: 160px;
    border: 4px solid rgba(16, 32, 51, 0.18);
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 18px rgba(255, 243, 200, 0.2);
}

.ocean-line {
    position: absolute;
    right: -5%;
    left: -5%;
    height: 18px;
    border-radius: 50%;
    border-top: 5px solid rgba(255, 255, 255, 0.45);
}

.ocean-line-one {
    top: 62%;
    transform: rotate(-2deg);
}

.ocean-line-two {
    top: 72%;
    transform: rotate(3deg);
}

.ship {
    position: absolute;
    top: 132px;
    left: 52px;
    width: 330px;
    height: 300px;
    filter: drop-shadow(10px 12px 0 rgba(7, 21, 34, 0.2));
}

.ship-mast {
    position: absolute;
    top: 22px;
    left: 157px;
    width: 10px;
    height: 214px;
    background: #57361d;
    border: 3px solid var(--ink);
}

.ship-flag {
    position: absolute;
    z-index: 3;
    top: 0;
    left: 167px;
    width: 85px;
    height: 55px;
    display: grid;
    place-items: center;
    clip-path: polygon(0 0, 100% 15%, 72% 52%, 100% 90%, 0 78%);
    background: var(--coral);
    color: var(--white);
    font-size: 25px;
}

.ship-sail {
    position: absolute;
    z-index: 2;
    border: 3px solid var(--ink);
    background: #fff3cf;
}

.ship-sail-main {
    top: 58px;
    left: 60px;
    width: 99px;
    height: 150px;
    clip-path: polygon(100% 0, 100% 100%, 0 76%);
}

.ship-sail-small {
    top: 74px;
    left: 168px;
    width: 85px;
    height: 125px;
    clip-path: polygon(0 0, 100% 72%, 0 100%);
    background: #f5c85d;
}

.ship-hull {
    position: absolute;
    top: 205px;
    left: 30px;
    width: 265px;
    height: 75px;
    border: 4px solid var(--ink);
    border-radius: 8px 8px 90px 90px;
    background: #9a4d2d;
    transform: skewX(-6deg);
}

.art-badge {
    position: absolute;
    right: 24px;
    bottom: 28px;
    padding: 14px 18px;
    border: 2px solid var(--ink);
    border-radius: 10px;
    background: rgba(255, 253, 247, 0.9);
    box-shadow: 4px 5px 0 var(--ink);
}

.art-badge span,
.art-badge strong {
    display: block;
}

.art-badge span {
    color: var(--coral);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.art-badge strong {
    margin-top: 3px;
}

.auth-page {
    background:
        radial-gradient(circle at 15% 10%, rgba(242, 184, 75, 0.22), transparent 28rem),
        linear-gradient(145deg, #0a2434 0%, #0b596c 58%, #082536 100%);
    color: var(--white);
}

.auth-page .site-noise {
    opacity: 0.12;
    mix-blend-mode: screen;
}

.auth-page .brand,
.auth-page .nav-link {
    color: var(--white);
}

.auth-page .brand small {
    color: #b9d4d9;
}

.auth-shell {
    position: relative;
    z-index: 1;
    width: min(1050px, calc(100% - 40px));
    min-height: calc(100vh - 106px);
    margin: 0 auto;
    padding: 48px 0 80px;
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    align-items: center;
    gap: 80px;
}

.auth-story h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(48px, 6vw, 76px);
    line-height: 0.95;
}

.auth-story > p:last-of-type {
    max-width: 420px;
    color: #d1e1e2;
    font-size: 18px;
    line-height: 1.7;
}

.compass {
    width: 170px;
    height: 170px;
    margin-top: 32px;
    display: grid;
    place-items: center;
    border: 3px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    box-shadow:
        inset 0 0 0 14px rgba(255, 255, 255, 0.06),
        inset 0 0 0 28px rgba(242, 184, 75, 0.13);
    transform: rotate(10deg);
}

.compass::before,
.compass::after {
    position: absolute;
    content: "";
    width: 210px;
    height: 2px;
    background: rgba(255, 255, 255, 0.25);
}

.compass::after {
    transform: rotate(90deg);
}

.compass span {
    font-size: 54px;
    color: var(--gold);
}

.auth-card {
    padding: clamp(28px, 5vw, 52px);
    border: 3px solid var(--ink);
    border-radius: 22px;
    background: var(--white);
    color: var(--ink);
    box-shadow: 12px 14px 0 rgba(4, 17, 27, 0.8), var(--shadow);
}

.auth-kicker {
    margin: 0 0 6px;
    color: var(--coral);
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.auth-card h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 42px;
}

.auth-subtitle {
    margin: 9px 0 26px;
    color: var(--muted);
    line-height: 1.6;
}

.auth-form {
    display: grid;
    gap: 18px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-field {
    display: grid;
    gap: 7px;
}

.form-field label {
    font-size: 13px;
    font-weight: 900;
}

.form-field input {
    width: 100%;
    height: 50px;
    padding: 0 14px;
    border: 2px solid #c8c2b2;
    border-radius: 9px;
    background: #fffefa;
    color: var(--ink);
}

.form-field input:focus {
    border-color: var(--ocean-light);
}

.form-error {
    margin: 0;
    color: var(--danger);
    font-size: 12px;
    font-weight: 800;
}

.checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    width: fit-content;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.checkbox-row input {
    width: 17px;
    height: 17px;
    accent-color: var(--ocean);
}

.auth-switch {
    margin: 24px 0 0;
    color: var(--muted);
    text-align: center;
}

.auth-switch a {
    color: var(--ocean);
    font-weight: 900;
}


.game-page {
    min-width: 320px;
    background: #082335;
    color: var(--white);
}

.game-page .site-header {
    display: none;
}

.game-page main {
    min-height: 100vh;
}

.harbor-lobby {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    isolation: isolate;
    background:
        linear-gradient(180deg, #5fd3dc 0%, #9ce9df 32%, #3ba7b9 55%, #0a627e 100%);
}

.harbor-lobby::before {
    position: absolute;
    inset: 0;
    z-index: -5;
    content: "";
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 16%, rgba(255, 239, 161, 0.72), transparent 18rem),
        linear-gradient(180deg, transparent 0 54%, rgba(2, 50, 72, 0.28) 54% 100%);
}

.harbor-topbar {
    position: absolute;
    top: 18px;
    right: 22px;
    left: 22px;
    z-index: 40;
    min-height: 76px;
    padding: 9px 12px;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto minmax(180px, 1fr);
    align-items: center;
    gap: 18px;
    border: 2px solid rgba(255, 245, 220, 0.5);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(7, 34, 48, 0.9), rgba(5, 26, 39, 0.92));
    box-shadow: 0 12px 32px rgba(1, 19, 29, 0.34), inset 0 1px rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.captain-card {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
}

.captain-portrait {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border: 2px solid #ffd263;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 28%, #2a7690, #0b344a 70%);
    box-shadow: 0 0 0 4px rgba(242, 184, 75, 0.12);
    color: #ffd263;
    font-size: 25px;
}

.captain-copy {
    min-width: 0;
}

.captain-copy > * {
    display: block;
}

.captain-copy small {
    color: #8fc7d0;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.captain-copy strong {
    overflow: hidden;
    color: #fff9e8;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 19px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.captain-copy span {
    color: #a9c9d0;
    font-size: 11px;
}

.harbor-currencies {
    display: flex;
    gap: 8px;
}

.harbor-currencies > div {
    min-width: 128px;
    min-height: 48px;
    padding: 7px 12px 7px 38px;
    position: relative;
    display: grid;
    align-content: center;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
}

.harbor-currencies > div > span {
    position: absolute;
    top: 50%;
    left: 11px;
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #f3b644;
    color: #604013;
    font-size: 11px;
    transform: translateY(-50%);
}

.harbor-currencies > div:nth-child(2) > span {
    background: #68d5ee;
    color: #174358;
}

.harbor-currencies > div:nth-child(3) > span {
    background: #ff8660;
    color: #5d2416;
}

.harbor-currencies small,
.harbor-currencies strong {
    display: block;
}

.harbor-currencies small {
    color: #84aeb8;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.harbor-currencies strong {
    color: #fff6d8;
    font-size: 13px;
}

.harbor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.harbor-actions form {
    margin: 0;
}

.round-action {
    position: relative;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05));
    color: #fff6d7;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
    font-size: 18px;
    cursor: pointer;
}

.round-action:hover,
.round-action:focus-visible {
    border-color: #f2b84b;
    color: #f2b84b;
    transform: translateY(-1px);
}

.action-badge {
    position: absolute;
    top: -4px;
    right: -3px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    display: grid;
    place-items: center;
    border: 2px solid #0a293c;
    border-radius: 999px;
    background: #e65c49;
    color: white;
    font-size: 9px;
    font-weight: 900;
}

.quest-scroll {
    position: absolute;
    top: 118px;
    left: 24px;
    z-index: 30;
    width: min(310px, calc(100% - 48px));
    min-height: 94px;
    padding: 14px 18px 14px 58px;
    display: flex;
    align-items: center;
    border: 2px solid rgba(92, 55, 20, 0.74);
    border-radius: 8px 16px 16px 8px;
    background:
        linear-gradient(90deg, rgba(255, 242, 198, 0.96), rgba(238, 207, 139, 0.96));
    box-shadow: 7px 8px 0 rgba(7, 31, 44, 0.34), inset 0 0 0 3px rgba(255, 255, 255, 0.28);
    color: #382d24;
}

.quest-scroll::after {
    position: absolute;
    right: -17px;
    bottom: 9px;
    width: 32px;
    height: 22px;
    content: "";
    background: #d9ad5e;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.quest-pin {
    position: absolute;
    left: 13px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 2px solid #6d3f18;
    border-radius: 50%;
    background: #e86745;
    color: white;
    font-weight: 950;
}

.quest-scroll small,
.quest-scroll strong {
    display: block;
}

.quest-scroll small {
    color: #a45d2c;
    font-size: 9px;
    font-weight: 950;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.quest-scroll strong {
    margin-top: 2px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 17px;
}

.quest-scroll p {
    margin: 3px 0 0;
    color: #6f5a44;
    font-size: 10px;
    line-height: 1.35;
}

.harbor-scene,
.building-layer {
    position: absolute;
    inset: 0;
}

.harbor-scene {
    z-index: 1;
    pointer-events: none;
}

.sky-glow {
    position: absolute;
    top: 13%;
    left: 50%;
    width: min(44vw, 620px);
    height: min(44vw, 620px);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 244, 178, 0.75), rgba(255, 222, 107, 0.25) 38%, transparent 70%);
    transform: translateX(-50%);
}

.cloud {
    position: absolute;
    width: 190px;
    height: 34px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.56);
    filter: blur(1px);
}

.cloud::before,
.cloud::after {
    position: absolute;
    bottom: 0;
    content: "";
    border-radius: 50%;
    background: inherit;
}

.cloud::before {
    left: 35px;
    width: 70px;
    height: 70px;
}

.cloud::after {
    right: 28px;
    width: 52px;
    height: 52px;
}

.cloud-one {
    top: 17%;
    left: 31%;
}

.cloud-two {
    top: 25%;
    right: 13%;
    transform: scale(0.72);
    opacity: 0.7;
}

.far-island {
    position: absolute;
    top: 42%;
    width: 28vw;
    height: 18vh;
    border-radius: 55% 55% 0 0;
    background:
        linear-gradient(150deg, #3c9276, #176b63 56%, #0a4c54);
    filter: saturate(0.8);
    opacity: 0.82;
}

.far-island::before,
.far-island::after {
    position: absolute;
    bottom: 34%;
    width: 30px;
    height: 78px;
    content: "";
    border-radius: 70% 30% 50% 50%;
    background: #1e6d54;
    transform: rotate(10deg);
}

.far-island::before {
    left: 28%;
}

.far-island::after {
    left: 46%;
    transform: rotate(-8deg) scale(0.8);
}

.far-island-one {
    left: -7%;
    transform: rotate(3deg);
}

.far-island-two {
    right: -5%;
    transform: scaleX(-1) rotate(2deg);
}

.sea-band {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 49%;
    background:
        repeating-linear-gradient(176deg, rgba(255, 255, 255, 0.13) 0 3px, transparent 3px 20px),
        linear-gradient(180deg, #1c91a6, #0b6682 45%, #064966 100%);
}

.water-shine {
    position: absolute;
    z-index: 2;
    height: 5px;
    border-radius: 50%;
    border-top: 3px solid rgba(255, 255, 255, 0.55);
}

.water-shine-one {
    right: 13%;
    bottom: 28%;
    left: 17%;
    transform: rotate(-1deg);
}

.water-shine-two {
    right: 25%;
    bottom: 16%;
    left: 28%;
    opacity: 0.42;
    transform: rotate(2deg);
}

.dock {
    position: absolute;
    z-index: 4;
    bottom: -4%;
    width: 35%;
    height: 26%;
    border-top: 12px solid #3f2b1f;
    background:
        repeating-linear-gradient(90deg, #8d5932 0 45px, #6f4327 45px 51px);
    box-shadow: 0 -5px 0 #b97a44;
}

.dock::before,
.dock::after {
    position: absolute;
    top: 48%;
    width: 20px;
    height: 70%;
    content: "";
    background: #4c3021;
}

.dock::before {
    left: 12%;
}

.dock::after {
    right: 15%;
}

.dock-left {
    left: -4%;
    transform: perspective(500px) rotateY(16deg) rotateZ(2deg);
}

.dock-right {
    right: -4%;
    transform: perspective(500px) rotateY(-16deg) rotateZ(-2deg);
}

.harbor-ship {
    position: absolute;
    z-index: 5;
    bottom: 15%;
    left: 50%;
    width: 360px;
    height: 330px;
    filter: drop-shadow(0 18px 14px rgba(1, 28, 42, 0.32));
    transform: translateX(-50%);
}

.harbor-ship .ship-mast {
    position: absolute;
    top: 14px;
    left: 176px;
    width: 10px;
    height: 230px;
    border: 3px solid #37251b;
    background: #7b4b2c;
}

.harbor-ship .ship-sail {
    position: absolute;
    z-index: 2;
    display: grid;
    place-items: center;
    border: 3px solid #53381f;
    background: #fff0bd;
    color: #9b3f2e;
    font-size: 31px;
}

.harbor-ship .ship-sail-a {
    top: 28px;
    left: 67px;
    width: 105px;
    height: 155px;
    clip-path: polygon(100% 0, 100% 100%, 0 77%);
}

.harbor-ship .ship-sail-b {
    top: 50px;
    left: 187px;
    width: 104px;
    height: 130px;
    background: #f2bb4d;
    clip-path: polygon(0 0, 100% 72%, 0 100%);
}

.harbor-ship .ship-deck {
    position: absolute;
    top: 202px;
    left: 52px;
    width: 255px;
    height: 22px;
    border: 3px solid #4a2d20;
    border-radius: 12px;
    background: #d18a42;
}

.harbor-ship .ship-hull {
    position: absolute;
    top: 218px;
    left: 35px;
    width: 290px;
    height: 82px;
    border: 4px solid #452b20;
    border-radius: 10px 10px 120px 120px;
    background:
        repeating-linear-gradient(0deg, rgba(70, 35, 19, 0.25) 0 2px, transparent 2px 18px),
        #a95133;
    transform: skewX(-4deg);
}

.captain-figure {
    position: absolute;
    z-index: 8;
    bottom: 10%;
    left: 50%;
    width: 118px;
    height: 194px;
    transform: translateX(-50%);
}

.captain-shadow {
    position: absolute;
    right: -26px;
    bottom: -8px;
    left: -26px;
    height: 25px;
    border-radius: 50%;
    background: rgba(3, 29, 39, 0.4);
    filter: blur(4px);
}

.captain-head {
    position: absolute;
    top: 33px;
    left: 40px;
    width: 42px;
    height: 48px;
    border: 3px solid #432c24;
    border-radius: 50%;
    background: #e6a56f;
}

.captain-hat {
    position: absolute;
    z-index: 3;
    top: 13px;
    left: 22px;
    width: 78px;
    height: 37px;
    border: 4px solid #5a321d;
    border-radius: 50% 50% 42% 42%;
    background: #e8b540;
    box-shadow: inset 0 -8px #c84d35;
}

.captain-body {
    position: absolute;
    top: 75px;
    left: 34px;
    width: 53px;
    height: 95px;
    border: 3px solid #402820;
    border-radius: 20px 20px 10px 10px;
    background: #d94e39;
}

.captain-coat {
    position: absolute;
    z-index: -1;
    top: 78px;
    left: 14px;
    width: 92px;
    height: 107px;
    border: 3px solid #3c2b24;
    border-radius: 26px 26px 15px 15px;
    background: #193f54;
    clip-path: polygon(0 0, 100% 0, 83% 100%, 50% 80%, 17% 100%);
}

.building-layer {
    z-index: 12;
    pointer-events: none;
}

.lobby-building {
    position: absolute;
    width: 170px;
    padding: 0;
    border: 0;
    background: transparent;
    color: white;
    pointer-events: auto;
    cursor: pointer;
    filter: drop-shadow(0 12px 10px rgba(1, 30, 40, 0.28));
    transition: transform 170ms ease, filter 170ms ease;
}

.lobby-building:hover,
.lobby-building:focus-visible {
    z-index: 5;
    filter: drop-shadow(0 16px 12px rgba(1, 30, 40, 0.35)) brightness(1.07);
    transform: translateY(-5px) scale(1.03);
    outline: none;
}

.building-art {
    position: relative;
    width: 150px;
    height: 116px;
    margin: 0 auto;
    display: block;
}

.building-art i {
    position: absolute;
    display: block;
}

.building-label {
    position: relative;
    min-width: 132px;
    margin: -8px auto 0;
    padding: 8px 24px 8px 13px;
    display: inline-grid;
    justify-items: start;
    border: 2px solid #4a311c;
    border-radius: 9px;
    background: linear-gradient(180deg, #fff0bd, #dcae5c);
    box-shadow: 4px 5px 0 rgba(40, 25, 16, 0.75);
    color: #402c20;
    text-align: left;
}

.building-label small,
.building-label strong {
    display: block;
}

.building-label small {
    color: #a15a2b;
    font-size: 8px;
    font-weight: 950;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.building-label strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px;
    line-height: 1.05;
}

.building-label em {
    position: absolute;
    top: -8px;
    right: -9px;
    padding: 3px 6px;
    border: 2px solid #4a311c;
    border-radius: 999px;
    background: #e76046;
    color: white;
    font-size: 7px;
    font-style: normal;
    font-weight: 950;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.building-story {
    top: 24%;
    left: 7%;
}

.building-tavern {
    bottom: 18%;
    left: 15%;
}

.building-heroes {
    top: 22%;
    right: 8%;
}

.building-shop {
    top: 48%;
    right: 22%;
}

.building-shipyard {
    bottom: 16%;
    right: 8%;
}

.building-formation {
    bottom: 17%;
    left: 31%;
}

.tower-body {
    bottom: 5px;
    left: 46px;
    width: 64px;
    height: 88px;
    border: 3px solid #57371f;
    background:
        linear-gradient(90deg, transparent 44%, rgba(85, 53, 30, 0.18) 45% 55%, transparent 56%),
        #dcc37c;
}

.tower-roof {
    top: 3px;
    left: 29px;
    width: 98px;
    height: 50px;
    border: 3px solid #57371f;
    background: #b84f36;
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.tower-flag {
    top: -7px;
    left: 92px;
    width: 42px;
    height: 30px;
    display: grid !important;
    place-items: center;
    border: 2px solid #57371f;
    background: #143f55;
    color: #f2b84b;
    font-size: 14px;
}

.tavern-house,
.guild-house,
.shop-house {
    bottom: 5px;
    left: 23px;
    width: 108px;
    height: 73px;
    border: 3px solid #53351f;
    border-radius: 5px;
    background:
        linear-gradient(90deg, transparent 20%, rgba(91, 54, 30, 0.14) 21% 23%, transparent 24%),
        #e7c978;
}

.tavern-roof,
.guild-roof {
    top: 8px;
    left: 11px;
    width: 132px;
    height: 45px;
    border: 3px solid #53351f;
    background: #a84a32;
    clip-path: polygon(14% 0, 86% 0, 100% 100%, 0 100%);
}

.tavern-sign {
    top: 50px;
    right: 8px;
    width: 38px;
    height: 38px;
    display: grid !important;
    place-items: center;
    border: 3px solid #52331e;
    border-radius: 50%;
    background: #1f6e73;
    color: #f7d260;
}

.guild-roof {
    background: #245d76;
}

.guild-house {
    background: #d9c391;
}

.guild-banner {
    top: 48px;
    left: 61px;
    width: 35px;
    height: 50px;
    display: grid !important;
    place-items: center;
    border: 2px solid #4f321f;
    background: #c7503a;
    color: #ffe49b;
    font-size: 18px;
}

.shop-house {
    bottom: 8px;
    background: #d8bb75;
}

.shop-awning {
    top: 24px;
    left: 12px;
    width: 132px;
    height: 36px;
    border: 3px solid #53351f;
    background: repeating-linear-gradient(90deg, #e65f46 0 22px, #f8df9a 22px 44px);
    clip-path: polygon(4% 0, 96% 0, 100% 100%, 0 100%);
}

.shop-crate {
    right: 8px;
    bottom: 0;
    width: 43px;
    height: 38px;
    border: 3px solid #54341f;
    background: #9e6135;
}

.shipyard-art .yard-crane {
    top: 3px;
    left: 26px;
    width: 12px;
    height: 105px;
    border: 3px solid #50331f;
    background: #a8703d;
}

.shipyard-art .yard-crane::before {
    position: absolute;
    top: 0;
    left: 5px;
    width: 91px;
    height: 11px;
    content: "";
    border: 3px solid #50331f;
    background: #a8703d;
}

.shipyard-art .yard-hook {
    top: 17px;
    left: 103px;
    width: 3px;
    height: 53px;
    background: #4d362a;
}

.shipyard-art .yard-hook::after {
    position: absolute;
    bottom: -10px;
    left: -5px;
    width: 12px;
    height: 12px;
    content: "";
    border-right: 3px solid #4d362a;
    border-bottom: 3px solid #4d362a;
    border-radius: 0 0 8px 0;
}

.shipyard-art .yard-shed {
    right: 8px;
    bottom: 4px;
    width: 83px;
    height: 51px;
    border: 3px solid #4d321f;
    background: #637a76;
}

.formation-art {
    width: 114px;
    height: 114px;
    padding: 8px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    border: 4px solid #563820;
    border-radius: 12px;
    background: #dcb15d;
    transform: perspective(150px) rotateX(12deg);
}

.formation-art i {
    position: static;
    border: 2px solid #6b4728;
    border-radius: 4px;
    background: rgba(255, 246, 207, 0.48);
}

.formation-art i:nth-child(2),
.formation-art i:nth-child(5),
.formation-art i:nth-child(8) {
    background: rgba(29, 102, 116, 0.48);
}

.harbor-dock-nav {
    position: absolute;
    bottom: 18px;
    left: 50%;
    z-index: 50;
    min-width: min(620px, calc(100% - 40px));
    padding: 8px 10px;
    display: grid;
    grid-template-columns: repeat(5, minmax(76px, 1fr));
    gap: 5px;
    border: 2px solid rgba(255, 240, 195, 0.5);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(7, 38, 52, 0.94), rgba(4, 25, 38, 0.96));
    box-shadow: 0 12px 30px rgba(1, 20, 30, 0.42), inset 0 1px rgba(255, 255, 255, 0.12);
    transform: translateX(-50%);
    backdrop-filter: blur(10px);
}

.harbor-dock-nav button {
    position: relative;
    min-height: 60px;
    padding: 5px;
    display: grid;
    place-items: center;
    gap: 2px;
    border: 1px solid transparent;
    border-radius: 11px;
    background: transparent;
    color: #bad2d6;
    cursor: pointer;
}

.harbor-dock-nav button:hover,
.harbor-dock-nav button:focus-visible,
.harbor-dock-nav .is-home {
    border-color: rgba(242, 184, 75, 0.52);
    background: linear-gradient(180deg, rgba(242, 184, 75, 0.2), rgba(242, 184, 75, 0.06));
    color: #ffe399;
    outline: none;
}

.harbor-dock-nav button > span {
    font-size: 23px;
    line-height: 1;
}

.harbor-dock-nav button > small {
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.harbor-dock-nav button > b {
    position: absolute;
    top: 1px;
    right: 10px;
    min-width: 17px;
    height: 17px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #e85d48;
    color: white;
    font-size: 8px;
}

.build-notice {
    position: absolute;
    right: 24px;
    bottom: 20px;
    z-index: 30;
    max-width: 210px;
    padding: 10px 13px;
    border: 1px solid rgba(255, 255, 255, 0.23);
    border-radius: 10px;
    background: rgba(5, 31, 43, 0.78);
    box-shadow: 0 8px 20px rgba(1, 23, 33, 0.25);
    backdrop-filter: blur(8px);
}

.build-notice span,
.build-notice strong {
    display: block;
}

.build-notice span {
    color: #f2b84b;
    font-size: 8px;
    font-weight: 950;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.build-notice strong {
    margin-top: 2px;
    color: #d8e8e9;
    font-size: 11px;
}

.feature-dialog {
    width: min(460px, calc(100% - 30px));
    padding: 0;
    border: 3px solid #51361f;
    border-radius: 18px;
    background: #fff2c8;
    color: #30251e;
    box-shadow: 12px 14px 0 rgba(4, 21, 30, 0.76);
}

.feature-dialog::backdrop {
    background: rgba(2, 19, 27, 0.66);
    backdrop-filter: blur(5px);
}

.feature-dialog form {
    position: relative;
    padding: 32px;
    display: grid;
    justify-items: center;
    text-align: center;
}

.dialog-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border: 2px solid #50321f;
    border-radius: 50%;
    background: #e86747;
    color: white;
    font-size: 22px;
    cursor: pointer;
}

.dialog-emblem {
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    border: 3px solid #51361f;
    border-radius: 50%;
    background: #173f55;
    color: #f2b84b;
    font-size: 28px;
}

.feature-dialog p {
    margin: 17px 0 4px;
    color: #b25e31;
    font-size: 10px;
    font-weight: 950;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.feature-dialog h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 34px;
}

#feature-description {
    margin: 13px 0 24px;
    color: #695747;
    line-height: 1.6;
}

@media (max-width: 1180px) {
    .harbor-topbar {
        grid-template-columns: minmax(190px, 1fr) auto;
    }

    .harbor-actions {
        grid-column: 2;
        grid-row: 1;
    }

    .harbor-currencies {
        grid-column: 1 / -1;
        justify-content: center;
        order: 3;
    }

    .harbor-topbar {
        min-height: 132px;
    }

    .quest-scroll {
        top: 166px;
    }

    .building-story,
    .building-heroes {
        top: 29%;
    }

    .building-shop {
        right: 17%;
    }

    .build-notice {
        display: none;
    }
}

@media (max-width: 900px) {
    .harbor-lobby {
        min-height: 760px;
    }

    .harbor-topbar {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .harbor-currencies > div {
        min-width: 112px;
    }

    .quest-scroll {
        top: 154px;
        left: 12px;
    }

    .lobby-building {
        transform: scale(0.84);
    }

    .lobby-building:hover,
    .lobby-building:focus-visible {
        transform: translateY(-4px) scale(0.88);
    }

    .building-story {
        left: 1%;
    }

    .building-tavern {
        left: 4%;
    }

    .building-heroes {
        right: 1%;
    }

    .building-shop {
        right: 21%;
    }

    .building-shipyard {
        right: 1%;
    }

    .building-formation {
        left: 24%;
    }

    .harbor-ship {
        transform: translateX(-50%) scale(0.86);
        transform-origin: bottom center;
    }

    .captain-figure {
        transform: translateX(-50%) scale(0.9);
        transform-origin: bottom center;
    }
}

@media (max-width: 680px) {
    .harbor-lobby {
        min-height: 820px;
        overflow-y: auto;
    }

    .harbor-topbar {
        position: relative;
        top: auto;
        right: auto;
        left: auto;
        margin: 10px;
        grid-template-columns: 1fr auto;
    }

    .harbor-currencies {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 2px;
    }

    .harbor-currencies > div {
        flex: 0 0 118px;
    }

    .quest-scroll {
        top: 154px;
    }

    .harbor-scene {
        top: 130px;
    }

    .building-layer {
        top: 130px;
    }

    .lobby-building {
        transform: scale(0.72);
    }

    .lobby-building:hover,
    .lobby-building:focus-visible {
        transform: translateY(-3px) scale(0.75);
    }

    .building-story {
        top: 25%;
        left: -5%;
    }

    .building-tavern {
        bottom: 20%;
        left: -4%;
    }

    .building-heroes {
        top: 25%;
        right: -5%;
    }

    .building-shop {
        top: 49%;
        right: 12%;
    }

    .building-shipyard {
        right: -4%;
        bottom: 20%;
    }

    .building-formation {
        bottom: 20%;
        left: 18%;
    }

    .harbor-ship {
        bottom: 20%;
        transform: translateX(-50%) scale(0.7);
    }

    .captain-figure {
        bottom: 16%;
        transform: translateX(-50%) scale(0.78);
    }

    .harbor-dock-nav {
        position: fixed;
        bottom: 8px;
        min-width: calc(100% - 20px);
        grid-template-columns: repeat(5, 1fr);
    }

    .harbor-dock-nav button {
        min-height: 54px;
    }
}

@media (max-height: 700px) and (min-width: 681px) {
    .harbor-lobby {
        min-height: 700px;
    }

    .quest-scroll {
        transform: scale(0.86);
        transform-origin: left top;
    }

    .lobby-building {
        transform: scale(0.78);
    }

    .lobby-building:hover,
    .lobby-building:focus-visible {
        transform: translateY(-4px) scale(0.81);
    }

    .harbor-ship {
        transform: translateX(-50%) scale(0.76);
        transform-origin: bottom center;
    }

    .captain-figure {
        transform: translateX(-50%) scale(0.78);
        transform-origin: bottom center;
    }
}

@media (max-width: 1100px) {
    .hero-shell {
        grid-template-columns: 1fr 0.78fr;
        gap: 35px;
    }

    .hero-art {
        min-height: 480px;
    }

    .lobby-grid {
        grid-template-columns: 150px minmax(0, 1fr);
    }

    .mission-panel {
        grid-column: 1 / -1;
        min-height: auto;
    }

    .milestone-list {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .milestone-list li {
        align-items: flex-start;
    }
}

@media (max-width: 820px) {
    .site-header {
        min-height: 74px;
    }

    .brand small {
        display: none;
    }

    .hero-shell,
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .hero-shell {
        padding-top: 34px;
    }

    .hero-art {
        min-height: 430px;
    }

    .auth-shell {
        gap: 34px;
    }

    .auth-story {
        text-align: center;
    }

    .auth-story > p:last-of-type {
        margin-inline: auto;
    }

    .compass {
        display: none;
    }

    .game-topbar,
    .currency-bar {
        align-items: stretch;
    }

    .game-topbar,
    .game-account-actions {
        flex-direction: column;
    }

    .game-account-actions {
        width: 100%;
    }

    .game-account-actions form,
    .game-logout {
        width: 100%;
    }

    .currency-bar > div {
        flex: 1;
        min-width: 0;
    }

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

    .lobby-menu {
        min-height: auto;
        grid-template-columns: repeat(5, minmax(100px, 1fr));
        overflow-x: auto;
    }

    .voyage-card {
        grid-template-columns: 1fr;
    }

    .island-map {
        display: none;
    }

    .crew-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .mission-panel {
        grid-column: auto;
    }

    .milestone-list {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 560px) {
    .site-header,
    .hero-shell,
    .auth-shell {
        width: min(100% - 24px, 1180px);
    }

    .brand strong {
        font-size: 17px;
    }

    .brand-mark {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .site-nav .nav-link:not(.nav-button) {
        display: none;
    }

    .hero-copy h1 {
        font-size: 49px;
    }

    .feature-row {
        gap: 16px;
    }

    .feature-row div {
        min-width: 0;
    }

    .hero-art {
        min-height: 360px;
    }

    .ship {
        left: 8px;
        transform: scale(0.82);
        transform-origin: left center;
    }

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

    .auth-card {
        padding: 26px 20px;
    }

    .currency-bar {
        flex-wrap: wrap;
    }

    .currency-bar > div {
        flex-basis: calc(50% - 5px);
    }

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

    .milestone-list {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 820px) {
    .game-page .harbor-topbar,
    .game-page .harbor-actions {
        flex-direction: initial;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lobby-building,
    .round-action,
    .button {
        transition: none;
    }
}

/* ==========================================================================
   Sunwake Harbor — original anime pirate lobby theme
   ========================================================================== */

.game-page {
    margin: 0;
    overflow: hidden;
    background: #052d4b;
}

.game-page .site-noise,
.game-page > .site-header {
    display: none;
}

.sunwake-lobby {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    isolation: isolate;
    background: #087ea7;
    color: #fff;
    font-family: "Trebuchet MS", Inter, ui-sans-serif, system-ui, sans-serif;
}

.sunwake-world,
.sunwake-world-art {
    position: absolute;
    inset: 0;
}

.sunwake-world {
    z-index: -3;
    overflow: hidden;
    pointer-events: none;
}

.sunwake-world-art {
    background-image: var(--sunwake-harbor-art);
    background-position: center;
    background-size: cover;
    transform: scale(1.015);
    animation: sunwake-world-drift 18s ease-in-out infinite alternate;
}

.sunwake-world::after {
    position: absolute;
    inset: 0;
    content: "";
    background:
        linear-gradient(180deg, rgba(4, 28, 58, 0.06) 0%, transparent 28%, rgba(3, 25, 52, 0.12) 74%, rgba(2, 17, 38, 0.5) 100%),
        radial-gradient(circle at 52% 37%, transparent 0 25%, rgba(5, 45, 74, 0.08) 65%, rgba(4, 24, 49, 0.28) 100%);
}

.sunwake-cloud {
    position: absolute;
    width: 230px;
    height: 36px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
    filter: blur(1px);
}

.sunwake-cloud::before,
.sunwake-cloud::after {
    position: absolute;
    bottom: 0;
    content: "";
    border-radius: 50%;
    background: inherit;
}

.sunwake-cloud::before {
    left: 42px;
    width: 86px;
    height: 86px;
}

.sunwake-cloud::after {
    right: 38px;
    width: 62px;
    height: 62px;
}

.sunwake-cloud.cloud-a {
    top: 18%;
    left: -2%;
    animation: sunwake-cloud-float 24s linear infinite;
}

.sunwake-cloud.cloud-b {
    top: 12%;
    right: 4%;
    opacity: 0.72;
    transform: scale(0.72);
    animation: sunwake-cloud-float 31s linear infinite reverse;
}

.sunwake-spark {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #fff2a5;
    clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
    filter: drop-shadow(0 0 8px rgba(255, 239, 145, 0.8));
    animation: sunwake-sparkle 2.8s ease-in-out infinite;
}

.sunwake-spark.spark-a {
    top: 25%;
    left: 39%;
}

.sunwake-spark.spark-b {
    top: 32%;
    right: 31%;
    animation-delay: 1.3s;
}

.sunwake-wave {
    position: absolute;
    right: 18%;
    left: 18%;
    height: 22px;
    border-top: 5px solid rgba(225, 255, 250, 0.3);
    border-radius: 50%;
    animation: sunwake-wave-shift 5s ease-in-out infinite alternate;
}

.sunwake-wave.wave-a {
    bottom: 29%;
}

.sunwake-wave.wave-b {
    right: 28%;
    bottom: 18%;
    left: 28%;
    opacity: 0.58;
    animation-delay: 1.5s;
}

.sunwake-topbar {
    position: absolute;
    top: 20px;
    right: 24px;
    left: 24px;
    z-index: 70;
    min-height: 78px;
    padding: 10px 14px;
    display: grid;
    grid-template-columns: minmax(230px, 1fr) auto minmax(180px, 1fr);
    align-items: center;
    gap: 18px;
    border: 3px solid rgba(255, 239, 174, 0.74);
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(18, 61, 98, 0.96), rgba(5, 30, 62, 0.96));
    box-shadow:
        0 14px 0 rgba(4, 24, 52, 0.28),
        0 20px 40px rgba(3, 25, 50, 0.33),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(14px);
}

.sunwake-player {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sunwake-player-avatar {
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border: 3px solid #ffe59a;
    border-radius: 50%;
    background:
        radial-gradient(circle at 34% 28%, #6fe8e9, #187a9d 45%, #0d3969 74%);
    box-shadow: inset 0 0 0 5px rgba(7, 26, 56, 0.48), 0 6px 0 rgba(2, 19, 43, 0.5);
}

.sunwake-player-avatar span {
    color: #fff4c8;
    font-family: Georgia, serif;
    font-size: 16px;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.sunwake-player-copy {
    min-width: 0;
}

.sunwake-player-copy small,
.sunwake-player-copy strong,
.sunwake-player-copy span {
    display: block;
}

.sunwake-player-copy small {
    color: #ffd76b;
    font-size: 9px;
    font-weight: 950;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.sunwake-player-copy strong {
    overflow: hidden;
    color: #fff9e9;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 21px;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sunwake-player-copy span {
    margin-top: 3px;
    color: #a9d9e9;
    font-size: 11px;
    font-weight: 750;
}

.sunwake-currencies {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.currency-chip {
    position: relative;
    min-width: 120px;
    min-height: 48px;
    padding: 7px 15px 7px 48px;
    display: grid;
    align-content: center;
    border: 2px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(1, 27, 55, 0.55);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.1);
}

.currency-chip .currency-icon {
    position: absolute;
    top: 50%;
    left: 9px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 2px solid rgba(4, 29, 58, 0.75);
    border-radius: 50%;
    color: #fff8d8;
    font-size: 16px;
    transform: translateY(-50%);
}

.currency-gold .currency-icon {
    background: linear-gradient(180deg, #ffd966, #e58a24);
}

.currency-gem .currency-icon {
    background: linear-gradient(180deg, #65eff2, #2970d5);
}

.currency-stamina .currency-icon {
    background: linear-gradient(180deg, #ff9581, #e64b5f);
}

.currency-chip small,
.currency-chip strong {
    display: block;
}

.currency-chip small {
    color: #9dc6d6;
    font-size: 8px;
    font-weight: 950;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.currency-chip strong {
    color: #fff5c9;
    font-size: 14px;
    line-height: 1.05;
}

.sunwake-actions {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 9px;
}

.sunwake-actions form {
    margin: 0;
}

.sunwake-round-button {
    position: relative;
    width: 47px;
    height: 47px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 2px solid rgba(255, 236, 166, 0.52);
    border-radius: 50%;
    background: linear-gradient(180deg, #235b7b, #0d355d);
    box-shadow: 0 6px 0 rgba(2, 18, 43, 0.46), inset 0 1px rgba(255, 255, 255, 0.22);
    color: #fff2b7;
    font-size: 20px;
    cursor: pointer;
    transition: transform 150ms ease, filter 150ms ease, box-shadow 150ms ease;
}

.sunwake-round-button:hover,
.sunwake-round-button:focus-visible {
    outline: none;
    filter: brightness(1.16);
    transform: translateY(-2px);
}

.sunwake-round-button:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 rgba(2, 18, 43, 0.46);
}

.sunwake-round-button b {
    position: absolute;
    top: -5px;
    right: -3px;
    min-width: 19px;
    height: 19px;
    padding: 0 4px;
    display: grid;
    place-items: center;
    border: 2px solid #4e203b;
    border-radius: 999px;
    background: #f05267;
    color: white;
    font-size: 9px;
}

.sunwake-mission {
    position: absolute;
    top: 125px;
    left: 28px;
    z-index: 60;
    width: min(355px, calc(100% - 56px));
    min-height: 98px;
    padding: 17px 24px 14px 62px;
    border: 4px solid #67402f;
    border-radius: 18px 18px 18px 7px;
    background:
        linear-gradient(180deg, rgba(255, 245, 193, 0.98), rgba(239, 194, 105, 0.98));
    box-shadow: 8px 10px 0 rgba(5, 39, 63, 0.35), inset 0 2px rgba(255, 255, 255, 0.65);
    color: #47302f;
    transform: rotate(-0.8deg);
}

.sunwake-mission::after {
    position: absolute;
    right: -24px;
    bottom: -2px;
    width: 32px;
    height: 28px;
    content: "";
    background: #e4a551;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.mission-medallion {
    position: absolute;
    top: 21px;
    left: 15px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 3px solid #6b342e;
    border-radius: 50%;
    background: #ef5a5c;
    color: #fff8db;
    font-weight: 950;
}

.sunwake-mission small,
.sunwake-mission strong {
    display: block;
}

.sunwake-mission small {
    color: #b65438;
    font-size: 9px;
    font-weight: 950;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.sunwake-mission strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 19px;
    line-height: 1.1;
}

.sunwake-mission p {
    margin: 5px 0 0;
    color: #725045;
    font-size: 11px;
    line-height: 1.35;
}

.mission-ribbon {
    position: absolute;
    top: -12px;
    right: 14px;
    padding: 4px 10px;
    border: 2px solid #572d38;
    border-radius: 999px;
    background: #d94368;
    color: #fff8d9;
    font-size: 8px;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sunwake-destinations {
    position: absolute;
    inset: 0;
    z-index: 30;
    pointer-events: none;
}

.sunwake-destination {
    position: absolute;
    min-width: 190px;
    padding: 0;
    display: grid;
    justify-items: center;
    border: 0;
    background: transparent;
    color: #fff;
    pointer-events: auto;
    cursor: pointer;
    filter: drop-shadow(0 12px 8px rgba(2, 25, 52, 0.34));
    transition: transform 160ms ease, filter 160ms ease;
}

.sunwake-destination:hover,
.sunwake-destination:focus-visible {
    z-index: 10;
    outline: none;
    filter: drop-shadow(0 18px 12px rgba(2, 25, 52, 0.42)) brightness(1.08);
    transform: translateY(-6px) scale(1.04);
}

.destination-icon {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border: 5px solid #443044;
    border-radius: 26px 26px 18px 18px;
    box-shadow:
        0 8px 0 rgba(53, 31, 43, 0.82),
        inset 0 3px rgba(255, 255, 255, 0.38);
    color: #fff8d0;
    font-size: 33px;
    transform: rotate(-3deg);
}

.icon-story {
    background: linear-gradient(145deg, #4e7ed4, #253f85);
}

.icon-tavern {
    background: linear-gradient(145deg, #ef6a72, #b63467);
}

.icon-heroes {
    background: linear-gradient(145deg, #51c9c4, #1b7289);
}

.icon-shop {
    background: linear-gradient(145deg, #f3b843, #dc6d35);
}

.icon-shipyard {
    background: linear-gradient(145deg, #7977d7, #3d438f);
}

.icon-formation {
    background: linear-gradient(145deg, #68ca74, #25835e);
}

.destination-copy {
    position: relative;
    min-width: 176px;
    margin-top: -6px;
    padding: 10px 25px 10px 15px;
    display: grid;
    justify-items: start;
    border: 4px solid #4e3034;
    border-radius: 14px;
    background:
        linear-gradient(180deg, #fff2b1 0%, #f7c966 50%, #d99042 100%);
    box-shadow:
        0 7px 0 rgba(58, 31, 37, 0.82),
        inset 0 2px rgba(255, 255, 255, 0.65);
    color: #452f35;
    text-align: left;
    transform: rotate(0.8deg);
}

.destination-copy small {
    color: #b34348;
    font-size: 8px;
    font-weight: 950;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.destination-copy strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 17px;
    line-height: 1.05;
    white-space: nowrap;
}

.destination-copy em {
    position: absolute;
    top: -10px;
    right: -10px;
    padding: 4px 7px;
    border: 2px solid #4a2934;
    border-radius: 999px;
    background: #e24c61;
    color: #fff8d3;
    font-size: 7px;
    font-style: normal;
    font-weight: 950;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.destination-copy em.is-next {
    background: #2c9b7c;
}

.destination-story {
    top: 27%;
    left: 7%;
}

.destination-tavern {
    bottom: 17%;
    left: 14%;
}

.destination-heroes {
    top: 25%;
    right: 7%;
}

.destination-shop {
    top: 49%;
    right: 20%;
}

.destination-shipyard {
    right: 7%;
    bottom: 17%;
}

.destination-formation {
    bottom: 16%;
    left: 28%;
}

.sunwake-captain-art {
    position: absolute;
    z-index: 25;
    right: 32%;
    bottom: 3%;
    width: min(25vw, 390px);
    pointer-events: none;
    filter: drop-shadow(0 24px 22px rgba(3, 25, 52, 0.35));
}

.sunwake-captain-art img {
    width: 100%;
    height: auto;
    display: block;
    animation: sunwake-captain-idle 4.6s ease-in-out infinite;
    transform-origin: center bottom;
}

.captain-nameplate {
    position: absolute;
    right: -10px;
    bottom: 11%;
    min-width: 170px;
    padding: 10px 18px;
    border: 3px solid #4c2d3a;
    border-radius: 14px 14px 14px 4px;
    background: linear-gradient(180deg, #fff2b8, #eaa64e);
    box-shadow: 5px 7px 0 rgba(53, 30, 44, 0.75);
    color: #3f2b38;
    transform: rotate(-2deg);
}

.captain-nameplate small,
.captain-nameplate strong {
    display: block;
}

.captain-nameplate small {
    color: #b73f4d;
    font-size: 8px;
    font-weight: 950;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.captain-nameplate strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 19px;
}

.sunwake-bottom-nav {
    position: absolute;
    bottom: 18px;
    left: 50%;
    z-index: 80;
    min-width: min(640px, calc(100% - 40px));
    padding: 8px 10px;
    display: grid;
    grid-template-columns: repeat(5, minmax(80px, 1fr));
    gap: 5px;
    border: 3px solid rgba(255, 232, 150, 0.68);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(17, 61, 99, 0.96), rgba(3, 28, 60, 0.97));
    box-shadow: 0 10px 0 rgba(2, 20, 47, 0.46), 0 18px 30px rgba(3, 24, 50, 0.35);
    transform: translateX(-50%);
    backdrop-filter: blur(12px);
}

.sunwake-bottom-nav button {
    position: relative;
    min-height: 59px;
    padding: 6px 5px;
    display: grid;
    place-items: center;
    gap: 2px;
    border: 2px solid transparent;
    border-radius: 13px;
    background: transparent;
    color: #b6dce8;
    cursor: pointer;
    transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}

.sunwake-bottom-nav button:hover,
.sunwake-bottom-nav button:focus-visible,
.sunwake-bottom-nav button.is-active {
    border-color: rgba(255, 215, 99, 0.6);
    outline: none;
    background: linear-gradient(180deg, rgba(255, 200, 79, 0.3), rgba(239, 82, 100, 0.12));
    color: #fff0ac;
    transform: translateY(-2px);
}

.sunwake-bottom-nav button > span {
    font-size: 23px;
    line-height: 1;
}

.sunwake-bottom-nav button > small {
    font-size: 9px;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sunwake-bottom-nav button > b {
    position: absolute;
    top: 0;
    right: 10px;
    min-width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border: 2px solid #4a2638;
    border-radius: 999px;
    background: #ec4e64;
    color: white;
    font-size: 8px;
}

.sunwake-chapter-badge {
    position: absolute;
    right: 24px;
    bottom: 24px;
    z-index: 60;
    width: 210px;
    padding: 12px 16px;
    border: 3px solid rgba(255, 232, 154, 0.64);
    border-radius: 15px;
    background: linear-gradient(180deg, rgba(20, 69, 101, 0.92), rgba(6, 35, 67, 0.94));
    box-shadow: 0 8px 0 rgba(3, 22, 48, 0.42);
    color: #d9f2f4;
}

.sunwake-chapter-badge small,
.sunwake-chapter-badge strong,
.sunwake-chapter-badge span {
    display: block;
}

.sunwake-chapter-badge small {
    color: #ffd76e;
    font-size: 8px;
    font-weight: 950;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.sunwake-chapter-badge strong {
    margin-top: 2px;
    color: #fff5d4;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 17px;
}

.sunwake-chapter-badge span {
    margin-top: 2px;
    color: #9ed1df;
    font-size: 10px;
}

.sunwake-dialog {
    width: min(470px, calc(100% - 30px));
    padding: 0;
    border: 4px solid #4c2d3a;
    border-radius: 22px;
    background: #fff1bd;
    color: #3e2a36;
    box-shadow: 12px 14px 0 rgba(5, 23, 49, 0.74);
}

.sunwake-dialog::backdrop {
    background: rgba(2, 20, 45, 0.68);
    backdrop-filter: blur(7px);
}

.sunwake-dialog form {
    position: relative;
    padding: 34px;
    display: grid;
    justify-items: center;
    text-align: center;
}

.sunwake-dialog-close {
    position: absolute;
    top: 11px;
    right: 11px;
    width: 36px;
    height: 36px;
    border: 3px solid #4b2a38;
    border-radius: 50%;
    background: #e84e65;
    color: #fff8d5;
    font-size: 23px;
    cursor: pointer;
}

.sunwake-dialog-emblem {
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    border: 4px solid #4a2c3a;
    border-radius: 24px;
    background: linear-gradient(145deg, #46c9c4, #225b8f);
    box-shadow: 0 7px 0 rgba(65, 35, 51, 0.65);
    color: #fff1a4;
    font-size: 34px;
    transform: rotate(-4deg);
}

.sunwake-dialog p {
    margin: 20px 0 5px;
    color: #bd4852;
    font-size: 9px;
    font-weight: 950;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.sunwake-dialog h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 34px;
}

#feature-description {
    margin: 14px 0 25px;
    color: #6f4d4d;
    line-height: 1.6;
}

.sunwake-dialog-return {
    min-height: 48px;
    padding: 0 22px;
    border: 3px solid #4a2c39;
    border-radius: 13px;
    background: linear-gradient(180deg, #ffd369, #e8913d);
    box-shadow: 0 6px 0 #5a3440;
    color: #3d2935;
    font-weight: 950;
    cursor: pointer;
}

@keyframes sunwake-world-drift {
    from { transform: scale(1.015) translate3d(-0.2%, 0, 0); }
    to { transform: scale(1.035) translate3d(0.3%, -0.2%, 0); }
}

@keyframes sunwake-cloud-float {
    from { transform: translateX(-12vw) scale(0.82); }
    to { transform: translateX(112vw) scale(0.82); }
}

@keyframes sunwake-wave-shift {
    from { transform: translateX(-2%) scaleX(0.96); }
    to { transform: translateX(2%) scaleX(1.04); }
}

@keyframes sunwake-sparkle {
    0%, 100% { opacity: 0.25; transform: scale(0.6) rotate(0deg); }
    50% { opacity: 1; transform: scale(1.25) rotate(45deg); }
}

@keyframes sunwake-captain-idle {
    0%, 100% { transform: translateY(0) rotate(-0.25deg); }
    50% { transform: translateY(-7px) rotate(0.4deg); }
}

@media (max-width: 1260px) {
    .sunwake-topbar {
        grid-template-columns: minmax(220px, 1fr) auto;
    }

    .sunwake-currencies {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .sunwake-actions {
        grid-column: 2;
        grid-row: 1;
    }

    .sunwake-topbar {
        min-height: 126px;
    }

    .sunwake-mission {
        top: 162px;
    }

    .destination-story,
    .destination-heroes {
        top: 31%;
    }

    .sunwake-captain-art {
        right: 31%;
        width: min(24vw, 340px);
    }

    .sunwake-chapter-badge {
        display: none;
    }
}

@media (max-width: 980px) {
    .sunwake-lobby {
        min-height: 760px;
    }

    .sunwake-topbar {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .sunwake-mission {
        top: 151px;
        left: 14px;
        transform: scale(0.92) rotate(-0.8deg);
        transform-origin: left top;
    }

    .sunwake-destination {
        transform: scale(0.82);
    }

    .sunwake-destination:hover,
    .sunwake-destination:focus-visible {
        transform: translateY(-5px) scale(0.86);
    }

    .destination-story {
        left: 0;
    }

    .destination-tavern {
        left: 3%;
    }

    .destination-heroes {
        right: 0;
    }

    .destination-shop {
        right: 16%;
    }

    .destination-shipyard {
        right: 0;
    }

    .destination-formation {
        left: 20%;
    }

    .sunwake-captain-art {
        right: 29%;
        width: min(29vw, 310px);
    }
}

@media (max-width: 720px) {
    .game-page {
        overflow-y: auto;
    }

    .sunwake-lobby {
        min-height: 850px;
        overflow-y: auto;
    }

    .sunwake-topbar {
        position: relative;
        top: auto;
        right: auto;
        left: auto;
        margin: 10px;
        grid-template-columns: 1fr auto;
    }

    .sunwake-currencies {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 2px;
    }

    .currency-chip {
        flex: 0 0 118px;
    }

    .sunwake-world {
        top: 132px;
    }

    .sunwake-mission {
        top: 150px;
        width: calc(100% - 28px);
    }

    .sunwake-destinations {
        top: 132px;
    }

    .sunwake-destination {
        transform: scale(0.72);
    }

    .sunwake-destination:hover,
    .sunwake-destination:focus-visible {
        transform: translateY(-4px) scale(0.75);
    }

    .destination-story {
        top: 23%;
        left: -7%;
    }

    .destination-tavern {
        bottom: 20%;
        left: -6%;
    }

    .destination-heroes {
        top: 23%;
        right: -7%;
    }

    .destination-shop {
        top: 48%;
        right: 8%;
    }

    .destination-shipyard {
        right: -6%;
        bottom: 20%;
    }

    .destination-formation {
        left: 12%;
        bottom: 20%;
    }

    .sunwake-captain-art {
        right: 26%;
        bottom: 11%;
        width: min(46vw, 250px);
    }

    .captain-nameplate {
        display: none;
    }

    .sunwake-bottom-nav {
        position: fixed;
        bottom: 8px;
        min-width: calc(100% - 20px);
        grid-template-columns: repeat(5, 1fr);
    }

    .sunwake-bottom-nav button {
        min-height: 53px;
    }
}

@media (max-height: 720px) and (min-width: 721px) {
    .sunwake-lobby {
        min-height: 720px;
    }

    .sunwake-mission {
        transform: scale(0.82) rotate(-0.8deg);
        transform-origin: left top;
    }

    .sunwake-destination {
        transform: scale(0.76);
    }

    .sunwake-destination:hover,
    .sunwake-destination:focus-visible {
        transform: translateY(-4px) scale(0.79);
    }

    .sunwake-captain-art {
        width: min(22vw, 290px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .sunwake-world-art,
    .sunwake-cloud,
    .sunwake-spark,
    .sunwake-wave,
    .sunwake-captain-art img {
        animation: none;
    }

    .sunwake-destination,
    .sunwake-round-button,
    .sunwake-bottom-nav button {
        transition: none;
    }
}

/* Layered Pirate Clash lobby v2 — fixed 1920×1080 composition with separate assets. */
.layered-game-page {
    overflow: hidden;
    background: #020914;
}

.layered-game-page .site-noise {
    display: none;
}

.pc-layered-lobby {
    position: fixed;
    inset: 0;
    min-width: 320px;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    color: #fff3cc;
    background:
        radial-gradient(circle at 50% 45%, #10395d 0, #061524 55%, #020914 100%);
    isolation: isolate;
    --canvas-scale: 1;
    --pointer-x: 0;
    --pointer-y: 0;
}

.pc-lobby-canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1920px;
    height: 1080px;
    overflow: hidden;
    transform: translate(-50%, -50%) scale(var(--canvas-scale));
    transform-origin: center center;
    box-shadow: 0 0 70px rgba(0, 0, 0, 0.55);
    will-change: transform;
}

.pc-background-stack,
.pc-scene-assets,
.pc-main-controls {
    position: absolute;
    inset: 0;
}

.pc-background-stack {
    z-index: 0;
    overflow: hidden;
    background: #0870b4;
}

.pc-bg-layer,
.pc-fx,
.pc-scene-asset {
    position: absolute;
    display: block;
    max-width: none;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.pc-bg-layer {
    inset: 0;
    width: 1920px;
    height: 1080px;
    object-fit: cover;
    will-change: transform;
}

.pc-bg-sky {
    z-index: 1;
    transform: translate3d(
        calc(var(--pointer-x) * -4px),
        calc(var(--pointer-y) * -2px),
        0
    ) scale(1.008);
}

.pc-bg-city {
    z-index: 2;
    opacity: 0.98;
    -webkit-mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        transparent 17%,
        #000 30%,
        #000 72%,
        transparent 82%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        transparent 17%,
        #000 30%,
        #000 72%,
        transparent 82%,
        transparent 100%
    );
    transform: translate3d(
        calc(var(--pointer-x) * -7px),
        calc(var(--pointer-y) * -4px),
        0
    ) scale(1.012);
}

.pc-bg-sea {
    z-index: 3;
    -webkit-mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        transparent 43%,
        #000 55%,
        #000 100%
    );
    mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        transparent 43%,
        #000 55%,
        #000 100%
    );
    transform: translate3d(
        calc(var(--pointer-x) * -10px),
        calc(var(--pointer-y) * -5px),
        0
    ) scale(1.018);
}

.pc-bg-dock {
    z-index: 5;
    -webkit-mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        transparent 58%,
        rgba(0, 0, 0, 0.42) 66%,
        #000 76%,
        #000 100%
    );
    mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        transparent 58%,
        rgba(0, 0, 0, 0.42) 66%,
        #000 76%,
        #000 100%
    );
    transform: translate3d(
        calc(var(--pointer-x) * -13px),
        calc(var(--pointer-y) * -7px),
        0
    ) scale(1.022);
}

.pc-scene-shade {
    position: absolute;
    inset: 0;
    z-index: 12;
    pointer-events: none;
    background:
        linear-gradient(to bottom, rgba(1, 7, 16, 0.55) 0, transparent 15%, transparent 78%, rgba(1, 7, 16, 0.54) 100%),
        linear-gradient(to right, rgba(1, 7, 16, 0.35), transparent 11%, transparent 89%, rgba(1, 7, 16, 0.35)),
        radial-gradient(circle at 50% 45%, transparent 42%, rgba(1, 7, 16, 0.13) 100%);
}

.pc-fx {
    z-index: 8;
    object-fit: contain;
    will-change: transform, opacity;
}

.pc-fx-sun-rays {
    top: 20px;
    left: 690px;
    width: 540px;
    opacity: 0.24;
    mix-blend-mode: screen;
    animation: pcSunPulse 7s ease-in-out infinite;
}

.pc-fx-cloud {
    opacity: 0.38;
    filter: drop-shadow(0 10px 15px rgba(14, 58, 89, 0.12));
}

.pc-fx-cloud-one {
    top: 150px;
    left: -340px;
    width: 360px;
    animation: pcCloudDriftOne 46s linear infinite;
}

.pc-fx-cloud-two {
    top: 205px;
    left: 720px;
    width: 320px;
    opacity: 0.28;
    animation: pcCloudDriftTwo 58s linear infinite;
}

.pc-fx-cloud-three {
    top: 105px;
    right: -330px;
    width: 340px;
    animation: pcCloudDriftThree 50s linear infinite;
}

.pc-fx-water {
    z-index: 7;
    left: 0;
    bottom: 80px;
    width: 1920px;
    height: 520px;
    object-fit: cover;
    opacity: 0.13;
    mix-blend-mode: screen;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 28%, #000);
    mask-image: linear-gradient(to bottom, transparent, #000 28%, #000);
    animation: pcWaterMove 10s ease-in-out infinite alternate;
}

.pc-fx-particles {
    top: 190px;
    left: 470px;
    width: 900px;
    height: 600px;
    opacity: 0.28;
    mix-blend-mode: screen;
    animation: pcParticlesFloat 12s ease-in-out infinite;
}

.pc-fx-sparkles {
    top: 240px;
    left: 1100px;
    width: 300px;
    opacity: 0.34;
    mix-blend-mode: screen;
    animation: pcSparklePulse 4.8s ease-in-out infinite;
}

.pc-fx-light-streak {
    top: 430px;
    left: 700px;
    width: 520px;
    opacity: 0.16;
    mix-blend-mode: screen;
    animation: pcLightSweep 9s ease-in-out infinite;
}

.pc-scene-assets {
    z-index: 10;
    pointer-events: none;
}

.pc-scene-asset {
    object-fit: contain;
    filter: drop-shadow(0 24px 26px rgba(0, 0, 0, 0.32));
    will-change: transform;
}

.pc-scene-ship {
    right: 118px;
    bottom: 118px;
    z-index: 3;
    width: 520px;
    animation: pcShipBob 5.8s ease-in-out infinite;
    transform-origin: 50% 84%;
}

.pc-scene-hero {
    left: 855px;
    bottom: 145px;
    z-index: 5;
    width: 210px;
    animation: pcHeroBreathe 4.4s ease-in-out infinite;
    transform-origin: 50% 100%;
}

.pc-scene-wheel {
    left: -30px;
    bottom: -52px;
    z-index: 7;
    width: 300px;
    animation: pcWheelRock 8s ease-in-out infinite;
    transform-origin: 50% 50%;
}

.pc-scene-minimap {
    right: -18px;
    bottom: -24px;
    z-index: 8;
    width: 292px;
    animation: pcMapFloat 5.5s ease-in-out infinite;
}

.pc-top-hud {
    position: absolute;
    z-index: 50;
    top: 22px;
    left: 24px;
    right: 24px;
    height: 112px;
    display: grid;
    grid-template-columns: 430px 1fr 360px;
    align-items: center;
    gap: 18px;
    padding: 10px 16px;
    border: 2px solid rgba(214, 164, 68, 0.58);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(7, 18, 31, 0.96), rgba(5, 14, 25, 0.91));
    box-shadow:
        inset 0 0 0 1px rgba(255, 226, 145, 0.12),
        0 18px 32px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(8px);
}

.pc-image-control {
    position: relative;
    appearance: none;
    margin: 0;
    padding: 0;
    border: 0;
    color: inherit;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.pc-image-control > img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.30));
    transition:
        transform 160ms ease,
        filter 160ms ease,
        opacity 160ms ease;
}

.pc-image-control::after {
    content: "";
    position: absolute;
    inset: 10%;
    z-index: -1;
    border-radius: 50%;
    opacity: 0;
    background: radial-gradient(circle, rgba(255, 213, 91, 0.38), transparent 68%);
    transform: scale(0.75);
    transition: opacity 160ms ease, transform 160ms ease;
    pointer-events: none;
}

.pc-image-control:hover > img,
.pc-image-control:focus-visible > img {
    transform: translateY(-5px) scale(1.045);
    filter:
        drop-shadow(0 13px 15px rgba(0, 0, 0, 0.44))
        drop-shadow(0 0 10px rgba(255, 206, 80, 0.68));
}

.pc-image-control:hover::after,
.pc-image-control:focus-visible::after {
    opacity: 1;
    transform: scale(1.12);
}

.pc-image-control:active > img {
    transform: translateY(1px) scale(0.98);
}

.pc-image-control:focus-visible {
    outline: 3px solid #fff1ad;
    outline-offset: 5px;
    border-radius: 14px;
}

.pc-profile-control {
    display: flex;
    align-items: center;
    gap: 14px;
    width: max-content;
    min-width: 0;
    text-align: left;
}

.pc-profile-control > img {
    width: 76px;
    flex: 0 0 auto;
}

.pc-profile-copy {
    min-width: 0;
    display: grid;
    line-height: 1.05;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.78);
}

.pc-profile-copy small {
    color: #eec86f;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.pc-profile-copy strong {
    max-width: 18ch;
    overflow: hidden;
    color: #fff7dd;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 28px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pc-profile-copy span {
    color: #d7e1e9;
    font-size: 12px;
    font-weight: 800;
}

.pc-resource-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.pc-resource-control {
    width: 186px;
}

.pc-utility-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.pc-utility-control {
    width: 54px;
}

.pc-side-controls {
    position: absolute;
    z-index: 36;
    top: 150px;
    width: 106px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.pc-side-controls-left {
    left: 18px;
}

.pc-side-controls-right {
    right: 18px;
    top: 175px;
    gap: 18px;
}

.pc-side-control {
    width: 96px;
    pointer-events: auto;
    animation: pcControlFloat 5.4s ease-in-out infinite;
}

.pc-side-controls-left .pc-side-control:nth-child(2),
.pc-side-controls-right .pc-side-control:nth-child(2) {
    animation-delay: -1.4s;
}

.pc-side-controls-left .pc-side-control:nth-child(3),
.pc-side-controls-right .pc-side-control:nth-child(3) {
    animation-delay: -2.8s;
}

.pc-side-controls-left .pc-side-control:nth-child(4) {
    animation-delay: -4.1s;
}

.pc-main-controls {
    z-index: 30;
    pointer-events: none;
}

.pc-main-control {
    position: absolute;
    pointer-events: auto;
    animation: pcMainControlFloat 5.8s ease-in-out infinite;
}

.pc-main-story {
    left: 550px;
    top: 245px;
    width: 230px;
}

.pc-main-crew {
    left: 1140px;
    top: 245px;
    width: 232px;
    animation-delay: -1.2s;
}

.pc-main-battle {
    left: 842px;
    top: 335px;
    width: 236px;
    animation-delay: -2.4s;
}

.pc-main-tavern {
    left: 430px;
    top: 460px;
    width: 190px;
    animation-delay: -3.2s;
}

.pc-main-shipyard {
    left: 1260px;
    top: 468px;
    width: 252px;
    animation-delay: -4s;
}

.pc-main-shop {
    left: 550px;
    top: 635px;
    width: 228px;
    animation-delay: -4.8s;
}

.pc-main-formation {
    left: 1095px;
    top: 646px;
    width: 278px;
    animation-delay: -5.5s;
}

.pc-bottom-navigation {
    position: absolute;
    z-index: 46;
    left: 50%;
    bottom: 18px;
    width: 900px;
    height: 164px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 10px;
    padding: 8px 16px 4px;
    border: 2px solid rgba(214, 164, 68, 0.55);
    border-radius: 25px 25px 9px 9px;
    background: linear-gradient(180deg, rgba(8, 18, 30, 0.73), rgba(3, 9, 17, 0.92));
    box-shadow:
        inset 0 0 0 1px rgba(255, 226, 145, 0.10),
        0 -8px 26px rgba(0, 0, 0, 0.26);
    transform: translateX(-50%);
    backdrop-filter: blur(6px);
}

.pc-nav-control {
    z-index: 2;
    width: 104px;
    flex: 0 0 auto;
}

.pc-nav-adventure {
    width: 122px;
}

.pc-nav-control.is-active > img {
    filter:
        drop-shadow(0 12px 14px rgba(0, 0, 0, 0.38))
        drop-shadow(0 0 13px rgba(255, 205, 72, 0.85));
}

.pc-nav-glow {
    position: absolute;
    z-index: 1;
    left: 389px;
    bottom: -12px;
    width: 142px;
    opacity: 0.5;
    pointer-events: none;
    animation: pcNavGlow 3s ease-in-out infinite;
}

.pc-feature-dialog {
    width: min(500px, calc(100% - 32px));
    padding: 0;
    border: 0;
    border-radius: 22px;
    color: #f9f0d6;
    background: transparent;
}

.pc-feature-dialog::backdrop {
    background: rgba(1, 7, 12, 0.76);
    backdrop-filter: blur(6px);
}

.pc-dialog-card {
    position: relative;
    margin: 0;
    padding: 34px;
    border: 3px solid #b88a32;
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(232, 176, 59, 0.22), transparent 12rem),
        linear-gradient(160deg, #172337, #080d16);
    box-shadow:
        inset 0 0 0 2px rgba(255, 224, 142, 0.18),
        0 26px 80px rgba(0, 0, 0, 0.65);
}

.pc-dialog-close {
    position: absolute;
    top: 13px;
    right: 14px;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 232, 176, 0.38);
    border-radius: 50%;
    color: #fff2c8;
    background: rgba(255, 255, 255, 0.06);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.pc-dialog-kicker {
    margin: 0 0 7px;
    color: #e6b64e;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.pc-feature-dialog h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(30px, 7vw, 44px);
}

.pc-feature-dialog h2 + p {
    margin: 17px 0 0;
    color: #cdd5df;
    line-height: 1.65;
}

.pc-account-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
}

.pc-fullscreen-button,
.pc-logout-button,
.pc-dialog-return {
    width: 100%;
    min-height: 48px;
    border: 2px solid #d0a142;
    border-radius: 10px;
    color: #111a25;
    background: linear-gradient(#ffe28a, #d8a638);
    font-weight: 900;
    cursor: pointer;
}

.pc-logout-button {
    color: #fff2dc;
    border-color: #9c4937;
    background: linear-gradient(#c8614a, #8e3425);
}

.pc-dialog-return {
    margin-top: 24px;
}

.pc-account-actions + .pc-dialog-return {
    margin-top: 12px;
}

.pc-rotate-hint {
    display: none;
}

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

@keyframes pcSunPulse {
    0%, 100% { opacity: 0.17; transform: scale(0.97); }
    50% { opacity: 0.3; transform: scale(1.03); }
}

@keyframes pcCloudDriftOne {
    0% { transform: translateX(0); }
    100% { transform: translateX(2300px); }
}

@keyframes pcCloudDriftTwo {
    0% { transform: translateX(-950px) scale(0.84); }
    100% { transform: translateX(1300px) scale(0.84); }
}

@keyframes pcCloudDriftThree {
    0% { transform: translateX(0) scale(0.92); }
    100% { transform: translateX(-2250px) scale(0.92); }
}

@keyframes pcWaterMove {
    from { transform: translate3d(-18px, 0, 0) scale(1.02); opacity: 0.09; }
    to { transform: translate3d(18px, -9px, 0) scale(1.045); opacity: 0.17; }
}

@keyframes pcParticlesFloat {
    0%, 100% { transform: translate3d(-10px, 8px, 0); opacity: 0.18; }
    50% { transform: translate3d(18px, -14px, 0); opacity: 0.34; }
}

@keyframes pcSparklePulse {
    0%, 100% { transform: rotate(-3deg) scale(0.94); opacity: 0.2; }
    50% { transform: rotate(3deg) scale(1.05); opacity: 0.42; }
}

@keyframes pcLightSweep {
    0%, 100% { transform: translateX(-80px) scaleX(0.88); opacity: 0.05; }
    45%, 60% { transform: translateX(90px) scaleX(1.08); opacity: 0.2; }
}

@keyframes pcShipBob {
    0%, 100% { transform: translateY(0) rotate(-0.25deg); }
    50% { transform: translateY(-8px) rotate(0.35deg); }
}

@keyframes pcHeroBreathe {
    0%, 100% { transform: translateY(0) scaleY(1); }
    50% { transform: translateY(-4px) scaleY(1.01); }
}

@keyframes pcWheelRock {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

@keyframes pcMapFloat {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-6px) rotate(0.8deg); }
}

@keyframes pcControlFloat {
    0%, 100% { margin-top: 0; }
    50% { margin-top: -4px; }
}

@keyframes pcMainControlFloat {
    0%, 100% { margin-top: 0; }
    50% { margin-top: -4px; }
}

@keyframes pcNavGlow {
    0%, 100% { opacity: 0.3; transform: scale(0.92) rotate(0); }
    50% { opacity: 0.62; transform: scale(1.05) rotate(7deg); }
}

@media (orientation: portrait) and (max-width: 900px) {
    .pc-rotate-hint {
        position: fixed;
        z-index: 100;
        right: 20px;
        bottom: 20px;
        left: 20px;
        display: grid;
        gap: 4px;
        padding: 14px 16px;
        border: 2px solid rgba(255, 223, 133, 0.64);
        border-radius: 12px;
        color: #fff2cf;
        background: rgba(4, 11, 18, 0.90);
        text-align: center;
        box-shadow: 0 12px 34px rgba(0, 0, 0, 0.42);
    }

    .pc-rotate-hint span {
        color: #cbd5df;
        font-size: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pc-bg-layer,
    .pc-fx,
    .pc-scene-asset,
    .pc-side-control,
    .pc-main-control,
    .pc-nav-glow {
        animation: none !important;
        transition: none !important;
    }
}


/* Real layered lobby v5 — dimension-matched 1920x1080 composition. */
.pc-layered-game-page {
    margin: 0;
    overflow: hidden;
    background: #020914;
}

.pc-layered-game-page .site-noise {
    display: none;
}

.pc-layered-lobby {
    --canvas-scale: 1;
    --pointer-x: 0;
    --pointer-y: 0;
    position: fixed;
    inset: 0;
    overflow: hidden;
    isolation: isolate;
    background: #020914;
}

.pc-layered-backdrop {
    position: absolute;
    inset: -56px;
    background-image:
        linear-gradient(rgba(1, 8, 16, .36), rgba(1, 8, 16, .56)),
        var(--pc-backdrop-art);
    background-size: cover;
    background-position: center;
    filter: blur(24px) saturate(.9);
    transform: scale(1.12);
    opacity: .78;
}

.pc-layered-canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1920px;
    height: 1080px;
    overflow: hidden;
    transform: translate(-50%, -50%) scale(var(--canvas-scale));
    transform-origin: center;
    background: #0c5586;
    box-shadow: 0 0 90px rgba(0, 0, 0, .72);
}

.pc-layered-background,
.pc-layered-controls {
    position: absolute;
    inset: 0;
}

.pc-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    width: 1920px;
    height: 1080px;
    max-width: none;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
    image-rendering: auto;
    backface-visibility: hidden;
}

.pc-layer-base {
    z-index: 1;
    filter: saturate(1.04) contrast(1.03);
    transform: translate3d(calc(var(--pointer-x) * -3px), calc(var(--pointer-y) * -2px), 0);
}

.pc-layered-background::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 7;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 36%, transparent 0 27%, rgba(2, 10, 20, .05) 58%, rgba(2, 8, 16, .30) 100%),
        linear-gradient(180deg, rgba(0,0,0,.10), transparent 18%, transparent 78%, rgba(0,0,0,.27));
}

.pc-fx {
    position: absolute;
    z-index: 6;
    display: block;
    max-width: none;
    pointer-events: none;
    user-select: none;
}

.pc-fx-rays {
    top: 120px;
    left: 755px;
    width: 410px;
    opacity: .12;
    mix-blend-mode: screen;
    animation: pcLayeredRayPulse 7s ease-in-out infinite;
}

.pc-fx-cloud {
    opacity: .20;
    filter: blur(.35px);
}

.pc-fx-cloud-one {
    top: 150px;
    left: -360px;
    width: 320px;
    animation: pcLayeredCloudRight 46s linear infinite;
}

.pc-fx-cloud-two {
    top: 185px;
    right: -360px;
    width: 315px;
    animation: pcLayeredCloudLeft 52s linear infinite;
}

.pc-fx-cloud-three {
    display: none;
}

.pc-fx-water {
    left: 360px;
    top: 360px;
    width: 1200px;
    height: 250px;
    object-fit: cover;
    opacity: .08;
    mix-blend-mode: screen;
    animation: pcLayeredWater 6.5s ease-in-out infinite alternate;
}

.pc-fx-particles {
    left: 730px;
    top: 300px;
    width: 420px;
    opacity: .10;
    mix-blend-mode: screen;
    animation: pcLayeredParticles 7s ease-in-out infinite;
}

.pc-fx-sparkles {
    left: 760px;
    top: 260px;
    width: 390px;
    opacity: .08;
    mix-blend-mode: screen;
    animation: pcLayeredSparkle 6s ease-in-out infinite;
}

.pc-fx-light {
    left: 735px;
    top: 465px;
    width: 430px;
    opacity: .06;
    mix-blend-mode: screen;
    animation: pcLayeredLight 8s ease-in-out infinite;
}

.pc-layered-hud {
    position: absolute;
    z-index: 20;
    top: 14px;
    left: 18px;
    right: 18px;
    height: 105px;
    border: 2px solid rgba(205, 151, 55, .72);
    border-radius: 26px;
    background:
        linear-gradient(180deg, rgba(9, 23, 40, .97), rgba(3, 14, 26, .96)),
        radial-gradient(circle at 50% 0, rgba(73, 141, 189, .18), transparent 60%);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .36), inset 0 1px rgba(255,255,255,.05);
}

.pc-layered-profile {
    position: absolute;
    z-index: 24;
    top: 17px;
    left: 34px;
    height: 98px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff1c9;
}

.pc-layered-profile > img {
    display: block;
    width: 90px;
    height: 95px;
    object-fit: contain;
    filter: drop-shadow(0 6px 8px rgba(0,0,0,.42));
}

.pc-layered-profile-copy {
    display: grid;
    line-height: 1;
}

.pc-layered-profile-copy small {
    color: #f2cb66;
    font: 800 12px/1 system-ui, sans-serif;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.pc-layered-profile-copy strong {
    margin-top: 4px;
    color: #fff5d9;
    font: 900 31px/.95 Georgia, serif;
    text-shadow: 0 3px 2px rgba(0,0,0,.42);
}

.pc-layered-profile-copy span {
    margin-top: 7px;
    color: #dae5ee;
    font: 700 12px/1 system-ui, sans-serif;
}

.pc-scene {
    position: absolute;
    z-index: 10;
    display: block;
    max-width: none;
    pointer-events: none;
    user-select: none;
    image-rendering: auto;
    filter: drop-shadow(0 14px 18px rgba(0,0,0,.28));
}

.pc-scene-ship {
    left: 1395px;
    top: 478px;
    width: 390px;
    height: auto;
    transform-origin: 50% 82%;
    animation: pcLayeredShip 6.2s ease-in-out infinite;
}

.pc-scene-hero {
    left: 873px;
    top: 548px;
    width: 174px;
    height: auto;
    z-index: 12;
    transform-origin: 50% 100%;
    animation: pcLayeredHero 4.8s ease-in-out infinite;
}

.pc-scene-wheel {
    left: 28px;
    top: 830px;
    width: 185px;
    height: auto;
    z-index: 13;
    transform: rotate(-2deg);
}

.pc-scene-map {
    right: 25px;
    top: 830px;
    width: 188px;
    height: auto;
    z-index: 13;
}

.pc-layered-nav-panel {
    position: absolute;
    z-index: 18;
    left: 565px;
    bottom: 24px;
    width: 780px;
    height: 132px;
    border: 2px solid rgba(205, 151, 55, .68);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(8, 18, 31, .90), rgba(3, 10, 18, .95));
    box-shadow: 0 16px 34px rgba(0,0,0,.40), inset 0 1px rgba(255,255,255,.05);
}

.pc-layered-controls {
    z-index: 30;
}

.pc-layered-control {
    --x: 0;
    --y: 0;
    --w: 100;
    --h: 100;
    position: absolute;
    left: calc(var(--x) * 1px);
    top: calc(var(--y) * 1px);
    width: calc(var(--w) * 1px);
    height: calc(var(--h) * 1px);
    padding: 0;
    border: 0;
    border-radius: 14px;
    background: transparent;
    cursor: pointer;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    isolation: isolate;
}

.pc-layered-control > img {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: auto;
    filter: drop-shadow(0 7px 7px rgba(0,0,0,.34));
    transform: translateZ(0) scale(1);
    transform-origin: center;
    transition: transform 150ms ease, filter 150ms ease;
    pointer-events: none;
    user-select: none;
}

.pc-layered-control::before {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 14%;
    border-radius: 22px;
    opacity: 0;
    background: radial-gradient(ellipse, rgba(255, 220, 104, .44), rgba(255, 176, 26, .08) 47%, transparent 72%);
    filter: blur(6px);
    transform: scale(.86);
    transition: opacity 150ms ease, transform 150ms ease;
    pointer-events: none;
}

.pc-layered-control:hover > img,
.pc-layered-control:focus-visible > img {
    transform: translateY(-4px) scale(1.045);
    filter:
        drop-shadow(0 10px 8px rgba(0,0,0,.44))
        drop-shadow(0 0 8px rgba(255, 219, 106, .52));
}

.pc-layered-control:hover::before,
.pc-layered-control:focus-visible::before {
    opacity: 1;
    transform: scale(1.04);
}

.pc-layered-control:active > img {
    transform: translateY(-1px) scale(.985);
}

.pc-layered-control:focus-visible {
    outline: 4px solid rgba(255, 235, 154, .96);
    outline-offset: 4px;
}

.pc-layered-control.is-active::after {
    content: "";
    position: absolute;
    z-index: 0;
    inset: 15%;
    border: 3px solid rgba(255, 205, 66, .70);
    border-radius: 50%;
    filter: blur(1px);
    box-shadow: 0 0 18px rgba(255, 202, 57, .56);
    animation: pcLayeredActive 2.6s ease-in-out infinite;
    pointer-events: none;
}

.pc-layered-live,
.pc-layered-rotate-hint {
    display: none;
}

.pc-layered-dialog {
    width: min(520px, calc(100vw - 32px));
    padding: 0;
    border: 0;
    border-radius: 24px;
    color: #fff2ce;
    background: transparent;
}

.pc-layered-dialog::backdrop {
    background: rgba(1, 6, 12, .68);
    backdrop-filter: blur(7px);
}

.pc-layered-dialog-card {
    position: relative;
    overflow: hidden;
    padding: 30px;
    border: 2px solid rgba(227, 176, 77, .78);
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(12, 29, 47, .99), rgba(4, 14, 25, .99)),
        radial-gradient(circle at 50% 0, rgba(91, 155, 197, .2), transparent 70%);
    box-shadow: 0 26px 70px rgba(0,0,0,.58);
}

.pc-layered-dialog-close {
    position: absolute;
    top: 13px;
    right: 14px;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255,220,145,.35);
    border-radius: 50%;
    color: #fff0cc;
    background: rgba(255,255,255,.07);
    cursor: pointer;
    font: 700 28px/1 system-ui, sans-serif;
}

.pc-layered-dialog-kicker {
    margin: 0 54px 6px 0;
    color: #efc75f;
    font: 800 12px/1.2 system-ui, sans-serif;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.pc-layered-dialog h2 {
    margin: 0 50px 12px 0;
    font: 800 34px/1.05 Georgia, serif;
}

.pc-layered-dialog h2 + p {
    margin: 0;
    color: #d9e4ed;
    font: 500 16px/1.55 system-ui, sans-serif;
}

.pc-layered-account-actions {
    display: flex;
    gap: 12px;
    margin-top: 22px;
}

.pc-layered-fullscreen-button,
.pc-layered-logout-button,
.pc-layered-dialog-return {
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid rgba(234, 191, 100, .62);
    border-radius: 12px;
    color: #1c1207;
    background: linear-gradient(180deg, #f4d16d, #c98225);
    cursor: pointer;
    font: 800 14px/1 system-ui, sans-serif;
}

.pc-layered-logout-button {
    color: #fff0e5;
    background: linear-gradient(180deg, #b94f39, #7a261c);
}

.pc-layered-dialog-return {
    margin-top: 20px;
    color: #f8e9c4;
    background: rgba(255,255,255,.06);
}

.pc-layered-account-actions + .pc-layered-dialog-return {
    margin-top: 12px;
}

@keyframes pcLayeredRayPulse {
    0%, 100% { opacity: .08; transform: scale(.98); }
    50% { opacity: .16; transform: scale(1.03); }
}

@keyframes pcLayeredCloudRight {
    from { transform: translateX(0); }
    to { transform: translateX(2400px); }
}

@keyframes pcLayeredCloudLeft {
    from { transform: translateX(0); }
    to { transform: translateX(-2400px); }
}

@keyframes pcLayeredWater {
    from { transform: translateX(-8px) scale(1.005); opacity: .05; }
    to { transform: translateX(10px) translateY(-3px) scale(1.015); opacity: .10; }
}

@keyframes pcLayeredParticles {
    0%, 100% { opacity: .06; transform: translateY(5px) scale(.98); }
    50% { opacity: .13; transform: translateY(-8px) scale(1.02); }
}

@keyframes pcLayeredSparkle {
    0%, 100% { opacity: .05; transform: rotate(-.5deg) scale(.98); }
    50% { opacity: .12; transform: rotate(.5deg) scale(1.02); }
}

@keyframes pcLayeredLight {
    0%, 100% { opacity: .03; transform: translateX(-38px); }
    45%, 60% { opacity: .08; transform: translateX(52px); }
}

@keyframes pcLayeredShip {
    0%, 100% { transform: translateY(0) rotate(-.18deg); }
    50% { transform: translateY(-5px) rotate(.22deg); }
}

@keyframes pcLayeredHero {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@keyframes pcLayeredActive {
    0%, 100% { opacity: .28; transform: scale(.94); }
    50% { opacity: .72; transform: scale(1.05); }
}

@media (orientation: portrait) and (max-width: 900px) {
    .pc-layered-rotate-hint {
        position: fixed;
        z-index: 100;
        right: 20px;
        bottom: 20px;
        left: 20px;
        display: grid;
        gap: 4px;
        padding: 14px 16px;
        border: 2px solid rgba(255, 223, 133, .64);
        border-radius: 12px;
        color: #fff2cf;
        background: rgba(4, 11, 18, .92);
        text-align: center;
        box-shadow: 0 12px 34px rgba(0,0,0,.42);
    }

    .pc-layered-rotate-hint span {
        color: #cbd5df;
        font-size: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pc-layer,
    .pc-fx,
    .pc-scene,
    .pc-layered-control > img,
    .pc-layered-control::before,
    .pc-layered-control.is-active::after {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}


/* Adventure / Story Map */
.pc-adventure-game-page {
    overflow: hidden;
    background: #07131f;
}

.pc-adventure-game-page .site-noise {
    opacity: .045;
    mix-blend-mode: screen;
}

.pc-adventure {
    --adventure-pointer-x: 0;
    --adventure-pointer-y: 0;
    position: relative;
    min-height: 100dvh;
    overflow: hidden;
    isolation: isolate;
    padding: 18px;
    color: #fff3cf;
    background: #071522;
}

.pc-adventure-backdrop {
    position: absolute;
    inset: -28px;
    z-index: -5;
    background:
        linear-gradient(180deg, rgba(4, 14, 25, .28), rgba(3, 11, 20, .72)),
        var(--pc-adventure-bg) center / cover no-repeat;
    filter: saturate(.88) brightness(.72);
    transform:
        scale(1.035)
        translate(
            calc(var(--adventure-pointer-x) * -7px),
            calc(var(--adventure-pointer-y) * -5px)
        );
    transition: transform 180ms ease-out;
}

.pc-adventure-backdrop::after {
    position: absolute;
    inset: 0;
    content: "";
    background:
        radial-gradient(circle at 50% 22%, rgba(255, 221, 133, .18), transparent 27rem),
        linear-gradient(90deg, rgba(2, 9, 17, .62), transparent 28%, transparent 72%, rgba(2, 9, 17, .62));
}

.pc-adventure-rays,
.pc-adventure-cloud {
    position: absolute;
    z-index: -2;
    pointer-events: none;
    user-select: none;
}

.pc-adventure-rays {
    top: 4%;
    left: 43%;
    width: 380px;
    opacity: .13;
    mix-blend-mode: screen;
    animation: pcAdventureRayPulse 6s ease-in-out infinite;
}

.pc-adventure-cloud {
    width: 360px;
    opacity: .15;
    filter: blur(.4px);
}

.pc-adventure-cloud-one {
    top: 8%;
    left: -220px;
    animation: pcAdventureCloudRight 34s linear infinite;
}

.pc-adventure-cloud-two {
    top: 16%;
    right: -230px;
    animation: pcAdventureCloudLeft 42s linear infinite;
}

.pc-adventure-topbar {
    position: relative;
    z-index: 10;
    min-height: 82px;
    display: grid;
    grid-template-columns: auto minmax(260px, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 12px 18px;
    border: 2px solid rgba(217, 164, 58, .68);
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(8, 29, 48, .97), rgba(3, 16, 29, .97)),
        radial-gradient(circle at 50% 0, rgba(58, 144, 192, .2), transparent 65%);
    box-shadow: 0 18px 45px rgba(0, 0, 0, .33);
}

.pc-adventure-back {
    min-width: 116px;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 16px;
    border: 1px solid rgba(255, 218, 130, .48);
    border-radius: 13px;
    color: #fff0c7;
    background: rgba(255, 255, 255, .06);
    font-weight: 900;
    text-decoration: none;
    transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

.pc-adventure-back:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 221, 142, .82);
    background: rgba(255, 255, 255, .1);
}

.pc-adventure-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.05;
    text-align: center;
}

.pc-adventure-title small {
    color: #edc963;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.pc-adventure-title strong {
    margin-top: 3px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(24px, 2vw, 34px);
}

.pc-adventure-title span {
    margin-top: 4px;
    color: #b9d3e2;
    font-size: 12px;
    font-weight: 700;
}

.pc-adventure-resources {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.pc-adventure-resources span {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 13px;
    border: 1px solid rgba(255, 218, 130, .28);
    border-radius: 999px;
    color: #fff3d3;
    background: rgba(2, 12, 22, .58);
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.pc-adventure-resources b {
    color: #e8bc50;
    font-size: 9px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.pc-adventure-shell {
    position: relative;
    z-index: 4;
    min-height: calc(100dvh - 118px);
    margin-top: 16px;
    display: grid;
    grid-template-columns: minmax(210px, 260px) minmax(560px, 1fr) minmax(250px, 320px);
    gap: 16px;
}

.pc-adventure-chapters,
.pc-adventure-stage-card {
    min-width: 0;
    border: 2px solid rgba(212, 160, 60, .54);
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(10, 31, 48, .95), rgba(4, 17, 29, .96)),
        radial-gradient(circle at 50% 0, rgba(66, 136, 172, .16), transparent 72%);
    box-shadow: 0 22px 50px rgba(0, 0, 0, .3);
    backdrop-filter: blur(8px);
}

.pc-adventure-chapters {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pc-adventure-captain {
    display: grid;
    grid-template-columns: 62px 1fr;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border: 1px solid rgba(255, 218, 130, .2);
    border-radius: 15px;
    background: rgba(255, 255, 255, .04);
}

.pc-adventure-captain img {
    width: 62px;
    height: 65px;
    object-fit: contain;
}

.pc-adventure-captain div {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.pc-adventure-captain small {
    color: #e9c25c;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.pc-adventure-captain strong {
    overflow: hidden;
    margin-top: 2px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 19px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pc-adventure-captain span {
    margin-top: 3px;
    color: #b8cfda;
    font-size: 11px;
    font-weight: 700;
}

.pc-adventure-chapter-list {
    display: grid;
    gap: 10px;
}

.pc-adventure-chapter {
    width: 100%;
    min-height: 76px;
    display: grid;
    grid-template-columns: 36px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(255, 218, 130, .2);
    border-radius: 14px;
    color: #e8eef2;
    background: rgba(255, 255, 255, .035);
    text-align: left;
    cursor: pointer;
    transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.pc-adventure-chapter:not(:disabled):hover {
    transform: translateX(3px);
    border-color: rgba(255, 218, 130, .5);
    background: rgba(255, 255, 255, .065);
}

.pc-adventure-chapter.is-active {
    border-color: rgba(240, 188, 72, .8);
    background: linear-gradient(90deg, rgba(202, 125, 30, .3), rgba(255, 255, 255, .04));
    box-shadow: inset 4px 0 0 #e8b643;
}

.pc-adventure-chapter:disabled {
    cursor: not-allowed;
    opacity: .5;
}

.pc-adventure-chapter-number {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 218, 130, .35);
    border-radius: 50%;
    color: #291b0e;
    background: linear-gradient(180deg, #f1cc68, #b66f20);
    font-weight: 950;
}

.pc-adventure-chapter-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.pc-adventure-chapter-copy small {
    color: #9fbac9;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.pc-adventure-chapter-copy strong {
    overflow: hidden;
    margin-top: 2px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pc-adventure-chapter-copy em {
    margin-top: 4px;
    color: #d5bc7f;
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
}

.pc-adventure-lock {
    font-size: 14px;
}

.pc-adventure-progress {
    margin-top: auto;
    padding: 12px;
    border: 1px solid rgba(255, 218, 130, .18);
    border-radius: 14px;
    background: rgba(255, 255, 255, .035);
}

.pc-adventure-progress > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #c8d9e1;
    font-size: 11px;
    font-weight: 800;
}

.pc-adventure-progress strong {
    color: #edc75d;
}

.pc-adventure-progress-track {
    height: 8px;
    margin-top: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
}

.pc-adventure-progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #d38429, #f3d36d);
}

.pc-adventure-map {
    min-width: 0;
    display: grid;
    grid-template-rows: auto 1fr;
    border: 2px solid rgba(215, 164, 68, .62);
    border-radius: 22px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(11, 36, 53, .9), rgba(4, 18, 29, .95));
    box-shadow: 0 22px 54px rgba(0, 0, 0, .33);
}

.pc-adventure-map-heading {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 18px;
    border-bottom: 1px solid rgba(255, 218, 130, .2);
    background: rgba(1, 12, 22, .45);
}

.pc-adventure-map-heading small {
    color: #e9c35e;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.pc-adventure-map-heading h1 {
    margin: 3px 0 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(22px, 2vw, 31px);
    line-height: 1;
}

.pc-adventure-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 9px;
    color: #c3d6de;
    font-size: 10px;
    font-weight: 800;
}

.pc-adventure-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.pc-adventure-legend i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #576774;
}

.pc-adventure-legend i.is-cleared {
    background: #4bbd82;
}

.pc-adventure-legend i.is-current {
    background: #efb83f;
    box-shadow: 0 0 10px rgba(239, 184, 63, .7);
}

.pc-adventure-legend i.is-locked {
    background: #52606b;
}

.pc-adventure-map-board {
    position: relative;
    min-height: 590px;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 70%, rgba(62, 177, 184, .26), transparent 13rem),
        radial-gradient(circle at 75% 35%, rgba(57, 152, 168, .2), transparent 17rem),
        repeating-linear-gradient(0deg, transparent 0 38px, rgba(255, 255, 255, .018) 39px),
        repeating-linear-gradient(90deg, transparent 0 38px, rgba(255, 255, 255, .018) 39px),
        linear-gradient(180deg, #176b82 0%, #0d566e 48%, #073f58 100%);
}

.pc-adventure-map-board::before,
.pc-adventure-map-board::after {
    position: absolute;
    content: "";
    pointer-events: none;
}

.pc-adventure-map-board::before {
    inset: 0;
    background:
        linear-gradient(115deg, transparent 34%, rgba(255, 255, 255, .05) 48%, transparent 62%);
    background-size: 220% 100%;
    animation: pcAdventureWaterShimmer 8s linear infinite;
}

.pc-adventure-map-board::after {
    inset: 16px;
    border: 1px solid rgba(255, 222, 145, .14);
    border-radius: 18px;
}

.pc-adventure-island {
    position: absolute;
    z-index: 1;
    border: 2px solid rgba(42, 72, 39, .55);
    border-radius: 50% 44% 54% 46%;
    background:
        radial-gradient(circle at 50% 35%, #8ab45f 0 34%, #487847 35% 58%, #a17a42 60% 72%, transparent 73%);
    filter: drop-shadow(0 14px 16px rgba(0, 0, 0, .24));
    opacity: .88;
}

.pc-adventure-island-one {
    left: 4%;
    bottom: 11%;
    width: 210px;
    height: 130px;
    transform: rotate(-7deg);
}

.pc-adventure-island-two {
    left: 43%;
    top: 30%;
    width: 180px;
    height: 120px;
    transform: rotate(8deg);
}

.pc-adventure-island-three {
    right: 3%;
    top: 10%;
    width: 220px;
    height: 145px;
    transform: rotate(-4deg);
}

.pc-adventure-route {
    position: absolute;
    z-index: 3;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.pc-adventure-route path {
    fill: none;
    stroke: rgba(255, 226, 153, .7);
    stroke-width: .55;
    stroke-linecap: round;
    stroke-dasharray: 1.5 1.35;
    filter: drop-shadow(0 0 3px rgba(255, 205, 82, .45));
    vector-effect: non-scaling-stroke;
    animation: pcAdventureRoute 16s linear infinite;
}

.pc-stage-node {
    --node-color: #667580;
    position: absolute;
    z-index: 6;
    left: var(--stage-x);
    top: var(--stage-y);
    width: 68px;
    height: 68px;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    border: 2px solid rgba(255, 230, 166, .56);
    border-radius: 50%;
    color: #fff7df;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--node-color) 86%, white 14%), color-mix(in srgb, var(--node-color) 78%, black 22%));
    box-shadow:
        0 10px 20px rgba(0, 0, 0, .3),
        inset 0 0 0 5px rgba(5, 16, 25, .36);
    cursor: pointer;
    transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}

.pc-stage-node:hover:not(:disabled),
.pc-stage-node:focus-visible {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow:
        0 14px 28px rgba(0, 0, 0, .36),
        0 0 24px color-mix(in srgb, var(--node-color) 60%, transparent),
        inset 0 0 0 5px rgba(5, 16, 25, .3);
    outline: 0;
}

.pc-stage-node.is-cleared {
    --node-color: #2e9666;
}

.pc-stage-node.is-current {
    --node-color: #d38c25;
}

.pc-stage-node.is-elite {
    --node-color: #9e5cbd;
}

.pc-stage-node.is-boss {
    --node-color: #b84035;
    width: 82px;
    height: 82px;
}

.pc-stage-node.is-selected {
    animation: pcAdventureSelected 2.4s ease-in-out infinite;
}

.pc-stage-node.is-locked {
    --node-color: #4d5963;
    cursor: not-allowed;
    filter: grayscale(.65);
    opacity: .72;
}

.pc-stage-node-icon {
    font-size: 20px;
    font-weight: 950;
}

.pc-stage-node-code {
    position: absolute;
    top: 100%;
    left: 50%;
    margin-top: 4px;
    transform: translateX(-50%);
    padding: 2px 7px;
    border: 1px solid rgba(255, 222, 145, .28);
    border-radius: 999px;
    color: #fff1c8;
    background: rgba(3, 14, 24, .86);
    font-size: 9px;
    font-weight: 900;
    white-space: nowrap;
}

.pc-stage-stars {
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1px;
    color: rgba(255, 255, 255, .25);
    font-size: 8px;
    white-space: nowrap;
}

.pc-stage-stars i {
    font-style: normal;
}

.pc-stage-stars i.is-earned {
    color: #ffd35b;
    text-shadow: 0 0 5px rgba(255, 205, 61, .7);
}

.pc-adventure-map-compass {
    position: absolute;
    z-index: 2;
    right: 18px;
    bottom: 16px;
    width: 112px;
    height: 119px;
    object-fit: contain;
    opacity: .48;
    filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .25));
}

.pc-adventure-stage-card {
    padding: 20px;
    align-self: stretch;
    display: flex;
    flex-direction: column;
}

.pc-adventure-stage-kicker {
    margin: 0;
    color: #e8c25e;
    font-size: 10px;
    font-weight: 950;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.pc-adventure-stage-card h2 {
    margin: 7px 0 12px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(24px, 2.2vw, 34px);
    line-height: 1.02;
}

.pc-adventure-stage-card > p:not(.pc-adventure-stage-kicker):not(.pc-adventure-enter-note) {
    margin: 0;
    color: #c8d8df;
    font-size: 14px;
    line-height: 1.55;
}

.pc-adventure-stage-stats {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.pc-adventure-stage-stats div {
    min-width: 0;
    padding: 10px 7px;
    border: 1px solid rgba(255, 219, 131, .2);
    border-radius: 12px;
    background: rgba(255, 255, 255, .04);
    text-align: center;
}

.pc-adventure-stage-stats span,
.pc-adventure-rewards > span {
    display: block;
    color: #99b4c2;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.pc-adventure-stage-stats strong {
    display: block;
    overflow: hidden;
    margin-top: 5px;
    color: #fff0c7;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pc-adventure-rewards {
    margin-top: 14px;
    padding: 13px;
    border: 1px solid rgba(255, 219, 131, .2);
    border-radius: 13px;
    background: rgba(255, 255, 255, .04);
}

.pc-adventure-rewards p {
    margin: 7px 0 0;
    color: #f3d88f;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.5;
}

.pc-adventure-enter {
    width: 100%;
    min-height: 52px;
    margin-top: auto;
    border: 2px solid #6c431d;
    border-radius: 14px;
    color: #241509;
    background: linear-gradient(180deg, #f3d26e, #bd7724);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .22);
    cursor: pointer;
    font-weight: 950;
    transition: transform 150ms ease, filter 150ms ease;
}

.pc-adventure-enter:hover {
    transform: translateY(-2px);
    filter: brightness(1.07);
}

.pc-adventure-enter-note {
    margin: 9px 0 0;
    color: #8fa8b5;
    font-size: 10px;
    line-height: 1.45;
    text-align: center;
}

.pc-adventure-dialog {
    width: min(520px, calc(100vw - 32px));
    padding: 0;
    border: 0;
    border-radius: 22px;
    color: #fff1cc;
    background: transparent;
}

.pc-adventure-dialog::backdrop {
    background: rgba(2, 8, 14, .72);
    backdrop-filter: blur(7px);
}

.pc-adventure-dialog-card {
    position: relative;
    padding: 30px;
    border: 2px solid rgba(230, 178, 76, .72);
    border-radius: 22px;
    background: linear-gradient(180deg, #0c263b, #061522);
    box-shadow: 0 28px 70px rgba(0, 0, 0, .55);
}

.pc-adventure-dialog-card > p {
    margin: 0;
    color: #e9c25c;
    font-size: 10px;
    font-weight: 950;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.pc-adventure-dialog-card h2 {
    margin: 6px 48px 10px 0;
    font: 800 30px/1.05 Georgia, serif;
}

.pc-adventure-dialog-card > span {
    display: block;
    color: #c8d9e1;
    line-height: 1.55;
}

.pc-adventure-dialog-close {
    position: absolute;
    top: 13px;
    right: 13px;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 220, 145, .35);
    border-radius: 50%;
    color: #fff0cc;
    background: rgba(255, 255, 255, .06);
    cursor: pointer;
    font-size: 24px;
}

.pc-adventure-dialog-return {
    min-height: 44px;
    margin-top: 20px;
    padding: 0 17px;
    border: 1px solid rgba(235, 190, 94, .55);
    border-radius: 12px;
    color: #231609;
    background: linear-gradient(180deg, #f0ce6b, #bd7724);
    cursor: pointer;
    font-weight: 900;
}

.pc-adventure-rotate-hint {
    display: none;
}

@keyframes pcAdventureRayPulse {
    0%, 100% { opacity: .07; transform: scale(.96); }
    50% { opacity: .16; transform: scale(1.04); }
}

@keyframes pcAdventureCloudRight {
    from { transform: translateX(0); }
    to { transform: translateX(calc(100vw + 640px)); }
}

@keyframes pcAdventureCloudLeft {
    from { transform: translateX(0); }
    to { transform: translateX(calc(-100vw - 640px)); }
}

@keyframes pcAdventureWaterShimmer {
    from { background-position: 190% 0; }
    to { background-position: -30% 0; }
}

@keyframes pcAdventureRoute {
    from { stroke-dashoffset: 0; }
    to { stroke-dashoffset: -18; }
}

@keyframes pcAdventureSelected {
    0%, 100% {
        box-shadow: 0 10px 20px rgba(0, 0, 0, .3), 0 0 0 0 rgba(241, 188, 66, .35), inset 0 0 0 5px rgba(5, 16, 25, .34);
    }
    50% {
        box-shadow: 0 12px 26px rgba(0, 0, 0, .34), 0 0 0 10px rgba(241, 188, 66, 0), inset 0 0 0 5px rgba(5, 16, 25, .3);
    }
}

@media (max-width: 1240px) {
    .pc-adventure {
        padding: 12px;
    }

    .pc-adventure-shell {
        grid-template-columns: 205px minmax(500px, 1fr) 250px;
        gap: 11px;
    }

    .pc-adventure-stage-card {
        padding: 15px;
    }

    .pc-adventure-map-board {
        min-height: 540px;
    }

    .pc-stage-node {
        width: 62px;
        height: 62px;
    }
}

@media (max-width: 1020px) {
    .pc-adventure {
        overflow: auto;
    }

    .pc-adventure-topbar {
        grid-template-columns: auto 1fr;
    }

    .pc-adventure-resources {
        grid-column: 1 / -1;
        justify-content: center;
    }

    .pc-adventure-shell {
        grid-template-columns: 190px minmax(600px, 1fr);
        min-width: 820px;
        min-height: auto;
    }

    .pc-adventure-stage-card {
        grid-column: 1 / -1;
        min-height: 290px;
    }

    .pc-adventure-enter {
        margin-top: 18px;
    }
}

@media (orientation: portrait) and (max-width: 900px) {
    .pc-adventure-rotate-hint {
        position: fixed;
        z-index: 100;
        right: 18px;
        bottom: 18px;
        left: 18px;
        display: grid;
        gap: 4px;
        padding: 14px 16px;
        border: 2px solid rgba(255, 223, 133, .64);
        border-radius: 12px;
        color: #fff2cf;
        background: rgba(4, 11, 18, .94);
        text-align: center;
        box-shadow: 0 12px 34px rgba(0, 0, 0, .42);
    }

    .pc-adventure-rotate-hint span {
        color: #cbd5df;
        font-size: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pc-adventure-backdrop,
    .pc-adventure-rays,
    .pc-adventure-cloud,
    .pc-adventure-map-board::before,
    .pc-adventure-route path,
    .pc-stage-node.is-selected {
        animation: none !important;
        transition: none !important;
    }

    .pc-stage-node.is-selected {
        transform: translate(-50%, -50%);
    }
}

/* Adventure viewport-fit patch v2
   Keep the full Story Map inside one browser viewport. */
.pc-adventure-game-page {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
}

.pc-adventure {
    box-sizing: border-box;
    width: 100%;
    height: 100dvh;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
    overflow: hidden;
}

.pc-adventure-topbar {
    min-height: 70px;
    padding: 9px 14px;
}

.pc-adventure-shell {
    min-width: 0;
    min-height: 0;
    height: auto;
    margin-top: 0;
    grid-template-columns: minmax(190px, 240px) minmax(0, 1fr) minmax(230px, 290px);
    gap: 12px;
    overflow: hidden;
}

.pc-adventure-chapters,
.pc-adventure-map,
.pc-adventure-stage-card {
    min-height: 0;
}

.pc-adventure-chapters,
.pc-adventure-stage-card {
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.pc-adventure-map {
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
}

.pc-adventure-map-board {
    height: auto;
    min-height: 0;
}

.pc-adventure-chapter-list {
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    padding-right: 2px;
}

.pc-adventure-progress {
    flex: 0 0 auto;
}

.pc-adventure-stage-card {
    align-self: stretch;
}

@media (max-width: 1240px) {
    .pc-adventure {
        padding: 10px;
        gap: 10px;
        overflow: hidden;
    }

    .pc-adventure-shell {
        min-width: 0;
        min-height: 0;
        grid-template-columns: minmax(168px, 205px) minmax(0, 1fr) minmax(210px, 250px);
        gap: 10px;
    }

    .pc-adventure-map-board {
        min-height: 0;
    }
}

@media (max-width: 1020px) and (orientation: landscape) {
    .pc-adventure {
        overflow: hidden;
    }

    .pc-adventure-topbar {
        grid-template-columns: auto minmax(180px, 1fr) auto;
    }

    .pc-adventure-resources {
        grid-column: auto;
        justify-content: flex-end;
    }

    .pc-adventure-shell {
        min-width: 0;
        min-height: 0;
        grid-template-columns: minmax(150px, 180px) minmax(0, 1fr) minmax(185px, 220px);
    }

    .pc-adventure-stage-card {
        grid-column: auto;
        min-height: 0;
    }

    .pc-adventure-enter {
        margin-top: auto;
    }
}

@media (max-height: 820px) and (orientation: landscape) {
    .pc-adventure {
        gap: 8px;
        padding: 8px;
    }

    .pc-adventure-topbar {
        min-height: 58px;
        gap: 10px;
        padding: 6px 10px;
        border-radius: 15px;
    }

    .pc-adventure-back {
        min-width: 94px;
        min-height: 40px;
        padding: 0 12px;
    }

    .pc-adventure-title strong {
        font-size: 22px;
    }

    .pc-adventure-title span {
        margin-top: 2px;
        font-size: 10px;
    }

    .pc-adventure-resources span {
        min-height: 38px;
        padding: 0 10px;
        font-size: 11px;
    }

    .pc-adventure-shell {
        gap: 8px;
        grid-template-columns: minmax(160px, 205px) minmax(0, 1fr) minmax(205px, 245px);
    }

    .pc-adventure-chapters {
        gap: 8px;
        padding: 10px;
    }

    .pc-adventure-captain {
        grid-template-columns: 48px 1fr;
        padding: 5px;
    }

    .pc-adventure-captain img {
        width: 48px;
        height: 50px;
    }

    .pc-adventure-captain strong {
        font-size: 16px;
    }

    .pc-adventure-chapter-list {
        gap: 6px;
    }

    .pc-adventure-chapter {
        min-height: 58px;
        grid-template-columns: 30px 1fr auto;
        gap: 7px;
        padding: 7px;
    }

    .pc-adventure-chapter-number {
        width: 28px;
        height: 28px;
    }

    .pc-adventure-chapter-copy strong {
        font-size: 14px;
    }

    .pc-adventure-progress {
        padding: 8px;
    }

    .pc-adventure-map-heading {
        min-height: 56px;
        padding: 8px 12px;
    }

    .pc-adventure-map-heading h1 {
        font-size: 22px;
    }

    .pc-stage-node {
        width: 54px;
        height: 54px;
    }

    .pc-stage-node.is-boss {
        width: 64px;
        height: 64px;
    }

    .pc-stage-node-icon {
        font-size: 17px;
    }

    .pc-adventure-map-compass {
        width: 82px;
        height: 88px;
    }

    .pc-adventure-stage-card {
        padding: 12px;
    }

    .pc-adventure-stage-card h2 {
        margin: 5px 0 8px;
        font-size: 23px;
    }

    .pc-adventure-stage-card > p:not(.pc-adventure-stage-kicker):not(.pc-adventure-enter-note) {
        font-size: 12px;
        line-height: 1.4;
    }

    .pc-adventure-stage-stats {
        margin-top: 10px;
        gap: 5px;
    }

    .pc-adventure-stage-stats div {
        padding: 7px 4px;
    }

    .pc-adventure-rewards {
        margin-top: 9px;
        padding: 9px;
    }

    .pc-adventure-enter {
        min-height: 44px;
    }

    .pc-adventure-enter-note {
        margin-top: 5px;
        line-height: 1.25;
    }
}

@media (max-height: 650px) and (orientation: landscape) {
    .pc-adventure-title span,
    .pc-adventure-enter-note,
    .pc-adventure-progress {
        display: none;
    }

    .pc-adventure-topbar {
        min-height: 52px;
    }

    .pc-adventure-shell {
        grid-template-columns: 150px minmax(0, 1fr) 190px;
    }

    .pc-adventure-captain {
        display: none;
    }

    .pc-adventure-chapter {
        min-height: 48px;
    }

    .pc-adventure-stage-card h2 {
        font-size: 20px;
    }

    .pc-adventure-rewards p {
        line-height: 1.3;
    }
}

