/* ============================================================
   LifePath — Game screen layout
============================================================ */

.game {
    display: flex;
    flex-direction: column;
    z-index: 1;
}

/* ----------- Game head — full-width glass HUD card ----------- */
.game-head {
    position: relative;
    margin: 18px 20px 0;
    padding: 16px 22px 16px;
    border-radius: var(--r-lg);
    /* accent glow along the top edge */
    border-top-color: rgba(122, 167, 255, 0.32) !important;
    z-index: 5;
    overflow: visible;
}

.game-head::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(122, 167, 255, 0.7) 35%,
        rgba(179, 149, 255, 0.6) 65%,
        transparent);
    border-radius: 999px;
    pointer-events: none;
}

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

.hud-left {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.hud-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.hud-menu-btn {
    flex-shrink: 0;
    color: var(--fg-3);
    transition: color 0.18s;
}
.hud-menu-btn:hover { color: var(--fg); }

.hud-id {
    min-width: 0;
    flex: 1;
    padding-top: 2px;
}

.avatar {
    width: 66px;
    height: 66px;
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04)),
        linear-gradient(160deg, var(--accent-3), var(--accent-2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: #07091a;
    flex-shrink: 0;
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.3) inset,
        0 0 0 3px rgba(122, 167, 255, 0.14),
        0 12px 28px -6px rgba(122, 167, 255, 0.5);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}

.hud-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 19px;
    letter-spacing: -0.025em;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ----------- Info chips row ----------- */
.hud-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
}

.hud-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--fg-3);
    white-space: nowrap;
    line-height: 1.6;
    transition: background 0.18s, border-color 0.18s;
}

.hud-chip.stage {
    color: var(--accent);
    background: rgba(122, 167, 255, 0.1);
    border-color: rgba(122, 167, 255, 0.22);
}

.hud-chip.married {
    color: var(--warn);
    background: rgba(255, 210, 94, 0.1);
    border-color: rgba(255, 210, 94, 0.22);
}

.hud-chip.wanted {
    color: var(--bad);
    background: rgba(255, 107, 138, 0.1);
    border-color: rgba(255, 107, 138, 0.22);
}

.hud-chip.fame {
    color: #f0c14b;
    background: rgba(240, 193, 75, 0.1);
    border-color: rgba(240, 193, 75, 0.22);
}

.hud-chip.royalty {
    color: #c4a8ff;
    background: rgba(196, 168, 255, 0.1);
    border-color: rgba(196, 168, 255, 0.22);
}

button.hud-chip {
    font: inherit;
    cursor: pointer;
    padding: 3px 10px;
}
button.hud-chip:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
}

.hud-chip--sport {
    color: var(--good);
    background: rgba(108, 229, 166, 0.1);
    border-color: rgba(108, 229, 166, 0.28);
}
.hud-chip--sport:hover {
    background: rgba(108, 229, 166, 0.16);
    border-color: rgba(108, 229, 166, 0.4);
}
.hud-chip--cta {
    color: var(--accent);
    background: rgba(122, 167, 255, 0.1);
    border-color: rgba(122, 167, 255, 0.28);
    animation: hud-sport-pulse 2.5s ease-in-out infinite;
}
@keyframes hud-sport-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(122, 167, 255, 0); }
    50% { box-shadow: 0 0 0 3px rgba(122, 167, 255, 0.12); }
}

.hud-job {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--fg-2);
    font-weight: 600;
    margin-top: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* ----------- Age hero counter ----------- */
.hud-age-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    gap: 3px;
}

.hud-age-num {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 36px;
    letter-spacing: -0.045em;
    line-height: 1;
    background: linear-gradient(160deg, #ffffff 30%, rgba(122, 167, 255, 0.75) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    transition: opacity 0.15s;
}

.hud-age-lbl {
    font-size: 8.5px;
    font-weight: 700;
    color: var(--fg-4);
    text-transform: uppercase;
    letter-spacing: 0.13em;
}

/* Vertical separator */
.hud-vsep {
    width: 1px;
    height: 44px;
    background: rgba(255, 255, 255, 0.09);
    flex-shrink: 0;
    border-radius: 999px;
}

.hud-wallet.wallet {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.15;
    padding: 0;
    border-radius: 0;
    background: none;
    border: none;
}

.wallet-label {
    font-size: 8.5px;
    color: var(--fg-4);
    text-transform: uppercase;
    letter-spacing: 0.13em;
    font-weight: 700;
}

.wallet-value {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 19px;
    color: var(--good);
    letter-spacing: -0.025em;
    transition: color 0.18s;
}

.wallet-value.negative { color: var(--bad); }

/* ----------- Stats floating panel (bottom-right) ----------- */
.stats-float {
    position: absolute;
    bottom: 162px;
    right: 22px;
    z-index: 8;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    pointer-events: none;
}

.stats-handle {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(8, 12, 22, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    pointer-events: auto;
    opacity: 1;
    transform: scale(1);
    transition:
        opacity 0.22s var(--ease-smooth),
        transform 0.22s var(--ease-smooth);
}

.stats-float.is-open .stats-handle {
    opacity: 0;
    transform: scale(0.85);
    pointer-events: none;
}

.sh-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.sh-dot.happy  { background: #ffd25e; box-shadow: 0 0 5px rgba(255, 210, 94,  0.6); }
.sh-dot.health { background: #ff7aa5; box-shadow: 0 0 5px rgba(255, 122, 165, 0.6); }
.sh-dot.smart  { background: #5dd9ff; box-shadow: 0 0 5px rgba(93,  217, 255, 0.6); }
.sh-dot.looks  { background: #b395ff; box-shadow: 0 0 5px rgba(179, 149, 255, 0.6); }

.stats-panel {
    opacity: 0;
    filter: blur(12px);
    transform: translateY(12px) scale(0.94);
    pointer-events: none;
    transition:
        opacity 0.36s var(--ease-smooth),
        filter 0.36s var(--ease-smooth),
        transform 0.36s var(--ease-smooth);
    border-radius: var(--r-lg);
    padding: 16px 18px 14px;
    min-width: 220px;
}

.stats-float.is-open .stats-panel {
    opacity: 1;
    filter: blur(0px);
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.stats-panel-title {
    font-family: var(--font-display);
    font-size: 9.5px;
    font-weight: 700;
    color: var(--fg-4);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: 10px;
}

/* ----------- Stats strip (inside floating panel — vertical layout) ----------- */
.stats-strip {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    box-sizing: border-box;
}

.stat-pill {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 9px;
    padding: 6px 6px;
    border-radius: var(--r-sm);
    transition: background 0.18s;
}

.stat-pill:hover { background: rgba(255, 255, 255, 0.05); }

.stat-emoji {
    font-size: 15px;
    line-height: 1;
    flex-shrink: 0;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.15));
}

.stat-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--fg-2);
    flex: 0 0 44px;
    line-height: 1;
}

.stat-track {
    flex: 1;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    position: relative;
}

.stat-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--v, 50%);
    border-radius: inherit;
    transition: width 0.55s var(--ease-smooth), background 0.35s var(--ease-smooth);
    background: linear-gradient(90deg, var(--c1, var(--accent)), var(--c2, var(--accent-2)));
}

.stat-value {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 13px;
    line-height: 1;
    flex: 0 0 24px;
    text-align: right;
}

.stat-pill.happy  { --c1: #ffd25e; --c2: #ffb673; }
.stat-pill.health { --c1: #ff7aa5; --c2: #ff6b8a; }
.stat-pill.smart  { --c1: #5dd9ff; --c2: #7aa7ff; }
.stat-pill.looks  { --c1: #b395ff; --c2: #d8b4ff; }

.stat-pill.happy  .stat-value { color: var(--stat-happy);  }
.stat-pill.health .stat-value { color: var(--stat-health); }
.stat-pill.smart  .stat-value { color: var(--stat-smart);  }
.stat-pill.looks  .stat-value { color: var(--stat-looks);  }

/* ----------- Timeline ----------- */
.timeline-wrap {
    flex: 1;
    margin: 12px 20px 0;
    position: relative;
    overflow: hidden;
    border-radius: var(--r-lg);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012)),
        rgba(10, 14, 28, 0.52);
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.06));
    min-height: 0;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 18px 40px -16px rgba(0, 0, 0, 0.55);
}

.timeline-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(180deg, rgba(10, 14, 28, 1) 0%, transparent 100%);
    pointer-events: none;
    z-index: 2;
}

.timeline {
    overflow-y: auto;
    height: 100%;
    padding: 24px 18px 22px;
    scroll-behavior: auto;
    /* Firefox */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.timeline::-webkit-scrollbar {
    width: 4px;
}
.timeline::-webkit-scrollbar-track {
    background: transparent;
}
.timeline::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    transition: background 0.2s;
}
.timeline::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.24);
}

.timeline-entry {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 15px 12px 12px;
    margin-bottom: 6px;
    border-radius: var(--r-md);
    background: rgba(255, 255, 255, 0.028);
    border: 1px solid rgba(255, 255, 255, 0.065);
    border-left: 3px solid rgba(122, 167, 255, 0.35);
    opacity: 0;
    transform: translate3d(0, 16px, 0) scale(0.98);
    animation: entryIn 0.48s var(--ease-smooth) forwards;
    transition: background 0.2s var(--ease-smooth), box-shadow 0.2s var(--ease-smooth);
    will-change: transform, opacity;
    content-visibility: auto;
    contain-intrinsic-size: auto 68px;
}

.timeline-entry:hover {
    background: rgba(255, 255, 255, 0.048);
    box-shadow: 0 4px 14px -6px rgba(0, 0, 0, 0.3);
}
.timeline-entry:last-child { margin-bottom: 4px; }

@keyframes entryIn {
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

/* Tone variants — left border + background tint */
.timeline-entry.good  { border-left-color: rgba(108, 229, 166, 0.65); background: rgba(108, 229, 166, 0.028); }
.timeline-entry.bad   { border-left-color: rgba(255, 107, 138, 0.65); background: rgba(255, 107, 138, 0.028); }
.timeline-entry.warn  { border-left-color: rgba(255, 210, 94,  0.55); background: rgba(255, 210, 94,  0.022); }
.timeline-entry.birth { border-left-color: rgba(179, 149, 255, 0.7);  background: rgba(179, 149, 255, 0.035); }
.timeline-entry.system { border-left-color: rgba(255, 255, 255, 0.12); }

.timeline-entry.good:hover  { background: rgba(108, 229, 166, 0.055); }
.timeline-entry.bad:hover   { background: rgba(255, 107, 138, 0.055); }
.timeline-entry.warn:hover  { background: rgba(255, 210, 94,  0.045); }
.timeline-entry.birth:hover { background: rgba(179, 149, 255, 0.065); }

/* Icon box */
.entry-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.09);
    font-size: 20px;
    line-height: 1;
}

.timeline-entry.good  .entry-icon-wrap { background: rgba(108, 229, 166, 0.12); border-color: rgba(108, 229, 166, 0.22); }
.timeline-entry.bad   .entry-icon-wrap { background: rgba(255, 107, 138, 0.12); border-color: rgba(255, 107, 138, 0.22); }
.timeline-entry.warn  .entry-icon-wrap { background: rgba(255, 210, 94,  0.11); border-color: rgba(255, 210, 94,  0.22); }
.timeline-entry.birth .entry-icon-wrap { background: rgba(179, 149, 255, 0.14); border-color: rgba(179, 149, 255, 0.26); }

/* Entry body */
.entry-body {
    flex: 1;
    min-width: 0;
    padding-top: 1px;
}

.entry-title {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.32;
    color: var(--fg);
}

.entry-desc {
    font-size: 12.5px;
    color: var(--fg-3);
    line-height: 1.52;
    margin-top: 4px;
}

.entry-effects {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 7px;
}

.effect-chip {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.7;
    border: 1px solid transparent;
}

.effect-chip:not(.positive):not(.negative) {
    color: var(--fg-3);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
}

.effect-chip.positive {
    color: var(--good);
    background: rgba(108, 229, 166, 0.1);
    border-color: rgba(108, 229, 166, 0.28);
}

.effect-chip.negative {
    color: var(--bad);
    background: rgba(255, 107, 138, 0.1);
    border-color: rgba(255, 107, 138, 0.28);
}

/* Age milestone separator */
.timeline-year {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 22px 2px 9px;
    font-family: var(--font-display);
    font-size: 10.5px;
    font-weight: 700;
    color: var(--fg-4);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.timeline-year::before, .timeline-year::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
}

.timeline-year:first-child { margin-top: 4px; }

/* ----------- Dock ----------- */
.dock-wrap {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding: 8px 20px 16px;
    z-index: 5;
    pointer-events: none;
}

.dock {
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 10px 10px;
    border-radius: var(--r-xl);
    max-width: 560px;
    width: 100%;
    position: relative;
    transform: translateZ(0);
}

.dock-nav {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 2px;
}

.dock-btn {
    flex: 1;
    height: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0 6px;
    border-radius: var(--r-md);
    color: var(--fg-3);
    background: transparent;
    transition: background 0.22s var(--ease-smooth), color 0.22s var(--ease-smooth), transform 0.22s var(--ease-smooth);
    min-width: 0;
}

.dock-btn .dock-icon {
    display: inline-flex;
    width: 22px;
    height: 22px;
    transition: transform 0.2s var(--ease-spring);
}
.dock-btn svg { width: 100%; height: 100%; stroke: currentColor; }

.dock-btn:hover .dock-icon { transform: scale(1.12) translateY(-1px); }
.dock-btn:active .dock-icon { transform: scale(0.9); }

.dock-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--fg-4);
    transition: color 0.26s var(--ease-smooth);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.dock-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--fg);
}
.dock-btn:hover .dock-label { color: var(--fg-2); }
.dock-btn:active { transform: scale(0.93); }

.dock-btn.active {
    background: rgba(122, 167, 255, 0.14);
    color: var(--fg);
    box-shadow: inset 0 0 0 1px rgba(122, 167, 255, 0.28);
}
.dock-btn.active .dock-label {
    color: var(--accent);
    font-weight: 800;
}

.dock-btn:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    border-radius: var(--r-md);
}

/* Age Up — horizontal centered pill above the nav row */
/* Animatable angle for the conic gradient — enables true seamless interpolation */
@property --age-a {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

.dock-age {
    flex: none;
    width: min(240px, 70%);
    height: 44px;
    margin: 0;
    border-radius: 999px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    /* Conic gradient directly on the button — rotates via --age-a */
    background: conic-gradient(
        from var(--age-a) at 50% 50%,
        #7aa7ff  0deg,
        #b395ff  120deg,
        #5dd9ff  240deg,
        #7aa7ff  360deg
    );
    color: #fff;
    border: none;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.2) inset,
        0 6px 24px -4px rgba(122, 167, 255, 0.55),
        0 2px 8px -2px rgba(0, 0, 0, 0.3);
    animation: ageFlow var(--age-speed, 5s) linear infinite;
    transition: transform 0.22s var(--ease-smooth), box-shadow 0.22s var(--ease-smooth);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

@keyframes ageFlow {
    to { --age-a: 360deg; }
}

/* Shine overlay */
.dock-age::before {
    display: none;
}

.dock-age::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(175deg, rgba(255, 255, 255, 0.22) 0%, transparent 55%);
    pointer-events: none;
}

.dock-age-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}
.dock-age-icon svg { width: 100%; height: 100%; stroke: currentColor; }

.dock-age-label {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.05em;
    position: relative;
    z-index: 1;
}

.dock-age:hover {
    --age-speed: 2.5s;
    transform: scale(1.04);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.25) inset,
        0 10px 28px -4px rgba(122, 167, 255, 0.8),
        0 4px 12px -2px rgba(0, 0, 0, 0.35);
}
.dock-age:active { transform: scale(0.96); }

.dock-age:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring), 0 8px 22px -4px rgba(122, 167, 255, 0.55);
}

/* ----------- Age-Up row wrapper + settings gear ----------- */
.dock-age-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.dock-age-cfg {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.11);
    color: var(--fg-4);
    transition:
        background 0.2s var(--ease-smooth),
        border-color 0.2s var(--ease-smooth),
        color 0.2s var(--ease-smooth),
        transform 0.28s var(--ease-spring);
    z-index: 1;
}

.dock-age-cfg svg { width: 13px; height: 13px; }

.dock-age-cfg:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.22);
    color: var(--fg-2);
    transform: rotate(35deg);
}

.dock-age-cfg.is-open {
    background: rgba(122, 167, 255, 0.16);
    border-color: rgba(122, 167, 255, 0.4);
    color: var(--accent);
    transform: rotate(65deg);
}

.dock-age-cfg:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

/* ----------- Age-Up settings popover ----------- */
.dock-age-cfg-menu {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(8px) scale(0.96);
    width: 224px;
    padding: 14px 14px 12px;
    border-radius: var(--r-lg);
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transition:
        opacity 0.26s var(--ease-smooth),
        transform 0.26s var(--ease-smooth);
}

.dock-age-cfg-menu.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0) scale(1);
}

.dacm-title {
    font-family: var(--font-display);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--fg-4);
    margin-bottom: 11px;
}

.dacm-section { margin-bottom: 0; }

.dacm-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--fg-2);
    margin-bottom: 8px;
    line-height: 1.2;
}

.dacm-sub {
    font-size: 10.5px;
    color: var(--fg-4);
    margin-top: 2px;
    line-height: 1.3;
}

.dacm-years {
    display: flex;
    gap: 4px;
}

.dacm-yr {
    flex: 1;
    height: 30px;
    border-radius: var(--r-sm);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    color: var(--fg-3);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition:
        background 0.16s var(--ease-smooth),
        border-color 0.16s var(--ease-smooth),
        color 0.16s var(--ease-smooth),
        transform 0.14s var(--ease-smooth);
}

.dacm-yr:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--fg);
}

.dacm-yr.active {
    background: rgba(122, 167, 255, 0.18);
    border-color: rgba(122, 167, 255, 0.42);
    color: var(--accent);
}

.dacm-yr:active { transform: scale(0.93); }

.dacm-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.07);
    margin: 11px 0;
}

.dacm-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.dacm-toggle-info { min-width: 0; }

/* ----------- Choice prompt (in event modal) ----------- */
.event-prompt {
    text-align: center;
    margin-bottom: 18px;
}

.event-emoji {
    font-size: 48px;
    margin-bottom: 10px;
    filter: drop-shadow(0 4px 16px rgba(122, 167, 255, 0.35));
    animation: emojiPop 0.5s var(--ease-spring);
}

@keyframes emojiPop {
    0%   { transform: scale(0.3) rotate(-10deg); opacity: 0; }
    65%  { transform: scale(1.18) rotate(4deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.event-text {
    font-size: 14px;
    line-height: 1.55;
    color: var(--fg-2);
}

.choice-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.choice-btn {
    text-align: left;
    padding: 15px 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
        rgba(255, 255, 255, 0.025);
    border: var(--glass-stroke-strong);
    border-radius: var(--r-md);
    color: var(--fg);
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s var(--ease-smooth), border-color 0.2s var(--ease-smooth), transform 0.2s var(--ease-smooth), box-shadow 0.2s var(--ease-smooth);
    cursor: pointer;
    line-height: 1.4;
}

.choice-btn:hover {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03)),
        rgba(255, 255, 255, 0.04);
    border-color: rgba(122, 167, 255, 0.45);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -10px rgba(122, 167, 255, 0.3);
}

.choice-btn:active { transform: scale(0.98); }

.choice-sub {
    font-size: 11.5px;
    color: var(--fg-3);
    margin-top: 4px;
    font-weight: 400;
}

/* ----------- Mod card ----------- */
.mod-card {
    padding: 16px;
    border-radius: var(--r-md);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
        rgba(255, 255, 255, 0.025);
    border: var(--glass-stroke-strong);
    margin-bottom: 10px;
    transition: border-color 0.28s var(--ease-smooth), background 0.28s var(--ease-smooth), box-shadow 0.28s var(--ease-smooth);
}

.mod-card.active {
    border-color: rgba(122, 167, 255, 0.4);
    background:
        linear-gradient(135deg, rgba(122, 167, 255, 0.1), rgba(179, 149, 255, 0.04)),
        rgba(255, 255, 255, 0.025);
}

.mod-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 12px;
}

.mod-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mod-emoji {
    font-size: 22px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: var(--glass-stroke);
}

.mod-card-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
}

.mod-card-desc {
    font-size: 12.5px;
    color: var(--fg-2);
    line-height: 1.45;
}

.mod-card-meta {
    font-size: 11px;
    color: var(--fg-3);
    margin-top: 6px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.mod-feature {
    background: rgba(255, 255, 255, 0.04);
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-weight: 600;
}

/* ----------- Person card ----------- */
.person-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--r-md);
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.28s var(--ease-smooth), transform 0.28s var(--ease-smooth), border-color 0.28s var(--ease-smooth), box-shadow 0.28s var(--ease-smooth);
}

.person-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(122, 167, 255, 0.22);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px -16px rgba(0, 0, 0, 0.5);
}

.person-card--interactive:active { transform: scale(0.99); }

.person-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #07091a;
    flex-shrink: 0;
}

.person-info { flex: 1; min-width: 0; }
.person-name {
    font-weight: 600;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.person-sub {
    font-size: 11.5px;
    color: var(--fg-3);
    margin-top: 1px;
}

.relation-bar {
    width: 70px;
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    margin-top: 4px;
    position: relative;
}

.relation-fill {
    height: 100%;
    width: var(--rv, 50%);
    background: linear-gradient(90deg, var(--bad), var(--warn) 50%, var(--good));
    border-radius: inherit;
    transition: width 0.5s var(--ease-smooth);
}

.person-status {
    font-size: 11px;
    color: var(--fg-3);
    font-weight: 600;
    flex-shrink: 0;
    text-align: right;
}

/* ----------- Death / game over screen ----------- */
.gameover-stage {
    text-align: center;
    padding: 12px 4px 6px;
}

.gameover-emoji {
    font-size: 56px;
    margin-bottom: 10px;
    filter: drop-shadow(0 6px 18px rgba(179, 149, 255, 0.4));
}

.gameover-title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
    background: linear-gradient(135deg, #ffffff 0%, #b395ff 70%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.gameover-sub {
    color: var(--fg-3);
    font-size: 13px;
    margin-bottom: 16px;
}

.gameover-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 18px;
}

.go-stat {
    padding: 12px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: var(--glass-stroke);
    border-radius: var(--r-md);
    text-align: left;
}
.go-stat-label {
    font-size: 10px;
    color: var(--fg-3);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    margin-bottom: 4px;
}
.go-stat-value {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
}

/* Number bump on stat change */
@keyframes bump {
    0%   { transform: scale(1); }
    35%  { transform: scale(1.18); }
    100% { transform: scale(1); }
}
.bump { animation: bump 0.45s var(--ease-spring); }

/* ----------- Narrow phones ----------- */
@media (max-width: 480px) {
    .hud-chips {
        max-width: 100%;
        gap: 4px;
    }

    .hud-chip {
        font-size: 10px;
        padding: 2px 8px;
    }

    .stats-strip {
        gap: 1px;
    }

    .stat-pill {
        gap: 6px;
        padding: 4px 4px;
    }

    .dock-wrap {
        padding: 6px 10px calc(10px + env(safe-area-inset-bottom, 0px));
    }

    .dock {
        padding: 8px 6px 8px;
        max-width: 100%;
        border-radius: var(--r-lg);
    }

    .dock-nav {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 0;
        padding-bottom: 2px;
    }

    .dock-nav::-webkit-scrollbar { display: none; }

    .dock-btn {
        flex: 0 0 auto;
        min-width: 52px;
        padding: 6px 4px;
    }

    .dock-label {
        font-size: 9px;
    }

    .dock-age-row {
        width: 100%;
        max-width: 100%;
    }
}

