@font-face {
    font-family: "Estedad";
    src: url("fonts/Estedad-VF.woff2") format("woff2");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

:root {
    --primary: #22d3ee; 
    --primary-glow: rgba(34, 211, 238, 0.4);
    --bg-gradient: radial-gradient(circle at 50% 50%, #1a1a2e 0%, #020205 100%);
}

.theme-mars {
    --primary: #ef4444;
    --primary-glow: rgba(239, 68, 68, 0.5);
    --bg-gradient: radial-gradient(circle at 50% 50%, #2e1a1a 0%, #050202 100%);
}

.theme-moon {
    --primary: #94a3b8;
    --primary-glow: rgba(148, 163, 184, 0.5);
    --bg-gradient: radial-gradient(circle at 50% 50%, #0f172a 0%, #020617 100%);
}

.theme-andromeda {
    --primary: #67e8f9;
    --primary-glow: rgba(45, 212, 191, 0.42);
    --bg-gradient: radial-gradient(circle at 45% 45%, #0b3a52 0%, #071827 42%, #02050b 100%);
}

.theme-emerald-rift {
    --primary: #a3e635;
    --primary-glow: rgba(132, 204, 22, 0.48);
    --bg-gradient: radial-gradient(circle at 50% 45%, #153921 0%, #07150d 44%, #010403 100%);
}

body { font-family: "Estedad", Tahoma, "Segoe UI", Arial, sans-serif; background-color: #020205; color: white; overscroll-behavior-y: none; }
button, input, select, textarea { font: inherit; }
.offline-bg-fallback { background: var(--bg-gradient); }

/* عکس‌های لوکال و آفلاین (لطفا پوشه images و عکس‌ها را بسازید) */
body.theme-mars #main-bg { background-image: url('images/mars.webp') !important; }
body.theme-moon #main-bg { background-image: url('images/moon.webp') !important; }
body.theme-andromeda #main-bg { background-image: url('images/andromeda-tide.webp') !important; }
body.theme-emerald-rift #main-bg { background-image: url('images/emerald-rift.webp') !important; }
body.theme-base #main-bg { background-image: url('images/nebula.webp') !important; }

.glass-panel { background: rgba(10, 10, 18, 0.78); border: 1px solid rgba(255, 255, 255, 0.08); box-shadow: 0 20px 50px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.02); }
.neon-container { border-radius: 9999px; box-shadow: 0 0 20px var(--primary-glow); }

.quantum-focus-tether {
    position: absolute;
    top: 50%;
    left: 94%;
    z-index: 9;
    width: clamp(11rem, 40vw, 34rem);
    height: 1px;
    pointer-events: none;
    opacity: 0;
    transform: scaleX(0.03);
    transform-origin: left center;
}

.quantum-focus-tether > span {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: linear-gradient(90deg, #f59e0b, #fde68a 42%, rgba(251, 191, 36, 0.18));
    box-shadow: 0 0 5px rgba(251, 191, 36, 0.62);
}

.quantum-focus-tether > span::before {
    position: absolute;
    top: 50%;
    left: 0;
    width: 0.35rem;
    height: 0.35rem;
    border-radius: 50%;
    background: #fef3c7;
    box-shadow: 0 0 8px #f59e0b;
    content: "";
    transform: translate(-50%, -50%);
}

.quantum-focus-tether > span::after {
    position: absolute;
    top: -2px;
    bottom: -2px;
    left: 0;
    width: 18%;
    background: linear-gradient(90deg, transparent, #fff7d6, transparent);
    content: "";
    transform: translateX(-120%);
}

.quantum-focus-tether.is-active {
    opacity: 0.95;
    transform: scaleX(1);
}

.quantum-focus-tether.is-active > span::after {
    animation: quantum-tether-travel 2.2s linear infinite;
}

@keyframes quantum-tether-travel {
    to {
        transform: translateX(680%);
    }
}

/* Keep the full visual mode responsive while the timer is running. */
#main-bg {
    mix-blend-mode: normal !important;
    opacity: 0.58 !important;
}

body.theme-base.timer-running #timer-glass-window {
    background: rgba(3, 10, 18, 0.18);
}

body.theme-mars.timer-running #timer-glass-window {
    background: rgba(28, 8, 4, 0.18);
}

body.theme-moon.timer-running #timer-glass-window {
    background: rgba(8, 12, 20, 0.18);
}

body.theme-andromeda.timer-running #timer-glass-window {
    background: rgba(0, 18, 28, 0.16);
}

body.theme-emerald-rift.timer-running #timer-glass-window {
    background: rgba(0, 18, 10, 0.18);
}

body.zen-active.timer-running #timer-glass-window {
    background-color: rgba(0, 0, 0, 0.06);
}

#timer-glass-window {
    transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease !important;
}

body.timer-running #timer-glass-window {
    box-shadow: inset 0 0 42px rgba(125, 211, 252, 0.08), 0 0 24px rgba(34, 211, 238, 0.06);
}

body.timer-running #view-dashboard .backdrop-blur-sm,
body.timer-running #view-dashboard .backdrop-blur-md,
body.timer-running #view-dashboard .backdrop-blur-xl,
body.timer-running #view-dashboard .backdrop-blur-2xl {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

body.timer-running #progress-ring {
    transition: none !important;
}

body.timer-running .avatar-shimmer,
body.timer-running .liquid-bar::after {
    animation-play-state: paused !important;
}

body.timer-running .pulse-active::after {
    animation: timer-running-pulse 2.4s steps(4, end) infinite !important;
    box-shadow: 0 0 18px var(--primary-glow) !important;
    will-change: opacity !important;
}

@keyframes timer-running-pulse {
    0%, 100% { opacity: 0.32; transform: none; }
    50% { opacity: 0.82; transform: none; }
}

.tab-active { color: var(--primary); border-bottom: 2px solid var(--primary); padding-bottom: 6px; }
.tab-inactive { color: #64748b; padding-bottom: 6px; cursor: pointer; transition: 0.3s; }
.tab-inactive:hover { color: #cbd5e1; }

.mode-btn { padding: 6px 12px; border-radius: 9999px; font-size: 11px; font-weight: 500; transition: all 0.3s; }
.mode-active { background: color-mix(in srgb, var(--primary) 20%, transparent); color: var(--primary); border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent); }
.mode-inactive { color: #94a3b8; border: 1px solid transparent; }
.mode-inactive:hover { color: white; }

.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

body.zen-active .zen-hide { opacity: 0 !important; pointer-events: none !important; }
body.zen-active .glass-panel { background: transparent !important; border-color: transparent !important; box-shadow: none !important; backdrop-filter: none !important; }
body.zen-active #zen-overlay { opacity: 1; }
body.zen-active #exit-zen-btn { opacity: 1; pointer-events: auto; }

.task-completed { text-decoration: line-through; color: #64748b; transition: all 0.3s; }
.task-completed .check-box { background: var(--primary); border-color: var(--primary); }

/* WebKit روی آیفون هنگام ترکیب blur، blend و shadow در تایمر ناپایدار است. */
html.ios-webkit body.timer-running .glass-panel,
html.ios-webkit body.timer-running .backdrop-blur-sm,
html.ios-webkit body.timer-running .backdrop-blur-md,
html.ios-webkit body.timer-running .backdrop-blur-xl,
html.ios-webkit body.timer-running .backdrop-blur-2xl {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

html.ios-webkit body.timer-running #main-bg {
    mix-blend-mode: normal !important;
    opacity: 0.35 !important;
}

html.ios-webkit body.timer-running .neon-container,
html.ios-webkit body.timer-running [class*="drop-shadow"] {
    filter: none !important;
}

html.ios-webkit body.timer-running [class*="shadow-"] {
    box-shadow: none !important;
    text-shadow: none !important;
}

html.ios-webkit body.timer-running #progress-ring {
    transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
    #progress-ring,
    body {
        transition: none !important;
    }
}

/* Tailwind extractor cannot resolve opacity applied to CSS variables. */
.bg-\[var\(--primary\)\]\/20 { background-color: color-mix(in srgb, var(--primary) 20%, transparent); }
.bg-\[var\(--primary\)\]\/30 { background-color: color-mix(in srgb, var(--primary) 30%, transparent); }
.bg-\[var\(--primary\)\]\/40 { background-color: color-mix(in srgb, var(--primary) 40%, transparent); }
.border-\[var\(--primary\)\]\/30 { border-color: color-mix(in srgb, var(--primary) 30%, transparent); }
.border-\[var\(--primary\)\]\/50 { border-color: color-mix(in srgb, var(--primary) 50%, transparent); }

/* Dynamic toast class from auth.js, included manually in the static build. */
.translate-y-\[20px\] {
    --tw-translate-y: 20px;
    transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

.free-orbit-toggle {
    color: #67e8f9;
    background: rgba(8, 145, 178, 0.12);
    border: 1px solid rgba(34, 211, 238, 0.35);
}

.free-orbit-toggle:hover,
.free-orbit-toggle.free-orbit-active {
    color: #ecfeff;
    background: rgba(8, 145, 178, 0.28);
    border-color: rgba(103, 232, 249, 0.8);
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.28);
}

.free-orbit-help {
    color: #22d3ee;
    background: rgba(8, 145, 178, 0.16);
}

.free-orbit-help:hover {
    color: #cffafe;
    background: rgba(8, 145, 178, 0.3);
}

.free-orbit-mode #progress-ring {
    stroke: #22d3ee;
}

#free-orbit-content {
    border-color: rgba(6, 182, 212, 0.5);
}

#free-orbit-notification-toggle {
    accent-color: #06b6d4;
}

.issue-report-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    gap: 0.35rem;
    padding: 0.3rem 0.55rem;
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 0.5rem;
    background: rgba(34, 211, 238, 0.07);
    color: #cbd5e1;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
    transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.issue-report-trigger:hover,
.issue-report-trigger:focus-visible {
    border-color: rgba(103, 232, 249, 0.55);
    background: rgba(34, 211, 238, 0.14);
    color: #67e8f9;
    outline: none;
}

.issue-report-full-label {
    display: none;
}

.issue-report-dialog {
    width: 100%;
    max-width: 28rem;
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    padding: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 1rem;
    background: #0f111a;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6), 0 0 35px rgba(34, 211, 238, 0.06);
    color-scheme: dark;
}

.issue-report-close-button {
    display: inline-flex;
    width: 2.25rem;
    height: 2.25rem;
    flex: none;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.035);
    color: #94a3b8;
    transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.issue-report-close-button:hover,
.issue-report-close-button:focus-visible {
    border-color: rgba(244, 63, 94, 0.4);
    background: rgba(244, 63, 94, 0.1);
    color: #fda4af;
    outline: none;
}

.issue-report-field {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 0.5rem;
    background: #11141d;
    color: #f8fafc;
    padding: 0.75rem 0.875rem;
    font-size: 0.875rem;
    line-height: 1.75;
    outline: none;
    transition: border-color 160ms ease, background-color 160ms ease;
}

.issue-report-field::placeholder {
    color: #64748b;
    opacity: 1;
}

.issue-report-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.issue-report-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #67e8f9;
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.issue-report-section-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.issue-report-section-option {
    position: relative;
    min-width: 0;
    cursor: pointer;
}

.issue-report-section-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.issue-report-section-option span {
    display: flex;
    min-height: 2.65rem;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.45rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.035);
    color: #cbd5e1;
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
    transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.issue-report-section-option:hover span {
    border-color: rgba(34, 211, 238, 0.35);
    background: rgba(34, 211, 238, 0.07);
    color: #ecfeff;
}

.issue-report-section-option input:checked + span {
    border-color: rgba(34, 211, 238, 0.75);
    background: rgba(34, 211, 238, 0.16);
    color: #67e8f9;
    box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.08);
}

.issue-report-section-option input:focus-visible + span {
    outline: 2px solid rgba(103, 232, 249, 0.9);
    outline-offset: 2px;
}

.issue-report-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.issue-report-action-button {
    display: inline-flex;
    min-width: 0;
    min-height: 2.8rem;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.65rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 800;
    transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.issue-report-cancel-button {
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.045);
    color: #cbd5e1;
}

.issue-report-cancel-button:hover,
.issue-report-cancel-button:focus-visible {
    border-color: rgba(203, 213, 225, 0.42);
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    outline: none;
}

.issue-report-submit-button {
    border: 1px solid rgba(34, 211, 238, 0.62);
    background: rgba(34, 211, 238, 0.14);
    color: #67e8f9;
}

.issue-report-submit-button:hover:not(:disabled),
.issue-report-submit-button:focus-visible:not(:disabled) {
    border-color: #67e8f9;
    background: rgba(34, 211, 238, 0.22);
    color: #cffafe;
    outline: none;
}

.issue-report-submit-button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.issue-report-field:focus {
    border-color: rgba(34, 211, 238, 0.7);
    background: rgba(255, 255, 255, 0.07);
}

.issue-report-message {
    resize: vertical;
    min-height: 7.5rem;
    max-height: 16rem;
}

@media (max-width: 420px) {
    .issue-report-dialog {
        padding: 1rem;
    }

    .issue-report-form {
        gap: 0.8rem;
    }

    .issue-report-message {
        min-height: 6.5rem;
    }
}

@media (min-width: 640px) {
    .issue-report-short-label {
        display: none;
    }

    .issue-report-full-label {
        display: inline;
    }
}

/* Theme rewards and store previews. */
.theme-shop-card {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    padding: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.035);
    text-align: center;
}

.theme-shop-card--andromeda {
    border-color: rgba(103, 232, 249, 0.28);
    box-shadow: inset 0 0 24px rgba(45, 212, 191, 0.04);
}

.theme-shop-card--mars {
    border-color: rgba(251, 113, 133, 0.28);
    box-shadow: inset 0 0 24px rgba(190, 24, 93, 0.04);
}

.theme-shop-card--moon {
    border-color: rgba(203, 213, 225, 0.24);
    box-shadow: inset 0 0 24px rgba(148, 163, 184, 0.04);
}

.theme-shop-card--rift {
    border-color: rgba(163, 230, 53, 0.3);
    box-shadow: inset 0 0 24px rgba(132, 204, 22, 0.05);
}

.theme-shop-card--experience-calm {
    border-color: rgba(103, 232, 249, 0.3);
    box-shadow: inset 0 0 24px rgba(34, 211, 238, 0.05);
}

.theme-shop-card--experience-guardians {
    border-color: rgba(251, 191, 36, 0.28);
    box-shadow: inset 0 0 24px rgba(245, 158, 11, 0.05);
}

.theme-shop-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 8;
    margin-bottom: 0.8rem;
    overflow: hidden;
    border-radius: 0.5rem;
    background-position: center;
    background-size: cover;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.theme-shop-preview--andromeda {
    background-image: url('images/andromeda-tide.webp');
}

.theme-shop-preview--mars {
    background-image: url('images/mars.webp');
}

.theme-shop-preview--moon {
    background-image: url('images/moon.webp');
}

.theme-shop-preview--rift {
    background-image: url('images/emerald-rift.webp');
}

.theme-shop-preview--experience-calm {
    display: grid;
    place-items: center;
    background: #071a20;
}

.theme-shop-preview--experience-guardians {
    display: grid;
    place-items: center;
    background: #1b1609;
}

.experience-shop-symbol {
    position: relative;
    display: grid;
    width: 4.25rem;
    height: 4.25rem;
    place-items: center;
    border: 1px solid currentColor;
    border-radius: 50%;
    background: rgba(2, 6, 23, 0.72);
}

.experience-shop-symbol::before {
    position: absolute;
    inset: -0.65rem;
    border: 1px solid currentColor;
    border-bottom-color: transparent;
    border-left-color: transparent;
    border-radius: 50%;
    content: '';
    opacity: 0.38;
    transform: rotate(20deg);
}

.experience-shop-symbol::after {
    position: absolute;
    top: 50%;
    right: -0.82rem;
    width: 0.32rem;
    height: 0.32rem;
    border-radius: 50%;
    background: currentColor;
    content: '';
    opacity: 0.82;
    transform: translateY(-50%);
}

.experience-shop-symbol svg {
    width: 2rem;
    height: 2rem;
    stroke-width: 1.6;
}

.experience-shop-symbol--calm {
    color: #67e8f9;
    box-shadow: 0 0 22px rgba(103, 232, 249, 0.22);
}

.experience-shop-symbol--guardians {
    color: #fcd34d;
    box-shadow: 0 0 22px rgba(252, 211, 77, 0.2);
}

.theme-shop-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: inline-flex;
    min-height: 1.55rem;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    background: rgba(2, 6, 23, 0.82);
    color: #e2e8f0;
    font-size: 0.62rem;
    font-weight: 800;
    backdrop-filter: blur(6px);
}

.theme-shop-title {
    margin-bottom: 0.25rem;
    color: #f8fafc;
    font-size: 0.95rem;
    font-weight: 800;
}

.theme-shop-description {
    min-height: 2.8rem;
    flex: 1;
    margin-bottom: 0.8rem;
    color: #94a3b8;
    font-size: 0.7rem;
    line-height: 1.7;
}

.theme-shop-button {
    display: inline-flex;
    width: 100%;
    min-height: 2.75rem;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 900;
    transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.theme-shop-button--xp {
    border: 1px solid rgba(250, 204, 21, 0.42);
    background: rgba(250, 204, 21, 0.1);
    color: #fde047;
}

.theme-shop-button--reward {
    border: 1px solid rgba(163, 230, 53, 0.46);
    background: rgba(132, 204, 22, 0.12);
    color: #bef264;
}

.theme-shop-button--free {
    border: 1px solid rgba(103, 232, 249, 0.48);
    background: rgba(8, 145, 178, 0.14);
    color: #a5f3fc;
    text-decoration: none;
}

.theme-shop-button--guardians {
    border-color: rgba(251, 191, 36, 0.48);
    background: rgba(245, 158, 11, 0.12);
    color: #fde68a;
}

.theme-shop-button:not(:disabled):hover,
.theme-shop-button:not(:disabled):focus-visible {
    border-color: currentColor;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
}

.theme-shop-button:disabled {
    cursor: default;
    opacity: 0.62;
}

.fleet-anomaly {
    position: relative;
    margin-top: 1.25rem;
    overflow: hidden;
    padding: 1rem;
    border: 1px solid rgba(163, 230, 53, 0.28);
    border-radius: 0.5rem;
    background: rgba(10, 24, 14, 0.78);
    box-shadow: 0 0 26px rgba(132, 204, 22, 0.09);
}

.fleet-anomaly.is-defeated {
    border-color: rgba(45, 212, 191, 0.32);
    background: rgba(8, 28, 27, 0.74);
}

.fleet-anomaly__header,
.fleet-anomaly__meta,
.fleet-anomaly__milestones {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.fleet-anomaly__title {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0.5rem;
    color: #d9f99d;
    font-size: 0.8rem;
    font-weight: 900;
}

.fleet-anomaly__state {
    flex: none;
    color: #94a3b8;
    font-size: 0.62rem;
    font-weight: 800;
}

.fleet-anomaly__track {
    height: 0.65rem;
    margin: 0.85rem 0 0.55rem;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 9999px;
    background: #07100a;
}

.fleet-anomaly__bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #65a30d, #bef264, #2dd4bf);
    box-shadow: 0 0 12px rgba(163, 230, 53, 0.38);
    transition: width 500ms ease;
}

.fleet-anomaly__meta {
    color: #94a3b8;
    font-size: 0.62rem;
    font-weight: 700;
}

.fleet-anomaly__milestones {
    margin-top: 0.8rem;
    padding-top: 0.7rem;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    color: #cbd5e1;
    font-size: 0.65rem;
    line-height: 1.6;
}

.fleet-boss-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.45rem;
    border: 1px solid rgba(163, 230, 53, 0.25);
    border-radius: 9999px;
    background: rgba(132, 204, 22, 0.1);
    color: #d9f99d;
    font-size: 0.58rem;
    font-weight: 900;
}

.fleet-tag-legendary {
    border-color: rgba(250, 204, 21, 0.55) !important;
    color: #fde047 !important;
    box-shadow: 0 0 12px rgba(250, 204, 21, 0.24);
}

@media (max-width: 420px) {
    .fleet-anomaly__milestones {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.25rem;
    }
}

/* Profile and quantum link */
.profile-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
    padding: 0.25rem;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 0.5rem;
    background: rgba(2, 6, 23, 0.58);
}

.profile-tab {
    position: relative;
    display: inline-flex;
    min-height: 2.5rem;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 1px solid transparent;
    border-radius: 0.4rem;
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 800;
    transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.quantum-request-badge {
    position: absolute;
    top: 0.35rem;
    left: 0.4rem;
    width: 0.48rem;
    height: 0.48rem;
    border: 1px solid rgba(254, 243, 199, 0.9);
    border-radius: 50%;
    background: #fbbf24;
    box-shadow: 0 0 0 2px rgba(2, 6, 23, 0.9), 0 0 8px rgba(251, 191, 36, 0.55);
}

.quantum-request-toast {
    display: grid;
    width: 100%;
    grid-template-columns: 0.65rem minmax(0, 1fr);
    align-items: center;
    gap: 0.7rem;
    padding: 0.8rem 0.9rem;
    border: 1px solid rgba(251, 191, 36, 0.46);
    border-radius: 0.5rem;
    background: rgba(7, 12, 23, 0.97);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.42), inset 3px 0 0 #fbbf24;
    color: #f8fafc;
    cursor: pointer;
    pointer-events: auto;
    text-align: right;
    transform: translateY(-0.75rem);
    opacity: 0;
    transition: transform 180ms ease, opacity 180ms ease, border-color 180ms ease;
}

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

.quantum-request-toast:hover,
.quantum-request-toast:focus-visible {
    border-color: rgba(251, 191, 36, 0.8);
    outline: none;
}

.quantum-request-toast__signal {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #fbbf24;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.7);
}

.quantum-request-toast strong,
.quantum-request-toast small {
    display: block;
}

.quantum-request-toast strong {
    font-size: 0.76rem;
    line-height: 1.8;
}

.quantum-request-toast small {
    margin-top: 0.1rem;
    color: #a8b4c7;
    font-size: 0.65rem;
    line-height: 1.7;
}

.profile-tab svg {
    width: 1rem;
    height: 1rem;
}

.profile-tab:hover,
.profile-tab:focus-visible {
    color: #e2e8f0;
    outline: none;
}

.profile-tab.is-active {
    border-color: rgba(34, 211, 238, 0.34);
    background: rgba(8, 145, 178, 0.14);
    color: #67e8f9;
}

.profile-scroll-area {
    min-height: 0;
    margin-top: 1rem;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(34, 211, 238, 0.35) transparent;
}

.profile-panel {
    min-height: 15rem;
}

.account-session-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.account-session-row > span {
    min-width: 0;
    text-align: right;
}

.account-session-row strong,
.account-session-row small {
    display: block;
}

.account-session-row strong {
    color: #cbd5e1;
    font-size: 0.72rem;
}

.account-session-row small {
    margin-top: 0.2rem;
    color: #64748b;
    font-size: 0.6rem;
    line-height: 1.75;
}

.account-logout-button {
    display: inline-flex;
    min-width: 5.5rem;
    min-height: 2.45rem;
    flex: none;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: 1px solid rgba(251, 113, 133, 0.3);
    border-radius: 0.4rem;
    background: rgba(244, 63, 94, 0.07);
    color: #fda4af;
    font-size: 0.68rem;
    font-weight: 800;
    transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.account-logout-button:hover,
.account-logout-button:focus-visible {
    border-color: rgba(253, 164, 175, 0.58);
    background: rgba(244, 63, 94, 0.13);
    color: #ffe4e6;
    outline: none;
}

.account-logout-button svg {
    width: 0.95rem;
    height: 0.95rem;
}

.logout-confirm-dialog {
    width: min(100%, 23rem);
    padding: 1.5rem;
    border: 1px solid rgba(251, 113, 133, 0.28);
    border-radius: 0.5rem;
    background: #0f0f17;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.62);
    text-align: center;
}

.logout-confirm-icon {
    display: inline-flex;
    width: 3rem;
    height: 3rem;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.9rem;
    border: 1px solid rgba(251, 113, 133, 0.3);
    border-radius: 50%;
    background: rgba(244, 63, 94, 0.08);
    color: #fda4af;
}

.logout-confirm-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.logout-confirm-dialog h3 {
    color: #fff;
    font-size: 1rem;
    font-weight: 900;
}

.logout-confirm-dialog p {
    margin-top: 0.55rem;
    color: #94a3b8;
    font-size: 0.69rem;
    line-height: 1.95;
}

.logout-confirm-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 1.25rem;
}

.logout-confirm-actions button {
    min-height: 2.7rem;
    border-radius: 0.4rem;
    font-size: 0.72rem;
    font-weight: 800;
}

.logout-stay-button {
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.04);
    color: #cbd5e1;
}

.logout-leave-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: 1px solid rgba(251, 113, 133, 0.34);
    background: #be123c;
    color: #fff;
}

.logout-leave-button:disabled {
    cursor: wait;
    opacity: 0.55;
}

.logout-leave-button svg {
    width: 0.95rem;
    height: 0.95rem;
}

#profile-quantum-panel {
    font-family: "Estedad", Tahoma, "Segoe UI", Arial, sans-serif;
    font-synthesis: none;
}

.quantum-heading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.quantum-heading-icon {
    display: inline-flex;
    width: 2.65rem;
    height: 2.65rem;
    flex: none;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(34, 211, 238, 0.34);
    border-radius: 50%;
    background: #07151d;
    color: #67e8f9;
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.12);
}

.quantum-heading-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.quantum-heading h4 {
    color: #f8fafc;
    font-size: 1rem;
    font-weight: 780;
    line-height: 1.55;
}

.quantum-heading p {
    max-width: 21rem;
    margin-top: 0.25rem;
    color: #a8b3c5;
    font-size: 0.7rem;
    font-weight: 430;
    line-height: 1.85;
}

.quantum-visual {
    display: grid;
    min-height: 6.5rem;
    margin-top: 0.7rem;
    grid-template-columns: 4.25rem minmax(4rem, 1fr) 4.25rem;
    align-items: center;
    direction: ltr;
}

.quantum-node {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    color: #64748b;
    font-size: 0.67rem;
    font-weight: 650;
    text-align: center;
}

.quantum-node small {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quantum-node-core {
    position: relative;
    display: block;
    width: 1.15rem;
    height: 1.15rem;
    border: 0.22rem solid #172033;
    border-radius: 50%;
    background: #64748b;
    box-shadow: 0 0 0 0.3rem rgba(100, 116, 139, 0.08);
    transition: background-color 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.quantum-track {
    position: relative;
    height: 2px;
    overflow: visible;
    background: rgba(100, 116, 139, 0.24);
}

.quantum-track::after {
    position: absolute;
    inset: 0;
    content: "";
    background: #34d399;
    opacity: 0;
    transform: scaleX(0.05);
    transform-origin: center;
}

.quantum-signal {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0.55rem;
    height: 0.55rem;
    border: 2px solid #052e2b;
    border-radius: 50%;
    background: #34d399;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.55);
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.54);
}

.quantum-visual[data-state="pending"] .quantum-node-core {
    border-color: #2c3547;
    background: #94a3b8;
}

.quantum-visual[data-state="pending"] .quantum-track {
    background: repeating-linear-gradient(
        90deg,
        rgba(148, 163, 184, 0.46) 0 0.4rem,
        transparent 0.4rem 0.75rem
    );
}

.quantum-visual[data-state="idle"] .quantum-node-self .quantum-node-core,
.quantum-visual[data-state="self"] .quantum-node-self .quantum-node-core,
.quantum-visual[data-state="both"] .quantum-node-self .quantum-node-core {
    border-color: #164e63;
    background: #22d3ee;
    box-shadow: 0 0 0 0.3rem rgba(34, 211, 238, 0.1), 0 0 16px rgba(34, 211, 238, 0.3);
}

.quantum-visual[data-state="idle"] .quantum-node-partner .quantum-node-core,
.quantum-visual[data-state="partner"] .quantum-node-partner .quantum-node-core,
.quantum-visual[data-state="both"] .quantum-node-partner .quantum-node-core {
    border-color: #831843;
    background: #f472b6;
    box-shadow: 0 0 0 0.3rem rgba(244, 114, 182, 0.1), 0 0 16px rgba(244, 114, 182, 0.26);
}

.quantum-visual[data-state="self"] .quantum-node-self .quantum-node-core,
.quantum-visual[data-state="partner"] .quantum-node-partner .quantum-node-core,
.quantum-visual[data-state="both"] .quantum-node-core {
    animation: quantum-node-breathe 1.9s ease-in-out infinite;
}

.quantum-visual[data-state="self"] .quantum-track::after,
.quantum-visual[data-state="partner"] .quantum-track::after {
    opacity: 0.56;
    animation: quantum-link-reach 1.9s ease-in-out infinite;
}

.quantum-visual[data-state="self"] .quantum-track::after {
    transform-origin: left;
}

.quantum-visual[data-state="partner"] .quantum-track::after {
    transform-origin: right;
}

.quantum-visual[data-state="both"] .quantum-track::after {
    opacity: 0.92;
    transform: scaleX(1);
}

.quantum-visual[data-state="both"] .quantum-signal {
    opacity: 1;
    animation: quantum-signal-breathe 1.5s ease-in-out infinite;
}

@keyframes quantum-node-breathe {
    0%,
    100% {
        opacity: 0.72;
        transform: scale(0.9);
    }
    50% {
        opacity: 1;
        transform: scale(1.08);
    }
}

@keyframes quantum-link-reach {
    0%,
    100% {
        opacity: 0.18;
        transform: scaleX(0.08);
    }
    55% {
        opacity: 0.7;
        transform: scaleX(1);
    }
}

@keyframes quantum-signal-breathe {
    0%,
    100% {
        opacity: 0.62;
        transform: translate(-50%, -50%) scale(0.65);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.18);
    }
}

.quantum-status {
    display: flex;
    min-height: 3.15rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.quantum-status strong {
    color: #e2e8f0;
    font-size: 0.84rem;
    font-weight: 720;
}

.quantum-status span {
    margin-top: 0.28rem;
    color: #94a3b8;
    font-size: 0.68rem;
    font-weight: 420;
    line-height: 1.8;
}

.quantum-loading {
    display: flex;
    min-height: 3.25rem;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 520;
}

.quantum-loading.hidden {
    display: none;
}

.quantum-loading svg {
    width: 1rem;
    height: 1rem;
    animation: quantum-spin 900ms linear infinite;
}

@keyframes quantum-spin {
    to {
        transform: rotate(360deg);
    }
}

.quantum-error {
    margin: 0.35rem 0 0.7rem;
    padding: 0.6rem 0.7rem;
    border-inline-start: 2px solid #fb7185;
    background: rgba(159, 18, 57, 0.12);
    color: #fda4af;
    font-size: 0.69rem;
    font-weight: 520;
    line-height: 1.85;
}

.quantum-state-panel {
    padding-top: 0.8rem;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.quantum-state-panel > p {
    color: #cbd5e1;
    font-size: 0.74rem;
    font-weight: 450;
    line-height: 1.9;
    text-align: center;
}

.quantum-state-panel strong {
    color: #f8fafc;
}

.quantum-label {
    display: block;
    margin: 0 0 0.4rem;
    color: #94a3b8;
    font-size: 0.69rem;
    font-weight: 650;
}

.quantum-label:not(:first-child) {
    margin-top: 0.8rem;
}

.quantum-code-row,
.quantum-request-row,
.quantum-dual-actions,
.quantum-partner-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantum-code {
    display: flex;
    min-width: 0;
    min-height: 2.6rem;
    flex: 1;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(34, 211, 238, 0.24);
    border-radius: 0.5rem;
    background: #050b14;
    color: #a5f3fc;
    font-family: "Cascadia Mono", Consolas, ui-monospace, monospace;
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0;
}

.quantum-icon-button {
    display: inline-flex;
    width: 2.6rem;
    height: 2.6rem;
    flex: none;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 50%;
    background: rgba(30, 41, 59, 0.54);
    color: #cbd5e1;
    transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}

.quantum-icon-button:hover,
.quantum-icon-button:focus-visible {
    border-color: rgba(34, 211, 238, 0.48);
    background: rgba(8, 145, 178, 0.13);
    color: #67e8f9;
    outline: none;
}

.quantum-icon-button svg,
.quantum-primary-button svg,
.quantum-secondary-button svg,
.quantum-danger-button svg,
.quantum-privacy-note svg,
.quantum-partner-avatar svg {
    width: 1rem;
    height: 1rem;
    flex: none;
}

.quantum-request-row input {
    min-width: 0;
    min-height: 2.65rem;
    flex: 1;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 0.5rem;
    background: #050b14;
    padding: 0 0.8rem;
    color: #f8fafc;
    font-family: "Cascadia Mono", Consolas, ui-monospace, monospace;
    font-size: 0.76rem;
    letter-spacing: 0;
    text-align: center;
    text-transform: uppercase;
}

.quantum-request-row input:focus {
    border-color: #22d3ee;
    outline: none;
}

.quantum-primary-button,
.quantum-secondary-button,
.quantum-danger-button {
    display: inline-flex;
    min-height: 2.65rem;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    padding: 0 0.9rem;
    font-size: 0.73rem;
    font-weight: 720;
    transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease, opacity 160ms ease;
}

.quantum-primary-button {
    border-color: rgba(34, 211, 238, 0.54);
    background: #22d3ee;
    color: #042f3e;
}

.quantum-primary-button:hover,
.quantum-primary-button:focus-visible {
    background: #67e8f9;
    outline: none;
}

.quantum-secondary-button {
    width: 100%;
    margin-top: 0.75rem;
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(30, 41, 59, 0.48);
    color: #cbd5e1;
}

.quantum-secondary-button:hover,
.quantum-secondary-button:focus-visible {
    border-color: rgba(203, 213, 225, 0.44);
    color: #f8fafc;
    outline: none;
}

.quantum-danger-button {
    width: 100%;
    margin-top: 0.8rem;
    border-color: rgba(251, 113, 133, 0.26);
    background: rgba(159, 18, 57, 0.1);
    color: #fda4af;
}

.quantum-danger-button:hover,
.quantum-danger-button:focus-visible {
    border-color: rgba(251, 113, 133, 0.54);
    background: rgba(159, 18, 57, 0.18);
    outline: none;
}

.quantum-primary-button:disabled,
.quantum-secondary-button:disabled,
.quantum-danger-button:disabled,
.quantum-icon-button:disabled {
    cursor: wait;
    opacity: 0.48;
}

.quantum-dual-actions {
    margin-top: 0.75rem;
}

.quantum-dual-actions > * {
    width: 50%;
    margin-top: 0;
}

.quantum-privacy-note {
    display: flex;
    margin-top: 0.65rem;
    align-items: center;
    gap: 0.4rem;
    color: #8290a5;
    font-size: 0.64rem;
    font-weight: 430;
    line-height: 1.85;
}

.quantum-partner-line {
    justify-content: center;
    color: #cbd5e1;
    font-size: 0.76rem;
    font-weight: 520;
}

.quantum-partner-avatar {
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(244, 114, 182, 0.32);
    border-radius: 50%;
    background: rgba(131, 24, 67, 0.16);
    color: #f9a8d4;
}

.quantum-guide {
    margin-top: 0.85rem;
    border: 1px solid rgba(129, 140, 248, 0.2);
    border-radius: 0.5rem;
    background: rgba(15, 23, 42, 0.42);
}

.quantum-guide-toggle {
    display: flex;
    width: 100%;
    min-height: 2.75rem;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.6rem 0.7rem;
    cursor: pointer;
    color: #c7d2fe;
    font-size: 0.73rem;
    font-weight: 720;
    line-height: 1.8;
    text-align: start;
}

.quantum-guide-toggle:hover,
.quantum-guide-toggle:focus-visible {
    background: rgba(99, 102, 241, 0.08);
    color: #e0e7ff;
    outline: none;
}

.quantum-guide-toggle > span {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 0.45rem;
}

.quantum-guide-toggle svg {
    width: 0.95rem;
    height: 0.95rem;
    flex: none;
    color: #818cf8;
}

.quantum-guide-chevron {
    transition: transform 180ms ease;
}

.quantum-guide.is-open .quantum-guide-chevron {
    transform: rotate(180deg);
}

.quantum-guide:not(.is-open) .quantum-guide-content {
    display: none;
}

.quantum-guide-content {
    padding: 0 0.75rem 0.75rem;
    border-top: 1px solid rgba(129, 140, 248, 0.12);
}

.quantum-guide-content p {
    margin-top: 0.65rem;
    color: #b4bfd0;
    font-size: 0.7rem;
    font-weight: 450;
    line-height: 2.05;
    text-align: start;
}

.quantum-guide-content strong {
    color: #e2e8f0;
    font-weight: 720;
}

.quantum-guide-content ol {
    display: grid;
    margin-top: 0.65rem;
    gap: 0.45rem;
    list-style: none;
}

.quantum-guide-content li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: #b4bfd0;
    font-size: 0.69rem;
    font-weight: 450;
    line-height: 1.95;
}

.quantum-guide-content li > span {
    display: inline-flex;
    width: 1.25rem;
    height: 1.25rem;
    flex: none;
    align-items: center;
    justify-content: center;
    margin-top: 0.12rem;
    border: 1px solid rgba(34, 211, 238, 0.24);
    border-radius: 50%;
    background: rgba(8, 145, 178, 0.1);
    color: #67e8f9;
    font-size: 0.62rem;
    font-weight: 700;
}

.quantum-guide-content .quantum-guide-privacy {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    color: #8fa0b7;
    text-align: start;
}

.quantum-guide-privacy svg {
    width: 0.9rem;
    height: 0.9rem;
    flex: none;
    margin-top: 0.38rem;
    color: #34d399;
}

body.eco-mode .quantum-node-core,
body.eco-mode .quantum-track::after,
body.eco-mode .quantum-signal,
body.eco-mode .quantum-loading svg,
body.eco-mode .quantum-focus-tether > span::after {
    animation-play-state: paused !important;
}

@media (prefers-reduced-motion: reduce) {
    .quantum-node-core,
    .quantum-track::after,
    .quantum-signal,
    .quantum-loading svg,
    .quantum-focus-tether > span::after {
        animation: none !important;
    }
}

@media (max-width: 420px) {
    .profile-scroll-area {
        margin-top: 0.75rem;
    }

    #profile-quantum-panel {
        padding-inline: 0.05rem;
    }

    .quantum-heading {
        align-items: flex-start;
        gap: 0.6rem;
    }

    .quantum-heading h4 {
        font-size: 0.9rem;
    }

    .quantum-heading p {
        font-size: 0.69rem;
        line-height: 1.9;
    }

    .quantum-guide-toggle {
        font-size: 0.7rem;
    }

    .quantum-guide-content {
        padding-inline: 0.65rem;
    }

    .quantum-visual {
        min-height: 5.75rem;
        grid-template-columns: 3.65rem minmax(3.5rem, 1fr) 3.65rem;
    }

    .quantum-code-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 2.6rem 2.6rem;
    }

    .quantum-request-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch;
    }

    .quantum-request-row .quantum-primary-button {
        width: 100%;
        padding: 0 0.7rem;
    }

    .quantum-dual-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .quantum-dual-actions > * {
        width: 100%;
    }

    .quantum-focus-tether {
        left: 92%;
        width: 58vw;
    }
}

/* Fleet profile, guide and story archive */
body.fleet-modal-open {
    overflow: hidden;
}

.fleet-profile-overlay {
    position: fixed;
    z-index: 1200;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(1, 4, 13, 0.82);
}

.fleet-profile-overlay.is-open {
    display: flex;
}

.fleet-profile-dialog {
    display: grid;
    width: min(70rem, calc(100vw - 2rem));
    height: min(48rem, calc(100dvh - 2rem));
    grid-template-rows: auto auto minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 0.625rem;
    background: #080b15;
    box-shadow: 0 1.5rem 5rem rgba(0, 0, 0, 0.56);
    color: #e8edf6;
    direction: rtl;
}

.fleet-profile-header {
    display: flex;
    min-height: 5.25rem;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background: #090d18;
}

.fleet-profile-heading,
.fleet-profile-title-line,
.fleet-guide-name,
.fleet-section-heading,
.fleet-progress-top,
.fleet-progress-foot,
.fleet-story-reader-head {
    display: flex;
    align-items: center;
}

.fleet-profile-heading {
    min-width: 0;
    gap: 0.8rem;
}

.fleet-profile-emblem,
.fleet-guide-avatar,
.fleet-crew-avatar,
.fleet-profile-loading-icon {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
}

.fleet-profile-emblem {
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 0.5rem;
    background: rgba(8, 145, 178, 0.12);
    color: #67e8f9;
}

.fleet-profile-emblem svg,
.fleet-guide-avatar svg,
.fleet-crew-avatar svg {
    width: 1.25rem;
    height: 1.25rem;
}

.fleet-profile-title-line {
    min-width: 0;
    gap: 0.6rem;
}

.fleet-profile-title-line h2 {
    max-width: 32rem;
    overflow: hidden;
    color: #f8fafc;
    font-size: 1.1rem;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#fleet-profile-tag {
    flex: none;
    padding: 0.2rem 0.45rem;
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 0.35rem;
    background: rgba(34, 211, 238, 0.08);
    color: #a5f3fc;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.68rem;
    font-weight: 800;
    direction: ltr;
}

#fleet-profile-subtitle {
    margin-top: 0.3rem;
    color: #8290a7;
    font-size: 0.7rem;
    font-weight: 600;
}

.fleet-icon-button {
    display: inline-flex;
    width: 2.35rem;
    height: 2.35rem;
    flex: none;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 0.45rem;
    background: rgba(148, 163, 184, 0.06);
    color: #a7b2c4;
    cursor: pointer;
}

.fleet-icon-button:hover,
.fleet-icon-button:focus-visible {
    border-color: rgba(34, 211, 238, 0.45);
    color: #e6fbff;
    outline: none;
}

.fleet-icon-button svg {
    width: 1rem;
    height: 1rem;
}

.fleet-profile-tabs {
    display: flex;
    min-height: 3.25rem;
    align-items: stretch;
    gap: 0.2rem;
    padding: 0 1.25rem;
    overflow-x: auto;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background: #070a12;
    scrollbar-width: none;
}

.fleet-profile-tabs::-webkit-scrollbar {
    display: none;
}

.fleet-profile-tab {
    position: relative;
    display: inline-flex;
    min-width: 6.5rem;
    min-height: 3.25rem;
    flex: none;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 0;
    background: transparent;
    color: #78869d;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 780;
}

.fleet-profile-tab::after {
    position: absolute;
    right: 0.75rem;
    bottom: 0;
    left: 0.75rem;
    height: 2px;
    background: transparent;
    content: "";
}

.fleet-profile-tab.is-active {
    color: #d9faff;
}

.fleet-profile-tab.is-active::after {
    background: #22d3ee;
}

.fleet-profile-tab svg {
    width: 0.95rem;
    height: 0.95rem;
}

.fleet-profile-tab b,
.fleet-story-action b {
    display: inline-flex;
    min-width: 1.2rem;
    height: 1.2rem;
    align-items: center;
    justify-content: center;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: #e11d48;
    color: #fff;
    font-size: 0.58rem;
    font-weight: 800;
}

.fleet-profile-content {
    min-height: 0;
    overflow: auto;
    padding: 1rem;
    overscroll-behavior: contain;
    scrollbar-color: #155e75 transparent;
    scrollbar-width: thin;
}

.fleet-profile-loading,
.fleet-profile-error {
    display: flex;
    min-height: 18rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    color: #9aa7ba;
    text-align: center;
}

.fleet-profile-loading-icon {
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid rgba(34, 211, 238, 0.25);
    border-radius: 50%;
    color: #67e8f9;
}

.fleet-profile-loading-icon svg {
    width: 1.2rem;
    height: 1.2rem;
    animation: fleet-loading-spin 900ms linear infinite;
}

.fleet-profile-error svg {
    width: 2rem;
    height: 2rem;
    color: #fb7185;
}

.fleet-profile-error strong {
    color: #fecdd3;
}

.fleet-profile-error p {
    max-width: 28rem;
    color: #9aa7ba;
    font-size: 0.75rem;
    line-height: 1.9;
}

@keyframes fleet-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

.fleet-overview-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 18rem;
    gap: 1rem;
}

.fleet-overview-main,
.fleet-overview-aside {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.85rem;
}

.fleet-profile-section,
.fleet-motto-panel,
.fleet-progress-panel,
.fleet-guide-profile,
.fleet-crew-directory,
.fleet-story-reader,
.fleet-story-index {
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 0.5rem;
    background: #0b0f1b;
}

.fleet-profile-section,
.fleet-crew-directory {
    padding: 0.9rem;
}

.fleet-motto-panel {
    display: flex;
    min-height: 5.5rem;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border-color: rgba(34, 211, 238, 0.2);
    background: #09121c;
}

.fleet-motto-panel > div:first-child {
    min-width: 0;
}

.fleet-motto-panel span,
.fleet-progress-top span,
.fleet-capacity-readout span {
    color: #718096;
    font-size: 0.65rem;
    font-weight: 720;
}

.fleet-motto-panel blockquote {
    margin-top: 0.5rem;
    color: #e6edf7;
    font-size: 0.9rem;
    font-weight: 720;
    line-height: 1.9;
    overflow-wrap: anywhere;
}

.fleet-motto-editor {
    width: 100%;
}

.fleet-motto-editor label {
    display: block;
    margin-bottom: 0.45rem;
    color: #9eacbf;
    font-size: 0.7rem;
    font-weight: 750;
}

.fleet-motto-editor textarea {
    width: 100%;
    min-height: 4.25rem;
    resize: vertical;
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: 0.4rem;
    background: #050811;
    color: #f8fafc;
    padding: 0.65rem;
    font: inherit;
    font-size: 0.78rem;
    line-height: 1.8;
    outline: none;
}

.fleet-motto-editor small {
    display: block;
    margin-top: 0.35rem;
    color: #65738a;
    font-size: 0.62rem;
}

.fleet-motto-actions {
    display: flex;
    flex: none;
    align-self: flex-end;
    gap: 0.45rem;
}

.fleet-primary-button,
.fleet-secondary-button {
    min-height: 2.35rem;
    padding: 0 0.85rem;
    border-radius: 0.4rem;
    cursor: pointer;
    font: inherit;
    font-size: 0.7rem;
    font-weight: 780;
}

.fleet-primary-button {
    border: 1px solid #22d3ee;
    background: #22d3ee;
    color: #041018;
}

.fleet-secondary-button {
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(148, 163, 184, 0.07);
    color: #c2cad7;
}

.fleet-progress-panel {
    padding: 1rem;
}

.fleet-progress-top,
.fleet-progress-foot {
    justify-content: space-between;
    gap: 1rem;
}

.fleet-progress-top > div {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.fleet-progress-top strong {
    color: #f1f5f9;
    font-size: 0.85rem;
}

.fleet-capacity-readout {
    align-items: flex-end;
}

.fleet-capacity-readout strong {
    color: #67e8f9;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.fleet-progress-track {
    height: 0.45rem;
    margin: 0.9rem 0 0.65rem;
    overflow: hidden;
    border-radius: 999px;
    background: #171d2a;
}

.fleet-progress-track > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #22d3ee;
}

.fleet-progress-foot {
    color: #7f8ba0;
    font-size: 0.64rem;
    font-weight: 650;
}

.fleet-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 0.5rem;
    background: #0b0f1b;
}

.fleet-stat-grid > .fleet-stat-item {
    display: flex;
    min-width: 0;
    min-height: 5.4rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.7rem;
    border-inline-start: 1px solid rgba(148, 163, 184, 0.1);
    text-align: center;
}

.fleet-stat-grid > .fleet-stat-item:last-child {
    border-inline-start: 0;
}

.fleet-privacy-stat-toggle {
    width: 100%;
    border: 0;
    color: inherit;
    background: transparent;
    cursor: pointer;
    font: inherit;
    transition: background-color 150ms ease, box-shadow 150ms ease;
}

.fleet-privacy-stat-toggle:hover,
.fleet-privacy-stat-toggle:focus-visible {
    outline: 0;
    background: rgba(34, 211, 238, 0.07);
    box-shadow: inset 0 0 0 1px rgba(103, 232, 249, 0.16);
}

.fleet-privacy-stat-toggle:disabled {
    cursor: wait;
    opacity: 0.58;
}

.fleet-stat-grid svg {
    width: 1rem;
    height: 1rem;
    color: #67e8f9;
}

.fleet-stat-grid strong {
    max-width: 100%;
    overflow: hidden;
    color: #f1f5f9;
    font-size: 0.75rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fleet-stat-grid span {
    color: #6f7c90;
    font-size: 0.6rem;
    font-weight: 650;
}

.fleet-guide-profile {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.9rem;
    border-color: rgba(45, 212, 191, 0.2);
    background: #081417;
}

.fleet-guide-avatar {
    width: 2.65rem;
    height: 2.65rem;
    border: 1px solid rgba(45, 212, 191, 0.3);
    border-radius: 50%;
    background: rgba(20, 184, 166, 0.12);
    color: #5eead4;
}

.fleet-guide-name {
    flex-wrap: wrap;
    gap: 0.4rem;
}

.fleet-guide-name strong {
    color: #ecfeff;
    font-size: 0.82rem;
}

.fleet-guide-name span {
    padding: 0.12rem 0.35rem;
    border-radius: 0.25rem;
    background: rgba(45, 212, 191, 0.1);
    color: #99f6e4;
    font-size: 0.58rem;
    font-weight: 700;
}

.fleet-guide-profile p {
    margin-top: 0.4rem;
    color: #9babb7;
    font-size: 0.7rem;
    line-height: 1.9;
}

.fleet-section-heading {
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.fleet-section-heading > div {
    min-width: 0;
}

.fleet-section-heading span {
    display: block;
    margin-bottom: 0.18rem;
    color: #65738a;
    font-size: 0.6rem;
    font-weight: 700;
}

.fleet-section-heading h3 {
    color: #eef2f7;
    font-size: 0.82rem;
    font-weight: 800;
}

.fleet-section-heading b {
    flex: none;
    padding: 0.2rem 0.45rem;
    border-radius: 0.3rem;
    background: rgba(34, 211, 238, 0.09);
    color: #a5f3fc;
    font-size: 0.62rem;
}

.fleet-section-heading button {
    flex: none;
    border: 0;
    background: transparent;
    color: #67e8f9;
    cursor: pointer;
    font: inherit;
    font-size: 0.65rem;
    font-weight: 700;
}

.fleet-empty-copy {
    padding: 1rem 0;
    color: #768398;
    font-size: 0.7rem;
    line-height: 1.9;
    text-align: center;
}

.fleet-announcement-list {
    display: grid;
    gap: 0.25rem;
}

.fleet-announcement-item {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: 0.65rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.09);
}

.fleet-announcement-item:last-child {
    border-bottom: 0;
}

.fleet-announcement-item > span {
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.4rem;
    background: rgba(34, 211, 238, 0.08);
    color: #67e8f9;
}

.fleet-announcement-item svg {
    width: 0.9rem;
    height: 0.9rem;
}

.fleet-announcement-item strong {
    color: #dfe7f2;
    font-size: 0.7rem;
}

.fleet-announcement-item p {
    margin-top: 0.2rem;
    color: #8d9aae;
    font-size: 0.66rem;
    line-height: 1.75;
}

.fleet-announcement-item time {
    display: block;
    margin-top: 0.22rem;
    color: #59667b;
    font-size: 0.56rem;
}

.fleet-roster-preview {
    flex: 1;
}

.fleet-roster-mini {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.fleet-roster-mini:last-child {
    border-bottom: 0;
}

.fleet-roster-mini > span {
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.08);
    color: #b7c2d3;
}

.fleet-roster-mini svg {
    width: 0.85rem;
    height: 0.85rem;
}

.fleet-roster-mini strong,
.fleet-roster-mini small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fleet-roster-mini strong {
    color: #e5ebf4;
    font-size: 0.7rem;
}

.fleet-roster-mini small {
    margin-top: 0.15rem;
    color: #69778c;
    font-size: 0.58rem;
}

.fleet-crew-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.fleet-crew-card {
    display: grid;
    min-width: 0;
    grid-template-columns: 2.5rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 0.45rem;
    background: #080c16;
}

.fleet-crew-card.is-guide {
    border-color: rgba(45, 212, 191, 0.22);
    background: #071316;
}

.fleet-crew-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.08);
    color: #b9c3d2;
}

.fleet-crew-card.is-guide .fleet-crew-avatar {
    border-color: rgba(45, 212, 191, 0.3);
    color: #5eead4;
}

.fleet-crew-avatar.role-captain {
    border-color: rgba(251, 191, 36, 0.3);
    color: #fcd34d;
}

.fleet-crew-avatar.role-officer {
    border-color: rgba(34, 211, 238, 0.3);
    color: #67e8f9;
}

.fleet-crew-copy {
    min-width: 0;
}

.fleet-crew-copy > div {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0.4rem;
}

.fleet-crew-copy strong {
    overflow: hidden;
    color: #edf2f8;
    font-size: 0.74rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fleet-crew-copy em {
    flex: none;
    color: #67e8f9;
    font-size: 0.55rem;
    font-style: normal;
}

.fleet-crew-copy p {
    margin-top: 0.22rem;
    overflow: hidden;
    color: #6f7c90;
    font-size: 0.6rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fleet-crew-contribution {
    color: #6ee7b7;
    font-size: 0.62rem;
    font-weight: 760;
    white-space: nowrap;
}

.fleet-story-layout {
    display: grid;
    min-height: 100%;
    grid-template-columns: 16rem minmax(0, 1fr);
    gap: 0.8rem;
}

.fleet-story-index,
.fleet-story-reader {
    min-width: 0;
}

.fleet-story-index {
    padding: 0.85rem;
}

.fleet-story-index > label {
    display: block;
    margin-bottom: 0.4rem;
    color: #77859b;
    font-size: 0.62rem;
    font-weight: 700;
}

.fleet-story-index > select {
    width: 100%;
    min-height: 2.55rem;
    padding: 0 0.65rem;
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 0.4rem;
    background: #070b14;
    color: #e6edf7;
    font: inherit;
    font-size: 0.7rem;
    font-weight: 700;
    outline: none;
}

.fleet-story-index > p {
    margin: 0.55rem 0 0.75rem;
    color: #718096;
    font-size: 0.62rem;
    line-height: 1.75;
}

.fleet-story-week-list {
    display: grid;
    max-height: calc(100dvh - 15rem);
    gap: 0.3rem;
    overflow-y: auto;
    scrollbar-width: thin;
}

.fleet-story-week-list button {
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.15rem 0.4rem;
    padding: 0.55rem 0.6rem;
    border: 1px solid transparent;
    border-radius: 0.4rem;
    background: #080c16;
    color: #8794a7;
    cursor: pointer;
    font: inherit;
    text-align: start;
}

.fleet-story-week-list button:hover:not(:disabled),
.fleet-story-week-list button.is-active {
    border-color: rgba(34, 211, 238, 0.3);
    background: #0a1720;
}

.fleet-story-week-list button:disabled {
    cursor: default;
    opacity: 0.45;
}

.fleet-story-week-list span {
    color: #6f7c90;
    font-size: 0.55rem;
}

.fleet-story-week-list strong {
    grid-column: 1;
    overflow: hidden;
    color: #dce4ee;
    font-size: 0.67rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fleet-story-week-list small {
    grid-row: 1 / span 2;
    grid-column: 2;
    align-self: center;
    color: #64748b;
    font-size: 0.53rem;
}

.fleet-story-week-list button.status-current small {
    color: #67e8f9;
}

.fleet-story-reader {
    padding: 1rem;
}

.fleet-story-reader-head {
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.fleet-story-reader-head span {
    color: #64748b;
    font-size: 0.6rem;
}

.fleet-story-reader-head h3 {
    margin-top: 0.22rem;
    color: #f1f5f9;
    font-size: 0.95rem;
    font-weight: 850;
}

.fleet-story-reader-head > b {
    flex: none;
    padding: 0.25rem 0.5rem;
    border-radius: 0.3rem;
    background: rgba(100, 116, 139, 0.12);
    color: #94a3b8;
    font-size: 0.58rem;
}

.fleet-story-reader-head > b.status-current {
    background: rgba(34, 211, 238, 0.1);
    color: #67e8f9;
}

.fleet-story-summary {
    margin: 0.85rem 0;
    padding: 0.75rem;
    border-right: 2px solid #22d3ee;
    background: rgba(34, 211, 238, 0.05);
    color: #aeb9c8;
    font-size: 0.7rem;
    line-height: 2;
}

.fleet-story-scenes {
    display: grid;
    gap: 1rem;
}

.fleet-story-scene {
    min-width: 0;
}

.fleet-story-day {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
}

.fleet-story-day span {
    color: #8f9db0;
    font-size: 0.65rem;
    font-weight: 780;
}

.fleet-story-day b {
    padding: 0.12rem 0.35rem;
    border-radius: 0.25rem;
    background: rgba(34, 211, 238, 0.1);
    color: #67e8f9;
    font-size: 0.5rem;
}

.fleet-story-messages {
    display: grid;
    gap: 0.3rem;
}

.fleet-story-messages article {
    display: grid;
    grid-template-columns: 7rem minmax(0, 1fr);
    gap: 0.6rem;
    padding: 0.6rem 0.7rem;
    border-right: 2px solid rgba(100, 116, 139, 0.35);
    background: #080c16;
}

.fleet-story-messages article.has-outcome {
    border-right-color: rgba(148, 163, 184, 0.55);
}

.fleet-story-messages article.has-outcome.is-success {
    border-right-color: #34d399;
}

.fleet-story-messages article.has-outcome.is-failure {
    border-right-color: #fb7185;
}

.fleet-story-speaker {
    min-width: 0;
}

.fleet-story-outcome {
    display: block;
    width: max-content;
    max-width: 100%;
    margin-top: 0.2rem;
    padding: 0.08rem 0.32rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 0.2rem;
    color: #aab5c4;
    font-size: 0.48rem;
    line-height: 1.6;
}

.fleet-story-outcome.is-success {
    border-color: rgba(52, 211, 153, 0.35);
    color: #6ee7b7;
}

.fleet-story-outcome.is-failure {
    border-color: rgba(251, 113, 133, 0.35);
    color: #fda4af;
}

.fleet-story-messages strong {
    color: #67e8f9;
    font-size: 0.64rem;
    font-weight: 760;
    line-height: 1.9;
}

.fleet-story-messages p {
    color: #c3ccd9;
    font-size: 0.69rem;
    line-height: 1.95;
    overflow-wrap: anywhere;
}

.fleet-story-locked {
    display: flex;
    min-height: 15rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    color: #65738a;
    text-align: center;
}

.fleet-story-locked svg {
    width: 1.5rem;
    height: 1.5rem;
}

.fleet-story-locked strong {
    color: #a8b3c3;
    font-size: 0.78rem;
}

.fleet-story-locked p {
    max-width: 24rem;
    color: #67758a;
    font-size: 0.66rem;
    line-height: 1.9;
}

/* Compact fleet controls inside the main fleet view */
.fleet-command-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.fleet-profile-action,
.fleet-story-action {
    display: inline-flex;
    min-height: 2.25rem;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0 0.65rem;
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 0.45rem;
    background: rgba(34, 211, 238, 0.07);
    color: #bff8ff;
    cursor: pointer;
    font-size: 0.65rem;
    font-weight: 750;
}

.fleet-story-action {
    border-color: rgba(129, 140, 248, 0.22);
    background: rgba(99, 102, 241, 0.08);
    color: #d9ddff;
}

.fleet-profile-action svg,
.fleet-story-action svg {
    width: 0.9rem;
    height: 0.9rem;
}

.fleet-header-motto {
    max-width: 34rem;
    margin-top: 0.45rem;
    overflow: hidden;
    color: #8795a9;
    font-size: 0.66rem;
    font-weight: 600;
    line-height: 1.7;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fleet-guide-strip {
    display: grid;
    width: 100%;
    grid-template-columns: 2.45rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid rgba(45, 212, 191, 0.2);
    border-radius: 0.5rem;
    background: #081317;
    color: inherit;
    cursor: pointer;
    text-align: start;
}

.fleet-guide-strip:hover,
.fleet-guide-strip:focus-visible {
    border-color: rgba(45, 212, 191, 0.42);
    outline: none;
}

.fleet-guide-strip__avatar {
    display: inline-flex;
    width: 2.45rem;
    height: 2.45rem;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(45, 212, 191, 0.28);
    border-radius: 50%;
    color: #5eead4;
}

.fleet-guide-strip__avatar svg {
    width: 1rem;
    height: 1rem;
}

.fleet-guide-strip__copy {
    min-width: 0;
}

.fleet-guide-strip__copy strong {
    display: block;
    color: #ddfffb;
    font-size: 0.72rem;
}

.fleet-guide-strip__copy p {
    margin-top: 0.18rem;
    overflow: hidden;
    color: #83959f;
    font-size: 0.62rem;
    line-height: 1.65;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fleet-guide-strip__meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #5eead4;
}

.fleet-guide-strip__meta b {
    display: inline-flex;
    min-width: 1.25rem;
    height: 1.25rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #e11d48;
    color: #fff;
    font-size: 0.55rem;
}

.fleet-guide-strip__meta svg {
    width: 0.9rem;
    height: 0.9rem;
}

.fleet-progression-strip {
    padding: 0.8rem;
    border: 1px solid rgba(34, 211, 238, 0.14);
    border-radius: 0.5rem;
    background: #090f19;
}

.fleet-progression-strip__top,
.fleet-progression-strip__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
}

.fleet-progression-strip__top strong {
    color: #e6edf6;
    font-size: 0.7rem;
}

.fleet-progression-strip__top span,
.fleet-progression-strip__foot {
    color: #718096;
    font-size: 0.59rem;
    font-weight: 650;
}

.fleet-progression-strip__track {
    height: 0.35rem;
    margin: 0.55rem 0 0.45rem;
    overflow: hidden;
    border-radius: 999px;
    background: #1a2130;
}

.fleet-progression-strip__track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #22d3ee;
}

.fleet-system-member {
    border-color: rgba(45, 212, 191, 0.22) !important;
    background: #071316 !important;
}

.fleet-ranking-button {
    display: block;
    width: 100%;
    border: 0;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-align: start;
}

.fleet-ranking-button:focus-visible {
    outline: 2px solid rgba(34, 211, 238, 0.55);
    outline-offset: 2px;
}

@media (max-width: 820px) {
    .fleet-overview-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .fleet-overview-aside {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .fleet-stat-grid > .fleet-stat-item:nth-child(2) {
        border-inline-start: 0;
    }

    .fleet-stat-grid > .fleet-stat-item:nth-child(-n + 2) {
        border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    }

    .fleet-story-layout {
        grid-template-columns: 13.5rem minmax(0, 1fr);
    }

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

@media (max-width: 640px) {
    .fleet-profile-overlay {
        padding: 0;
    }

    .fleet-profile-dialog {
        width: 100vw;
        height: 100dvh;
        border: 0;
        border-radius: 0;
    }

    .fleet-profile-header {
        min-height: 4.25rem;
        padding: max(0.65rem, env(safe-area-inset-top)) 0.75rem 0.65rem;
    }

    .fleet-profile-emblem {
        width: 2.25rem;
        height: 2.25rem;
    }

    .fleet-profile-title-line h2 {
        max-width: 11rem;
        font-size: 0.9rem;
    }

    #fleet-profile-subtitle {
        font-size: 0.62rem;
    }

    .fleet-profile-tabs {
        min-height: 3rem;
        padding: 0 0.45rem;
    }

    .fleet-profile-tab {
        min-width: 5.75rem;
        min-height: 3rem;
        font-size: 0.66rem;
    }

    .fleet-profile-content {
        padding: 0.65rem;
        padding-bottom: max(0.65rem, env(safe-area-inset-bottom));
    }

    .fleet-overview-aside {
        display: flex;
    }

    .fleet-motto-panel {
        min-height: 4.75rem;
        padding: 0.8rem;
    }

    .fleet-motto-panel blockquote {
        font-size: 0.8rem;
    }

    .fleet-motto-panel:has(.fleet-motto-editor) {
        flex-direction: column;
    }

    .fleet-motto-actions {
        width: 100%;
    }

    .fleet-motto-actions button {
        flex: 1;
    }

    .fleet-progress-foot {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.2rem;
    }

    .fleet-stat-grid > .fleet-stat-item {
        min-height: 4.7rem;
    }

    .fleet-crew-card {
        grid-template-columns: 2.25rem minmax(0, 1fr);
    }

    .fleet-crew-avatar {
        width: 2.25rem;
        height: 2.25rem;
    }

    .fleet-crew-contribution {
        grid-column: 2;
        justify-self: start;
    }

    .fleet-story-layout {
        display: block;
    }

    .fleet-story-index {
        margin-bottom: 0.6rem;
        padding: 0.7rem;
    }

    .fleet-story-index > p {
        margin-bottom: 0.55rem;
    }

    .fleet-story-week-list {
        display: flex;
        max-height: none;
        gap: 0.35rem;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 0.2rem;
        scroll-snap-type: x proximity;
    }

    .fleet-story-week-list button {
        width: 8.75rem;
        min-width: 8.75rem;
        scroll-snap-align: start;
    }

    .fleet-story-reader {
        padding: 0.75rem;
    }

    .fleet-story-messages article {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.15rem;
        padding: 0.6rem;
    }

    .fleet-story-summary {
        font-size: 0.67rem;
    }

    .fleet-command-tools {
        width: 100%;
    }

    .fleet-profile-action,
    .fleet-story-action {
        flex: 1;
    }

    .fleet-guide-strip {
        grid-template-columns: 2.25rem minmax(0, 1fr) auto;
        padding: 0.65rem;
    }

    .fleet-guide-strip__avatar {
        width: 2.25rem;
        height: 2.25rem;
    }

    .fleet-guide-strip__copy p {
        white-space: normal;
    }
}

/* Fleet command center v2: single-pass, mobile-first rendering */
.fleet-page-shell {
    width: min(100%, 1120px);
    margin: 0 auto;
    padding: 18px 18px 36px;
    color: #e7eef8;
}

.fleet-command-panel,
.fleet-dock-panel,
.fleet-progression-panel,
.fleet-boss-panel,
.fleet-crew-panel,
.fleet-ranking-panel {
    position: relative;
    border: 1px solid rgba(125, 211, 252, 0.16);
    border-radius: 8px;
    background: rgba(4, 9, 20, 0.9);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.24);
}

.fleet-initial-loading {
    display: flex;
    min-height: 112px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 1px solid rgba(34, 211, 238, 0.18);
    border-radius: 8px;
    color: #9caec2;
    background: #060d18;
    text-align: start;
}

.fleet-loading-signal {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    border: 2px solid rgba(34, 211, 238, 0.18);
    border-top-color: #22d3ee;
    border-radius: 50%;
    animation: fleet-loading-spin 900ms linear infinite;
}

.fleet-initial-loading strong {
    display: block;
    color: #dffaff;
    font-size: 12px;
}

.fleet-initial-loading p {
    margin-top: 4px;
    color: #6f8197;
    font-size: 9px;
}

.fleet-command-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 0.72fr) auto;
    align-items: center;
    gap: 18px;
    overflow: hidden;
    padding: 18px;
    border-color: rgba(34, 211, 238, 0.28);
}

.fleet-command-panel::before,
.fleet-profile-dialog::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 2px;
    pointer-events: none;
    background: linear-gradient(90deg, #22d3ee, #34d399 40%, #fbbf24 72%, #a78bfa);
}

.fleet-command-identity {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
}

.fleet-command-emblem,
.fleet-section-title > span,
.fleet-raya-avatar {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: 8px;
    color: #67e8f9;
    background: rgba(8, 145, 178, 0.12);
}

.fleet-command-emblem svg,
.fleet-section-title > span svg,
.fleet-raya-avatar svg {
    width: 20px;
    height: 20px;
}

.fleet-command-identity small,
.fleet-section-title small,
.fleet-raya-copy small,
.fleet-member-xp span {
    display: block;
    color: #71839c;
    font-size: 10px;
    font-weight: 700;
}

.fleet-command-identity h1 {
    overflow: hidden;
    margin: 2px 0 3px;
    color: #f8fafc;
    font-size: 22px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fleet-command-title-row {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
}

.fleet-command-identity .fleet-command-profile-link {
    display: block;
    min-width: 0;
    padding: 0;
    border: 0;
    color: inherit;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    text-align: start;
}

.fleet-command-identity .fleet-command-profile-link:hover h1,
.fleet-command-identity .fleet-command-profile-link:focus-visible h1 {
    color: #a5f3fc;
}

.fleet-command-identity .fleet-command-profile-link:focus-visible {
    outline: 2px solid rgba(103, 232, 249, 0.55);
    outline-offset: 3px;
    border-radius: 3px;
}

.fleet-command-inline-xp {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    border: 1px solid rgba(250, 204, 21, 0.2);
    border-radius: 999px;
    color: #fde68a;
    background: rgba(250, 204, 21, 0.06);
    font-size: 10px;
    font-weight: 800;
    line-height: 1.45;
    white-space: nowrap;
}

.fleet-command-inline-xp svg {
    width: 12px;
    height: 12px;
}

.fleet-command-identity button {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 5px;
    color: #9cc5d3;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 10px;
}

.fleet-command-identity button svg {
    width: 12px;
    height: 12px;
}

.fleet-command-panel blockquote {
    overflow: hidden;
    margin: 0;
    padding: 0 14px;
    border-inline-start: 2px solid rgba(167, 139, 250, 0.46);
    color: #cbd5e1;
    font-size: 12px;
    line-height: 1.9;
    text-overflow: ellipsis;
}

.fleet-command-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.fleet-command-actions button,
.fleet-command-settings button {
    position: relative;
    display: inline-flex;
    min-width: 0;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 6px;
    color: #b7c7da;
    background: rgba(255, 255, 255, 0.025);
    font-size: 11px;
    font-weight: 800;
    transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}

.fleet-command-actions button:hover,
.fleet-command-actions button:focus-visible,
.fleet-command-settings button:hover,
.fleet-command-settings button:focus-visible {
    border-color: rgba(34, 211, 238, 0.46);
    color: #ecfeff;
    background: rgba(34, 211, 238, 0.08);
}

.fleet-command-actions svg,
.fleet-command-settings svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
}

.fleet-command-actions b {
    display: inline-flex;
    min-width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border-radius: 9px;
    color: #08111f;
    background: #fbbf24;
    font-size: 9px;
}

.fleet-command-settings {
    position: absolute;
    inset: 10px auto auto 10px;
    display: flex;
    gap: 5px;
}

.fleet-command-settings button {
    min-height: 30px;
    padding: 4px 8px;
    font-size: 9px;
}

.fleet-command-settings button.is-danger {
    color: #fda4af;
}

.fleet-raya-callout {
    display: grid;
    width: 100%;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    margin-top: 10px;
    padding: 11px 13px;
    border: 1px solid rgba(45, 212, 191, 0.22);
    border-radius: 8px;
    color: inherit;
    background: rgba(3, 20, 24, 0.92);
    text-align: start;
    transition: border-color 150ms ease, background-color 150ms ease;
}

.fleet-raya-callout:hover,
.fleet-raya-callout:focus-visible {
    border-color: rgba(94, 234, 212, 0.5);
    background: rgba(4, 28, 32, 0.96);
}

.fleet-raya-callout.has-news {
    border-inline-start: 3px solid #fbbf24;
}

.fleet-raya-avatar {
    position: relative;
    width: 40px;
    height: 40px;
    border-color: rgba(45, 212, 191, 0.34);
    color: #5eead4;
    background: rgba(13, 148, 136, 0.13);
}

.fleet-raya-avatar b {
    position: absolute;
    inset: auto auto -2px -2px;
    width: 9px;
    height: 9px;
    border: 2px solid #031418;
    border-radius: 50%;
    background: #34d399;
}

.fleet-raya-copy {
    min-width: 0;
}

.fleet-raya-copy strong {
    display: block;
    color: #ccfbf1;
    font-size: 13px;
}

.fleet-raya-copy p {
    overflow: hidden;
    margin: 3px 0 0;
    color: #91a7b8;
    font-size: 11px;
    line-height: 1.65;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fleet-raya-open {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #5eead4;
    font-size: 10px;
}

.fleet-raya-open b {
    padding: 3px 7px;
    border-radius: 6px;
    color: #fde68a;
    background: rgba(251, 191, 36, 0.1);
}

.fleet-raya-open svg {
    width: 16px;
    height: 16px;
}

.fleet-progression-panel,
.fleet-boss-panel,
.fleet-crew-panel,
.fleet-ranking-panel {
    margin-top: 10px;
}

.fleet-progression-panel {
    padding: 13px 15px;
    border-color: rgba(52, 211, 153, 0.18);
}

.fleet-progression-panel header,
.fleet-progression-panel footer,
.fleet-boss-panel footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.fleet-progression-panel header div small {
    display: block;
    color: #6b7d90;
    font-size: 9px;
}

.fleet-progression-panel header strong {
    color: #d1fae5;
    font-size: 13px;
}

.fleet-progression-panel header > span,
.fleet-progression-panel footer,
.fleet-boss-panel footer {
    color: #8191a5;
    font-size: 10px;
}

.fleet-progression-track,
.fleet-boss-track {
    overflow: hidden;
    height: 6px;
    margin: 10px 0;
    border-radius: 3px;
    background: #111827;
}

.fleet-progression-track span,
.fleet-boss-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #34d399;
}

.fleet-boss-panel {
    padding: 14px 15px;
    border-color: rgba(244, 63, 94, 0.22);
    background: rgba(22, 7, 15, 0.9);
}

.fleet-boss-panel.is-defeated {
    border-color: rgba(52, 211, 153, 0.24);
    background: rgba(3, 20, 16, 0.9);
}

.fleet-boss-panel.fleet-story-stage-panel {
    border-color: rgba(34, 211, 238, 0.24);
    background: rgba(4, 17, 25, 0.92);
}

.fleet-boss-panel.fleet-story-stage-panel header > span {
    color: #67e8f9;
    background: rgba(34, 211, 238, 0.1);
}

.fleet-boss-panel.fleet-story-stage-panel header small {
    color: #7dd3fc;
}

.fleet-boss-panel.fleet-story-stage-panel header h3 {
    color: #ecfeff;
}

.fleet-boss-panel.fleet-story-stage-panel header > strong {
    color: #fde68a;
}

.fleet-boss-panel.fleet-story-stage-panel .fleet-boss-track span {
    background: #22d3ee;
}

.fleet-boss-panel header {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.fleet-boss-panel header > span {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: #fda4af;
    background: rgba(244, 63, 94, 0.1);
}

.fleet-boss-panel.is-defeated header > span {
    color: #6ee7b7;
    background: rgba(52, 211, 153, 0.1);
}

.fleet-boss-panel header svg {
    width: 17px;
    height: 17px;
}

.fleet-boss-panel header small {
    color: #9f7583;
    font-size: 9px;
}

.fleet-boss-panel header h3 {
    margin: 2px 0 0;
    color: #fff1f2;
    font-size: 13px;
}

.fleet-boss-panel header > strong {
    color: #fda4af;
    font-size: 11px;
}

.fleet-boss-track span {
    background: #f43f5e;
}

.fleet-boss-panel.is-defeated .fleet-boss-track span {
    background: #34d399;
}

.fleet-crew-panel,
.fleet-ranking-panel,
.fleet-dock-panel {
    padding: 14px;
}

.fleet-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.fleet-section-title > span {
    width: 36px;
    height: 36px;
}

.fleet-section-title > span svg {
    width: 17px;
    height: 17px;
}

.fleet-section-title h2 {
    margin: 1px 0 0;
    color: #edf6ff;
    font-size: 14px;
}

.fleet-section-title > b {
    margin-inline-start: auto;
    padding: 4px 8px;
    border: 1px solid rgba(34, 211, 238, 0.17);
    border-radius: 6px;
    color: #a5f3fc;
    background: rgba(34, 211, 238, 0.07);
    font-size: 10px;
}

.fleet-member-list {
    display: grid;
    gap: 6px;
    margin-top: 6px;
}

.fleet-member-row {
    display: grid;
    width: 100%;
    min-height: 58px;
    grid-template-columns: 40px minmax(130px, 1.5fr) minmax(110px, 0.8fr) minmax(92px, 0.55fr) 70px;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid rgba(148, 163, 184, 0.11);
    border-radius: 6px;
    color: inherit;
    background: rgba(255, 255, 255, 0.018);
}

.fleet-member-row.is-raya {
    border-color: rgba(45, 212, 191, 0.2);
    background: rgba(13, 148, 136, 0.055);
    text-align: start;
}

.fleet-member-avatar {
    position: relative;
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 7px;
    color: #b7c6d8;
    background: rgba(148, 163, 184, 0.07);
}

.role-captain .fleet-member-avatar {
    border-color: rgba(251, 191, 36, 0.28);
    color: #fde68a;
    background: rgba(251, 191, 36, 0.08);
}

.role-officer .fleet-member-avatar {
    border-color: rgba(34, 211, 238, 0.25);
    color: #a5f3fc;
    background: rgba(34, 211, 238, 0.07);
}

.fleet-member-avatar svg {
    width: 17px;
    height: 17px;
}

.fleet-member-avatar > b {
    position: absolute;
    inset: auto auto -2px -2px;
    width: 9px;
    height: 9px;
    border: 2px solid #050b16;
    border-radius: 50%;
}

.fleet-member-avatar > b.is-online {
    background: #34d399;
}

.fleet-member-avatar > b.is-offline {
    background: #ef4444;
}

.fleet-member-name {
    min-width: 0;
}

.fleet-member-name strong,
.fleet-member-name span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fleet-member-name strong {
    color: #edf6ff;
    font-size: 12px;
}

.fleet-member-name span {
    margin-top: 3px;
    color: #6f8197;
    font-size: 9px;
}

.fleet-presence {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #9aaabe;
    font-size: 9px;
    font-weight: 800;
}

.fleet-presence svg {
    width: 12px;
    height: 12px;
}

.fleet-presence.is-online {
    color: #6ee7b7;
}

.fleet-presence.is-offline {
    color: #fca5a5;
}

.fleet-presence.is-cryo {
    color: #7dd3fc;
}

.fleet-member-xp {
    text-align: end;
}

.fleet-member-xp strong {
    display: block;
    color: #86efac;
    font-size: 11px;
}

.fleet-row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 5px;
}

.fleet-row-actions button {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(34, 211, 238, 0.18);
    border-radius: 6px;
    color: #a5f3fc;
    background: rgba(34, 211, 238, 0.06);
}

.fleet-row-actions button.is-danger {
    border-color: rgba(251, 113, 133, 0.2);
    color: #fda4af;
    background: rgba(244, 63, 94, 0.06);
}

.fleet-row-actions svg,
.fleet-row-actions-placeholder svg {
    width: 15px;
    height: 15px;
}

.fleet-ranking-table {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 6px;
}

.fleet-ranking-head,
.fleet-ranking-row {
    display: grid;
    grid-template-columns: 58px minmax(150px, 1fr) 90px 70px 110px 20px;
    align-items: center;
    gap: 8px;
}

.fleet-ranking-head {
    min-height: 32px;
    padding: 0 10px;
    color: #607186;
    background: rgba(148, 163, 184, 0.045);
    font-size: 9px;
    font-weight: 800;
}

.fleet-ranking-row {
    width: 100%;
    min-height: 58px;
    padding: 8px 10px;
    border-top: 1px solid rgba(148, 163, 184, 0.08);
    color: #9cadc0;
    text-align: start;
    transition: background-color 150ms ease;
}

.fleet-ranking-row:hover,
.fleet-ranking-row:focus-visible {
    background: rgba(99, 102, 241, 0.07);
}

.fleet-ranking-position {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #718196;
    font-weight: 900;
}

.rank-1 .fleet-ranking-position {
    color: #fbbf24;
}

.rank-2 .fleet-ranking-position {
    color: #d7e0ec;
}

.rank-3 .fleet-ranking-position {
    color: #fb923c;
}

.fleet-ranking-position svg,
.fleet-ranking-crew svg,
.fleet-ranking-hunts svg {
    width: 14px;
    height: 14px;
}

.fleet-ranking-name {
    min-width: 0;
}

.fleet-ranking-name strong,
.fleet-ranking-name small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fleet-ranking-name strong {
    color: #e2e8f0;
    font-size: 11px;
}

.fleet-ranking-name small {
    margin-top: 3px;
    color: #66788f;
    font-size: 9px;
}

.fleet-ranking-crew,
.fleet-ranking-hunts {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 9px;
}

.fleet-ranking-xp {
    color: #86efac;
    font-size: 10px;
    font-weight: 900;
}

.fleet-ranking-chevron {
    width: 14px;
    height: 14px;
}

.fleet-empty-state {
    display: flex;
    min-height: 90px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #64748b;
    font-size: 11px;
}

.fleet-empty-state svg {
    width: 18px;
    height: 18px;
}

.fleet-dock-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.fleet-dock-form {
    padding: 12px;
    border: 1px solid rgba(34, 211, 238, 0.13);
    border-radius: 6px;
    background: rgba(34, 211, 238, 0.025);
}

.fleet-dock-form.is-join {
    border-color: rgba(52, 211, 153, 0.14);
    background: rgba(52, 211, 153, 0.025);
}

.fleet-dock-form label {
    display: block;
    margin-bottom: 8px;
    color: #d7e7f3;
    font-size: 11px;
    font-weight: 900;
}

.fleet-dock-form > input {
    margin-bottom: 7px;
}

.fleet-dock-form > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
}

.fleet-dock-form input {
    width: 100%;
    min-width: 0;
    height: 40px;
    padding: 0 10px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 6px;
    outline: none;
    color: #f8fafc;
    background: #050b16;
    font-size: 11px;
}

.fleet-dock-form input:focus {
    border-color: rgba(34, 211, 238, 0.5);
}

.fleet-dock-form button {
    display: inline-flex;
    min-width: 78px;
    height: 40px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 12px;
    border: 1px solid rgba(34, 211, 238, 0.25);
    border-radius: 6px;
    color: #cffafe;
    background: rgba(34, 211, 238, 0.09);
    font-size: 10px;
    font-weight: 900;
}

.fleet-dock-form button svg {
    width: 15px;
    height: 15px;
}

@media (max-width: 720px) {
    .fleet-page-shell {
        padding: 10px 8px 24px;
    }

    .fleet-command-panel {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
        padding: 14px 10px 10px;
    }

    .fleet-command-panel blockquote {
        grid-column: 1 / -1;
        padding: 7px 10px;
        font-size: 10px;
    }

    .fleet-command-identity h1 {
        font-size: 17px;
    }

    .fleet-command-settings {
        position: static;
        grid-column: 1 / -1;
        justify-content: flex-end;
        order: 5;
    }

    .fleet-command-actions {
        gap: 4px;
    }

    .fleet-command-actions button {
        min-height: 46px;
        flex-direction: column;
        gap: 3px;
        padding: 5px 2px;
        font-size: 9px;
    }

    .fleet-command-actions button svg {
        width: 16px;
        height: 16px;
    }

    .fleet-command-actions b {
        position: absolute;
        inset: 2px 2px auto auto;
    }

    .fleet-raya-callout {
        grid-template-columns: 40px minmax(0, 1fr) 24px;
        padding: 9px 10px;
    }

    .fleet-raya-copy p {
        white-space: normal;
    }

    .fleet-raya-open b,
    .fleet-raya-open small {
        display: none;
    }

    .fleet-progression-panel header,
    .fleet-progression-panel footer,
    .fleet-boss-panel footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .fleet-boss-panel header {
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .fleet-boss-panel header > strong {
        grid-column: 2;
    }

    .fleet-crew-panel,
    .fleet-ranking-panel,
    .fleet-dock-panel {
        padding: 10px 8px;
    }

    .fleet-member-row {
        grid-template-columns: 36px minmax(0, 1fr) auto;
        gap: 7px;
        padding: 8px;
    }

    .fleet-member-state {
        grid-column: 2;
        grid-row: 2;
    }

    .fleet-member-xp {
        grid-column: 3;
        grid-row: 1;
    }

    .fleet-row-actions,
    .fleet-row-actions-placeholder {
        grid-column: 3;
        grid-row: 2;
    }

    .fleet-member-xp strong {
        font-size: 10px;
    }

    .fleet-member-xp span {
        display: none;
    }

    .fleet-ranking-head {
        display: none;
    }

    .fleet-ranking-row {
        grid-template-columns: 38px minmax(0, 1fr) auto 16px;
        min-height: 54px;
        gap: 6px;
        padding: 7px 8px;
    }

    .fleet-ranking-crew,
    .fleet-ranking-hunts {
        display: none;
    }

    .fleet-ranking-xp {
        font-size: 9px;
    }

    .fleet-dock-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fleet-profile-loading-icon svg {
        animation: none;
    }
}

/* Fleet communications: lightweight, separate operational/story/chat surfaces */
[data-fleet-announcements-badge][hidden],
[data-fleet-chat-badge][hidden],
[data-fleet-story-badge][hidden] {
    display: none !important;
}

.fleet-profile-dialog {
    border-color: rgba(103, 232, 249, 0.22);
    background: #070b14;
}

.fleet-profile-header {
    background: #080e19;
}

.fleet-profile-tabs {
    display: grid;
    grid-auto-columns: minmax(76px, 1fr);
    grid-auto-flow: column;
    background: #060a12;
}

.fleet-profile-tab {
    min-width: 0;
}

.fleet-guide-profile {
    width: 100%;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-align: start;
}

.fleet-guide-profile:disabled {
    cursor: default;
}

.fleet-guide-profile > div {
    min-width: 0;
}

.fleet-guide-profile > svg {
    width: 16px;
    height: 16px;
    margin-inline-start: auto;
    color: #5eead4;
}

.fleet-messages-layout {
    display: grid;
    min-height: 100%;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 10px;
}

.fleet-raya-person,
.fleet-raya-inbox,
.fleet-chat-panel {
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 8px;
    background: #0a0f1a;
}

.fleet-raya-person {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    padding: 22px 16px;
    border-color: rgba(45, 212, 191, 0.22);
    background: #071518;
    text-align: center;
}

.fleet-raya-portrait,
.fleet-raya-intro-avatar {
    position: relative;
    display: inline-flex;
    width: 64px;
    height: 64px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(94, 234, 212, 0.38);
    border-radius: 8px;
    color: #99f6e4;
    background: #0a2728;
    box-shadow: 0 0 24px rgba(45, 212, 191, 0.08);
}

.fleet-raya-portrait svg,
.fleet-raya-intro-avatar svg {
    width: 27px;
    height: 27px;
}

.fleet-raya-portrait b,
.fleet-raya-intro-avatar b {
    position: absolute;
    inset: auto auto -4px -4px;
    width: 11px;
    height: 11px;
    border: 2px solid #071518;
    border-radius: 50%;
    background: #34d399;
}

.fleet-raya-person > div {
    min-width: 0;
}

.fleet-raya-person small {
    display: block;
    margin-top: 13px;
    color: #669b98;
    font-size: 10px;
    font-weight: 800;
}

.fleet-raya-person h3 {
    margin-top: 3px;
    color: #d8fffa;
    font-size: 18px;
}

.fleet-raya-person p {
    margin-top: 10px;
    color: #8ba3aa;
    font-size: 11px;
    line-height: 1.9;
}

.fleet-sound-toggle {
    display: inline-flex;
    width: 100%;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: auto;
    padding: 7px 10px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 6px;
    color: #8fa0b5;
    background: #0b111e;
    font-size: 10px;
    font-weight: 800;
}

.fleet-sound-toggle.is-on {
    border-color: rgba(52, 211, 153, 0.28);
    color: #a7f3d0;
    background: #091b18;
}

.fleet-sound-toggle svg {
    width: 15px;
    height: 15px;
}

.fleet-raya-inbox {
    min-width: 0;
    padding: 14px;
}

.fleet-raya-messages .fleet-section-heading {
    min-height: 42px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.fleet-raya-messages .fleet-section-heading button {
    min-height: 32px;
    padding: 5px 9px;
    border: 1px solid rgba(34, 211, 238, 0.18);
    border-radius: 6px;
    color: #a5f3fc;
    background: #091924;
}

.fleet-raya-messages .fleet-section-heading > b {
    color: #6ee7b7;
    background: #0a1b18;
}

.fleet-announcement-list {
    gap: 6px;
}

.fleet-announcement-item {
    position: relative;
    display: grid;
    width: 100%;
    grid-template-columns: 36px minmax(0, 1fr) 18px;
    align-items: start;
    gap: 9px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 6px;
    color: inherit;
    background: #090e18;
    cursor: pointer;
    font: inherit;
    text-align: start;
}

.fleet-announcement-item:last-child {
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.fleet-announcement-item.is-unread {
    border-color: rgba(251, 191, 36, 0.25);
    border-inline-start: 3px solid #fbbf24;
    background: #14130e;
}

.fleet-announcement-item.is-pending {
    opacity: 0.62;
    pointer-events: none;
}

.fleet-announcement-icon {
    display: inline-flex;
    width: 34px !important;
    height: 34px !important;
    align-items: center;
    justify-content: center;
    border-radius: 6px !important;
    color: #67e8f9;
    background: #09202b !important;
}

.fleet-announcement-copy {
    display: block !important;
    width: auto !important;
    height: auto !important;
    min-width: 0;
    border-radius: 0 !important;
    color: inherit !important;
    background: transparent !important;
}

.fleet-announcement-copy > span {
    display: flex;
    align-items: center;
    gap: 7px;
}

.fleet-announcement-copy > span b {
    padding: 2px 5px;
    border-radius: 4px;
    color: #fde68a;
    background: #31240b;
    font-size: 8px;
}

.fleet-announcement-copy strong {
    color: #e7eef8;
    font-size: 11px;
}

.fleet-announcement-copy p {
    margin-top: 4px;
    color: #98a7bb;
    font-size: 10px;
    line-height: 1.8;
}

.fleet-announcement-copy time {
    margin-top: 5px;
    color: #5d6c81;
    font-size: 8px;
}

.fleet-announcement-check {
    width: 15px !important;
    height: 15px !important;
    margin-top: 9px;
    color: #556277;
}

.fleet-announcement-item.is-read .fleet-announcement-check {
    color: #34d399;
}

.fleet-comms-empty {
    display: flex;
    min-height: 220px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    color: #65758b;
    text-align: center;
}

.fleet-comms-empty svg {
    width: 24px;
    height: 24px;
    color: #5eead4;
}

.fleet-comms-empty strong {
    color: #bdc9d8;
    font-size: 12px;
}

.fleet-comms-empty p {
    font-size: 10px;
}

.fleet-chat-panel {
    display: grid;
    height: 100%;
    min-height: 0;
    grid-template-rows: auto minmax(180px, 1fr) auto;
    overflow: hidden;
}

.fleet-chat-head {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    background: #09111c;
}

.fleet-chat-head > span {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(167, 139, 250, 0.26);
    border-radius: 7px;
    color: #c4b5fd;
    background: #171329;
}

.fleet-chat-head svg {
    width: 18px;
    height: 18px;
}

.fleet-chat-head h3 {
    color: #f0edff;
    font-size: 13px;
}

.fleet-chat-head p {
    margin-top: 3px;
    color: #7d8b9e;
    font-size: 9px;
}

.fleet-chat-head > b {
    color: #a5b4fc;
    font-size: 9px;
}

.fleet-chat-stream {
    min-height: 0;
    overflow-y: auto;
    padding: 12px;
    background: #070b13;
    overscroll-behavior: contain;
}

.fleet-chat-message {
    width: min(76%, 560px);
    margin: 0 0 8px auto;
    padding: 8px 10px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 7px 7px 2px 7px;
    background: #0d1420;
}

.fleet-chat-message.is-me {
    margin-right: auto;
    margin-left: 0;
    border-color: rgba(34, 211, 238, 0.2);
    border-radius: 7px 7px 7px 2px;
    background: #09202b;
}

.fleet-chat-message.is-pending {
    opacity: 0.62;
}

.fleet-chat-message > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.fleet-chat-message strong {
    overflow: hidden;
    color: #dce5f0;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fleet-chat-message time {
    flex: 0 0 auto;
    color: #536276;
    font-size: 7px;
}

.fleet-chat-message p {
    margin-top: 5px;
    color: #c3cfdd;
    font-size: 11px;
    line-height: 1.85;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.fleet-chat-composer {
    padding: 10px 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.11);
    background: #090e18;
}

.fleet-chat-composer textarea {
    width: 100%;
    min-height: 54px;
    max-height: 110px;
    resize: vertical;
    padding: 9px 10px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 6px;
    outline: none;
    color: #edf4fc;
    background: #050912;
    font: inherit;
    font-size: 11px;
    line-height: 1.7;
}

.fleet-chat-composer textarea:focus {
    border-color: rgba(34, 211, 238, 0.45);
}

.fleet-chat-composer > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 7px;
}

.fleet-chat-composer small {
    color: #59687b;
    font-size: 8px;
}

.fleet-chat-composer button {
    display: inline-flex;
    min-width: 88px;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 6px 12px;
    border: 1px solid #22d3ee;
    border-radius: 6px;
    color: #031017;
    background: #22d3ee;
    font-size: 10px;
    font-weight: 900;
}

.fleet-chat-composer button:disabled {
    opacity: 0.55;
}

.fleet-chat-composer button svg {
    width: 15px;
    height: 15px;
}

.fleet-story-next-release {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    color: #7dd3fc;
    font-size: 9px;
}

.fleet-story-next-release svg {
    width: 14px;
    height: 14px;
}

.fleet-raya-intro-overlay {
    position: fixed;
    z-index: 1300;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 14px;
    background: rgba(1, 5, 12, 0.9);
}

.fleet-raya-intro-overlay.is-open {
    display: flex;
}

.fleet-raya-intro {
    position: relative;
    width: min(100%, 440px);
    padding: 22px;
    border: 1px solid rgba(94, 234, 212, 0.3);
    border-radius: 8px;
    color: #e7eef8;
    background: #081218;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
    direction: rtl;
}

.fleet-raya-intro-close {
    position: absolute;
    inset: 12px auto auto 12px;
}

.fleet-raya-intro-avatar {
    width: 56px;
    height: 56px;
}

.fleet-raya-intro-heading {
    margin-top: 14px;
}

.fleet-raya-intro-heading small {
    color: #5eead4;
    font-size: 9px;
    font-weight: 800;
}

.fleet-raya-intro-heading h2 {
    margin-top: 3px;
    color: #e1fffb;
    font-size: 19px;
}

.fleet-raya-intro-heading p {
    margin-top: 6px;
    color: #9cabb9;
    font-size: 11px;
    line-height: 1.8;
}

.fleet-raya-intro-points {
    display: grid;
    gap: 7px;
    margin-top: 16px;
}

.fleet-raya-intro-points > div {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 9px;
    padding: 9px;
    border: 1px solid rgba(148, 163, 184, 0.11);
    border-radius: 6px;
    background: #0a111c;
}

.fleet-raya-intro-points > div > svg {
    width: 17px;
    height: 17px;
    margin: 5px auto 0;
    color: #67e8f9;
}

.fleet-raya-intro-points strong,
.fleet-raya-intro-points span {
    display: block;
}

.fleet-raya-intro-points strong {
    color: #e5edf6;
    font-size: 10px;
}

.fleet-raya-intro-points span {
    margin-top: 3px;
    color: #8190a2;
    font-size: 9px;
    line-height: 1.7;
}

.fleet-raya-intro-note {
    margin-top: 12px;
    color: #6ee7b7;
    font-size: 9px;
    line-height: 1.8;
}

.fleet-raya-intro-action {
    display: flex;
    width: 100%;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    border: 1px solid #2dd4bf;
    border-radius: 6px;
    color: #031413;
    background: #2dd4bf;
    font-size: 11px;
    font-weight: 900;
}

.fleet-raya-intro-action svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 720px) {
    .fleet-page-shell {
        overflow-x: clip;
    }

    .fleet-profile-tabs {
        grid-auto-columns: minmax(66px, 1fr);
        padding: 0 4px;
    }

    .fleet-profile-tab {
        min-width: 66px;
        gap: 3px;
        font-size: 9px;
    }

    .fleet-profile-tab svg {
        width: 14px;
        height: 14px;
    }

    .fleet-messages-layout {
        display: block;
    }

    .fleet-raya-person {
        display: grid;
        grid-template-columns: 48px minmax(0, 1fr) auto;
        gap: 10px;
        margin-bottom: 7px;
        padding: 10px;
        text-align: start;
    }

    .fleet-raya-portrait {
        width: 46px;
        height: 46px;
    }

    .fleet-raya-portrait svg {
        width: 20px;
        height: 20px;
    }

    .fleet-raya-person small {
        margin-top: 0;
    }

    .fleet-raya-person h3 {
        font-size: 14px;
    }

    .fleet-raya-person p {
        margin-top: 4px;
        font-size: 9px;
        line-height: 1.7;
    }

    .fleet-sound-toggle {
        width: 38px;
        height: 38px;
        min-height: 38px;
        margin-top: 0;
        padding: 0;
    }

    .fleet-sound-toggle span {
        display: none;
    }

    .fleet-raya-inbox {
        padding: 8px;
    }

    .fleet-announcement-item {
        grid-template-columns: 32px minmax(0, 1fr) 15px;
        gap: 7px;
        padding: 8px;
    }

    .fleet-announcement-icon {
        width: 30px !important;
        height: 30px !important;
    }

    .fleet-chat-head {
        grid-template-columns: 36px minmax(0, 1fr);
        padding: 9px;
    }

    .fleet-chat-head > b {
        display: none;
    }

    .fleet-chat-head p {
        line-height: 1.6;
    }

    .fleet-chat-stream {
        padding: 8px;
    }

    .fleet-chat-message {
        width: 88%;
    }

    .fleet-chat-composer {
        padding: 8px;
    }

    .fleet-raya-intro {
        max-height: calc(100dvh - 20px);
        overflow-y: auto;
        padding: 17px;
    }
}

@media (max-width: 420px) {
    .fleet-command-identity h1 {
        max-width: 150px;
    }

    .fleet-command-actions {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .fleet-member-row {
        min-height: 66px;
    }

    .fleet-member-state {
        min-width: 0;
    }

    .fleet-presence {
        font-size: 8px;
    }

    .fleet-ranking-row {
        grid-template-columns: 34px minmax(0, 1fr) 72px 14px;
    }

    .fleet-profile-content {
        padding: 7px;
    }
}

/* Captain logbook: dated, categorized and fully local */
.captain-logbook-panel {
    color-scheme: dark;
}

.captain-logbook-form {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
}

.captain-logbook-form > input,
.captain-logbook-form select {
    width: 100%;
    min-width: 0;
    height: 40px;
    padding: 0 10px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 7px;
    outline: none;
    color: #eef6ff;
    background: #080d17;
    font-size: 11px;
}

.captain-logbook-form > input:focus,
.captain-logbook-form select:focus {
    border-color: rgba(34, 211, 238, 0.55);
}

.captain-logbook-form > div {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr) 40px;
    align-items: end;
    gap: 7px;
}

.captain-logbook-form label > span {
    display: block;
    margin: 0 2px 5px;
    color: #71839a;
    font-size: 9px;
    font-weight: 800;
}

.jalali-date-picker {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 0.82fr);
    gap: 4px;
    direction: rtl;
}

.jalali-date-picker select {
    padding-inline: 6px;
    font-size: 10px;
}

.jalali-date-picker select:disabled {
    cursor: not-allowed;
    color: #536277;
    opacity: 0.72;
}

.captain-logbook-form button {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(34, 211, 238, 0.42);
    border-radius: 7px;
    color: #dffbff;
    background: rgba(8, 145, 178, 0.18);
}

.captain-logbook-form button svg {
    width: 17px;
    height: 17px;
}

.captain-logbook-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.captain-logbook-list-head strong {
    color: #dce8f5;
    font-size: 11px;
}

.captain-logbook-list-head span {
    color: #708197;
    font-size: 9px;
}

.captain-logbook-list {
    display: grid;
    gap: 7px;
}

.captain-logbook-task {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 7px;
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.025);
}

.captain-logbook-task.is-overdue {
    border-inline-start: 2px solid #fb7185;
}

.captain-logbook-check,
.captain-logbook-delete {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 6px;
    color: #64748b;
}

.captain-logbook-check svg,
.captain-logbook-delete svg {
    width: 14px;
    height: 14px;
}

.task-completed .captain-logbook-check {
    border-color: #34d399;
    color: #031711;
    background: #34d399;
}

.captain-logbook-delete:hover,
.captain-logbook-delete:focus-visible {
    border-color: rgba(251, 113, 133, 0.4);
    color: #fda4af;
}

.captain-logbook-copy {
    min-width: 0;
    text-align: start;
}

.captain-logbook-copy strong {
    display: block;
    overflow: hidden;
    color: #dce7f4;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-completed .captain-logbook-copy strong {
    color: #66768a;
    text-decoration: line-through;
}

.captain-logbook-copy > span {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

.captain-logbook-copy b,
.captain-logbook-copy time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 5px;
    border-radius: 4px;
    color: #8ca0b7;
    background: rgba(148, 163, 184, 0.07);
    font-size: 8px;
    font-weight: 800;
}

.captain-logbook-copy time.is-today {
    color: #fde68a;
    background: rgba(251, 191, 36, 0.09);
}

.captain-logbook-copy time.is-overdue {
    color: #fda4af;
    background: rgba(244, 63, 94, 0.09);
}

.captain-logbook-copy svg {
    width: 10px;
    height: 10px;
}

.captain-logbook-empty {
    display: flex;
    min-height: 92px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px dashed rgba(148, 163, 184, 0.14);
    border-radius: 7px;
    color: #64748b;
    font-size: 10px;
}

.captain-logbook-empty svg {
    width: 18px;
    height: 18px;
}

/* Fleet home: crew first, clear navigation, no continuous decorative animation */
.fleet-command-panel-compact {
    grid-template-columns: minmax(220px, 1.15fr) minmax(180px, 0.85fr) auto;
}

.fleet-return-timer {
    display: inline-flex;
    min-width: 152px;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 7px 12px;
    border: 1px solid rgba(34, 211, 238, 0.46);
    border-radius: 7px;
    color: #cffafe;
    background: rgba(8, 145, 178, 0.13);
    transition: border-color 150ms ease, background-color 150ms ease;
}

.fleet-return-timer:hover,
.fleet-return-timer:focus-visible {
    border-color: #67e8f9;
    background: rgba(8, 145, 178, 0.22);
}

.fleet-return-timer > svg {
    width: 19px;
    height: 19px;
}

.fleet-return-timer span,
.fleet-return-timer strong,
.fleet-return-timer small {
    display: block;
}

.fleet-return-timer strong {
    font-size: 11px;
}

.fleet-return-timer small {
    margin-top: 2px;
    color: #79a8b4;
    font-size: 8px;
}

.fleet-crew-totals {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    margin-inline-start: auto;
}

.fleet-crew-totals b {
    display: inline-flex;
    min-height: 27px;
    align-items: center;
    gap: 5px;
    padding: 4px 7px;
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: 5px;
    color: #a9b9ca;
    background: rgba(148, 163, 184, 0.04);
    font-size: 9px;
}

.fleet-crew-totals svg {
    width: 12px;
    height: 12px;
    color: #67e8f9;
}

.fleet-member-row {
    grid-template-columns: 40px minmax(130px, 1.35fr) minmax(100px, 0.7fr) minmax(128px, 0.85fr) minmax(92px, 0.55fr) 70px;
}

.fleet-member-study strong,
.fleet-member-study span {
    display: block;
}

.fleet-member-study strong {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #bfdbfe;
    font-size: 10px;
}

.fleet-member-study strong svg {
    width: 12px;
    height: 12px;
    color: #60a5fa;
}

.fleet-member-study span {
    margin-top: 3px;
    color: #66788f;
    font-size: 8px;
}

.fleet-navigation-panel {
    margin-top: 10px;
    padding: 14px;
    border: 1px solid rgba(167, 139, 250, 0.18);
    border-radius: 8px;
    background: rgba(9, 8, 23, 0.9);
}

.fleet-navigation-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
}

.fleet-navigation-actions > button {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 58px;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 7px;
    color: #bdcadd;
    background: rgba(255, 255, 255, 0.025);
    text-align: start;
}

.fleet-navigation-actions > button:hover,
.fleet-navigation-actions > button:focus-visible {
    border-color: rgba(34, 211, 238, 0.42);
    background: rgba(34, 211, 238, 0.06);
}

.fleet-navigation-actions > button > svg {
    width: 20px;
    height: 20px;
    color: #67e8f9;
}

.fleet-navigation-actions > button > span,
.fleet-navigation-actions strong,
.fleet-navigation-actions small {
    display: block;
    min-width: 0;
}

.fleet-navigation-actions strong {
    color: #edf6ff;
    font-size: 11px;
}

.fleet-navigation-actions small {
    overflow: hidden;
    margin-top: 3px;
    color: #6e8096;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fleet-navigation-actions > button > b {
    position: absolute;
    inset: 4px auto auto 4px;
    display: inline-flex;
    min-width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border-radius: 9px;
    color: #080c16;
    background: #fbbf24;
    font-size: 8px;
}

.fleet-story-nav.has-unread,
.fleet-profile-tab.has-unread {
    border-color: rgba(251, 191, 36, 0.58);
    color: #fef3c7;
    background: rgba(251, 191, 36, 0.08);
    box-shadow: inset 3px 0 0 #fbbf24;
}

.fleet-story-nav.has-unread > svg {
    color: #fbbf24;
}

.fleet-story-nav.has-unread small {
    color: #fde68a;
}

.fleet-navigation-settings {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 9px;
    padding-top: 9px;
    border-top: 1px solid rgba(148, 163, 184, 0.09);
}

.fleet-navigation-settings button {
    display: inline-flex;
    min-height: 31px;
    align-items: center;
    gap: 5px;
    padding: 5px 9px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 6px;
    color: #8394a9;
    background: rgba(255, 255, 255, 0.02);
    font-size: 9px;
}

.fleet-navigation-settings button:hover,
.fleet-navigation-settings button:focus-visible {
    color: #dbeafe;
    border-color: rgba(148, 163, 184, 0.3);
}

.fleet-navigation-settings button.is-danger {
    margin-inline-start: auto;
    color: #fda4af;
}

.fleet-navigation-settings svg {
    width: 13px;
    height: 13px;
}

.fleet-operations-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.fleet-operations-grid > .fleet-progression-panel,
.fleet-operations-grid > .fleet-boss-panel {
    height: 100%;
    margin-top: 0;
}

.fleet-rankings-disclosure {
    margin-top: 10px;
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: 8px;
    background: rgba(4, 9, 20, 0.82);
}

.fleet-rankings-disclosure > summary {
    display: grid;
    min-height: 58px;
    grid-template-columns: 34px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 9px;
    padding: 10px 13px;
    color: #d7e3ef;
    cursor: pointer;
    list-style: none;
}

.fleet-rankings-disclosure > summary::-webkit-details-marker {
    display: none;
}

.fleet-rankings-disclosure > summary > span {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: #fde68a;
    background: rgba(251, 191, 36, 0.08);
}

.fleet-rankings-disclosure > summary svg {
    width: 16px;
    height: 16px;
}

.fleet-rankings-disclosure > summary strong,
.fleet-rankings-disclosure > summary small {
    display: block;
}

.fleet-rankings-disclosure > summary strong {
    font-size: 11px;
}

.fleet-rankings-disclosure > summary small {
    margin-top: 3px;
    color: #687b91;
    font-size: 8px;
}

.fleet-rankings-disclosure[open] > summary > svg {
    transform: rotate(180deg);
}

.fleet-rankings-disclosure .fleet-ranking-panel {
    margin: 0;
    border: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.09);
    border-radius: 0;
    box-shadow: none;
}

.fleet-raya-intro {
    width: min(100%, 580px);
    max-height: calc(100dvh - 28px);
    overflow-y: auto;
}

.fleet-raya-intro-points {
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 720px) {
    .captain-logbook-form > div {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) 40px;
    }

    .fleet-command-panel-compact {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .fleet-command-title-row {
        flex-wrap: wrap;
        gap: 3px 7px;
    }

    .fleet-command-inline-xp {
        padding: 1px 5px;
        font-size: 9px;
    }

    .fleet-command-panel-compact .fleet-return-timer {
        grid-column: 1 / -1;
        width: 100%;
    }

    .fleet-crew-panel .fleet-section-title {
        flex-wrap: wrap;
    }

    .fleet-crew-totals {
        width: 100%;
        justify-content: flex-start;
        margin-inline-start: 0;
    }

    .fleet-member-row {
        min-height: 84px;
        grid-template-columns: 36px minmax(0, 1fr) auto;
    }

    .fleet-member-name {
        grid-column: 2;
        grid-row: 1;
    }

    .fleet-member-state {
        grid-column: 2;
        grid-row: 2;
    }

    .fleet-member-study {
        grid-column: 2;
        grid-row: 3;
    }

    .fleet-member-study span {
        display: none;
    }

    .fleet-member-xp {
        grid-column: 3;
        grid-row: 1;
    }

    .fleet-row-actions,
    .fleet-row-actions-placeholder {
        grid-column: 3;
        grid-row: 2 / span 2;
    }

    .fleet-navigation-panel {
        padding: 10px 8px;
    }

    .fleet-navigation-actions {
        grid-template-columns: 1fr 1fr;
    }

    .fleet-navigation-settings button.is-danger {
        margin-inline-start: 0;
    }

    .fleet-operations-grid {
        grid-template-columns: 1fr;
    }

    .fleet-raya-intro-points {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 390px) {
    .captain-logbook-form > div {
        grid-template-columns: 1fr 40px;
    }

    .captain-logbook-form label:first-child {
        grid-column: 1;
    }

    .captain-logbook-form label:nth-child(2) {
        grid-column: 1;
    }

    .captain-logbook-form button {
        grid-column: 2;
        grid-row: 1 / span 2;
        align-self: end;
    }
}
