body:has(.shaft-page) .shell {
    width: min(1980px, calc(100vw - 24px));
}

.shaft-page {
    display: grid;
    gap: 14px;
}

.shaft-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    min-height: 66px;
    overflow: hidden;
}

.shaft-header > div:first-child {
    justify-self: start;
}

.shaft-header .shaft-page-tabs {
    justify-self: center;
}

.shaft-header .header-actions {
    justify-self: end;
}

.shaft-header::after {
    content: '';
    position: absolute;
    right: 20px;
    bottom: -34px;
    width: min(34vw, 520px);
    height: 88px;
    pointer-events: none;
    background:
        linear-gradient(90deg, transparent 0 10%, rgba(88,216,210,0.42) 10% 11%, transparent 11% 28%, rgba(255,191,87,0.34) 28% 29%, transparent 29% 100%),
        linear-gradient(180deg, transparent, rgba(255,90,165,0.1));
    transform: skewX(-24deg);
}

.shaft-page-tabs {
    display: inline-flex;
    gap: 6px;
    padding: 4px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-md);
    background: rgba(7, 12, 20, 0.56);
}

.shaft-page-tab {
    min-width: 70px;
    min-height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

.shaft-page-tab.active {
    color: #071016;
    background: linear-gradient(135deg, var(--primary), var(--amber));
}

.shaft-shortcut-help-btn {
    width: 40px;
    min-width: 40px;
    padding-inline: 0;
    border-radius: 999px;
    font-size: 17px;
    font-weight: 1000;
}

.shaft-view {
    display: none;
}

.shaft-view.active {
    display: block;
}

.shaft-panel {
    padding: 14px;
    min-width: 0;
}

.shaft-command-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 14px;
}

.shaft-command-panel[hidden] {
    display: none;
}

.shaft-title-fields,
.shaft-command-actions,
.shaft-market-filters,
.shaft-buff-editor,
.shaft-enemy-grid,
.shaft-axis-toolbar,
.shaft-library-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
}

.shaft-title-fields label,
.shaft-enemy-grid label,
.shaft-buff-editor label,
.shaft-member-form label,
.shaft-loadout-grid label,
.shaft-step-row label,
.shaft-detail-grid label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
}

.shaft-title-fields label:first-child {
    min-width: min(280px, 100%);
}

.shaft-title-fields label:last-child {
    min-width: min(460px, 100%);
    flex: 1;
}

.shaft-page input,
.shaft-page select {
    min-height: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(7, 12, 20, 0.92);
    color: var(--text);
    padding: 8px 10px;
    outline: none;
}

.shaft-page input:focus,
.shaft-page select:focus {
    border-color: rgba(88,216,210,0.62);
    box-shadow: 0 0 0 3px rgba(88,216,210,0.1);
}

.shaft-build-layout {
    display: grid;
    grid-template-columns: minmax(220px, 250px) minmax(700px, 1fr) minmax(270px, 310px);
    gap: 14px;
    align-items: start;
}

.shaft-build-layout .shaft-substat-grid {
    grid-template-columns: repeat(auto-fit, minmax(94px, 1fr));
}

.shaft-build-layout .shaft-member-card {
    grid-template-columns: 1fr;
}

.shaft-build-layout .shaft-member-identity {
    position: relative;
    grid-template-columns: auto 64px minmax(0, 1fr);
    justify-items: start;
    align-items: center;
    padding: 8px 58px 8px 10px;
}

.shaft-build-layout .shaft-member-avatar {
    width: 64px;
    height: 64px;
}

.shaft-build-layout .shaft-member-identity strong {
    text-align: left;
}

.shaft-build-layout .shaft-member-identity small {
    grid-column: 3;
}

.shaft-build-layout .shaft-loadout-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shaft-build-layout .shaft-cartridge-tuning {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
        "title title"
        "cartridge main"
        "passive result";
}

.shaft-market-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

.shaft-rotation-layout {
    --shaft-rotation-panel-height: min(720px, calc(100vh - 28px));
    display: grid;
    grid-template-columns: 300px minmax(520px, 1fr) 320px;
    gap: 12px;
    align-items: start;
}

.shaft-team-panel,
.shaft-build-summary,
.shaft-build-overview,
.shaft-result-panel,
.shaft-command-library,
.shaft-axis-panel,
.shaft-detail-panel,
.shaft-buff-panel,
.shaft-market-panel,
.shaft-my-axis-panel {
    display: grid;
    gap: 14px;
}

.shaft-build-summary,
.shaft-build-overview {
    position: sticky;
    top: 14px;
}

.shaft-build-overview-title {
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.shaft-data-version,
.shaft-status {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.shaft-status[data-tone="error"] {
    color: var(--danger);
}

.shaft-status[data-tone="dirty"] {
    color: var(--warning);
}

.shaft-team-slots {
    display: grid;
    gap: 14px;
}

.shaft-member-card {
    position: relative;
    display: grid;
    grid-template-columns: 126px minmax(0, 1fr);
    gap: 14px;
    min-height: 282px;
    padding: 12px;
    scroll-margin-top: 14px;
    overflow: visible;
    border: 1px solid rgba(255,255,255,0.12);
    border-left: 4px solid var(--slot-color, var(--primary));
    border-radius: var(--radius-md);
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--slot-color, var(--primary)) 18%, transparent), transparent 34%),
        rgba(255,255,255,0.045);
}

.shaft-member-identity {
    min-width: 0;
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 9px;
    padding: 10px 8px;
    border-radius: var(--radius-sm);
    background: rgba(7, 12, 20, 0.5);
}

.shaft-member-slot {
    justify-self: start;
    color: color-mix(in srgb, var(--slot-color, var(--primary)) 76%, white);
    font-size: 12px;
    font-weight: 1000;
    letter-spacing: 0;
}

.shaft-member-avatar {
    width: 78px;
    height: 78px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid color-mix(in srgb, var(--slot-color, var(--primary)) 70%, rgba(255,255,255,0.18));
    background: rgba(7, 12, 20, 0.76);
}

.shaft-member-identity strong {
    max-width: 100%;
    color: var(--text);
    font-size: 20px;
    line-height: 1.08;
    text-align: center;
    overflow-wrap: anywhere;
}

.shaft-member-identity small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
}

.shaft-member-editor {
    position: relative;
    min-width: 0;
    display: grid;
    gap: 10px;
}

.shaft-character-select {
    position: relative;
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
}

.shaft-build-character-picker:has(.shaft-build-character-popover:not([hidden])) {
    z-index: 50;
}

.shaft-build-character-trigger {
    min-height: 40px;
}

.shaft-build-character-trigger .shaft-character-filter-selected img {
    margin-right: 0;
    border: 0;
    border-radius: 8px;
}

.shaft-build-character-trigger .shaft-character-filter-selected b {
    margin-left: 0;
}

.shaft-build-character-popover {
    width: min(620px, calc(100vw - 48px));
}

.shaft-build-layout .shaft-member-identity .shaft-mechanism-tooltip {
    top: 50%;
    right: 22px;
    transform: translateY(-50%);
}

.shaft-mechanism-tooltip {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 8;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 218, 91, 0.58);
    border-radius: 999px;
    color: #071016;
    background: linear-gradient(135deg, #ffda5b, var(--slot-color, var(--primary)));
    box-shadow: 0 0 14px rgba(255, 218, 91, 0.2);
    cursor: help;
}

.shaft-mechanism-icon {
    font-size: 13px;
    font-weight: 1000;
    line-height: 1;
}

.shaft-mechanism-popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 40;
    width: min(420px, calc(100vw - 48px));
    max-height: min(520px, 66vh);
    display: grid;
    gap: 10px;
    padding: 12px 14px;
    overflow: auto;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 10px;
    color: rgba(255,255,255,0.94);
    background: rgba(10, 16, 28, 0.98);
    box-shadow: 0 16px 36px rgba(0,0,0,0.44);
    font-size: 12px;
    line-height: 1.45;
    text-align: left;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
    pointer-events: none;
}

.shaft-mechanism-tooltip:hover .shaft-mechanism-popover,
.shaft-mechanism-tooltip:focus .shaft-mechanism-popover,
.shaft-mechanism-tooltip:focus-visible .shaft-mechanism-popover {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.shaft-member-card:has(.shaft-mechanism-tooltip:hover),
.shaft-member-card:has(.shaft-mechanism-tooltip:focus) {
    z-index: 20;
}

.shaft-mechanism-title {
    color: #ffda5b;
    font-size: 13px;
}

.shaft-mechanism-group {
    display: grid;
    gap: 4px;
    padding-top: 9px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.78);
}

.shaft-mechanism-group > strong {
    color: rgba(255,255,255,0.98);
}

.shaft-mechanism-item {
    display: grid;
    gap: 2px;
}

.shaft-mechanism-item b {
    color: rgba(255,255,255,0.88);
    font-weight: 900;
}

.shaft-mechanism-item small {
    padding-left: 11px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    line-height: 1.45;
}

.shaft-mechanism-empty {
    color: var(--muted);
}

.shaft-member-form {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.shaft-member-form label:nth-child(1),
.shaft-member-form label:nth-child(2),
.shaft-member-form label:nth-child(3) {
    grid-column: 1 / -1;
}

.shaft-loadout-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr 1fr;
    gap: 8px;
}

.shaft-loadout-grid select {
    width: 100%;
}

.shaft-arc-refinement-summary {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.shaft-member-switches {
    display: grid;
    grid-template-columns: minmax(250px, 1fr) minmax(170px, auto);
    gap: 8px;
    align-items: stretch;
}

.shaft-awakening-control,
.shaft-bond-toggle {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-sm);
    background: rgba(7, 12, 20, 0.5);
}

.shaft-awakening-control > span,
.shaft-bond-toggle span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 1000;
}

.shaft-awakening-dots {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.shaft-awakening-dot {
    position: relative;
    display: inline-grid;
    place-items: center;
    cursor: pointer;
}

.shaft-awakening-dot input,
.shaft-bond-toggle input {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    opacity: 0;
    pointer-events: none;
}

.shaft-awakening-dot span {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255,255,255,0.045);
    font-size: 12px;
    font-weight: 1000;
}

.shaft-awakening-dot input:checked + span {
    color: #071016;
    border-color: color-mix(in srgb, var(--slot-color, var(--primary)) 76%, white);
    background: linear-gradient(135deg, var(--slot-color, var(--primary)), var(--amber));
}

.shaft-awakening-info {
    cursor: help;
    user-select: none;
}

.shaft-awakening-info span {
    border-color: rgba(255,255,255,0.16);
    color: rgba(255,255,255,0.38);
    background: rgba(255,255,255,0.035);
    box-shadow: none;
}

.shaft-awakening-info.is-active span {
    border-color: rgba(255, 218, 91, 0.7);
    color: #071016;
    background: linear-gradient(135deg, #ffda5b, var(--slot-color, var(--primary)));
    box-shadow: 0 0 14px rgba(255, 218, 91, 0.24);
}

.shaft-awakening-dot[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 9px);
    z-index: 30;
    width: max-content;
    max-width: min(360px, 72vw);
    padding: 9px 11px;
    transform: translate(-50%, 4px);
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 8px;
    background: rgba(10, 16, 28, 0.98);
    box-shadow: 0 12px 26px rgba(0,0,0,0.38);
    color: rgba(255,255,255,0.94);
    font-size: 12px;
    font-weight: 850;
    line-height: 1.42;
    white-space: pre-line;
    text-align: left;
    opacity: 0;
    transition: opacity 120ms ease, transform 120ms ease;
    pointer-events: none;
}

.shaft-awakening-dot[data-tooltip]:hover::after,
.shaft-awakening-dot[data-tooltip]:focus-within::after {
    opacity: 1;
    transform: translate(-50%, 0);
}

.shaft-awakening-dot:focus-within span,
.shaft-bond-toggle:focus-within {
    box-shadow: 0 0 0 3px rgba(88,216,210,0.12);
}

.shaft-bond-toggle {
    justify-content: center;
    cursor: pointer;
}

.shaft-bond-toggle span::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 7px;
    border-radius: 999px;
    background: rgba(255,255,255,0.2);
}

.shaft-bond-toggle:has(input:checked) {
    border-color: color-mix(in srgb, var(--slot-color, var(--primary)) 60%, rgba(255,255,255,0.18));
    background: color-mix(in srgb, var(--slot-color, var(--primary)) 15%, rgba(7,12,20,0.65));
}

.shaft-bond-toggle:has(input:checked) span {
    color: var(--text);
}

.shaft-bond-toggle:has(input:checked) span::before {
    background: var(--slot-color, var(--primary));
}

.shaft-skill-levels {
    display: grid;
    grid-template-columns: minmax(130px, auto) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-sm);
    background: rgba(7, 12, 20, 0.42);
}

.shaft-skill-levels > div:first-child {
    display: grid;
    gap: 2px;
}

.shaft-skill-levels span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 1000;
}

.shaft-skill-levels strong {
    color: var(--text);
    font-size: 14px;
    line-height: 1.1;
}

.shaft-skill-level-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(68px, 1fr));
    gap: 8px;
}

.shaft-skill-level-tile {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 6px;
    align-items: center;
}

.shaft-skill-level-tile input {
    width: 100%;
    min-height: 32px;
    padding: 5px 7px;
    text-align: center;
    font-weight: 1000;
}

.shaft-cartridge-tuning {
    display: grid;
    grid-template-columns: minmax(140px, 1.1fr) minmax(180px, 1.7fr) repeat(3, minmax(116px, 1fr));
    grid-template-areas:
        "title cartridge cartridge main main"
        "passive passive result result result";
    gap: 8px;
    align-items: end;
    padding: 8px 10px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-sm);
    background: rgba(7, 12, 20, 0.42);
}

.shaft-cartridge-select {
    grid-area: cartridge;
}

.shaft-tuning-title {
    grid-area: title;
    display: grid;
    gap: 2px;
    align-self: center;
}

.shaft-main-stat-select {
    grid-area: main;
}

.shaft-curtain-passive-output {
    grid-area: passive;
}

.shaft-curtain-result-output {
    grid-area: result;
}

.shaft-tuning-title span,
.shaft-cartridge-tuning label span,
.shaft-cartridge-tuning output span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 1000;
}

.shaft-tuning-title strong,
.shaft-cartridge-tuning output strong {
    color: var(--text);
    font-size: 14px;
    line-height: 1.1;
}

.shaft-cartridge-tuning label {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.shaft-cartridge-tuning select,
.shaft-cartridge-tuning input {
    width: 100%;
    min-height: 34px;
    font-weight: 900;
}

.shaft-cartridge-tuning output {
    min-height: 34px;
    display: grid;
    gap: 2px;
    align-content: center;
    justify-items: start;
    padding: 5px 8px;
    border: 1px solid color-mix(in srgb, var(--slot-color, var(--primary)) 50%, rgba(255,255,255,0.14));
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--slot-color, var(--primary)) 12%, rgba(255,255,255,0.04));
}

.shaft-substat-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 10px;
    padding-top: 2px;
}

.shaft-substat-head div {
    display: grid;
    gap: 2px;
}

.shaft-substat-head span,
.shaft-substat-head em {
    color: var(--muted);
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
}

.shaft-substat-head strong {
    color: var(--text);
    font-size: 15px;
    line-height: 1.1;
}

.shaft-substat-total-tooltip {
    position: relative;
    width: max-content;
    cursor: help;
    outline: none;
}

.shaft-substat-total-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 0;
    bottom: calc(100% + 8px);
    z-index: 40;
    width: max-content;
    max-width: min(390px, 72vw);
    padding: 9px 11px;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 8px;
    background: rgba(10, 16, 28, 0.98);
    box-shadow: 0 12px 26px rgba(0,0,0,0.38);
    color: rgba(255,255,255,0.94);
    font-size: 12px;
    font-weight: 850;
    line-height: 1.45;
    white-space: normal;
    text-align: left;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 120ms ease, transform 120ms ease;
    pointer-events: none;
}

.shaft-substat-total-tooltip:hover::after,
.shaft-substat-total-tooltip:focus::after {
    opacity: 1;
    transform: translateY(0);
}

.shaft-substat-total-tooltip:focus-visible {
    border-radius: 4px;
    box-shadow: 0 0 0 2px rgba(88,216,210,0.34);
}

.shaft-substat-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(6, minmax(94px, 1fr));
    gap: 8px;
    align-content: start;
}

.shaft-substat-tile {
    display: grid;
    gap: 6px;
    min-height: 86px;
    padding: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    background: rgba(7, 12, 20, 0.44);
}

.shaft-substat-name {
    color: var(--text);
    font-size: 12px;
    font-weight: 1000;
}

.shaft-substat-tile small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
}

.shaft-substat-entry {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px;
    align-items: center;
}

.shaft-substat-entry input {
    min-height: 32px;
    width: 100%;
    padding: 5px 7px;
    text-align: center;
    font-weight: 1000;
}

.shaft-substat-entry b {
    color: var(--muted);
    font-size: 11px;
}

.shaft-substat-meter {
    height: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
}

.shaft-substat-meter i {
    display: block;
    width: var(--count-pct, 0%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--slot-color, var(--primary)), var(--amber));
}

.shaft-team-bonus-panel {
    display: grid;
    gap: 10px;
}

.shaft-team-bonus-panel .section-title-row span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
}

.shaft-team-bonus-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(72px, 1fr));
    gap: 8px;
}

.shaft-team-bonus-tile {
    position: relative;
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    background: rgba(7, 12, 20, 0.5);
}

.shaft-team-bonus-tile span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 1000;
    white-space: nowrap;
}

.shaft-team-bonus-tile strong {
    color: var(--text);
    font-size: 18px;
    line-height: 1;
}

.shaft-team-bonus-input {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px;
    align-items: center;
}

.shaft-team-bonus-input input {
    width: 100%;
    min-height: 34px;
    padding: 5px 6px;
    text-align: center;
    font-weight: 1000;
}

.shaft-team-bonus-input b {
    color: var(--text);
    font-size: 12px;
}

.shaft-team-bonus-tile small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
}

.shaft-checkline {
    min-height: 40px;
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 8px !important;
    padding: 8px 10px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.045);
}

.shaft-checkline input {
    min-height: auto;
    width: 16px;
    height: 16px;
}

.shaft-weakness-row,
.shaft-target-slots,
.shaft-command-type-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.shaft-chip,
.shaft-type-chip {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    color: var(--text);
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 900;
}

.shaft-type-chip.active {
    color: #071016;
    border-color: rgba(88,216,210,0.74);
    background: linear-gradient(135deg, var(--primary), var(--amber));
}

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

.shaft-compare-controls {
    display: grid;
    gap: 10px;
}

.shaft-compare-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.shaft-compare-snapshot-status,
.shaft-field-hint,
.shaft-weakness-label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
}

.shaft-weakness-label {
    align-self: center;
}

.shaft-stat-card {
    min-height: 82px;
    display: grid;
    align-content: center;
    gap: 6px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    background: rgba(7, 12, 20, 0.56);
}

.shaft-stat-card span,
.shaft-contribution-row,
.shaft-market-meta,
.shaft-market-team,
.shaft-detail-muted {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.shaft-stat-card strong,
.shaft-stat-value {
    color: var(--text);
    font-size: 25px;
    line-height: 1;
    overflow-wrap: anywhere;
}

.shaft-stat-value {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: baseline;
    font-weight: 1000;
}

.shaft-stat-value b {
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    padding: 3px 7px;
    background: rgba(255,255,255,0.055);
    font-size: 12px;
    line-height: 1;
}

.shaft-stat-value small {
    flex-basis: 100%;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    line-height: 1.25;
}

.shaft-stat-value.compare-up b {
    color: #62e58b;
    border-color: rgba(98,229,139,0.34);
    background: rgba(98,229,139,0.1);
}

.shaft-stat-value.compare-down b {
    color: var(--danger);
    border-color: rgba(255,98,98,0.34);
    background: rgba(255,98,98,0.1);
}

.shaft-contribution-list {
    display: grid;
    gap: 8px;
}

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

.shaft-contribution-bar {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
}

.shaft-contribution-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--contribution-color, linear-gradient(90deg, var(--primary), var(--amber)));
}

.shaft-contribution-row:not(.shaft-contribution-source-row) + .shaft-contribution-source-row {
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.shaft-contribution-source-row {
    color: var(--text);
}

.shaft-contribution-source-row .shaft-contribution-bar span {
    background: var(--contribution-color, #b9c6d8);
}

.shaft-action-contribution-btn {
    min-height: 30px;
    padding: 5px 9px;
    white-space: nowrap;
}

.shaft-action-contribution-dialog {
    width: min(920px, calc(100vw - 32px));
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: var(--radius-lg);
    background: transparent;
    color: var(--text);
}

.shaft-action-contribution-dialog::backdrop {
    background: rgba(2, 6, 12, 0.78);
    backdrop-filter: blur(5px);
}

.shaft-shortcut-dialog {
    width: min(760px, calc(100vw - 32px));
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: var(--radius-lg);
    background: transparent;
    color: var(--text);
}

.shaft-shortcut-dialog::backdrop {
    background: rgba(2, 6, 12, 0.78);
    backdrop-filter: blur(5px);
}

.shaft-axis-preview-dialog {
    width: min(1180px, calc(100vw - 32px));
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: var(--radius-lg);
    background: transparent;
    color: var(--text);
}

.shaft-axis-preview-dialog::backdrop {
    background: rgba(2, 6, 12, 0.82);
    backdrop-filter: blur(6px);
}

.shaft-axis-preview-modal {
    display: grid;
    gap: 16px;
    padding: 22px;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: inherit;
    background: linear-gradient(145deg, rgba(18, 30, 44, 0.99), rgba(6, 11, 18, 0.99));
    box-shadow: 0 24px 80px rgba(0,0,0,0.58);
}

.shaft-axis-preview-header {
    gap: 16px;
}

.shaft-axis-preview-meta {
    max-width: min(720px, 70vw);
    margin: 5px 0 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.shaft-axis-preview-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.shaft-axis-preview-hint {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.shaft-axis-preview-viewport {
    width: 100%;
    max-height: min(570px, calc(100vh - 170px));
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid rgba(126, 224, 219, 0.2);
    border-radius: 10px;
    background: rgba(5, 10, 17, 0.94);
}

.shaft-axis-preview-canvas {
    min-width: 100%;
}

.shaft-axis-preview-ruler,
.shaft-axis-preview-track {
    position: relative;
    min-width: 100%;
}

.shaft-axis-preview-ruler {
    height: 44px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: rgba(9, 14, 23, 0.98);
}

.shaft-axis-preview-ruler-label,
.shaft-axis-preview-member {
    position: sticky;
    left: 0;
    z-index: 5;
    box-sizing: border-box;
    width: var(--preview-label-width);
    background: rgba(13, 20, 31, 0.99);
    border-right: 1px solid rgba(255,255,255,0.1);
}

.shaft-axis-preview-ruler-label {
    height: 44px;
    display: grid;
    place-items: center start;
    padding-left: 14px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.shaft-axis-preview-mark {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255,255,255,0.1);
}

.shaft-axis-preview-mark > span {
    position: absolute;
    top: 12px;
    left: 6px;
    color: rgba(221, 230, 245, 0.82);
    font-size: 10px;
    white-space: nowrap;
}

.shaft-axis-preview-track {
    height: 88px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.shaft-axis-preview-track:last-child {
    border-bottom: 0;
}

.shaft-axis-preview-member {
    position: sticky;
    height: 88px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    padding: 0 10px;
    color: rgba(243, 247, 255, 0.95);
    font-size: 12px;
    font-weight: 900;
}

.shaft-axis-preview-member img {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    object-fit: cover;
}

.shaft-axis-preview-member span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shaft-axis-preview-grid {
    position: absolute;
    inset: 0 0 0 var(--preview-label-width);
    background-image: linear-gradient(90deg, rgba(255,255,255,0.07) 1px, transparent 1px);
    pointer-events: none;
}

.shaft-axis-preview-bubble {
    position: absolute;
    top: 24px;
    z-index: 2;
    min-width: 0;
    height: 40px;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--slot-color) 72%, white 16%);
    border-radius: 14px;
    color: #f8fbff;
    background: linear-gradient(135deg, color-mix(in srgb, var(--slot-color) 58%, #101827), rgba(18,25,37,0.96));
    box-shadow: 0 10px 22px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.16);
}

.shaft-axis-preview-bubble > span {
    min-width: 0;
    overflow: hidden;
    color: white;
    font-size: 12px;
    font-weight: 950;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shaft-axis-preview-bubble > em {
    color: rgba(255,255,255,0.74);
    font-size: 10px;
    font-style: normal;
    font-weight: 900;
    white-space: nowrap;
}

.shaft-axis-preview-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.shaft-axis-preview-meta[hidden],
.shaft-axis-preview-footer[hidden] {
    display: none;
}

.shaft-shortcut-modal {
    display: grid;
    gap: 18px;
    padding: 22px;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: inherit;
    background: linear-gradient(145deg, rgba(18, 30, 44, 0.98), rgba(6, 11, 18, 0.99));
    box-shadow: 0 24px 80px rgba(0,0,0,0.54);
}

.shaft-shortcut-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.shaft-shortcut-group {
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    background: rgba(7, 12, 20, 0.56);
}

.shaft-shortcut-group:last-child {
    grid-column: 1 / -1;
}

.shaft-shortcut-group h3 {
    color: var(--text);
    font-size: 14px;
}

.shaft-shortcut-group dl {
    display: grid;
    gap: 7px;
    margin: 0;
}

.shaft-shortcut-group dl > div {
    display: grid;
    grid-template-columns: minmax(180px, auto) minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 38px;
    padding: 7px 9px;
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
}

.shaft-shortcut-group dt {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
}

.shaft-shortcut-group kbd {
    min-width: 28px;
    padding: 4px 7px;
    border: 1px solid rgba(255,255,255,0.18);
    border-bottom-color: rgba(255,255,255,0.3);
    border-radius: 6px;
    background: rgba(255,255,255,0.08);
    color: var(--text);
    font-family: inherit;
    font-size: 11px;
    font-weight: 1000;
    text-align: center;
    box-shadow: 0 2px 0 rgba(0,0,0,0.34);
}

.shaft-shortcut-group dd {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
}

.shaft-known-issues {
    display: grid;
    gap: 7px;
    margin: 0;
    padding-left: 24px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.5;
}

.shaft-known-issues li {
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
}

.shaft-action-contribution-modal {
    display: grid;
    gap: 18px;
    padding: 24px;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: inherit;
    background: linear-gradient(145deg, rgba(18, 30, 44, 0.98), rgba(6, 11, 18, 0.99));
    box-shadow: 0 24px 80px rgba(0,0,0,0.54);
}

.shaft-stagger-analysis-note {
    padding: 10px 12px;
    border: 1px solid rgba(238,244,255,0.16);
    border-radius: var(--radius-sm);
    background: rgba(238,244,255,0.06);
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    line-height: 1.5;
}

.shaft-stagger-analysis-kpis {
    margin-top: 14px;
}

.shaft-stagger-contribution-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.shaft-stagger-contribution-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid color-mix(in srgb, var(--stagger-color) 30%, rgba(255,255,255,0.1));
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--stagger-color) 7%, rgba(7,12,20,0.72));
}

.shaft-stagger-contribution-head {
    display: flex;
    gap: 12px;
    align-items: end;
    justify-content: space-between;
}

.shaft-stagger-contribution-head > div {
    display: grid;
    gap: 4px;
}

.shaft-stagger-contribution-head span,
.shaft-stagger-contribution-card dt {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
}

.shaft-stagger-contribution-head strong {
    color: var(--text);
    font-size: 22px;
}

.shaft-stagger-contribution-head b {
    color: var(--stagger-color);
    font-size: 18px;
}

.shaft-stagger-contribution-meter {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
}

.shaft-stagger-contribution-meter span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--stagger-color);
}

.shaft-stagger-contribution-card dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}

.shaft-stagger-contribution-card dl > div {
    display: grid;
    gap: 3px;
}

.shaft-stagger-contribution-card dd {
    margin: 0;
    color: var(--text);
    font-size: 12px;
    font-weight: 1000;
}

.shaft-harmony-source-list {
    grid-template-columns: 1fr;
}

.shaft-action-analysis-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}

.shaft-action-analysis-switch {
    display: inline-flex;
    gap: 3px;
    padding: 3px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 9px;
    background: rgba(0,0,0,0.22);
}

.shaft-action-analysis-switch button {
    min-height: 32px;
    padding: 5px 12px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.shaft-action-analysis-switch button:hover {
    color: var(--text);
    background: rgba(255,255,255,0.06);
}

.shaft-action-analysis-switch button.is-active {
    color: #061219;
    background: linear-gradient(135deg, #72e4dc, #58b8e7);
    box-shadow: 0 3px 10px rgba(88,216,210,0.2);
}

.shaft-action-analysis-view-switch button.is-active {
    color: var(--text);
    background: rgba(255,255,255,0.13);
    box-shadow: none;
}

.shaft-action-analysis-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 14px 0 18px;
}

.shaft-action-analysis-kpis > div {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,0.085);
    border-radius: 9px;
    background: linear-gradient(145deg, rgba(255,255,255,0.055), rgba(255,255,255,0.025));
}

.shaft-action-analysis-kpis span,
.shaft-action-analysis-kpis small {
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shaft-action-analysis-kpis strong {
    font-size: 19px;
    font-weight: 1000;
}

.shaft-action-analysis-kpis small.is-up,
.shaft-action-analysis-snapshot .is-up,
.shaft-action-contribution-item .is-up {
    color: #72e6ad;
}

.shaft-action-analysis-kpis small.is-down,
.shaft-action-analysis-snapshot .is-down,
.shaft-action-contribution-item .is-down {
    color: #ff8e92;
}

.shaft-action-analysis-snapshot {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 16px;
    align-items: center;
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(98,183,255,0.2);
    border-radius: 9px;
    background: linear-gradient(110deg, rgba(98,183,255,0.09), rgba(178,140,255,0.045));
}

.shaft-action-analysis-snapshot > div {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 12px;
    align-items: baseline;
}

.shaft-action-analysis-snapshot span,
.shaft-action-analysis-snapshot small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 850;
}

.shaft-action-analysis-snapshot > b {
    grid-row: 1 / span 2;
    grid-column: 2;
    font-size: 16px;
    font-weight: 1000;
}

.shaft-action-analysis-snapshot strong,
.shaft-action-contribution-item > strong {
    display: inline-flex;
    gap: 5px;
    align-items: baseline;
    white-space: nowrap;
}

.shaft-action-analysis-relative {
    font-size: 10px;
    font-weight: 900;
}

.shaft-action-analysis-snapshot > small {
    grid-column: 1;
}

.shaft-action-analysis-snapshot-empty {
    grid-template-columns: minmax(0, 1fr) auto;
    border-color: rgba(255,255,255,0.09);
    background: rgba(255,255,255,0.035);
}

.shaft-action-analysis-snapshot-empty > span {
    font-size: 11px;
}

.shaft-dialog-close {
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 22px;
    line-height: 1;
}

.shaft-action-contribution-body {
    display: grid;
    grid-template-columns: minmax(250px, 0.85fr) minmax(340px, 1.15fr);
    gap: 24px;
    align-items: center;
}

.shaft-action-contribution-chart {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    min-width: 0;
}

.shaft-action-contribution-pie {
    grid-area: 1 / 1;
    width: min(100%, 310px);
    overflow: visible;
    filter: drop-shadow(0 12px 22px rgba(0,0,0,0.28));
}

.shaft-action-contribution-segment {
    cursor: pointer;
    outline: none;
    transform-box: fill-box;
    transform-origin: center;
    transition: transform 160ms ease, opacity 160ms ease, filter 160ms ease;
}

.shaft-action-contribution-segment:hover,
.shaft-action-contribution-segment:focus,
.shaft-action-contribution-segment.is-active {
    transform: translate(var(--explode-x), var(--explode-y)) scale(1.015);
    filter: brightness(1.12) drop-shadow(0 3px 4px rgba(0,0,0,0.38));
}

.shaft-action-contribution-segment.is-muted {
    opacity: 0.38;
}

.shaft-action-chart-center {
    grid-area: 1 / 1;
    z-index: 1;
    pointer-events: none;
    display: grid;
    place-items: center;
    max-width: 116px;
    text-align: center;
}

.shaft-action-chart-center strong {
    font-size: 24px;
    font-weight: 1000;
    line-height: 1.05;
}

.shaft-action-chart-center span {
    margin-top: 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    line-height: 1.3;
}

.shaft-action-contribution-legend {
    display: grid;
    gap: 8px;
    max-height: min(420px, 60vh);
    padding: 2px 4px 2px 2px;
    overflow-x: hidden;
    overflow-y: auto;
}

.shaft-action-contribution-item {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) auto 52px;
    gap: 9px;
    align-items: center;
    min-height: 38px;
    padding: 7px 9px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: rgba(255,255,255,0.045);
    color: var(--text);
    font: inherit;
    font-size: 12px;
    text-align: left;
    cursor: pointer;
    transition: border-color 140ms ease, background 140ms ease, opacity 140ms ease, transform 140ms ease;
}

.shaft-action-contribution-item:hover,
.shaft-action-contribution-item:focus,
.shaft-action-contribution-item.is-active {
    border-color: color-mix(in srgb, var(--action-color, #58d8d2) 45%, transparent);
    background: rgba(255,255,255,0.085);
    outline: none;
    transform: translateX(2px);
}

.shaft-action-contribution-item.is-muted {
    opacity: 0.38;
}

.shaft-action-contribution-item i {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: var(--action-color);
}

.shaft-action-contribution-item > span {
    display: grid;
    gap: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shaft-action-contribution-item > span b {
    overflow: hidden;
    text-overflow: ellipsis;
}

.shaft-action-contribution-item > span small {
    color: var(--muted);
    font-size: 10px;
}

.shaft-action-contribution-item > strong {
    color: var(--muted);
    font-size: 12px;
}

.shaft-action-contribution-item > em {
    display: grid;
    gap: 2px;
    font-style: normal;
    font-weight: 1000;
    text-align: right;
    font-size: 12px;
}

.shaft-action-contribution-item > em small {
    font-size: 9px;
    font-weight: 900;
}

.shaft-action-contribution-item.is-removed {
    border-style: dashed;
    opacity: 0.72;
}

.shaft-action-contribution-chart-bars {
    display: block;
    aspect-ratio: auto;
}

.shaft-action-analysis-bars {
    display: grid;
    gap: 12px;
    width: 100%;
}

.shaft-action-analysis-bar {
    display: grid;
    gap: 5px;
    padding: 4px;
    border-radius: 7px;
    transition: opacity 140ms ease, background 140ms ease;
}

.shaft-action-analysis-bar > div {
    display: flex;
    gap: 8px;
    justify-content: space-between;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
}

.shaft-action-analysis-bar > i {
    position: relative;
    height: 12px;
    overflow: hidden;
    border-radius: 3px;
    background: rgba(255,255,255,0.07);
}

.shaft-action-analysis-bar > i em {
    position: absolute;
    z-index: 2;
    top: -2px;
    bottom: -2px;
    width: 2px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(5,10,17,0.55), 0 0 6px rgba(255,255,255,0.55);
    transform: translateX(-1px);
}

.shaft-action-analysis-bar > i span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, color-mix(in srgb, var(--action-color) 75%, #fff), var(--action-color));
    box-shadow: 0 0 12px color-mix(in srgb, var(--action-color) 42%, transparent);
    transform-origin: left;
    transition: transform 160ms ease, filter 160ms ease;
}

.shaft-action-analysis-bar:hover,
.shaft-action-analysis-bar:focus,
.shaft-action-analysis-bar.is-active {
    background: rgba(255,255,255,0.05);
    outline: none;
}

.shaft-action-analysis-bar:hover > i span,
.shaft-action-analysis-bar:focus > i span,
.shaft-action-analysis-bar.is-active > i span {
    transform: scaleY(1.22);
    filter: brightness(1.16);
}

.shaft-action-analysis-bar.is-muted {
    opacity: 0.35;
}

.shaft-panel-avatar-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.shaft-panel-avatar {
    position: relative;
    width: 48px;
    height: 48px;
    padding: 0;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(7,12,20,0.68);
    cursor: pointer;
}

.shaft-panel-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
}

.shaft-panel-avatar b {
    position: absolute;
    right: 4px;
    bottom: 4px;
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: rgba(7,12,20,0.82);
    color: var(--text);
    font-size: 11px;
    font-weight: 1000;
}

.shaft-panel-avatar.active {
    border-color: color-mix(in srgb, var(--slot-color, var(--primary)) 76%, white);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--slot-color, var(--primary)) 20%, transparent);
}

.shaft-panel-avatar.active img {
    opacity: 1;
}

.shaft-panel-profile {
    display: grid;
    gap: 4px;
    padding: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    background: rgba(7,12,20,0.42);
}

.shaft-panel-profile div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.shaft-panel-profile span,
.shaft-panel-profile small,
.shaft-panel-major small,
.shaft-panel-minor span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
}

.shaft-panel-profile strong {
    color: var(--text);
    font-size: 18px;
    line-height: 1.05;
}

.shaft-panel-major-grid {
    display: grid;
    gap: 8px;
}

.shaft-panel-major {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 3px 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    background: rgba(7,12,20,0.54);
}

.shaft-panel-major span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 1000;
}

.shaft-panel-major strong {
    color: var(--text);
    font-size: 22px;
    line-height: 1;
    text-align: right;
}

.shaft-panel-major small {
    grid-column: 1 / -1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shaft-panel-minor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.shaft-panel-minor {
    display: grid;
    gap: 3px;
    min-height: 58px;
    align-content: center;
    padding: 9px 10px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.045);
}

.shaft-panel-minor strong {
    color: var(--text);
    font-size: 17px;
    line-height: 1;
}

.shaft-command-library {
    position: sticky;
    top: 14px;
    max-height: calc(100vh - 28px);
    overflow: auto;
}

.shaft-search {
    flex: 1;
    min-width: 180px;
}

.shaft-search input {
    width: 100%;
}

.shaft-command-list {
    display: grid;
    gap: 8px;
}

.shaft-command-card {
    min-height: 78px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.045);
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.shaft-command-card:hover {
    transform: translateY(-1px);
    border-color: rgba(88,216,210,0.48);
    background: rgba(255,255,255,0.07);
}

.shaft-command-card strong,
.shaft-buff-item strong,
.shaft-market-card strong {
    color: var(--text);
    font-size: 14px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.shaft-command-card span,
.shaft-buff-item span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.shaft-command-card button {
    min-width: 58px;
    min-height: 34px;
    padding: 7px 10px;
}

.shaft-axis-toolbar {
    justify-content: space-between;
}

.shaft-timeline-shell {
    display: grid;
    gap: 0;
    overflow-x: auto;
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: var(--radius-md);
    background:
        repeating-linear-gradient(90deg, rgba(255,255,255,0.035) 0 1px, transparent 1px 58px),
        rgba(7, 12, 20, 0.44);
}

.shaft-time-ruler {
    position: relative;
    min-width: 840px;
    height: 34px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.shaft-ruler-mark {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255,255,255,0.1);
}

.shaft-ruler-mark span {
    position: absolute;
    top: 8px;
    left: 5px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
}

.shaft-timeline {
    position: relative;
    display: grid;
    gap: 8px;
    min-width: 840px;
    min-height: 392px;
    padding: 12px;
    cursor: crosshair;
}

.shaft-time-track {
    position: relative;
    height: 32px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.035);
}

.shaft-time-track.action-track {
    height: 62px;
}

.shaft-track-label {
    position: absolute;
    left: 8px;
    top: 50%;
    z-index: 3;
    color: rgba(255,255,255,0.74);
    font-size: 11px;
    font-weight: 900;
    transform: translateY(-50%);
    pointer-events: none;
}

.shaft-front-window,
.shaft-action-bar,
.shaft-cursor-line {
    position: absolute;
}

.shaft-front-window {
    top: 5px;
    min-width: 8px;
    height: 22px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,191,87,0.2);
}

.shaft-action-bar {
    top: 12px;
    min-width: 0;
    height: 38px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    padding: 0 8px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.16);
    color: #f8fbff;
    font-size: 11px;
    font-weight: 900;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    cursor: grab;
    box-shadow: 0 10px 22px rgba(0,0,0,0.22);
}

body.shaft-dragging,
body.shaft-dragging .shaft-action-bar {
    cursor: grabbing;
}

.shaft-action-bar.selected {
    outline: 2px solid rgba(255,255,255,0.72);
    outline-offset: 2px;
}

.shaft-action-bar.background-damage {
    background-image: repeating-linear-gradient(
        135deg,
        rgba(255,255,255,0.13) 0 4px,
        rgba(255,255,255,0.02) 4px 8px
    );
}

.shaft-cursor-line {
    top: 0;
    bottom: 0;
    width: 2px;
    z-index: 5;
    background: rgba(255, 98, 98, 0.9);
    box-shadow: 0 0 18px rgba(255,98,98,0.36);
    pointer-events: none;
}

.shaft-step-list,
.shaft-buff-list,
.shaft-market-list {
    display: grid;
    gap: 8px;
}

.shaft-step-row {
    display: grid;
    grid-template-columns: 72px 110px minmax(180px, 1fr) 88px 90px 42px;
    gap: 8px;
    align-items: end;
    min-height: 64px;
    padding: 9px;
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.045);
}

.shaft-step-row.selected {
    border-color: rgba(88,216,210,0.68);
    box-shadow: inset 0 0 0 1px rgba(88,216,210,0.18);
}

.shaft-step-row output {
    display: grid;
    gap: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
}

.shaft-step-row output strong {
    color: var(--text);
    font-size: 13px;
}

.shaft-remove-btn {
    width: 40px;
    min-width: 40px;
    padding: 0;
}

.shaft-detail-panel {
    position: sticky;
    top: 14px;
    max-height: calc(100vh - 28px);
    overflow: auto;
}

.shaft-step-detail {
    display: grid;
    gap: 12px;
}

.shaft-detail-hero {
    display: grid;
    gap: 6px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    background: rgba(7,12,20,0.55);
}

.shaft-detail-hero strong {
    font-size: 18px;
}

.shaft-detail-hero .shaft-detail-line-list {
    display: grid;
    gap: 4px;
    color: var(--text);
    font-size: 13px;
    line-height: 1.42;
    white-space: normal;
}

.shaft-detail-line-list span {
    display: block;
    overflow-wrap: anywhere;
}

.shaft-detail-multiplier {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 76px;
    gap: 6px 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(126,224,219,0.24);
    border-radius: var(--radius-md);
    background: rgba(126,224,219,0.07);
}

.shaft-detail-multiplier span {
    color: var(--text);
    font-weight: 950;
}

.shaft-detail-multiplier button {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    box-sizing: border-box;
    padding-inline: 10px;
    font-weight: 950;
}

.shaft-detail-multiplier small {
    grid-column: 1 / -1;
    color: var(--muted);
    line-height: 1.45;
}

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

.shaft-detail-kv {
    display: grid;
    gap: 3px;
    min-height: 58px;
    padding: 10px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.04);
}

.shaft-detail-kv span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
}

.shaft-detail-kv strong {
    color: var(--text);
    font-size: 14px;
    overflow-wrap: anywhere;
}

.shaft-buff-panel {
    margin-top: 14px;
}

.shaft-buff-editor label {
    min-width: 122px;
}

.shaft-buff-item,
.shaft-market-card {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.045);
}

.shaft-buff-item {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.shaft-market-card {
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.shaft-market-card:hover {
    border-color: rgba(88,216,210,0.5);
    background: rgba(255,255,255,0.07);
    transform: translateY(-1px);
}

.shaft-market-filters {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(0, 1fr) 130px;
}

.shaft-my-axis-filters {
    grid-template-columns: minmax(150px, 1fr) 104px minmax(0, 1fr) 112px;
}

.shaft-axis-total {
    margin-left: 4px;
    color: var(--muted);
    font-size: 0.72em;
    font-variant-numeric: tabular-nums;
}

.shaft-search-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

.shaft-search-loading::before {
    width: 14px;
    height: 14px;
    content: "";
    border: 2px solid rgba(88, 216, 210, 0.24);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: shaft-search-spin 0.7s linear infinite;
}

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

.shaft-character-filter {
    position: relative;
    min-width: 0;
}

.shaft-character-filter-trigger {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 5px 10px;
    color: var(--text);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: var(--radius-sm);
    background: rgba(7, 12, 20, 0.92);
}

.shaft-character-filter-trigger small {
    flex: 0 0 auto;
    color: var(--muted);
    font-weight: 800;
}

.shaft-character-filter-selected {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.shaft-character-filter-selected img {
    width: 28px;
    height: 28px;
    margin-right: -10px;
    object-fit: cover;
    border: 2px solid rgba(7,12,20,0.9);
    border-radius: 50%;
}

.shaft-character-filter-selected b {
    margin-left: 10px;
    overflow: hidden;
    color: var(--text);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shaft-character-filter-popover {
    position: absolute;
    z-index: 30;
    top: calc(100% + 7px);
    left: 0;
    width: min(620px, calc(100vw - 48px));
    padding: 10px;
    border: 1px solid rgba(88,216,210,0.34);
    border-radius: var(--radius-md);
    background: rgba(10, 17, 28, 0.98);
    box-shadow: 0 18px 48px rgba(0,0,0,0.42);
}

.shaft-character-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(110px, 1fr));
    gap: 7px;
    max-height: 330px;
    overflow: auto;
}

.shaft-character-filter-option {
    min-width: 0;
    min-height: 52px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    padding: 5px 7px;
    color: var(--text);
    text-align: left;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.04);
}

.shaft-character-filter-option:hover,
.shaft-character-filter-option.selected {
    border-color: rgba(88,216,210,0.64);
    background: rgba(88,216,210,0.12);
}

.shaft-character-filter-option img {
    width: 38px;
    height: 38px;
    object-fit: cover;
    border-radius: 9px;
    background: rgba(255,255,255,0.06);
}

.shaft-character-filter-option span {
    overflow: hidden;
    font-size: 12px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shaft-character-filter-option small,
.shaft-own-axis-note {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.shaft-character-filter-clear {
    width: 100%;
    margin-top: 9px;
}

.shaft-market-card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.shaft-market-card-badges {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
}

.shaft-market-card-badges > span {
    flex: 0 0 auto;
    color: var(--primary);
    font-size: 11px;
    font-weight: 900;
}

.shaft-market-card-badges .shaft-axis-mode-badge {
    padding: 2px 7px;
    border: 1px solid rgba(88, 216, 210, 0.34);
    border-radius: 999px;
    background: rgba(88, 216, 210, 0.1);
}

.shaft-market-team {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.shaft-market-character {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 5px;
    color: var(--text);
    font-size: 11px;
}

.shaft-market-character img {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
}

.shaft-market-character b {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shaft-market-description {
    min-height: 1.4em;
    margin: 0;
    overflow: hidden;
    color: rgba(232, 241, 248, 0.78);
    font-size: 12px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shaft-market-description.is-empty {
    color: var(--muted);
    font-style: italic;
}

.shaft-toast {
    position: fixed;
    z-index: 100;
    left: 50%;
    bottom: 34px;
    padding: 11px 18px;
    color: #071016;
    font-size: 13px;
    font-weight: 900;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), #8ff5ce);
    box-shadow: 0 12px 34px rgba(0,0,0,0.36);
    opacity: 0;
    transform: translate(-50%, 10px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.shaft-toast.visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.shaft-toast[data-tone="warning"] {
    background: linear-gradient(135deg, var(--amber), #ffd998);
}

.shaft-market-stats,
.shaft-market-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.shaft-market-stats span {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 5px 8px;
    border-radius: var(--radius-sm);
    background: rgba(7, 12, 20, 0.62);
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
}

.shaft-market-actions button {
    min-height: 34px;
    padding: 7px 10px;
}

.shaft-market-actions .shaft-publish-axis-btn {
    margin-left: auto;
}

.shaft-market-actions button.active {
    color: #071016;
    border-color: rgba(88,216,210,0.74);
    background: linear-gradient(135deg, var(--primary), var(--amber));
}

.shaft-market-actions .shaft-dislike-btn.active {
    color: #fff7f5;
    border-color: rgba(255, 112, 104, 0.78);
    background: linear-gradient(135deg, #b53838, #ee765e);
}

.shaft-load-more {
    width: 100%;
}

.shaft-name-conflict-dialog {
    width: min(520px, calc(100vw - 32px));
}

.shaft-name-conflict-modal p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.shaft-name-conflict-modal label {
    display: grid;
    gap: 7px;
}

.shaft-name-conflict-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.shaft-share-open-actions {
    flex-wrap: wrap;
}

.shaft-empty {
    min-height: 56px;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    border: 1px dashed rgba(255,255,255,0.12);
    border-radius: var(--radius-md);
}

/* Rotation workbench */
.shaft-panel-kicker {
    display: block;
    margin-bottom: 3px;
    color: rgba(170, 184, 204, 0.82);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.shaft-command-library,
.shaft-axis-panel,
.shaft-detail-panel {
    border-color: rgba(126, 224, 219, 0.18);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.025)),
        rgba(9, 14, 23, 0.82);
}

.shaft-command-library {
    position: sticky;
    top: 10px;
    height: var(--shaft-rotation-panel-height);
    max-height: none;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    overflow: hidden;
}

.shaft-command-library .section-title-row {
    align-items: center;
}

.shaft-command-library .section-title-row > select {
    display: none;
}

.shaft-command-library h2,
.shaft-axis-panel h2,
.shaft-detail-panel h2,
.shaft-step-drawer h3 {
    margin: 0;
    line-height: 1;
}

.shaft-team-dock {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 6px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 999px;
    background: rgba(7,12,20,0.48);
}

.shaft-operator-card {
    --slot-color: var(--primary);
    position: relative;
    width: 54px;
    height: 54px;
    min-height: 54px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--slot-color) 22%, transparent), transparent 60%),
        rgba(255,255,255,0.045);
}

.shaft-operator-card.active {
    border-color: color-mix(in srgb, var(--slot-color) 70%, white);
    box-shadow:
        0 0 0 3px rgba(7,12,20,0.9),
        0 0 0 5px color-mix(in srgb, var(--slot-color) 48%, transparent),
        0 10px 24px color-mix(in srgb, var(--slot-color) 16%, transparent);
}

.shaft-operator-card img {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid color-mix(in srgb, var(--slot-color) 70%, transparent);
    background: rgba(7,12,20,0.7);
}

.shaft-operator-card b {
    position: absolute;
    right: -3px;
    bottom: -3px;
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #071016;
    font-size: 10px;
    font-weight: 950;
    background: color-mix(in srgb, var(--slot-color) 28%, white 72%);
    box-shadow: 0 3px 8px rgba(0,0,0,0.32);
}

.shaft-library-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.shaft-command-type-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.shaft-type-chip {
    justify-content: center;
    min-height: 32px;
    padding: 6px 7px;
}

.shaft-command-list {
    min-height: 0;
    overflow: auto;
    padding-right: 2px;
}

.shaft-command-card {
    min-height: 58px;
    grid-template-columns: minmax(0, 1fr) 52px;
    padding: 9px;
    border-radius: 8px;
    border-left: 3px solid rgba(88,216,210,0.55);
    background:
        linear-gradient(90deg, rgba(88,216,210,0.1), transparent 58%),
        rgba(255,255,255,0.04);
}

.shaft-command-card.skill {
    border-left-color: #58d8d2;
}

.shaft-command-card.ultimate {
    border-left-color: #ffbf57;
}

.shaft-command-card.basic {
    border-left-color: #77e36f;
}

.shaft-command-card.support {
    border-left-color: #ff5aa5;
}

.shaft-command-card.utility {
    border-left-color: #b9c6d8;
}

.shaft-command-card.background-damage {
    border-style: solid;
    background:
        repeating-linear-gradient(135deg, rgba(255,255,255,0.06) 0 5px, transparent 5px 10px),
        rgba(255,255,255,0.04);
}

.shaft-command-card-body {
    min-width: 0;
    display: grid;
    gap: 3px;
}

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

.shaft-command-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shaft-command-meta {
    display: block;
}

.shaft-command-type {
    flex: 0 0 auto;
    width: fit-content;
    min-height: 20px;
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 5px;
    color: #071016 !important;
    background: linear-gradient(135deg, var(--primary), var(--amber));
    font-size: 10px !important;
    font-weight: 950 !important;
}

.shaft-command-card button {
    min-width: 48px;
    min-height: 36px;
    padding: 6px 8px;
}

.shaft-axis-panel {
    gap: 12px;
    height: var(--shaft-rotation-panel-height);
    grid-template-rows: auto minmax(0, 1fr);
    min-width: 0;
}

.shaft-axis-toolbar {
    display: grid;
    grid-template-columns: minmax(190px, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.shaft-loop-settings-btn.active {
    border-color: rgba(126,224,219,0.6);
    background: rgba(126,224,219,0.12);
}

.shaft-editor-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.shaft-editor-actions .secondary-btn {
    min-width: 58px;
    height: 38px;
    min-height: 38px;
    box-sizing: border-box;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.shaft-editor-actions .shaft-loop-settings-btn {
    min-width: 82px;
}

.shaft-background-multiplier-dialog {
    width: min(380px, calc(100vw - 32px));
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: var(--radius-lg);
    background: transparent;
    color: var(--text);
}

.shaft-background-multiplier-dialog::backdrop {
    background: rgba(2, 6, 12, 0.72);
    backdrop-filter: blur(4px);
}

.shaft-background-multiplier-modal {
    display: grid;
    gap: 16px;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: inherit;
    background: linear-gradient(145deg, rgba(18, 30, 44, 0.99), rgba(6, 11, 18, 0.99));
    box-shadow: 0 20px 64px rgba(0,0,0,0.52);
}

.shaft-background-multiplier-field {
    display: grid;
    gap: 8px;
}

.shaft-background-multiplier-field span {
    color: var(--text);
    font-weight: 950;
}

.shaft-background-multiplier-field input {
    width: 100%;
    min-height: 44px;
    text-align: center;
    font-size: 18px;
    font-weight: 950;
}

.shaft-background-multiplier-field small {
    color: var(--muted);
    line-height: 1.45;
}

.shaft-background-multiplier-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.shaft-loop-settings-dialog {
    width: min(680px, calc(100vw - 32px));
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: var(--radius-lg);
    background: transparent;
    color: var(--text);
}

.shaft-loop-settings-dialog::backdrop {
    background: rgba(2, 6, 12, 0.8);
    backdrop-filter: blur(6px);
}

.shaft-loop-settings-modal {
    display: grid;
    gap: 16px;
    padding: 22px;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: inherit;
    background: linear-gradient(145deg, rgba(18, 30, 44, 0.99), rgba(6, 11, 18, 0.99));
    box-shadow: 0 24px 80px rgba(0,0,0,0.58);
}

.shaft-loop-enabled-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    background: rgba(255,255,255,0.045);
    cursor: pointer;
}

.shaft-loop-enabled-row input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.shaft-loop-enabled-row span {
    display: grid;
    gap: 3px;
}

.shaft-loop-enabled-row small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.shaft-loop-resource-list {
    display: grid;
    gap: 8px;
}

.shaft-loop-resource-list.is-disabled {
    opacity: 0.45;
}

.shaft-loop-resource-row {
    display: grid;
    grid-template-columns: minmax(130px, 180px) minmax(0, 1fr);
    gap: 10px;
    align-items: end;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 10px;
    background: rgba(255,255,255,0.035);
}

.shaft-loop-resource-character {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.shaft-loop-resource-character img {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    border-radius: 50%;
    object-fit: cover;
}

.shaft-loop-resource-character strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shaft-loop-resource-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px;
}

.shaft-loop-resource-row label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
}

.shaft-loop-resource-row input {
    width: 100%;
}

.shaft-loop-settings-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

@media (max-width: 680px) {
    .shaft-loop-resource-row {
        grid-template-columns: 1fr;
    }

    .shaft-loop-resource-character {
        grid-column: auto;
    }
}

.shaft-timeline-shell {
    display: block;
    overflow: auto;
    border-color: rgba(126, 224, 219, 0.18);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.012) 34%, transparent),
        rgba(7, 12, 20, 0.88);
}

.shaft-time-ruler {
    position: relative;
    min-width: 100%;
    height: 48px;
    border-bottom: 1px solid rgba(255,255,255,0.09);
    background:
        linear-gradient(90deg, rgba(255,255,255,0.08) 0 var(--label-width), transparent var(--label-width)),
        rgba(9, 14, 23, 0.95);
}

.shaft-time-ruler::before {
    content: '时间';
    position: sticky;
    left: 0;
    z-index: 8;
    width: var(--label-width);
    height: 48px;
    display: inline-grid;
    place-items: center start;
    padding-left: 14px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    background: rgba(13, 20, 31, 0.98);
    border-right: 1px solid rgba(255,255,255,0.1);
}

.shaft-ruler-mark {
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255,255,255,0.045);
}

.shaft-ruler-mark.second {
    background: rgba(255,255,255,0.085);
}

.shaft-ruler-mark.major {
    background: rgba(255,255,255,0.16);
}

.shaft-ruler-mark span {
    top: 14px;
    left: 7px;
    color: rgba(221, 230, 245, 0.82);
    font-size: 11px;
}

.shaft-timeline {
    position: relative;
    min-width: 100%;
    min-height: 500px;
    display: grid;
    gap: 0;
    padding: 0;
    cursor: crosshair;
}

.shaft-time-track {
    position: relative;
    height: 56px;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,0.055);
    background: transparent;
}

.shaft-time-track.front-track {
    height: 54px;
}

.shaft-time-track.action-track {
    height: 94px;
}

.shaft-track-label {
    position: sticky;
    left: 0;
    top: 0;
    z-index: 24;
    width: var(--label-width);
    height: 100%;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    padding: 0 10px;
    color: rgba(238,244,255,0.9);
    font-size: 12px;
    font-weight: 900;
    transform: none;
    background: rgba(13, 20, 31, 0.98);
    border-right: 1px solid rgba(255,255,255,0.1);
    pointer-events: none;
}

.shaft-track-portrait {
    display: grid;
    justify-items: center;
    gap: 2px;
}

.shaft-track-portrait img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.22);
}

.shaft-track-portrait small {
    max-width: 58px;
    overflow: hidden;
    color: rgba(177,189,209,0.92);
    font-size: 8px;
    font-weight: 900;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shaft-track-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shaft-track-surface {
    position: absolute;
    inset: 0 0 0 var(--label-width);
    z-index: 0;
    background:
        repeating-linear-gradient(90deg, transparent 0 59px, rgba(255,255,255,0.04) 59px 60px),
        repeating-linear-gradient(90deg, transparent 0 119px, rgba(255,255,255,0.08) 119px 120px),
        linear-gradient(180deg, rgba(255,255,255,0.028), rgba(255,255,255,0.008));
}

.action-track:nth-child(odd) .shaft-track-surface {
    background-color: rgba(255,255,255,0.025);
}

.shaft-unlined-buff-warning {
    position: relative;
    z-index: 16;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 218, 91, 0.78);
    border-radius: 50%;
    background: rgba(255, 218, 91, 0.18);
    box-shadow: 0 0 14px rgba(255, 218, 91, 0.32);
    color: #ffda5b;
    cursor: help;
    font-size: 13px;
    font-weight: 1000;
    line-height: 1;
}

.shaft-unlined-buff-warning[hidden] {
    display: none;
}

.shaft-unlined-buff-warning::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    top: 27px;
    z-index: 16;
    width: max-content;
    max-width: 320px;
    padding: 8px 10px;
    transform: translate(-50%, 4px);
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 8px;
    background: rgba(10, 16, 28, 0.97);
    box-shadow: 0 12px 26px rgba(0,0,0,0.38);
    color: rgba(255,255,255,0.94);
    font-size: 12px;
    font-weight: 900;
    line-height: 1.38;
    white-space: normal;
    opacity: 0;
    transition: opacity 120ms ease, transform 120ms ease;
    pointer-events: none;
}

.shaft-unlined-buff-warning:hover,
.shaft-unlined-buff-warning:focus-visible {
    filter: brightness(1.16);
}

.shaft-unlined-buff-warning:hover::after,
.shaft-unlined-buff-warning:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, 0);
}

.shaft-unlined-buff-warning:focus-visible {
    outline: 2px solid rgba(255,255,255,0.72);
    outline-offset: 2px;
}

.shaft-front-window {
    z-index: 2;
    top: 12px;
    min-width: 0;
    height: 30px;
    display: inline-flex;
    align-items: center;
    padding: 0 9px;
    overflow: hidden;
    color: rgba(255,255,255,0.9);
    font-size: 11px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shaft-lane-front-band {
    position: absolute;
    top: 8px;
    bottom: 8px;
    z-index: 1;
    min-width: 0;
    border-left: 2px solid color-mix(in srgb, var(--slot-color) 68%, white 8%);
    border-right: 1px solid color-mix(in srgb, var(--slot-color) 18%, transparent);
    border-radius: 0 10px 10px 0;
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--slot-color) 16%, transparent), color-mix(in srgb, var(--slot-color) 7%, transparent));
    box-shadow: inset 0 0 18px color-mix(in srgb, var(--slot-color) 10%, transparent);
    pointer-events: none;
}

.shaft-buff-trigger-line {
    position: absolute;
    z-index: 6;
    min-width: 1px;
    height: 10px;
    border-radius: 999px;
    cursor: help;
    pointer-events: auto;
    background:
        radial-gradient(circle, color-mix(in srgb, var(--buff-color, var(--slot-color)) 86%, white 14%) 0 3px, transparent 3.5px) left 2px center / 10px 10px no-repeat,
        radial-gradient(circle, color-mix(in srgb, var(--buff-color, var(--slot-color)) 86%, white 14%) 0 3px, transparent 3.5px) right 2px center / 10px 10px no-repeat;
}

.shaft-buff-trigger-line::before {
    content: '';
    position: absolute;
    left: 9px;
    right: 9px;
    top: 4px;
    height: 1px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--buff-color, var(--slot-color)) 82%, white 10%);
    box-shadow: 0 0 10px color-mix(in srgb, var(--buff-color, var(--slot-color)) 50%, transparent);
}

.shaft-buff-trigger-line::after {
    content: attr(data-tooltip);
    position: absolute;
    left: var(--buff-tooltip-x, 50%);
    top: 15px;
    z-index: 12;
    width: max-content;
    max-width: 260px;
    padding: 7px 9px;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 8px;
    background: rgba(10, 16, 28, 0.96);
    box-shadow: 0 12px 26px rgba(0,0,0,0.38);
    color: rgba(255,255,255,0.94);
    font-size: 12px;
    font-weight: 900;
    line-height: 1.35;
    white-space: pre-line;
    text-align: left;
    opacity: 0;
    transform: translate(-50%, 4px);
    transition: opacity 120ms ease, transform 120ms ease;
    pointer-events: none;
}

.shaft-buff-trigger-line:hover,
.shaft-buff-trigger-line:focus-visible,
.shaft-buff-trigger-line.selected {
    z-index: 40;
    filter: brightness(1.16);
}

.shaft-buff-trigger-line:hover::after,
.shaft-buff-trigger-line:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, 0);
}

.shaft-buff-trigger-line:hover::before,
.shaft-buff-trigger-line:focus-visible::before,
.shaft-buff-trigger-line.selected::before {
    top: 3px;
    height: 2px;
}

.shaft-buff-trigger-line:focus-visible {
    outline: 2px solid rgba(255,255,255,0.72);
    outline-offset: 2px;
}

.shaft-reaction-damage-marker {
    position: absolute;
    z-index: 7;
    width: 0;
    height: 0;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-top: 5px solid var(--reaction-color, #fff);
    transform: translateX(-50%);
    filter: drop-shadow(0 0 2px color-mix(in srgb, var(--reaction-color, #fff) 60%, transparent));
    pointer-events: auto;
}

.shaft-reaction-damage-marker::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    top: 9px;
    z-index: 18;
    width: max-content;
    max-width: 560px;
    padding: 7px 9px;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 8px;
    background: rgba(10, 16, 28, 0.97);
    box-shadow: 0 12px 26px rgba(0,0,0,0.38);
    color: rgba(255,255,255,0.94);
    font-size: 12px;
    font-weight: 900;
    line-height: 1.45;
    white-space: pre-line;
    text-align: left;
    opacity: 0;
    transform: translate(calc(-50% + var(--damage-tooltip-shift-x, 0px)), 4px);
    transition: opacity 120ms ease, transform 120ms ease;
    pointer-events: none;
}

.shaft-reaction-damage-marker:hover::after,
.shaft-reaction-damage-marker:focus-visible::after {
    opacity: 1;
    transform: translate(calc(-50% + var(--damage-tooltip-shift-x, 0px)), 0);
}

.shaft-reaction-damage-marker:hover,
.shaft-reaction-damage-marker:focus-visible {
    z-index: 40;
}

.shaft-reaction-damage-marker:focus-visible {
    outline: 2px solid rgba(255,255,255,0.72);
    outline-offset: 3px;
}

.shaft-periodic-damage-marker {
    border-top: 0;
    border-bottom: 5px solid var(--reaction-color, #fff);
    filter: none;
}

.shaft-action-bar {
    top: 24px;
    z-index: 4;
    min-width: 0;
    height: 38px;
    box-sizing: border-box;
    container-type: inline-size;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    overflow: hidden;
    border-radius: 13px;
    border: 1px solid color-mix(in srgb, var(--slot-color) 72%, white 16%);
    color: #f8fbff;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--slot-color) 58%, #101827), rgba(18,25,37,0.95)),
        rgba(255,255,255,0.08);
    box-shadow: 0 12px 24px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.16);
    transition: box-shadow 150ms ease, opacity 150ms ease;
}

.shaft-action-bar.front-start {
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--slot-color) 58%, #f5fbff 4%), color-mix(in srgb, var(--slot-color) 28%, #101827)),
        rgba(255,255,255,0.1);
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--slot-color) 14%, transparent),
        0 12px 22px rgba(0,0,0,0.28),
        inset 0 1px 0 rgba(255,255,255,0.18);
}

.shaft-action-bar b {
    width: fit-content;
    min-height: 17px;
    display: inline-flex;
    align-items: center;
    padding: 1px 5px;
    border-radius: 5px;
    color: #071016;
    background: rgba(255,255,255,0.86);
    font-size: 9px;
    line-height: 1;
}

.shaft-action-bar span {
    flex: 0 0 auto;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    color: white;
    font-size: 12px;
    font-weight: 950;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shaft-action-bar em {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    color: rgba(255,255,255,0.72);
    font-size: 10px;
    font-style: normal;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@container (max-width: 48px) {
    .shaft-action-bar em {
        display: none;
    }
}

.shaft-action-bar.selected {
    outline: 2px solid rgba(255,255,255,0.92);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--slot-color) 24%, transparent), 0 16px 26px rgba(0,0,0,0.34);
}

.shaft-selection-marquee {
    position: fixed;
    z-index: 200;
    border: 1px solid rgba(126,224,219,0.86);
    border-radius: 6px;
    background: rgba(126,224,219,0.12);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.08) inset;
    pointer-events: none;
}

.shaft-action-bar.dragging-preview {
    opacity: 0.9;
    z-index: 12;
    box-shadow:
        0 0 0 4px color-mix(in srgb, var(--slot-color) 24%, transparent),
        0 22px 36px rgba(0,0,0,0.44),
        inset 0 1px 0 rgba(255,255,255,0.24);
}

body.shaft-dragging .shaft-action-bar {
    will-change: transform, left, top;
}

.shaft-action-bar.background-damage {
    background-image:
        repeating-linear-gradient(135deg, rgba(255,255,255,0.18) 0 5px, rgba(255,255,255,0.02) 5px 10px),
        linear-gradient(135deg, color-mix(in srgb, var(--slot-color) 52%, #101827), rgba(18,25,37,0.95));
}

.shaft-action-bar.q-instant-release {
    z-index: 5;
    border-color: rgba(255, 241, 160, 0.72);
    box-shadow:
        0 0 0 1px rgba(255, 210, 92, 0.28),
        0 12px 22px rgba(0,0,0,0.28),
        inset 0 1px 0 rgba(255,255,255,0.18);
}

.shaft-action-bar.q-instant-release::after {
    content: "";
    position: absolute;
    top: 5px;
    right: 0;
    bottom: 5px;
    width: 2px;
    border-radius: 999px;
    background: rgba(255, 245, 183, 0.92);
    box-shadow: 0 0 12px rgba(255, 218, 91, 0.58);
}

.shaft-action-bar.basic-background {
    border-style: dashed;
}

.shaft-hit-marker {
    position: absolute;
    z-index: 6;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.64);
    background: color-mix(in srgb, var(--slot-color) 78%, white 8%);
    transform: translateX(-50%);
    box-shadow: 0 0 8px color-mix(in srgb, var(--slot-color) 42%, transparent);
}

.shaft-context-menu {
    position: fixed;
    z-index: 120;
    width: min(360px, calc(100vw - 24px));
    max-height: min(520px, calc(100vh - 24px));
    overflow: auto;
    padding: 10px;
    border: 1px solid rgba(126,224,219,0.28);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.035)),
        rgba(8, 13, 22, 0.98);
    box-shadow: 0 24px 54px rgba(0,0,0,0.46);
}

.shaft-context-menu[hidden] {
    display: none;
}

.shaft-context-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 4px 4px 10px;
    color: var(--text);
    font-weight: 950;
}

.shaft-context-head span {
    color: var(--muted);
    font-size: 11px;
}

.shaft-context-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.shaft-context-actions button,
.shaft-context-danger {
    min-height: 46px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 7px;
    align-items: center;
    padding: 8px;
    border: 1px solid rgba(255,255,255,0.11);
    border-radius: 8px;
    color: var(--text);
    background: rgba(255,255,255,0.055);
}

.shaft-context-actions button:hover,
.shaft-context-danger:hover {
    border-color: rgba(126,224,219,0.44);
    background: rgba(126,224,219,0.12);
}

.shaft-context-actions b {
    min-width: 28px;
    padding: 3px 5px;
    border-radius: 5px;
    color: #071016;
    background: rgba(255,255,255,0.84);
    font-size: 10px;
}

.shaft-context-actions span {
    overflow: hidden;
    font-size: 12px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shaft-context-actions em {
    color: var(--muted);
    font-size: 10px;
    font-style: normal;
    font-weight: 900;
}

.shaft-context-danger {
    width: 100%;
    grid-template-columns: 1fr;
    color: #ffd1d1;
}

.shaft-cursor-line {
    top: 0;
    bottom: 0;
    width: 2px;
    z-index: 10;
    background: #ff6363;
    box-shadow: 0 0 18px rgba(255,99,99,0.5);
    pointer-events: none;
}

.shaft-cursor-line b {
    position: absolute;
    top: 4px;
    left: 8px;
    padding: 3px 7px;
    border-radius: 6px;
    color: white;
    background: rgba(255,99,99,0.92);
    font-size: 10px;
    white-space: nowrap;
}

.shaft-step-drawer {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(126, 224, 219, 0.18);
    border-radius: 8px;
    background: rgba(7, 12, 20, 0.46);
}

.shaft-step-list {
    max-height: 230px;
    overflow: auto;
    padding-right: 3px;
}

.shaft-step-row {
    grid-template-columns: 72px 128px minmax(190px, 1fr) 90px 108px 40px;
    min-height: 58px;
    padding: 8px;
    border-radius: 8px;
}

.shaft-step-row label span {
    font-size: 10px;
}

.shaft-step-row input,
.shaft-step-row select {
    min-height: 34px;
    padding: 6px 8px;
}

.shaft-step-index strong,
.shaft-step-damage strong {
    font-size: 14px !important;
}

.shaft-detail-panel {
    position: sticky;
    top: 10px;
    height: var(--shaft-rotation-panel-height);
    max-height: none;
    overflow: auto;
}

.shaft-self-check {
    position: sticky;
    top: 0;
    z-index: 6;
    margin: -2px -2px 14px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 93, 108, 0.92);
    border-radius: 8px;
    background: rgba(54, 8, 15, 0.96);
    box-shadow: 0 8px 24px rgba(27, 0, 4, 0.36);
    color: #ffd9dd;
}

.shaft-self-check[hidden] {
    display: none;
}

.shaft-self-check strong {
    display: block;
    color: #ff8d99;
    font-size: 13px;
}

.shaft-self-check ul {
    display: grid;
    gap: 5px;
    margin: 7px 0 0;
    padding-left: 18px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.45;
}

.shaft-workbench-summary {
    display: grid;
    gap: 10px;
}

.shaft-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.shaft-summary-grid div {
    min-height: 70px;
    display: grid;
    align-content: center;
    gap: 6px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(7,12,20,0.62);
}

.shaft-summary-grid span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
}

.shaft-summary-grid strong {
    color: var(--text);
    font-size: 20px;
    line-height: 1;
    overflow-wrap: anywhere;
}

.shaft-mini-contribution-list {
    display: grid;
    gap: 7px;
}

.shaft-mini-contribution:not(.shaft-mini-contribution-source) + .shaft-mini-contribution-source {
    margin-top: 3px;
}

.shaft-mini-contribution-source span {
    color: var(--text);
}

.shaft-mini-contribution {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 46px;
    gap: 8px;
    align-items: center;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
}

.shaft-mini-contribution span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shaft-mini-contribution b {
    color: var(--text);
    font-size: 11px;
    text-align: right;
}

.shaft-mini-contribution i {
    grid-column: 1 / -1;
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background:
        linear-gradient(90deg, var(--slot-color) 0 var(--bar), rgba(255,255,255,0.08) var(--bar) 100%);
}

.shaft-detail-hero {
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(88,216,210,0.1), rgba(255,191,87,0.04)),
        rgba(7,12,20,0.58);
}

.shaft-detail-grid {
    gap: 8px;
}

.shaft-detail-kv {
    min-height: 54px;
    border-radius: 8px;
}

@media (max-width: 1239px) {
    .shaft-build-layout {
        grid-template-columns: 1fr;
    }

    .shaft-build-summary,
    .shaft-build-overview {
        position: static;
    }
}

@media (max-width: 1180px) {
    .shaft-rotation-layout {
        grid-template-columns: 1fr;
    }

    .shaft-substat-grid {
        grid-template-columns: repeat(4, minmax(92px, 1fr));
    }

    .shaft-command-library,
    .shaft-axis-panel,
    .shaft-detail-panel {
        position: static;
        height: auto;
        max-height: none;
    }

    .shaft-axis-panel {
        grid-template-rows: none;
    }
}

@media (max-width: 980px) {
    .shaft-header {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .shaft-header > div:first-child {
        grid-column: 1;
        grid-row: 1;
    }

    .shaft-header .shaft-page-tabs {
        grid-column: 1 / -1;
        grid-row: 2;
    }

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

    .shaft-command-panel,
    .shaft-team-slots,
    .shaft-result-grid,
    .shaft-market-filters {
        grid-template-columns: 1fr;
    }

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

    .shaft-character-filter-grid {
        grid-template-columns: repeat(2, minmax(110px, 1fr));
    }

    .shaft-member-card {
        grid-template-columns: 110px minmax(0, 1fr);
    }

    .shaft-loadout-grid,
    .shaft-member-switches,
    .shaft-skill-levels,
    .shaft-cartridge-tuning {
        grid-template-columns: 1fr;
    }

    .shaft-cartridge-tuning {
        grid-template-areas: none;
    }

    .shaft-cartridge-tuning > * {
        grid-area: auto;
    }

    .shaft-substat-grid {
        grid-template-columns: repeat(3, minmax(92px, 1fr));
    }

    .shaft-command-actions,
    .shaft-editor-actions {
        justify-content: flex-start;
    }

    .shaft-step-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 620px) {
    body:has(.shaft-page) .shell {
        width: min(100vw - 18px, 1840px);
        padding-top: 10px;
    }

    .shaft-header {
        grid-template-columns: 1fr;
    }

    .shaft-header > div:first-child,
    .shaft-header .shaft-page-tabs,
    .shaft-header .header-actions {
        grid-column: 1;
    }

    .shaft-header > div:first-child {
        grid-row: 1;
    }

    .shaft-header .shaft-page-tabs {
        grid-row: 2;
    }

    .shaft-header .header-actions {
        grid-row: 3;
        justify-self: start;
    }

    .shaft-panel {
        padding: 13px;
    }

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

    .shaft-member-avatar {
        width: 58px;
        height: 58px;
    }

    .shaft-substat-grid,
    .shaft-skill-level-grid,
    .shaft-detail-grid {
        grid-template-columns: repeat(2, minmax(72px, 1fr));
    }

    .shaft-member-identity {
        grid-template-columns: auto 58px minmax(0, 1fr);
        justify-items: start;
        align-items: center;
    }

    .shaft-member-identity small {
        grid-column: 3;
    }

    .shaft-contribution-row {
        grid-template-columns: 68px minmax(0, 1fr) 44px;
    }

    .shaft-action-contribution-btn {
        grid-column: 1 / -1;
    }

    .shaft-action-contribution-modal {
        padding: 16px;
    }

    .shaft-stagger-contribution-list {
        grid-template-columns: 1fr;
    }

    .shaft-action-contribution-body {
        grid-template-columns: 1fr;
    }

    .shaft-action-analysis-toolbar {
        align-items: stretch;
    }

    .shaft-action-analysis-switch {
        flex: 1 1 auto;
    }

    .shaft-action-analysis-switch button {
        flex: 1;
    }

    .shaft-action-analysis-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .shaft-action-contribution-chart {
        max-width: 260px;
        margin-inline: auto;
    }

    .shaft-action-contribution-chart-bars {
        max-width: none;
        margin-inline: 0;
    }

    .shaft-action-contribution-item {
        grid-template-columns: 12px minmax(0, 1fr) auto 48px;
    }

    .shaft-shortcut-modal {
        padding: 16px;
    }

    .shaft-shortcut-groups {
        grid-template-columns: 1fr;
    }

    .shaft-shortcut-group:last-child {
        grid-column: auto;
    }

    .shaft-shortcut-group dl > div {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}
.shaft-shared-readonly-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(98, 183, 255, 0.42);
  border-radius: 12px;
  background: rgba(98, 183, 255, 0.1);
  color: var(--muted);
}

.shaft-shared-readonly-notice[hidden] {
  display: none;
}

.shaft-shared-readonly-notice strong {
  color: var(--text);
  white-space: nowrap;
}

.shaft-page.is-shared-readonly .shaft-action-bar {
  cursor: pointer;
}
