@import url("vendor/rpg-awesome/css/rpg-awesome.min.css");

:root {
    color-scheme: light;
    --bg: #16211f;
    --surface: #fffaf0;
    --surface-soft: #f2eadb;
    --text: #172033;
    --muted: #667085;
    --line: #d8cbb4;
    --primary: #275cc7;
    --primary-dark: #1f4698;
    --accent: #0f9f8f;
    --accent-soft: #dff3ef;
    --brass: #b88a3d;
    --ink: #111b1c;
    --danger: #b42318;
    --shadow: 0 20px 54px rgba(7, 13, 18, 0.24);
    --site-bg-image: url("/static/guild/art/common-deck.webp");
    --site-bg-x: center;
    --site-bg-y: calc(-36px - var(--parallax-y, 0px));
}

* {
    box-sizing: border-box;
}

body {
    position: relative;
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 0%, rgba(19, 171, 149, 0.26), transparent 28rem),
        radial-gradient(circle at 84% 8%, rgba(184, 138, 61, 0.2), transparent 26rem),
        linear-gradient(180deg, #070b0d 0%, #12201f 48%, #0d1516 100%);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(180deg, rgba(5, 10, 13, 0.88) 0%, rgba(8, 16, 18, 0.38) 34%, rgba(8, 16, 18, 0.22) 62%, rgba(8, 16, 18, 0.58) 100%),
        var(--site-bg-image) var(--site-bg-x) var(--site-bg-y) / cover no-repeat;
    transition: opacity 260ms ease, filter 420ms ease;
}

body[data-site-mood="main"] {
    --site-bg-image: url("/static/guild/art/common-deck.webp");
    --site-bg-x: center;
}

body[data-site-mood="vote"] {
    --site-bg-image: url("/static/guild/art/voting-table.webp");
    --site-bg-x: center;
}

body[data-site-mood="notice"] {
    --site-bg-image: url("/static/guild/art/notice-board.webp");
    --site-bg-x: center;
}

body[data-site-mood="future"] {
    --site-bg-image: url("/static/guild/art/under-renovation.webp");
    --site-bg-x: center;
}

body.is-changing-site-mood::before {
    opacity: 0.82;
    filter: saturate(1.12) contrast(1.08);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0.16;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 42px 42px;
    pointer-events: none;
    animation: chart-drift 22s linear infinite;
}

@keyframes sky-drift {
    from {
        transform: scale(1) translate3d(0, 0, 0);
        filter: saturate(1);
    }
    to {
        transform: scale(1.045) translate3d(-12px, -10px, 0);
        filter: saturate(1.08);
    }
}

@keyframes chart-drift {
    from {
        background-position: 0 0, 0 0;
    }
    to {
        background-position: 42px 42px, 42px 42px;
    }
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.site-shell {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 48px;
}

.site-header {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 96px;
    padding: 16px 16px 40px;
    border: 0;
    background: linear-gradient(180deg, rgba(3, 6, 7, 0.9) 0%, rgba(3, 6, 7, 0.54) 48%, rgba(3, 6, 7, 0) 100%);
    box-shadow: none;
}

.site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0));
    backdrop-filter: blur(18px) saturate(1.18);
    -webkit-backdrop-filter: blur(18px) saturate(1.18);
    mask-image: linear-gradient(180deg, #000 0%, #000 46%, transparent 100%);
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 46%, transparent 100%);
    pointer-events: none;
}

.nav-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: min(1180px, calc(100% - 32px));
    padding: 0;
    background: transparent;
}

.language-toggle {
    margin-left: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.icon-button,
.notification-bell {
    position: relative;
    display: inline-flex;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    color: #f6ead1;
    background: transparent;
    padding: 0;
    box-shadow: none;
    transition: background 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.icon-button {
    min-height: 46px;
}

.icon-button img,
.icon-button .ra,
.button-icon,
.function-icon {
    display: block;
    filter: brightness(0) saturate(100%) invert(90%) sepia(20%) saturate(476%) hue-rotate(355deg) brightness(103%) contrast(94%);
}

.nav-icon {
    width: 22px;
    height: 22px;
}

.ra.nav-icon,
.ra.button-icon {
    display: inline-grid;
    width: auto;
    height: auto;
    place-items: center;
    filter: none;
    line-height: 1;
}

.ra.nav-icon {
    font-size: 23px;
}

.button .button-icon,
button .button-icon {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    filter: brightness(0) invert(1);
}

.button .ra.button-icon,
button .ra.button-icon {
    color: currentColor;
    font-size: 20px;
    filter: none;
}

.button.secondary .button-icon,
button.secondary .button-icon {
    filter: brightness(0) saturate(100%) invert(10%) sepia(18%) saturate(1610%) hue-rotate(183deg) brightness(92%) contrast(90%);
}

.feature-icon-button .button-icon {
    width: 17px;
    height: 17px;
    margin-right: 0;
    filter: brightness(0) saturate(100%) invert(10%) sepia(18%) saturate(1610%) hue-rotate(183deg) brightness(92%) contrast(90%);
}

.icon-button:hover,
.notification-bell:hover {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
    text-decoration: none;
    transform: translateY(-1px);
}

.button,
button,
.icon-button,
.notification-bell,
.common-function-card,
.cabin-door {
    will-change: transform;
}

.bell-icon {
    object-fit: contain;
}

.notification-bell.has-unread .bell-icon {
    opacity: 1;
}

.notification-bell.has-unread {
    animation: bell-ring 1.6s ease-in-out infinite;
    transform-origin: 50% 8%;
}

.notification-bell.has-unread::after {
    content: "";
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 3;
    width: 9px;
    height: 9px;
    border: 2px solid var(--surface);
    border-radius: 999px;
    background: var(--danger);
    box-shadow: 0 0 0 1px rgba(180, 35, 24, 0.24);
    animation: notify-pulse 1.8s ease-in-out infinite;
}

.notification-dot,
.nav-badge {
    display: inline-flex;
    min-width: 22px;
    min-height: 22px;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    border-radius: 999px;
    padding: 0 7px;
    color: #ffffff;
    background: var(--danger);
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
}

.notification-dot {
    display: none;
}

@keyframes bell-ring {
    0%,
    62%,
    100% {
        transform: rotate(0deg);
    }
    68% {
        transform: rotate(13deg);
    }
    74% {
        transform: rotate(-12deg);
    }
    80% {
        transform: rotate(9deg);
    }
    86% {
        transform: rotate(-6deg);
    }
    92% {
        transform: rotate(3deg);
    }
}

@keyframes notify-pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.16);
    }
}

@media (prefers-reduced-motion: reduce) {
    .notification-bell.has-unread,
    .notification-bell.has-unread::after {
        animation: none;
    }
}

.inline-form {
    margin: 0;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    align-items: stretch;
}

.panel,
.auth-panel {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.panel {
    padding: 32px;
}

.auth-panel {
    width: min(520px, 100%);
    margin: 34px auto 0;
    padding: 28px;
}

.wide-panel {
    width: min(720px, 100%);
}

.compact-panel {
    box-shadow: none;
}

.welcome-panel {
    display: grid;
    min-height: 420px;
    align-content: center;
    justify-items: center;
    text-align: center;
}

.welcome-panel h1 {
    max-width: 680px;
}

.kicker {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
}

h1 {
    margin: 0 0 12px;
    font-size: 38px;
    line-height: 1.1;
}

h2 {
    margin: 0 0 16px;
    font-size: 22px;
}

p {
    margin: 0 0 14px;
}

.muted {
    color: var(--muted);
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.button,
button {
    position: relative;
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 0 16px;
    color: #ffffff;
    background: var(--primary);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background 140ms ease, border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.button::after,
button::after {
    content: "";
    position: absolute;
    inset: -40% auto -40% -70%;
    width: 48%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.32), transparent);
    transform: skewX(-18deg);
    transition: left 420ms ease;
    pointer-events: none;
}

.button:hover,
button:hover {
    background: var(--primary-dark);
    box-shadow: 0 10px 24px rgba(31, 70, 152, 0.2);
    text-decoration: none;
    transform: translateY(-1px);
}

.button:hover::after,
button:hover::after {
    left: 120%;
}

.button.secondary,
button.secondary {
    color: var(--text);
    background: var(--surface);
    border-color: var(--line);
}

.button.secondary:hover,
button.secondary:hover {
    background: var(--surface-soft);
}

.nav-actions .button,
.nav-actions button {
    border: 0;
    color: #f6ead1;
    background: transparent;
    box-shadow: none;
    font-weight: 900;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.34);
}

.nav-actions .button:hover,
.nav-actions button:hover {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

.nav-actions .icon-button,
.nav-actions button.icon-button {
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
    border: 0;
    color: #f6ead1;
    background: transparent;
}

.nav-actions .icon-button:hover,
.nav-actions button.icon-button:hover {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

.danger-button {
    color: #ffffff;
    background: var(--danger);
}

.danger-button:hover {
    background: #8f1d14;
}

.delete-form {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.status-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.status-item {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.status-label {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.status-value {
    display: block;
    margin-top: 2px;
    font-weight: 700;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.narrow-grid {
    width: min(720px, 100%);
    margin-right: auto;
    margin-left: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-item {
    min-height: 132px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
}

.feature-item h2 {
    margin-bottom: 8px;
    font-size: 18px;
}

.common-deck {
    position: relative;
    width: min(1100px, 100%);
    margin: 34px auto 0;
    overflow: visible;
    border: 0;
    outline: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.common-deck::before,
.common-deck::after {
    content: none;
}

.common-masthead {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 24px;
    align-items: end;
    min-height: 220px;
    padding: 18px 0 28px;
    color: #fff4d8;
}

.motion-reveal {
    opacity: 0;
    transform: translateY(18px);
}

.motion-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition:
        opacity 560ms ease var(--motion-delay, 0ms),
        transform 560ms cubic-bezier(0.2, 0.8, 0.2, 1) var(--motion-delay, 0ms);
}

.common-masthead .kicker {
    color: #6ee7d8;
}

.common-masthead h1 {
    max-width: 760px;
    margin-bottom: 12px;
    color: #fff7dc;
    font-size: 52px;
    line-height: 1;
    text-shadow: 0 3px 18px rgba(0, 0, 0, 0.34);
}

.common-masthead p {
    max-width: 620px;
    margin: 0;
    color: rgba(255, 244, 216, 0.88);
    font-size: 18px;
}

.ship-status-card {
    display: grid;
    gap: 5px;
    border: 1px solid rgba(226, 205, 159, 0.34);
    border-radius: 8px;
    padding: 18px;
    background: rgba(10, 17, 18, 0.64);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    animation: lantern-glow 4.8s ease-in-out infinite;
}

.ship-status-card span,
.ship-status-card small {
    color: rgba(255, 244, 216, 0.74);
    font-weight: 800;
}

.ship-status-card strong {
    color: #8cf0d8;
    font-size: 24px;
    line-height: 1.1;
}

@keyframes lantern-glow {
    0%,
    100% {
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2), 0 0 0 rgba(140, 240, 216, 0);
    }
    50% {
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2), 0 0 28px rgba(140, 240, 216, 0.14);
    }
}

.common-function-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px;
    padding: 0;
}

.common-function-card {
    position: relative;
    display: grid;
    min-height: 210px;
    align-content: end;
    gap: 10px;
    overflow: hidden;
    border: 1px solid rgba(139, 94, 52, 0.34);
    border-radius: 8px;
    padding: 16px;
    color: #fff7dc;
    background:
        linear-gradient(180deg, rgba(11, 18, 20, 0.04), rgba(11, 18, 20, 0.52)),
        rgba(11, 18, 20, 0.18);
    box-shadow:
        0 14px 34px rgba(39, 29, 18, 0.12),
        inset 0 0 0 1px rgba(255, 255, 255, 0.58);
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.common-function-card::before {
    content: "";
    position: absolute;
    inset: 8px;
    z-index: 1;
    border: 1px solid rgba(229, 196, 126, 0.24);
    border-radius: 5px;
    pointer-events: none;
}

.common-card-wide {
    grid-column: span 6;
}

.common-card-vote {
    grid-column: span 2;
}

.common-card-notice,
.common-card-reserved {
    grid-column: span 2;
}

.common-card-wide .function-art {
    height: 168px;
}

.common-card-wide {
    min-height: 430px;
}

.function-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 700ms ease, filter 700ms ease;
}

.common-function-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(184, 138, 61, 0.82), rgba(184, 138, 61, 0.82)) 8px 8px / 22px 2px no-repeat,
        linear-gradient(180deg, rgba(184, 138, 61, 0.82), rgba(184, 138, 61, 0.82)) 8px 8px / 2px 22px no-repeat,
        linear-gradient(270deg, rgba(184, 138, 61, 0.82), rgba(184, 138, 61, 0.82)) calc(100% - 8px) calc(100% - 8px) / 22px 2px no-repeat,
        linear-gradient(0deg, rgba(184, 138, 61, 0.82), rgba(184, 138, 61, 0.82)) calc(100% - 8px) calc(100% - 8px) / 2px 22px no-repeat,
        linear-gradient(180deg, rgba(6, 12, 14, 0.04), rgba(6, 12, 14, 0.72));
    pointer-events: none;
}

.common-card-wide::after {
    background:
        linear-gradient(90deg, rgba(184, 138, 61, 0.82), rgba(184, 138, 61, 0.82)) 8px 8px / 22px 2px no-repeat,
        linear-gradient(180deg, rgba(184, 138, 61, 0.82), rgba(184, 138, 61, 0.82)) 8px 8px / 2px 22px no-repeat,
        linear-gradient(270deg, rgba(184, 138, 61, 0.82), rgba(184, 138, 61, 0.82)) calc(100% - 8px) calc(100% - 8px) / 22px 2px no-repeat,
        linear-gradient(0deg, rgba(184, 138, 61, 0.82), rgba(184, 138, 61, 0.82)) calc(100% - 8px) calc(100% - 8px) / 2px 22px no-repeat,
        linear-gradient(180deg, rgba(6, 12, 14, 0.04), rgba(6, 12, 14, 0.72));
}

.common-function-card > :not(.function-art) {
    position: relative;
    z-index: 1;
}

.function-plaque {
    display: grid;
    gap: 8px;
    width: min(100%, 360px);
    border: 1px solid rgba(229, 196, 126, 0.48);
    border-radius: 8px;
    padding: 14px;
    color: var(--text);
    background:
        linear-gradient(180deg, rgba(255, 253, 247, 0.94), rgba(244, 231, 205, 0.9)),
        rgba(255, 250, 240, 0.92);
    box-shadow:
        0 14px 30px rgba(0, 0, 0, 0.22),
        inset 0 0 0 1px rgba(255, 255, 255, 0.54);
}

.common-card-wide .function-plaque {
    width: min(100%, 520px);
}

.current-location-card .function-plaque {
    margin: 0 0 8px 8px;
}

.current-location-card {
    border: 0;
    outline: 0;
    border-radius: 0;
    padding: 38px;
    box-shadow: none;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.42) 42%, rgba(0, 0, 0, 0.94) 100%),
        #050708;
}

.current-location-card::before {
    content: none;
}

.current-location-card::after,
.common-card-wide.current-location-card::after {
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.4) 42%, rgba(0, 0, 0, 0.96) 100%);
}

.current-location-card .function-art {
    height: 100%;
    object-fit: cover;
    object-position: center center;
    filter: saturate(1.04) contrast(1.03);
}

.current-location-card:hover .function-art {
    filter: saturate(1.12) contrast(1.06);
}

.current-location-plaque {
    width: min(100%, 580px);
    margin: 0;
    border: 0;
    border-radius: 0;
    padding: 0;
    color: #fff7dc;
    background: transparent;
    box-shadow: none;
}

.current-location-plaque .function-icon {
    border: 0;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: none;
    filter: brightness(0) saturate(100%) invert(92%) sepia(19%) saturate(573%) hue-rotate(352deg) brightness(102%) contrast(96%);
}

.current-location-plaque .function-kicker,
.current-location-plaque .location-meta {
    color: #80ead8;
}

.current-location-plaque p {
    color: rgba(255, 247, 220, 0.88);
    font-size: 17px;
}

.current-location-card h2 {
    color: #fff7dc;
    font-size: 34px;
    line-height: 1.05;
}

.location-meta {
    color: var(--accent);
    font-weight: 900;
}

.common-function-card .function-kicker::before,
.common-function-card .function-kicker::after {
    content: none;
}

.common-function-card:hover {
    text-decoration: none;
}

.common-function-card.is-active:hover {
    border-color: rgba(184, 138, 61, 0.62);
    box-shadow: 0 20px 42px rgba(39, 29, 18, 0.2);
    transform: translateY(-2px);
}

.common-function-card:hover .function-art {
    filter: saturate(1.08) contrast(1.04);
    transform: scale(1.045);
}

.common-function-card.is-coming {
    color: var(--muted);
    background: rgba(242, 234, 219, 0.84);
}

.function-kicker {
    color: var(--accent);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.function-icon {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    margin-top: 0;
    margin-bottom: 0;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 8px;
    padding: 7px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 24px rgba(30, 41, 59, 0.12);
    opacity: 0.86;
}

.function-icon .ra {
    color: #172033;
    font-size: 20px;
    line-height: 1;
}

.common-function-card .function-icon {
    filter: brightness(0) saturate(100%) invert(10%) sepia(18%) saturate(1610%) hue-rotate(183deg) brightness(92%) contrast(90%);
}

.function-plaque .function-icon {
    width: 32px;
    height: 32px;
}

.common-function-card.is-coming .function-icon {
    opacity: 0.46;
}

.common-function-card h2 {
    margin: 0;
}

.common-function-card p {
    margin: 0;
}

.mini-ranking {
    display: grid;
    gap: 8px;
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
}

.mini-ranking li {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
    font-size: 14px;
}

.mini-ranking span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-ranking strong {
    display: inline-flex;
    min-width: 28px;
    min-height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--primary);
    background: rgba(31, 111, 235, 0.1);
}

.patch-preview-version {
    color: var(--primary);
    font-size: 14px;
    font-weight: 900;
}

.patch-panel {
    width: min(900px, 100%);
    margin: 34px auto 0;
}

.patch-list {
    display: grid;
    gap: 14px;
    margin-top: 24px;
}

.patch-card {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px 20px;
    color: var(--text);
    background:
        linear-gradient(135deg, rgba(15, 159, 143, 0.08), transparent 38%),
        var(--surface);
    box-shadow: 0 12px 28px rgba(30, 41, 59, 0.06);
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.patch-card:hover {
    border-color: rgba(31, 111, 235, 0.42);
    box-shadow: 0 14px 34px rgba(31, 111, 235, 0.1);
    text-decoration: none;
    transform: translateY(-1px);
}

.patch-card-meta,
.patch-card-copy {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.patch-version {
    color: var(--accent);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.patch-card small {
    color: var(--muted);
    font-weight: 800;
}

.patch-card strong {
    color: var(--text);
    font-size: 19px;
    line-height: 1.25;
}

.patch-card-copy > span {
    color: var(--muted);
}

.patch-summary {
    border-left: 4px solid var(--accent);
    padding-left: 14px;
    color: var(--muted);
    font-size: 18px;
}

.patch-body {
    margin-top: 24px;
    font-size: 17px;
    line-height: 1.7;
}

@media (max-width: 640px) {
    .patch-card {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .patch-card-meta {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
    }
}

.voting-panel {
    width: min(1180px, 100%);
    margin: 34px auto 0;
}

.voting-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.voting-layout {
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
    margin-top: 24px;
}

.proposal-form {
    position: sticky;
    top: 18px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(237, 241, 246, 0.45);
}

.tmdb-autocomplete {
    position: relative;
}

.is-hidden-link-field {
    display: none;
}

.tmdb-suggestions {
    position: absolute;
    z-index: 20;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: grid;
    gap: 8px;
    max-height: min(430px, 70vh);
    overflow: auto;
    padding: 10px;
    border: 1px solid rgba(207, 185, 144, 0.9);
    border-radius: 12px;
    background: rgba(255, 251, 243, 0.98);
    box-shadow: 0 20px 38px rgba(23, 32, 51, 0.22);
}

.tmdb-suggestions[hidden] {
    display: none;
}

.tmdb-suggestion {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 10px;
    width: 100%;
    padding: 8px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--ink);
    text-align: left;
    background: transparent;
    box-shadow: none;
}

.tmdb-suggestion:hover,
.tmdb-suggestion:focus-visible {
    transform: none;
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.86);
}

.tmdb-suggestion-poster {
    display: grid;
    width: 48px;
    aspect-ratio: 2 / 3;
    place-items: center;
    overflow: hidden;
    border-radius: 8px;
    color: var(--muted);
    background: var(--surface-soft);
    font-size: 11px;
    font-weight: 800;
}

.tmdb-suggestion-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tmdb-suggestion-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.tmdb-suggestion-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tmdb-suggestion-copy small {
    color: var(--muted);
    font-weight: 800;
}

.tmdb-suggestion-copy em {
    display: -webkit-box;
    overflow: hidden;
    color: var(--muted);
    font-style: normal;
    font-size: 12px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.tmdb-score {
    color: #a36a12;
}

.tmdb-empty {
    padding: 10px;
    color: var(--muted);
    font-size: 13px;
}

.proposal-area {
    min-width: 0;
}

.proposal-list {
    display: grid;
    gap: 16px;
}

.proposal-tabs {
    margin-bottom: 14px;
}

.proposal-tab-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.proposal-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 42px;
    border: 0;
    border-radius: 999px;
    color: #1f2a44;
    background: transparent;
    box-shadow: none;
    font-weight: 800;
}

.proposal-tab:hover {
    transform: none;
}

.proposal-tab.is-active {
    color: #1f2a44;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 10px 22px rgba(139, 94, 52, 0.22);
}

.proposal-tab strong {
    display: inline-grid;
    min-width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 999px;
    color: inherit;
    background: rgba(255, 255, 255, 0.22);
    font-size: 12px;
}

.proposal-board {
    display: grid;
    gap: 18px;
}

.proposal-section {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.66);
    box-shadow: 0 18px 40px rgba(23, 32, 51, 0.08);
}

.proposal-section[hidden] {
    display: none;
}

.proposal-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
}

.proposal-section-heading h2 {
    margin-bottom: 4px;
}

.proposal-card {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
    gap: 18px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.proposal-card-backdrop {
    min-height: 250px;
    color: #fff;
    background:
        linear-gradient(90deg, rgba(8, 13, 24, 0.86), rgba(8, 13, 24, 0.56) 48%, rgba(8, 13, 24, 0.28)),
        var(--proposal-bg) center / cover no-repeat;
    border-color: rgba(255, 255, 255, 0.3);
}

.proposal-card-backdrop::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.26), transparent 34%);
    pointer-events: none;
}

.proposal-card-backdrop .proposal-image,
.proposal-card-backdrop .proposal-body {
    position: relative;
    z-index: 1;
}

.proposal-card-backdrop .proposal-summary,
.proposal-card-backdrop .proposal-reason,
.proposal-card-backdrop .proposal-meta {
    color: rgba(255, 255, 255, 0.84);
}

.proposal-card-backdrop .button.secondary,
.proposal-card-backdrop button.secondary {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.12);
}

.proposal-image {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 6px;
    object-fit: cover;
    background: var(--surface-soft);
}

.proposal-card:not(:has(.proposal-image)) {
    grid-template-columns: minmax(0, 1fr);
}

.proposal-body {
    min-width: 0;
}

.proposal-topline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 0 10px;
    color: var(--accent);
    background: var(--accent-soft);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.status-selected {
    color: var(--primary);
    background: rgba(31, 111, 235, 0.1);
}

.proposal-type {
    color: #394a63;
    background: rgba(23, 32, 51, 0.08);
}

.proposal-type-film {
    color: #7c3aed;
    background: rgba(124, 58, 237, 0.12);
}

.proposal-type-show {
    color: #0f766e;
    background: rgba(15, 118, 110, 0.12);
}

.vote-count {
    margin-left: auto;
    font-weight: 900;
}

.proposal-summary,
.proposal-reason,
.proposal-score,
.proposal-meta,
.voter-line {
    margin-bottom: 10px;
}

.proposal-score {
    display: inline-flex;
    gap: 6px;
    align-items: baseline;
    width: fit-content;
    border-radius: 999px;
    padding: 4px 10px;
    color: #0f766e;
    background: rgba(15, 118, 110, 0.1);
    font-size: 13px;
    font-weight: 800;
}

.proposal-score strong {
    color: var(--text);
    font-size: 16px;
}

.proposal-summary {
    color: var(--muted);
}

.voter-line {
    font-size: 14px;
}

.proposal-actions {
    margin-top: 14px;
}

.empty-state {
    min-height: 260px;
    padding: 36px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    background: rgba(237, 241, 246, 0.45);
}

.archive-strip {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.archive-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.archive-list span {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 12px;
    color: var(--muted);
    background: var(--surface);
    font-size: 14px;
}

.notifications-panel {
    width: min(860px, 100%);
    margin: 34px auto 0;
}

.notification-summary {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    border-radius: 999px;
    padding: 0 14px;
    color: #ffffff;
    background: var(--danger);
    font-weight: 900;
}

.notification-card-list {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.notification-card {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    color: var(--text);
    background: var(--surface);
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.notification-card:hover {
    border-color: rgba(31, 111, 235, 0.42);
    box-shadow: 0 14px 34px rgba(31, 111, 235, 0.1);
    text-decoration: none;
    transform: translateY(-1px);
}

.notification-card.is-unread {
    border-color: rgba(180, 35, 24, 0.32);
    background: linear-gradient(90deg, rgba(180, 35, 24, 0.08), var(--surface) 38%);
}

.notification-card-icon {
    position: relative;
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--surface-soft);
}

.notification-card-icon::before {
    content: "";
    width: 16px;
    height: 12px;
    border: 2px solid var(--muted);
    border-radius: 3px;
}

.notification-card-icon span {
    position: absolute;
    width: 10px;
    height: 10px;
    margin-top: -26px;
    margin-left: 28px;
    border: 2px solid var(--surface);
    border-radius: 999px;
    background: var(--danger);
}

.notification-card-title,
.notification-card-message,
.notification-card-meta {
    display: block;
}

.notification-card-title {
    margin-bottom: 4px;
    font-weight: 900;
}

.notification-card-message {
    color: var(--muted);
}

.notification-card-meta {
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
}

.guestbook-entry:target {
    border-color: rgba(31, 111, 235, 0.46);
    box-shadow: 0 0 0 4px rgba(31, 111, 235, 0.12);
}

.crop-trigger {
    margin-top: 10px;
}

.crop-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.58);
}

.crop-modal[hidden] {
    display: none;
}

.crop-dialog {
    width: min(760px, 100%);
    max-height: min(92vh, 780px);
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 8px;
    padding: 22px;
    background: var(--surface);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.34);
}

.crop-dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.crop-close {
    min-width: 42px;
    padding: 0;
    font-size: 24px;
    line-height: 1;
}

.crop-stage {
    position: relative;
    width: min(100%, 680px);
    margin: 18px auto;
    overflow: hidden;
    border: 2px solid var(--primary);
    border-radius: 8px;
    background:
        linear-gradient(45deg, rgba(216, 224, 234, 0.72) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(216, 224, 234, 0.72) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(216, 224, 234, 0.72) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(216, 224, 234, 0.72) 75%);
    background-position: 0 0, 0 12px, 12px -12px, -12px 0;
    background-size: 24px 24px;
    touch-action: none;
    cursor: grab;
}

.crop-stage[data-crop-kind="avatar"] {
    width: min(100%, 440px);
}

.crop-stage[data-crop-kind="banner"] {
    width: min(100%, 680px);
}

.crop-stage:active {
    cursor: grabbing;
}

.crop-stage::before,
.crop-stage::after {
    content: "";
    position: absolute;
    inset: 33.333% 0;
    z-index: 2;
    border-top: 1px solid rgba(255, 255, 255, 0.68);
    border-bottom: 1px solid rgba(255, 255, 255, 0.68);
    pointer-events: none;
}

.crop-stage::after {
    inset: 0 33.333%;
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.68);
    border-left: 1px solid rgba(255, 255, 255, 0.68);
}

.crop-stage img {
    position: absolute;
    top: 50%;
    left: 50%;
    max-width: none;
    user-select: none;
    -webkit-user-drag: none;
}

.crop-zoom {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    margin-top: 12px;
    font-weight: 700;
}

.crop-zoom input {
    width: 100%;
}

body.is-cropping {
    overflow: hidden;
}

.schedule-panel {
    width: min(1100px, 100%);
    margin: 34px auto 0;
}

.calendar-panel {
    overflow: visible;
}

.calendar-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.calendar-header-actions,
.calendar-month-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.calendar-month-nav .button {
    padding: 10px 14px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: visible;
    background: var(--line);
    gap: 1px;
}

.weekday {
    padding: 10px 12px;
    color: var(--muted);
    background: var(--surface-soft);
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

.calendar-day {
    position: relative;
    min-height: 128px;
    padding: 10px 6px;
    background: rgba(255, 255, 255, 0.95);
}

.calendar-day.today {
    background: #f7fbff;
    box-shadow: inset 0 0 0 2px rgba(31, 111, 235, 0.2);
}

.muted-day {
    color: #9aa7b7;
    background: #f8fafc;
}

.day-number {
    display: inline-grid;
    min-width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 999px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.today .day-number {
    color: #ffffff;
    background: var(--primary);
}

.day-events {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.calendar-event {
    position: relative;
    display: grid;
    gap: 2px;
    min-height: 48px;
    padding: 8px 10px;
    border: 1px solid rgba(31, 111, 235, 0.24);
    border-radius: 8px;
    color: var(--text);
    background: linear-gradient(135deg, #eef6ff 0%, #e9fbf8 100%);
    box-shadow: 0 8px 20px rgba(31, 111, 235, 0.1);
}

.calendar-event.event-middle,
.calendar-event.event-end {
    color: transparent;
}

.calendar-event.event-start:not(.event-end) {
    margin-right: -7px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right-color: transparent;
}

.calendar-event.event-middle {
    margin-right: -7px;
    margin-left: -7px;
    border-right-color: transparent;
    border-left-color: transparent;
    border-radius: 0;
}

.calendar-event.event-end:not(.event-start) {
    margin-left: -7px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left-color: transparent;
}

.calendar-event:hover {
    text-decoration: none;
    border-color: rgba(31, 111, 235, 0.46);
}

.event-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 800;
}

.event-time {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.event-detail {
    position: fixed;
    z-index: 20;
    top: 128px;
    left: 28px;
    display: grid;
    width: min(360px, calc(100vw - 56px));
    max-height: calc(100vh - 156px);
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    opacity: 0;
    pointer-events: none;
    color: var(--text);
    background: var(--surface);
    box-shadow: var(--shadow);
    transform: translateX(10px);
    transition: opacity 140ms ease, transform 140ms ease;
}

.calendar-event:hover .event-detail,
.calendar-event:focus .event-detail {
    opacity: 1;
    transform: translateX(0);
}

.event-detail img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-bottom: 1px solid var(--line);
}

.event-detail-body {
    display: grid;
    gap: 8px;
    padding: 16px;
}

.event-detail-time {
    color: var(--muted);
    font-weight: 800;
}

.event-summary {
    color: var(--muted);
    font-size: 14px;
}

.calendar-hint {
    margin-top: 16px;
}

.session-card {
    display: grid;
    gap: 10px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.session-image {
    display: block;
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
}

.steam-summary {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(237, 241, 246, 0.62);
}

.steam-summary p {
    margin: 6px 0 0;
}

.primary-session {
    margin-top: 22px;
    border-color: rgba(31, 111, 235, 0.28);
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.session-title {
    display: block;
    margin-top: 4px;
    font-size: 28px;
    line-height: 1.15;
}

.session-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    font-weight: 700;
}

.session-meta span {
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--surface-soft);
}

.empty-state {
    margin-top: 22px;
    padding: 24px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.68);
}

.upcoming-list {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.stacked-form {
    display: grid;
    gap: 16px;
    margin-top: 22px;
}

.field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 10px;
    color: var(--text);
    background: #ffffff;
    font: inherit;
}

input[type="file"] {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    outline: 3px solid rgba(37, 99, 235, 0.14);
}

form ul {
    margin: 6px 0 0;
    padding-left: 20px;
    color: var(--danger);
    font-size: 13px;
}

.helptext {
    display: none;
}

.errorlist {
    margin: 0 0 14px;
    padding: 10px 12px;
    border: 1px solid rgba(180, 35, 24, 0.25);
    border-radius: 8px;
    color: var(--danger);
    background: rgba(180, 35, 24, 0.06);
    list-style-position: inside;
}

.messages {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.message {
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.message.warning {
    border-color: rgba(180, 83, 9, 0.28);
    color: #92400e;
    background: #fffbeb;
}

.auth-footer {
    margin-top: 18px;
    color: var(--muted);
}

.page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.deck-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(229, 196, 126, 0.36);
    outline: 1px solid rgba(9, 14, 15, 0.7);
    outline-offset: -7px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.96)),
        url("art/cabin-deck.webp") center / cover;
    box-shadow:
        0 24px 62px rgba(0, 0, 0, 0.2),
        inset 0 0 52px rgba(8, 13, 14, 0.18);
}

.cabin-door-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.cabin-door {
    position: relative;
    display: grid;
    min-height: 230px;
    align-content: end;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--cabin-accent, #8b5e34) 58%, var(--brass));
    outline: 1px solid rgba(255, 244, 216, 0.16);
    outline-offset: -7px;
    border-radius: 8px;
    padding: 18px;
    color: #fffdf8;
    background:
        linear-gradient(180deg, rgba(32, 22, 13, 0.12), rgba(32, 22, 13, 0.82)),
        linear-gradient(135deg, #8b5e34, #2f4858);
    box-shadow: 0 18px 40px rgba(30, 41, 59, 0.18);
    transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.cabin-door:hover {
    border-color: color-mix(in srgb, var(--cabin-accent, #8b5e34) 70%, #ffffff);
    box-shadow: 0 22px 46px rgba(30, 41, 59, 0.22);
    text-decoration: none;
    transform: translateY(-2px);
}

.door-banner {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.82;
    transition: transform 720ms ease, filter 720ms ease;
}

.cabin-door::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(229, 196, 126, 0.82), rgba(229, 196, 126, 0.82)) 8px 8px / 24px 2px no-repeat,
        linear-gradient(180deg, rgba(229, 196, 126, 0.82), rgba(229, 196, 126, 0.82)) 8px 8px / 2px 24px no-repeat,
        linear-gradient(270deg, rgba(229, 196, 126, 0.82), rgba(229, 196, 126, 0.82)) calc(100% - 8px) calc(100% - 8px) / 24px 2px no-repeat,
        linear-gradient(0deg, rgba(229, 196, 126, 0.82), rgba(229, 196, 126, 0.82)) calc(100% - 8px) calc(100% - 8px) / 2px 24px no-repeat,
        linear-gradient(180deg, rgba(11, 18, 31, 0.04), rgba(11, 18, 31, 0.72)),
        radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.24), transparent 28%);
}

.door-plate,
.door-owner,
.door-note {
    position: relative;
    z-index: 1;
}

.door-plate {
    width: fit-content;
    max-width: 100%;
    border: 1px solid rgba(245, 218, 158, 0.56);
    border-radius: 8px;
    padding: 7px 10px;
    color: #fff7dc;
    background: rgba(32, 22, 13, 0.48);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
    font-size: 22px;
    font-weight: 900;
}

.cabin-door:hover .door-banner {
    filter: saturate(1.08) contrast(1.04);
    transform: scale(1.05);
}

.door-owner {
    margin-top: 4px;
    font-weight: 800;
}

.door-note {
    margin-top: 8px;
    color: rgba(255, 253, 248, 0.86);
}

.cabin-room {
    display: grid;
    gap: 22px;
}

.cabin-hero {
    position: relative;
    overflow: hidden;
    min-height: 320px;
    border: 1px solid color-mix(in srgb, var(--cabin-accent, #8b5e34) 35%, var(--line));
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(139, 94, 52, 0.18), rgba(15, 159, 143, 0.12)),
        var(--surface);
    box-shadow: var(--shadow);
}

.cabin-hero > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cabin-hero.has-banner::after,
.cabin-hero.has-default-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(10, 12, 18, 0.72), rgba(10, 12, 18, 0.2));
}

.cabin-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 320px;
    align-items: flex-end;
    gap: 18px;
    padding: 28px;
    color: #fffdf8;
}

.cabin-hero:not(.has-banner):not(.has-default-banner) .cabin-hero-content {
    color: var(--text);
}

.cabin-avatar {
    display: block;
    width: 112px;
    height: 112px;
    aspect-ratio: 1 / 1;
    flex: 0 0 auto;
    border: 4px solid rgba(255, 255, 255, 0.86);
    border-radius: 8px;
    object-fit: cover;
    background: var(--surface);
}

.cabin-title,
.door-sign {
    margin-bottom: 6px;
    font-weight: 800;
}

.cabin-owner-actions {
    margin-top: 0;
}

.cabin-blocks {
    display: grid;
    gap: 16px;
}

.cabin-block {
    width: 100%;
    justify-self: stretch;
    overflow: hidden;
    padding: 22px;
    border: 1px solid var(--line);
    border-left: 6px solid var(--cabin-accent, #8b5e34);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 28px rgba(30, 41, 59, 0.06);
}

.cabin-block blockquote {
    margin: 0;
    color: var(--muted);
    font-size: 20px;
    font-style: italic;
}

.free-text-block {
    margin: 0;
    line-height: 1.25;
}

.cabin-block-image {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: none;
    margin: 0 auto;
    border-radius: 8px;
    box-sizing: border-box;
}

.inline-image-edit-form .cabin-block-image {
    justify-self: center;
}

.cabin-block-image + .image-caption {
    margin-top: 10px;
}

.caps-lock-status {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 24px;
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.caps-lock-status::before {
    content: "";
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: #94a3b8;
}

.caps-lock-status.is-on {
    color: #9f2d20;
}

.caps-lock-status.is-on::before {
    background: #d64535;
    box-shadow: 0 0 0 4px rgba(214, 69, 53, 0.14);
}

.caps-lock-status.is-off {
    color: #287a52;
}

.caps-lock-status.is-off::before {
    background: #2f9e68;
}

.installed-app-card {
    display: grid;
    gap: 10px;
    border: 1px solid color-mix(in srgb, var(--cabin-accent, #8b5e34) 34%, var(--line));
    border-radius: 8px;
    padding: 18px;
    background:
        linear-gradient(135deg, rgba(15, 159, 143, 0.08), transparent 42%),
        linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
}

.installed-app-card h2 {
    margin: 0;
}

.collapsible-app-card {
    display: block;
    overflow: hidden;
    padding: 0;
}

.collapsible-app-summary {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
    padding: 18px;
    cursor: pointer;
    list-style: none;
}

.collapsible-app-summary::-webkit-details-marker {
    display: none;
}

.collapsible-app-summary:hover {
    background: rgba(255, 255, 255, 0.5);
}

.collapsible-app-heading {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.collapsible-app-heading .kicker {
    margin: 0;
}

.collapsible-app-title {
    color: var(--text);
    font-size: 22px;
}

.collapsible-app-action {
    flex: 0 0 auto;
    min-width: 84px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 12px;
    color: var(--accent);
    background: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    font-weight: 900;
    text-align: center;
}

.collapsible-app-content {
    display: grid;
    gap: 12px;
    padding: 0 18px 18px;
}

.app-management-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    padding: 10px;
    border: 1px solid color-mix(in srgb, var(--cabin-accent, #8b5e34) 18%, var(--line));
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.48);
}

.app-management-actions form {
    margin: 0;
}

.app-management-actions .button {
    min-height: 36px;
    padding: 0 12px;
    font-size: 13px;
}

.app-serial {
    margin-bottom: 0;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
}

.feature-request-form {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.74);
}

.status-guide {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.status-guide span {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 10px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.68);
    font-size: 13px;
}

.status-guide strong {
    margin-right: 5px;
    color: var(--text);
}

.feature-request-list {
    display: grid;
    gap: 10px;
}

.feature-request-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    border: 1px dashed color-mix(in srgb, var(--cabin-accent, #8b5e34) 48%, var(--line));
    border-radius: 8px;
    padding: 16px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.72);
}

.feature-request-item strong {
    display: block;
    color: var(--text);
}

.feature-request-item p {
    margin: 6px 0;
}

.feature-request-meta {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.feature-request-status {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.feature-request-status > span {
    flex-basis: 100%;
    color: var(--accent);
    font-size: 13px;
    font-weight: 900;
    text-align: right;
}

.feature-request-status form {
    margin: 0;
}

.feature-request-status button {
    min-height: 32px;
    padding: 0 10px;
    font-size: 13px;
}

.feature-request-item:target {
    border-color: rgba(31, 111, 235, 0.46);
    box-shadow: 0 0 0 4px rgba(31, 111, 235, 0.12);
}

.feature-request-desk {
    display: grid;
    gap: 16px;
}

.feature-request-new {
    border: 1px solid color-mix(in srgb, var(--cabin-accent, #8b5e34) 28%, var(--line));
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.54);
    overflow: clip;
}

.feature-request-new > summary {
    cursor: pointer;
    padding: 12px 14px;
    color: var(--text);
    font-weight: 900;
}

.feature-request-form-grid {
    display: grid;
    grid-template-columns: minmax(150px, 0.45fr) minmax(0, 1fr);
    gap: 12px;
}

.feature-request-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.feature-request-filters button {
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 14px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.68);
    box-shadow: none;
}

.feature-request-filters button.is-active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.feature-request-item {
    grid-template-columns: minmax(0, 1fr) minmax(190px, auto);
    border-style: solid;
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(255, 248, 236, 0.72));
}

.feature-request-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.feature-request-category,
.feature-request-status-pill {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    border-radius: 999px;
    padding: 0 9px;
    font-size: 12px;
    font-weight: 900;
}

.feature-request-category {
    color: color-mix(in srgb, var(--cabin-accent, #8b5e34) 84%, #1f2a44);
    background: color-mix(in srgb, var(--cabin-accent, #8b5e34) 16%, #fff);
}

.feature-request-status-pill {
    justify-content: center;
    color: #fff;
    background: #64748b;
}

.status-open .feature-request-status-pill {
    background: #2563eb;
}

.status-in_progress .feature-request-status-pill {
    background: #b7791f;
}

.status-done .feature-request-status-pill {
    background: #12805c;
}

.status-declined .feature-request-status-pill {
    background: #7c3aed;
}

.feature-request-reply {
    margin: 10px 0;
    border-left: 4px solid color-mix(in srgb, var(--cabin-accent, #8b5e34) 62%, #fff);
    border-radius: 10px;
    padding: 10px 12px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.62);
}

.feature-request-reply span,
.feature-owner-tools label {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.feature-request-reply p {
    margin: 4px 0 0;
}

.feature-request-side {
    display: grid;
    align-content: start;
    gap: 8px;
    justify-items: stretch;
}

.feature-request-side form {
    margin: 0;
}

.feature-support-button {
    width: 100%;
    justify-content: center;
}

.feature-support-button strong {
    display: inline-grid;
    min-width: 22px;
    height: 22px;
    margin-left: 6px;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: var(--accent);
    font-size: 12px;
}

.feature-request-edit {
    margin-top: 10px;
    border-top: 1px solid color-mix(in srgb, var(--cabin-accent, #8b5e34) 22%, var(--line));
    padding-top: 8px;
}

.feature-request-edit summary {
    cursor: pointer;
    padding: 4px 0 8px;
    color: var(--text);
    font-weight: 900;
}

.feature-request-edit form {
    display: grid;
    gap: 10px;
}

.feature-status-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.danger-soft {
    color: #8a1f17;
    border-color: transparent;
    background: rgba(255, 235, 232, 0.45);
}

.feature-request-board {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 16px;
    align-items: start;
    padding: 2px 2px 10px;
}

.feature-status-lane {
    min-width: 0;
    min-height: 220px;
    border: 1px solid color-mix(in srgb, var(--cabin-accent, #8b5e34) 25%, var(--line));
    border-radius: 18px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.46);
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.feature-status-lane.is-drag-over {
    border-color: color-mix(in srgb, var(--cabin-accent, #8b5e34) 75%, #fff);
    background: color-mix(in srgb, var(--cabin-accent, #8b5e34) 10%, rgba(255, 255, 255, 0.82));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--cabin-accent, #8b5e34) 16%, transparent);
}

.feature-status-lane > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: -4px -4px 12px;
    border-radius: 12px;
    padding: 4px;
    cursor: pointer;
    list-style: none;
}

.feature-status-lane > summary::-webkit-details-marker {
    display: none;
}

.feature-status-lane > summary span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.feature-status-lane h3 {
    margin: 0;
    color: var(--text);
    font-size: 18px;
}

.feature-status-lane:not([open]) {
    min-height: 0;
}

.feature-status-lane:not([open]) > summary {
    margin-bottom: -4px;
}

.feature-lane-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    min-height: 42px;
}

.feature-lane-cards .feature-request-item {
    min-width: 0;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 12px;
    padding: 14px;
}

.feature-lane-cards .feature-request-title-row {
    align-items: flex-start;
}

.feature-lane-cards .feature-request-title-row strong {
    flex: 1 1 180px;
    min-width: 0;
    line-height: 1.28;
    overflow-wrap: anywhere;
}

.feature-lane-cards .feature-request-category {
    flex: 0 0 auto;
}

.feature-lane-cards .feature-request-main > p {
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.feature-lane-cards .feature-request-meta {
    display: block;
    line-height: 1.45;
}

.feature-lane-cards .feature-request-side {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.feature-lane-cards .feature-request-side form {
    flex: 0 0 auto;
}

.feature-lane-cards .feature-icon-button {
    width: auto;
    min-width: 46px;
    padding-inline: 12px;
}

.feature-lane-cards .feature-request-edit .feature-request-form-grid {
    grid-template-columns: 1fr;
}

.feature-lane-cards .feature-request-edit .field {
    margin: 0;
}

.feature-lane-cards .feature-request-edit input,
.feature-lane-cards .feature-request-edit select,
.feature-lane-cards .feature-request-edit textarea {
    width: 100%;
}

.feature-lane-cards .feature-request-edit button[type="submit"] {
    width: 100%;
}

.feature-request-item[data-draggable="true"] {
    cursor: grab;
}

.feature-request-item[data-draggable="true"]:active,
.feature-request-item.is-dragging {
    cursor: grabbing;
}

.feature-request-item.is-dragging {
    opacity: 0.72;
    transform: rotate(0.4deg);
}

.feature-icon-button {
    display: inline-flex;
    min-width: 44px;
    width: 100%;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-color: transparent;
    padding: 0 10px;
    background: rgba(255, 255, 255, 0.42);
    font-size: 18px;
    line-height: 1;
    box-shadow: none;
}

.feature-icon-button strong {
    display: inline-grid;
    min-width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: var(--accent);
    font-size: 12px;
}

.feature-support-button strong {
    margin-left: 0;
}

.steam-link {
    font-weight: 900;
}

.guestbook {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
}

.guestbook-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.guestbook-entry {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.guestbook-entry span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.workshop-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) minmax(300px, 0.58fr);
    gap: 22px;
    align-items: start;
}

.designer-layout {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 18px;
}

.site-shell:has(.designer-layout) {
    width: min(1360px, calc(100% - 32px));
}

.workshop-editor,
.workshop-preview,
.block-menu {
    min-width: 0;
}

.block-menu {
    position: sticky;
    top: 18px;
    display: grid;
    gap: 12px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 14px 42px rgba(30, 41, 59, 0.08);
}

.designer-stage {
    min-width: 0;
}

.designer-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 30px rgba(30, 41, 59, 0.07);
}

.designer-topbar h1 {
    margin-bottom: 0;
    font-size: 28px;
}

.block-palette-item {
    display: grid;
    width: 100%;
    min-height: 84px;
    align-content: center;
    justify-items: start;
    gap: 5px;
    border: 1px solid var(--line);
    border-left: 5px solid #8b5e34;
    border-radius: 8px;
    padding: 14px;
    color: var(--text);
    background:
        linear-gradient(135deg, rgba(139, 94, 52, 0.1), rgba(15, 159, 143, 0.06)),
        #ffffff;
    text-align: left;
    cursor: grab;
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.block-palette-item:hover {
    border-color: rgba(139, 94, 52, 0.42);
    box-shadow: 0 10px 24px rgba(30, 41, 59, 0.08);
    transform: translateY(-1px);
}

.block-palette-item:active {
    cursor: grabbing;
}

.block-palette-item span {
    font-weight: 900;
}

.block-palette-item small {
    color: var(--muted);
    font-weight: 700;
}

.sidebar-link {
    width: 100%;
    margin-top: 14px;
    justify-content: center;
}

.cabin-settings-page {
    width: min(980px, 100%);
    margin: 34px auto 0;
    padding: 28px;
}

.settings-form {
    margin-top: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.72);
}

.settings-form > .field,
.settings-form > .form-grid {
    min-width: 0;
    overflow: hidden;
    padding: 14px;
    border: 1px solid rgba(216, 224, 234, 0.76);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
}

.settings-form > .form-grid .field {
    min-width: 0;
    overflow-wrap: anywhere;
    padding: 0;
}

.identity-field-grid {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
}

.identity-field-grid .field {
    align-content: start;
    align-self: start;
}

.settings-form .field a {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.settings-form .field br {
    content: "";
}

.media-field-grid {
    align-items: stretch;
}

.media-upload-field {
    align-content: start;
}

.media-upload-card {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.media-current {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: rgba(237, 241, 246, 0.42);
}

.media-current-avatar,
.media-current-banner {
    display: block;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    object-fit: cover;
}

.media-current-avatar {
    width: 76px;
    height: 76px;
    aspect-ratio: 1 / 1;
}

.media-current-banner {
    width: 118px;
    height: 58px;
}

.media-current-label {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

.media-current-name {
    display: block;
    max-width: 100%;
    overflow-wrap: anywhere;
    color: var(--text);
    font-size: 14px;
    line-height: 1.35;
}

.media-clear-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
}

.media-clear-option input {
    width: 16px;
    min-width: 16px;
    height: 16px;
    min-height: 16px;
}

.media-file-control {
    display: grid;
    gap: 8px;
    min-width: 0;
    border: 1px dashed var(--line);
    border-radius: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.74);
}

.media-file-control input[type="file"] {
    min-height: auto;
    padding: 7px;
}

.media-file-control .crop-trigger {
    width: 100%;
    min-height: 38px;
    margin-top: 0;
}

.settings-advanced {
    padding-bottom: 12px;
}

.settings-advanced .field,
.settings-advanced .checkbox-field,
.settings-advanced .muted {
    margin-right: 12px;
    margin-left: 12px;
}

.color-field input {
    width: 86px;
    padding: 4px;
}

.cabin-settings {
    margin-top: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(237, 241, 246, 0.42);
}

.compact-settings {
    margin-top: 18px;
    background: rgba(255, 255, 255, 0.8);
}

.compact-settings .stacked-form {
    gap: 10px;
}

.compact-settings input,
.compact-settings textarea {
    min-height: 36px;
}

.cabin-settings summary {
    padding: 14px 16px;
    color: var(--text);
    font-weight: 900;
    cursor: pointer;
}

.cabin-settings .stacked-form {
    margin: 0;
    padding: 0 16px 16px;
}

.advanced-styling {
    margin: 8px 0;
    border: 1px dashed var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.56);
}

.advanced-styling summary {
    padding: 10px 12px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
}

.advanced-styling p {
    padding: 0 12px;
}

.checkbox-field {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-field input {
    width: auto;
    min-height: 0;
}

.checkbox-field label {
    margin: 0;
}

.room-builder-dropzone {
    display: grid;
    min-height: 190px;
    place-items: center;
    margin-top: 22px;
    border: 2px dashed rgba(139, 94, 52, 0.42);
    border-radius: 8px;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(139, 94, 52, 0.08), rgba(15, 159, 143, 0.08)),
        rgba(255, 255, 255, 0.74);
    text-align: center;
    transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.designer-canvas {
    gap: 20px;
    max-width: 980px;
    min-height: 720px;
    margin: 0 auto;
    border: 1px solid #cfd8e3;
    border-radius: 8px;
    padding: 22px;
    background:
        linear-gradient(90deg, rgba(216, 224, 234, 0.3) 1px, transparent 1px),
        linear-gradient(180deg, rgba(216, 224, 234, 0.3) 1px, transparent 1px),
        #fbfcfe;
    background-size: 24px 24px;
    box-shadow:
        0 22px 64px rgba(30, 41, 59, 0.12),
        0 0 0 8px rgba(255, 255, 255, 0.52);
}

.designer-canvas .cabin-hero {
    box-shadow: 0 12px 34px rgba(30, 41, 59, 0.1);
}

.canvas-dropzone {
    display: grid;
    place-items: center;
    min-height: 86px;
    border: 1px dashed rgba(95, 111, 134, 0.46);
    border-radius: 8px;
    padding: 16px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.76);
    text-align: center;
    transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.canvas-dropzone.is-dragging-over {
    border-color: var(--primary);
    color: var(--text);
    background: #eef6ff;
    transform: translateY(-1px);
}

.canvas-block-list {
    gap: 14px;
}

.canvas-block {
    position: relative;
    cursor: grab;
    border-color: transparent;
    background: rgba(255, 255, 255, 0.94);
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease, opacity 140ms ease;
}

.canvas-block:hover {
    border-color: rgba(31, 111, 235, 0.5);
    box-shadow: 0 14px 34px rgba(30, 41, 59, 0.12);
}

.canvas-block.is-dragging {
    opacity: 0.48;
    transform: scale(0.99);
}

.block-drag-handle {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    min-height: 24px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 2px 8px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.9);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 140ms ease;
}

.canvas-block:hover .block-drag-handle,
.canvas-block:focus-within .block-drag-handle {
    opacity: 1;
}

.block-corner-menu {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
}

.block-corner-menu summary {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.96);
    font-weight: 900;
    cursor: pointer;
    list-style: none;
}

.block-corner-menu summary::-webkit-details-marker {
    display: none;
}

.block-menu-popover {
    position: absolute;
    top: 38px;
    right: 0;
    display: grid;
    min-width: 148px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 6px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.block-menu-popover form {
    margin: 0;
}

.block-menu-popover button {
    justify-content: flex-start;
    width: 100%;
    min-height: 34px;
    border: 0;
    color: var(--text);
    background: transparent;
    font-size: 14px;
}

.block-menu-popover button:hover {
    background: var(--surface-soft);
    transform: none;
}

.block-menu-popover .danger-text {
    color: var(--danger);
}

.canvas-empty {
    margin-top: 0;
}

.room-builder-dropzone.is-dragging-over {
    border-color: #8b5e34;
    background:
        linear-gradient(135deg, rgba(139, 94, 52, 0.18), rgba(15, 159, 143, 0.14)),
        rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
}

.text-block-composer,
.image-block-composer,
.music-block-composer,
.app-block-composer {
    display: grid;
    gap: 16px;
    max-width: 980px;
    margin: 0 auto 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-top: 4px solid #8b5e34;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 14px 34px rgba(30, 41, 59, 0.09);
}

.text-block-composer[hidden],
.image-block-composer[hidden],
.music-block-composer[hidden],
.app-block-composer[hidden] {
    display: none;
}

.field-hint {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.image-upload-preview {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-top: 10px;
    background: #ffffff;
}

.image-upload-preview img {
    display: block;
    width: 100%;
    max-height: 260px;
    object-fit: contain;
}

.music-upload-preview {
    margin-top: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.music-upload-preview audio,
.music-block-card audio {
    display: block;
    width: 100%;
}

.music-block-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 42%);
    gap: 18px;
    align-items: center;
}

.music-block-card h2,
.music-block-card p {
    margin-top: 0;
}

.music-card-controls {
    display: grid;
    gap: 10px;
}

.music-fade-state {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 13px;
}

.setting-toggle {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.78);
    cursor: pointer;
}

.setting-toggle[hidden] {
    display: none;
}

.setting-toggle input {
    width: 20px;
    height: 20px;
    min-height: 0;
    margin-top: 2px;
    accent-color: var(--accent);
}

.setting-toggle span {
    display: grid;
    gap: 2px;
}

.setting-toggle small {
    color: var(--muted);
}

.setting-toggle.compact {
    padding: 10px;
}

.inline-music-save-button {
    width: 100%;
}

.music-block-summary {
    grid-template-columns: 1fr;
}

body.has-cabin-music .site-shell {
    padding-bottom: 48px;
}

.cabin-music-dock {
    position: fixed;
    top: 50%;
    right: max(14px, env(safe-area-inset-right));
    z-index: 40;
    display: grid;
    width: 264px;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(229, 196, 126, 0.5);
    border-radius: 14px;
    color: #fff4d8;
    background: rgba(8, 15, 17, 0.94);
    box-shadow: 0 20px 54px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(18px) saturate(1.16);
    transform: translateY(-50%);
    transition: width 180ms ease, padding 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.cabin-music-panel-content {
    display: grid;
    gap: 12px;
}

.cabin-music-panel-content[hidden] {
    display: none;
}

.cabin-music-panel-toggle {
    position: absolute;
    top: 50%;
    left: -38px;
    display: grid;
    width: 36px;
    min-width: 36px;
    height: 48px;
    min-height: 48px;
    place-items: center;
    border: 1px solid rgba(229, 196, 126, 0.5);
    border-right: 0;
    border-radius: 10px 0 0 10px;
    padding: 0;
    color: #fff4d8;
    background: rgba(8, 15, 17, 0.94);
    transform: translateY(-50%);
}

.cabin-music-panel-toggle:hover,
.cabin-music-panel-toggle:focus-visible {
    color: #ffd982;
    background: #18211f;
}

.music-panel-toggle-icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}


.music-panel-toggle-icon[hidden] {
    display: none;
}

.cabin-music-dock.is-collapsed {
    width: 0;
    padding: 0;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

.cabin-music-copy {
    display: grid;
    min-width: 0;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 2px 10px;
    align-items: center;
    text-align: left;
}

.cabin-music-mark {
    display: block;
    grid-row: 1 / 5;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid rgba(229, 196, 126, 0.38);
    border-radius: 8px;
    color: #ffd982;
    background: rgba(255, 255, 255, 0.08);
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cabin-music-copy .kicker,
.cabin-music-copy strong,
.cabin-music-copy span,
.cabin-music-copy small {
    overflow: hidden;
    margin: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cabin-music-copy strong {
    max-width: 190px;
    font-size: 13px;
}

.cabin-music-copy .kicker {
    font-size: 9px;
}

.cabin-music-copy small {
    max-width: 190px;
    font-size: 10px;
}

.cabin-music-copy span,
.cabin-music-copy small {
    color: rgba(255, 244, 216, 0.74);
}

.cabin-music-actions {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    gap: 8px;
    align-items: center;
}

.music-control-button {
    display: grid;
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    place-items: center;
    border: 1px solid rgba(255, 244, 216, 0.28);
    border-radius: 50%;
    padding: 0;
    color: #fff4d8;
    background: rgba(255, 255, 255, 0.08);
}

.music-control-button:hover,
.music-control-button:focus-visible {
    border-color: rgba(255, 217, 130, 0.78);
    color: #ffd982;
    background: rgba(255, 255, 255, 0.14);
}

.music-play-button {
    color: #101817;
    background: #ffd982;
}

.music-play-button:hover,
.music-play-button:focus-visible {
    color: #101817;
    background: #ffe6a8;
}

.music-control-icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}


.music-control-icon[hidden] {
    display: none;
}

.cabin-progress-control {
    display: grid;
    gap: 4px;
    margin: 0;
}

.cabin-progress-times {
    display: flex;
    justify-content: space-between;
    color: rgba(255, 244, 216, 0.72);
    font-size: 10px;
    font-variant-numeric: tabular-nums;
}

.cabin-progress-control input[type="range"] {
    width: 100%;
    min-height: 24px;
    margin: 0;
    padding: 0;
    accent-color: #ffd982;
    cursor: pointer;
}

.cabin-volume-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 6px;
    align-items: center;
    margin: 0;
    color: rgba(255, 244, 216, 0.72);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cabin-volume-control input[type="range"] {
    width: 100%;
    height: 28px;
    min-height: 28px;
    margin: 0;
    padding: 0;
    accent-color: #ffd982;
    cursor: pointer;
    direction: ltr;
    writing-mode: horizontal-tb;
}

.cabin-volume-control > span {
    grid-column: 1 / -1;
}

.cabin-volume-control output {
    color: #fff4d8;
    font-size: 10px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
}

@media (min-width: 641px) and (max-width: 1480px) {
    body.has-cabin-music .site-shell {
        width: calc(100% - 310px);
        margin-right: 294px;
        margin-left: 16px;
    }

    body.has-cabin-music:has(.cabin-music-dock.is-collapsed) .site-shell {
        width: min(1180px, calc(100% - 32px));
        margin-right: auto;
        margin-left: auto;
    }
}

@media (max-width: 640px) {
    .music-block-card {
        grid-template-columns: 1fr;
    }

    .cabin-music-dock {
        grid-template-columns: minmax(110px, 0.8fr) minmax(100px, 1fr) auto;
        top: auto;
        right: auto;
        bottom: max(8px, env(safe-area-inset-bottom));
        left: 50%;
        width: calc(100% - 16px);
        max-width: 620px;
        gap: 10px;
        padding: 10px 12px;
        border-radius: 18px;
        transform: translateX(-50%);
    }

    .cabin-music-panel-toggle {
        top: -38px;
        right: 10px;
        left: auto;
        width: 48px;
        height: 36px;
        min-height: 36px;
        border-right: 1px solid rgba(229, 196, 126, 0.5);
        border-bottom: 0;
        border-radius: 10px 10px 0 0;
        transform: none;
    }

    .cabin-music-dock.is-collapsed {
        right: max(14px, env(safe-area-inset-right));
        bottom: max(14px, env(safe-area-inset-bottom));
        left: auto;
        transform: none;
    }

    .cabin-music-dock.is-collapsed .cabin-music-panel-toggle {
        top: auto;
        right: 0;
        bottom: 0;
        border: 1px solid rgba(229, 196, 126, 0.5);
        border-radius: 10px;
    }

    body.has-cabin-music .site-shell {
        padding-bottom: 138px;
    }

    .cabin-music-copy strong,
    .cabin-music-copy small {
        max-width: 100%;
    }

    .cabin-music-actions {
        grid-template-columns: auto auto minmax(0, 1fr);
    }

    .cabin-volume-control {
        grid-template-columns: minmax(72px, 1fr) auto;
    }
}

.rich-text-editor {
    min-height: 180px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: #ffffff;
    font: inherit;
}

.rich-text-editor:empty::before {
    content: attr(data-placeholder);
    color: var(--muted);
}

.rich-text-editor:focus {
    border-color: var(--primary);
    outline: 3px solid rgba(37, 99, 235, 0.14);
}

.editable-canvas-text {
    min-height: 30px;
    border-radius: 8px;
    padding: 6px;
}

.editable-canvas-text[contenteditable="false"] {
    cursor: default;
}

.editable-canvas-text:focus {
    outline: 3px solid rgba(37, 99, 235, 0.14);
    background: rgba(255, 255, 255, 0.92);
}

.canvas-block.is-editing {
    border-color: rgba(31, 111, 235, 0.5);
    box-shadow: 0 14px 34px rgba(31, 111, 235, 0.12);
    cursor: text;
}

.inline-block-edit-form {
    margin: 0;
}

.inline-image-edit-form {
    display: grid;
    gap: 10px;
}

.inline-image-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.88);
}

.inline-image-controls[hidden] {
    display: none;
}

.inline-save-button {
    position: absolute;
    right: 52px;
    bottom: 10px;
    z-index: 3;
    min-height: 32px;
    padding: 0 12px;
    font-size: 13px;
}

.image-caption {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.rich-text-editor h1,
.rich-text-editor h2,
.rich-text-editor h3,
.free-text-block h1,
.free-text-block h2,
.free-text-block h3,
.free-text-block p,
.free-text-block div {
    margin: 0 0 10px;
}

.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, #f8fbff 0%, #edf3f8 100%);
}

.editor-toolbar select,
.editor-toolbar input[type="number"] {
    width: auto;
    min-width: 112px;
    min-height: 36px;
    padding: 6px 10px;
    background: #ffffff;
}

.editor-toolbar input[type="number"] {
    min-width: 76px;
}

.toolbar-toggle,
.toolbar-color {
    display: inline-flex;
    min-width: 36px;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    margin: 0;
    color: var(--text);
    background: #ffffff;
    font-weight: 900;
    cursor: pointer;
}

.toolbar-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.toolbar-toggle:has(input:checked) {
    border-color: var(--primary);
    color: var(--primary);
    background: #eef6ff;
}

.toolbar-toggle.italic span {
    font-style: italic;
}

.toolbar-toggle.underline span {
    text-decoration: underline;
}

.toolbar-color {
    gap: 6px;
    padding: 0 8px;
}

.toolbar-color input {
    width: 26px;
    min-height: 26px;
    border: 0;
    padding: 0;
    background: transparent;
}

.font-system {
    font-family: Arial, Helvetica, sans-serif;
}

.font-montserrat {
    font-family: Montserrat, Arial, Helvetica, sans-serif;
}

.font-serif {
    font-family: Georgia, "Times New Roman", serif;
}

.font-mono {
    font-family: Consolas, "Courier New", monospace;
}

.is-bold {
    font-weight: 900;
}

.is-italic {
    font-style: italic;
}

.is-underlined {
    text-decoration: underline;
}

.soft-rule {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 28px 0;
}

.block-control-list {
    display: grid;
    gap: 12px;
}

.block-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.block-control span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.mini-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mini-actions form {
    margin: 0;
}

.mini-actions button {
    min-height: 36px;
    padding: 0 10px;
    font-size: 14px;
}

.mini-cabin-preview {
    display: grid;
    gap: 12px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--cabin-accent, #8b5e34) 35%, var(--line));
    border-radius: 8px;
    background: linear-gradient(180deg, #fffdf8 0%, #f6f0e8 100%);
}

.mini-banner {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.mini-avatar {
    display: block;
    width: 82px;
    height: 82px;
    aspect-ratio: 1 / 1;
    margin: -42px 16px 0;
    border: 4px solid #ffffff;
    border-radius: 8px;
    object-fit: cover;
    background: var(--surface);
}

.mini-block {
    margin: 0 14px 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-left: 5px solid var(--cabin-accent, #8b5e34);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
}

.mini-block img {
    display: block;
    width: 100%;
    max-height: 180px;
    margin-top: 8px;
    border-radius: 8px;
    object-fit: cover;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }

    .motion-reveal {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 760px) {
    .site-header,
    .hero {
        display: block;
    }

    .nav-actions {
        display: flex;
        margin-top: 14px;
    }

    .common-masthead {
        grid-template-columns: 1fr;
        min-height: 0;
        padding: 24px;
    }

    .common-masthead h1 {
        font-size: 38px;
    }

    .common-function-grid {
        padding: 0 18px 18px;
    }

    .common-card-wide,
    .common-card-vote,
    .common-card-notice,
    .common-card-reserved {
        grid-column: auto;
    }

    .hero .panel + .panel {
        margin-top: 16px;
    }

    h1 {
        font-size: 32px;
    }

    .feature-grid,
    .common-function-grid,
    .narrow-grid,
    .form-grid,
    .cabin-door-grid,
    .workshop-layout,
    .voting-layout,
    .proposal-board,
    .proposal-card {
        grid-template-columns: 1fr;
    }

    .proposal-form {
        position: static;
    }

    .designer-layout {
        grid-template-columns: 1fr;
    }

    .block-menu {
        position: static;
    }

    .designer-topbar {
        display: grid;
    }

    .designer-canvas {
        min-height: 0;
        padding: 12px;
        box-shadow: var(--shadow);
    }

    .page-heading,
    .block-control {
        display: grid;
    }

    .cabin-hero-content {
        display: grid;
        align-content: end;
    }

    .panel,
    .auth-panel {
        padding: 22px;
    }

    .calendar-header {
        display: grid;
    }

    .calendar-header-actions,
    .calendar-month-nav {
        justify-content: stretch;
    }

    .calendar-header-actions .button,
    .calendar-month-nav .button {
        justify-content: center;
        flex: 1 1 auto;
    }

    .calendar-grid {
        display: grid;
        grid-template-columns: 1fr;
        background: transparent;
        border: 0;
        gap: 10px;
    }

    .weekday,
    .muted-day {
        display: none;
    }

    .calendar-day {
        min-height: 0;
        padding: 10px;
        border: 1px solid var(--line);
        border-radius: 8px;
    }

    .calendar-day:not(:has(.calendar-event)) {
        display: none;
    }

    .event-detail {
        position: static;
        width: 100%;
        max-height: none;
        margin-top: 8px;
        opacity: 1;
        transform: none;
    }

    .calendar-event,
    .calendar-event.event-start,
    .calendar-event.event-middle,
    .calendar-event.event-end {
        margin: 0;
        border: 1px solid rgba(31, 111, 235, 0.24);
        border-radius: 8px;
        color: var(--text);
    }
}

@media (max-width: 460px) {
    .site-shell {
        width: min(100% - 20px, 1040px);
        padding-top: 14px;
    }

    .nav-actions {
        align-items: stretch;
    }

    .nav-actions .button,
    .nav-actions button {
        width: 100%;
    }

    .button-row .button,
    .button-row button {
        width: 100%;
    }
}

/* Mobile interaction and narrow-screen layout pass. */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

img,
video,
audio {
    max-width: 100%;
}

button,
.button,
input,
select,
textarea,
summary {
    touch-action: manipulation;
}

@media (max-width: 760px) {
    .site-shell,
    .site-shell:has(.designer-layout) {
        width: calc(100% - 20px);
        padding-bottom: 32px;
    }

    body.has-cabin-music .site-shell {
        padding-bottom: 32px;
    }

    .site-header {
        min-height: 0;
        padding: 10px 0 30px;
    }

    .nav-actions {
        width: 100%;
        margin-top: 0;
        flex-wrap: wrap;
        gap: 8px;
    }

    .nav-actions .button {
        flex: 1 1 calc(50% - 8px);
        min-width: 0;
        min-height: 44px;
        padding-inline: 12px;
    }

    .nav-actions .icon-button,
    .nav-actions button.icon-button {
        width: 44px;
        min-width: 44px;
        height: 44px;
        min-height: 44px;
        flex: 0 0 44px;
    }

    h1,
    .common-masthead h1 {
        font-size: clamp(30px, 10vw, 40px);
        overflow-wrap: anywhere;
    }

    h2,
    h3,
    p,
    a,
    strong,
    span {
        overflow-wrap: anywhere;
    }

    .panel,
    .auth-panel,
    .cabin-settings-page,
    .guestbook {
        padding: 18px;
    }

    .common-masthead {
        gap: 14px;
        padding: 18px 4px 22px;
    }

    .common-function-grid {
        gap: 12px;
        padding: 0 8px 12px;
    }

    .button,
    button,
    input,
    select,
    textarea {
        min-height: 44px;
    }

    input,
    select,
    textarea {
        font-size: 16px;
    }

    .button-row {
        gap: 10px;
    }

    .designer-layout {
        gap: 12px;
    }

    .block-menu {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 14px;
    }

    .block-menu > .kicker,
    .block-menu > h2,
    .block-menu > .sidebar-link {
        grid-column: 1 / -1;
    }

    .block-palette-item {
        min-height: 92px;
        padding: 12px;
    }

    .designer-topbar {
        gap: 12px;
        padding: 14px;
    }

    .designer-topbar .button-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .designer-topbar .button-row .button:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .designer-canvas {
        width: 100%;
        padding: 10px;
    }

    .text-block-composer,
    .image-block-composer,
    .music-block-composer,
    .app-block-composer {
        width: 100%;
        padding: 14px;
    }

    .editor-toolbar {
        flex-wrap: nowrap;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        padding: 8px;
        scrollbar-width: thin;
    }

    .editor-toolbar > * {
        flex: 0 0 auto;
    }

    .cabin-hero,
    .cabin-hero-content {
        min-height: 280px;
    }

    .cabin-hero-content {
        gap: 12px;
        padding: 18px;
    }

    .cabin-avatar {
        width: 88px;
        height: 88px;
    }

    .cabin-block {
        padding: 16px;
    }

    .feature-request-item,
    .inline-image-controls,
    .media-current {
        grid-template-columns: 1fr;
    }

    .feature-request-form-grid {
        grid-template-columns: 1fr;
    }

    .feature-request-side {
        justify-items: stretch;
    }

    .feature-request-board {
        grid-template-columns: 1fr;
    }

    .feature-status-lane {
        min-width: 0;
    }

    .collapsible-app-summary {
        gap: 10px;
        align-items: flex-start;
        padding: 14px;
    }

    .collapsible-app-content {
        padding: 0 14px 14px;
    }

    .collapsible-app-action {
        min-width: 72px;
        padding-inline: 10px;
    }

    .feature-request-status,
    .status-guide,
    .session-meta {
        align-items: stretch;
        flex-direction: column;
    }

    .crop-modal {
        align-items: end;
        padding: 10px;
    }

    .crop-dialog {
        max-height: calc(100dvh - 20px);
        padding: 16px;
        border-radius: 12px 12px 0 0;
    }

    .crop-dialog-header {
        align-items: flex-start;
    }

}

@media (max-width: 460px) {
    .site-shell,
    .site-shell:has(.designer-layout) {
        width: calc(100% - 12px);
    }

    .nav-actions .button {
        width: auto;
        flex: 1 1 calc(50% - 8px);
    }

    body.has-cabin-music .site-shell {
        padding-bottom: 206px;
    }

    .cabin-music-dock {
        grid-template-columns: 1fr;
    }

    .cabin-music-actions {
        width: 100%;
        grid-template-columns: auto auto minmax(0, 1fr);
    }

    .block-menu,
    .designer-topbar .button-row {
        grid-template-columns: 1fr;
    }

    .block-menu > *,
    .designer-topbar .button-row .button,
    .designer-topbar .button-row .button:last-child:nth-child(odd) {
        grid-column: 1;
    }

    .panel,
    .auth-panel,
    .cabin-settings-page,
    .guestbook {
        padding: 14px;
    }

    .cabin-hero-content {
        padding: 14px;
    }

    .cabin-avatar {
        width: 76px;
        height: 76px;
    }

    .cabin-block {
        padding: 12px;
    }
}

@media (min-width: 461px) and (max-width: 640px) {
    body.has-cabin-music .site-shell {
        padding-bottom: 138px;
    }
}

@media (max-width: 640px) {
    body.has-cabin-music:has(.cabin-music-dock.is-collapsed) .site-shell {
        padding-bottom: 32px;
    }
}

/* Common Deck station walk */
.deck-walk {
    width: min(1180px, 100%);
    margin: 28px auto 0;
    padding: 0 0 26px;
}

.deck-station-viewport {
    position: relative;
    overflow: hidden;
    min-height: min(720px, calc(100vh - 130px));
    border-radius: 0;
    box-shadow: 0 34px 80px rgba(0, 0, 0, 0.32);
    isolation: isolate;
}

.deck-station-track {
    display: flex;
    height: 100%;
    min-height: min(720px, calc(100vh - 130px));
    transform: translate3d(calc(var(--deck-index, 0) * -100%), 0, 0);
    transition: transform 760ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.deck-station {
    position: relative;
    min-width: 100%;
    min-height: min(720px, calc(100vh - 130px));
    overflow: hidden;
    color: #fff7dc;
}

.deck-station::before,
.deck-station::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.deck-station::before {
    z-index: 1;
    background:
        radial-gradient(circle at 28% 22%, rgba(255, 226, 151, 0.18), transparent 22rem),
        linear-gradient(90deg, rgba(3, 6, 7, 0.72) 0%, rgba(3, 6, 7, 0.14) 48%, rgba(3, 6, 7, 0.7) 100%);
}

.deck-station::after {
    z-index: 2;
    background:
        linear-gradient(90deg, rgba(5, 8, 9, 0.86) 0%, rgba(5, 8, 9, 0.12) 28%, rgba(5, 8, 9, 0.12) 72%, rgba(5, 8, 9, 0.86) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.08) 34%, rgba(0, 0, 0, 0.84) 100%);
}

.deck-station-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: var(--station-bg);
    background-position: center center;
    background-size: cover;
    transform: translate3d(calc((var(--deck-index, 0) - var(--station-number, 0)) * 4%), 0, 0) scale(1.06);
    transition: transform 920ms cubic-bezier(0.22, 1, 0.36, 1), filter 700ms ease;
    filter: saturate(1.04) contrast(1.04);
    will-change: transform;
}

.deck-station:nth-child(1) { --station-number: 0; }
.deck-station:nth-child(2) { --station-number: 1; }
.deck-station:nth-child(3) { --station-number: 2; }
.deck-station:nth-child(4) { --station-number: 3; }

.deck-station-content {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    grid-template-rows: auto 1fr;
    gap: 26px;
    min-height: inherit;
    padding: clamp(28px, 5vw, 64px);
}

.deck-station-content-centered {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    align-items: center;
}

.deck-station-copy {
    align-self: start;
    max-width: 700px;
    text-shadow: 0 3px 22px rgba(0, 0, 0, 0.44);
    transform: translateY(0);
    transition: opacity 520ms ease, transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
}

.deck-station:not(.is-active) .deck-station-copy,
.deck-station:not(.is-active) .deck-room-card,
.deck-station:not(.is-active) .deck-station-panel,
.deck-station:not(.is-active) .ship-status-card {
    opacity: 0.28;
    transform: translateY(18px);
}

.deck-station-copy .kicker {
    color: #7ff4e0;
    letter-spacing: 0.08em;
}

.deck-station-copy h1 {
    max-width: 760px;
    margin: 0 0 12px;
    color: #fff7dc;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 0.95;
}

.deck-station-copy p {
    max-width: 680px;
    margin: 0;
    color: rgba(255, 247, 220, 0.88);
    font-size: clamp(17px, 2vw, 21px);
}

.deck-station-panel {
    position: relative;
    display: grid;
    grid-column: 1 / -1;
    align-self: end;
    min-height: 330px;
    overflow: hidden;
    color: #fff7dc;
    text-decoration: none;
    background: #020303;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.deck-station-panel:hover,
.deck-room-card:hover {
    text-decoration: none;
    transform: translateY(-3px);
}

.deck-panel-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    filter: saturate(1.08) contrast(1.06);
}

.deck-station-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.18) 38%, rgba(0, 0, 0, 0.92) 100%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.74) 0%, rgba(0, 0, 0, 0.1) 56%, rgba(0, 0, 0, 0.52) 100%);
}

.deck-panel-copy {
    position: relative;
    z-index: 1;
    display: grid;
    align-content: end;
    gap: 8px;
    max-width: 620px;
    min-height: 330px;
    padding: clamp(26px, 5vw, 52px);
}

.deck-panel-copy h2,
.deck-room-card h2 {
    margin: 0;
    color: #fff7dc;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.02;
}

.deck-panel-copy p,
.deck-room-card p {
    margin: 0;
    color: rgba(255, 247, 220, 0.86);
    font-size: 17px;
}

.deck-room-card {
    display: grid;
    gap: 12px;
    align-self: center;
    min-height: 310px;
    padding: clamp(22px, 4vw, 34px);
    color: #fff7dc;
    text-decoration: none;
    background: linear-gradient(180deg, rgba(3, 7, 8, 0.78), rgba(3, 7, 8, 0.52));
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(10px) saturate(1.1);
    transition: opacity 520ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.deck-room-card .function-icon,
.deck-panel-copy .function-icon {
    border: 0;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: none;
    filter: brightness(0) saturate(100%) invert(91%) sepia(26%) saturate(455%) hue-rotate(349deg) brightness(105%) contrast(96%);
}

.deck-room-card .function-kicker,
.deck-panel-copy .function-kicker,
.deck-panel-copy .location-meta {
    color: #7ff4e0;
}

.deck-ranking li {
    border-color: rgba(255, 247, 220, 0.24);
    color: rgba(255, 247, 220, 0.9);
}

.deck-ranking strong {
    color: #11201e;
    background: #7ff4e0;
}

.deck-enter-link {
    align-self: end;
    margin-top: 12px;
    color: #ffdc8a;
    font-weight: 900;
}

.deck-arrow {
    position: absolute;
    top: 50%;
    z-index: 6;
    display: inline-flex;
    width: 50px;
    height: 82px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0;
    color: #fff7dc;
    background: linear-gradient(180deg, rgba(3, 6, 7, 0.12), rgba(3, 6, 7, 0.44));
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(10px);
    transform: translateY(-50%);
}

.deck-arrow span {
    display: block;
    font-size: 52px;
    line-height: 1;
    transform: translateY(-2px);
}

.deck-arrow-left {
    left: -62px;
}

.deck-arrow-right {
    right: -62px;
}

.deck-arrow:hover {
    color: #7ff4e0;
    background: rgba(3, 6, 7, 0.64);
}

.deck-arrow:disabled {
    opacity: 0.26;
    pointer-events: none;
}

.deck-station-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}

.deck-station-dots button {
    min-height: 34px;
    border: 0;
    border-radius: 999px;
    padding: 8px 14px;
    color: rgba(255, 247, 220, 0.8);
    background: rgba(4, 8, 9, 0.42);
    box-shadow: none;
    backdrop-filter: blur(8px);
}

.deck-station-dots button.is-active {
    color: #10201e;
    background: #7ff4e0;
}

@media (prefers-reduced-motion: reduce) {
    .deck-station-track,
    .deck-station-bg,
    .deck-station-copy,
    .deck-room-card,
    .deck-station-panel,
    .ship-status-card {
        transition: none;
    }
}

@media (max-width: 1240px) {
    .deck-arrow-left {
        left: 10px;
    }

    .deck-arrow-right {
        right: 10px;
    }
}

@media (max-width: 760px) {
    .deck-walk {
        width: calc(100% + 20px);
        margin-left: -10px;
    }

    .deck-station-viewport,
    .deck-station-track,
    .deck-station {
        min-height: calc(100vh - 112px);
    }

    .deck-station-content,
    .deck-station-content-centered {
        grid-template-columns: 1fr;
        align-content: end;
        padding: 72px 18px 26px;
    }

    .deck-station-copy h1 {
        font-size: clamp(36px, 13vw, 54px);
    }

    .ship-status-card {
        width: min(100%, 270px);
    }

    .deck-station-panel,
    .deck-panel-copy {
        min-height: 300px;
    }

    .deck-room-card {
        min-height: 250px;
    }

    .deck-arrow {
        top: 46%;
        width: 42px;
        height: 64px;
    }

    .deck-arrow span {
        font-size: 42px;
    }

    .deck-station-dots {
        flex-wrap: wrap;
        padding-inline: 10px;
    }

    .deck-station-dots button {
        flex: 1 1 calc(50% - 10px);
    }
}
/* Deck mood and liquid glass refinement */
body::before {
    animation: site-bg-breathe 26s ease-in-out infinite alternate;
    transform: scale(1.035);
    transform-origin: center;
    will-change: transform, filter;
}

@keyframes site-bg-breathe {
    from {
        transform: scale(1.035) translate3d(0, 0, 0);
        filter: saturate(1.02) contrast(1.02);
    }
    to {
        transform: scale(1.075) translate3d(-12px, -10px, 0);
        filter: saturate(1.12) contrast(1.08);
    }
}

.deck-station-bg {
    animation: station-bg-breathe 20s ease-in-out infinite alternate;
}

@keyframes station-bg-breathe {
    from {
        filter: saturate(1.04) contrast(1.04) brightness(0.96);
    }
    to {
        filter: saturate(1.16) contrast(1.1) brightness(1.02);
    }
}

.deck-station::before {
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 231, 166, 0.2), transparent 22rem),
        linear-gradient(90deg, rgba(3, 6, 7, 0.5) 0%, rgba(3, 6, 7, 0.08) 52%, rgba(3, 6, 7, 0.46) 100%);
}

.deck-station::after {
    background:
        linear-gradient(90deg, rgba(5, 8, 9, 0.58) 0%, rgba(5, 8, 9, 0.08) 34%, rgba(5, 8, 9, 0.08) 66%, rgba(5, 8, 9, 0.58) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.24) 0%, rgba(0, 0, 0, 0.04) 42%, rgba(0, 0, 0, 0.62) 100%);
}

.deck-station-copy,
.deck-room-card,
.deck-station-panel,
.ship-status-card {
    transform: none !important;
}

.deck-station:not(.is-active) .deck-station-copy,
.deck-station:not(.is-active) .deck-room-card,
.deck-station:not(.is-active) .deck-station-panel,
.deck-station:not(.is-active) .ship-status-card {
    opacity: 0.32;
    transform: none !important;
}

.deck-station-copy {
    transition: opacity 420ms ease;
}

.deck-station-panel,
.deck-room-card,
.ship-status-card {
    position: relative;
    overflow: hidden;
    border: 0;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.07) 44%, rgba(255, 255, 255, 0.13));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.42),
        inset 0 -18px 44px rgba(255, 255, 255, 0.045),
        0 28px 72px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(22px) saturate(1.42);
    -webkit-backdrop-filter: blur(22px) saturate(1.42);
}

.deck-room-card,
.ship-status-card {
    color: #fff7dc;
}

.deck-station-panel:hover,
.deck-room-card:hover {
    transform: none !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.48),
        inset 0 -18px 44px rgba(255, 255, 255, 0.06),
        0 32px 86px rgba(0, 0, 0, 0.38);
}

.deck-station-panel::before,
.deck-room-card::before,
.ship-status-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        linear-gradient(115deg, rgba(255, 255, 255, 0.34), transparent 28%, transparent 68%, rgba(255, 255, 255, 0.12)),
        radial-gradient(circle at 14% 0%, rgba(127, 244, 224, 0.18), transparent 28rem);
    opacity: 0.68;
    pointer-events: none;
}

.deck-station-panel::after {
    background:
        linear-gradient(0deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.44) 34%, rgba(0, 0, 0, 0.12) 72%, rgba(0, 0, 0, 0.02) 100%);
}

.current-voyage-panel {
    align-self: end;
    max-width: 760px;
    min-height: 360px;
    background: linear-gradient(135deg, rgba(7, 11, 12, 0.34), rgba(7, 11, 12, 0.12));
}

.current-voyage-panel .deck-panel-art {
    opacity: 0;
}

.deck-panel-copy {
    max-width: 680px;
    padding: clamp(28px, 5vw, 58px);
    text-shadow: 0 3px 24px rgba(0, 0, 0, 0.72);
}

.deck-panel-copy h2,
.deck-room-card h2 {
    text-shadow: 0 4px 26px rgba(0, 0, 0, 0.62);
}

.deck-arrow {
    border: 0;
    color: rgba(255, 247, 220, 0.9);
    background: rgba(255, 255, 255, 0.08);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 18px 44px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(16px) saturate(1.25);
    -webkit-backdrop-filter: blur(16px) saturate(1.25);
    transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.deck-arrow:hover {
    color: #7ff4e0;
    background: rgba(255, 255, 255, 0.14);
}

.deck-arrow span {
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    body::before,
    .deck-station-bg {
        animation: none;
    }
}
/* Deck station transparency and arrow stability hotfix */
.deck-walk {
    width: min(1240px, 100%);
}

.deck-station-viewport {
    overflow: visible;
    background: transparent;
    box-shadow: none;
}

.deck-station {
    background: transparent;
}

.deck-station-bg {
    opacity: 0;
    animation: none;
}

.deck-station::before {
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 231, 166, 0.12), transparent 22rem),
        linear-gradient(90deg, rgba(3, 6, 7, 0.48) 0%, rgba(3, 6, 7, 0.04) 50%, rgba(3, 6, 7, 0.42) 100%);
}

.deck-station::after {
    background:
        linear-gradient(90deg, rgba(5, 8, 9, 0.46) 0%, rgba(5, 8, 9, 0.02) 34%, rgba(5, 8, 9, 0.02) 66%, rgba(5, 8, 9, 0.46) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.02) 42%, rgba(0, 0, 0, 0.54) 100%);
}

.deck-station-content {
    min-height: min(720px, calc(100vh - 130px));
}

.deck-arrow,
.deck-arrow:hover,
.deck-arrow:focus,
.deck-arrow:active {
    top: 50%;
    transform: translate3d(0, -50%, 0) !important;
    transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease, opacity 160ms ease !important;
}

.deck-arrow span,
.deck-arrow:hover span,
.deck-arrow:focus span,
.deck-arrow:active span {
    transform: none !important;
    transition: none !important;
}

.deck-station:not(.is-active) .deck-station-copy,
.deck-station:not(.is-active) .deck-room-card,
.deck-station:not(.is-active) .deck-station-panel,
.deck-station:not(.is-active) .ship-status-card {
    transform: none !important;
}
/* Smooth site mood background transitions */
.site-shell {
    position: relative;
    z-index: 1;
}

body {
    --site-bg-pan-start: 0px;
    --site-bg-pan-end: 0px;
}

body::before {
    background-position: calc(50% + var(--site-bg-pan-end, 0px)) var(--site-bg-y);
}

body.is-changing-site-mood::before {
    animation: site-bg-swipe-in 760ms cubic-bezier(0.22, 1, 0.36, 1) both, site-bg-breathe 26s ease-in-out 760ms infinite alternate;
}

.site-bg-transition {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-position: calc(50% + var(--site-bg-pan-start, 0px)) var(--site-bg-y);
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 1;
    transform: scale(1.045);
    filter: saturate(1.05) contrast(1.05);
    transition:
        opacity 720ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 720ms cubic-bezier(0.22, 1, 0.36, 1),
        filter 720ms ease;
}

.site-bg-transition::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(5, 10, 13, 0.88) 0%, rgba(8, 16, 18, 0.38) 34%, rgba(8, 16, 18, 0.22) 62%, rgba(8, 16, 18, 0.58) 100%);
}

.site-bg-transition.is-fading {
    opacity: 0;
    transform: scale(1.085) translate3d(var(--site-bg-pan-end, 0px), 0, 0);
    filter: saturate(1.14) contrast(1.08) blur(1px);
}

@keyframes site-bg-swipe-in {
    from {
        background-position: calc(50% + var(--site-bg-pan-start, 0px)) var(--site-bg-y);
        filter: saturate(1) contrast(1) brightness(0.92);
    }
    to {
        background-position: calc(50% + var(--site-bg-pan-end, 0px)) var(--site-bg-y);
        filter: saturate(1.1) contrast(1.06) brightness(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    body.is-changing-site-mood::before,
    .site-bg-transition {
        animation: none;
        transition: none;
    }
}
/* Deck card separation refinement */
.deck-station-content,
.deck-station-content-centered {
    grid-template-columns: minmax(280px, 0.95fr) minmax(300px, 420px);
    align-items: center;
    gap: clamp(44px, 8vw, 118px);
    padding-inline: clamp(38px, 7vw, 86px);
}

.deck-station-copy {
    max-width: 620px;
    padding: clamp(18px, 3vw, 28px) 0;
}

.deck-station-copy::before,
.deck-station-copy::after {
    display: none;
}

.deck-room-card,
.ship-status-card {
    justify-self: end;
    max-width: 420px;
    width: min(100%, 420px);
}

.deck-room-card {
    min-height: 280px;
    margin-top: clamp(28px, 7vh, 88px);
}

.deck-station-panel.current-voyage-panel {
    grid-column: 1 / span 1;
    justify-self: start;
    width: min(100%, 700px);
    margin-top: clamp(34px, 8vh, 92px);
}

.ship-status-card {
    align-self: start;
    margin-top: clamp(26px, 6vh, 76px);
}

.deck-station::before {
    background:
        radial-gradient(circle at 24% 24%, rgba(255, 231, 166, 0.12), transparent 20rem),
        radial-gradient(circle at 72% 56%, rgba(127, 244, 224, 0.08), transparent 18rem),
        linear-gradient(90deg, rgba(3, 6, 7, 0.36) 0%, rgba(3, 6, 7, 0.02) 50%, rgba(3, 6, 7, 0.32) 100%);
}

.deck-station::after {
    background:
        linear-gradient(90deg, rgba(5, 8, 9, 0.34) 0%, rgba(5, 8, 9, 0) 34%, rgba(5, 8, 9, 0) 66%, rgba(5, 8, 9, 0.34) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0) 44%, rgba(0, 0, 0, 0.46) 100%);
}

.deck-station-panel,
.deck-room-card,
.ship-status-card {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.06) 52%, rgba(255, 255, 255, 0.12));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.44),
        inset 0 -18px 44px rgba(255, 255, 255, 0.035),
        0 24px 64px rgba(0, 0, 0, 0.34);
}

@media (max-width: 760px) {
    .deck-station-content,
    .deck-station-content-centered {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-inline: 20px;
    }

    .deck-room-card,
    .ship-status-card,
    .deck-station-panel.current-voyage-panel {
        justify-self: stretch;
        width: 100%;
        max-width: none;
        margin-top: 0;
    }
}
/* Deck station isolation layout correction */
.deck-station-viewport {
    overflow: hidden;
}

.deck-station-content {
    grid-template-columns: minmax(0, 1fr) 260px;
    grid-template-rows: auto 1fr;
    align-items: stretch;
    gap: 26px;
    padding: clamp(28px, 5vw, 64px);
}

.deck-station-content-centered {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    align-items: center;
    gap: clamp(34px, 6vw, 72px);
    padding: clamp(28px, 5vw, 64px);
}

.deck-station-copy {
    max-width: 700px;
    padding: 0;
}

.ship-status-card {
    align-self: start;
    justify-self: stretch;
    width: auto;
    max-width: none;
    margin-top: 0;
}

.deck-station-panel.current-voyage-panel {
    grid-column: 1 / -1;
    align-self: end;
    justify-self: stretch;
    width: auto;
    max-width: none;
    min-height: 330px;
    margin-top: 0;
}

.deck-room-card {
    justify-self: stretch;
    width: auto;
    max-width: none;
    margin-top: 0;
}

@media (max-width: 760px) {
    .deck-station-content,
    .deck-station-content-centered {
        grid-template-columns: 1fr;
        align-content: end;
        padding: 72px 18px 26px;
    }

    .deck-station-panel.current-voyage-panel,
    .deck-room-card,
    .ship-status-card {
        width: 100%;
        max-width: none;
        margin-top: 0;
    }
}
/* Current location Steam card hotfix */
.current-voyage-panel {
    background: #050708;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.current-voyage-panel .deck-panel-art {
    opacity: 1;
}

.current-voyage-panel::before {
    display: none;
}

.current-voyage-panel::after {
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.42) 42%, rgba(0, 0, 0, 0.08) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.18) 48%, rgba(0, 0, 0, 0.72) 100%);
}
/* Mobile deck swipe refinement */
.deck-walk,
.deck-station-viewport {
    touch-action: pan-y;
    overscroll-behavior-x: contain;
}

.deck-station-track {
    transform: translate3d(calc((var(--deck-index, 0) * -100%) + var(--deck-drag-x, 0px)), 0, 0);
}

.deck-walk.is-touch-swiping {
    cursor: grabbing;
    user-select: none;
}

.deck-walk.is-touch-swiping .deck-station-track {
    transition: none !important;
}

.deck-walk.is-touch-swiping a,
.deck-walk.is-touch-swiping button {
    -webkit-tap-highlight-color: transparent;
}

@media (hover: none), (pointer: coarse) {
    .deck-arrow:hover,
    .deck-room-card:hover,
    .deck-station-panel:hover {
        transform: none !important;
        text-decoration: none;
    }

    .deck-arrow {
        width: 48px;
        height: 72px;
    }

    .deck-station-dots button {
        min-height: 42px;
        padding: 10px 14px;
    }
}

@media (max-width: 760px) {
    .deck-walk {
        width: 100%;
        margin: 12px auto 0;
        padding-bottom: 18px;
    }

    .deck-station-viewport,
    .deck-station-track,
    .deck-station {
        min-height: calc(100svh - 96px);
    }

    @supports not (height: 100svh) {
        .deck-station-viewport,
        .deck-station-track,
        .deck-station {
            min-height: calc(100vh - 96px);
        }
    }

    .deck-station-content,
    .deck-station-content-centered {
        align-content: end;
        gap: 18px;
        padding: 76px 16px 18px;
    }

    .deck-station-copy {
        max-width: 100%;
    }

    .deck-station-copy .kicker {
        font-size: 13px;
    }

    .deck-station-copy h1 {
        max-width: 12ch;
        margin-bottom: 8px;
        font-size: clamp(34px, 12vw, 48px);
        line-height: 0.98;
    }

    .deck-station-copy p {
        max-width: 32ch;
        font-size: 16px;
    }

    .ship-status-card {
        display: none;
    }

    .deck-station-panel.current-voyage-panel,
    .deck-room-card {
        min-height: 240px;
        padding: 20px;
    }

    .deck-panel-copy {
        min-height: 240px;
        padding: 22px;
    }

    .deck-panel-copy h2,
    .deck-room-card h2 {
        font-size: clamp(28px, 9vw, 38px);
    }

    .deck-panel-copy p,
    .deck-room-card p {
        font-size: 15px;
    }

    .deck-arrow {
        top: auto !important;
        bottom: 86px;
        width: 44px;
        height: 58px;
        border-radius: 8px;
        transform: none !important;
    }

    .deck-arrow-left {
        left: 10px;
    }

    .deck-arrow-right {
        right: 10px;
    }

    .deck-arrow span {
        font-size: 36px;
    }

    .deck-station-dots {
        position: sticky;
        bottom: 8px;
        z-index: 7;
        gap: 8px;
        margin: 10px 8px 0;
        padding: 6px;
        border-radius: 999px;
        background: rgba(4, 8, 9, 0.42);
        backdrop-filter: blur(14px) saturate(1.2);
        -webkit-backdrop-filter: blur(14px) saturate(1.2);
    }

    .deck-station-dots button {
        flex: 1 1 0;
        min-width: 0;
        min-height: 40px;
        padding: 8px 6px;
        font-size: 13px;
    }
}

/* Cabin Library app */
.app-card-library {
    overflow: hidden;
}

.library-app {
    display: grid;
    gap: 22px;
}

.library-upload-form {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255, 249, 225, 0.82), rgba(231, 207, 153, 0.5));
    box-shadow: inset 0 0 0 1px rgba(91, 59, 27, 0.14);
}

.library-upload-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.75fr);
    gap: 14px;
}

.library-shelf {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fill, 132px);
    justify-content: start;
    align-items: end;
    gap: 28px 22px;
    min-height: 292px;
    padding: 34px 26px 46px;
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(57, 34, 18, 0.14), rgba(57, 34, 18, 0.28)),
        repeating-linear-gradient(90deg, rgba(88, 50, 23, 0.18) 0 1px, transparent 1px 72px),
        linear-gradient(180deg, #5f371f, #2f1d13);
    box-shadow: inset 0 -22px 0 rgba(32, 18, 10, 0.58), inset 0 0 0 1px rgba(255, 237, 180, 0.18);
}

.library-shelf::after {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 24px;
    height: 14px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(15, 8, 4, 0.7), rgba(255, 220, 140, 0.22), rgba(15, 8, 4, 0.58));
}

.library-book-card {
    position: relative;
    display: grid;
    grid-template-rows: 232px auto auto;
    gap: 10px;
    width: 132px;
    min-width: 132px;
    z-index: 1;
}

.library-book-spine {
    position: relative;
    width: 132px;
    height: 232px;
    padding: 18px 14px;
    border: 0;
    border-radius: 10px 14px 14px 10px;
    color: #fff8dc;
    text-align: left;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.16), transparent 16%, rgba(0, 0, 0, 0.22) 100%),
        linear-gradient(145deg, #8a2f2b, #533018 52%, #203a35);
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.3), inset 8px 0 0 rgba(255, 224, 143, 0.18);
    cursor: pointer;
    overflow: hidden;
    transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.library-book-spine:hover,
.library-book-spine:focus-visible {
    transform: translateY(-8px) rotate(-1deg);
    box-shadow: 0 24px 34px rgba(0, 0, 0, 0.34), 0 0 0 3px rgba(130, 255, 233, 0.32);
    filter: brightness(1.08);
}

.library-book-spine strong {
    display: -webkit-box;
    max-width: 100%;
    min-height: 3.45em;
    overflow: hidden;
    overflow-wrap: anywhere;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    font-size: 1.05rem;
    line-height: 1.15;
}

.library-book-spine small {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 14px;
    color: rgba(255, 248, 220, 0.72);
}

.library-book-ridge {
    display: block;
    width: 38px;
    height: 5px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: rgba(255, 231, 158, 0.72);
    box-shadow: 0 18px 0 rgba(255, 231, 158, 0.38), 0 36px 0 rgba(255, 231, 158, 0.22);
}

.library-book-card p {
    width: 132px;
    max-height: 4.6em;
    margin: 0;
    color: var(--muted);
    overflow: hidden;
    overflow-wrap: anywhere;
    font-size: 0.86rem;
    line-height: 1.25;
}

.library-empty {
    z-index: 1;
    color: rgba(255, 248, 220, 0.8);
}

.library-reader-open {
    overflow: hidden;
}

.library-reader[hidden] {
    display: none;
}

.library-reader {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 18px;
}

.library-reader-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 38%, rgba(44, 28, 14, 0.42), rgba(0, 0, 0, 0.88));
    backdrop-filter: blur(10px);
}

.library-reader-book {
    position: relative;
    width: min(1580px, 98vw);
    max-height: 98vh;
    display: grid;
    grid-template-rows: auto minmax(0, auto) auto auto;
    gap: 10px;
    padding: 8px 12px 10px;
    border-radius: 0;
    color: #fff7dd;
    background: transparent;
    box-shadow: none;
}

.library-reader-topline,
.library-reader-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.library-reader-topline h2 {
    margin: 0;
    font-size: clamp(1.4rem, 3vw, 2.5rem);
    color: #fff8dc;
}

.library-reader-topline p,
.library-reader-footer span {
    margin: 0;
    color: rgba(255, 248, 220, 0.78);
}

.library-reader-status {
    display: grid;
    justify-items: center;
    gap: 2px;
}

.library-reader-status small {
    color: rgba(255, 248, 220, 0.56);
}

.library-book-pages {
    position: relative;
    width: max-content;
    max-width: 100%;
    min-height: min(78vh, 900px);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.library-book-pages::before {
    content: "";
    position: absolute;
    width: min(92%, 1160px);
    height: 28px;
    bottom: -14px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 999px;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.52), transparent 68%);
    filter: blur(8px);
    pointer-events: none;
}

.library-flip-host {
    position: relative;
    margin-left: auto;
    margin-right: auto;
}

.library-flip-host .stf__parent,
.library-flip-host .stf__wrapper {
    margin-left: auto !important;
    margin-right: auto !important;
}

.library-page {
    position: relative;
    display: grid;
    place-items: stretch;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    color: #111827;
    background: #fff;
    box-shadow: none;
    overflow: hidden;
}

.library-page::before,
.library-page::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.library-page::before {
    background: transparent;
}

.library-page::after {
    box-shadow: none;
}

.library-page-content {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: grid;
    place-items: stretch;
}

.library-page canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
}

.library-page-empty {
    font-family: Georgia, serif;
    font-size: 1.2rem;
    color: rgba(78, 50, 24, 0.56);
}

.library-page-papergrain {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0;
}

.library-reader-error {
    margin: 0;
    padding: 12px 14px;
    border-radius: 14px;
    color: #ffe4e6;
    background: rgba(127, 29, 29, 0.5);
}

@media (max-width: 820px) {
    .library-upload-grid {
        grid-template-columns: 1fr;
    }

    .library-shelf {
        grid-template-columns: repeat(auto-fill, 112px);
        gap: 22px 16px;
        padding: 26px 18px 42px;
    }

    .library-book-card,
    .library-book-spine,
    .library-book-card p {
        width: 112px;
        min-width: 112px;
    }

    .library-book-card {
        grid-template-rows: 196px auto auto;
    }

    .library-book-spine {
        height: 196px;
    }

    .library-reader {
        padding: 8px;
    }

    .library-reader-book {
        width: 100%;
        max-height: 98vh;
        padding: 8px;
        border-radius: 0;
    }

    .library-reader-topline,
    .library-reader-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .library-reader-footer {
        gap: 10px;
    }

    .library-book-pages {
        min-height: 72vh;
    }

    .library-page {
        padding: 0;
        border-radius: 0;
    }
}


.app-card-iframe {
    border-left: 5px solid #14b8a6;
}

.iframe-app,
.iframe-app-form {
    display: grid;
    gap: 12px;
}

.iframe-app-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.iframe-portal-frame {
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--cabin-accent, #8b5e34) 36%, var(--line));
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.08);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.16);
}

.iframe-portal-frame iframe {
    display: block;
    width: 100%;
    min-height: min(70vh, 620px);
    border: 0;
    background: white;
}

@media (max-width: 720px) {
    .iframe-app-grid {
        grid-template-columns: 1fr;
    }
}
