/* ==========================================================================
   루리와 한 달의 여름방학
   전연령 성장 시뮬레이션용 공통 UI
   ========================================================================== */

:root {
    --ink: #213447;
    --ink-soft: #5f7386;
    --panel: rgba(247, 251, 255, 0.93);
    --panel-dark: rgba(17, 31, 45, 0.92);
    --line: rgba(111, 164, 195, 0.42);
    --blue: #58b7df;
    --blue-deep: #2b82b6;
    --pink: #ef8fab;
    --gold: #e7b55a;
    --danger: #d96872;
    --shadow: 0 18px 44px rgba(15, 34, 52, 0.28);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    height: 100%;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--ink);
    background: #070b10;
    font-family:
        "Malgun Gothic",
        "Yu Gothic UI",
        "Meiryo",
        system-ui,
        sans-serif;
}

button,
input,
select {
    font: inherit;
}

button {
    border: 0;
}

#game-container {
    position: relative;
    width: 1920px;
    height: 1080px;
    overflow: hidden;
    background: #101923;
    transform-origin: center center;
    transition: transform 0.1s ease-out;
}

/* ==========================================================================
   타이틀
   ========================================================================== */

#title-screen {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 200;
    overflow: hidden;
    background: #edf7fc;
}

.title-background-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.title-background-layer img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.title-background-layer::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            90deg,
            rgba(248, 253, 255, 0.58) 0%,
            rgba(248, 253, 255, 0.25) 35%,
            rgba(248, 253, 255, 0.02) 65%
        );
}

.title-particle-layer {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.title-particle-layer::before,
.title-particle-layer::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.42;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.96) 0 2px, transparent 3px),
        radial-gradient(circle, rgba(181, 232, 252, 0.82) 0 1px, transparent 2px);
    background-position: 11% 18%, 73% 28%;
    background-size: 150px 150px, 105px 105px;
    animation: title-twinkle 4.5s ease-in-out infinite alternate;
}

.title-particle-layer::after {
    opacity: 0.24;
    transform: scale(1.25);
    animation-delay: -2s;
}

@keyframes title-twinkle {
    from {
        opacity: 0.18;
        transform: translateY(0);
    }

    to {
        opacity: 0.52;
        transform: translateY(-8px);
    }
}

.title-ui-panel {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    width: 690px;
    height: 100%;
    padding: 112px 95px 58px;
    background:
        linear-gradient(
            90deg,
            rgba(244, 251, 254, 0.94),
            rgba(244, 251, 254, 0.74) 72%,
            transparent
        );
}

.title-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 520px;
    min-height: 230px;
    margin-bottom: 34px;
}

#title-logo-image {
    display: block;
    max-width: 100%;
    max-height: 230px;
    object-fit: contain;
    filter: drop-shadow(0 8px 16px rgba(64, 99, 118, 0.2));
}

#title-menu {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 430px;
    margin: 0 auto;
}

.title-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 67px;
    padding: 0 58px 0 32px;
    overflow: hidden;
    color: #314252;
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.97),
            rgba(234, 248, 253, 0.94)
        );
    border: 3px solid rgba(87, 184, 222, 0.72);
    border-radius: 999px;
    box-shadow:
        0 9px 20px rgba(56, 117, 145, 0.14),
        inset 0 1px 0 #fff;
    cursor: pointer;
    transition:
        transform 0.16s ease,
        border-color 0.16s ease,
        box-shadow 0.16s ease;
}

.title-btn:hover {
    transform: translateX(8px);
    border-color: var(--pink);
    box-shadow:
        0 12px 28px rgba(86, 129, 151, 0.22),
        0 0 0 5px rgba(238, 142, 171, 0.1);
}

.title-btn-label {
    font-size: 23px;
    font-weight: 900;
    letter-spacing: 0.045em;
}

.title-btn-arrow {
    position: absolute;
    right: 25px;
    color: var(--blue-deep);
    font-size: 34px;
    line-height: 1;
}

.title-btn-primary,
.title-btn-plus {
    background:
        linear-gradient(
            180deg,
            rgba(214, 247, 255, 0.98),
            rgba(178, 232, 248, 0.96)
        );
}

.title-btn-plus {
    border-color: rgba(176, 141, 231, 0.76);
}

.title-btn-exit {
    margin-top: 6px;
}

.title-footer {
    margin-top: auto;
    color: rgba(51, 77, 94, 0.62);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-align: center;
}

/* ==========================================================================
   배경·캐릭터·전환
   ========================================================================== */

#background-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-position: center;
    background-size: cover;
    opacity: 1;
    transition: opacity 0.18s ease-in-out;
}

#background-layer.is-changing {
    opacity: 0;
}

#character-layer {
    position: absolute;
    bottom: 0;
    left: 50%;
    z-index: 2;
    transform: translateX(-50%);
    pointer-events: none;
}

#character-sprite {
    display: block;
    max-width: 1180px;
    height: 1110px;
    object-fit: contain;
    object-position: center bottom;
    transform: translateY(330px);
    opacity: 1;
    filter: drop-shadow(0 16px 24px rgba(19, 30, 41, 0.22));
    cursor: pointer;
    pointer-events: auto;
    transition: opacity 0.12s ease-in-out;
}

#character-sprite.is-changing {
    opacity: 0;
}

#hud-daily-request {
    position: absolute;
    top: 80px;
    left: 56%;
    width: 410px;
    padding: 26px 34px;
    color: #674326;
    background: rgba(255, 250, 237, 0.96);
    border: 4px solid #e4b776;
    border-radius: 52% 48% 48% 52% / 45% 48% 52% 55%;
    box-shadow:
        0 12px 28px rgba(56, 38, 24, 0.2),
        inset 0 0 0 5px rgba(255, 255, 255, 0.74);
    font-size: 19px;
    font-weight: 800;
    line-height: 1.45;
    text-align: center;
    transform: translateX(-50%);
    pointer-events: none;
}

/* ==========================================================================
   HUD
   ========================================================================== */

#hud-layer {
    position: absolute;
    top: 28px;
    left: 32px;
    z-index: 10;
    width: 560px;
    color: #edf7fd;
    font-weight: 700;
    pointer-events: none;
}

.hud-primary-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1.45fr;
    gap: 9px;
    margin-bottom: 9px;
}

.hud-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 48px;
    padding: 0 14px;
    color: #f2f8fc;
    background:
        linear-gradient(
            145deg,
            rgba(31, 51, 70, 0.94),
            rgba(14, 27, 41, 0.94)
        );
    border: 1px solid rgba(129, 196, 225, 0.42);
    border-radius: 13px;
    box-shadow:
        0 9px 20px rgba(0, 0, 0, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    font-size: 17px;
    font-weight: 800;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}

#hud-day {
    color: #c9effc;
    cursor: default;
    pointer-events: auto;
}

#hud-time {
    color: #ffe2a4;
}

#hud-money {
    color: #b4f2d9;
}

.hud-secondary-row {
    margin-bottom: 9px;
}

#hud-stamina {
    padding: 12px 15px 13px;
    color: #eaf7fd;
    background:
        linear-gradient(
            145deg,
            rgba(27, 48, 65, 0.94),
            rgba(13, 28, 40, 0.94)
        );
    border: 1px solid rgba(112, 190, 224, 0.42);
    border-radius: 13px;
    box-shadow:
        0 9px 20px rgba(0, 0, 0, 0.23),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.hud-stamina-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 15px;
}

#hud-stamina-track,
.clean-stat-track {
    width: 100%;
    height: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
}

#hud-stamina-fill,
.clean-stat-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    transition: width 0.25s ease;
}

#hud-stamina-fill {
    background: linear-gradient(90deg, #80dcae, #57b8d8);
}

.stats-flex-container,
.dev-stats-flex-container {
    display: grid;
    gap: 7px;
}

.stats-flex-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 8px;
}

.dev-stats-flex-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
}

.dev-stats-flex-container.is-collapsed {
    display: none;
}

.clean-stat-card {
    min-width: 0;
    padding: 10px 12px;
    color: #dceaf3;
    background: var(--panel-dark);
    border: 1px solid rgba(162, 204, 225, 0.27);
    border-left: 4px solid var(--blue);
    border-radius: 11px;
    box-shadow:
        0 7px 15px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.clean-stat-love {
    border-left-color: var(--pink);
}

.clean-stat-anger {
    border-left-color: var(--danger);
}

.clean-stat-skill_cooking {
    border-left-color: #e7ad59;
}

.clean-stat-skill_study {
    border-left-color: #76b9e8;
}

.clean-stat-skill_sports {
    border-left-color: #77d1a1;
}

.clean-stat-skill_craft {
    border-left-color: #c6a2e8;
}

.clean-stat-skill_confidence {
    border-left-color: #f18eae;
}

.clean-stat-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 13px;
    white-space: nowrap;
}

.clean-stat-card-head strong {
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.clean-stat-fill {
    background: linear-gradient(90deg, #68bce0, #9adcf0);
}

.clean-stat-love .clean-stat-fill {
    background: linear-gradient(90deg, #e77d9f, #f3aac1);
}

.clean-stat-anger .clean-stat-fill {
    background: linear-gradient(90deg, #cf5966, #e98b91);
}

#hud-growth-toggle {
    width: 100%;
    min-height: 34px;
    margin-bottom: 7px;
    color: #edf6fb;
    background: rgba(21, 39, 55, 0.93);
    border: 1px solid rgba(144, 195, 219, 0.33);
    border-radius: 9px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    pointer-events: auto;
}

#hud-growth-toggle:hover {
    background: rgba(38, 67, 88, 0.96);
}

/* ==========================================================================
   우측 메뉴
   ========================================================================== */

#system-menu {
    position: absolute;
    top: 28px;
    right: 32px;
    z-index: 12;
    display: flex;
    gap: 3px;
    padding: 7px;
    background: rgba(14, 26, 39, 0.92);
    border: 1px solid rgba(131, 185, 210, 0.34);
    border-radius: 13px;
    box-shadow: var(--shadow);
}

#system-menu button {
    min-height: 37px;
    padding: 0 15px;
    color: #e7f1f7;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    transition:
        color 0.16s ease,
        background 0.16s ease;
}

#system-menu button:hover {
    color: #fff;
    background: rgba(91, 176, 216, 0.18);
}

#debug-menu-btn[hidden] {
    display: none !important;
}

/* ==========================================================================
   대사창·선택지
   ========================================================================== */

#message-window {
    position: absolute;
    right: 80px;
    bottom: 44px;
    left: 80px;
    z-index: 30;
    min-height: 220px;
    padding: 60px 70px 38px;
    color: #edf6fc;
    background:
        linear-gradient(
            145deg,
            rgba(20, 35, 51, 0.96),
            rgba(8, 17, 28, 0.96)
        );
    border: 2px solid rgba(98, 185, 227, 0.64);
    border-radius: 24px;
    box-shadow:
        0 23px 54px rgba(0, 0, 0, 0.44),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

#speaker-name {
    position: absolute;
    top: 18px;
    left: 68px;
    color: #c6a6ff;
    font-size: 24px;
    font-weight: 900;
}

#message-window[data-speaker="hero"] {
    border-color: rgba(84, 174, 255, 0.82);
}

#message-window[data-speaker="hero"] #speaker-name {
    color: #72c5ff;
}

#message-window[data-speaker="luri"] {
    border-color: rgba(255, 126, 181, 0.84);
}

#message-window[data-speaker="luri"] #speaker-name {
    color: #ff91c1;
}

#message-window[data-speaker="other"] {
    border-color: rgba(177, 126, 255, 0.82);
}

#message-window[data-speaker="other"] #speaker-name {
    color: #c6a6ff;
}

#message-text {
    font-size: 25px;
    font-weight: 600;
    line-height: 1.78;
    white-space: pre-wrap;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

#text-next-pointer {
    position: absolute;
    right: 35px;
    bottom: 23px;
    color: #8fd8f4;
    font-size: 21px;
    animation: pointer-bob 0.9s ease-in-out infinite alternate;
}

@keyframes pointer-bob {
    to {
        transform: translateY(6px);
    }
}

#dialogue-window-controls {
    position: absolute;
    top: 17px;
    right: 24px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
}

#dialogue-window-controls button {
    min-width: 76px;
    padding: 8px 13px;
    color: #cfe8f4;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(181, 216, 232, 0.22);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    transition:
        color 0.16s ease,
        background 0.16s ease,
        border-color 0.16s ease,
        box-shadow 0.16s ease;
}

#dialogue-window-controls button:hover {
    color: #fff;
    background: rgba(105, 191, 230, 0.16);
    border-color: rgba(143, 216, 244, 0.55);
}

#dialogue-skip-btn.is-active {
    color: #fff;
    background:
        linear-gradient(
            145deg,
            rgba(222, 65, 133, 0.88),
            rgba(153, 46, 112, 0.88)
        );
    border-color: rgba(255, 151, 196, 0.92);
    box-shadow:
        0 0 0 2px rgba(255, 126, 181, 0.14),
        0 7px 18px rgba(0, 0, 0, 0.24);
}

#choice-container {
    position: absolute;
    top: 235px;
    right: 70px;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 610px;
    pointer-events: none;
}

#choice-container.choice-input-guarded,
#choice-container.choice-input-committed {
    pointer-events: auto;
}

#choice-container.choice-input-guarded .scenario-choice-btn,
#choice-container.choice-input-committed .scenario-choice-btn {
    pointer-events: auto !important;
}

#choice-container.choice-input-guarded .scenario-choice-btn {
    cursor: wait;
}

.growth-menu-title {
    grid-column: 1 / -1;
    padding: 12px 18px;
    color: #f7fbff;
    background: rgba(8, 23, 36, 0.92);
    border: 1px solid rgba(105, 191, 230, 0.42);
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.24);
    font-size: 18px;
    font-weight: 900;
    pointer-events: auto;
}

.scenario-choice-btn {
    min-height: 67px;
    padding: 12px 18px;
    color: #e9f5fb;
    background:
        linear-gradient(
            145deg,
            rgba(30, 54, 75, 0.96),
            rgba(15, 31, 47, 0.96)
        );
    border: 1px solid rgba(105, 191, 230, 0.56);
    border-radius: 15px;
    box-shadow:
        0 12px 24px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
    cursor: pointer;
    font-size: 18px;
    font-weight: 900;
    pointer-events: auto;
    transition:
        transform 0.15s ease,
        border-color 0.15s ease,
        background 0.15s ease;
}

.growth-action-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 5px;
    text-align: left;
}

.growth-action-btn small {
    color: #9fc4d6;
    font-size: 12px;
    font-weight: 700;
}

.scenario-choice-btn:disabled {
    color: #778b96;
    background: rgba(18, 29, 39, 0.9);
    border-color: rgba(125, 147, 158, 0.28);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.scenario-choice-btn:disabled small {
    color: #c98282;
}

.growth-menu-control {
    min-height: 54px;
}

.category-control {
    min-height: 70px;
    font-size: 19px;
}

.training-category-control {
    border-color: rgba(105, 196, 235, 0.78);
}

.relation-category-control {
    border-color: rgba(244, 145, 183, 0.78);
}

.work-category-control {
    border-color: rgba(255, 197, 102, 0.78);
}

.shopping-category-control {
    border-color: rgba(190, 151, 255, 0.78);
}

.back-control {
    grid-column: 1 / -1;
    min-height: 46px;
    color: #c8dce6;
    border-color: rgba(170, 194, 207, 0.46);
}

.city-control {
    border-color: rgba(239, 179, 89, 0.72);
}

.phase-control {
    border-color: rgba(143, 216, 244, 0.72);
}

.scenario-choice-btn:hover {
    transform: translateY(-3px);
    background:
        linear-gradient(
            145deg,
            rgba(49, 87, 114, 0.98),
            rgba(22, 47, 68, 0.98)
        );
    border-color: rgba(238, 143, 174, 0.8);
}

.scenario-choice-btn:disabled:hover {
    transform: none;
    background: rgba(18, 29, 39, 0.9);
    border-color: rgba(125, 147, 158, 0.28);
}

/* ==========================================================================
   모달
   ========================================================================== */

#modal-layer {
    position: absolute;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 38px;
    background: rgba(3, 9, 15, 0.72);
    backdrop-filter: blur(8px);
}

#modal-content {
    position: relative;
    width: min(1180px, calc(100% - 80px));
    max-height: 930px;
    padding: 42px 46px 46px;
    overflow: hidden;
    color: #eaf5fb;
    background:
        linear-gradient(
            145deg,
            rgba(25, 40, 57, 0.99),
            rgba(9, 20, 31, 0.99)
        );
    border: 1px solid rgba(104, 188, 226, 0.58);
    border-radius: 22px;
    box-shadow:
        0 28px 70px rgba(0, 0, 0, 0.54),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

#modal-title {
    margin: 0 46px 25px 0;
    padding-bottom: 17px;
    color: #f5fbff;
    border-bottom: 1px solid rgba(143, 194, 220, 0.25);
    font-size: 31px;
    font-weight: 900;
}

#modal-body {
    display: block;
    max-height: 745px;
    padding-right: 12px;
    overflow-x: hidden;
    overflow-y: auto;
    font-size: 17px;
    line-height: 1.65;
}

#modal-body::-webkit-scrollbar {
    width: 10px;
}

#modal-body::-webkit-scrollbar-thumb {
    background: rgba(106, 183, 219, 0.5);
    border-radius: 999px;
}

.modal-x-btn {
    position: absolute;
    top: 27px;
    right: 29px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: #d9ebf4;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(183, 216, 231, 0.24);
    border-radius: 12px;
    cursor: pointer;
    font-size: 27px;
    line-height: 1;
}

.modal-x-btn:hover {
    color: #fff;
    background: rgba(224, 101, 120, 0.24);
}

.clean-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.clean-modal-actions button,
.clean-system-menu-grid button,
.clean-save-slot {
    min-height: 48px;
    padding: 10px 18px;
    color: #eaf6fb;
    background: rgba(61, 116, 151, 0.26);
    border: 1px solid rgba(117, 194, 229, 0.38);
    border-radius: 10px;
    cursor: pointer;
    font-weight: 800;
}

.clean-modal-actions button:hover,
.clean-system-menu-grid button:hover,
.clean-save-slot:hover {
    background: rgba(74, 150, 194, 0.38);
    border-color: rgba(148, 218, 247, 0.68);
}

.clean-form-stack,
.clean-settings-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.clean-form-stack label,
.clean-settings-stack label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-weight: 800;
}

.clean-form-stack input,
.clean-settings-stack input,
.clean-settings-stack select,
.clean-debug-field input {
    width: 100%;
    min-height: 48px;
    padding: 9px 13px;
    color: #f4faff;
    background: rgba(4, 13, 22, 0.5);
    border: 1px solid rgba(130, 192, 221, 0.36);
    border-radius: 9px;
    outline: none;
}

.clean-form-hint {
    color: #a9c1d0;
    font-size: 14px;
}

.clean-form-error {
    min-height: 24px;
    color: #ff9baa;
    font-weight: 800;
}

.clean-status-section + .clean-status-section {
    margin-top: 24px;
}

.clean-status-section h3,
.clean-help-grid h3 {
    margin-bottom: 11px;
    color: #9cddf6;
    font-size: 20px;
}

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

.clean-log-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.clean-log-row {
    padding: 14px 17px;
    background: rgba(255, 255, 255, 0.045);
    border-left: 3px solid var(--blue);
    border-radius: 8px;
}

.clean-log-row strong {
    display: block;
    margin-bottom: 5px;
    color: #9fdcf4;
}

.clean-log-row p {
    white-space: pre-wrap;
}

.clean-system-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.clean-help-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
}

.clean-help-grid section {
    padding: 18px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(153, 201, 222, 0.17);
    border-radius: 11px;
}

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

.clean-save-slot {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    text-align: left;
}

.clean-save-slot span {
    color: #afc6d4;
    font-size: 14px;
}

.clean-save-slot:disabled {
    cursor: default;
    opacity: 0.48;
}

.clean-settings-stack input[type="range"] {
    min-height: 28px;
    padding: 0;
}

.clean-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.clean-gallery-card {
    min-height: 150px;
    overflow: hidden;
    color: #a8bdc9;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(148, 199, 222, 0.2);
    border-radius: 10px;
}

.clean-gallery-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.clean-gallery-viewer img {
    display: block;
    max-width: 100%;
    max-height: 690px;
    margin: auto;
    object-fit: contain;
}

.clean-debug-dashboard {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.clean-debug-section {
    padding: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(157, 204, 227, 0.16);
    border-radius: 14px;
}

.clean-debug-section h3 {
    margin: 0 0 14px;
    color: #a9e1f8;
    font-size: 20px;
}

.clean-debug-summary-row,
.clean-debug-stat-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.clean-debug-summary-row span,
.clean-debug-stat-label span {
    color: #b8cdd8;
    font-size: 14px;
    font-weight: 800;
}

.clean-debug-button-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
}

.clean-debug-button-grid button {
    min-height: 44px;
    padding: 8px 11px;
    color: #eaf7fc;
    background: rgba(65, 122, 158, 0.28);
    border: 1px solid rgba(128, 198, 232, 0.35);
    border-radius: 9px;
    cursor: pointer;
    font-weight: 850;
}

.clean-debug-button-grid button:hover {
    background: rgba(82, 157, 199, 0.4);
    border-color: rgba(148, 219, 247, 0.7);
}

.clean-debug-button-grid button.is-accent {
    background: rgba(92, 153, 218, 0.36);
    border-color: rgba(117, 190, 255, 0.62);
}

.clean-debug-button-grid button.is-warning {
    background: rgba(201, 108, 128, 0.28);
    border-color: rgba(255, 143, 168, 0.52);
}

.clean-debug-button-grid-compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.clean-debug-resource-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.clean-debug-resource-card,
.clean-debug-stat-row {
    padding: 13px;
    background: rgba(3, 12, 20, 0.32);
    border: 1px solid rgba(145, 196, 221, 0.12);
    border-radius: 10px;
}

.clean-debug-stat-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.clean-debug-wide-actions {
    margin-top: 12px;
}

.clean-debug-issues {
    padding-left: 24px;
}

@media (max-width: 1100px) {
    .clean-debug-button-grid,
    .clean-debug-button-grid-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .clean-debug-resource-grid,
    .clean-debug-stat-list {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   UI 숨김
   ========================================================================== */

#ui-restore-layer {
    position: absolute;
    inset: 0;
    z-index: 9999;
    cursor: pointer;
}

#game-container.ui-hidden #hud-layer,
#game-container.ui-hidden #system-menu,
#game-container.ui-hidden #message-window,
#game-container.ui-hidden #choice-container,
#game-container.ui-hidden #hud-daily-request {
    visibility: hidden !important;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================================================
   CG 표시 모드
   - CG에서는 스탠딩·HUD·우측 시스템 메뉴만 감춘다.
   - 대사창과 선택지는 유지한다.
   - 일반 배경으로 돌아오면 engine.js가 cg-scene을 제거한다.
   ========================================================================== */

#game-container.cg-scene #character-layer,
#game-container.cg-scene #hud-layer,
#game-container.cg-scene #system-menu {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ==========================================================================
   목재 HUD 이미지 연결
   ========================================================================== */

#hud-layer {
    width: min(560px, calc(100vw - 32px));
    color: #68432f;
}

.hud-primary-row {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1461 / 247;
    margin-bottom: 8px;
    background:
        url("assets/ui/hud_top_wood.png")
        center / 100% 100%
        no-repeat;
}

.hud-primary-row .hud-chip {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0;
    height: 56%;
    padding: 0 6px;
    color: #6f4324;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font-size: 15px;
    line-height: 1.1;
    text-shadow:
        0 1px 0
        rgba(255, 255, 255, 0.78);
    white-space: nowrap;
}

#hud-day {
    top: 22%;
    left: 1.5%;
    width: 13.4%;
    height: 56%;
    color: #6f4324;
    font-size: 17px;
}

#hud-stamina-compact {
    top: 23%;
    left: 16.8%;
    width: 25.5%;
}

#hud-time {
    top: 23%;
    left: 50.2%;
    width: 17.2%;
    color: #6f4324;
}

#hud-money {
    top: 23%;
    left: 78.7%;
    width: 18%;
    color: #6f4324;
}

.hud-secondary-row {
    display: block;
    width: 100%;
    margin-bottom: 8px;
}

#hud-stamina {
    box-sizing: border-box;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 1500 / 234;
    margin: 0;
    padding: 10px 7% 7px;
    color: #6f4324;
    background:
        url("assets/ui/hud_stamina_wood.png")
        center / 100% 100%
        no-repeat;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    text-shadow:
        0 1px 0
        rgba(255, 255, 255, 0.78);
}

.hud-stamina-header {
    position: relative;
    top: 2px;
    margin-bottom: 3px;
    font-size: 12px;
}

#hud-stamina-track {
    position: relative;
    top: 2px;
    height: 5px;
    background:
        rgba(123, 74, 34, 0.16);
    border:
        1px solid
        rgba(123, 74, 34, 0.28);
}

#hud-stamina-fill {
    background:
        linear-gradient(
            90deg,
            #73c99a,
            #4ca9c7
        );
}

/* 관계도는 프레임 PNG를 실제 이미지로 표시한다. */

#hud-stats-grid {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    width: 300px;
    margin-bottom: 8px;
}

#hud-stats-grid .clean-relation-card {
    position: relative;
    display: block;
    width: 300px;
    min-width: 0;
    padding: 0;
    overflow: visible;
    color: #68432f;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.clean-relation-frame {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.clean-relation-content {
    position: absolute;
    top: 50%;
    left: 24%;
    right: 5%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #68432f;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
    text-shadow:
        0 1px 0
        rgba(255, 255, 255, 0.82);
    transform: translateY(-50%);
    white-space: nowrap;
}

.clean-stat-love .clean-relation-content {
    color: #8e4058;
}

.clean-stat-anger .clean-relation-content {
    color: #873e43;
}

#hud-growth-toggle {
    width: 300px;
    min-height: 35px;
    margin-bottom: 7px;
    color: #68432f;
    background:
        url("assets/ui/hud_small_wood.png")
        center / 100% 100%
        no-repeat;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    text-shadow:
        0 1px 0
        rgba(255, 255, 255, 0.78);
}

#hud-growth-toggle:hover {
    filter: brightness(1.04);
    background:
        url("assets/ui/hud_small_wood.png")
        center / 100% 100%
        no-repeat;
}

#hud-growth-stats-grid {
    width: 300px;
}

/* 오늘의 부탁을 다시 사용할 때 PNG 말풍선을 그대로 사용한다. */

#character-layer {
    overflow: visible;
}

#character-layer #hud-daily-request {
    top: 55px;
    left: 68%;
    display: none;
    box-sizing: border-box;
    width: 330px;
    height: auto;
    aspect-ratio: 1448 / 1086;
    padding: 18% 9% 25%;
    color: #6f4324;
    background:
        url("assets/ui/daily-request.png")
        center / 100% 100%
        no-repeat;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font-size: 16px;
    line-height: 1.35;
}

#character-layer #hud-daily-request.is-visible {
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 980px) {
    #hud-layer {
        width:
            min(
                560px,
                calc(100vw - 24px)
            );
    }
}

/* 체력 글씨와 게이지 위치 조정 */
.hud-stamina-header {
    top: 10px;
}

#hud-stamina-track {
    top: 10px;
}

/* 버그리포트 1차: 체력 영역 가독성 보강 */
#hud-stamina {
    aspect-ratio: 1500 / 270;
    padding-top: 12px;
    padding-bottom: 10px;
}

.hud-stamina-header {
    top: 8px;
    margin-bottom: 6px;
    font-size: 15px;
    font-weight: 900;
}

#hud-stamina-track {
    top: 8px;
    height: 8px;
}

/* =============================================================================
   통합 시스템 UI
   ============================================================================= */

/* =============================================================================
   통합 시스템 UI 디자인
   ============================================================================= */

:root {
    --ui-modal-bg-top: rgba(27, 34, 45, 0.99);
    --ui-modal-bg-bottom: rgba(10, 15, 23, 0.99);
    --ui-card: rgba(29, 36, 47, 0.9);
    --ui-card-hover: rgba(40, 51, 65, 0.96);
    --ui-border: rgba(180, 210, 239, 0.2);
    --ui-border-strong: rgba(109, 184, 247, 0.55);
    --ui-blue: #67b7ff;
    --ui-pink: #ff82b4;
    --ui-orange: #ffb45d;
    --ui-red: #ff6978;
    --ui-green: #77d1a1;
    --ui-text: rgba(255, 255, 255, 0.95);
    --ui-subtext: rgba(207, 219, 232, 0.74);
}

/* 우측 공용 메뉴 */

#system-menu {
    top: 28px;
    right: 32px;
    gap: 0;
    padding: 7px 9px;
    overflow: hidden;
    background:
        linear-gradient(
            145deg,
            rgba(29, 39, 51, 0.96),
            rgba(12, 20, 30, 0.96)
        );
    border: 1px solid rgba(188, 218, 239, 0.28);
    border-radius: 13px;
    box-shadow:
        0 13px 30px rgba(0, 0, 0, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

#system-menu button {
    position: relative;
    min-height: 39px;
    padding: 0 15px;
    color: rgba(236, 246, 252, 0.9);
    background: transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 800;
}

#system-menu button + button::before {
    content: "";
    position: absolute;
    top: 9px;
    bottom: 9px;
    left: 0;
    width: 1px;
    background: rgba(211, 229, 240, 0.12);
}

#system-menu button:hover {
    color: #fff;
    background: rgba(103, 183, 255, 0.16);
}

/* 공용 시스템 모달 */

#modal-layer {
    background: rgba(2, 7, 12, 0.76);
    backdrop-filter: blur(9px);
}

#modal-content {
    color: var(--ui-text);
    background:
        radial-gradient(
            circle at 84% 8%,
            rgba(103, 183, 255, 0.11),
            transparent 32%
        ),
        linear-gradient(
            145deg,
            var(--ui-modal-bg-top),
            var(--ui-modal-bg-bottom)
        );
    border: 1px solid var(--ui-border-strong);
    box-shadow:
        0 34px 86px rgba(0, 0, 0, 0.62),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

#modal-content::before {
    content: "";
    position: absolute;
    top: 0;
    right: 34px;
    left: 34px;
    height: 2px;
    background:
        linear-gradient(
            90deg,
            transparent,
            var(--ui-blue),
            var(--ui-pink),
            transparent
        );
    opacity: 0.82;
}

#modal-title {
    color: #f7fbff;
    border-bottom-color: rgba(155, 199, 225, 0.22);
    letter-spacing: 0.02em;
}

#modal-body {
    color: var(--ui-text);
}

#modal-body::-webkit-scrollbar-thumb {
    background:
        linear-gradient(
            var(--ui-blue),
            rgba(103, 183, 255, 0.3)
        );
}

.modal-x-btn {
    color: rgba(231, 241, 248, 0.9);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(185, 216, 233, 0.22);
}

.modal-x-btn:hover {
    color: #fff;
    background: rgba(255, 105, 120, 0.3);
    border-color: rgba(255, 133, 145, 0.62);
}

/* 상태창 */

#modal-content.status-wide {
    width: min(1420px, calc(100vw - 70px));
    height: min(900px, calc(100vh - 70px));
    padding: 38px 42px 40px;
}

#modal-content.status-wide #modal-body {
    height: calc(100% - 83px);
    max-height: none;
    padding: 0;
    overflow: hidden;
}

.status-modal-layout {
    display: grid;
    grid-template-columns: 365px minmax(0, 1fr);
    gap: 24px;
    height: 100%;
    min-height: 0;
}

.status-profile-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 50% 28%,
            rgba(121, 198, 239, 0.17),
            transparent 47%
        ),
        linear-gradient(
            160deg,
            rgba(45, 60, 75, 0.94),
            rgba(15, 25, 36, 0.96)
        );
    border: 1px solid rgba(160, 202, 225, 0.25);
    border-radius: 18px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        0 16px 32px rgba(0, 0, 0, 0.3);
}

.status-profile-panel::before {
    content: "";
    position: absolute;
    inset: 11px;
    border: 1px solid rgba(220, 237, 247, 0.08);
    border-radius: 13px;
    pointer-events: none;
}

.status-profile-kicker {
    position: relative;
    z-index: 2;
    align-self: flex-start;
    margin: 20px 22px 0;
    padding: 6px 12px;
    color: #d9effb;
    background: rgba(95, 173, 216, 0.16);
    border: 1px solid rgba(142, 207, 241, 0.25);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.status-portrait-zone {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    margin: 5px 18px 0;
    overflow: hidden;
}

.status-portrait-glow {
    position: absolute;
    top: 16%;
    right: 7%;
    bottom: 0;
    left: 7%;
    background:
        radial-gradient(
            ellipse at center,
            rgba(124, 204, 244, 0.2),
            transparent 67%
        );
    filter: blur(10px);
}

.status-portrait-zone img {
    position: absolute;
    right: 0;
    bottom: -110px;
    left: 0;
    display: block;
    width: 100%;
    height: calc(100% + 130px);
    object-fit: contain;
    object-position: center bottom;
    filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.3));
}

.status-profile-footer {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0 18px 18px;
    padding: 15px 17px;
    background: rgba(7, 15, 23, 0.78);
    border: 1px solid rgba(169, 207, 228, 0.17);
    border-radius: 13px;
}

.status-profile-footer > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.status-profile-footer strong {
    color: #fff;
    font-size: 21px;
}

.status-profile-footer span {
    color: var(--ui-subtext);
    font-size: 12px;
}

.status-profile-footer em {
    padding: 6px 10px;
    color: #ffd8e6;
    background: rgba(255, 130, 180, 0.13);
    border: 1px solid rgba(255, 145, 188, 0.24);
    border-radius: 999px;
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
}

.status-details-zone {
    display: flex;
    flex-direction: column;
    gap: 13px;
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    padding-right: 7px;
}

.status-box-card {
    padding: 17px 19px;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.075),
            rgba(14, 24, 36, 0.72)
        );
    border: 1px solid rgba(179, 212, 230, 0.16);
    border-radius: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.status-box-card h3 {
    margin: 0 0 12px;
    color: #bce7fb;
    font-size: 17px;
}

.status-box-card p {
    margin: 4px 0 0;
    color: rgba(234, 242, 247, 0.83);
    font-size: 14px;
    line-height: 1.55;
}

.dashboard-stat-flex {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
}

.db-stat-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 4px solid var(--ui-blue);
    border-radius: 11px;
}

.db-stat-badge.love_b {
    border-left-color: var(--ui-pink);
}

.db-stat-badge.anger_b {
    border-left-color: var(--ui-red);
}

.db-stat-name {
    color: #eef8fd;
    font-size: 15px;
    font-weight: 900;
}

.db-stat-value {
    display: flex;
    align-items: baseline;
    gap: 9px;
}

.db-stat-num {
    color: #fff;
    font-size: 25px;
    font-variant-numeric: tabular-nums;
}

.db-stat-title {
    color: var(--ui-subtext);
    font-size: 12px;
}

.dashboard-dev-flex {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.db-dev-badge {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 12px 13px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(166, 205, 226, 0.13);
    border-radius: 10px;
}

.db-dev-icon {
    font-size: 20px;
}

.db-dev-name {
    overflow: hidden;
    color: #dcebf3;
    font-size: 13px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.db-dev-val {
    color: #fff;
    font-size: 17px;
    font-variant-numeric: tabular-nums;
}

.status-lower-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
}

/* 드레스룸 */

#modal-content.wardrobe-modal {
    width: min(1440px, calc(100vw - 70px));
    height: min(900px, calc(100vh - 70px));
    padding: 38px 42px 40px;
}

#modal-content.wardrobe-modal #modal-body {
    height: calc(100% - 83px);
    max-height: none;
    padding: 0;
    overflow: hidden;
}

.wardrobe-layout {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 22px;
    height: 100%;
    min-height: 0;
}

.wardrobe-preview-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 20px;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 50% 30%,
            rgba(255, 130, 180, 0.12),
            transparent 45%
        ),
        linear-gradient(
            155deg,
            rgba(50, 55, 70, 0.95),
            rgba(16, 24, 35, 0.98)
        );
    border: 1px solid rgba(212, 183, 214, 0.22);
    border-radius: 18px;
}

.wardrobe-preview-label {
    align-self: flex-start;
    padding: 6px 11px;
    color: #ffd9e8;
    background: rgba(255, 130, 180, 0.12);
    border: 1px solid rgba(255, 151, 191, 0.2);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.wardrobe-preview-image {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    margin: 8px 0 12px;
    overflow: hidden;
    background: rgba(5, 10, 16, 0.2);
    border-radius: 13px;
}

.wardrobe-preview-fallback,
.wardrobe-image-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.12);
    font-size: 50px;
}

.wardrobe-preview-image img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
}

.wardrobe-current-info,
.wardrobe-owned-count {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(4, 12, 20, 0.46);
    border: 1px solid rgba(178, 208, 226, 0.12);
}

.wardrobe-current-info {
    border-radius: 10px 10px 0 0;
}

.wardrobe-owned-count {
    border-top: 0;
    border-radius: 0 0 10px 10px;
}

.wardrobe-current-info span,
.wardrobe-owned-count span {
    color: var(--ui-subtext);
    font-size: 12px;
}

.wardrobe-current-info strong,
.wardrobe-owned-count strong {
    color: #fff;
    font-size: 14px;
}

.wardrobe-list-panel {
    min-width: 0;
    min-height: 0;
    padding: 2px 8px 2px 2px;
    overflow-y: auto;
}

.wardrobe-section {
    padding: 18px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(178, 211, 229, 0.13);
    border-radius: 15px;
}

.wardrobe-section-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 15px;
}

.wardrobe-section-title div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wardrobe-section-title strong {
    color: #f8dfeb;
    font-size: 18px;
}

.wardrobe-section-title span {
    color: var(--ui-subtext);
    font-size: 13px;
}

.wardrobe-section-title em {
    flex: 0 0 auto;
    padding: 5px 10px;
    color: #cbe9f8;
    background: rgba(103, 183, 255, 0.12);
    border-radius: 999px;
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
}

.wardrobe-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.wardrobe-card {
    position: relative;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    color: var(--ui-text);
    background:
        linear-gradient(
            150deg,
            rgba(55, 63, 77, 0.93),
            rgba(20, 29, 40, 0.97)
        );
    border: 1px solid rgba(185, 212, 229, 0.16);
    border-radius: 13px;
    cursor: pointer;
    text-align: left;
    transition:
        transform 0.17s ease,
        border-color 0.17s ease,
        box-shadow 0.17s ease;
}

.wardrobe-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 139, 183, 0.5);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.wardrobe-card-image {
    position: relative;
    height: 230px;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 50% 40%,
            rgba(255, 255, 255, 0.1),
            transparent 58%
        );
}

.wardrobe-card-image img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
    transition: transform 0.18s ease;
}

.wardrobe-card:hover .wardrobe-card-image img {
    transform: scale(1.035);
}

.wardrobe-card-status {
    position: absolute;
    right: 9px;
    bottom: 9px;
    z-index: 2;
    padding: 4px 8px;
    color: #f2f7fa;
    background: rgba(5, 13, 21, 0.78);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
}

.wardrobe-card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 11px 13px 13px;
}

.wardrobe-card-info strong {
    color: #fff;
    font-size: 14px;
}

.wardrobe-card-info span {
    display: -webkit-box;
    min-height: 47px;
    overflow: hidden;
    color: var(--ui-subtext);
    font-size: 11px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.wardrobe-card.wardrobe-equipped {
    border-color: rgba(255, 130, 180, 0.74);
    box-shadow:
        0 0 0 2px rgba(255, 130, 180, 0.13),
        0 14px 28px rgba(0, 0, 0, 0.26);
}

.wardrobe-card.wardrobe-equipped::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 220, 233, 0.2);
    border-radius: inherit;
    pointer-events: none;
}

/* 보유품 */

#modal-content.inventory-modal {
    width: min(1340px, calc(100vw - 70px));
    height: min(900px, calc(100vh - 70px));
}

#modal-content.inventory-modal #modal-body {
    max-height: 750px;
}

.inventory-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    gap: 14px;
    margin-bottom: 17px;
}

.inventory-summary-copy,
.inventory-summary-total {
    padding: 16px 18px;
    background:
        linear-gradient(
            145deg,
            rgba(103, 183, 255, 0.13),
            rgba(20, 34, 50, 0.72)
        );
    border: 1px solid rgba(143, 203, 235, 0.19);
    border-radius: 13px;
}

.inventory-summary-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.inventory-summary-copy > span {
    color: #91cfee;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.13em;
}

.inventory-summary-copy > strong {
    color: #fff;
    font-size: 20px;
}

.inventory-summary-copy > p {
    margin: 2px 0 0;
    color: var(--ui-subtext);
    font-size: 13px;
    line-height: 1.55;
}

.inventory-summary-total {
    display: grid;
    grid-template-columns: auto auto;
    align-content: center;
    justify-content: center;
    column-gap: 4px;
    text-align: center;
}

.inventory-summary-total strong {
    color: #fff;
    font-size: 34px;
}

.inventory-summary-total > span {
    align-self: end;
    padding-bottom: 7px;
    color: var(--ui-subtext);
    font-size: 15px;
}

.inventory-summary-total em {
    grid-column: 1 / -1;
    color: #9dd8f2;
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
}

.inventory-category-list {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.inventory-category {
    padding: 15px 17px 17px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(173, 208, 226, 0.13);
    border-radius: 13px;
}

.inventory-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 12px;
}

.inventory-category-heading {
    display: flex;
    align-items: center;
    gap: 11px;
}

.inventory-category-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-size: 20px;
}

.inventory-category-heading strong {
    display: block;
    color: #fff;
    font-size: 16px;
}

.inventory-category-heading p {
    margin: 2px 0 0;
    color: var(--ui-subtext);
    font-size: 12px;
}

.inventory-category-count {
    padding: 5px 10px;
    color: #d5edf8;
    background: rgba(103, 183, 255, 0.11);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.inventory-item-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.inventory-item-card {
    position: relative;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 11px;
    min-width: 0;
    padding: 12px 13px 31px;
    background:
        linear-gradient(
            145deg,
            rgba(54, 63, 76, 0.9),
            rgba(19, 28, 39, 0.96)
        );
    border: 1px solid rgba(180, 210, 228, 0.14);
    border-left: 3px solid var(--ui-blue);
    border-radius: 11px;
}

.inventory-item-memory {
    border-left-color: var(--ui-pink);
}

.inventory-item-achievement {
    border-left-color: var(--ui-orange);
}

.inventory-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.065);
    border-radius: 10px;
    font-size: 24px;
}

.inventory-item-content {
    min-width: 0;
}

.inventory-item-name {
    display: block;
    overflow: hidden;
    color: #fff;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inventory-item-effect {
    margin: 3px 0 0;
    color: var(--ui-subtext);
    font-size: 11px;
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
}

.inventory-item-status {
    position: absolute;
    right: 11px;
    bottom: 8px;
    color: #9edaf5;
    font-size: 10px;
    font-weight: 900;
}

.inventory-item-locked {
    opacity: 0.48;
    filter: saturate(0.45);
}

/* 대사 로그 */

#modal-content.dialogue-log-modal {
    width: min(1080px, calc(100vw - 70px));
    height: min(820px, calc(100vh - 70px));
}

#modal-content.dialogue-log-modal #modal-body {
    display: flex;
    flex-direction: column;
    height: calc(100% - 82px);
    max-height: none;
    overflow: hidden;
}

.dialogue-log-list {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    padding-right: 8px;
    overflow-y: auto;
}

.dialogue-log-entry {
    padding: 13px 16px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(169, 207, 228, 0.11);
    border-left: 3px solid var(--ui-blue);
    border-radius: 9px;
}

.dialogue-log-entry strong {
    display: block;
    margin-bottom: 4px;
    color: #9fdcf4;
    font-size: 13px;
}

.dialogue-log-entry p {
    margin: 0;
    color: rgba(237, 245, 249, 0.88);
    font-size: 14px;
    line-height: 1.55;
    white-space: pre-wrap;
}

.dialogue-log-empty {
    margin: auto;
    color: var(--ui-subtext);
}

.dialogue-log-close,
.help-close-btn,
.save-load-back-button,
.game-menu-close-button,
.settings-apply-button,
.settings-back-button {
    min-height: 45px;
    padding: 9px 22px;
    color: #eaf6fb;
    background:
        linear-gradient(
            145deg,
            rgba(62, 119, 153, 0.72),
            rgba(34, 72, 97, 0.84)
        );
    border: 1px solid rgba(132, 201, 232, 0.44);
    border-radius: 9px;
    cursor: pointer;
    font-weight: 900;
}

.dialogue-log-close {
    align-self: center;
    min-width: 150px;
    margin-top: 15px;
}

/* 메인 시스템 메뉴 */

#modal-content.game-menu-modal {
    width: min(1050px, calc(100vw - 70px));
}

.game-menu-screen {
    display: flex;
    flex-direction: column;
    gap: 17px;
}

.game-menu-guide,
.save-load-guide,
.settings-guide {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    align-items: center;
    gap: 15px;
    padding: 15px 17px;
    background:
        linear-gradient(
            145deg,
            rgba(103, 183, 255, 0.14),
            rgba(20, 34, 50, 0.75)
        );
    border: 1px solid rgba(147, 205, 235, 0.2);
    border-radius: 13px;
}

.game-menu-guide-icon,
.save-load-guide-icon,
.settings-guide-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    color: #d8f1fc;
    background: rgba(103, 183, 255, 0.13);
    border: 1px solid rgba(154, 211, 240, 0.2);
    border-radius: 12px;
    font-size: 25px;
}

.game-menu-guide-copy strong,
.save-load-guide strong,
.settings-guide strong {
    color: #fff;
    font-size: 17px;
}

.game-menu-guide-copy p,
.save-load-guide p,
.settings-guide p {
    margin: 3px 0 0;
    color: var(--ui-subtext);
    font-size: 12px;
}

.game-menu-current-state {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.game-menu-current-state span {
    color: var(--ui-subtext);
    font-size: 10px;
}

.game-menu-current-state strong {
    color: #bfe9fb;
    font-size: 17px;
}

.game-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
}

.game-menu-card {
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    min-width: 0;
    min-height: 86px;
    padding: 14px 16px;
    color: var(--ui-text);
    background:
        linear-gradient(
            145deg,
            rgba(55, 65, 78, 0.92),
            rgba(20, 29, 40, 0.97)
        );
    border: 1px solid rgba(180, 211, 228, 0.14);
    border-left: 4px solid var(--ui-blue);
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    transition:
        transform 0.16s ease,
        border-color 0.16s ease,
        background 0.16s ease;
}

.game-menu-card:hover {
    transform: translateY(-2px);
    background: var(--ui-card-hover);
    border-color: rgba(125, 202, 241, 0.5);
}

.game-menu-card-load {
    border-left-color: #86c5ef;
}

.game-menu-card-settings {
    border-left-color: #b99be8;
}

.game-menu-card-delete,
.game-menu-card-exit {
    border-left-color: var(--ui-red);
}

.game-menu-card-title {
    border-left-color: var(--ui-orange);
}

.game-menu-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.055);
    border-radius: 11px;
    font-size: 23px;
}

.game-menu-card-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.game-menu-card-copy strong {
    color: #fff;
    font-size: 16px;
}

.game-menu-card-copy small {
    overflow: hidden;
    color: var(--ui-subtext);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-menu-card-arrow {
    color: rgba(190, 222, 239, 0.52);
    font-size: 30px;
}

.game-menu-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: var(--ui-subtext);
    font-size: 11px;
}

/* 도움말 */

#modal-content.help-modal {
    width: min(980px, calc(100vw - 70px));
    max-height: calc(100vh - 60px);
}

.help-screen {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 0;
}

.help-intro {
    padding: 14px 17px;
    color: rgba(233, 244, 251, 0.94);
    background:
        linear-gradient(
            135deg,
            rgba(82, 146, 214, 0.28),
            rgba(25, 42, 67, 0.72)
        );
    border: 1px solid rgba(165, 210, 255, 0.26);
    border-radius: 12px;
    font-size: 15px;
    line-height: 1.55;
}

.help-section-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
}

.help-section {
    min-width: 0;
    padding: 14px 16px;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.075),
            rgba(12, 22, 36, 0.52)
        );
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 11px;
}

.help-section h3 {
    margin: 0 0 6px;
    color: #f3cf8a;
    font-size: 15px;
}

.help-section p {
    margin: 0;
    color: rgba(241, 246, 255, 0.84);
    font-size: 12px;
    line-height: 1.55;
    white-space: normal;
    overflow-wrap: anywhere;
}

.help-section-wide {
    border-left: 3px solid var(--ui-orange);
}

.help-close-btn {
    align-self: center;
    min-width: 150px;
}

/* 저장·불러오기·삭제 */

#modal-content.save-load-modal {
    width: min(1260px, calc(100vw - 70px));
    height: min(900px, calc(100vh - 70px));
}

#modal-content.save-load-modal #modal-body {
    height: calc(100% - 82px);
    max-height: none;
    overflow: hidden;
}

.save-load-screen {
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 100%;
    min-height: 0;
}

.save-slot-grid {
    display: grid;
    flex: 1 1 auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    min-height: 0;
    padding-right: 7px;
    overflow-y: auto;
}

.save-slot-entry {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 9px;
    min-width: 0;
    min-height: 190px;
    padding: 13px 14px 34px;
    color: var(--ui-text);
    background:
        linear-gradient(
            150deg,
            rgba(55, 64, 77, 0.93),
            rgba(19, 28, 39, 0.97)
        );
    border: 1px solid rgba(183, 212, 228, 0.15);
    border-left: 3px solid var(--ui-blue);
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
}

.save-slot-entry:not(:disabled):hover {
    transform: translateY(-2px);
    border-color: rgba(124, 201, 240, 0.48);
}

.save-slot-delete {
    border-left-color: var(--ui-red);
}

.save-slot-autosave {
    border-left-color: var(--ui-orange);
}

.save-slot-entry-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.save-slot-entry-header strong {
    color: #fff;
    font-size: 15px;
}

.save-slot-entry-header > span {
    max-width: 125px;
    overflow: hidden;
    color: var(--ui-subtext);
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.save-slot-main-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 10px;
    background: rgba(5, 13, 21, 0.35);
    border-radius: 9px;
}

.save-slot-day,
.save-slot-money {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.save-slot-day strong,
.save-slot-money strong {
    color: #fff;
    font-size: 14px;
}

.save-slot-day span,
.save-slot-money span {
    color: var(--ui-subtext);
    font-size: 10px;
}

.save-slot-stat-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.save-slot-stat-row > span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 9px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
}

.save-slot-stat-row span {
    color: var(--ui-subtext);
    font-size: 10px;
}

.save-slot-stat-row strong {
    color: #fff;
    font-size: 13px;
}

.save-slot-action {
    position: absolute;
    right: 13px;
    bottom: 9px;
    color: #9ddbf6;
    font-size: 10px;
    font-weight: 900;
}

.save-slot-delete .save-slot-action {
    color: #ff9ca6;
}

.save-slot-empty-content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--ui-subtext);
}

.save-slot-empty-icon {
    font-size: 29px;
}

.save-slot-empty-content p {
    margin: 0;
    font-size: 11px;
}

.save-slot-entry:disabled {
    cursor: default;
    opacity: 0.47;
}

.save-load-back-button {
    align-self: center;
}

/* 환경설정 */

#modal-content.settings-modal {
    width: min(1100px, calc(100vw - 70px));
    max-height: calc(100vh - 60px);
}

.settings-screen {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.settings-auto-save {
    color: #8ee0b4;
    font-size: 11px;
    font-weight: 900;
}

.settings-card {
    padding: 15px 17px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(177, 209, 228, 0.14);
    border-radius: 12px;
}

.settings-card-header > div {
    display: flex;
    align-items: center;
    gap: 11px;
}

.settings-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.055);
    border-radius: 10px;
    font-size: 20px;
}

.settings-card-header strong {
    display: block;
    color: #fff;
    font-size: 15px;
}

.settings-card-header p {
    margin: 2px 0 0;
    color: var(--ui-subtext);
    font-size: 11px;
}

.settings-volume-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: 12px;
}

.settings-volume-row {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr) 55px;
    align-items: center;
    gap: 13px;
    padding: 9px 11px;
    background: rgba(6, 14, 23, 0.32);
    border-radius: 9px;
}

.settings-volume-label {
    display: flex;
    align-items: center;
    gap: 9px;
}

.settings-volume-label > span:first-child {
    font-size: 20px;
}

.settings-volume-label strong,
.settings-volume-label small {
    display: block;
}

.settings-volume-label strong {
    color: #fff;
    font-size: 13px;
}

.settings-volume-label small {
    color: var(--ui-subtext);
    font-size: 9px;
}

.settings-volume-row input[type="range"] {
    width: 100%;
    accent-color: var(--ui-blue);
}

.settings-volume-value {
    color: #bde9fb;
    font-size: 13px;
    text-align: right;
}

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

.settings-option-button {
    width: 100%;
    min-height: 60px;
    margin-top: 12px;
    padding: 10px 13px;
    color: #edf7fc;
    background: rgba(50, 82, 105, 0.34);
    border: 1px solid rgba(123, 194, 227, 0.3);
    border-radius: 10px;
}

.settings-language-buttons {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
    margin-top: 12px;
}

.settings-language-button {
    min-height: 46px;
    padding: 8px 6px;
    color: #d8e8f1;
    background: rgba(50, 82, 105, 0.26);
    border: 1px solid rgba(123, 194, 227, 0.22);
    border-radius: 9px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
    transition:
        background 0.16s ease,
        border-color 0.16s ease,
        color 0.16s ease,
        transform 0.16s ease;
}

.settings-language-button:hover {
    color: #fff;
    background: rgba(77, 125, 158, 0.42);
    border-color: rgba(142, 211, 241, 0.45);
}

.settings-language-button.is-selected {
    color: #fff;
    background: rgba(91, 177, 222, 0.32);
    border-color: rgba(126, 211, 250, 0.72);
    box-shadow: inset 0 0 0 1px rgba(201, 239, 255, 0.14);
}

.settings-option-button {
    display: grid;
    grid-template-columns: 35px minmax(0, 1fr);
    align-items: center;
    column-gap: 8px;
    cursor: pointer;
    text-align: left;
}

.settings-option-button > span {
    grid-row: 1 / 3;
    font-size: 22px;
    text-align: center;
}

.settings-option-button strong {
    color: #fff;
    font-size: 13px;
}

.settings-option-button small {
    color: var(--ui-subtext);
    font-size: 9px;
}

.settings-footer {
    display: flex;
    justify-content: center;
    gap: 11px;
}

/* CG 앨범 */

#modal-content.gallery-modal {
    width: min(1400px, calc(100vw - 70px));
    height: min(900px, calc(100vh - 70px));
}

#modal-content.gallery-modal #modal-body {
    height: calc(100% - 82px);
    max-height: none;
    overflow: hidden;
}

.cg-gallery-shell {
    display: flex;
    flex-direction: column;
    gap: 13px;
    height: 100%;
}

.cg-gallery-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cg-gallery-categories {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 7px;
    min-width: 0;
}

.cg-gallery-category-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 0 11px;
    color: var(--ui-subtext);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(178, 210, 228, 0.13);
    border-radius: 999px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 800;
    transition:
        color 0.15s ease,
        background 0.15s ease,
        border-color 0.15s ease;
}

.cg-gallery-category-button span {
    color: rgba(255, 255, 255, 0.52);
    font-size: 9px;
}

.cg-gallery-category-button:hover,
.cg-gallery-category-button.is-active {
    color: #fff;
    background: rgba(71, 160, 210, 0.2);
    border-color: rgba(119, 197, 237, 0.5);
}

.cg-gallery-summary {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 11px;
    color: var(--ui-subtext);
    background: rgba(255, 255, 255, 0.045);
    border-radius: 999px;
    font-size: 11px;
}

.cg-gallery-summary strong {
    color: #fff;
}

.cg-gallery-grid {
    display: grid;
    flex: 1 1 auto;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 11px;
    min-height: 0;
    padding-right: 7px;
    overflow-y: auto;
}

.cg-gallery-card {
    position: relative;
    min-width: 0;
    min-height: 170px;
    overflow: hidden;
    color: var(--ui-subtext);
    background:
        linear-gradient(
            145deg,
            rgba(52, 61, 74, 0.92),
            rgba(18, 27, 38, 0.97)
        );
    border: 1px solid rgba(178, 210, 228, 0.14);
    border-radius: 11px;
}

.cg-gallery-card.is-unlocked {
    cursor: pointer;
}

.cg-gallery-card.is-unlocked:hover {
    transform: translateY(-2px);
    border-color: rgba(119, 197, 237, 0.54);
}

.cg-gallery-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cg-gallery-card-number {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    padding: 3px 7px;
    color: #fff;
    background: rgba(5, 12, 19, 0.74);
    border-radius: 999px;
    font-size: 9px;
    font-weight: 900;
}

.cg-gallery-card.is-locked {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    opacity: 0.54;
}

.cg-gallery-lock-icon {
    font-size: 29px;
}

.cg-gallery-lock-text {
    font-size: 11px;
    font-weight: 900;
}

.cg-gallery-empty {
    grid-column: 1 / -1;
    margin: auto;
    color: var(--ui-subtext);
}

.cg-gallery-viewer {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.cg-gallery-viewer img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cg-gallery-viewer-close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: #fff;
    background: rgba(5, 12, 19, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
}

@media (max-width: 1100px) {
    .status-modal-layout,
    .wardrobe-layout {
        grid-template-columns: 300px minmax(0, 1fr);
    }

    .wardrobe-grid,
    .inventory-item-grid,
    .save-slot-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cg-gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    #system-menu {
        right: 12px;
        left: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }

    #system-menu button {
        padding: 0 9px;
        font-size: 11px;
    }

    .status-modal-layout,
    .wardrobe-layout {
        display: block;
        overflow-y: auto;
    }

    .status-profile-panel,
    .wardrobe-preview-panel {
        min-height: 470px;
        margin-bottom: 14px;
    }

    .dashboard-dev-flex,
    .inventory-item-grid,
    .save-slot-grid,
    .cg-gallery-grid,
    .game-menu-grid,
    .help-section-grid,
    .settings-lower-grid {
        grid-template-columns: 1fr;
    }

    .settings-volume-row {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   버그리포트 1차: 잠긴 의상과 시내 상점
   ========================================================================== */

.wardrobe-card.wardrobe-locked {
    cursor: not-allowed;
    opacity: 0.46;
    filter: grayscale(0.62);
}

.wardrobe-card.wardrobe-locked:hover {
    transform: none;
    border-color: rgba(185, 212, 229, 0.16);
    box-shadow: none;
}

.wardrobe-lock-icon {
    position: relative;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    font-size: 36px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.56));
}

.shop-control {
    border-color: rgba(255, 157, 194, 0.72);
}

.item-shop-control {
    border-color: rgba(255, 205, 111, 0.72);
}

#choice-container.steam-shop-choice-container {
    top: 82px;
    right: 52px;
    display: block;
    width: min(900px, calc(100% - 104px));
    max-height: calc(100% - 112px);
    overflow-y: auto;
    padding: 4px;
    pointer-events: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 139, 183, 0.52) transparent;
}

.steam-shop-panel {
    width: 100%;
    box-sizing: border-box;
    padding: 20px;
    color: var(--ui-text);
    background:
        linear-gradient(
            145deg,
            rgba(22, 29, 43, 0.98),
            rgba(10, 15, 25, 0.97)
        );
    border: 1px solid rgba(255, 151, 193, 0.3);
    border-radius: 18px;
    box-shadow:
        0 18px 44px rgba(0, 0, 0, 0.48),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(14px);
}

.steam-shop-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin: 0 2px 16px;
}

.steam-shop-heading > div {
    min-width: 0;
}

.steam-shop-heading span {
    display: block;
    margin-bottom: 4px;
    color: #ff9fc8;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.steam-shop-heading h2 {
    margin: 0;
    color: #fff6fa;
    font-size: 25px;
    line-height: 1.2;
}

.steam-shop-heading p {
    margin: 7px 0 0;
    color: var(--ui-subtext);
    font-size: 13px;
    line-height: 1.55;
}

.steam-shop-heading > strong {
    flex: 0 0 auto;
    padding: 9px 12px;
    color: #ffe6a6;
    background: rgba(255, 187, 84, 0.12);
    border: 1px solid rgba(255, 197, 106, 0.3);
    border-radius: 10px;
    font-size: 15px;
    white-space: nowrap;
}

.steam-shop-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.steam-item-shop-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.steam-shop-card {
    display: flex;
    min-width: 0;
    overflow: hidden;
    flex-direction: column;
    background:
        linear-gradient(
            165deg,
            rgba(48, 56, 72, 0.95),
            rgba(19, 27, 39, 0.97)
        );
    border: 1px solid rgba(151, 202, 244, 0.23);
    border-radius: 13px;
    box-shadow: 0 7px 16px rgba(0, 0, 0, 0.26);
    transition:
        transform 0.17s ease,
        border-color 0.17s ease,
        box-shadow 0.17s ease;
}

.steam-shop-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 142, 185, 0.62);
    box-shadow:
        0 12px 23px rgba(0, 0, 0, 0.34),
        0 0 18px rgba(255, 93, 157, 0.12);
}

.steam-shop-card.is-owned {
    opacity: 0.72;
}

.steam-shop-card-image {
    position: relative;
    display: grid;
    place-items: center;
    height: 188px;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 50% 34%,
            rgba(255, 255, 255, 0.13),
            transparent 66%
        ),
        rgba(8, 13, 22, 0.46);
}

.steam-shop-card-image img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
}

.steam-shop-card-fallback {
    position: absolute;
    color: rgba(255, 255, 255, 0.28);
    font-size: 42px;
}

.steam-shop-owned-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    padding: 4px 7px;
    color: #d5ffe7;
    background: rgba(32, 139, 94, 0.86);
    border-radius: 7px;
    font-size: 10px;
    font-weight: 900;
}

.steam-shop-card-copy {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 7px;
    padding: 11px 12px 12px;
}

.steam-shop-card-copy > strong {
    color: #fff;
    font-size: 15px;
    line-height: 1.3;
}

.steam-shop-card-copy > span {
    color: #ffe19b;
    font-size: 13px;
    font-weight: 800;
}

.steam-shop-card-copy p {
    flex: 1;
    margin: 0;
    color: var(--ui-subtext);
    font-size: 12px;
    line-height: 1.5;
}

.steam-shop-card-copy .steam-shop-outfit-bonus {
    color: #ffb5cf;
    font-size: 12px;
    font-weight: 900;
}

.steam-shop-item-icon {
    display: grid;
    place-items: center;
    height: 96px;
    color: #fff;
    background:
        radial-gradient(
            circle,
            rgba(255, 190, 104, 0.18),
            rgba(9, 15, 24, 0.3)
        );
    font-size: 42px;
}

.steam-shop-buy,
.steam-shop-state,
.steam-shop-footer button {
    min-height: 36px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 900;
}

.steam-shop-buy {
    margin-top: auto;
    color: #fff;
    background:
        linear-gradient(
            135deg,
            #e65d98,
            #bc3e78
        );
    border: 1px solid rgba(255, 184, 213, 0.48);
    cursor: pointer;
}

.steam-shop-buy:disabled {
    color: rgba(235, 241, 246, 0.48);
    background: rgba(97, 105, 115, 0.3);
    border-color: rgba(189, 198, 207, 0.18);
    cursor: not-allowed;
}

.steam-shop-state {
    display: grid;
    place-items: center;
    margin-top: auto;
    color: rgba(193, 255, 216, 0.88);
    background: rgba(54, 139, 96, 0.18);
    border: 1px solid rgba(133, 231, 172, 0.26);
}

.steam-shop-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
}

.steam-shop-footer button {
    padding: 8px 16px;
    color: #ffdce9;
    background: rgba(194, 67, 120, 0.18);
    border: 1px solid rgba(255, 132, 183, 0.38);
    cursor: pointer;
}

@media (max-width: 980px) {
    #choice-container.steam-shop-choice-container {
        top: 76px;
        right: 18px;
        width: calc(100% - 36px);
        max-height: calc(100% - 94px);
    }

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

@media (max-width: 560px) {
    .steam-shop-heading {
        flex-direction: column;
    }

    .steam-shop-grid,
    .steam-item-shop-grid {
        grid-template-columns: 1fr;
    }
}


/* 이벤트 패시브·승급 메달 */
.inventory-item-passive {
    border-left-color: #b58cff;
}

.inventory-item-exam {
    border-left-color: #e2b66f;
}

.inventory-item-icon img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.38));
}

.inventory-unlock-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(4, 8, 16, 0.76);
    opacity: 0;
    transition: opacity 180ms ease;
}

.inventory-unlock-overlay.is-visible {
    opacity: 1;
}

.inventory-unlock-card {
    width: min(420px, calc(100vw - 40px));
    padding: 24px;
    text-align: center;
    background: linear-gradient(150deg, rgba(44, 53, 72, 0.98), rgba(14, 22, 34, 0.99));
    border: 1px solid rgba(255, 224, 154, 0.52);
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.62), 0 0 34px rgba(247, 203, 106, 0.18);
    transform: translateY(18px) scale(0.94);
    transition: transform 220ms ease;
}

.inventory-unlock-overlay.is-visible .inventory-unlock-card {
    transform: translateY(0) scale(1);
}

.inventory-unlock-label {
    display: inline-block;
    margin-bottom: 8px;
    color: #f7d98d;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.18em;
}

.inventory-unlock-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 190px;
    margin: 4px 0 8px;
}

.inventory-unlock-visual img {
    max-width: 180px;
    max-height: 180px;
    object-fit: contain;
    filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.48));
    animation: inventoryUnlockFloat 1.8s ease-in-out infinite;
}

.inventory-unlock-emoji {
    font-size: 92px;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.4));
}

.inventory-unlock-card strong {
    display: block;
    color: #fff4cd;
    font-size: 24px;
}

.inventory-unlock-card p {
    margin: 8px 0 20px;
    color: rgba(238, 244, 255, 0.84);
    font-size: 14px;
    line-height: 1.6;
}

.inventory-unlock-card button {
    min-width: 132px;
    padding: 10px 22px;
    color: #17120a;
    background: linear-gradient(#ffe8a7, #e4b85d);
    border: 0;
    border-radius: 999px;
    font-weight: 900;
    cursor: pointer;
}

@keyframes inventoryUnlockFloat {
    0%, 100% { transform: translateY(0) rotate(-1deg); }
    50% { transform: translateY(-7px) rotate(1deg); }
}

.inventory-unlock-card::before {
    content: "";
    position: absolute;
    inset: -18px;
    z-index: -1;
    background: radial-gradient(circle, rgba(255, 221, 132, 0.34), rgba(255, 221, 132, 0) 68%);
    border-radius: 28px;
    animation: inventoryUnlockGlow 1.4s ease-in-out infinite alternate;
}

.inventory-unlock-card {
    position: relative;
    isolation: isolate;
}

@keyframes inventoryUnlockGlow {
    from { opacity: 0.55; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1.04); }
}


/* 사용 아이템 */

.inventory-item-consumable {
    border-left-color: #f1b95e;
}

.inventory-consumable-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}

.inventory-consumable-actions > span {
    color: #f7d99a;
    font-size: 11px;
    font-weight: 900;
}

.inventory-consumable-actions button {
    min-width: 72px;
    min-height: 30px;
    padding: 5px 12px;
    color: #fff8e7;
    background:
        linear-gradient(
            145deg,
            rgba(187, 123, 44, 0.92),
            rgba(118, 74, 25, 0.95)
        );
    border: 1px solid rgba(255, 214, 143, 0.42);
    border-radius: 7px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 900;
}

.inventory-consumable-actions button:disabled {
    cursor: default;
    opacity: 0.38;
}

.inventory-use-reason {
    display: block;
    margin-top: 5px;
    color: rgba(233, 200, 164, 0.72);
    font-size: 10px;
    line-height: 1.35;
}

.inventory-item-consumable.inventory-item-locked {
    opacity: 0.72;
    filter: saturate(0.75);
}

/* 업적 */

#modal-content.achievement-modal {
    width: min(1280px, calc(100vw - 70px));
    height: min(900px, calc(100vh - 70px));
}

#modal-content.achievement-modal #modal-body {
    max-height: 760px;
}

.achievement-screen {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.achievement-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    gap: 15px;
    padding: 17px 19px;
    background:
        linear-gradient(
            145deg,
            rgba(245, 183, 75, 0.15),
            rgba(41, 32, 20, 0.8)
        );
    border: 1px solid rgba(255, 211, 127, 0.22);
    border-radius: 14px;
}

.achievement-summary > div:first-child {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.achievement-summary > div:first-child > span {
    color: #f4c870;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.13em;
}

.achievement-summary > div:first-child > strong {
    color: #fff;
    font-size: 20px;
}

.achievement-summary > div:first-child > p {
    margin: 2px 0 0;
    color: var(--ui-subtext);
    font-size: 13px;
    line-height: 1.5;
}

.achievement-summary-count {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
    align-self: stretch;
    padding: 13px;
    background: rgba(255, 255, 255, 0.045);
    border-radius: 11px;
}

.achievement-summary-count strong {
    color: #ffe4a3;
    font-size: 34px;
}

.achievement-summary-count span {
    color: var(--ui-subtext);
    font-size: 15px;
}

.achievement-category-list {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.achievement-category {
    padding: 15px 17px 17px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(221, 194, 141, 0.14);
    border-radius: 13px;
}

.achievement-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 12px;
}

.achievement-category-header > div {
    display: flex;
    align-items: center;
    gap: 9px;
}

.achievement-category-header > div > span {
    font-size: 23px;
}

.achievement-category-header strong {
    color: #fff;
    font-size: 16px;
}

.achievement-category-header em {
    padding: 5px 10px;
    color: #ffe0a0;
    background: rgba(238, 177, 68, 0.11);
    border-radius: 999px;
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
}

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

.achievement-card {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 12px;
    min-height: 92px;
    padding: 13px;
    background:
        linear-gradient(
            145deg,
            rgba(57, 54, 48, 0.94),
            rgba(23, 25, 29, 0.97)
        );
    border: 1px solid rgba(238, 198, 121, 0.15);
    border-left: 3px solid #d9a94f;
    border-radius: 11px;
}

.achievement-card.is-locked {
    opacity: 0.48;
    filter: saturate(0.4);
}

.achievement-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    background: rgba(255, 224, 164, 0.08);
    border: 1px solid rgba(255, 224, 164, 0.1);
    border-radius: 12px;
    font-size: 27px;
}

.achievement-card-copy {
    min-width: 0;
}

.achievement-card-copy strong {
    display: block;
    color: #fff;
    font-size: 14px;
}

.achievement-card-copy p {
    margin: 4px 0 6px;
    color: var(--ui-subtext);
    font-size: 11px;
    line-height: 1.45;
}

.achievement-card-copy small {
    color: #d9ba78;
    font-size: 10px;
}

.achievement-unlock-overlay {
    position: fixed;
    z-index: 10050;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(6, 9, 13, 0.72);
    opacity: 0;
    transition: opacity 0.18s ease;
}

.achievement-unlock-overlay.is-visible {
    opacity: 1;
}

.achievement-unlock-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(420px, calc(100vw - 40px));
    padding: 25px 27px 22px;
    text-align: center;
    background:
        linear-gradient(
            145deg,
            rgba(62, 48, 25, 0.98),
            rgba(20, 25, 31, 0.99)
        );
    border: 1px solid rgba(255, 217, 142, 0.42);
    border-radius: 17px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

.achievement-unlock-label {
    color: #f6c96d;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.achievement-unlock-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    margin: 14px 0 11px;
    background: rgba(255, 214, 133, 0.1);
    border: 1px solid rgba(255, 214, 133, 0.2);
    border-radius: 50%;
    font-size: 42px;
}

.achievement-unlock-card strong {
    color: #fff;
    font-size: 21px;
}

.achievement-unlock-card p {
    margin: 8px 0 17px;
    color: var(--ui-subtext);
    font-size: 13px;
    line-height: 1.55;
}

.achievement-unlock-card button {
    min-width: 135px;
    min-height: 40px;
    color: #fff8e8;
    background:
        linear-gradient(
            145deg,
            rgba(190, 128, 41, 0.95),
            rgba(121, 77, 24, 0.98)
        );
    border: 1px solid rgba(255, 218, 151, 0.42);
    border-radius: 9px;
    cursor: pointer;
    font-weight: 900;
}

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

    .achievement-summary {
        grid-template-columns: 1fr;
    }

    .inventory-item-grid {
        grid-template-columns: 1fr;
    }
}


/* 보유품·업적 이미지 및 스크롤 보정 */
#modal-content.inventory-modal,
#modal-content.achievement-modal {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 70px);
}

#modal-content.inventory-modal #modal-title,
#modal-content.achievement-modal #modal-title {
    flex: 0 0 auto;
}

#modal-content.inventory-modal #modal-body,
#modal-content.achievement-modal #modal-body {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    padding-bottom: 28px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.inventory-item-icon,
.achievement-card-icon,
.achievement-unlock-icon {
    position: relative;
    overflow: hidden;
}

.inventory-item-icon img,
.achievement-card-icon img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 3px;
    object-fit: contain;
}

.inventory-item-fallback,
.achievement-card-fallback,
.achievement-unlock-fallback {
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.inventory-item-lock-badge,
.achievement-card-lock-badge {
    position: absolute;
    right: 2px;
    bottom: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: rgba(8, 13, 20, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    font-size: 10px;
    line-height: 1;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
}

.inventory-item-card.inventory-item-locked,
.achievement-card.is-locked {
    opacity: 0.7;
}

.inventory-item-card.inventory-item-locked .inventory-item-icon img,
.achievement-card.is-locked .achievement-card-icon img {
    filter: grayscale(1) brightness(0.62);
}

.achievement-unlock-icon img {
    display: block;
    width: 72px;
    height: 72px;
    object-fit: contain;
    filter: drop-shadow(0 7px 12px rgba(0, 0, 0, 0.42));
}

@media (max-height: 820px) {
    #modal-content.inventory-modal,
    #modal-content.achievement-modal {
        height: calc(100vh - 36px);
        max-height: calc(100vh - 36px);
        padding-top: 26px;
        padding-bottom: 24px;
    }

    #modal-content.inventory-modal #modal-title,
    #modal-content.achievement-modal #modal-title {
        margin-bottom: 14px;
        padding-bottom: 12px;
    }
}

.steam-shop-item-icon {
    position: relative;
    overflow: hidden;
}

.steam-shop-item-icon img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 5px;
    object-fit: contain;
    filter: drop-shadow(0 5px 9px rgba(0, 0, 0, 0.38));
}

.steam-shop-item-fallback {
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}


/* 고유 기억·추억 앨범 */
#modal-content.memory-album-modal {
    display: flex;
    flex-direction: column;
    width: min(1280px, calc(100vw - 70px));
    height: min(900px, calc(100vh - 70px));
    max-height: calc(100vh - 70px);
}

#modal-content.memory-album-modal #modal-title {
    flex: 0 0 auto;
}

#modal-content.memory-album-modal #modal-body {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    padding-bottom: 28px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.memory-album-screen,
.memory-category-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.memory-album-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    gap: 16px;
    padding: 18px 20px;
    background:
        linear-gradient(
            145deg,
            rgba(102, 158, 224, 0.18),
            rgba(48, 28, 66, 0.56)
        );
    border: 1px solid rgba(150, 199, 255, 0.25);
    border-radius: 14px;
}

.memory-album-summary > div:first-child {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.memory-album-summary > div:first-child > span,
.memory-detail-copy > span {
    color: #9ed0ff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.13em;
}

.memory-album-summary > div:first-child > strong {
    color: #fff;
    font-size: 21px;
}

.memory-album-summary > div:first-child > p,
.memory-category-header p {
    margin: 0;
    color: var(--ui-subtext);
    font-size: 13px;
    line-height: 1.5;
}

.memory-album-count {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: rgba(230, 241, 250, 0.72);
    background: rgba(4, 12, 23, 0.34);
    border: 1px solid rgba(153, 202, 255, 0.17);
    border-radius: 12px;
}

.memory-album-count strong {
    color: #fff;
    font-size: 30px;
}

.memory-category {
    padding: 14px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(158, 198, 226, 0.14);
    border-radius: 14px;
}

.memory-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.memory-category-header > div {
    display: flex;
    align-items: center;
    gap: 11px;
}

.memory-category-header > div > span {
    font-size: 24px;
}

.memory-category-header strong {
    color: #f7fbff;
    font-size: 16px;
}

.memory-category-header em {
    padding: 4px 9px;
    color: #f5d88f;
    background: rgba(137, 97, 30, 0.27);
    border-radius: 999px;
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
}

.memory-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.memory-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 9px 12px;
    min-height: 118px;
    padding: 10px;
    color: inherit;
    text-align: left;
    background: rgba(11, 20, 31, 0.72);
    border: 1px solid rgba(157, 200, 226, 0.17);
    border-left: 3px solid rgba(107, 181, 246, 0.62);
    border-radius: 11px;
}

.memory-card.is-unlocked {
    cursor: pointer;
}

.memory-card.is-unlocked:hover {
    background: rgba(30, 52, 74, 0.78);
    border-color: rgba(127, 196, 255, 0.43);
    transform: translateY(-1px);
}

.memory-card.is-locked {
    cursor: default;
    opacity: 0.62;
}

.memory-card-visual {
    position: relative;
    grid-row: 1 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 94px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
}

.memory-card-visual img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.memory-card-fallback,
.memory-unlock-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 28px;
}

.memory-card-copy {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.memory-card-copy strong {
    color: #f4f9fd;
    font-size: 14px;
}

.memory-card-copy small {
    color: var(--ui-subtext);
    font-size: 11px;
    line-height: 1.4;
}

.memory-card > em {
    align-self: end;
    color: #9fd3ff;
    font-size: 10px;
    font-style: normal;
    font-weight: 900;
}

.memory-card.is-locked > em {
    color: rgba(216, 225, 232, 0.46);
}

.memory-detail {
    display: grid;
    grid-template-columns: minmax(360px, 1.2fr) minmax(300px, 0.8fr);
    gap: 24px;
    min-height: 0;
}

.memory-detail-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 430px;
    overflow: hidden;
    background: rgba(6, 13, 22, 0.72);
    border: 1px solid rgba(143, 199, 237, 0.22);
    border-radius: 16px;
}

.memory-detail-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.memory-detail-image span {
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 72px;
}

.memory-detail-copy {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 8px 2px;
}

.memory-detail-copy h3 {
    margin: 0;
    color: #fff;
    font-size: 27px;
}

.memory-detail-description {
    margin: 0;
    color: var(--ui-subtext);
    font-size: 14px;
    line-height: 1.55;
}

.memory-detail-record {
    margin-top: 8px;
    padding: 18px;
    background: rgba(244, 225, 185, 0.08);
    border: 1px solid rgba(244, 225, 185, 0.17);
    border-radius: 13px;
}

.memory-detail-record strong {
    color: #f2d49a;
    font-size: 13px;
}

.memory-detail-record p {
    margin: 9px 0 0;
    color: #eef5f9;
    font-size: 15px;
    line-height: 1.8;
}

.memory-detail-copy > button {
    min-height: 42px;
    margin-top: auto;
    color: #edf8ff;
    background: rgba(79, 137, 191, 0.25);
    border: 1px solid rgba(135, 199, 255, 0.36);
    border-radius: 9px;
    cursor: pointer;
    font-weight: 900;
}

.unique-memory-unlock-card .inventory-unlock-visual {
    width: 150px;
    height: 96px;
    overflow: hidden;
    border-radius: 12px;
}

.unique-memory-unlock-card .inventory-unlock-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 1040px) {
    .memory-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .memory-detail {
        grid-template-columns: 1fr;
    }

    .memory-detail-image {
        min-height: 320px;
    }
}

@media (max-width: 680px) {
    .memory-album-summary,
    .memory-card-grid {
        grid-template-columns: 1fr;
    }

    .memory-album-count {
        min-height: 64px;
    }

    .memory-card {
        grid-template-columns: 92px minmax(0, 1fr);
    }
}

@media (max-height: 820px) {
    #modal-content.memory-album-modal {
        height: calc(100vh - 36px);
        max-height: calc(100vh - 36px);
        padding-top: 26px;
        padding-bottom: 24px;
    }

    #modal-content.memory-album-modal #modal-title {
        margin-bottom: 14px;
        padding-bottom: 12px;
    }
}

/* 엔딩 회상 사진 */
#modal-content.ending-memory-modal {
    width: min(980px, calc(100vw - 70px));
    max-height: calc(100vh - 46px);
    padding: 24px 28px 28px;
}

#modal-content.ending-memory-modal .modal-x-btn {
    display: none;
}

#modal-content.ending-memory-modal #modal-title {
    margin: 0 0 14px;
    padding: 0 0 12px;
    text-align: center;
    font-size: 24px;
}

#modal-content.ending-memory-modal #modal-body {
    max-height: none;
    padding: 0;
    overflow: hidden;
}

.ending-memory-popup-card {
    display: flex;
    width: 100%;
    padding: 0;
    flex-direction: column;
    align-items: stretch;
    color: #eef7fb;
    background: transparent;
    border: 0;
    cursor: pointer;
    text-align: left;
}

.ending-memory-popup-card img {
    display: block;
    width: 100%;
    max-height: 58vh;
    object-fit: contain;
    background: rgba(5, 12, 19, 0.72);
    border: 1px solid rgba(143, 199, 237, 0.24);
    border-radius: 14px;
}

.ending-memory-popup-name {
    margin-top: 13px;
    color: #f2d49a;
    font-size: 14px;
    font-weight: 900;
}

.ending-memory-popup-card strong {
    margin-top: 5px;
    color: #ffb6cf;
    font-size: 17px;
}

.ending-memory-popup-card p {
    margin: 6px 0 0;
    font-size: 16px;
    line-height: 1.65;
}

.ending-memory-popup-card small {
    margin-top: 10px;
    color: rgba(217, 235, 246, 0.68);
    text-align: right;
}

/* ==========================================================================
   능력치 변화 알림
   ========================================================================== */

.stat-change-toast-layer {
    position: absolute;
    top: 102px;
    right: 34px;
    z-index: 95;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    width: 340px;
    max-height: 520px;
    overflow: hidden;
    pointer-events: none;
}

.stat-change-toast {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    width: min(100%, 320px);
    min-height: 68px;
    padding: 11px 16px 11px 12px;
    color: #eff8ff;
    background:
        linear-gradient(
            145deg,
            rgba(18, 36, 53, 0.97),
            rgba(8, 20, 33, 0.97)
        );
    border: 1px solid rgba(124, 191, 226, 0.52);
    border-left: 4px solid #6fc7ef;
    border-radius: 13px;
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    opacity: 0;
    transform: translateX(42px) scale(0.98);
    transition:
        opacity 0.22s ease,
        transform 0.22s ease;
}

.stat-change-toast.is-visible {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.stat-change-toast.is-leaving {
    opacity: 0;
    transform: translateX(34px) scale(0.98);
}

.stat-change-toast-love {
    border-color: rgba(255, 137, 188, 0.46);
}

.stat-change-toast-anger {
    border-color: rgba(240, 112, 123, 0.48);
}

.stat-change-toast-growth {
    border-color: rgba(111, 199, 239, 0.48);
}

.stat-change-toast-stamina {
    border-color: rgba(242, 201, 101, 0.48);
}

.stat-change-toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 25px;
}

.stat-change-toast-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.stat-change-toast-copy small {
    color: rgba(224, 239, 248, 0.72);
    font-size: 13px;
    font-weight: 800;
}

.stat-change-toast-copy strong {
    color: #fff;
    font-size: 18px;
    line-height: 1.28;
    overflow-wrap: anywhere;
}

.stat-change-toast.is-positive {
    border-left-color: #75d8ad;
}

.stat-change-toast.is-negative {
    border-left-color: #f08088;
}

#game-container.ui-hidden .stat-change-toast-layer {
    opacity: 0;
}

/* ========================================================================== 
   진엔딩 — 마지막 24시간 전용 연출
   ========================================================================== */

#game-container.true-ending-mode #choice-container:not(.steam-shop-choice-container) {
    top: 50%;
    left: 50%;
    right: auto;
    width: min(680px, calc(100% - 64px));
    grid-template-columns: 1fr;
    transform: translate(-50%, -50%);
}

#game-container.true-ending-mode #choice-container:not(.steam-shop-choice-container) .scenario-choice-btn {
    min-height: 134px;
    padding: 24px 36px;
    border-radius: 24px;
    font-size: 28px;
}

#true-ending-countdown {
    position: absolute;
    top: 34px;
    left: 38px;
    z-index: 24;
    min-width: 330px;
    padding: 15px 24px;
    color: #fff3dc;
    background:
        linear-gradient(
            135deg,
            rgba(34, 31, 42, 0.92),
            rgba(16, 24, 36, 0.94)
        );
    border: 1px solid rgba(255, 220, 169, 0.58);
    border-radius: 16px;
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.11);
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px);
    transition:
        opacity 0.32s ease,
        transform 0.32s ease;
}

#true-ending-countdown.is-visible {
    opacity: 1;
    transform: translateY(0);
}

#true-ending-memory-photo {
    position: absolute;
    inset: 0;
    z-index: 18;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px 285px;
    background: rgba(4, 8, 16, 0.52);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.42s ease;
}

#true-ending-memory-photo.is-visible {
    opacity: 1;
}

.true-ending-memory-photo-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 66%;
    height: 66%;
    padding: 12px;
    background: rgba(248, 247, 241, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 9px;
    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.52),
        0 0 0 1px rgba(32, 39, 55, 0.18);
    transform: scale(0.975);
    transition: transform 0.42s ease;
}

#true-ending-memory-photo.is-visible .true-ending-memory-photo-frame {
    transform: scale(1);
}

.true-ending-memory-photo-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #111822;
}

#startup-logo-overlay,
#ending-credits-overlay,
#true-ending-credits-overlay {
    position: absolute;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    opacity: 0;
    cursor: pointer;
    transition: opacity 1.05s ease;
}

#startup-logo-overlay.is-visible,
#ending-credits-overlay.is-visible,
#true-ending-credits-overlay.is-visible {
    opacity: 1;
}

#startup-logo-overlay.is-leaving,
#ending-credits-overlay.is-leaving,
#true-ending-credits-overlay.is-leaving {
    opacity: 0;
    pointer-events: none;
}

#startup-logo-overlay img,
#ending-credits-overlay img,
#true-ending-credits-overlay img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ending-credits-developer-line {
    position: absolute;
    left: 50%;
    bottom: 104px;
    transform: translateX(-50%);
    padding: 12px 34px;
    min-width: 420px;
    color: #fffdf7;
    text-align: center;
    font-size: 38px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-shadow:
        0 2px 10px rgba(58, 27, 49, 0.42),
        0 0 18px rgba(255, 255, 255, 0.34);
    background: linear-gradient(
        180deg,
        rgba(111, 57, 83, 0.14),
        rgba(68, 31, 58, 0.18)
    );
    border: 1px solid rgba(255, 247, 236, 0.46);
    border-radius: 999px;
    box-shadow:
        0 14px 24px rgba(90, 44, 70, 0.2),
        inset 0 0 0 1px rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
}

#true-ending-blackout-overlay {
    position: absolute;
    inset: 0;
    z-index: 28;
    background: #000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1.2s ease;
}

#true-ending-blackout-overlay.is-visible {
    opacity: 1;
}


/* NEW GAME+ ending achievement bonus selection */
#modal-content.new-game-plus-modal {
    width: min(920px, calc(100vw - 48px));
    max-height: min(860px, calc(100vh - 48px));
}

#modal-content.new-game-plus-modal #modal-body {
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    padding-right: 8px;
}

.ngplus-bonus-screen {
    display: grid;
    gap: 18px;
}

.ngplus-bonus-header {
    display: grid;
    gap: 6px;
}

.ngplus-bonus-header strong {
    font-size: 1.18rem;
}

.ngplus-bonus-header p,
.ngplus-bonus-empty {
    margin: 0;
    line-height: 1.65;
    color: rgba(77, 56, 43, 0.78);
}

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

.ngplus-bonus-card {
    position: relative;
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 92px;
    padding: 14px 16px;
    border: 2px solid rgba(151, 111, 75, 0.2);
    border-radius: 16px;
    background: rgba(255, 251, 242, 0.94);
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.ngplus-bonus-card:hover {
    transform: translateY(-2px);
    border-color: rgba(226, 134, 160, 0.62);
    box-shadow: 0 8px 20px rgba(90, 55, 35, 0.12);
}

.ngplus-bonus-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ngplus-bonus-check {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(130, 95, 70, 0.38);
    border-radius: 7px;
    background: #fff;
}

.ngplus-bonus-card input:checked + .ngplus-bonus-check {
    border-color: #e0789b;
    background: #e0789b;
    box-shadow: inset 0 0 0 5px #fff;
}

.ngplus-bonus-card:has(input:checked) {
    border-color: rgba(224, 120, 155, 0.78);
    background: rgba(255, 241, 247, 0.98);
}

.ngplus-bonus-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    overflow: hidden;
    border-radius: 14px;
    background: rgba(255, 224, 180, 0.52);
    font-size: 1.55rem;
}

.ngplus-bonus-icon img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 3px;
    object-fit: contain;
}

.ngplus-bonus-fallback {
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.ngplus-bonus-copy {
    display: grid;
    gap: 5px;
}

.ngplus-bonus-copy strong {
    font-size: 1rem;
}

.ngplus-bonus-copy small {
    line-height: 1.45;
    color: rgba(102, 69, 52, 0.76);
}

.ngplus-bonus-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 4px;
}

.ngplus-bonus-actions button {
    min-width: 130px;
    padding: 11px 18px;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
}

.ngplus-bonus-actions button.primary {
    background: linear-gradient(135deg, #e9789d, #d96089);
    color: #fff;
    font-weight: 700;
}

@media (max-width: 720px) {
    .ngplus-bonus-grid {
        grid-template-columns: 1fr;
    }

    .ngplus-bonus-actions {
        flex-direction: column;
    }

    .ngplus-bonus-actions button {
        width: 100%;
    }
}

/* 2026-08 UI polish: unique-memory popup alignment and NEW GAME+ readability */
.unique-memory-unlock-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.unique-memory-unlock-card .inventory-unlock-visual {
    flex: 0 0 auto;
    align-self: center;
    margin: 4px auto 10px;
}

.unique-memory-unlock-card .inventory-unlock-visual img,
.unique-memory-unlock-card .memory-unlock-fallback {
    display: flex;
    margin: 0 auto;
}

#modal-content.new-game-plus-modal {
    color: #eef6fc;
    background:
        radial-gradient(circle at 82% 3%, rgba(232, 120, 157, 0.14), transparent 34%),
        radial-gradient(circle at 8% 100%, rgba(103, 183, 255, 0.13), transparent 36%),
        linear-gradient(145deg, rgba(25, 38, 55, 0.99), rgba(9, 17, 29, 0.995));
    border-color: rgba(126, 190, 235, 0.48);
}

#modal-content.new-game-plus-modal #modal-title {
    color: #f8fbff;
    border-bottom-color: rgba(151, 202, 238, 0.24);
}

#modal-content.new-game-plus-modal #modal-body {
    color: #eef6fc;
}

.ngplus-bonus-header {
    padding: 2px 2px 14px;
    border-bottom: 1px solid rgba(155, 201, 232, 0.16);
}

.ngplus-bonus-header strong {
    color: #ffffff;
    font-size: 1.18rem;
    font-weight: 900;
}

.ngplus-bonus-header p,
.ngplus-bonus-empty {
    color: rgba(222, 235, 245, 0.86);
    font-size: 0.94rem;
    line-height: 1.65;
}

.ngplus-bonus-card {
    grid-template-columns: 26px 58px minmax(0, 1fr);
    min-height: 104px;
    padding: 15px 17px;
    color: #edf6fc;
    background:
        linear-gradient(145deg, rgba(31, 46, 64, 0.98), rgba(17, 29, 43, 0.98));
    border: 1px solid rgba(137, 187, 221, 0.3);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.045),
        0 9px 24px rgba(0, 0, 0, 0.2);
}

.ngplus-bonus-card:hover {
    border-color: rgba(247, 184, 211, 0.62);
    background:
        linear-gradient(145deg, rgba(42, 58, 78, 0.99), rgba(22, 35, 51, 0.99));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        0 11px 28px rgba(0, 0, 0, 0.3);
}

.ngplus-bonus-check {
    position: relative;
    width: 24px;
    height: 24px;
    background: rgba(8, 17, 28, 0.78);
    border: 2px solid rgba(188, 213, 231, 0.48);
    border-radius: 7px;
    box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.28);
}

.ngplus-bonus-card input:checked + .ngplus-bonus-check {
    border-color: #f08caf;
    background: linear-gradient(145deg, #ed86a9, #cb5f88);
    box-shadow: 0 0 0 3px rgba(238, 126, 165, 0.14);
}

.ngplus-bonus-card input:checked + .ngplus-bonus-check::after {
    content: "✓";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 15px;
    font-weight: 1000;
}

.ngplus-bonus-card:has(input:checked) {
    color: #fff;
    background:
        radial-gradient(circle at 88% 8%, rgba(248, 169, 199, 0.14), transparent 42%),
        linear-gradient(145deg, rgba(69, 43, 67, 0.98), rgba(30, 34, 54, 0.99));
    border-color: rgba(240, 140, 175, 0.86);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 0 2px rgba(240, 140, 175, 0.1),
        0 12px 30px rgba(0, 0, 0, 0.3);
}

.ngplus-bonus-icon {
    width: 58px;
    height: 58px;
    background: rgba(7, 16, 27, 0.6);
    border: 1px solid rgba(237, 203, 137, 0.42);
    border-radius: 15px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 5px 14px rgba(0, 0, 0, 0.28);
}

.ngplus-bonus-icon img {
    padding: 4px;
    object-fit: contain;
}

.ngplus-bonus-copy {
    align-self: center;
    gap: 6px;
    min-width: 0;
}

.ngplus-bonus-copy strong {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 900;
}

.ngplus-bonus-copy small {
    color: rgba(217, 232, 242, 0.84);
    font-size: 0.86rem;
    line-height: 1.48;
}

.ngplus-bonus-card:has(input:checked) .ngplus-bonus-copy small {
    color: rgba(255, 232, 241, 0.9);
}

.ngplus-bonus-actions {
    padding-top: 8px;
    border-top: 1px solid rgba(151, 202, 238, 0.14);
}

.ngplus-bonus-actions button {
    color: #eaf3f9;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(183, 215, 235, 0.22);
    font-weight: 800;
}

.ngplus-bonus-actions button:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(204, 227, 241, 0.36);
}

.ngplus-bonus-actions button.primary {
    color: #fff;
    background: linear-gradient(135deg, #ed83a8, #cf5f89);
    border-color: rgba(255, 190, 216, 0.42);
    box-shadow: 0 7px 18px rgba(183, 67, 110, 0.24);
}

.ngplus-bonus-actions button.primary:hover {
    background: linear-gradient(135deg, #f093b4, #d86b94);
}

/* ========================================================================== 
   일반 선택지 UI — 설명 바 제거, 1열 통일
   진엔딩 특수 플레이와 Steam 상점은 기존 전용 스타일을 유지한다.
   ========================================================================== */

#choice-container:not(.steam-shop-choice-container) {
    top: clamp(174px, 22vh, 220px);
    right: clamp(34px, 4.2vw, 72px);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-flow: row;
    gap: 10px;
    width: clamp(390px, 31vw, 520px);
}

/* 이전 성장 메뉴 설명 바가 남은 구버전 저장/캐시에도 보이지 않게 처리 */
#choice-container:not(.steam-shop-choice-container) .growth-menu-title {
    display: none !important;
}

#game-container:not(.true-ending-mode)
#choice-container:not(.steam-shop-choice-container)
.scenario-choice-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 60px;
    box-sizing: border-box;
    padding: 13px 24px;
    overflow: hidden;
    color: #f7fbff;
    background:
        linear-gradient(
            100deg,
            rgba(29, 48, 68, 0.97) 0%,
            rgba(15, 31, 47, 0.97) 55%,
            rgba(12, 25, 39, 0.98) 100%
        );
    border: 1px solid rgba(151, 205, 229, 0.62);
    border-radius: 13px;
    box-shadow:
        0 9px 18px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.10),
        inset 4px 0 0 rgba(244, 157, 190, 0.72);
    font-size: 17px;
    font-weight: 900;
    line-height: 1.35;
    letter-spacing: 0.01em;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.45);
    transition:
        transform 0.16s ease,
        border-color 0.16s ease,
        box-shadow 0.16s ease,
        background 0.16s ease,
        filter 0.16s ease;
}

#game-container:not(.true-ending-mode)
#choice-container:not(.steam-shop-choice-container)
.scenario-choice-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.075),
            transparent 42%
        );
}

#game-container:not(.true-ending-mode)
#choice-container:not(.steam-shop-choice-container)
.scenario-choice-btn:hover:not(:disabled) {
    transform: translateX(-5px);
    color: #ffffff;
    background:
        linear-gradient(
            100deg,
            rgba(46, 75, 100, 0.99) 0%,
            rgba(22, 45, 65, 0.99) 55%,
            rgba(17, 35, 51, 0.99) 100%
        );
    border-color: rgba(255, 193, 216, 0.92);
    box-shadow:
        0 12px 24px rgba(0, 0, 0, 0.34),
        0 0 0 2px rgba(244, 157, 190, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 5px 0 0 rgba(255, 177, 207, 0.96);
}

#game-container:not(.true-ending-mode)
#choice-container:not(.steam-shop-choice-container)
.scenario-choice-btn:active:not(:disabled) {
    transform: translateX(-2px) scale(0.992);
    filter: brightness(0.94);
}

#game-container:not(.true-ending-mode)
#choice-container:not(.steam-shop-choice-container)
.scenario-choice-btn:focus-visible {
    outline: 3px solid rgba(255, 206, 224, 0.88);
    outline-offset: 3px;
}

#game-container:not(.true-ending-mode)
#choice-container:not(.steam-shop-choice-container)
.scenario-choice-btn:disabled {
    color: rgba(202, 216, 225, 0.60);
    background:
        linear-gradient(
            100deg,
            rgba(31, 42, 53, 0.90),
            rgba(20, 29, 39, 0.92)
        );
    border-color: rgba(143, 163, 176, 0.28);
    box-shadow:
        0 5px 12px rgba(0, 0, 0, 0.20),
        inset 4px 0 0 rgba(116, 130, 142, 0.34);
    text-shadow: none;
}

#game-container:not(.true-ending-mode)
#choice-container:not(.steam-shop-choice-container)
.growth-action-btn {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-align: center;
}

#game-container:not(.true-ending-mode)
#choice-container:not(.steam-shop-choice-container)
.growth-action-btn strong {
    color: inherit;
    font-size: 17px;
    font-weight: 900;
}

#game-container:not(.true-ending-mode)
#choice-container:not(.steam-shop-choice-container)
.growth-action-btn small {
    color: #b7d4e2;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.3;
    text-shadow: none;
}

#game-container:not(.true-ending-mode)
#choice-container:not(.steam-shop-choice-container)
.growth-action-btn:disabled small {
    color: #e3a2a7;
}

/* 기존 카테고리별 테두리는 작은 좌측 포인트로만 남긴다. */
#game-container:not(.true-ending-mode)
#choice-container:not(.steam-shop-choice-container)
.training-category-control {
    box-shadow:
        0 9px 18px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.10),
        inset 4px 0 0 rgba(105, 196, 235, 0.88);
}

#game-container:not(.true-ending-mode)
#choice-container:not(.steam-shop-choice-container)
.relation-category-control {
    box-shadow:
        0 9px 18px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.10),
        inset 4px 0 0 rgba(244, 145, 183, 0.90);
}

#game-container:not(.true-ending-mode)
#choice-container:not(.steam-shop-choice-container)
.work-category-control {
    box-shadow:
        0 9px 18px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.10),
        inset 4px 0 0 rgba(255, 197, 102, 0.90);
}

#game-container:not(.true-ending-mode)
#choice-container:not(.steam-shop-choice-container)
.shopping-category-control {
    box-shadow:
        0 9px 18px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.10),
        inset 4px 0 0 rgba(190, 151, 255, 0.90);
}

#game-container:not(.true-ending-mode)
#choice-container:not(.steam-shop-choice-container)
.phase-control,
#game-container:not(.true-ending-mode)
#choice-container:not(.steam-shop-choice-container)
.back-control {
    color: #f6f0df;
    border-color: rgba(232, 194, 126, 0.58);
    box-shadow:
        0 9px 18px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.10),
        inset 4px 0 0 rgba(232, 194, 126, 0.82);
}

@media (max-width: 1050px) {
    #choice-container:not(.steam-shop-choice-container) {
        right: 24px;
        width: min(460px, calc(100% - 48px));
    }
}

@media (max-width: 720px) {
    #choice-container:not(.steam-shop-choice-container) {
        top: auto;
        right: 18px;
        bottom: 28px;
        width: calc(100% - 36px);
        gap: 8px;
    }

    #game-container:not(.true-ending-mode)
    #choice-container:not(.steam-shop-choice-container)
    .scenario-choice-btn {
        min-height: 54px;
        padding: 11px 18px;
        font-size: 16px;
    }
}


/* 상태창 전신 표시 및 적용 효과 아이콘 */
.status-portrait-zone img {
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 2px 6px 0;
    object-fit: contain;
    object-position: center bottom;
}

.status-effects-card {
    position: relative;
    overflow: visible;
    padding-bottom: 20px;
}

.status-effects-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 13px;
}

.status-effects-heading h3 {
    margin: 0;
}

.status-effects-heading span {
    color: rgba(206, 224, 235, 0.72);
    font-size: 12px;
}

.status-effect-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
}

.status-effect-tile {
    position: relative;
    width: 72px;
    height: 72px;
    outline: none;
}

.status-effect-icon {
    position: relative;
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.13), transparent 62%),
        linear-gradient(155deg, rgba(43, 61, 79, 0.98), rgba(16, 27, 39, 0.98));
    border: 1px solid rgba(143, 199, 231, 0.28);
    border-radius: 13px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 7px 16px rgba(0, 0, 0, 0.24);
    transition:
        transform 0.16s ease,
        border-color 0.16s ease,
        box-shadow 0.16s ease;
}

.status-effect-tile:hover .status-effect-icon,
.status-effect-tile:focus-visible .status-effect-icon {
    transform: translateY(-3px);
    border-color: rgba(255, 137, 184, 0.72);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.09),
        0 11px 22px rgba(0, 0, 0, 0.34),
        0 0 0 2px rgba(255, 101, 163, 0.12);
}

.status-effect-item-icon img,
.status-effect-icon > img {
    display: block;
    width: 86%;
    height: 86%;
    object-fit: contain;
    filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.38));
}

.status-effect-item-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 30px;
}

.status-effect-tooltip {
    position: absolute;
    right: auto;
    bottom: auto;
    left: 0;
    top: calc(100% + 10px);
    z-index: 30;
    width: min(270px, 44vw);
    padding: 11px 13px;
    visibility: hidden;
    color: #edf7fc;
    text-align: left;
    pointer-events: none;
    background: rgba(7, 15, 24, 0.98);
    border: 1px solid rgba(255, 145, 188, 0.48);
    border-radius: 10px;
    box-shadow: 0 13px 28px rgba(0, 0, 0, 0.48);
    opacity: 0;
    transform: translateY(-6px);
    transition:
        opacity 0.14s ease,
        transform 0.14s ease,
        visibility 0.14s ease;
}

.status-effect-tooltip::after {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 24px;
    width: 10px;
    height: 10px;
    background: rgba(7, 15, 24, 0.98);
    border-left: 1px solid rgba(255, 145, 188, 0.48);
    border-top: 1px solid rgba(255, 145, 188, 0.48);
    transform: translateY(5px) rotate(45deg);
}

.status-effect-tooltip strong {
    display: block;
    margin-bottom: 5px;
    color: #ffd9e8;
    font-size: 14px;
}

.status-effect-tooltip p {
    margin: 0;
    color: rgba(225, 238, 246, 0.84);
    font-size: 12px;
    line-height: 1.55;
}

.status-effect-tile:hover .status-effect-tooltip,
.status-effect-tile:focus-visible .status-effect-tooltip {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

/* 효과 설명은 오른쪽 정보 영역 안쪽으로 펼쳐져 루리 전신 패널을 가리지 않습니다. */
.status-effect-tile:nth-child(7n),
.status-effect-tile:nth-child(7n - 1) {
    z-index: 31;
}

.status-effect-tile:nth-child(7n) .status-effect-tooltip,
.status-effect-tile:nth-child(7n - 1) .status-effect-tooltip {
    right: 0;
    left: auto;
}

.status-effect-tile:nth-child(7n) .status-effect-tooltip::after,
.status-effect-tile:nth-child(7n - 1) .status-effect-tooltip::after {
    right: 24px;
    left: auto;
}

.status-effect-empty {
    display: grid;
    min-height: 72px;
    margin: 0;
    place-items: center;
    color: rgba(206, 224, 235, 0.65) !important;
    background: rgba(255, 255, 255, 0.035);
    border: 1px dashed rgba(165, 205, 227, 0.18);
    border-radius: 12px;
}

/* 성장 아이템 상점 이미지가 카드 경계에서 잘리지 않도록 전체 이미지 표시 */
.steam-shop-item-icon {
    height: 148px;
    padding: 10px 14px;
    box-sizing: border-box;
}

.steam-shop-item-icon img {
    width: 88%;
    height: 88%;
    padding: 0;
    object-fit: contain;
    object-position: center;
}

@media (max-width: 760px) {
    .status-effects-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .status-effect-tooltip {
        width: min(250px, 72vw);
    }

    .steam-shop-item-icon {
        height: 128px;
    }
}


/* 진엔딩 연출 중 투명 스프라이트 영역의 오입력 방지 */
#game-container.true-ending-mode #character-sprite {
    pointer-events: none;
}

/* ==========================================================================
   상단 시스템 메뉴 접기 / 펼치기
   - 펼침: 메뉴 왼쪽 끝의 > 버튼
   - 접힘: 오른쪽 끝에 < 버튼 하나만 남김
   ========================================================================== */

#system-menu {
    transition:
        padding 0.22s ease,
        border-radius 0.22s ease;
}

#system-menu > button:not(#system-menu-toggle) {
    max-width: 190px;
    overflow: hidden;
    opacity: 1;
    white-space: nowrap;
    transition:
        max-width 0.22s ease,
        padding 0.22s ease,
        opacity 0.14s ease,
        color 0.16s ease,
        background 0.16s ease;
}

#system-menu-toggle {
    flex: 0 0 38px;
    width: 38px;
    min-width: 38px;
    max-width: 38px;
    padding: 0 !important;
    font-size: 22px !important;
    line-height: 1;
    text-align: center;
    user-select: none;
}

#system-menu.is-collapsed {
    padding: 7px;
}

#system-menu.is-collapsed > button:not(#system-menu-toggle) {
    max-width: 0;
    padding-right: 0;
    padding-left: 0;
    opacity: 0;
    pointer-events: none;
}

#system-menu.is-collapsed > button:not(#system-menu-toggle)::before {
    opacity: 0;
}



/* ==========================================================================
   일정 캘린더
   ========================================================================== */

#modal-content.schedule-modal {
    width: min(920px, calc(100vw - 70px));
    max-height: calc(100vh - 60px);
}

#modal-content.schedule-warning-modal {
    width: min(520px, calc(100vw - 70px));
}

.schedule-spoiler-warning {
    display: grid;
    gap: 18px;
    justify-items: center;
    padding: 26px 18px 12px;
    text-align: center;
}

.schedule-spoiler-warning p {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.7;
}

.schedule-screen {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.schedule-intro {
    margin: 0;
    padding: 12px 16px;
    color: rgba(233, 244, 251, 0.92);
    background: rgba(82, 146, 214, 0.14);
    border: 1px solid rgba(165, 210, 255, 0.18);
    border-radius: 12px;
    font-size: 14px;
}

.schedule-period-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.schedule-period {
    min-width: 0;
    padding: 15px;
    background: rgba(13, 27, 43, 0.68);
    border: 1px solid rgba(151, 198, 225, 0.18);
    border-radius: 13px;
}

.schedule-period h3 {
    margin: 0 0 10px;
    color: #f3cf8a;
    font-size: 15px;
}

.schedule-event-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.schedule-event-row {
    display: grid;
    grid-template-columns: 72px 18px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 7px 9px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 9px;
}

.schedule-event-row.is-current {
    background: rgba(107, 173, 214, 0.18);
    border-color: rgba(144, 211, 244, 0.48);
}

.schedule-event-week {
    color: rgba(215, 233, 243, 0.78);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.schedule-event-mark {
    text-align: center;
    font-size: 13px;
}

.schedule-event-mark-memory {
    color: #8ed4ff;
}

.schedule-event-mark-exam {
    color: #f3cf8a;
}

.schedule-event-mark-ending {
    color: #ff9fae;
}

.schedule-event-row strong {
    min-width: 0;
    color: #f7fbff;
    font-size: 14px;
    font-weight: 800;
}

@media (max-width: 760px) {
    #modal-content.schedule-modal {
        width: calc(100vw - 28px);
    }

    .schedule-period-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Steam / Electron DPI safeguard
   --------------------------------------------------------------------------
   The game itself is a fixed 1920x1080 canvas that is scaled as one unit by
   resizeGame(). Modal sizes must therefore stay in canvas pixels. Using vw/vh
   here causes Chromium/Windows DPI to shrink the modal once through viewport
   units and a second time through the game-container transform.
   ========================================================================== */

#modal-content.status-wide {
    width: 1420px !important;
    height: 900px !important;
    max-height: 900px !important;
}

#modal-content.wardrobe-modal {
    width: 1440px !important;
    height: 900px !important;
    max-height: 900px !important;
}

#modal-content.inventory-modal {
    width: 1340px !important;
    height: 900px !important;
    max-height: 900px !important;
}

#modal-content.dialogue-log-modal {
    width: 1080px !important;
    height: 820px !important;
    max-height: 820px !important;
}

#modal-content.game-menu-modal {
    width: 1050px !important;
    max-height: 900px !important;
}

#modal-content.help-modal {
    width: 980px !important;
    max-height: 900px !important;
}

#modal-content.save-load-modal {
    width: 1260px !important;
    height: 900px !important;
    max-height: 900px !important;
}

#modal-content.settings-modal {
    width: 1100px !important;
    max-height: 900px !important;
}

#modal-content.gallery-modal {
    width: 1400px !important;
    height: 900px !important;
    max-height: 900px !important;
}

#modal-content.achievement-modal {
    width: 1280px !important;
    height: 900px !important;
    max-height: 900px !important;
}

#modal-content.memory-album-modal {
    width: 1280px !important;
    height: 900px !important;
    max-height: 900px !important;
}

#modal-content.ending-memory-modal {
    width: 980px !important;
    max-height: 900px !important;
}

#modal-content.new-game-plus-modal {
    width: 920px !important;
    max-height: 860px !important;
}

#modal-content.schedule-modal {
    width: 920px !important;
    max-height: 900px !important;
}

#modal-content.schedule-warning-modal {
    width: 520px !important;
}

/* Keep the desktop layouts used by the fixed 1920x1080 canvas even when
   Electron reports a small CSS viewport because of Windows display scaling. */
.status-modal-layout {
    display: grid !important;
    grid-template-columns: 365px minmax(0, 1fr) !important;
    overflow: visible !important;
}

.wardrobe-layout {
    display: grid !important;
    grid-template-columns: 340px minmax(0, 1fr) !important;
    overflow: visible !important;
}

.wardrobe-grid,
.inventory-item-grid,
.save-slot-grid,
.memory-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.cg-gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.game-menu-grid,
.help-section-grid,
.settings-lower-grid,
.achievement-grid,
.ngplus-bonus-grid,
.schedule-period-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.achievement-summary,
.memory-album-summary {
    grid-template-columns: minmax(0, 1fr) 150px !important;
}

.memory-detail {
    grid-template-columns: minmax(360px, 1.2fr) minmax(300px, 0.8fr) !important;
}

.ngplus-bonus-actions {
    flex-direction: row !important;
}

.ngplus-bonus-actions button {
    width: auto !important;
}

/* Startup logo: hide the empty character layer beneath the splash so the
   translated alt text ("루리", etc.) can never flash through during fades. */
#game-container.startup-splash-active #background-layer,
#game-container.startup-splash-active #character-layer,
#game-container.startup-splash-active #hud-layer,
#game-container.startup-splash-active #system-menu,
#game-container.startup-splash-active #message-window,
#game-container.startup-splash-active #choice-container {
    visibility: hidden !important;
    pointer-events: none !important;
}

#startup-logo-overlay {
    background: #151c24;
}

/* The top system bar also belongs to the fixed desktop canvas. Do not let
   viewport media queries wrap it when Windows DPI reports a narrow CSS width. */
#system-menu {
    right: 32px !important;
    left: auto !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
}

#system-menu button {
    padding-right: 15px !important;
    padding-left: 15px !important;
    font-size: 14px !important;
}

#system-menu-toggle {
    padding: 0 !important;
    font-size: 22px !important;
}

#hud-layer {
    width: 560px !important;
}

/* Native <select> popups are unreliable inside Electron when the fixed game
   canvas is transformed for DPI scaling. Settings use in-canvas buttons. */
#modal-content.settings-modal .settings-language-buttons {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}


/* =============================================================================
   EVE prototype overrides
   Existing Luri visual styling is intentionally retained; only the new home HUD,
   home action shell and popup layouts are added/overridden here.
   ============================================================================= */

.eve-title-logo-fallback {
    display: none;
    align-items: center;
    justify-content: center;
    width: 520px;
    min-height: 230px;
    color: #eef8ff;
    font-size: 112px;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-shadow: 0 12px 32px rgba(0, 0, 0, 0.32);
}

#background-layer {
    background-color: #15212d;
}

#hud-layer {
    top: 28px;
    left: 32px;
    width: auto;
    max-width: 980px;
}

.eve-hud-panel {
    overflow: hidden;
    min-width: 760px;
    color: #edf7fd;
    background: linear-gradient(145deg, rgba(31, 51, 70, 0.95), rgba(14, 27, 41, 0.95));
    border: 1px solid rgba(129, 196, 225, 0.42);
    border-radius: 13px;
    box-shadow: 0 9px 20px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    pointer-events: auto;
}

.eve-hud-primary {
    display: flex;
    align-items: stretch;
    min-height: 50px;
}

.eve-hud-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
    min-height: 50px;
    padding: 0 20px;
    font-size: 17px;
    font-weight: 900;
    white-space: nowrap;
}

.eve-hud-day-time {
    min-width: 180px;
    color: #c9effc;
}

.eve-hud-item + .eve-hud-item {
    border-left: 1px solid rgba(129, 196, 225, 0.28);
}

.eve-hud-master-row {
    min-height: 43px;
    padding: 10px 22px;
    color: #ffe0b3;
    border-top: 1px solid rgba(129, 196, 225, 0.28);
    font-size: 17px;
    font-weight: 900;
}

.eve-hud-relationship-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 43px;
    border-top: 1px solid rgba(129, 196, 225, 0.28);
    font-size: 17px;
    font-weight: 900;
}

.eve-hud-relationship-row > span {
    padding: 10px 22px;
}

.eve-hud-relationship-row > span + span {
    border-left: 1px solid rgba(129, 196, 225, 0.28);
}

#hud-bond {
    color: #d7efff;
}

#hud-affection {
    color: #ffd5e2;
}

#home-location-label {
    position: absolute;
    top: 180px;
    left: 32px;
    z-index: 11;
    padding: 10px 20px;
    color: #eaf6fb;
    background: rgba(14, 26, 39, 0.82);
    border: 1px solid rgba(131, 185, 210, 0.34);
    border-radius: 11px;
    box-shadow: var(--shadow);
    font-size: 16px;
    font-weight: 900;
}

#choice-container.eve-home-actions {
    top: 300px !important;
    right: 54px !important;
    bottom: auto !important;
    display: flex !important;
    flex-direction: column !important;
    width: 310px !important;
    gap: 12px !important;
    pointer-events: auto !important;
}

#choice-container.eve-home-actions .scenario-choice-btn {
    width: 100%;
    min-height: 66px;
    padding: 12px 24px;
    font-size: 18px;
}

#choice-container.eve-home-dialogue-running {
    display: none !important;
}

#choice-container.eve-exploration-panel {
    top: 260px !important;
    right: 54px !important;
    bottom: auto !important;
    display: block !important;
    width: 380px !important;
    pointer-events: auto !important;
}

.eve-exploration-card {
    padding: 24px;
    color: #eaf5fb;
    background: linear-gradient(145deg, rgba(20, 35, 51, 0.96), rgba(8, 17, 28, 0.96));
    border: 1px solid rgba(105, 191, 230, 0.56);
    border-radius: 18px;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
}

.eve-exploration-time {
    margin-bottom: 14px;
    color: #f4fbff;
    font-size: 18px;
    font-weight: 900;
}

.eve-exploration-stats {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
    padding: 14px 16px;
    color: #c7dce7;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(129, 196, 225, 0.18);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 800;
}

.eve-exploration-note,
.eve-exploration-result {
    margin-bottom: 14px;
    color: #bdd4df;
    font-size: 14px;
    line-height: 1.55;
}

.eve-exploration-result {
    color: #ffe1a7;
    font-weight: 900;
}

.eve-exploration-card .scenario-choice-btn {
    width: 100%;
    min-height: 62px;
    margin-top: 10px;
    font-size: 17px;
}

.eve-exploration-return-btn {
    border-color: rgba(255, 209, 150, 0.56) !important;
}

.eve-modal-intro {
    margin: 0 0 22px;
    color: #bdd4df;
}

.eve-popup-list,
.eve-save-list {
    display: grid;
    gap: 12px;
}

.eve-popup-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 22px;
    background: rgba(61, 116, 151, 0.16);
    border: 1px solid rgba(117, 194, 229, 0.28);
    border-radius: 13px;
}

.eve-popup-card strong {
    font-size: 19px;
}

.eve-popup-card p {
    margin: 7px 0 0;
    color: #bdd4df;
}

.eve-popup-card button,
.eve-save-slot,
.eve-system-grid button {
    min-height: 48px;
    padding: 10px 18px;
    color: #eaf6fb;
    background: rgba(61, 116, 151, 0.26);
    border: 1px solid rgba(117, 194, 229, 0.38);
    border-radius: 10px;
    cursor: pointer;
    font-weight: 800;
}

.eve-popup-card button:disabled {
    cursor: default;
    opacity: 0.55;
}

.eve-status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.eve-status-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 22px;
    background: rgba(61, 116, 151, 0.16);
    border: 1px solid rgba(117, 194, 229, 0.28);
    border-radius: 13px;
}

.eve-status-box span {
    color: #bdd4df;
}

.eve-status-box strong {
    font-size: 27px;
}

.eve-empty-state {
    padding: 32px;
    color: #bdd4df;
    background: rgba(5, 15, 24, 0.32);
    border: 1px dashed rgba(117, 194, 229, 0.28);
    border-radius: 13px;
    text-align: center;
}

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

.eve-save-slot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
    text-align: left;
}

.eve-save-slot span {
    color: #bdd4df;
    font-size: 14px;
}

.eve-settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 22px;
    margin-bottom: 18px;
    background: rgba(61, 116, 151, 0.16);
    border: 1px solid rgba(117, 194, 229, 0.28);
    border-radius: 13px;
}

@media (max-width: 900px) {
    .eve-status-grid,
    .eve-system-grid {
        grid-template-columns: 1fr;
    }
}

/* EVE v0.2 shared-system fixes */
#hud-layer {
    width: auto !important;
}

#character-sprite {
    cursor: default !important;
}

#system-menu.is-collapsed > button:not(#system-menu-toggle) {
    display: none !important;
}

#modal-content.settings-modal .settings-language-buttons.eve-language-single {
    grid-template-columns: 1fr !important;
}

.eve-save-slot:disabled {
    cursor: default;
    opacity: 0.48;
}

#ui-restore-layer {
    cursor: pointer;
}
