.main-content {
    background-color: transparent;
    width: 100%;
}

.main-wrapper {
    box-sizing: border-box;
    caret-color: transparent;
}

.main-wrapper :is(input, textarea, [contenteditable=""], [contenteditable="true"], [contenteditable="plaintext-only"]) {
    caret-color: auto;
}

/* top section */
.navigation-path {
    padding: 10px 0px 0px 0px;
}

.character-header {
    display: flex;
    justify-content: space-between;
    gap: 40px;
}

.character-images {
    flex: 1;
}

/* 캐러셀 */
.carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.carousel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/assets/img/character-detail/character_bg.png');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    background-position-y: 30%;
    z-index: -1;
    opacity: 0.15;
}


/* J&C 전용 스타일 */

.carousel.is-jc::before {
    background-image: url('/data/characters/J&C/chain4.png') !important;
    height: 114%;
    top: -9%;
    left: -7%;

    transform: rotate(10deg);
    opacity: 1;
}

.container.is-jc {
    --character-card-accent: #fffe79;
    --character-segmented-theme-fill: #292a3d;
    --character-segmented-theme-hover: #33344d;
    --character-segmented-theme-active: #3a3b57;
    --character-segmented-theme-text: #fffe79;
    background: linear-gradient(to bottom, rgb(0 0 0 / 0%), rgb(0 0 0 / 13%)), linear-gradient(45deg, transparent 48%, rgba(255, 255, 255, 0.03) 49%, rgba(255, 255, 255, 0.03) 51%, transparent 52%), linear-gradient(-45deg, transparent 48%, rgba(255, 255, 255, 0.03) 49%, rgba(255, 255, 255, 0.03) 51%, transparent 52%), #171940;
    ;
    background-size: 100% 100%, 30px 30px, 30px 30px, 100% 100%;
    background-attachment: scroll, scroll, scroll, scroll;
    background-position: 0 0, 0 0, 0 0, center center;
}

body:has(.container.is-jc) {
    --character-nature-hover: #fffe79;
}

.character-name.is-jc::before {
    background: #000000 !important;
}

.character-name.is-jc {
    color: #fffe79 !important;
}

.carousel-dots .dot.active.is-jc {
    color: #fffd00;
}



.carousel-inner {
    display: flex;
    transition: transform 0.3s ease;
    width: 100%;
    gap: 200px;
}

.carousel-item {
    min-width: 100%;
    display: flex;
    justify-content: center;
}

.thief-image,
.persona-image {
    width: auto;
    max-width: 100%;
    height: 600px;
    object-fit: contain;
}

/* 초기 상태: 로딩 전에는 숨김 */
.thief-anim-wrapper {
    opacity: 0;
}

/* 래퍼가 로드되면 애니메이션 시작 (투명도 + 위치 이동만) */
.thief-anim-wrapper[data-loaded="true"] {
    animation: slideInRight 1.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.thief-image {
    /* 초기 스케일 1 (애니메이션 시작점) */
    transform: scale(1);
    /* 스케일 자연스럽게 전환 */
    transition: transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

.thief-image[data-loaded="true"] {
    transform: scale(var(--char-scale, 1));
}

.thief-image[data-character="모토하·청광"][data-loaded="true"] {
    transform: scale(1.4) translateY(-70px);
}

/* 페르소나 이미지도 스케일 변수 적용 */
.persona-image {
    transform: scale(var(--char-scale, 1));
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(60px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 기존의 강제 표시 로직 제거: JS의 타임아웃/에러 핸들러가 data-loaded를 보장하므로 초기 숨김이 안전함 */
/* .thief-image:not([data-loaded="true"]),
.persona-image:not([data-loaded="true"]) {
    visibility: visible;
} */

/* 이미지 로딩 전 숨김 처리 제거 (다국어 환경에서 이벤트 지연/누락시 보이도록) */
.carousel-dots {
    display: flex;
    justify-content: center;
    margin-top: 8px;
    position: relative;
    z-index: 100;
}

.carousel-dots .dot,
.character-video-dot {
    display: grid;
    place-items: center;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.carousel-dots .dot::before,
.character-video-dot::before {
    content: '';
    box-sizing: border-box;
    width: 9px;
    height: 9px;
    transform: rotate(45deg);
    pointer-events: none;
}

.carousel-dots .dot {
    color: #ffffff75;
}

.carousel-dots .dot::before {
    background: currentColor;
}

.carousel-dots .dot.active {
    color: #ff0000;
}

@media (prefers-reduced-motion: no-preference) {
    .carousel-dots .dot {
        transition: color 0.3s;
    }
}

/* 캐릭터 상단 */
.character-info {
    flex: 1;
}

.name-section {
    margin-bottom: 24px;
}

.name-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.element-icons {
    display: flex;
    align-items: center;
}

.element-icons img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.element-icons img[src*="속성_주원.png"] {
    width: 34px !important;
    height: 34px !important;
    padding: 3px;
}

.position-icon {
    display: flex;
    align-items: center;
}

.position-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.rarity-section {
    display: flex;
    align-items: center;
    gap: 2px;
}

.character-name {
    margin: 12px 8px 12px 0;
    color: rgb(255, 255, 255, 0.95);
    position: relative;
}

.character-name-text {
    display: block;
}

.character-name-animation {
    position: absolute;
    inset: 0;
    pointer-events: none;
    user-select: none;
}

.character-name:has(> .character-name-animation) > .character-name-text {
    opacity: 0;
}

.character-name-animation :is(.character-name-letter, .character-name-letter-mask, .character-name-word) {
    display: inline-block;
}

@media (max-width: 768px) {
    .character-name {
        margin: 0px;
    }
}

@keyframes subtle-liquid-name {
    0% {
        clip-path: polygon(0% 2%, 99% 2%, 94% 49%, 4% 54%);
    }

    10% {
        clip-path: polygon(1% 1%, 98% 4%, 93% 50%, 5% 55%);
    }

    20% {
        clip-path: polygon(-1% 3%, 100% 5%, 95% 48%, 3% 53%);
    }

    30% {
        clip-path: polygon(0% 3%, 98% 2%, 93% 50%, 5% 55%);
    }

    40% {
        clip-path: polygon(1% 1%, 99% -1%, 95% 48%, 4% 53%);
    }

    50% {
        clip-path: polygon(0% 0%, 100% 2%, 93% 50%, 3% 55%);
    }

    60% {
        clip-path: polygon(-1% 3%, 98% 1%, 94% 48%, 5% 54%);
    }

    70% {
        clip-path: polygon(1% 2%, 99% -1%, 95% 50%, 4% 55%);
    }

    80% {
        clip-path: polygon(0% 1%, 100% 2%, 93% 48%, 3% 53%);
    }

    90% {
        clip-path: polygon(-1% 3%, 98% 4%, 94% 50%, 5% 55%);
    }

    100% {
        clip-path: polygon(0% 2%, 99% 0%, 94% 49%, 4% 54%);
    }
}

h1.character-name::before {
    content: "";
    background: #c10000;
    position: absolute;
    top: 38%;
    left: -5%;
    width: 110%;
    height: 110%;
    z-index: -1;
    clip-path: polygon(0% 2%, 99% 0%, 94% 49%, 4% 54%);
    animation: subtle-liquid-name 3s infinite linear;
}

/* 이름 스켈레톤 플레이스홀더 */
.character-name.skeleton {
    display: inline-block;
    min-width: 140px;
    height: 1em;
    border-radius: 4px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.08) 25%, rgba(255, 255, 255, 0.15) 37%, rgba(255, 255, 255, 0.08) 63%);
    background-size: 400% 100%;
    color: transparent !important;
    animation: skeleton-loading 1.4s ease infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: 0 0;
    }
}

.code-name {
    font-size: 16px;
    font-weight: 400;
    color: #666;
}

.persona-name {
    display: block;
    font-size: 16px;
    font-weight: 400;
    color: #666;
    margin-top: 4px;
}

.code-name>span:not(.label),
.persona-name>span:not(.label) {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 700;
    position: relative;
}


.name-row2 {
    display: flex;
    flex-direction: row;
    gap: 12px;
    margin-bottom: 40px;
}

.character-description {
    height: fit-content;
    transform: translateX(-4px);
}

.chracter-role {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    padding: 8px 16px;
    width: fit-content;
    height: fit-content;
    font-weight: 600;
}

.chracter-tag {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    row-gap: 12px;
    max-width: 360px;
    margin-top: 10px;
    margin-bottom: 20px;
}

.character-video {
    width: 360px;
    aspect-ratio: 16 / 9;
    border: 4px solid #101010;
    background-color: #000;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
    margin-left: 4px;
}

.character-video-stage {
    width: 100%;
    height: 100%;
    touch-action: pan-y;
}

.character-video-poster {
    width: 100%;
    height: 100%;
    position: relative;
    background: #000;
}

.character-video-poster img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.character-video-overlay {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    pointer-events: none;
    z-index: 1;
}

.character-video-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    border: none;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}

.character-video-play svg {
    display: block;
}

.character-video-play-img {
    width: 64px !important;
    height: 64px !important;
    object-fit: contain;
    display: block;
}

@media (max-width: 768px) {
    .character-video-play {
        width: 64px !important;
        height: 64px !important;
    }

    .character-video-play-img {
        width: 64px !important;
        height: 64px !important;
        margin-bottom: 4px;
    }
}

.character-video iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.character-video-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.character-video-nav svg {
    display: block;
}

.character-video-nav.prev {
    left: 8px;
}

.character-video-nav.next {
    right: 8px;
}

.character-video-dots {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    display: flex;
    z-index: 2;
}

.character-video-dot::before {
    border: 1px solid rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.35);
}

.character-video-dot.active::before {
    background: rgba(255, 255, 255, 0.95);
}

.character-video-dot:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -3px;
}

@media (max-width: 1200px) {
    .character-video {
        width: calc(100% - 32px);
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 40px;
        max-width: 520px;
    }
}

.tag-item {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    padding: 8px 16px;
}

.character-header :is(.chracter-role, .tag-item) {
    background-color: var(--character-card-fill, var(--card-background));
    clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}

.basic-info {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 20px;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* setting section */
.setting-section {
    /* background: rgba(255, 255, 255, 0.05);*/
    padding: 0px 0px 10px 0px;
    /* border-radius: 6px;*/
    display: flex;
    flex-direction: column;
}

h2 {
    font-size: 20px;
    color: rgb(255, 255, 255, 0.8);
    padding: 10px 0px 20px 0px;
    border-bottom: 1px solid transparent;
}

:where(h2, #character-tactic-examples .card-title-row, .setting-group:not(:last-child, .pros-cons-group, .operation-settings), .weapon-effect-header) {
    position: relative;
}

:where(h2, #character-tactic-examples .card-title-row, .setting-group:not(:last-child, .pros-cons-group, .operation-settings), .weapon-effect-header)::after {
    position: absolute;
    inset: auto 0 -2px;
    height: 3px;
    background: var(--section-divider-paint);
    pointer-events: none;
    content: "";
}

/* skill/mind item count */
.item-count {
    display: flex;
    gap: 12px;
    font-size: 12px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.5);
    align-items: center;
}

.item-with-count {
    display: flex;
    align-items: center;
    gap: 4px;
}

.item-count img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.item-count img[src*="item-goldenrose.png"] {
    width: 24px;
    height: 24px;
}




.setting-section h3 {
    color: #ccc;
    font-size: 16px;
    margin: 10px 0px 20px 0px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.help-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    margin-bottom: 4px;
    cursor: pointer;
}

/* label and value */
.option-row,
.stat-level,
.skill-level,
.operation-level,
.stat-row,
.skill-row,
.operation-row,
.main-revelation,
.sub-revelation,
.awake-row {
    display: grid;
    grid-template-columns: 111px 1fr;
    gap: 8px;
    align-items: center;
    padding: 0;
    margin-bottom: 8px;
    font-size: 14px;
}

/* label style */
.label,
.priority,
.stat-level>span:first-child,
.skill-level>span:first-child,
.stat-row>span:first-child,
.skill-row>span:first-child,
.operation-row>span:first-child,
.operation-label {
    color: #aaa;
    font-size: 0.95em;
}

/* value style */
.value {
    color: rgb(255, 255, 255, 0.9);
}

.awake-row .value {
    font-size: 14px;
}

.lv80-grid .value {
    font-size: 13px;
}

.lv80-stats-card {
    padding: 0px 0px 30px 0px;
}

.revelation-set {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.main-revelation,
.sub-revelation {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.sub-revelation {
    margin-top: -4px;
}

.revelation-values {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    grid-auto-flow: column;
    gap: 8px 8px;
    justify-items: start;
}

.revelation-value-item {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.9);
    gap: 8px;
    background: rgba(0, 0, 0, 0.1);
    padding: 4px 8px;
    margin: 0;
    width: fit-content;
}

.revelation-value-item span {
    width: fit-content;
    white-space: nowrap;
}

.revelation-icon {
    width: 32px;
    height: 24px;
    object-fit: contain;
}

.main-revelation .label,
.sub-revelation .label {
    min-width: 80px;
    display: flex;
    align-items: center;
    gap: 4px;
}


.option-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    opacity: 0.5;
    vertical-align: middle;
    margin-left: 4px;
}


.battle-plus-stats,
.operation-note {
    color: #aaa;
    font-size: 14px;
    line-height: 1.6;
    padding: 0;
    margin: 0;
    margin-top: -4px;
    white-space: normal;
}

.battle-stat-section {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.battle-stat-section b {
    color: #fff;
    font-weight: normal;
    display: block;
    margin-bottom: 8px;
}

.main-options,
.sub-options,
.skill-levels {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mind-settings {
    display: flex;
    flex-direction: column;
    gap: 0px;
}


/* stat section */
.stat-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 40px;
}

.stat-item {
    background: #1a1919;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
}

/* character basic stats grid (left section in stats card) */
.stats-grid {
    display: grid;
    grid-auto-flow: row;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
}

.stats-grid>.stat-row,
.awake-row {
    min-width: 0;
    display: flex;
    gap: 8px;
    flex-direction: column;
    align-items: flex-start;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 540px) {
    .setting-group.stats-settings {
        gap: 16px !important;
        flex-direction: column;
    }
}

/* skill section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 16px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.skill-card {
    background: rgba(0, 0, 0, 0.15);
    padding: 20px 16px 12px 16px;
    border-radius: 8px;
    display: flex;
    gap: 16px;
}

/* operation card */

.skill-sequence {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 4px;
}

.skill-step {
    font-size: 12px;
    min-width: 40px;
    text-align: left;
    padding: 4px 4px;
    color: #FFFFFFE6;
}

.skill-arrow {
    font-size: 12px;
    color: rgb(255, 255, 255, 0.3);
}

.operation-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.operation-label {
    min-width: 80px;
}

.operation-value {
    flex: 1;
    margin-left: 16px;
}

/* 줄바꿈이 있을 경우 앞에 띄어쓰기 추가 */
.operation-note {
    line-height: 1.6;
    margin-bottom: 4px;
}




.skill-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.skill-icon[src*="주원.png"] {
    width: 28px !important;
    height: 28px !important;
    padding: 2px;
}

.skill-info {
    flex: 1;
}

.skill-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0px;
}

.skill-name {
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.skill-cost {
    font-size: 12px;
    color: #aaa;
    padding: 4px 8px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.15);
}

.skill-description {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    white-space: pre-line;
}

/* weapon section */

.resistance-section {
    margin-top: 0px;
}

.resistance-section h3 {
    margin-bottom: 15px;
}

.elements-container {
    position: relative;
    width: 360px;
    height: 80px;
    object-fit: contain;
    overflow: hidden;
}

.elements-sprite {
    width: 100%;
    max-width: 360px;
    height: 40px;
    padding-top: 10px;
    /*filter: drop-shadow(0 20px 0 rgba(0, 0, 0, 0.9));*/
}

.resistance-overlay,
.weakness-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.resistance-icon,
.weakness-icon {
    position: absolute;
    width: 24px;
    height: 24px;
    opacity: 0.8;
    object-fit: contain;
    display: none;
    margin-top: 38px;
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 1)),
        drop-shadow(0 0 2px rgba(0, 0, 0, 1)),
        drop-shadow(0 2px 2px rgba(0, 0, 0, 1)),
        drop-shadow(2px 0 2px rgba(0, 0, 0, 1)),
        drop-shadow(0 -2px 2px rgba(0, 0, 0, 1)),
        drop-shadow(-2px 0 2px rgba(0, 0, 0, 1)),
        drop-shadow(2px 2px 3px rgba(0, 0, 0, 1)),
        drop-shadow(-2px -2px 3px rgba(0, 0, 0, 1));
}

.sub-info {
    margin-top: 10px;
}

.sub-info p {
    margin: 5px 0;
    color: rgb(255, 255, 255, 0.9);
}

.label {
    color: #aaa;
    margin-right: 10px;
}



.card-style {
    --section-card-fill: var(--character-card-fill, var(--card-background));
    --section-card-accent: var(--character-card-accent, var(--border-red));
    --section-card-paint-inset: 0 0 -3px;
    border-bottom: 3px solid transparent;
    padding: 10px 35px 20px 35px;
    margin: 20px 0;
}

/* character tactic examples title row */
#character-tactic-examples .card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0 20px 0;
    border-bottom: 1px solid transparent;
    margin: 16.6px 0;
}

#character-tactic-examples .card-title-row h2 {
    margin: 0;
    padding: 0;
    border: 0;
}

#character-tactic-examples .card-title-row h2::after {
    content: none;
}


/* setting card style */
.settings-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
}

/* default style of each group */
.setting-group {
    margin-bottom: 20px;
    border-bottom: 1px solid transparent;
    padding-bottom: 20px;
}


.setting-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

/* stat requirement section */
.stats-requirements {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2vw;
    align-items: stretch;
}

.stat-level .value {
    color: rgb(255, 255, 255, 0.9);
}

.valid-stat {
    color: rgb(255, 255, 255, 0.5);
}

/* revelation setting section */
.revelation-settings {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto;
    gap: 10px 2vw;
    align-items: stretch;
}

.revelation-settings>.setting-section:first-child {
    grid-column: 1 / span 2;
    grid-row: 1;
}

.revelation-settings>.setting-section:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
}

.revelation-settings>.setting-section:last-child {
    grid-column: 2;
    grid-row: 2;
}

/* skill&mind section */
.skill-mind-settings,
.operation-settings {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2vw;
    align-items: stretch;
}


/* ritual, weapon section */

.ritual-level,
.enhancement-level {
    display: flex;
    gap: 16px;
    margin: 30px 0px 30px 0px;
    flex-wrap: wrap;
}

.ritual-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0px 2vw;
    margin-top: 20px;
}

.ritual-item {
    padding: 0px 0px 36px 0px;
    min-height: 80px;
}

.ritual-item:last-child {
    grid-column: 1 / -1;
    padding-bottom: 22px;
    /* last item (ritual 6) use full width */
}

.ritual-header-content {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.ritual-image {
    width: 40px;
    height: 40px;
    object-fit: contain;
    opacity: 0.8;
}

.ritual-title {
    font-size: 18px;
    font-weight: 500;
    margin: 0px;
    color: rgb(255, 255, 255, 0.9);
}

.ritual-description {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: -0.02em;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.7;
    margin: 8px 0px 0px 0px;
    white-space: pre-line;

}

@media (width > 768px) {
    .ritual-description {
        margin-top: 6px;
        padding-left: 50px;
    }
}

.ritual-item:first-child .ritual-title {
    color: rgba(255, 255, 255, 0.9);
}

.ritual-item:last-child .ritual-title {
    background: linear-gradient(5deg,
            #4169e1,
            #c4ffff,
            #e4c2d3,
            #4169e1,
            #c4ffff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 1)),
        drop-shadow(1px 0 2px rgba(0, 0, 0, 1)),
        drop-shadow(0 -1px 2px rgba(0, 0, 0, 1)),
        drop-shadow(-1px 0 2px rgba(0, 0, 0, 1));
    -webkit-text-fill-color: transparent;
    animation: gradient 3s linear infinite;
    background-size: 200% auto;

}


/* weapon section */
.weapons-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.weapon-item {
    display: flex;
    gap: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
}

.weapon-image {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

.weapon-info {
    flex: 1;
}

.weapon-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.weapon-name {
    font-size: 16px;
    font-weight: 400;
    color: #ffe5b2;
}

.weapon-name.five-star {
    color: #9effff;
}

.weapon-stars {
    display: flex;
    gap: 2px;
}

.weapon-stars img {
    width: 12px;
    height: 12px;
}

.weapon-description {
    font-size: 14px;
    color: rgb(255, 255, 255, 0.8);
    white-space: pre-line;
}

.weapon-stats {
    font-size: 13px;
    color: rgb(255, 255, 255, 0.8);
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0px;
    row-gap: 4px;
}

.weapon-stats img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    opacity: 0.6;
}

.weapon-stats p {
    margin: 0 16px 0 4px;
}

.weapon-info h4 {
    font-size: 14px;
    font-weight: 500;
    margin: 20px 0px 0px 0px;
}

.weapon-skill p {
    font-size: 13px;
    line-height: 1.6;
    color: rgb(255, 255, 255, 0.8);
    margin-top: 8px;
    white-space: pre-line;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* nature skill section */
.nature-skill-card {
    display: block;
}

:is(.nature-skill-card, .nature-skill-modal) {
    --nature-skill-hover: var(--character-nature-hover, #ef6268);
}

.nature-skill-header {
    display: block;
}

.nature-skill-header h2 {
    margin-bottom: 8px;
}

.nature-skill-global-note {
    margin: 0 0 14px 0;
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    line-height: 1.5;
}

.nature-skill-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 18px 0;
}

.nature-skill-tab {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.18);
    color: rgba(255, 255, 255, 0.78);
    border-radius: 0;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 120ms ease;
}

.nature-skill-tab:hover,
.nature-skill-tab.active {
    border-color: color-mix(in srgb, var(--nature-skill-hover) 58%, transparent);
    color: var(--nature-skill-hover);
    background: color-mix(in srgb, var(--nature-skill-hover) 8%, transparent);
}

.nature-skill-slots {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.nature-skill-slot-stack {
    position: relative;
    display: grid;
    min-width: 0;
}

.nature-skill-slot-stack::before {
    position: absolute;
    inset: 5px 0 0 -5px;
    border: 1px solid rgb(255 255 255 / 14%);
    /* Show the offset outline only where it extends past the front card. */
    clip-path: inset(0 calc(100% - 5px) 0 0);
    pointer-events: none;
    content: "";
}

.nature-skill-slot {
    position: relative;
    min-height: 168px;
    width: 100%;
    border: 1px dashed rgba(255, 255, 255, 0.25);
    color: inherit;
    text-align: left;
    cursor: pointer;
    align-items: flex-start;
    transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.nature-skill-slot.empty {
    align-items: stretch;
}

.section-card-cut .nature-skill-slot-stack:last-child > .nature-skill-slot::after {
    position: absolute;
    right: 0;
    bottom: calc(var(--section-card-tail-size) - 1px);
    width: calc(var(--section-card-tail-size) * 1.414214);
    border-top: 1px dashed;
    border-top-color: inherit;
    transform: rotate(-45deg);
    transform-origin: right top;
    pointer-events: none;
    content: "";
}

.nature-skill-slot.empty .nature-skill-slot-info {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.nature-skill-slot:hover,
.nature-skill-slot:focus-visible {
    border-color: color-mix(in srgb, var(--nature-skill-hover) 55%, transparent);
    background: color-mix(in srgb, var(--nature-skill-hover) 6%, transparent);
    transform: translateY(-1px);
    outline: none;
}

.nature-skill-slot-label {
    color: rgba(255, 255, 255, 0.9);
}

.nature-skill-title-line {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

.nature-skill-recommend-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 2px 6px;
    border: 1px solid rgba(158, 255, 255, 0.45);
    border-radius: 4px;
    background: rgba(67, 204, 204, 0.16);
    color: #cfffff;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.nature-skill-recommend-note {
    margin: 8px 0 0;
    color: rgba(158, 255, 255, 0.82);
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-line;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.nature-skill-slot-desc {
    word-break: break-word;
    overflow-wrap: break-word;
}

.nature-skill-slot-plus {
    position: absolute;
    left: 50%;
    top: 58%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--nature-skill-hover);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
}

.nature-skill-slot-hint {
    flex: 0 0 auto;
}

.nature-skill-icon {
    flex: 0 0 auto;
}

.nature-skill-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.78);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.nature-skill-modal.show {
    display: flex;
}

.nature-skill-modal-content {
    position: relative;
    width: min(820px, 94vw);
    max-height: 86vh;
    overflow-y: auto;
    background: var(--card-background);
    border-bottom: 3px solid var(--border-red);
    padding: 24px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

.nature-skill-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.nature-skill-modal-close:hover,
.nature-skill-modal-close:focus-visible {
    color: #fff;
    outline: none;
}

.nature-skill-modal-header h3 {
    margin: 0 36px 16px 0;
    font-size: 20px;
    color: rgba(255, 255, 255, 0.92);
}

.nature-skill-modal-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.nature-skill-modal-option {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    color: inherit;
    text-align: left;
    cursor: pointer;
    width: 100%;
}

.nature-skill-modal-option:hover,
.nature-skill-modal-option:focus-visible {
    border-color: color-mix(in srgb, var(--nature-skill-hover) 55%, transparent);
    background: color-mix(in srgb, var(--nature-skill-hover) 6%, transparent);
    outline: none;
}

.nature-skill-option-header {
    justify-content: space-between;
}

.nature-skill-option-name {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    color: rgba(255, 255, 255, 0.9);
}

.nature-skill-option-meta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    line-height: 1;
    white-space: nowrap;
    border-radius: 0;
}

.nature-skill-modal .nature-skill-recommend-badge {
    border-radius: 0;
}

.nature-skill-option-cost {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    line-height: 1;
}

.nature-skill-cost-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.nature-skill-option-desc {
    word-break: break-word;
    overflow-wrap: break-word;
}

.nature-skill-modal-empty {
    color: rgba(255, 255, 255, 0.62);
    margin: 10px 0 0 0;
}

@media (max-width: 768px) {
    .nature-skill-slots {
        grid-template-columns: 1fr;
    }

    .nature-skill-slot {
        min-height: 140px;
    }

    .nature-skill-modal-content {
        width: 94vw;
        max-height: 74vh;
        padding: 20px 16px;
    }

    .nature-skill-modal-header h3 {
        margin: 0 32px 12px 0;
    }

    .nature-skill-option-header {
        display: block;
    }

    .nature-skill-option-meta {
        display: inline-flex;
        margin-top: 0;
        white-space: normal;
        vertical-align: middle;
    }
}

/* weapon enhancement and skill level style */
.enhancement-values,
.skill-level-values {
    color: #8ea7c5;
    font-weight: 400;
    word-break: break-word;
    overflow-wrap: break-word;
}

.report-link {
    color: #cc6d6d;
    text-decoration: underline;
    cursor: pointer;
}



.weapon-enhancement-buttons {
    margin: 1rem 0;
}

.skill-level-toolbar {
    margin: 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.sync-mindscape-controls {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-left: auto;
}

.character-segmented-strip {
    --character-segmented-fill: var(--character-segmented-theme-fill, #292728);
    --character-segmented-active: var(--character-segmented-theme-active, var(--border-red));
    --character-segmented-shape: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
    position: relative;
    display: flex;
    width: fit-content;
    max-width: 100%;
    padding-inline-end: 10px;
    overflow: clip;
    background: var(--character-segmented-fill);
    clip-path: var(--character-segmented-shape);
}

.character-segmented-group {
    display: flex;
}

.character-segmented-strip button {
    --character-segmented-button-fill: transparent;
    position: relative;
    z-index: 1;
    isolation: isolate;
    flex-shrink: 0;
    min-height: 36px;
    padding: 6px 14px;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.68);
    white-space: nowrap;
    cursor: pointer;
}

.enhancement-stages .enhancement-btn {
    width: clamp(30px, 8vw, 42px);
    padding-inline: 0;
    font-variant-numeric: tabular-nums;
}

.character-segmented-strip button::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    background: var(--character-segmented-button-fill);
    box-shadow: inset 1px 0 rgba(0, 0, 0, 0.34);
    transform: skewX(28deg);
    content: "";
}

.character-segmented-group:first-of-type > button:first-of-type::before {
    inset-inline-start: -24px;
    box-shadow: none;
}

.character-segmented-group:last-of-type > button:last-of-type::before {
    inset-inline-end: -28px;
}

.character-segmented-strip button.active {
    --character-segmented-button-fill: var(--character-segmented-active);
    color: var(--character-segmented-theme-text, #fff);
}

.character-segmented-indicator {
    position: absolute;
    inset: 0;
    background: var(--character-segmented-active);
    pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
    .character-segmented-strip.is-transitioning button.active {
        --character-segmented-button-fill: transparent;
    }
}

@media (prefers-reduced-motion: reduce) {
    .character-segmented-indicator {
        display: none;
    }
}

.character-segmented-strip button:focus-visible {
    outline: none;
}

.character-segmented-strip button:focus-visible::before {
    outline: 2px solid #d2ad76;
    outline-offset: -2px;
}

@media (hover: hover) and (pointer: fine) {
    .character-segmented-strip button:hover:not(.active, :disabled) {
        --character-segmented-button-fill: var(--character-segmented-theme-hover, #373334);
    }
}

@media (max-width: 600px) {
    .character-segmented-strip {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding-inline-end: 0;
        background: transparent;
        clip-path: none;
    }

    .character-segmented-group {
        position: relative;
        padding-inline-end: 10px;
        background: var(--character-segmented-fill);
        clip-path: var(--character-segmented-shape);
    }

    .character-segmented-group > button:last-of-type::before {
        inset-inline-end: -28px;
    }

    .character-segmented-group > button:first-of-type::before {
        inset-inline-start: -24px;
        box-shadow: none;
    }
}

.sync-mindscape-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 0px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    border-radius: 36px;
    transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 120ms ease;
}

.sync-mindscape-btn:active,
.nature-skill-tab:active,
.nature-skill-slot:active {
    transform: scale(0.97);
}

.sync-mindscape-btn:focus-visible,
.nature-skill-tab:focus-visible {
    outline: 2px solid #d2ad76;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .sync-mindscape-btn,
    .nature-skill-tab,
    .nature-skill-slot {
        transition-duration: 0.01ms;
    }

    .sync-mindscape-btn:active,
    .nature-skill-tab:active,
    .nature-skill-slot:active,
    .nature-skill-slot:hover,
    .nature-skill-slot:focus-visible {
        transform: none;
    }
}

.sync-mindscape-btn.active {
    box-shadow: 0 0 0 1px rgba(80, 210, 255, 0.7) inset;
    background: rgba(80, 210, 255, 0.12);
    color: #d8f6ff;
}

@media (hover: hover) and (pointer: fine) {
    .sync-mindscape-btn:hover:not(.active, :disabled) {
        background-color: rgba(185, 215, 244, 0.2);
        color: #b9d7f4;
    }

    .sync-mindscape-btn.active:hover:not(:disabled) {
        background-color: rgba(80, 210, 255, 0.22);
    }
}

.skill-description .sync-mindscape-value,
.skill-description .skill-level-values.sync-mindscape-value,
.skill-description .sync-mindscape-value .number-value,
.skill-description .skill-level-values.sync-mindscape-value .number-value {
    color: #50d2ff !important;
    font-weight: 600;
}

.sync-mindscape-help {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
}

.sync-mindscape-help svg {
    width: 18px;
    height: 18px;
    display: block;
}





@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@media(max-width: 768px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }

    .skill-level-toolbar {
        justify-content: flex-start;
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 0.5rem;
        overflow: visible;
        padding-bottom: 0;
        margin: 1rem 0 1.25rem;
    }

    .skill-level-toolbar .skill-level-buttons {
        order: 2;
    }

    .sync-mindscape-controls {
        width: 100%;
        order: 1;
        margin-left: 0;
        gap: 0.35rem;
    }

    .sync-mindscape-btn {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .sync-mindscape-btn {
        padding: 0.5rem 0.9rem;
    }
}

/* mobile responsive */
@media (max-width: 1200px) {

    .character-name {
        font-size: 24px;
    }

    h2 {
        font-size: 18px;
    }

    .card-style {
        padding: 2px 15px 20px 15px;
        margin: 20px 0;
    }


    .ritual-card h2,
    .weapons-card h2 {
        padding-bottom: 10px;
        border-bottom: 0px;
    }

    :is(.ritual-card, .weapons-card) h2::after {
        content: none;
    }

    .ritual-level,
    .enhancement-level {
        gap: 1vh 1.5vw;
        margin: 10px 0px 10px 0px;
    }

    .stats-requirements,
    .skill-mind-settings,
    .operation-settings {
        grid-template-columns: 1fr !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }

    .revelation-settings {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

    .revelation-settings>.setting-section {
        grid-column: 1 !important;
    }

    .revelation-settings>.setting-section:nth-child(2) {
        grid-row: 2;
    }

    .revelation-settings>.setting-section:last-child {
        grid-row: 3;
    }

    .operation-row {
        align-items: flex-start;
        margin-bottom: 20px;
    }

    .character-header {
        flex-direction: column;
        gap: 4vh;
    }

    .name-row2 {
        margin-top: 8px;
    }

    .character-images {
        width: 100%;
    }


    .thief-image,
    .persona-image {
        width: 100% !important;
        height: 100% !important;
        aspect-ratio: 3/4;
    }

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

    .skill-card {
        gap: 10px;
    }

    .skill-level-btn {
        font-size: 12px;
    }

    .skill-icon {
        width: 24px;
        height: 24px;
        object-fit: contain;
    }

    .skill-description {
        width: calc(100%+34px);
        margin-left: -34px;
    }

    .weapons-container {
        grid-template-columns: 1fr;
    }

    .ritual-tab,
    .enhancement-tab {
        padding: 4px 10px 4px 10px;
        font-size: 11px;
    }

    .ritual-grid {
        grid-template-columns: 1fr;
    }

    .weapon-image {
        object-fit: contain;
        margin-bottom: 10px;
    }

    .weapon-image-container {
        display: flex;
        justify-content: center;
    }

    .weapon-item {
        gap: 1em;
        display: grid;
        grid-template-columns: 1fr;
    }

    .weapon-stats p {
        margin: 0 6px 0 2px;
    }

    .weapon-stats {
        margin-bottom: 16px;
    }
}

/* revelation tooltip style */
.revelation-value.tooltip-text {
    cursor: pointer;
    white-space: pre-line;
    font-weight: bold;
}

.revelation-value.tooltip-text[data-tooltip]::before {
    white-space: pre-line;
    min-width: 200px;
    line-height: 1.4;
    padding: 10px;
}

/* Desktop: use JS floating tooltip instead of CSS ::before for revelations */
@media (min-width: 1201px) {

    /* 실제 캐릭터 페이지에서는 .revelation-value-item에 tooltip-text가 붙음 */
    .revelation-values .tooltip-text::before,
    .revelation-values .tooltip-text::after,
    .revelation-value-item.tooltip-text::before,
    .revelation-value-item.tooltip-text::after,
    .revelation-value.tooltip-text::before,
    .revelation-value.tooltip-text::after {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
}

/* mobile banner style */
@media (max-width: 1200px) {
    .revelation-value.tooltip-text.mobile-banner[data-tooltip]::before {
        white-space: pre-line;
        width: 90%;
        max-width: 400px;
    }
}

.operation-card {
    display: none;
}

.operation-content {
    padding: 0px;
    color: rgb(255, 255, 255, 0.8);
}


/* 페르소나 속성 섹션 */


.persona-attribute-section {
    margin-bottom: 30px;
}

.persona-attribute-section h3 {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    margin-top: 0px;
    font-size: 1em;
    font-weight: 500;
    padding-bottom: 0px;
    border-bottom: 0px solid rgba(255, 255, 255, 0.2);
}

/* 페르소나 리스트 */
.persona-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 10px 0;
}

.party-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 0px 0;
    min-width: 440px;
}

.persona-comment,
.party-comment {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85em;
    margin: 0 0 0px 0;
    line-height: 1.5;
    padding: 8px 12px;
    white-space: pre-line;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    border-left: 3px solid rgba(255, 255, 255, 0.1);
}


.persona-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    word-break: break-all;
}

.persona-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.recommended-weapon {
    box-sizing: content-box;
    height: 80px;
    justify-content: center;
    position: relative;
}

.recommended-weapon:hover {
    transform: none;
}

.recommended-weapon:focus-visible {
    outline: 2px solid #e2e2e2;
    outline-offset: 2px;
}

.persona-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 6px;
}

.persona-item span {
    color: rgba(255, 255, 255, 0.9);
    font-size: 11px;
    text-align: center;
    line-height: 1.2;
    word-break: normal;
    max-width: 100%;
}

.recommended-weapon img {
    min-height: 0;
}

.recommended-weapon .recommended-weapon-engraving {
    position: absolute;
    inset: 5px 5px auto auto;
    width: 16px;
    height: 16px;
    margin: 0;
}

.recommended-weapon span {
    word-break: keep-all;
    overflow-wrap: anywhere;
}

/* 파티 섹션 */
.party-section {
    margin-bottom: 20px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 1200px) {
    .party-section {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
        padding: 8px;
    }
}

.party-section h4 {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 12px;
    font-size: 1em;
    font-weight: 500;
    margin-top: 0;
}

/* 파티 리스트 */


.party-member {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 70px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.party-member:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.party-member img {
    width: 50px;
    height: 60px;
    object-fit: cover;
    margin-bottom: 4px;
    transition: filter 0.3s ease;
}

.party-portrait {
    display: block;
    position: relative;
    line-height: 0;
}

.party-member .party-role-icon {
    position: absolute;
    right: 0;
    bottom: 4px;
    width: 19px;
    height: 19px;
    margin: 0;
    object-fit: contain;
    border-radius: 0;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
}

.party-member .sub-member-badge .party-role-icon {
    right: 0;
    bottom: 0;
    width: 12px;
    height: 12px;
}

.party-member {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
    margin: 0 0;
    position: relative;
    text-decoration: none !important;
}

/* 5th member circular overlay */
.sub-member-badge {
    position: absolute;
    top: 40px;
    right: 26px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #606060;
    z-index: 5;
    background-color: #000;
    transition: transform 0.2s ease;
}

.sub-member-badge img {
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
    object-fit: cover;
}

.party-member:hover .sub-member-badge {
    transform: scale(1.1);
    border-color: #444;
}

.party-member.spoiler {
    cursor: pointer;
}

.party-member.spoiler img,
.party-member.spoiler .character-name {
    filter: blur(4px);
    user-select: none;
    -webkit-user-select: none;
}

.party-member.spoiler::after {
    content: 'SPOILER';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    z-index: 2;
    pointer-events: none;
}

/* 라인업용 스포일러 스타일 (파티와 동일한 연출) */
.friend-item.spoiler {
    position: relative;
    cursor: pointer;
}

.friend-item.spoiler img,
.friend-item.spoiler .friend-name,
.friend-item.spoiler .friend-element-icon,
.friend-item.spoiler .friend-role-icon,
.friend-item.spoiler .friend-comment {
    filter: blur(4px);
    user-select: none;
    -webkit-user-select: none;
}

.friend-item.spoiler::after {
    content: 'SPOILER';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    z-index: 2;
    cursor: pointer;
    pointer-events: auto;
}

/* spoiler style for tactic examples preview characters */
.character-container.spoiler {
    position: relative;
    cursor: pointer;
}

.character-container.spoiler img {
    filter: blur(4px);
    user-select: none;
    -webkit-user-select: none;
}

.character-container.spoiler::after {
    content: 'SPOILER';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    z-index: 2;
    pointer-events: none;
}

.party-member .character-name {
    font-size: 12px;
    text-align: center;
    word-break: keep-all;
    margin-top: 2px;
    margin-bottom: 0px;
    transition: filter 0.3s ease;
    word-wrap: break-word;
}

.party-member span {
    color: rgba(255, 255, 255, 0.9);
    font-size: 10px;
    text-align: center;
    line-height: 1.2;
    word-break: keep-all;
    max-width: 100%;
}

/* 모바일 반응형 */
@media (max-width: 1200px) {
    .persona-list {
        gap: 10px;
    }

    .persona-item {
        width: 70px;
    }

    .recommended-weapon {
        height: 70px;
    }

    .persona-item img {
        width: 50px;
        height: 50px;
    }

    .party-list {
        gap: 8px;
    }

    .party-member {
        width: 54px;
        margin: 0 0;
    }

    .party-member img {
        width: 45px;
        height: 45px;
    }

    #recommended-party-content .party-list:has(> .party-member:nth-child(4):last-child) {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
        min-width: 0;
    }

    #recommended-party-content .party-list:has(> .party-member:nth-child(4):last-child) > .party-member {
        width: auto;
        min-width: 0;
        padding-inline: 4px;
    }

    #recommended-party-content .party-list:has(> .party-member:nth-child(4):last-child) .party-portrait {
        max-width: 100%;
    }

    #recommended-party-content .party-list:has(> .party-member:nth-child(4):last-child) .party-portrait > img:first-child {
        max-width: 100%;
        height: auto;
        aspect-ratio: 1;
    }

    #recommended-party-content .party-list:has(> .party-member:nth-child(4):last-child) .party-member .character-name {
        width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .sub-member-badge {
        width: 22px;
        height: 22px;
        top: 32px;
        right: 4px;
        border-width: 1.5px;
    }

    .sub-member-badge img {
        width: 100%;
        height: 100%;
    }

    .recommended-persona-card,
    .recommended-party-card {
        margin: 15px 0;
        padding: 15px;
    }
}

.operation-content h3 {
    font-size: 1.5rem;
    color: #fff;
    /* margin-bottom: 1rem; border-bottom: 1px solid rgb(255, 255, 255, 0.1); padding-bottom: 0.5rem;*/
    padding-top: 1rem;
    padding-bottom: 0px;
}

.operation-content ul {
    list-style-type: none;
    padding-left: 1rem;
    margin-bottom: 2rem;
}

.operation-content li {
    font-size: 13px;
    position: relative;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.operation-content p {
    font-size: 13px;
    position: relative;
    line-height: 1.6;
    margin-top: 0;
}

.operation-timeline-row-icon {
    width: 18px;
    height: 18px;
    margin-right: 4px;
    vertical-align: -4px;
    object-fit: contain;
}

.operation-levels :last-child {
    margin-bottom: 0px;
}

.markdown-body h1 {
    font-size: 18px;
    margin-bottom: 0.5em;
}

.markdown-body h2 {
    font-size: 16px;
    margin-bottom: 0.5em;
}

.markdown-body h3 {
    font-size: 14px;
    margin-bottom: 0.5em;
    color: #d3bc8e;
}

.markdown-body ul {
    list-style-type: disc;
    padding-left: 1.5em;
    margin-bottom: 1em;
}

.markdown-body li {
    margin-bottom: 0.5em;
}

/* Help Modal */
.weapon-effect-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.weapon-effect-modal.show {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.weapon-effect-modal-content {
    background-color: #1a1a1a;
    border: 1px solid #e5e5e56b;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 20px;
    color: #fff;
    box-shadow: 0 8px 10px rgb(0 0 0 / 30%);
    transform: scale(0.95);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.weapon-effect-modal.show .weapon-effect-modal-content {
    transform: scale(1);
    opacity: 1;
}

@media (max-width: 768px) {
    .weapon-effect-modal-content {
        max-height: 50vh !important;
    }
}

.weapon-effect-close {
    position: absolute;
    right: 15px;
    top: 10px;
    color: #dedede;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.weapon-effect-close:hover,
.weapon-effect-close:focus {
    color: #fff;
    text-decoration: none;
}

.weapon-effect-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid transparent;
}

.weapon-effect-header h3 {
    margin: 0;
    font-size: 18px;
    color: #f0f0f0;
}

.weapon-effect-description {
    font-size: 14px;
    line-height: 1.6;
    color: #e0e0e0;
    white-space: pre-line;
}

.weapon-effect-description p {
    margin: 0 0 10px 0;
}

.weapon-effect-description p:last-child {
    margin-bottom: 0;
}






.review-content {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    letter-spacing: -0.025em;
    font-size: 14px;
    margin-top: 20px;
}

@media (max-width: 1200px) {
    .review-content {
        font-size: 13px;
    }
}


.review-content p {
    margin: 0 0 12px 0;
}

.review-content strong {
    color: #fbdc7f;
    font-weight: 500;
}

.review-content em {
    color: #ff6b6b;
    font-style: italic;
}

.review-content h1,
.review-content h2,
.review-content h3 {
    color: #fbdc7f;
    margin: 16px 0 8px 0;
    font-weight: 600;
}

.review-content ul,
.review-content ol {
    margin: 8px 0;
    padding-left: 20px;
}

.review-content li {
    margin: 4px 0;
}

.review-content blockquote {
    border-left: 3px solid #ffdb70;
    padding-left: 12px;
    margin: 12px 0;
    font-style: italic;
    color: #cccccc;
}

.review-content code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #ffdb70;
}

.review-content pre {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 12px 0;
}

.review-content pre code {
    background: none;
    padding: 0;
    color: #ffffff;
}

.review-content a {
    color: #4fc3f7;
    text-decoration: none;
}

.review-content a:hover {
    text-decoration: underline;
}

.review-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 8px 0;
}

.review-content hr {
    height: 3px;
    border: 0;
    background: var(--section-divider-paint);
    margin: 20px 0;
}

.review-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    word-break: break-all;
}

.review-content th,
.review-content td {
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 12px;
    text-align: left;
    font-size: 12px;
}

.review-content th {
    background: rgba(255, 255, 255, 0.1);
    color: #ffdb70;
    font-weight: 600;
}

.review-content tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.05);
}

.review-content .shoki-stellato-chart {
    margin: 22px 0 20px;
    word-break: normal;
    overflow-wrap: anywhere;
}

.review-content .shoki-stellato-chart h3 {
    margin: 0 0 6px;
    color: #ffdb70;
    font-size: 16px;
}

.review-content .shoki-stellato-intro,
.review-content .shoki-stellato-condition,
.review-content .shoki-stellato-note p {
    margin: 0;
    font-size: 12px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.75);
}

.review-content .shoki-stellato-chart table {
    table-layout: fixed;
    word-break: normal;
    margin: 12px 0 8px;
}

.review-content .shoki-stellato-chart th,
.review-content .shoki-stellato-chart td {
    text-align: center;
    vertical-align: middle;
    padding: 12px 8px;
    border-color: rgba(255, 255, 255, 0.14);
}

.review-content .shoki-stellato-chart thead th {
    background: rgba(255, 219, 112, 0.07);
}

.review-content .shoki-stellato-chart th:first-child {
    width: 16%;
}

.review-content .shoki-stellato-chart thead th:nth-child(2) {
    width: 40%;
}

.review-content .shoki-stellato-chart tbody th {
    background: rgba(255, 255, 255, 0.035);
    color: rgba(255, 255, 255, 0.85);
}

.review-content .shoki-stellato-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 34px;
}
.review-content .shoki-stellato-icons img,
.review-content .shoki-stellato-bonus img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    margin: 0;
}
.review-content .shoki-stellato-plus {
    color: #ffdb70;
    font-size: 18px;
}
.review-content .shoki-stellato-stage {
    display: block;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 12px;
}
.review-content .shoki-stellato-stage strong {
    color: #ffdb70;
    font-size: 18px;
    font-variant-numeric: tabular-nums;
}
.review-content .shoki-stellato-mobile {
    display: none;
}
.review-content .shoki-stellato-chart thead small {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
}
.review-content .shoki-stellato-bonus {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 6px;
    font-size: 12px;
    color: #ffdb70;
}
.review-content .shoki-stellato-bonus strong {
    margin-left: 5px;
}

.review-content .shoki-stellato-note {
    margin-top: 14px;
    padding-left: 12px;
    border-left: 2px solid rgba(255, 219, 112, 0.6);
}

.review-content .shoki-stellato-note > strong {
    display: block;
    margin-bottom: 3px;
    color: #ffdb70;
    font-size: 12px;
}

@media (max-width: 520px) {
    .review-content .shoki-stellato-chart table,
    .review-content .shoki-stellato-chart tbody {
        display: block;
    }

    .review-content .shoki-stellato-chart thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
    }

    .review-content .shoki-stellato-chart tbody tr {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        margin-bottom: 10px;
        background: none;
    }

    .review-content .shoki-stellato-chart tbody th {
        grid-column: 1 / -1;
        width: auto;
        text-align: left;
        padding: 7px 10px;
        border-bottom: 0;
    }

    .review-content .shoki-stellato-chart td {
        padding: 10px 4px;
    }

    .review-content .shoki-stellato-chart td + td {
        border-left: 0;
    }

    .review-content .shoki-stellato-chart td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 7px;
        font-size: 11px;
        line-height: 1.5;
        min-height: 33px;
        color: rgba(255, 255, 255, 0.85);
    }

    .review-content .shoki-stellato-icons,
    .review-content .shoki-stellato-stage {
        display: none;
    }

    .review-content .shoki-stellato-mobile {
        display: block;
        font-size: 11px;
        line-height: 1.7;
        color: rgba(255, 255, 255, 0.75);
    }

    .review-content .shoki-stellato-mobile strong {
        display: block;
        margin-top: 3px;
        font-size: 20px;
        color: #ffdb70;
    }

}

.review-content .miku-song-diagram {
    margin: 14px 0 18px;
    overflow-x: auto;
}

.review-content .miku-song-diagram img {
    margin: 0;
}

.review-content .miku-diagram-grid {
    display: grid;
    grid-template-columns: minmax(150px, 1.2fr) minmax(120px, 1fr) minmax(120px, 1fr) minmax(74px, 0.55fr);
    min-width: 620px;
}

.review-content .miku-diagram-cell {
    display: flex;
    align-items: center;
    min-height: 64px;
    padding: 8px 10px;
    border-right: 1px solid rgba(255, 255, 255, 0.14);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.035);
}

.review-content .miku-diagram-grid .miku-diagram-cell:first-child {
    border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.review-content .miku-diagram-head .miku-diagram-cell {
    min-height: 48px;
    background: rgba(255, 255, 255, 0.09);
    color: #ffdb70;
    font-weight: 600;
}

.review-content .miku-diagram-head .miku-diagram-cell {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.review-content .miku-skill-head {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
}

.review-content .miku-skill-head span {
    color: rgba(255, 255, 255, 0.68);
    font-size: 11px;
    line-height: 1.2;
}

.review-content .miku-skill-head strong {
    color: #fbdc7f;
    font-weight: 600;
}

.review-content .miku-song-cell {
    gap: 8px;
    font-weight: 600;
}

.review-content .miku-song-cell span {
    line-height: 1.25;
}

.review-content .miku-melody-cell {
    justify-content: center;
}

.review-content .miku-skill3-flow {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 620px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 219, 112, 0.24);
    border-top: 0;
    background: rgba(255, 219, 112, 0.055);
}

.review-content .miku-flow-melodies {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.review-content .miku-flow-arrow {
    color: #ffdb70;
    font-size: 20px;
    line-height: 1;
}

.review-content .miku-skill3-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

.review-content .miku-skill3-label {
    color: rgba(255, 255, 255, 0.62);
    font-size: 11px;
    line-height: 1.2;
}

.review-content .miku-skill3-card strong {
    color: #fbdc7f;
    font-weight: 600;
}

.review-content .miku-skill3-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.45;
}

@media (max-width: 520px) {
    .review-content .miku-song-diagram {
        overflow-x: visible;
    }

    .review-content .miku-diagram-grid {
        grid-template-columns: 1fr;
        min-width: 0;
        margin-bottom: 8px;
    }

    .review-content .miku-diagram-head {
        display: none;
    }

    .review-content .miku-diagram-cell,
    .review-content .miku-diagram-grid .miku-diagram-cell:first-child {
        border: 1px solid rgba(255, 255, 255, 0.14);
        border-bottom: 0;
    }

    .review-content .miku-diagram-row .miku-diagram-cell:last-child {
        border-bottom: 1px solid rgba(255, 255, 255, 0.14);
        margin-bottom: 8px;
    }

    .review-content .miku-diagram-row .miku-diagram-cell:nth-child(2)::before {
        content: attr(data-mobile-label);
        color: #ffdb70;
        font-weight: 600;
    }

    .review-content .miku-diagram-row .miku-diagram-cell:nth-child(3)::before {
        content: attr(data-mobile-label);
        color: #ffdb70;
        font-weight: 600;
    }

    .review-content .miku-melody-cell::before {
        content: attr(data-mobile-label);
        margin-right: 8px;
        color: rgba(255, 255, 255, 0.62);
        font-size: 11px;
    }

    .review-content .miku-melody-cell {
        justify-content: flex-start;
    }

    .review-content .miku-skill3-flow {
        min-width: 0;
        align-items: flex-start;
        gap: 8px;
        padding: 10px;
    }
}



/* Skill Priority Badge Style */
.priority-badge {
    font-size: 9px;
    margin-left: 8px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: #888;
    font-weight: normal;
    display: inline-block;
    vertical-align: middle;
    transform: translateY(-1px);
}

.priority-badge.top-priority {
    color: #d38e8e;
    background: rgba(211, 142, 142, 0.15);
    border: 1px solid rgba(211, 142, 142, 0.3);
    font-weight: 600;
}

/* ---- character.html inline styles migrated ---- */
@media screen and (max-width: 1200px) {
    .post-item {
        width: calc(100% - 40px);
        display: flex;
        flex-wrap: wrap;
        justify-content: left;
        gap: 0 !important;
    }

    .tactic-preview-container {
        margin-left: 16px !important;
    }

    .post-footer {
        display: none;
    }
}

.posts-list {
    margin-bottom: 20px;
}

.party-images-container {
    justify-content: right;
    margin-right: 16px;
    min-width: 20px;
}

/* 순위별(1~4)로 점차 어두워지도록 색상 농도 조절 */
.priority-badge.rank-1 {
    color: #ffffff;
}

.priority-badge.rank-2 {
    color: #e8e8e8;
}

.priority-badge.rank-3 {
    color: #cfcfcf;
}

.priority-badge.rank-4 {
    color: #a8a8a8;
}

/* Pros / Cons */
.pros-cons-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 24px;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

.nitro-ad-container--character-card:has([data-nitro-placement-sized]) {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nitro-ad-container--character-operation .nitro-ad-slot[data-nitro-reserve-space="true"] {
    min-height: 90px;
}

@media (max-width: 768px) {
    .nitro-ad-container--character-operation .nitro-ad-slot[data-nitro-reserve-space="true"] {
        min-height: 50px;
    }
}

.settings-card .operation-settings > .setting-section:last-child {
    padding-bottom: 0;
}

.settings-card .operation-settings {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

.ritual-card .ritual-grid > .ritual-item:last-child {
    padding-bottom: 0;
}

.recommended-party-card:has(#recommended-party-content:not(:empty))
    #recommended-party-content .party-section:last-child {
    margin-bottom: 0;
}

.recommended-party-card:has(#recommended-party-content:empty)
    .friends-lineup {
    margin-bottom: 0;
}

.character-review-mobile-ad {
    display: none;
}

@media (max-width: 768px) {
    .character-review-mobile-ad:not([hidden]) {
        display: block;
        width: 300px;
        max-width: 100%;
        margin: 8px auto 0;
    }
}

.pros-cons-section {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 20px 16px 12px 16px;
}

.pros-cons-section h3.pros-cons-title {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 16px;
    line-height: 1.2;
}

.pros-title {
    color: #3aa0ff !important;
    font-weight: 700;
}

/* 파랑: 장점 */
.cons-title {
    color: #ff6b6b !important;
    font-weight: 700;
}

/* 빨강: 단점 */
.pros-cons-list ul {
    margin: 0;
    padding-left: 18px;
}

.pros-cons-list li {
    font-size: 14px;
    color: #cdcdcd;
    margin: 4px 0;
    line-height: 1.5;
}

@media (max-width: 1200px) {
    .pros-cons-group {
        grid-template-columns: 1fr;
    }
}

/* 추천 조합 레이아웃: PC에서 2열 + 홀수 시 첫 항목 전체 너비 */
@media (min-width: 1201px) {
    #recommended-persona-content {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        row-gap: 0px;
    }

    #recommended-persona-content>.persona-attribute-section.span-full {
        grid-column: 1 / -1;
    }
}

/* 라인업(friends) 레이아웃: PC 2열, 모바일 1열 */
.friends-lineup {
    margin-bottom: 40px;
}

.friends-title {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

.friends-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.friend-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 6px;
}

.friend-image-wrapper {
    position: relative;
    height: 40px;
    display: flex;
    align-items: center;
}

.friend-image-wrapper img {
    width: 40px;
    height: 40px;
    object-fit: cover;
}

.friend-ritual-icon {
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 24px !important;
    height: 24px !important;
    object-fit: contain !important;
    pointer-events: none;
}

.friend-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.friend-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.friend-name {
    font-size: 14px;
    font-weight: 600;
    margin-right: 4px;
}

.friend-element-icon,
.friend-role-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    opacity: 1;
}

.friend-comment {
    font-size: 13px;
    color: #cdcdcd;
    line-height: 1.6;
    white-space: pre-line;
    cursor: text;
    /* 클릭 불가 느낌을 주고, 텍스트 드래그는 가능하게 */
}

.party-label {
    margin: 0 0 0px;
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

.recommended-party-note {
    margin: -4px 0 14px;
    color: rgba(255, 255, 255, 0.48);
    font-size: 12px;
    line-height: 1.55;
    font-weight: 400;
}

@media (min-width: 1201px) {
    .friends-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* friends가 있는 경우 파티 카드 레이아웃: 모바일 1열, PC 2열 */
#recommended-party-content.party-grid-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

#recommended-party-content.party-grid-layout .party-label {
    grid-column: 1 / -1;
}

#recommended-party-content.party-grid-layout .party-section {
    width: calc(100% - 20px);
    margin-bottom: 0;
}

/* 파티 리스트 폭을 카드 폭에 맞추기 (기존 min-width: 440px 무시) - 2열 모드에서만 */
#recommended-party-content.party-grid-layout .party-list {
    min-width: 0;
    width: 100%;
}

/* 코멘트가 없는 파티: 간격은 동일, 카드 가로 폭만 늘리기 (2열 모드에서만) */
#recommended-party-content.party-grid-layout .party-list.no-comment {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    /* 기존과 동일한 간격 유지 */
    justify-content: center;
}

#recommended-party-content.party-grid-layout .party-list.no-comment .party-member {
    width: auto;
    /* 기본 80px 폭 사용 */
    flex: 1 1 0;
    /* 행 안에서 가로 공간을 균등하게 나눠 차지 */
    max-width: 200px;
    /* 너무 넓어지지 않도록 상한선 */
}

@media (min-width: 1201px) {
    #recommended-party-content.party-desktop-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    #recommended-party-content.party-desktop-grid .party-section {
        width: calc(100% - 20px);
        margin-bottom: 0;
    }

    #recommended-party-content.party-desktop-grid .party-list {
        min-width: 0;
        width: 100%;
    }

    #recommended-party-content.party-desktop-grid .party-list.no-comment {
        display: flex;
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
    }

    #recommended-party-content.party-desktop-grid .party-list.no-comment .party-member {
        width: auto;
        flex: 1 1 0;
        max-width: 200px;
    }
}


.p5-layer-box {
    /* --- 1. 맨 위: 메인 텍스트 (검은색) --- */
    position: relative;
    z-index: 1;
    /* 제일 위로 */

    /* 폰트 설정 (두꺼울수록 효과가 좋음) */
    font-weight: 900;
    letter-spacing: -0.025rem;
    color: #ffffff;
    /* 글자색 검정 */

    /* transform: skew(-10deg) rotate(-5deg);  */

}

/* --- 2. 중간: 굵은 흰색 테두리 --- */
.p5-layer-box::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    /* 글자 바로 뒤 */

    /* 텍스트 속은 투명하게, 테두리는 흰색으로 */
    color: transparent;
    -webkit-text-stroke: 10px black;
}

/* --- 3. 맨 아래: 빨간색 배경/그림자 --- */
.p5-layer-box::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    z-index: -2;
    /* 맨 뒤 */

    color: transparent;
    -webkit-text-stroke: 12px white;

    /* 위치를 살짝 옮겨서 보라색 그림자처럼 보이게 */
    transform: translate(6px, 5px);
}

/* =============================================
   Skeleton loading for non-KR languages
   Hides hardcoded Korean text until i18n loads
   ============================================= */

@keyframes skel-sweep {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes skel-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: .6; }
}

/* Skeleton bone: shimmer text */
html.skel .navigation-path a,
html.skel .navigation-path .current-page,
html.skel .character-name,
html.skel .sub-info .code-name,
html.skel .sub-info .persona-name,
html.skel .review-card h2,
html.skel .settings-card h2,
html.skel .skills-card h2,
html.skel .ritual-card h2,
html.skel .stats-card h2,
html.skel .weapons-card h2,
html.skel .innate-card h2,
html.skel .recommended-persona-card h2,
html.skel .recommended-party-card h2,
html.skel .settings-card h3,
html.skel .stats-card h3 {
    color: transparent !important;
    -webkit-text-stroke: 0 !important;
    text-shadow: none !important;
    background: linear-gradient(
        100deg,
        rgba(255,255,255,0.04) 0%,
        rgba(255,255,255,0.04) 40%,
        rgba(255,255,255,0.10) 50%,
        rgba(255,255,255,0.04) 60%,
        rgba(255,255,255,0.04) 100%
    );
    background-size: 200% 100%;
    animation: skel-sweep 1.8s ease-in-out infinite, skel-pulse 2.4s ease-in-out infinite;
    border-radius: 6px;
    pointer-events: none;
}

/* Hide elements that flash Korean and don't need skeleton shimmer */
html.skel .chracter-tag,
html.skel .chracter-role {
    visibility: hidden;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* Hide P5-layer pseudo-elements on character-name */
html.skel .character-name::before,
html.skel .character-name::after {
    display: none !important;
}

/* Character page footer: All-Out Attack artwork */
.character-allout[hidden] {
    display: none !important;
}

.character-allout__nav[hidden],
.character-allout__dots[hidden] {
    display: none !important;
}

.character-allout:not(.is-ready) {
    display: block;
    height: 1px;
    margin: 0;
    overflow: hidden;
    opacity: 0;
}

.character-allout.is-ready {
    margin: 40px 0 72px;
}

.character-allout__stage {
    position: relative;
    width: 100%;
}

.character-allout__viewport {
    width: 100%;
    overflow: hidden;
}

.character-allout__track {
    display: flex;
    width: 100%;
    transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.character-allout__slide {
    box-sizing: border-box;
    flex: 0 0 100%;
    min-width: 0;
    overflow: hidden;
}

.character-allout__image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.character-allout.is-ready .character-allout__image {
    animation: character-allout-reveal 420ms ease-out both;
}

.character-allout__nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.68);
    color: #fff;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.character-allout__nav:hover,
.character-allout__nav:focus-visible {
    border-color: #fff;
    background: rgba(0, 0, 0, 0.9);
    outline: none;
    transform: translateY(-50%) scale(1.06);
}

.character-allout__nav span {
    display: block;
    font-size: 34px;
    line-height: 1;
    transform: translateY(-1px);
}

.character-allout__nav--prev {
    left: clamp(8px, 2vw, 24px);
}

.character-allout__nav--next {
    right: clamp(8px, 2vw, 24px);
}

.character-allout__dots {
    display: flex;
    justify-content: center;
    gap: 9px;
    margin-top: 14px;
}

.character-allout__dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
    transition: background-color 160ms ease, transform 160ms ease;
}

.character-allout__dot:hover,
.character-allout__dot:focus-visible {
    background: rgba(255, 255, 255, 0.78);
    outline: 2px solid rgba(255, 255, 255, 0.68);
    outline-offset: 3px;
}

.character-allout__dot.is-active {
    background: #ff2f38;
    transform: scale(1.22);
}

@keyframes character-allout-reveal {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 640px) {
    .character-allout.is-ready {
        margin: 32px 0 56px;
    }

    .character-allout__nav {
        width: 38px;
        height: 38px;
    }

    .character-allout__nav span {
        font-size: 30px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .character-allout__track,
    .character-allout__nav,
    .character-allout__dot {
        transition: none;
    }

    .character-allout.is-ready .character-allout__image {
        animation: none;
    }
}

/* ---- Layout stability ---- */

/* Review area */
html.skel .review-card {
    min-height: 200px;
}

html.skel .review-card .review-content {
    min-height: 100px;
    border-radius: 8px;
    background: linear-gradient(
        100deg,
        rgba(255,255,255,0.03) 0%,
        rgba(255,255,255,0.03) 40%,
        rgba(255,255,255,0.07) 50%,
        rgba(255,255,255,0.03) 60%,
        rgba(255,255,255,0.03) 100%
    );
    background-size: 200% 100%;
    animation: skel-sweep 1.8s ease-in-out infinite, skel-pulse 2.4s ease-in-out infinite;
}

/* Mobile */
@media (max-width: 1200px) {
    html.skel .review-card {
        min-height: 150px;
    }

    html.skel .review-card .review-content {
        min-height: 60px;
    }
}
.character-header .thief-anim-wrapper {
    opacity: 1;
}

.character-header .thief-image:not([data-loaded="true"]),
.character-header .persona-image:not([data-loaded="true"]) {
    visibility: hidden;
}

.character-header .thief-anim-wrapper[data-loaded="true"] {
    animation: character-portrait-arrival 850ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.character-header .thief-image {
    transition-duration: 850ms;
    will-change: auto;
}

.character-header .name-row2 {
    min-height: 36px;
}

html.character-header-loading .character-header {
    position: relative;
}

html.character-header-loading .character-header::after {
    content: '';
    position: absolute;
    top: 110px;
    left: min(25%, 140px);
    width: 28px;
    height: 28px;
    border: 3px solid rgba(255, 255, 255, 0.16);
    border-top-color: #e12b32;
    border-radius: 50%;
    pointer-events: none;
    animation: character-header-loading-spin 700ms linear infinite;
}

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

html.character-header-loading .character-header .navigation-path,
html.character-header-loading .character-header .name-section,
html.character-header-loading .character-header .basic-info,
html.character-header-loading .character-header .character-video {
    visibility: hidden;
}

@media (prefers-reduced-motion: no-preference) {
    .character-header.has-name-entrance { --character-header-name-lead: 150ms; }
    .character-header .navigation-path { --character-header-name-lead: 0ms; }

    .character-header.is-ready :is(
        .navigation-path, .name-row > .icon-group, .name-row2, .sub-info > p,
        .basic-info > .info-row, .chracter-tag:not(:empty), .character-video
    ),
    .character-header.is-ready:not(.has-name-entrance) .name-row .character-name-text {
        animation: character-header-part-arrival 240ms cubic-bezier(0.16, 1, 0.3, 1)
            calc(var(--character-header-part-delay, 0ms) + var(--character-header-name-lead, 0ms)) backwards;
    }

    .character-header .name-row { --character-header-part-delay: 30ms; }
    .character-header .name-row2 { --character-header-part-delay: 60ms; }
    .character-header .code-name { --character-header-part-delay: 90ms; }
    .character-header :is(.sees, .persona-name) { --character-header-part-delay: 120ms; }
    .character-header .basic-info > .info-row { --character-header-part-delay: 150ms; }
    .character-header :is(.chracter-tag, .character-video) { --character-header-part-delay: 180ms; }
}

@keyframes character-portrait-arrival {
    from { opacity: 0; transform: translateX(36px) scale(1.025); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes character-header-part-arrival {
    from { opacity: 0; translate: 0 8px; }
    to { opacity: 1; translate: 0 0; }
}

@media (max-width: 768px) {
    .character-header .thief-anim-wrapper[data-loaded="true"] {
        animation-name: character-mobile-portrait-arrival;
    }
}

@keyframes character-mobile-portrait-arrival {
    from { opacity: 0; transform: translateY(24px) scale(1.025); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (hover: hover) and (pointer: fine) {
    .settings-card :is(.option-row, .stat-level, .skill-level, .stat-row, .skill-row, .operation-level, .operation-row) > :is(.label, .value, .priority, .skill-item),
    .stats-card :is(.stat-row, .awake-row) > :is(.label, .value) {
        transition: color 180ms ease;
    }

    .settings-card .revelation-value-item {
        transition: color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
    }

    .settings-card :is(.option-row, .stat-level, .skill-level, .stat-row, .skill-row, .operation-level, .operation-row) > :is(.label, .value, .priority, .skill-item):hover,
    .stats-card :is(.stat-row, .awake-row) > :is(.label, .value):hover {
        color: #b9d7f4;
        transition-duration: 60ms;
    }

    .settings-card .revelation-value-item:not([aria-expanded="true"]):is(:hover, :focus-visible) {
        color: #fff;
        background-color: rgba(255, 255, 255, 0.075);
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
        transition-duration: 60ms;
    }

    .settings-card :is(.stat-row, .skill-row) > .value:hover,
    .settings-card :is(.stat-row, .skill-row) > .value span:hover {
        color: #fff !important;
    }

    .pros-cons-section,
    .skills-grid .skill-card {
        transition: background-color 180ms ease, box-shadow 180ms ease;
    }

    .pros-cons-section:hover,
    .skills-grid .skill-card:hover {
        background-color: rgba(255, 255, 255, 0.075);
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
        transition-duration: 60ms;
    }

    .skills-grid .skill-name,
    .ritual-item .ritual-title,
    .ritual-item .ritual-image,
    .ritual-item .ritual-description {
        transition: color 180ms ease, opacity 180ms ease, transform 180ms ease;
    }

    .skills-grid .skill-card:hover .skill-name {
        color: #fff;
    }

    .ritual-item .ritual-title:hover {
        color: #b9d7f4;
    }

    .ritual-item .ritual-image:hover {
        opacity: 1;
    }

    .ritual-item .ritual-description:hover {
        color: rgba(255, 255, 255, 0.92);
    }

    .weapon-item[data-rarity="5"] .weapon-image,
    .weapon-item[data-rarity="4"] .weapon-image {
        transition: filter 260ms ease-out;
    }

    .weapon-item[data-rarity="5"]:hover .weapon-image {
        filter: drop-shadow(0 0 3px rgba(196, 255, 255, 0.9)) drop-shadow(0 0 6px rgba(94, 135, 255, 0.48));
        animation: weapon-glow-five 2.8s ease-in-out 260ms infinite alternate;
    }

    .weapon-item[data-rarity="4"]:hover .weapon-image {
        filter: drop-shadow(0 0 3px rgba(255, 226, 153, 0.9)) drop-shadow(0 0 6px rgba(225, 163, 48, 0.45));
        animation: weapon-glow-four 2.8s ease-in-out 260ms infinite alternate;
    }

    .skills-grid .skill-card:hover .skill-name,
    .ritual-item .ritual-title:hover,
    .ritual-item .ritual-image:hover,
    .ritual-item .ritual-description:hover {
        transition-duration: 60ms;
    }
}

@keyframes weapon-glow-five {
    0%, 100% { filter: drop-shadow(0 0 3px rgba(196, 255, 255, 0.9)) drop-shadow(0 0 6px rgba(94, 135, 255, 0.48)); }
    35% { filter: drop-shadow(1px -1px 4px rgba(218, 204, 255, 0.95)) drop-shadow(-1px 1px 7px rgba(209, 153, 222, 0.5)); }
    70% { filter: drop-shadow(1px 1px 3px rgba(202, 255, 255, 0.9)) drop-shadow(-1px -1px 6px rgba(98, 150, 255, 0.52)); }
}

@keyframes weapon-glow-four {
    0%, 100% { filter: drop-shadow(0 0 3px rgba(255, 226, 153, 0.9)) drop-shadow(0 0 6px rgba(225, 163, 48, 0.45)); }
    50% { filter: drop-shadow(1px -1px 4px rgba(255, 239, 191, 0.95)) drop-shadow(-1px 1px 7px rgba(255, 185, 66, 0.5)); }
}

@media (prefers-reduced-motion: reduce) {
    .settings-card :is(.option-row, .stat-level, .skill-level, .stat-row, .skill-row, .operation-level, .operation-row) > :is(.label, .value, .priority, .skill-item),
    .settings-card .revelation-value-item,
    .stats-card :is(.stat-row, .awake-row) > :is(.label, .value) {
        transition: none;
    }

    .character-header .thief-anim-wrapper[data-loaded="true"],
    .character-header h1.character-name::before,
    html.character-header-loading .character-header::after,
    .ritual-item:last-child .ritual-title,
    .weapon-item[data-rarity="5"]:hover .weapon-image,
    .weapon-item[data-rarity="4"]:hover .weapon-image {
        animation: none;
    }

    .character-header .thief-image,
    .pros-cons-section,
    .skills-grid .skill-card,
    .skills-grid .skill-name,
    .ritual-item .ritual-title,
    .ritual-item .ritual-image,
    .ritual-item .ritual-description,
    .weapon-item .weapon-image {
        transition: none;
    }
}


/* Keep the card corners separate from badges, controls, overlays and ads. */
.section-card-cut :is(.pros-cons-section, .stat-item, .skills-grid > .skill-card, .nature-skill-slot, .weapon-item, .persona-item, .party-section, .friend-item, .character-calc-section) {
    border-radius: 0;
}

.section-card-cut :is(
    .pros-cons-group > .pros-cons-section:last-child,
    .stat-grid > .stat-item:last-child,
    .skills-grid > .skill-card:last-child,
    .nature-skill-slot-stack:last-child > .nature-skill-slot,
    .weapons-container > .weapon-item:last-child,
    #recommended-party-content > :nth-last-child(1 of .party-section),
    .recommended-party-card:not(:has(#recommended-party-content > .party-section)) .friends-list > .friend-item:last-child,
    .character-calc-content > .character-calc-section:last-child
) {
    clip-path: var(--section-card-tail-shape);
}
