:root {
    --bg-1: #0b1622;
    --bg-2: #0f2531;
    --bg-3: #1a2e26;
    --accent: #ffb347;
    --accent-2: #4ad4c8;
    --text: #f4f7fb;
    --muted: #9db3c7;
    --card: rgba(12, 20, 30, 0.82);
    --stroke: rgba(255, 255, 255, 0.08);
    --glow: rgba(74, 212, 200, 0.2);
    --backpage-panel-bg: rgba(5, 10, 16, 0.72);
    --backpage-card-bg: rgba(3, 8, 13, 0.58);
    --backpage-card-bg-strong: rgba(3, 8, 13, 0.82);
    --backpage-panel-border: rgba(255, 255, 255, 0.07);
    --backpage-card-border: rgba(255, 255, 255, 0.06);
    --backpage-panel-shadow: 0 20px 44px rgba(0, 0, 0, 0.46);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
    color: var(--text);
    background:
        linear-gradient(rgba(4, 9, 14, 0.58), rgba(4, 9, 14, 0.72)),
        url('../assets/backpage/background.avif') center center / cover fixed no-repeat;
    position: relative;
    overflow-x: hidden;
}

body::before,
body::after {
    content: none;
}

body.modal-open {
    overflow: hidden;
}

.start-shell {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 36px;
    padding: 40px 6vw 70px;
}

.start-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 42px;
    gap: 24px;
    margin-top: -18px;
}

.status-chip {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--stroke);
    background: rgba(15, 28, 42, 0.8);
    color: var(--accent-2);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    justify-self: end;
}

.start-logout {
    position: fixed;
    top: 18px;
    right: 22px;
    z-index: 20;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 107, 107, 0.5);
    background: linear-gradient(120deg, rgba(255, 107, 107, 0.9), rgba(238, 90, 82, 0.92));
    color: #0b1a24;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(255, 107, 107, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.start-logout:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(255, 107, 107, 0.35);
}

.start-logout:disabled {
    cursor: wait;
    opacity: 0.75;
    transform: none;
    box-shadow: none;
}

.start-premium-badge {
    position: fixed;
    top: 58px;
    right: 22px;
    z-index: 20;
    min-width: 82px;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 212, 96, 0.65);
    background: linear-gradient(120deg, rgba(255, 220, 120, 0.96), rgba(247, 171, 61, 0.94));
    color: #1c1304;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    box-shadow: 0 8px 18px rgba(247, 171, 61, 0.24);
}

.start-premium-badge[hidden] {
    display: none;
}

.start-status-bar {
    justify-self: center;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px 8px 10px;
    border-radius: 999px;
    border: 1px solid var(--stroke);
    background: rgba(12, 20, 30, 0.78);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
    font-size: 12px;
    color: var(--text);
    max-width: min(960px, 92vw);
    flex-wrap: nowrap;
    box-sizing: border-box;
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
}

.start-status-items {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 14px;
}

.start-status-item {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.start-status-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--muted);
}

.start-status-value {
    font-weight: 600;
    color: var(--text);
}

.start-nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.start-launch-bar {
    justify-self: center;
    display: grid;
    justify-items: center;
    gap: 8px;
    width: min(100%, 92vw);
}

.start-launch-bar .start-button {
    min-width: 180px;
}

.start-launch-bar .start-message {
    max-width: min(420px, 92vw);
    text-align: center;
}

.start-tab {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    background: rgba(10, 18, 28, 0.8);
    color: var(--muted);
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.start-tab:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.2);
}

.start-tab.is-active {
    color: #0b1a24;
    border-color: rgba(74, 212, 200, 0.6);
    background: linear-gradient(120deg, rgba(74, 212, 200, 0.9), rgba(124, 230, 214, 0.95));
    box-shadow: 0 10px 22px rgba(74, 212, 200, 0.28);
}

.start-main {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
    align-items: stretch;
}

.tab-subnav {
    display: none;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.tab-subnav.is-active {
    display: flex;
}

.tab-panel {
    display: none;
}

.tab-panel.is-active {
    display: block;
}

.start-panel,
.start-card {
    border: 1px solid var(--stroke);
    border-radius: 22px;
    background: var(--card);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(14px);
    animation: riseIn 0.8s ease-out both;
}

.start-panel {
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 30px;
    background: linear-gradient(155deg, rgba(18, 34, 45, 0.92), rgba(15, 24, 33, 0.9));
}

.panel-top h1 {
    margin: 0 0 12px;
    font-size: clamp(28px, 3vw, 38px);
    letter-spacing: 0.02em;
}

.panel-lead {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.5;
}

.panel-actions {
    display: grid;
    gap: 12px;
}

.start-button {
    border: none;
    border-radius: 14px;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #0b1a24;
    background: linear-gradient(120deg, var(--accent), #ffd27b);
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(255, 179, 71, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.start-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(255, 179, 71, 0.45);
}

.start-button:disabled {
    cursor: wait;
    opacity: 0.8;
    transform: none;
    box-shadow: none;
}

.start-message {
    min-height: 18px;
    font-size: 12px;
    color: var(--muted);
}

.start-message.is-error {
    color: #ff8f6d;
}

.hall-of-fame-panel {
    min-height: 0;
    justify-content: flex-start;
}

.start-main > .start-panel,
.start-main > .start-card {
    min-width: 0;
    width: 100%;
}

.hall-of-fame-top {
    display: grid;
    gap: 16px;
}

.hall-of-fame-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hall-of-fame-tab {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    background: rgba(10, 18, 28, 0.8);
    color: var(--muted);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.hall-of-fame-tab:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.2);
}

.hall-of-fame-tab.is-active,
.hall-of-fame-tab[aria-selected="true"] {
    color: #0b1a24;
    border-color: rgba(74, 212, 200, 0.6);
    background: linear-gradient(120deg, rgba(74, 212, 200, 0.9), rgba(124, 230, 214, 0.95));
    box-shadow: 0 10px 22px rgba(74, 212, 200, 0.28);
}

.hall-of-fame-table {
    min-height: 220px;
    max-height: min(46vh, 520px);
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    background: rgba(10, 17, 24, 0.58);
}

.hall-of-fame-grid {
    display: grid;
    min-width: 0;
}

.hall-of-fame-row {
    display: grid;
    grid-template-columns: minmax(34px, 0.35fr) minmax(0, 1.7fr) minmax(54px, 0.55fr) minmax(92px, 0.9fr);
    gap: 10px;
    align-items: center;
    min-width: 0;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text);
    font-size: 13px;
}

.hall-of-fame-row:last-child {
    border-bottom: none;
}

.hall-of-fame-row--head {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(10, 17, 24, 0.96);
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.hall-of-fame-rank,
.hall-of-fame-level,
.hall-of-fame-value {
    font-weight: 700;
    white-space: nowrap;
}

.hall-of-fame-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hall-of-fame-value {
    justify-self: end;
    color: var(--accent-2);
}

.hall-of-fame-empty {
    padding: 24px 16px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.hall-of-fame-message {
    min-height: 18px;
    color: var(--muted);
    font-size: 12px;
}

.hall-of-fame-message.is-error {
    color: #ff8f6d;
}

.start-card {
    padding: 32px;
    animation-delay: 0.1s;
}

.card-header h2 {
    margin: 0 0 12px;
    font-size: clamp(28px, 3vw, 38px);
    letter-spacing: 0.02em;
}

.card-header p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.card-grid {
    margin-top: 24px;
    display: grid;
    gap: 18px;
}

.card-item {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(10, 17, 24, 0.65);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
    animation: fadeUp 0.6s ease-out both;
    animation-delay: var(--delay, 0ms);
}

[data-panel="profile"] .start-panel,
[data-panel="profile"] .start-card {
    border-color: var(--backpage-panel-border);
    background: var(--backpage-panel-bg);
    box-shadow: var(--backpage-panel-shadow);
}

[data-panel="profile"] .card-item,
[data-panel="profile"] .hall-of-fame-table {
    border-color: var(--backpage-card-border);
    background: var(--backpage-card-bg);
}

[data-panel="profile"] .hall-of-fame-row--head {
    background: var(--backpage-card-bg-strong);
}

.profile-display-card {
    align-content: start;
}

.profile-display-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
}

.profile-display-row .card-value {
    min-width: 0;
    overflow-wrap: anywhere;
}

.profile-edit-button {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(10, 18, 28, 0.8);
    color: var(--accent-2);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.profile-edit-button:hover {
    color: var(--text);
    border-color: rgba(74, 212, 200, 0.45);
    background: rgba(74, 212, 200, 0.12);
    transform: translateY(-1px);
}

.profile-inline-editor {
    display: grid;
    gap: 8px;
    margin-top: 6px;
}

.profile-inline-editor.is-hidden {
    display: none;
}

.profile-inline-save,
.profile-inline-cancel {
    min-height: 38px;
    border: none;
    border-radius: 10px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.profile-inline-save {
    color: #0b1a24;
    background: linear-gradient(120deg, var(--accent), #ffd27b);
    box-shadow: 0 8px 16px rgba(255, 179, 71, 0.25);
}

.profile-inline-cancel {
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 28, 42, 0.8);
}

.profile-inline-save:disabled,
.profile-inline-cancel:disabled,
.profile-edit-button:disabled {
    cursor: wait;
    opacity: 0.75;
    transform: none;
}

.profile-editor {
    margin-top: 22px;
    display: grid;
    gap: 10px;
    padding: 18px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(10, 17, 24, 0.58);
}

.profile-editor-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--muted);
}

.profile-editor-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: center;
}

.profile-editor-input {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(6, 12, 18, 0.82);
    color: var(--text);
    font: inherit;
}

.profile-editor-input:focus {
    outline: none;
    border-color: rgba(74, 212, 200, 0.65);
    box-shadow: 0 0 0 3px rgba(74, 212, 200, 0.12);
}

.profile-editor-button {
    min-width: 140px;
}

.profile-editor-hint {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.profile-editor-feedback {
    min-height: 18px;
    font-size: 12px;
    color: var(--muted);
}

.profile-editor-feedback.is-error {
    color: #ff8f6d;
}

.shop-shell {
    border: 1px solid var(--stroke);
    border-radius: 24px;
    background: rgba(9, 16, 24, 0.78);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(14px);
    padding: 28px 30px 32px;
}

.shop-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    margin-bottom: 24px;
}

.shop-title h2 {
    margin: 0 0 6px;
    font-size: 22px;
}

.shop-title p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.shop-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.shop-chip {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    background: rgba(10, 18, 28, 0.8);
    color: var(--muted);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.shop-chip:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.2);
}

.shop-chip.is-active {
    color: #0b1a24;
    border-color: rgba(74, 212, 200, 0.6);
    background: linear-gradient(120deg, rgba(74, 212, 200, 0.9), rgba(124, 230, 214, 0.95));
    box-shadow: 0 10px 22px rgba(74, 212, 200, 0.28);
}

.shop-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(220px, 0.9fr);
    gap: 24px;
    align-items: start;
}

.hangar-shell .shop-layout {
    grid-template-columns: minmax(0, 1.7fr) minmax(220px, 0.62fr);
}

.hangar-shell .shop-detail {
    width: 100%;
    max-width: 304px;
    justify-self: end;
}

.hangar-shell .shop-detail-panel {
    padding: 16px;
    overflow: hidden;
    box-sizing: border-box;
}

.hangar-shell .shop-detail-panel h3 {
    font-size: 16px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.hangar-shell .shop-detail-panel p {
    font-size: 12px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.hangar-shell .shop-detail-stats {
    font-size: 11px;
    letter-spacing: 0.06em;
}

.hangar-shell .equip-config-switch {
    gap: 6px;
    margin: 6px 0 2px;
    flex-wrap: wrap;
}

.hangar-shell .equip-config-button {
    padding: 7px 9px;
    font-size: 10px;
    letter-spacing: 0.08em;
    border-radius: 9px;
}

.hangar-shell .equip-config-clear {
    padding: 7px 9px;
    margin-left: 0;
    order: 3;
    flex-basis: 100%;
    align-self: flex-start;
}

.hangar-shell .shop-detail-media {
    gap: 8px;
}

.hangar-shell .shop-detail-video,
.hangar-shell .shop-detail-placeholder {
    width: 96%;
    justify-self: center;
}

.hangar-shell .shop-detail-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 56%);
    align-items: center;
    column-gap: 8px;
}

.hangar-shell .shop-detail-row dt {
    min-width: 0;
    overflow-wrap: anywhere;
}

.hangar-shell .shop-detail-row dd,
.hangar-shell .shop-detail-meta strong {
    min-width: 0;
    max-width: 100%;
    text-align: right;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-size: 11px;
    letter-spacing: 0.04em;
}

.hangar-shell .shop-detail-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 56%);
    align-items: center;
    column-gap: 8px;
    font-size: 11px;
    letter-spacing: 0.08em;
}

.hangar-shell .shop-detail-meta strong {
    justify-self: end;
}

.shop-grid {
    column-count: 2;
    column-gap: 18px;
}

.hangar-grid--equip {
    column-count: 1;
}

.equip-panel {
    --equip-item-size: 44px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.equip-main-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.95fr);
    gap: 16px;
    align-items: start;
}

.equip-equipped-column,
.equip-storage-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.equip-equipped-column {
    min-height: min(72vh, 720px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 6px;
}

.equip-storage-column {
    min-height: min(72vh, 720px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 6px;
}

.equip-main-layout .equip-storage-header {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.equip-config-switch {
    display: flex;
    gap: 8px;
    margin: 8px 0 4px;
}

.equip-config-switch.is-hidden {
    display: none;
}

.equip-config-button {
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(10, 18, 28, 0.8);
    color: var(--muted);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.equip-config-button:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.24);
}

.equip-config-button.is-active {
    color: #0b1a24;
    border-color: rgba(74, 212, 200, 0.6);
    background: linear-gradient(120deg, rgba(74, 212, 200, 0.9), rgba(124, 230, 214, 0.95));
    box-shadow: 0 10px 22px rgba(74, 212, 200, 0.28);
}

.equip-config-clear {
    margin-left: auto;
    color: #f5c2c0;
    border-color: rgba(255, 140, 140, 0.35);
    background: rgba(40, 12, 12, 0.6);
}

.equip-config-clear:hover {
    color: #ffe2e2;
    border-color: rgba(255, 140, 140, 0.6);
    background: rgba(70, 14, 14, 0.7);
}

.equip-group {
    padding: 14px;
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    background: rgba(12, 20, 30, 0.65);
}

.equip-group-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}

.equip-group-ship-meta {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.equip-group-meta {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.equip-group-summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.equip-group-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.equip-group-action {
    height: 28px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(8, 16, 24, 0.92);
    color: rgba(255, 255, 255, 0.82);
    font: inherit;
    font-size: 10px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0 8px;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}

.equip-group-action:hover {
    border-color: rgba(74, 212, 200, 0.55);
    background: rgba(14, 30, 42, 0.95);
}

.equip-group-action:focus-visible {
    outline: 2px solid rgba(74, 212, 200, 0.55);
    outline-offset: 2px;
}

.equip-group-action:disabled {
    opacity: 0.45;
    cursor: default;
}

.equip-group-filter {
    min-width: 122px;
    max-width: 180px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(6, 12, 18, 0.86);
    color: var(--text);
    font: inherit;
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: none;
    padding: 0 8px;
}

.equip-group-filter:focus-visible {
    outline: 2px solid rgba(74, 212, 200, 0.55);
    outline-offset: 2px;
}

.equip-group-filter,
.clan-start-form select,
.clan-start-member-role-select,
.trade-field select,
.station-trade-sell-form select {
    color-scheme: dark;
    background-color: rgba(6, 12, 18, 0.86);
    color: #f5f8ff;
}

.equip-group-filter option,
.clan-start-form select option,
.clan-start-member-role-select option,
.trade-field select option,
.station-trade-sell-form select option {
    background-color: #0b1420;
    color: #f5f8ff;
}

.equip-group-filter option:disabled,
.clan-start-form select option:disabled,
.clan-start-member-role-select option:disabled,
.trade-field select option:disabled,
.station-trade-sell-form select option:disabled {
    color: #718096;
}

.equip-group-filter:disabled,
.clan-start-form select:disabled,
.clan-start-member-role-select:disabled,
.trade-field select:disabled,
.station-trade-sell-form select:disabled {
    color: #8fa2b8;
    background-color: rgba(8, 16, 26, 0.7);
}

.equip-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.equip-slots .actionbar-slot {
    width: var(--equip-item-size);
    height: var(--equip-item-size);
    cursor: default;
}

.equip-slot {
    position: relative;
}

.equip-slot .slot-keybind {
    top: 3px;
    left: 3px;
    padding: 1px 4px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(6, 12, 18, 0.88);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    z-index: 3;
}

.equip-slot-media {
    position: absolute;
    inset: 6px;
    width: calc(100% - 12px);
    height: calc(100% - 12px);
    object-fit: contain;
    pointer-events: none;
    filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.4));
}

.equip-slot.is-over {
    border-color: rgba(74, 212, 200, 0.8);
    box-shadow: 0 8px 18px rgba(74, 212, 200, 0.25);
}

.equip-slot.is-filled {
    border-color: rgba(255, 255, 255, 0.35);
}

.equip-slot.is-selected {
    border-color: rgba(255, 204, 96, 0.9);
    box-shadow: 0 0 0 1px rgba(255, 204, 96, 0.35), 0 8px 18px rgba(255, 204, 96, 0.2);
}

.equip-slot-name,
.equip-card-name {
    position: absolute;
    right: 4px;
    bottom: 4px;
    max-width: calc(100% - 8px);
    padding: 1px 4px;
    border-radius: 4px;
    font-size: 9px;
    line-height: 1.2;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(6, 12, 18, 0.72);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
    pointer-events: none;
    z-index: 2;
}

.equip-slots-empty {
    color: rgba(255, 255, 255, 0.55);
    font-size: 13px;
}

.equip-inventory {
    padding: 14px;
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    background: rgba(12, 20, 30, 0.65);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hangar-storage-group {
    display: grid;
    gap: 8px;
}

.hangar-storage-group + .hangar-storage-group {
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hangar-storage-group-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.62);
}

.hangar-storage-location-group {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.hangar-grid--equip .equip-panel {
    width: 100%;
    min-width: 0;
}

.hangar-grid--equip .equip-items {
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    align-items: stretch;
    gap: 10px;
}

.hangar-grid--equip .hangar-storage-item {
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 118px;
    padding: 8px;
    display: grid;
    grid-template-rows: minmax(48px, 1fr) minmax(24px, auto) 22px;
    gap: 6px;
    align-items: center;
    justify-items: center;
    overflow: hidden;
    cursor: pointer;
}

.hangar-grid--equip .hangar-storage-item .equip-item-media {
    width: 100%;
    height: 52px;
    max-width: 76px;
    object-fit: contain;
}

.hangar-grid--equip .hangar-storage-item .equip-card-name {
    position: static;
    right: auto;
    bottom: auto;
    display: -webkit-box;
    width: 100%;
    max-width: 100%;
    min-height: 22px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    font-size: 10px;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
    overflow: hidden;
    text-overflow: clip;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.hangar-grid--equip .hangar-storage-item .shop-card-badge {
    justify-self: center;
    align-self: center;
    max-width: 100%;
    min-width: 0;
    padding: 3px 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 8px;
    letter-spacing: 0.08em;
}

.equip-storage-header {
    margin-top: 12px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

.equip-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--equip-item-size), var(--equip-item-size)));
    justify-content: start;
    gap: 8px;
}

.equip-items.is-over {
    outline: 2px dashed rgba(74, 212, 200, 0.6);
    outline-offset: 6px;
}

.equip-items-empty {
    grid-column: 1 / -1;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

.equip-item-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--equip-item-size);
    height: var(--equip-item-size);
    padding: 0;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(12, 20, 30, 0.8);
    cursor: grab;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.equip-item-media {
    width: calc(100% - 10px);
    height: calc(100% - 10px);
    border-radius: 6px;
    object-fit: contain;
    background: rgba(6, 12, 18, 0.5);
    box-shadow: none;
    pointer-events: none;
}

.equip-item-card:hover {
    border-color: rgba(255, 255, 255, 0.28);
    transform: translateY(-2px);
}

.equip-item-card.is-dragging {
    opacity: 0.6;
    transform: scale(0.98);
}

.equip-item-card.is-equipped {
    border-color: rgba(74, 212, 200, 0.7);
    box-shadow: 0 10px 20px rgba(74, 212, 200, 0.2);
}

.equip-item-card.is-selected {
    border-color: rgba(255, 204, 96, 0.9);
    box-shadow: 0 0 0 1px rgba(255, 204, 96, 0.35), 0 10px 20px rgba(255, 204, 96, 0.22);
}

.hangar-storage-item.is-active {
    border-color: rgba(74, 212, 200, 0.88);
    box-shadow: 0 0 0 1px rgba(74, 212, 200, 0.28), 0 12px 24px rgba(74, 212, 200, 0.24);
}

.equip-item-name {
    display: none;
}

.equip-item-meta {
    display: none;
}

.equip-empty {
    padding: 16px;
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.6);
    background: rgba(12, 20, 30, 0.6);
}

.shop-card {
    break-inside: avoid;
    margin-bottom: 18px;
    padding: 16px;
    border-radius: 18px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    background: rgba(12, 20, 30, 0.7);
    display: grid;
    gap: 12px;
    animation: fadeUp 0.6s ease-out both;
}

.shop-card--ship,
.shop-card--weapon,
.shop-card--generator,
.shop-card--engine,
.shop-card--module,
.shop-card--ammo,
.shop-card--rocket {
    width: 100%;
    text-align: left;
    cursor: pointer;
    border-style: solid;
    font: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.shop-card--ship:hover,
.shop-card--weapon:hover,
.shop-card--generator:hover,
.shop-card--engine:hover,
.shop-card--module:hover,
.shop-card--ammo:hover,
.shop-card--rocket:hover {
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.shop-card--ship:focus-visible,
.shop-card--weapon:focus-visible,
.shop-card--generator:focus-visible,
.shop-card--engine:focus-visible,
.shop-card--module:focus-visible,
.shop-card--ammo:focus-visible,
.shop-card--rocket:focus-visible {
    outline: 2px solid rgba(74, 212, 200, 0.6);
    outline-offset: 2px;
}

.shop-card--ship.is-active,
.shop-card--weapon.is-active,
.shop-card--generator.is-active,
.shop-card--engine.is-active,
.shop-card--module.is-active,
.shop-card--ammo.is-active,
.shop-card--rocket.is-active {
    border-color: rgba(74, 212, 200, 0.7);
    box-shadow: 0 12px 24px rgba(74, 212, 200, 0.22);
}

.shop-card--hangar.is-equipped {
    border-color: rgba(74, 212, 200, 0.7);
    box-shadow: 0 12px 24px rgba(74, 212, 200, 0.22), 0 0 0 1px rgba(74, 212, 200, 0.18);
}

.shop-card-badge {
    align-self: flex-start;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(74, 212, 200, 0.4);
    background: rgba(8, 20, 26, 0.8);
    color: var(--accent-2);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.shop-card--tall .shop-card-frame {
    min-height: 180px;
}

.shop-card--wide .shop-card-frame {
    min-height: 140px;
}

.shop-card-frame {
    border-radius: 14px;
    min-height: 120px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.shop-card--ship .shop-card-frame,
.shop-card--weapon .shop-card-frame,
.shop-card--generator .shop-card-frame,
.shop-card--engine .shop-card-frame,
.shop-card--module .shop-card-frame,
.shop-card--ammo .shop-card-frame,
.shop-card--rocket .shop-card-frame {
    min-height: 0;
    padding: 14px;
    display: grid;
    gap: 6px;
    background: linear-gradient(160deg, rgba(74, 212, 200, 0.12), rgba(255, 255, 255, 0.03));
}

.shop-card-media {
    width: 100%;
    height: 96px;
    border-radius: 10px;
    object-fit: contain;
    background: rgba(6, 12, 18, 0.45);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.shop-card--ship .shop-card-media {
    height: 120px;
}

.shop-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.shop-card-sub {
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.shop-card-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
}

.shop-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 8px;
}

.shop-card-meta strong {
    color: var(--text);
    font-weight: 600;
    letter-spacing: 0.08em;
}

.shop-card-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
}

.shop-detail {
    position: sticky;
    top: 24px;
}

.shop-detail-panel {
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(12, 20, 30, 0.78);
    padding: 20px;
    display: grid;
    gap: 12px;
}

.shop-detail-panel h3 {
    margin: 0;
    font-size: 18px;
}

.shop-detail-panel p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.shop-detail-stats {
    margin: 0;
    display: grid;
    gap: 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
}

.shop-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.shop-detail-row.is-hidden {
    display: none;
}

.shop-detail-row dt {
    margin: 0;
}

.shop-detail-row dd {
    margin: 0;
    color: var(--text);
    font-weight: 600;
    letter-spacing: 0.08em;
}

.shop-detail-placeholder {
    border-radius: 14px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    min-height: 180px;
    background: rgba(10, 16, 24, 0.6);
}

.shop-detail-media {
    display: grid;
    gap: 10px;
}

.shop-detail-video {
    width: 100%;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(10, 16, 24, 0.6);
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.shop-detail-video.is-hidden,
.shop-detail-placeholder.is-hidden {
    display: none;
}

.shop-detail-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
}

.shop-detail-meta strong {
    color: var(--text);
    font-weight: 600;
    letter-spacing: 0.08em;
}

.shop-detail-actions {
    display: grid;
    gap: 8px;
}

.shop-buy-button {
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #0b1a24;
    background: linear-gradient(120deg, var(--accent), #ffd27b);
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(255, 179, 71, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.shop-buy-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 24px rgba(255, 179, 71, 0.35);
}

.shop-buy-button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

.shop-buy-message {
    margin: 0;
    min-height: 16px;
    font-size: 12px;
    color: var(--muted);
}

.shop-buy-message.is-error {
    color: #ff8f6d;
}

.shop-modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(5, 10, 16, 0.6);
    z-index: 20;
}

.shop-modal.is-hidden {
    display: none;
}

.shop-modal-backdrop {
    position: absolute;
    inset: 0;
}

.shop-modal-card {
    position: relative;
    width: min(420px, 92vw);
    border-radius: 18px;
    border: 1px solid var(--stroke);
    background: rgba(12, 20, 30, 0.92);
    padding: 22px;
    display: grid;
    gap: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
    animation: modalIn 0.2s ease-out both;
}

.shop-modal-card h3 {
    margin: 0;
    font-size: 18px;
}

.shop-modal-card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.shop-modal-field {
    margin-top: 2px;
    display: grid;
    gap: 6px;
}

.shop-modal-field label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.6);
}

.shop-modal-field input {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(8, 16, 24, 0.8);
    color: var(--text);
    font: inherit;
}

.shop-modal-field input:focus-visible {
    outline: 2px solid rgba(74, 212, 200, 0.6);
    outline-offset: 2px;
}

.shop-modal-total {
    margin-top: 4px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

.shop-modal-total strong {
    color: var(--accent-2);
    font-size: 15px;
}

.shop-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 6px;
}

.shop-modal-button {
    border: none;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #0b1a24;
    background: linear-gradient(120deg, var(--accent), #ffd27b);
    cursor: pointer;
    box-shadow: 0 10px 18px rgba(255, 179, 71, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.shop-modal-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 22px rgba(255, 179, 71, 0.35);
}

.shop-modal-button--ghost {
    color: var(--text);
    background: rgba(15, 28, 42, 0.8);
    border: 1px solid var(--stroke);
    box-shadow: none;
}

.shop-modal-button--ghost:hover {
    box-shadow: none;
    background: rgba(24, 38, 52, 0.9);
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.shop-empty {
    padding: 18px;
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    background: rgba(10, 16, 24, 0.5);
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.card-label {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.card-value {
    font-size: 18px;
    font-weight: 600;
    display: grid;
    gap: 6px;
}

.card-sub {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.card-sub.is-hidden {
    display: none;
}

.origin-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

.origin-badge[data-origin="milky-way"] {
    background: rgba(255, 120, 100, 0.18);
    border-color: rgba(255, 120, 100, 0.5);
    color: #ffb0a1;
}

.origin-badge[data-origin="andromeda"] {
    background: rgba(100, 170, 255, 0.18);
    border-color: rgba(100, 170, 255, 0.5);
    color: #b9d7ff;
}

.origin-badge[data-origin="unknown"] {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--muted);
}

.clan-tab-shell {
    border: 1px solid var(--stroke);
    border-radius: 24px;
    background: rgba(9, 16, 24, 0.78);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(14px);
    padding: 24px;
    min-height: 320px;
}

.clan-tab-loading {
    padding: 28px;
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.14);
    background: rgba(10, 16, 24, 0.5);
    color: var(--muted);
    text-align: center;
}

.clan-start-layout {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr);
}

.clan-start-notice {
    border-radius: 14px;
    border: 1px solid rgba(74, 212, 200, 0.35);
    background: rgba(8, 24, 22, 0.66);
    color: #9ceee5;
    padding: 12px 14px;
    font-size: 13px;
}

.clan-start-notice.is-error {
    border-color: rgba(255, 132, 132, 0.42);
    background: rgba(40, 12, 12, 0.66);
    color: #ffb6b6;
}

.clan-start-notice.is-hidden {
    display: none;
}

.clan-start-card {
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(12, 20, 30, 0.75);
    padding: 18px;
    display: grid;
    gap: 12px;
}

.clan-start-card h3 {
    margin: 0;
    font-size: 20px;
}

.clan-start-card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.clan-start-members-card {
    align-self: start;
    align-content: start;
}

.clan-start-members-card .clan-start-member-list {
    align-self: start;
}

.clan-start-form,
.clan-start-search {
    display: grid;
    gap: 8px;
}

.clan-start-tax-form {
    display: grid;
    gap: 8px;
}

.clan-start-form label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.6);
}

.clan-start-station-context {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 40px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(8, 16, 24, 0.72);
    color: rgba(255, 255, 255, 0.68);
    font-size: 13px;
}

.clan-start-station-context strong {
    color: var(--text);
    text-align: right;
}

.clan-start-station-context.is-unavailable {
    justify-content: flex-start;
    color: rgba(255, 190, 128, 0.9);
    border-color: rgba(255, 190, 128, 0.22);
}

.clan-start-tax-form label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.6);
}

.clan-start-form input,
.clan-start-form select,
.clan-start-search input {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(8, 16, 24, 0.8);
    color: var(--text);
    font: inherit;
    padding: 10px 12px;
}

.clan-start-form textarea {
    width: 100%;
    min-height: 80px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(8, 16, 24, 0.8);
    color: var(--text);
    font: inherit;
    padding: 10px 12px;
    resize: vertical;
}

.clan-start-tax-form input {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(8, 16, 24, 0.8);
    color: var(--text);
    font: inherit;
    padding: 10px 12px;
}

.clan-start-tax-inline-form {
    gap: 12px;
}

.clan-start-tax-edit-row {
    cursor: text;
}

.clan-start-tax-edit-control {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 112px;
}

.clan-start-tax-edit-control input {
    width: 76px;
    padding: 8px 10px;
    text-align: right;
}

.clan-start-tax-edit-control strong {
    font-size: 14px;
}

.clan-start-tax-controls {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
}

.clan-start-form input:focus-visible,
.clan-start-form select:focus-visible,
.clan-start-form textarea:focus-visible,
.clan-start-search input:focus-visible,
.clan-start-tax-form input:focus-visible {
    outline: 2px solid rgba(74, 212, 200, 0.55);
    outline-offset: 2px;
}

.clan-start-btn {
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    padding: 10px 14px;
    background: rgba(15, 28, 42, 0.8);
    color: var(--text);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.clan-start-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.3);
}

.clan-start-btn-primary {
    border-color: rgba(255, 179, 71, 0.45);
    background: linear-gradient(120deg, rgba(255, 179, 71, 0.92), rgba(255, 210, 123, 0.95));
    color: #0b1a24;
    box-shadow: 0 8px 18px rgba(255, 179, 71, 0.25);
}

.clan-start-btn-danger {
    border-color: rgba(255, 132, 132, 0.4);
    background: rgba(60, 14, 14, 0.82);
    color: #ffd1d1;
}

.clan-start-results {
    display: grid;
    gap: 10px;
}

.clan-start-result {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(9, 17, 27, 0.7);
    padding: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}

.clan-start-result-main {
    display: grid;
    gap: 4px;
}

.clan-start-result-main h4 {
    margin: 0;
    font-size: 15px;
}

.clan-start-result-main p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.clan-start-result-actions {
    width: min(320px, 100%);
    display: grid;
    gap: 8px;
}

.clan-start-apply-message {
    width: 100%;
    min-height: 64px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(8, 16, 24, 0.8);
    color: var(--text);
    font: inherit;
    font-size: 12px;
    line-height: 1.4;
    padding: 10px 12px;
    resize: vertical;
}

.clan-start-apply-message:focus-visible {
    outline: 2px solid rgba(74, 212, 200, 0.55);
    outline-offset: 2px;
}

.clan-start-empty {
    color: var(--muted);
    font-size: 13px;
    margin: 0;
}

.clan-start-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.clan-start-desc {
    white-space: pre-wrap;
}

.clan-start-description-block {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding: 12px 0;
}

.clan-start-description-form {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 12px;
}

.clan-start-description-editable {
    min-height: 82px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    background: rgba(8, 16, 24, 0.8);
    color: var(--text);
    font: inherit;
    font-size: 13px;
    line-height: 1.45;
    padding: 10px 12px;
    white-space: pre-wrap;
    cursor: text;
}

.clan-start-description-editable:focus-visible {
    outline: 2px solid rgba(74, 212, 200, 0.55);
    outline-offset: 2px;
}

.clan-start-description-editable:empty::before {
    content: attr(data-placeholder);
    color: rgba(255, 255, 255, 0.38);
}

.clan-start-inline-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.clan-start-inline-form span {
    color: var(--muted);
    font-size: 13px;
}

.clan-start-inline-form input {
    width: 82px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(8, 16, 24, 0.8);
    color: var(--text);
    font: inherit;
    padding: 9px 10px;
}

.clan-start-inline-form input:focus-visible {
    outline: 2px solid rgba(74, 212, 200, 0.55);
    outline-offset: 2px;
}

.clan-start-resource-list {
    display: grid;
    gap: 10px;
}

.clan-start-finance-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 16px;
    grid-column: 1 / -1;
}

.clan-start-finance-column {
    display: grid;
    gap: 16px;
    align-content: start;
}

.clan-start-resource-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 16px;
    grid-column: 1 / -1;
}

.clan-start-diplomacy-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 16px;
    grid-column: 1 / -1;
}

.clan-start-diplomacy-column {
    display: grid;
    gap: 16px;
    align-content: start;
    min-width: 0;
}

.clan-start-station-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 16px;
    grid-column: 1 / -1;
}

.clan-start-station-cards > .clan-start-card {
    min-width: 0;
    height: 100%;
}

.clan-start-result-actions-station {
    width: min(220px, 100%);
}

.clan-start-resource-row-compact {
    padding: 10px 12px;
}

.clan-start-resource-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(9, 17, 27, 0.65);
    padding: 12px 14px;
}

.clan-start-resource-row span {
    color: var(--muted);
    font-size: 13px;
}

.clan-start-resource-row strong {
    font-size: 14px;
}

.clan-start-meta {
    color: var(--muted);
}

.clan-start-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.clan-start-member-list {
    display: grid;
    gap: 8px;
}

.clan-start-member-list.is-scrollable {
    max-height: var(--clan-member-scroll-max-height, 520px);
    overflow-y: auto;
    padding-right: 6px;
    scrollbar-gutter: stable;
}

.clan-start-member-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(9, 17, 27, 0.65);
}

.clan-start-member-main {
    display: grid;
    gap: 3px;
}

.clan-start-member-main strong {
    font-size: 14px;
}

.clan-start-member-main span {
    color: var(--muted);
    font-size: 12px;
}

.clan-start-member-actions {
    display: inline-flex;
    gap: 6px;
}

.clan-start-member-role-select {
    min-width: 120px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(15, 28, 42, 0.8);
    color: var(--text);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 8px;
}

.clan-start-member-role-select:focus-visible {
    outline: 2px solid rgba(74, 212, 200, 0.55);
    outline-offset: 2px;
}

.clan-start-icon-btn {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    background: rgba(15, 28, 42, 0.8);
    color: var(--text);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

.clan-start-application-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(9, 17, 27, 0.65);
    padding: 10px 12px;
}

.clan-start-application-row strong {
    display: block;
    font-size: 14px;
}

.clan-start-application-row span {
    color: var(--muted);
    font-size: 12px;
}

.clan-start-application-row p {
    margin-top: 4px;
    font-size: 12px;
}

.clan-start-application-actions {
    display: inline-flex;
    gap: 8px;
}

@media (min-width: 980px) {
    .clan-start-layout {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .clan-start-layout .clan-start-notice,
    .clan-start-layout .clan-start-card:nth-child(4) {
        grid-column: 1 / -1;
    }
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 640px) {
    .hall-of-fame-table {
        max-height: 340px;
    }

    .hall-of-fame-row {
        grid-template-columns: 32px minmax(0, 1fr) 44px minmax(78px, 0.8fr);
        gap: 6px;
        padding: 9px 10px;
        font-size: 12px;
    }

    .hall-of-fame-row--head {
        font-size: 9px;
        letter-spacing: 0.1em;
    }

    .hall-of-fame-tab {
        flex: 1 1 130px;
        text-align: center;
    }
}

@media (max-width: 900px) {
    .start-launch-bar .start-button,
    .start-launch-bar .start-message {
        width: min(100%, 280px);
        min-width: 0;
        max-width: none;
    }

    .start-main {
        grid-template-columns: 1fr;
    }

    .start-header {
        display: grid;
        grid-template-columns: 1fr;
        justify-items: center;
        justify-content: center;
        gap: 14px;
        margin-top: -12px;
    }

    .start-nav {
        position: static;
        transform: none;
        width: 100%;
    }

    .start-panel,
    .start-card {
        padding: 24px;
    }

    .shop-shell {
        padding: 24px;
    }

    .shop-layout {
        grid-template-columns: 1fr;
    }

    .hangar-shell .shop-layout {
        grid-template-columns: 1fr;
    }

    .shop-grid {
        column-count: 1;
    }

    .shop-detail {
        position: static;
    }

    .hangar-shell .shop-detail {
        max-width: none;
        justify-self: auto;
    }

    .equip-main-layout {
        grid-template-columns: 1fr;
    }

    .equip-equipped-column,
    .equip-storage-column {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    .clan-tab-shell {
        padding: 18px;
    }

    .clan-start-result,
    .clan-start-header-row,
    .clan-start-member-row,
    .clan-start-application-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .clan-start-result .clan-start-btn,
    .clan-start-result-actions,
    .clan-start-application-actions,
    .clan-start-member-actions {
        width: 100%;
    }

    .clan-start-application-actions .clan-start-btn {
        flex: 1;
    }

    .clan-start-finance-cards {
        grid-template-columns: 1fr;
    }

    .clan-start-resource-cards {
        grid-template-columns: 1fr;
    }

    .clan-start-diplomacy-cards {
        grid-template-columns: 1fr;
    }

    .clan-start-station-cards {
        grid-template-columns: 1fr;
    }

    .clan-start-tax-controls {
        width: 100%;
    }
}


.trade-shell {
    border: 1px solid var(--stroke);
    border-radius: 24px;
    background: rgba(9, 16, 24, 0.78);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(14px);
    padding: 28px 30px 32px;
}

.trade-header,
.trade-list-head,
.trade-create-footer,
.trade-card-top,
.trade-card-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.trade-header {
    margin-bottom: 20px;
}

.trade-actions,
.trade-filter {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
}

.trade-notice {
    min-height: 20px;
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 13px;
}

.trade-notice.is-error {
    color: #ff8f6d;
}

.trade-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.trade-summary-item,
.trade-create,
.trade-list-section,
.trade-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(10, 17, 24, 0.65);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.trade-summary-item {
    display: grid;
    gap: 5px;
    min-width: 0;
    border-radius: 12px;
    padding: 12px 14px;
}

.trade-summary-item span,
.trade-field span,
.trade-card-type {
    color: var(--muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.trade-summary-item strong {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 14px;
}

.trade-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.38fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.trade-create,
.trade-list-section {
    border-radius: 18px;
    padding: 18px;
}

.trade-section-head {
    display: grid;
    gap: 5px;
    margin-bottom: 16px;
}

.trade-section-head h3,
.trade-card h4 {
    margin: 0;
}

.trade-section-head p,
.trade-card-meta,
.trade-create-footer p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.trade-form-grid,
.trade-list,
.trade-card,
.trade-field {
    display: grid;
    gap: 12px;
}

.trade-field {
    gap: 7px;
}

.trade-field input,
.trade-field select,
.trade-card-controls input {
    width: 100%;
    min-height: 42px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(6, 12, 18, 0.82);
    color: var(--text);
    font: inherit;
    padding: 10px 12px;
}

.trade-field input:focus-visible,
.trade-field select:focus-visible,
.trade-card-controls input:focus-visible {
    outline: 2px solid rgba(74, 212, 200, 0.55);
    outline-offset: 2px;
}

.trade-create-footer {
    align-items: flex-end;
    margin-top: 16px;
}

.trade-card {
    border-radius: 14px;
    padding: 14px;
}

.trade-card h4 {
    margin-top: 4px;
    font-size: 16px;
    overflow-wrap: anywhere;
}

.trade-card-price {
    text-align: right;
    white-space: nowrap;
    color: var(--accent);
}

.trade-card-controls {
    justify-content: flex-end;
}

.trade-card-controls input {
    max-width: 140px;
}

.trade-card-button {
    min-width: 112px;
    padding: 11px 14px;
    font-size: 13px;
}

@media (max-width: 900px) {
    .trade-shell {
        padding: 24px;
    }

    .trade-summary,
    .trade-layout {
        grid-template-columns: 1fr;
    }

    .trade-header,
    .trade-list-head,
    .trade-create-footer,
    .trade-card-top,
    .trade-card-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .trade-card-controls input,
    .trade-card-button,
    .trade-create-footer .shop-buy-button {
        width: 100%;
        max-width: none;
    }
}

.station-trade-shell {
    display: grid;
    gap: 18px;
    padding: 22px;
    border: 1px solid var(--stroke);
    border-radius: 18px;
    background: rgba(12, 20, 30, 0.82);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.station-trade-header {
    align-items: center;
}

.station-trade-refresh {
    width: auto;
    min-width: 110px;
}

.station-trade-message {
    min-height: 20px;
    color: var(--accent-2);
    font-size: 13px;
}

.station-trade-message.is-error {
    color: #ffb4aa;
}

.station-trade-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 16px;
    align-items: start;
}

.station-trade-panel {
    display: grid;
    gap: 14px;
    min-width: 0;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(8, 16, 24, 0.72);
}

.station-trade-panel-head,
.station-trade-wallet,
.station-trade-card-actions,
.station-trade-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.station-trade-panel-head {
    justify-content: space-between;
}

.station-trade-panel h3 {
    margin: 0;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.station-trade-wallet span,
#start-trade-tax {
    color: var(--muted);
    font-size: 12px;
}

.station-trade-filter,
.station-trade-action {
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: rgba(10, 18, 28, 0.9);
    color: var(--text);
    font: inherit;
    font-size: 11px;
    padding: 7px 9px;
    cursor: pointer;
}

.station-trade-filter.is-active,
.station-trade-action:hover {
    border-color: rgba(74, 212, 200, 0.55);
    color: #0b1a24;
    background: rgba(74, 212, 200, 0.9);
}

.station-trade-list,
.station-trade-history-list {
    display: grid;
    gap: 10px;
}

.station-trade-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 10px;
    background: rgba(12, 20, 30, 0.72);
}

.station-trade-card-main {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.station-trade-card-main strong,
.station-trade-card-main span,
.station-trade-card-price {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.station-trade-card-main span,
.station-trade-card-price,
.station-trade-empty,
.station-trade-history-row {
    color: var(--muted);
    font-size: 12px;
}

.station-trade-card-actions input,
.station-trade-sell-form input,
.station-trade-sell-form select {
    min-width: 0;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: rgba(6, 12, 18, 0.86);
    color: var(--text);
    font: inherit;
    padding: 0 9px;
}

.station-trade-card-actions input {
    width: 76px;
}

.station-trade-sell-form {
    display: grid;
    gap: 10px;
}

.station-trade-sell-form label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 12px;
}

.station-trade-history {
    display: grid;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 900px) {
    .station-trade-layout,
    .station-trade-card {
        grid-template-columns: 1fr;
    }
}


/* Shared station market UI on the start page */
.start-station-market.station-resource-modal {
    position: static;
    transform: none;
    width: 100%;
    min-width: 0;
    max-width: none;
    height: auto;
    min-height: 0;
    max-height: none;
    display: flex;
    flex-direction: column;
    resize: none;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

.start-station-market .station-resource-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.start-station-market .station-resource-header h2 {
    margin: 0;
    color: #fff;
    font-size: 18px;
}

.start-station-market .station-resource-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    gap: 14px;
    padding: 16px 18px 18px;
    overflow: visible;
}

.start-station-market .station-resource-subtitle {
    margin: 0;
    color: #bfc7d2;
    font-size: 14px;
}

.btn {
    border: 0;
    border-radius: 6px;
    padding: 10px 14px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(180deg, #2f8dff, #1567c4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.station-resource-overview-card {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.station-resource-overview-card h3 {
    margin: 0;
    font-size: 12px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #d7deea;
}

.station-resource-overview-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    color: #c9d2df;
}

.station-resource-overview-row b {
    color: #fff;
}

.station-resource-icon {
    width: 42px;
    height: 42px;
    object-fit: contain;
    flex: 0 0 42px;
}

.station-resource-feedback {
    display: none;
    margin-top: 8px;
    min-height: 0;
    padding: 8px 10px;
    color: #aeb7c4;
    font-size: 12px;
    text-align: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.station-resource-feedback.is-visible {
    display: block;
}

.station-resource-feedback.is-error {
    color: #ff8f8f;
}

.inventory-feedback {
    width: fit-content;
    max-width: min(100%, 420px);
    margin: 4px auto 0;
    padding: 5px 8px;
    color: #98a4b5;
    font-size: 11px;
    line-height: 1.25;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.025);
    border-color: rgba(255, 255, 255, 0.05);
}

.inventory-feedback.is-error {
    color: #ffabab;
    background: rgba(255, 120, 120, 0.045);
    border-color: rgba(255, 120, 120, 0.08);
}

#dock-equip-feedback,
#station-transfer-feedback,
#station-inventory-feedback,
#inventory-feedback {
    position: absolute;
    left: 50%;
    bottom: 12px;
    z-index: 8;
    display: block;
    margin: 0;
    max-width: min(420px, calc(100% - 24px));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-50%);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
    transition: opacity 0.14s ease, visibility 0.14s ease;
}

#dock-equip-feedback.is-visible,
#station-transfer-feedback.is-visible,
#station-inventory-feedback.is-visible,
#inventory-feedback.is-visible {
    opacity: 1;
    visibility: visible;
}

.station-inventory-modal .inventory-body {
    position: relative;
}

.station-market-summary {
    display: grid;
    grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.station-market-summary-stack {
    display: grid;
    gap: 10px;
}

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

.station-market-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #c9d2df;
    font-size: 12px;
}

.station-market-field span {
    color: #d7deea;
}

.station-market-field select,
.station-market-field input,
.station-market-card-actions input {
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(6, 12, 18, 0.82);
    color: var(--text);
    font-size: 13px;
    box-sizing: border-box;
}

.station-market-field select {
    color-scheme: dark;
    background-color: rgba(6, 12, 18, 0.86);
    color: #f5f8ff;
}

.station-market-field select option {
    background-color: #0b1420;
    color: #f5f8ff;
}

.station-market-field select option:disabled {
    color: #718096;
}

.station-market-field select:disabled {
    color: #8fa2b8;
    background-color: rgba(8, 16, 26, 0.7);
}

.station-market-field select:focus,
.station-market-field input:focus,
.station-market-card-actions input:focus {
    outline: none;
    border-color: rgba(74, 212, 200, 0.55);
    box-shadow: 0 0 0 2px rgba(74, 212, 200, 0.18);
}

.station-market-create-availability {
    margin: 0;
    color: #9eb0c7;
    font-size: 12px;
}

.station-market-create-summary {
    display: grid;
    gap: 4px;
    padding: 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.station-market-field[hidden] {
    display: none !important;
}

.station-market-create-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.station-market-create-actions .btn {
    min-width: 120px;
}

.station-market-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.station-market-tab {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: #aeb7c4;
    font-size: 12px;
    letter-spacing: 0.04em;
    padding: 7px 14px;
    cursor: pointer;
}

.station-market-tab.is-active,
.station-market-tab[aria-selected="true"] {
    background: rgba(111, 176, 255, 0.16);
    border-color: rgba(111, 176, 255, 0.32);
    color: #e6f0ff;
}

.station-market-open-toolbar,
.station-market-done-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.station-market-open-toolbar[hidden],
.station-market-done-toolbar[hidden] {
    display: none !important;
}

.station-market-open-filters,
.station-market-done-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.station-market-filter-controls,
.station-market-sort-controls {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 1 auto;
    min-width: 0;
}

.station-market-filter-controls {
    gap: 8px;
}

.station-market-system-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(6, 12, 18, 0.86);
    color: #d8e3f0;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    user-select: none;
}

.station-market-system-toggle input {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: #4ad4c8;
}

.station-market-system-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
}

.station-market-system-toggle:focus-within {
    border-color: rgba(74, 212, 200, 0.55);
    box-shadow: 0 0 0 2px rgba(74, 212, 200, 0.18);
}

.station-market-filter-field {
    display: flex;
    flex: 0 1 190px;
    width: 190px;
    min-width: 140px;
}

.station-market-sort-field {
    flex-basis: 190px;
    width: 190px;
    min-width: 160px;
}

.station-market-filter-select {
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(6, 12, 18, 0.86);
    color: #f5f8ff;
    font-size: 13px;
    box-sizing: border-box;
    color-scheme: dark;
}

.station-market-filter-select option {
    background-color: #0b1420;
    color: #f5f8ff;
}

.station-market-filter-select:focus,
.station-market-sort-direction-btn:focus-visible {
    outline: none;
    border-color: rgba(74, 212, 200, 0.55);
    box-shadow: 0 0 0 2px rgba(74, 212, 200, 0.18);
}

.station-market-sort-direction-btn {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    align-self: center;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(6, 12, 18, 0.86);
    color: #f5f8ff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.station-market-sort-direction-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.station-market-chip {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: #aeb7c4;
    font-size: 11px;
    letter-spacing: 0.05em;
    padding: 6px 12px;
    cursor: pointer;
}

.station-market-chip.is-active {
    background: rgba(111, 176, 255, 0.16);
    border-color: rgba(111, 176, 255, 0.32);
    color: #e6f0ff;
}

.station-market-done-pagination,
.station-market-pagination {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #9eb0c7;
    font-size: 12px;
}

.station-market-done-pagination .btn,
.station-market-pagination .btn {
    min-width: 80px;
}

.station-market-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 180px;
}

.station-market-empty {
    padding: 18px;
    border: 1px dashed rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    color: #aeb7c4;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
}

.station-market-card {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.station-market-card-auction {
    border-color: rgba(255, 208, 120, 0.22);
    background: linear-gradient(180deg, rgba(255, 208, 120, 0.06), rgba(255, 255, 255, 0.03));
}

.station-market-card-auction .station-market-card-price {
    color: #ffe3a6;
}

.station-market-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.station-market-card-title {
    color: #ffffff;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.station-market-card-price {
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
}

.station-market-card-badge {
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(111, 176, 255, 0.14);
    border: 1px solid rgba(111, 176, 255, 0.32);
    color: #cfe5ff;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.station-market-card-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.station-market-card-meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.station-market-card-meta-item span {
    color: #8ea1b8;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.station-market-card-meta-item b {
    color: #ffffff;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.station-market-card-meta-item b[data-role="auction-ends"] {
    font-variant-numeric: tabular-nums;
}

.station-market-card-actions {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: stretch;
    gap: 10px;
}

.station-market-card-actions .btn {
    min-width: 96px;
}

.station-market-card-actions-own {
    grid-template-columns: auto;
    justify-content: end;
}

.station-market-card-buy-summary {
    display: grid;
    gap: 4px;
    color: #aeb7c4;
    font-size: 12px;
}

.station-market-card-buy-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.station-market-card-buy-line span {
    color: #8ea1b8;
}

.station-market-card-buy-line b {
    color: #dfe8f7;
    text-align: right;
}

.station-market-card-buy-line-total span,
.station-market-card-buy-line-total b {
    color: #ffffff;
}

.station-market-done-summary {
    display: grid;
    gap: 4px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.station-market-feedback {
    margin-top: 0;
}

.station-market-confirm {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
}

.station-market-confirm.is-hidden {
    display: none;
}

.station-market-confirm__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 7, 13, 0.68);
    backdrop-filter: blur(5px);
}

.station-market-confirm__dialog {
    position: relative;
    width: min(92vw, 520px);
    max-height: min(78vh, 640px);
    overflow: auto;
    padding: 18px;
    background: linear-gradient(180deg, rgba(12, 18, 28, 0.98), rgba(8, 12, 20, 0.98));
    border: 1px solid rgba(111, 176, 255, 0.2);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
}

.station-market-confirm__dialog h4 {
    margin: 0 0 10px;
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #e6eefb;
}

.station-market-confirm__body {
    margin: 0 0 12px;
    color: #b9c7da;
    line-height: 1.45;
}

.station-market-confirm__details {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
    padding: 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.station-market-confirm__details.is-hidden {
    display: none;
}

.station-market-confirm__detail {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
}

.station-market-confirm__detail-label {
    color: #8ea1b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.station-market-confirm__detail-value {
    color: #f5f8ff;
    font-weight: 700;
    text-align: right;
}

.station-market-confirm__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

#station-market-confirm-cancel,
#station-market-confirm-accept {
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    font-size: 11px;
    padding: 7px 14px;
    cursor: pointer;
}

#station-market-confirm-cancel {
    background: rgba(80, 80, 80, 0.7);
    color: #f5f5f5;
}

#station-market-confirm-cancel:hover {
    background: rgba(95, 95, 95, 0.8);
}

#station-market-confirm-accept {
    background: rgba(49, 98, 170, 0.92);
    color: #fff;
}

#station-market-confirm-accept:hover {
    background: rgba(64, 117, 194, 0.96);
}

@media (max-width: 760px) {
    .station-market-summary {
        grid-template-columns: 1fr;
    }

    .station-market-create-grid,
    .station-market-card-meta,
    .station-market-card-actions {
        grid-template-columns: 1fr;
    }

    .station-market-create-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .station-market-card-head {
        flex-direction: column;
    }
}

/* Backpage-only Station Trade side-by-side layout */
.start-station-market-summary {
    grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
    width: 100%;
}

.start-station-market-workspace {
    display: grid;
    grid-template-columns: minmax(340px, 380px) minmax(680px, 1fr);
    gap: 10px;
    width: 100%;
    min-width: 0;
    align-items: start;
    justify-items: stretch;
}

.start-station-market-workspace > * {
    align-self: start;
}

.start-station-market-create,
.start-station-market-listing-panel {
    min-width: 0;
}

.start-station-market-create {
    align-self: start;
    width: 100%;
    min-height: 0;
    height: auto;
    flex: 0 0 auto;
}

.start-station-market-listing-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-self: stretch;
    align-self: start;
    width: 100%;
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
    height: clamp(520px, 72vh, 820px);
    min-height: 520px;
    max-height: 820px;
}

.start-station-market-listing-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.start-station-market-listing-head h3 {
    margin: 0;
}

.start-station-market-listing-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.start-station-market-listing-panel .station-market-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding-right: 2px;
    scrollbar-gutter: stable;
}

.start-station-market-listing-panel .station-market-open-toolbar,
.start-station-market-listing-panel .station-market-done-toolbar {
    align-items: flex-start;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.start-station-market-listing-panel .station-market-open-toolbar,
.start-station-market-listing-panel .station-market-done-toolbar {
    overflow: visible;
}

.start-station-market-listing-panel .station-market-open-filters,
.start-station-market-listing-panel .station-market-done-filters {
    flex-wrap: wrap;
}

.start-station-market-listing-panel .station-market-filter-controls {
    flex-wrap: nowrap;
    max-width: 100%;
    overflow: visible;
}

.start-station-market-listing-actions {
    flex-wrap: nowrap;
    overflow: visible;
}

.start-station-market-listing-panel .station-market-chip,
.start-station-market-listing-panel .station-market-tab,
.start-station-market-listing-panel .station-market-filter-controls,
.start-station-market-listing-panel .station-market-done-pagination,
.start-station-market-listing-panel .station-market-pagination {
    flex: 0 0 auto;
}

.start-station-market-listing-panel .station-market-card,
.start-station-market-listing-panel .station-market-empty {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.start-station-market-listing-panel .station-market-list {
    align-items: stretch;
}

@media (max-width: 1280px) {
    .start-station-market-summary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    .start-station-market-workspace {
        grid-template-columns: 1fr;
    }

    .start-station-market-listing-panel {
        height: auto;
        width: 100%;
        min-width: 0;
        max-width: none;
        min-height: 0;
        max-height: none;
    }

    .start-station-market-listing-panel .station-market-list {
        min-height: 220px;
        overflow: visible;
    }
}

/* Shared Backpage panel/card surface system */
.shop-shell,
.clan-tab-shell,
.trade-shell,
.station-trade-shell,
.start-station-market.station-resource-modal {
    border-color: var(--backpage-panel-border);
    background: var(--backpage-panel-bg);
    box-shadow: var(--backpage-panel-shadow);
}

.shop-detail-panel,
.shop-card,
.equip-inventory,
.hangar-grid--equip .equip-items,
.clan-start-card,
.clan-tab-loading,
.trade-summary-item,
.trade-create,
.trade-list-section,
.trade-card,
.station-trade-panel,
.station-trade-card,
.station-resource-overview-card,
.station-market-card,
.start-station-market-listing-panel .station-market-empty {
    border-color: var(--backpage-card-border);
    background: var(--backpage-card-bg);
}

.station-market-card-auction {
    background: linear-gradient(180deg, rgba(255, 208, 120, 0.08), var(--backpage-card-bg));
}

.station-market-card-head,
.station-market-card-meta,
.station-market-card-buy-summary,
.station-market-card-buy-line,
.station-resource-overview-row,
.clan-start-resource-row,
.clan-start-station-context {
    border-color: var(--backpage-card-border);
    background: rgba(3, 8, 13, 0.52);
}
