﻿#cooldown-display {
    position: fixed;
    bottom: 18px;
    left: 18px;
    display: grid;
    grid-template-columns: repeat(4, 78px);
    grid-template-rows: repeat(3, 78px);
    grid-template-areas:
        "z x space ."
        "q w e r"
        "a s d f";
    gap: 8px;
    width: calc(78px * 4 + 8px * 3 + 20px);
    height: calc(78px * 3 + 8px * 2);
    padding: 8px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.6));
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

#cooldown-display.transcend-active {
    border-color: rgba(255, 120, 120, 0.45);
    box-shadow: 0 20px 40px rgba(255, 80, 80, 0.2), 0 0 24px rgba(255, 110, 110, 0.3);
}

#cooldown-display.transcend-active .cd-item {
    border-color: rgba(255, 120, 120, 0.6);
    box-shadow: inset 0 0 18px rgba(255, 100, 90, 0.35), 0 10px 22px rgba(0, 0, 0, 0.55);
}

#cooldown-display.transcend-active .cd-key {
    background: rgba(255, 140, 140, 0.2);
    border-color: rgba(255, 180, 180, 0.35);
    color: #ffdada;
}

.cd-item {
    position: relative;
    width: 78px;
    height: 78px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(30, 38, 58, 0.9), rgba(16, 20, 32, 0.85));
    border: 1px solid rgba(120, 150, 220, 0.35);
    overflow: hidden;
    box-shadow: inset 0 0 14px rgba(255, 255, 255, 0.03), 0 10px 22px rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #eef3ff;
}

.cd-key {
    position: absolute;
    top: 6px;
    right: 6px;
    left: auto;
    bottom: auto;
    transform: none;
    font-size: 1.2rem;
    color: #d5ddff;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.cd-type {
    position: absolute;
    top: 6px;
    left: 6px;
    font-size: 0.87rem;
    color: #b9c7ee;
    padding: 2px 5px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    letter-spacing: 0.08em;
    pointer-events: none;
}

.cd-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.78));
    transition: height 0.12s linear;
}

.cd-item.skill-r {
    overflow: visible;
}

.cd-item.skill-r .cd-overlay {
    z-index: 3;
    bottom: -6px;
    transform: scale(1.5);
    transform-origin: bottom center;
}

.cd-item.skill-r .cd-key,
.cd-item.skill-r .cd-type,
.cd-item.skill-r .cd-timer,
.cd-item.skill-r .cd-lock {
    z-index: 4;
}

.cd-item.has-charges .cd-overlay {
    transition: height 0.12s linear, opacity 0.12s linear;
}

.cd-item.has-charges.charge-usable .cd-overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(8, 12, 20, 0.45));
    opacity: 0.55;
}

.cd-item.has-charges.charge-empty .cd-overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.78));
    opacity: 1;
}

.cd-timer {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 4.42rem;
    line-height: 1;
    text-align: center;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.35);
}

.cd-timer.cd-timer-charges {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transform: none;
    font-size: 1.7rem;
    line-height: 1.05;
    letter-spacing: 0.02em;
    text-align: center;
}

.cd-timer.cd-timer-charges .cd-charge-count {
    font-size: 1.4rem;
}

.cd-timer.cd-timer-charges .cd-charge-recharge {
    font-size: 1.18rem;
    opacity: 0.8;
}

.cd-timer.cd-timer-charges.cd-timer-charge-usable {
    color: #8be68b;
}

.cd-timer.cd-timer-charges.cd-timer-charge-empty {
    color: #fff;
}

.cd-lock {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: 0.12rem;
    color: #ffe1b3;
    text-shadow: 0 0 12px rgba(255, 120, 80, 0.6);
    background: linear-gradient(160deg, rgba(255, 140, 90, 0.18), rgba(10, 10, 20, 0.78));
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
    z-index: 2;
}

.cd-item.sealed {
    border-color: rgba(255, 170, 120, 0.6);
    box-shadow: inset 0 0 18px rgba(255, 130, 90, 0.35), 0 10px 22px rgba(0, 0, 0, 0.55);
}

.cd-item.sealed .cd-key {
    color: #ffd9c4;
    border-color: rgba(255, 190, 160, 0.4);
}

.cd-item.sealed .cd-type {
    color: #ffd9c4;
    border-color: rgba(255, 190, 160, 0.4);
}

.cd-item.sealed .cd-timer {
    opacity: 0.2;
}

.cd-item.sealed .cd-lock {
    opacity: 1;
}

.cd-item.skill-z {
    grid-area: z;
}

.cd-item.skill-x {
    grid-area: x;
}

.cd-item.skill-space {
    grid-area: space;
}

.cd-item.skill-q {
    grid-area: q;
}

.cd-item.skill-w {
    grid-area: w;
}

.cd-item.skill-e {
    grid-area: e;
}

.cd-item.skill-r {
    grid-area: r;
}

.cd-item.skill-a {
    grid-area: a;
}

.cd-item.skill-s {
    grid-area: s;
}

.cd-item.skill-d {
    grid-area: d;
}

.cd-item.skill-f {
    grid-area: f;
}

.class-entry-actions .skill-edit-btn {
    margin-left: 0;
}

.multiplayer-config-panel .skill-edit-btn {
    height: 28px;
    padding: 0 16px;
    min-width: 125px;
    justify-content: center;
}

.skill-edit-btn {
    position: static;
    margin-left: auto;
    z-index: 2;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(10, 12, 20, 0.55);
    color: rgba(255, 255, 255, 0.86);
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-direction: row-reverse;
    gap: 4px;
    cursor: pointer;
    transition: all 0.18s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    width: auto;
}

.skill-edit-btn:hover {
    border-color: rgba(158, 252, 255, 0.45);
    background: rgba(18, 20, 32, 0.75);
}

.skill-edit-btn:active {
}

.skill-edit-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.skill-edit-icon {
    width: 14px;
    height: 14px;
    fill: currentColor;
    opacity: 0.9;
}

.skill-edit-text {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.skill-editor-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 15% 15%, rgba(158, 252, 255, 0.08), rgba(0, 0, 0, 0.62));
    backdrop-filter: blur(12px);
    z-index: 5200;
    animation: fadeIn 0.22s ease;
}

.skill-editor {
    width: min(760px, calc(100% - 24px));
    max-height: calc(100% - 28px);
    background: rgba(12, 14, 22, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.75);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.skill-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(158, 252, 255, 0.08), rgba(0, 0, 0, 0));
}

.skill-editor-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 10px 18px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(8, 10, 18, 0.35);
}

.skill-editor-tab {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.82);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: all 0.18s ease;
}

.skill-editor-tab:hover {
    border-color: rgba(158, 252, 255, 0.42);
    background: rgba(255, 255, 255, 0.1);
}

.skill-editor-tab.active {
    border-color: rgba(158, 252, 255, 0.7);
    background: rgba(158, 252, 255, 0.18);
    color: rgba(236, 255, 255, 0.98);
}

.skill-editor-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.skill-editor-title h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: 0.2px;
    color: var(--text-primary);
}

.skill-editor-title p {
    margin: 0;
    font-size: 0.92rem;
    color: var(--text-secondary);
}

.skill-editor-close {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: all 0.18s ease;
}

.skill-editor-close:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(158, 252, 255, 0.4);
}

.skill-editor-body {
    padding: 14px 18px 18px;
    overflow: auto;
}

.skillup-icon-btn {
    width: 46px;
    height: 46px;
    padding: 0;
    margin-right: 10px;
    border-radius: 50%;
    border: 1px solid rgba(120, 235, 200, 0.65);
    background:
        radial-gradient(circle at 30% 30%, rgba(190, 255, 230, 0.6), rgba(80, 170, 180, 0.18)),
        linear-gradient(160deg, rgba(20, 40, 50, 0.65), rgba(12, 16, 24, 0.9));
    display: grid;
    place-items: center;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.4), 0 0 18px rgba(120, 240, 210, 0.22);
}

.skillup-icon-btn:hover {
    border-color: rgba(150, 250, 220, 0.95);
    background:
        radial-gradient(circle at 30% 30%, rgba(210, 255, 238, 0.78), rgba(120, 220, 200, 0.25)),
        linear-gradient(160deg, rgba(30, 60, 70, 0.72), rgba(14, 18, 28, 0.92));
}

.skillup-icon {
    position: relative;
    width: 22px;
    height: 20px;
    display: block;
}

.skillup-icon::before {
    content: '';
    position: absolute;
    left: 1px;
    right: 1px;
    bottom: 1px;
    height: 12px;
    background: linear-gradient(160deg, #f0fbff, #7bc8ff);
    clip-path: polygon(0 0, 46% 0, 50% 12%, 54% 0, 100% 0, 100% 100%, 54% 100%, 50% 88%, 46% 100%, 0 100%);
    box-shadow: 0 0 10px rgba(120, 220, 255, 0.6), inset 0 0 6px rgba(20, 40, 70, 0.3);
}

.skillup-icon::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    width: 8px;
    height: 8px;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(255, 255, 255, 0.98), rgba(120, 255, 200, 0.65));
    clip-path: polygon(50% 0, 62% 38, 100% 50, 62% 62, 50% 100, 38% 62, 0 50, 38% 38);
    box-shadow: 0 0 10px rgba(140, 255, 215, 0.8);
}

.skillup-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 15% 20%, rgba(99, 209, 255, 0.18), transparent 55%),
        radial-gradient(circle at 85% 70%, rgba(255, 214, 122, 0.12), transparent 60%),
        rgba(3, 5, 12, 0.78);
    backdrop-filter: blur(10px);
    z-index: 5420;
    animation: fadeIn 0.22s ease;
}

.skillup-overlay.open {
    display: flex;
}

.skillup-effect-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 20% 20%, rgba(120, 210, 255, 0.18), transparent 55%),
        radial-gradient(circle at 80% 70%, rgba(255, 214, 122, 0.15), transparent 60%),
        rgba(3, 5, 12, 0.82);
    backdrop-filter: blur(10px);
    z-index: 5430;
    animation: fadeIn 0.22s ease;
}

.skillup-effect-overlay.open {
    display: flex;
}

.skillup-effect-modal {
    position: relative;
    width: min(760px, calc(100% - 28px));
    max-height: calc(100% - 28px);
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 15% 20%, rgba(120, 210, 255, 0.12), transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(255, 215, 140, 0.1), transparent 55%),
        linear-gradient(155deg, rgba(10, 14, 26, 0.98), rgba(6, 9, 17, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.7);
    overflow: hidden;
}

.skillup-effect-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.skillup-effect-heading {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.skillup-effect-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.skillup-effect-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.skillup-effect-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.35);
    color: var(--text-primary);
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.skillup-effect-close:hover {
    border-color: rgba(255, 255, 255, 0.5);
}

.skillup-effect-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px 22px 22px;
    overflow: hidden;
}

.skillup-effect-summary {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(10, 14, 26, 0.7);
    padding: 10px 12px;
    font-size: 12px;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.skillup-effect-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: auto;
    padding-right: 4px;
}

.skillup-effect-merged {
    border-radius: 14px;
    border: 1px solid rgba(120, 200, 255, 0.2);
    background: rgba(10, 14, 26, 0.78);
    padding: 12px 14px;
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.5;
    white-space: pre-line;
}

.skillup-effect-empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 20px 12px;
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.16);
    background: rgba(10, 14, 26, 0.6);
}

.skillup-modal {
    position: relative;
    width: min(1120px, calc(100% - 28px));
    max-height: calc(100% - 28px);
    isolation: isolate;
    background:
        radial-gradient(circle at 15% 20%, rgba(120, 210, 255, 0.12), transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(255, 215, 140, 0.08), transparent 55%),
        linear-gradient(155deg, rgba(10, 14, 26, 0.98), rgba(6, 9, 17, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    box-shadow: 0 35px 90px rgba(0, 0, 0, 0.75);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.skillup-modal::before,
.skillup-modal::after {
    content: '';
    position: absolute;
    inset: -15%;
    opacity: 0;
    pointer-events: none;
    z-index: 0;
}

.skillup-modal::before {
    background:
        radial-gradient(circle at 20% 25%, rgba(255, 224, 155, 0.45), transparent 60%),
        radial-gradient(circle at 80% 75%, rgba(120, 210, 255, 0.35), transparent 65%);
    filter: blur(6px);
}

.skillup-modal::after {
    background:
        conic-gradient(from 120deg, rgba(255, 243, 180, 0.55), rgba(255, 255, 255, 0) 62%, rgba(120, 220, 255, 0.5), rgba(255, 255, 255, 0) 85%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.4), transparent 60%);
    mix-blend-mode: screen;
    transform: scale(0.92);
}

.skillup-modal > * {
    position: relative;
    z-index: 1;
}

.skillup-modal.is-upgrade-success {
    animation: skillupSuccessPulse 0.7s ease;
}

.skillup-modal.is-upgrade-success::before {
    animation: skillupSuccessGlow 1.1s ease;
}

.skillup-modal.is-upgrade-success::after {
    animation: skillupSuccessBurst 1s ease;
}

.skillup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.skillup-heading {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.skillup-title {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.skillup-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.skillup-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.skillup-owned {
    display: flex;
    gap: 10px;
}

.skillup-owned-card {
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(12, 16, 28, 0.7);
    min-width: 120px;
}

.skillup-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.35);
    color: var(--text-primary);
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.skillup-close:hover {
    border-color: rgba(255, 255, 255, 0.5);
}

.skillup-tabs {
    display: flex;
    gap: 8px;
    padding: 14px 24px 0;
}

.skillup-tab {
    padding: 8px 16px;
    border-radius: 12px;
    border: 1px solid rgba(120, 200, 255, 0.2);
    background: rgba(8, 10, 18, 0.6);
    color: var(--text-secondary);
    font-weight: 600;
}

.skillup-tab.active {
    color: var(--text-primary);
    border-color: rgba(120, 200, 255, 0.6);
    background: linear-gradient(140deg, rgba(120, 200, 255, 0.24), rgba(18, 24, 40, 0.8));
    box-shadow: 0 0 16px rgba(99, 209, 255, 0.25);
}

.skillup-body {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) 240px;
    gap: 16px;
    padding: 18px 24px 24px;
    overflow: auto;
}

.skillup-skill-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: auto;
}

.skillup-skill-card {
    border-radius: 14px;
    border: 1px solid rgba(120, 200, 255, 0.18);
    background: rgba(10, 14, 26, 0.75);
    padding: 10px 12px;
    padding-right: 84px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    color: var(--text-primary);
    position: relative;
}

.skillup-skill-card.active {
    border-color: rgba(120, 200, 255, 0.65);
    box-shadow: 0 0 18px rgba(99, 209, 255, 0.3);
}

.skillup-skill-key {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 16px;
    color: #0a1020;
    background: linear-gradient(145deg, rgba(190, 245, 255, 0.95), rgba(110, 180, 255, 0.75));
}

.skillup-skill-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.skillup-skill-label {
    font-size: 14px;
    font-weight: 600;
}

.skillup-skill-level {
    font-size: 12px;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.skillup-skill-progress {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.skillup-skill-progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, rgba(120, 200, 255, 0.7), rgba(255, 214, 122, 0.7));
}

.skillup-effect-check {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(120, 200, 255, 0.35);
    background: rgba(12, 18, 34, 0.7);
    color: var(--text-secondary);
    font-size: 11px;
    letter-spacing: 0.02em;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
}

.skillup-effect-check:hover,
.skillup-effect-check:focus {
    color: var(--text-primary);
    border-color: rgba(160, 220, 255, 0.7);
    background: rgba(20, 28, 48, 0.85);
    outline: none;
}

.skillup-detail {
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(10, 14, 26, 0.82);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 320px;
}

.skillup-detail-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.skillup-detail-head .skillup-skill-key {
    width: 46px;
    height: 46px;
    font-size: 18px;
}

.skillup-skill-title {
    font-size: 18px;
    font-weight: 600;
}

.skillup-effects {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: auto;
    padding-right: 4px;
}

.skillup-effects.is-focus {
    box-shadow: 0 0 0 2px rgba(120, 200, 255, 0.4), 0 0 16px rgba(120, 200, 255, 0.25);
    border-radius: 12px;
}

.skillup-effect-row {
    display: grid;
    grid-template-columns: 62px 1fr;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(12, 16, 28, 0.78);
    align-items: start;
}

.skillup-effect-row.is-unlocked {
    border-color: rgba(120, 200, 255, 0.45);
}

.skillup-effect-row.is-next {
    border-color: rgba(255, 214, 122, 0.55);
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 214, 122, 0.18), transparent 60%),
        rgba(12, 14, 24, 0.8);
    box-shadow: 0 0 14px rgba(255, 214, 122, 0.25);
}

.skillup-effect-row.is-special .skillup-effect-level::after {
    content: 'EX';
    margin-left: 6px;
    font-size: 10px;
    color: var(--gold-strong);
}

.skillup-effect-row.is-empty {
    grid-template-columns: 1fr;
    text-align: center;
    color: var(--text-secondary);
}

.skillup-effect-level {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-strong);
}

.skillup-effect-text {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.4;
}

.skillup-action {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skillup-card {
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(10, 14, 26, 0.82);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skillup-card-title {
    font-size: 11px;
    color: var(--text-secondary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.skillup-cost-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skillup-cost-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.skillup-cost-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.skillup-cost-icon {
    width: 18px;
    height: 18px;
    box-shadow: none;
    flex-shrink: 0;
}

.skillup-cost-icon::before,
.skillup-cost-icon::after {
    content: none;
    display: none;
}

.skillup-cost-value {
    font-size: 15px;
    font-weight: 700;
}

.skillup-chance-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--success);
}

.skillup-upgrade-btn {
    height: 48px;
    border-radius: 14px;
    border: 1px solid rgba(120, 200, 255, 0.45);
    background: linear-gradient(140deg, rgba(120, 200, 255, 0.35), rgba(20, 28, 46, 0.9));
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: 0.04em;
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.4);
}

.skillup-upgrade-btn:hover:not(:disabled) {
    border-color: rgba(255, 214, 122, 0.7);
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.5), 0 0 16px rgba(255, 214, 122, 0.2);
}

.skillup-upgrade-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.skillup-note {
    font-size: 13px;
    color: var(--text-secondary);
    min-height: 16px;
    line-height: 1.4;
}

.skillup-result {
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.skillup-result.show {
    opacity: 1;
}

.skillup-result.is-success {
    color: var(--success);
}

.skillup-result.is-fail {
    color: var(--danger);
}

.skillup-action-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    width: 100%;
    margin-left: auto;
}

.skillup-reset-btn,
.skillup-reset-all-btn {
    height: 36px;
    width: auto;
    flex: 1 1 0;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 94, 115, 0.5);
    background: linear-gradient(140deg, rgba(255, 94, 115, 0.2), rgba(18, 22, 36, 0.92));
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.skillup-reset-btn:hover:not(:disabled),
.skillup-reset-all-btn:hover:not(:disabled) {
    border-color: rgba(255, 120, 140, 0.8);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.45), 0 0 12px rgba(255, 94, 115, 0.2);
}

.skillup-reset-btn:disabled,
.skillup-reset-all-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@keyframes skillupSuccessPulse {
    0% { transform: scale(1); box-shadow: 0 35px 90px rgba(0, 0, 0, 0.75); }
    40% { transform: scale(1.012); box-shadow: 0 40px 110px rgba(0, 0, 0, 0.8), 0 0 28px rgba(255, 214, 122, 0.35); }
    100% { transform: scale(1); box-shadow: 0 35px 90px rgba(0, 0, 0, 0.75); }
}

@keyframes skillupSuccessGlow {
    0% { opacity: 0; }
    25% { opacity: 0.85; }
    100% { opacity: 0; }
}

@keyframes skillupSuccessBurst {
    0% { opacity: 0; transform: scale(0.85) rotate(0deg); }
    30% { opacity: 0.9; }
    100% { opacity: 0; transform: scale(1.15) rotate(18deg); }
}

.class-info-skills {
    display: grid;
    gap: 10px;
}

.class-info-skill {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(10, 18, 16, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.class-info-skill-key {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-weight: 700;
    color: #f0fff8;
    background: linear-gradient(145deg, rgba(20, 28, 22, 0.9), rgba(8, 14, 12, 0.8));
    border: 1px solid var(--class-accent-weak);
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.35), inset 0 0 12px rgba(255, 255, 255, 0.04);
}

.class-info-skill-desc {
    font-size: 0.9rem;
    color: rgba(230, 255, 240, 0.95);
    line-height: 1.5;
    margin-bottom: 6px;
}

.class-info-skill-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 0.78rem;
    color: rgba(210, 235, 220, 0.85);
}

.class-info-skill-stat {
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(8, 12, 10, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.class-info-loading {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(12, 20, 16, 0.7);
    border: 1px solid var(--class-accent-weak);
    color: rgba(230, 255, 240, 0.85);
    font-weight: 600;
}

@media (min-width: 680px) {
    .class-info-skills {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.skill-card {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    padding: 14px 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.25);
}

.skill-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.skill-key {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 900;
    letter-spacing: 0.4px;
}

.skill-key .pill {
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.25);
    font-size: 0.9rem;
}

.skill-selected {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.variant-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.variant-box {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px 10px 9px;
    background: rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.variant-btn {
    width: 100%;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.88);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 900;
    letter-spacing: 0.2px;
    transition: all 0.18s ease;
}

.variant-btn:hover {
    border-color: rgba(158, 252, 255, 0.42);
    background: rgba(255, 255, 255, 0.1);
}

.variant-btn.selected {
    border-color: rgba(158, 252, 255, 0.7);
    box-shadow: inset 0 0 18px rgba(158, 252, 255, 0.22);
}

.variant-btn .tag {
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.82rem;
}

.variant-desc {
    font-size: 0.88rem;
    line-height: 1.35;
    color: var(--text-secondary);
}

.variant-desc .buff {
    color: rgba(170, 255, 220, 0.95);
    font-weight: 800;
}

.variant-desc .debuff {
    color: rgba(255, 160, 160, 0.92);
    font-weight: 800;
}

.jewel-skill-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: auto;
    padding-right: 4px;
}

.jewel-skill-card {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 10px 12px 10px 18px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(8, 12, 22, 0.7);
    color: var(--text-primary);
    text-align: left;
}

.jewel-skill-card.active {
    border-color: rgba(120, 240, 200, 0.45);
    box-shadow: 0 0 18px rgba(120, 240, 200, 0.22);
}

.jewel-skill-key {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(15, 20, 35, 0.8);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.jewel-skill-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.jewel-skill-title {
    font-size: 14px;
    font-weight: 600;
}

.jewel-skill-equip {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.jewel-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(16, 20, 32, 0.7);
    color: rgba(245, 248, 255, 0.9);
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.35);
}

.jewel-chip-cheongmyeong {
    background: linear-gradient(140deg, rgba(76, 196, 142, 0.45), rgba(10, 32, 24, 0.92));
    border-color: rgba(120, 230, 178, 0.6);
    color: rgba(218, 255, 235, 0.95);
}

.jewel-chip-myeolhwa {
    background: linear-gradient(140deg, rgba(242, 150, 80, 0.5), rgba(46, 20, 4, 0.92));
    border-color: rgba(255, 186, 110, 0.65);
    color: rgba(255, 238, 214, 0.95);
}

.jewel-chip-gyeophwa {
    background: linear-gradient(140deg, rgba(154, 118, 214, 0.5), rgba(28, 12, 40, 0.92));
    border-color: rgba(196, 154, 255, 0.65);
    color: rgba(236, 224, 255, 0.95);
}

.jewel-chip-wonhae {
    background: linear-gradient(140deg, rgba(90, 188, 210, 0.5), rgba(10, 28, 34, 0.92));
    border-color: rgba(138, 228, 244, 0.6);
    color: rgba(214, 252, 255, 0.95);
}

.jewel-chip-hongyeom {
    background: linear-gradient(140deg, rgba(228, 92, 86, 0.55), rgba(40, 10, 10, 0.92));
    border-color: rgba(255, 154, 140, 0.6);
    color: rgba(255, 226, 220, 0.95);
}

.jewel-chip-jakyeol {
    background: linear-gradient(140deg, rgba(130, 120, 248, 0.5), rgba(20, 16, 40, 0.92));
    border-color: rgba(178, 170, 255, 0.65);
    color: rgba(230, 226, 255, 0.95);
}

.jewel-chip-gwanghwi {
    background: linear-gradient(140deg, rgba(255, 190, 112, 0.55), rgba(40, 20, 10, 0.92));
    border-color: rgba(255, 226, 160, 0.7);
    color: rgba(255, 248, 230, 0.95);
}

.jewel-skill-icon {
    margin-left: auto;
}

.jewel-skill-key#jewel-skill-key {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(18, 24, 40, 0.9);
}

.jewel-skill-sub {
    font-size: 12px;
    color: var(--text-secondary);
}

@media (max-width: 1800px) {
    #cooldown-display {
        width: min(460px, 90vw);
    }
}

@media (max-width: 768px) {
    .skillup-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .skillup-header-right {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .skillup-owned {
        width: 100%;
        flex-wrap: wrap;
    }

    .skillup-owned-card {
        width: 100%;
        min-width: 0;
    }

    .skillup-tabs {
        flex-wrap: wrap;
    }

    .skillup-body {
        grid-template-columns: 1fr;
    }

    .skillup-skill-list {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .skillup-skill-card {
        flex: 1 1 140px;
    }
}
