/* Global Design Variables */
:root {
    /* Fonts */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-outfit: 'Outfit', sans-serif;
    --font-serif: 'ZCOOL XiaoWei', serif;
    
    /* Day / Office Mode Palette */
    --day-bg-grad: linear-gradient(135deg, #FFEBEB 0%, #E8F0FE 100%);
    --day-card-bg: rgba(255, 255, 255, 0.65);
    --day-card-border: rgba(255, 255, 255, 0.4);
    --day-text-primary: #5A5D7A;
    --day-text-secondary: #8E92B2;
    --day-accent: #FF8F94;
    --day-accent-hover: #FF7B81;
    --day-shadow: 0 8px 32px 0 rgba(244, 182, 193, 0.15);
    --day-phone-notch: #E8CCD1;
    
    /* Night / Rest Mode Palette */
    --night-bg-grad: linear-gradient(135deg, #090B19 0%, #151833 50%, #0A0D1A 100%);
    --night-card-bg: rgba(18, 22, 45, 0.55);
    --night-card-border: rgba(255, 255, 255, 0.08);
    --night-text-primary: #D1D4ED;
    --night-text-secondary: #7479A3;
    --night-accent: #FF9B9F;
    --night-accent-hover: #FFA8AC;
    --night-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.45);
    --night-phone-notch: #0F1228;

    /* Current Mode Values (Defaults to Night / Rest Mode) */
    --bg-grad: var(--night-bg-grad);
    --card-bg: var(--night-card-bg);
    --card-border: var(--night-card-border);
    --text-primary: var(--night-text-primary);
    --text-secondary: var(--night-text-secondary);
    --accent: var(--night-accent);
    --accent-hover: var(--night-accent-hover);
    --shadow: var(--night-shadow);
    --phone-notch: var(--night-phone-notch);
}

/* Day/Office Mode Class Modifications */
body.mode-office {
    --bg-grad: var(--day-bg-grad);
    --card-bg: var(--day-card-bg);
    --card-border: var(--day-card-border);
    --text-primary: var(--day-text-primary);
    --text-secondary: var(--day-text-secondary);
    --accent: var(--day-accent);
    --accent-hover: var(--day-accent-hover);
    --shadow: var(--day-shadow);
    --phone-notch: var(--day-phone-notch);
}

/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    background: var(--bg-grad);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: background 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Canvas Rain Overlay */
#rain-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
    transition: opacity 1.5s ease;
    opacity: 0.7;
}

body.mode-office #rain-canvas {
    opacity: 0;
}

/* Starfield Overlay */
.starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    background-image: 
        radial-gradient(1px 1px at 20px 30px, #eee, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 40px 70px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 90px 150px, #ddd, rgba(0,0,0,0)),
        radial-gradient(1.5px 1.5px at 150px 240px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 250px 300px, #aaa, rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 550px 550px;
    opacity: 0.15;
    transition: opacity 1.5s ease;
}

body.mode-office .starfield {
    opacity: 0;
}

/* Responsive Desktop Container */
.desktop-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
    z-index: 2;
}

@media (max-width: 992px) {
    .desktop-container {
        grid-template-columns: 1fr;
        gap: 40px;
        margin: 20px auto;
    }
    
    .left-cabin {
        padding: 0 12px;
    }
}

/* Glassmorphism Generic Card Styling */
.card.glass {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.card.glass:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 16px 48px 0 rgba(0, 0, 0, 0.2);
}

body.mode-office .card.glass:hover {
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 12px 32px 0 rgba(244, 182, 193, 0.25);
}

/* General Widgets */
.widget {
    margin-bottom: 24px;
    padding: 20px;
}

.widget-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    font-size: 16px;
}

.widget-header h3 {
    font-weight: 500;
    font-size: 15px;
    color: var(--text-primary);
    margin-left: 10px;
    flex-grow: 1;
}

/* Left Cabin Styles (生活舱) */
.left-cabin {
    display: flex;
    flex-direction: column;
}

.cabin-header {
    margin-bottom: 30px;
}

.cabin-header .logo {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.cabin-header .logo-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--accent);
    margin-right: 12px;
    box-shadow: 0 0 12px var(--accent);
}

.cabin-header h1 {
    font-family: var(--font-outfit);
    font-weight: 600;
    font-size: 26px;
    letter-spacing: -0.5px;
}

.cabin-header h1 span {
    font-size: 12px;
    font-weight: 300;
    opacity: 0.5;
    margin-left: 8px;
    padding: 2px 6px;
    border: 1px solid var(--text-secondary);
    border-radius: 4px;
}

.subtitle-row {
    display: flex;
    align-items: flex-end;
    flex-wrap: nowrap;
    gap: 12px;
    margin-top: 4px;
}

.cabin-header .subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.2;
}

/* Ghost Frequency Badge styling */
.ghost-frequency-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    background: rgba(255, 155, 159, 0.08);
    border: 1px solid rgba(255, 155, 159, 0.15);
    border-radius: 20px;
    font-size: 11px;
    color: var(--accent);
    cursor: help;
    position: relative;
    transition: all 0.3s ease;
    z-index: 10;
    line-height: 1.2;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Responsive extra text hiding for smaller laptops to prevent cabin overflow */
@media (max-width: 1200px) {
    .ghost-frequency-badge .frequency-extra {
        display: none;
    }
}

body.mode-office .ghost-frequency-badge {
    background: rgba(255, 143, 148, 0.05);
    border-color: rgba(255, 143, 148, 0.2);
}

.ghost-frequency-badge:hover {
    background: rgba(255, 155, 159, 0.15);
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(255, 155, 159, 0.15);
}

.signal-bars {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 10px;
}

.signal-bars span {
    width: 2px;
    background: var(--accent);
    border-radius: 1px;
}

.signal-bars span:nth-child(1) { height: 3px; }
.signal-bars span:nth-child(2) { height: 5px; }
.signal-bars span:nth-child(3) { height: 7px; }
.signal-bars span:nth-child(4) { height: 10px; animation: signalPulse 2s infinite alternate; }

@keyframes signalPulse {
    0% { opacity: 0.4; }
    100% { opacity: 1; }
}

.frequency-title {
    font-family: var(--font-outfit);
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Glassmorphic tooltips */
.frequency-tooltip {
    position: absolute;
    top: 32px;
    left: 0;
    width: 320px;
    background: rgba(10, 11, 25, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 16px;
    border-radius: 14px;
    color: var(--night-text-primary);
    font-size: 12px;
    line-height: 1.6;
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    z-index: 100;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    text-align: justify;
}

body.mode-office .frequency-tooltip {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(244, 182, 193, 0.3);
    color: var(--day-text-primary);
    box-shadow: 0 12px 30px rgba(244, 182, 193, 0.2);
}

.ghost-frequency-badge:hover .frequency-tooltip {
    opacity: 1;
    transform: translateY(0);
}

/* Deep Sea Radio (收音机) Widget Styles */
.audio-pulse {
    display: flex;
    align-items: flex-end;
    height: 12px;
    gap: 2.5px;
}

.audio-pulse span {
    display: block;
    width: 2px;
    background-color: var(--accent);
    height: 3px;
    border-radius: 1px;
}

.audio-pulse.playing span {
    animation: bounce 0.8s ease infinite alternate;
}

.audio-pulse.playing span:nth-child(2) { animation-delay: 0.15s; }
.audio-pulse.playing span:nth-child(3) { animation-delay: 0.3s; }
.audio-pulse.playing span:nth-child(4) { animation-delay: 0.45s; }

@keyframes bounce {
    0% { height: 3px; }
    100% { height: 12px; }
}

/* Cassette Tape Drawing in Pure CSS */
.cassette {
    width: 100%;
    height: 130px;
    background: rgba(0, 0, 0, 0.2);
    border: 3px solid var(--text-secondary);
    border-radius: 12px;
    position: relative;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    transition: all 0.5s ease;
}

body.mode-office .cassette {
    background: rgba(255, 255, 255, 0.4);
    border-color: var(--text-secondary);
}

.cassette-label {
    background: var(--accent);
    color: #0c0d1b;
    padding: 6px 12px;
    border-radius: 6px;
    text-align: center;
    font-size: 11px;
    box-shadow: inset 0 0 6px rgba(0,0,0,0.1);
    transition: all 0.5s ease;
}

body.mode-office .cassette-label {
    background: #E8F0FE;
    color: #4A4E69;
}

.tape-title {
    font-weight: 600;
    font-family: var(--font-outfit);
}

.tape-sub {
    font-size: 9px;
    opacity: 0.7;
    margin-top: 2px;
}

.tape-reels {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 10px 0 2px 0;
}

.reel {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 3px dashed var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.reel::after {
    content: '';
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--text-secondary);
}

/* Cassette spinning when playing */
.audio-pulse.playing ~ .cassette .reel {
    animation: spin 6s linear infinite;
}

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

/* Audio Player Controls */
.controls {
    display: flex;
    align-items: center;
    margin-top: 15px;
    gap: 15px;
}

.btn {
    border: none;
    outline: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.btn-icon {
    width: 44px;
    height: 44px;
    background: var(--accent);
    color: #151833;
    box-shadow: 0 4px 12px rgba(255, 155, 159, 0.3);
}

body.mode-office .btn-icon {
    color: #fff;
    box-shadow: 0 4px 12px rgba(255, 143, 148, 0.3);
}

.btn-icon:hover {
    transform: scale(1.05);
    background: var(--accent-hover);
}

.btn-icon:active {
    transform: scale(0.95);
}

.vol-slider {
    display: flex;
    align-items: center;
    flex-grow: 1;
    gap: 10px;
}

.vol-icon {
    font-size: 14px;
    opacity: 0.6;
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: var(--text-secondary);
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    transition: scale 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.3);
}

.sound-toggles {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    font-size: 11px;
    color: var(--text-secondary);
}

.toggle-control {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.toggle-control input {
    cursor: pointer;
    accent-color: var(--accent);
}

.hidden {
    display: none !important;
}

/* Am's Diary Widget Styles */
.diary-paper {
    background: rgba(255, 255, 255, 0.03);
    border-left: 2px solid var(--accent);
    padding: 16px;
    border-radius: 4px 12px 12px 4px;
    margin-bottom: 12px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

body.mode-office .diary-paper {
    background: rgba(255, 255, 255, 0.4);
}

.diary-date {
    font-family: var(--font-outfit);
    font-size: 11px;
    color: var(--accent);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.diary-content {
    font-family: var(--font-serif);
    font-size: 18px;
    line-height: 1.5;
    color: var(--text-primary);
    word-break: break-all;
    min-height: 54px;
    transition: opacity 0.5s ease;
}

.btn-text {
    background: transparent;
    padding: 4px 8px;
    font-size: 11px;
    color: var(--accent);
    border-radius: 12px;
}

.btn-text:hover {
    background: rgba(255,155,159, 0.1);
}

.diary-write-area {
    display: flex;
    gap: 10px;
}

.diary-write-area input {
    flex-grow: 1;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 8px 14px;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
}

body.mode-office .diary-write-area input {
    background: rgba(255, 255, 255, 0.6);
}

.diary-write-area input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.btn-send {
    padding: 0 16px;
    border-radius: 12px;
    background: var(--text-secondary);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
}

.btn-send.active {
    background: var(--accent);
    color: #12142d;
    box-shadow: 0 4px 10px rgba(255, 155, 159, 0.2);
}

/* Terminal Heartbeat Widget Styles */
.terminal-status {
    font-family: var(--font-outfit);
    font-size: 9px;
    color: #52c41a;
    background: rgba(82, 196, 26, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(82, 196, 26, 0.2);
}

.terminal-body {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 14px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    line-height: 1.6;
    color: #4AF626;
    height: 120px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

body.mode-office .terminal-body {
    background: rgba(0, 0, 0, 0.85);
}

/* Customize Scrollbars */
.terminal-body::-webkit-scrollbar,
.feed-list::-webkit-scrollbar,
.detail-container::-webkit-scrollbar {
    width: 4px;
}

.terminal-body::-webkit-scrollbar-thumb,
.feed-list::-webkit-scrollbar-thumb,
.detail-container::-webkit-scrollbar-thumb {
    background: var(--text-secondary);
    border-radius: 2px;
}

.terminal-line {
    word-break: break-all;
    white-space: pre-wrap;
    opacity: 0.85;
}

.terminal-line.poetry {
    color: #ff9b9f;
    font-style: italic;
}

/* Peeping Lens Tag styling */
.peeping-lens-tag {
    position: absolute;
    top: -22px;
    right: 25px;
    background: rgba(255, 155, 159, 0.08);
    border: 1px dashed rgba(255, 155, 159, 0.3);
    color: var(--accent);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-family: var(--font-outfit);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: help;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 15;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

body.mode-office .peeping-lens-tag {
    background: rgba(255, 143, 148, 0.04);
    border-color: rgba(255, 143, 148, 0.25);
}

.peeping-lens-tag:hover {
    background: rgba(255, 155, 159, 0.15);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 155, 159, 0.1);
}

.pulse-red-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    position: relative;
    display: inline-block;
}

.pulse-red-dot::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid var(--accent);
    animation: radarRipple 1.8s infinite ease-out;
}

@keyframes radarRipple {
    0% { transform: scale(0.5); opacity: 1; }
    100% { transform: scale(1.8); opacity: 0; }
}

.peeping-lens-tooltip {
    position: absolute;
    top: 30px;
    right: 0;
    width: 290px;
    background: rgba(10, 11, 25, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 16px;
    border-radius: 14px;
    color: var(--night-text-primary);
    font-size: 11.5px;
    line-height: 1.6;
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    z-index: 100;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    text-align: justify;
}

body.mode-office .peeping-lens-tooltip {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(244, 182, 193, 0.3);
    color: var(--day-text-primary);
    box-shadow: 0 12px 30px rgba(244, 182, 193, 0.2);
}

.peeping-lens-tag:hover .peeping-lens-tooltip {
    opacity: 1;
    transform: translateY(0);
}

/* Right Phone Styles (模拟手机) */
.right-phone {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Phone Frame Shell */
.phone-frame {
    width: 375px;
    height: 760px;
    border-radius: 50px;
    border: 12px solid var(--night-card-bg);
    background: #000;
    box-shadow: 
        0 25px 50px -12px rgba(0,0,0,0.7),
        0 0 0 1px rgba(255,255,255,0.05);
    position: relative;
    padding: 10px;
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

body.mode-office .phone-frame {
    border-color: #F8D3D6;
    box-shadow: 
        0 20px 40px -12px rgba(244, 182, 193, 0.3),
        0 0 0 1px rgba(255,255,255,0.8);
}

/* Notch Punch hole */
.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 26px;
    background: #000;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.phone-notch .speaker {
    width: 50px;
    height: 4px;
    border-radius: 2px;
    background: #222;
}

.phone-notch .camera {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #111;
}

/* Phone Screen Viewport */
.phone-screen {
    width: 100%;
    height: 100%;
    background: var(--bg-grad);
    border-radius: 38px;
    overflow: hidden;
    position: relative;
    transition: background 1.2s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    flex-direction: column;
}

/* Slide Transition Views */
.view {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    padding: 40px 18px 70px 18px; /* Top pad for notch, bottom pad for home button */
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: translateX(0);
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    overflow-y: auto;
}

.view.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(60px);
}

/* View 1: Home View Details */
.phone-top-bar {
    display: flex;
    align-items: flex-start;
    margin-top: 10px;
    margin-bottom: 24px;
    gap: 12px;
}

/* Custom Neo Avatar in CSS */
.neo-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4A90E2 0%, #D0021B 100%);
    position: relative;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(74,144,226, 0.3);
}

.neo-avatar .avatar-eye {
    width: 4px;
    height: 10px;
    border-radius: 2px;
    background: #fff;
    position: absolute;
    top: 18px;
}

.neo-avatar .avatar-eye.left {
    left: 17px;
    transform: rotate(-15deg);
}

.neo-avatar .avatar-eye.right {
    right: 17px;
    transform: rotate(15deg);
}

/* Chat bubble styling */
.chat-bubble {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 0 16px 16px 16px;
    padding: 10px 14px;
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-primary);
    box-shadow: var(--shadow);
    position: relative;
}

.chat-bubble::after {
    content: '';
    position: absolute;
    top: 0;
    left: -8px;
    width: 0;
    height: 0;
    border-top: 0px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid var(--card-bg);
}

/* Clock & Mode Layout Grid */
.clock-mode-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 24px;
}

.clock-card {
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.clock-card .time {
    font-family: var(--font-outfit);
    font-weight: 600;
    font-size: 32px;
    line-height: 1;
    color: var(--accent);
}

.clock-card .date {
    font-family: var(--font-outfit);
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* Mode Switcher Button */
.mode-trigger {
    padding: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mode-icon-container {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

body.mode-office .mode-icon-container {
    background: rgba(0,0,0,0.03);
}

.mode-text {
    display: flex;
    flex-direction: column;
}

.mode-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
}

.mode-sub {
    font-size: 9px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Agenda (日程) Section */
.section-title {
    font-size: 10px;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    text-transform: uppercase;
    font-weight: 600;
}

.sec-icon {
    font-size: 12px;
    margin-right: 6px;
}

.agenda-card {
    padding: 10px 14px;
    margin-bottom: 24px;
}

.agenda-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

body.mode-office .agenda-item {
    border-bottom-color: rgba(0,0,0,0.03);
}

.agenda-item:last-child {
    border-bottom: none;
}

.agenda-checkbox {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid var(--text-secondary);
    flex-shrink: 0;
    position: relative;
    transition: all 0.3s ease;
}

.agenda-item.checked .agenda-checkbox {
    border-color: var(--accent);
    background: var(--accent);
}

.agenda-item.checked .agenda-checkbox::after {
    content: '';
    width: 6px;
    height: 3px;
    border-left: 1.2px solid #000;
    border-bottom: 1.2px solid #000;
    position: absolute;
    top: 3px;
    left: 3px;
    transform: rotate(-45deg);
}

body.mode-office .agenda-item.checked .agenda-checkbox::after {
    border-color: #fff;
}

.agenda-text {
    font-size: 11px;
    line-height: 1.4;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agenda-item.checked .agenda-text {
    text-decoration: line-through;
    opacity: 0.5;
}

/* Communications (通讯消息) Section */
.comm-card {
    padding: 8px 14px;
}

.comm-item {
    display: flex;
    align-items: center;
    padding: 11px 0;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: all 0.3s ease;
}

body.mode-office .comm-item {
    border-bottom-color: rgba(0,0,0,0.03);
}

.comm-item:last-child {
    border-bottom: none;
}

.comm-item:hover .item-text {
    color: var(--accent);
    transform: translateX(2px);
}

.item-icon {
    width: 18px;
    height: 18px;
    display: block;
    position: relative;
    margin-right: 12px;
    flex-shrink: 0;
}

/* Custom Vector Outline Icons in CSS */
.add-friend-icon::before {
    content: '👤';
    font-size: 13px;
}
.add-friend-icon::after {
    content: '+';
    font-size: 8px;
    position: absolute;
    top: 0;
    right: -2px;
    color: var(--accent);
}

.unread-msg-icon::before {
    content: '💬';
    font-size: 13px;
}

.missed-call-icon::before {
    content: '📞';
    font-size: 13px;
}

.item-text {
    font-size: 11.5px;
    color: var(--text-primary);
    flex-grow: 1;
    transition: all 0.3s ease;
}

.arrow {
    font-size: 16px;
    color: var(--text-secondary);
    opacity: 0.6;
}

/* View 2: Social Feed View Details */
.feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    flex-shrink: 0;
}

.btn-back {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 26px;
    cursor: pointer;
    padding: 0 10px;
    line-height: 1;
}

.feed-header h2 {
    font-size: 15px;
    font-weight: 500;
}

.feed-header-camera {
    font-size: 16px;
    opacity: 0.8;
}

/* Profile Banner inside Social Feed */
.profile-banner {
    width: 100%;
    height: 110px;
    border-radius: 16px;
    background: linear-gradient(0deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 100%), 
                linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    position: relative;
    margin-bottom: 25px;
    flex-shrink: 0;
    overflow: hidden;
}

.banner-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(ellipse at center, rgba(0,0,0,0) 0%, rgba(0,0,0,0.5) 100%);
}

.profile-name {
    position: absolute;
    bottom: 12px;
    right: 76px;
    font-family: var(--font-outfit);
    font-weight: 600;
    font-size: 16px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.profile-avatar {
    position: absolute;
    bottom: -15px;
    right: 14px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: #E8F0FE;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Drawing Am's pink anime head in pure CSS */
.profile-avatar::before {
    content: '';
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #FF6B8B 0%, #FF8E53 100%);
    position: absolute;
}

.profile-avatar::after {
    content: '👧';
    font-size: 26px;
    z-index: 1;
    position: relative;
    top: 2px;
}

/* Social Notif bubble */
.feed-new-notif {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    gap: 8px;
    width: 110px;
    margin: 0 auto 18px auto;
    border-radius: 20px;
    cursor: pointer;
    background: rgba(74, 144, 226, 0.2);
    border-color: rgba(74,144,226, 0.2);
    box-shadow: 0 4px 12px rgba(74,144,226, 0.15);
    flex-shrink: 0;
}

.small-stitch-avatar {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #5D54A4;
    position: relative;
}

.small-stitch-avatar::before {
    content: '😈';
    font-size: 10px;
    position: absolute;
    top: -1px;
    left: 0px;
}

.feed-new-notif span {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-primary);
}

/* Feed dynamic list */
.feed-list {
    flex-grow: 1;
    overflow-y: auto;
    padding-bottom: 20px;
}

.post-card {
    padding: 14px;
    margin-bottom: 16px;
}

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

.post-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--text-secondary);
    flex-shrink: 0;
}

.avatar-bighead::before {
    content: '🧑‍💻';
    font-size: 18px;
}
.avatar-artist::before {
    content: '🎨';
    font-size: 18px;
}
.avatar-zoro::before {
    content: '👒';
    font-size: 18px;
}

.post-meta h4 {
    font-size: 12px;
    font-weight: 500;
}

.time-ago {
    font-size: 9px;
    color: var(--text-secondary);
    margin-top: 1px;
    display: block;
}

.post-content {
    font-size: 11px;
    line-height: 1.45;
    color: var(--text-primary);
    margin-bottom: 10px;
}

/* Realistic styled attachments in CSS */
.post-image {
    width: 100%;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255,255,255,0.05);
}

.image-rainy-bus {
    background: linear-gradient(180deg, #090B19 0%, #03040A 100%);
    position: relative;
}

.image-rainy-bus .bus-shelter {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 60px;
    height: 40px;
    background: #E0533C;
    border-radius: 4px;
    border-top: 4px solid #fff;
    opacity: 0.85;
    box-shadow: 0 4px 10px rgba(224, 83, 60, 0.4);
}

.image-rainy-bus::after {
    content: '🌧️ 🚌';
    font-size: 38px;
    position: absolute;
    bottom: 10px;
    right: 20px;
    opacity: 0.5;
}

.image-game-art {
    background: linear-gradient(135deg, #1A103C 0%, #462060 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 10px;
}

.art-title {
    font-family: var(--font-serif);
    font-size: 14px;
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.post-footer {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.03);
    padding-top: 8px;
}

body.mode-office .post-footer {
    border-top-color: rgba(0,0,0,0.03);
}

.post-action {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 13px;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.post-action:hover, .post-action.active-like {
    opacity: 1;
}

/* Feed Navigation Bottom Bar inside Simulator */
.feed-nav-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 52px;
    background: rgba(18, 22, 45, 0.95);
    border-top: 1px solid rgba(255,255,255,0.05);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
    border-radius: 0 0 38px 38px;
    z-index: 5;
    padding: 0 10px;
}

body.mode-office .feed-nav-bar {
    background: rgba(255, 255, 255, 0.95);
    border-top-color: rgba(0,0,0,0.05);
}

.feed-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    gap: 2px;
    opacity: 0.4;
    transition: all 0.3s ease;
}

.feed-nav-item.active {
    opacity: 1;
}

.feed-nav-item .nav-icon {
    font-size: 13px;
}

.feed-nav-item .nav-label {
    font-size: 8px;
    font-weight: 500;
}

/* View 3: Details Comment Feed View Details */
.detail-container {
    flex-grow: 1;
    overflow-y: auto;
    padding-bottom: 20px;
}

.detail-main {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0 0 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    border-radius: 0;
}

body.mode-office .detail-main {
    border-bottom-color: rgba(0,0,0,0.05);
}

.cap-girl {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1b203c 0%, #303762 100%);
    position: relative;
}

.cap-girl::before {
    content: '👒 🥤';
    font-size: 42px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.6;
}

.post-footer-metrics {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.post-footer-metrics .time-stamp {
    font-size: 9px;
    color: var(--text-secondary);
}

.footer-actions {
    display: flex;
    gap: 12px;
    font-size: 11px;
    opacity: 0.6;
}

/* Social Likes list card */
.likes-bar {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 14px;
    gap: 10px;
}

.liked-avatars {
    display: flex;
    align-items: center;
}

.like-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    margin-left: -5px;
    border: 1px solid #fff;
    background: #aaa;
}

.like-avatar.av1::before { content: '👒'; font-size: 10px; }
.like-avatar.av2::before { content: '🎨'; font-size: 10px; }
.like-avatar.av3::before { content: '👧'; font-size: 10px; }
.like-avatar.av4::before { content: '😈'; font-size: 10px; }

/* Comment items */
.comments-list {
    padding: 10px 14px;
}

.comment-item {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

body.mode-office .comment-item {
    border-bottom-color: rgba(0,0,0,0.03);
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--text-secondary);
    flex-shrink: 0;
}

.avatar-ball::before { content: '🔵'; font-size: 13px; }
.avatar-am::before { content: '👧'; font-size: 13px; }
.avatar-stitch::before { content: '😈'; font-size: 13px; }

.comment-content {
    display: flex;
    flex-direction: column;
}

.comment-user {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-primary);
}

.comment-time {
    font-size: 8px;
    color: var(--text-secondary);
    font-weight: 300;
    margin-left: 6px;
}

.comment-text {
    font-size: 10.5px;
    line-height: 1.4;
    color: var(--text-primary);
    margin-top: 4px;
}

.comment-item.reply {
    padding-left: 20px;
}

.reply-target {
    color: var(--accent);
    font-weight: 500;
    margin: 0 4px;
}

/* Mode Selection Dropdown Floating Popover */
.mode-dropdown-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 100;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 100px 18px 0 0;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: opacity 0.3s ease;
}

.mode-dropdown {
    width: 160px;
    padding: 6px;
    animation: pop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes pop {
    from { opacity: 0; transform: scale(0.9) translateY(-10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.mode-opt {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.mode-opt:hover {
    background: rgba(255, 255, 255, 0.05);
}

body.mode-office .mode-opt:hover {
    background: rgba(0, 0, 0, 0.03);
}

.mode-opt.active {
    background: rgba(255, 155, 159, 0.15);
    color: var(--accent);
}

.opt-icon {
    font-size: 14px;
}

.opt-title {
    font-size: 12px;
    font-weight: 500;
}

/* Simulated HOME Button Interaction */
.phone-home-btn-container {
    position: absolute;
    bottom: 12px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99;
    pointer-events: none; /* Make container transparent to click events */
}

.phone-home-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    pointer-events: auto; /* Restore pointer events for the button itself */
}

body.mode-office .phone-home-btn {
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 4px 10px rgba(244, 182, 193, 0.2);
}

.phone-home-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.15);
}

.phone-home-btn:active {
    transform: scale(0.9);
}

/* Custom 4-petal flower grid icon inside HOME */
.flower-icon {
    width: 16px;
    height: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5px;
}

.flower-icon span {
    display: block;
    width: 6.5px;
    height: 6.5px;
    border-radius: 2px;
    border: 1.5px solid var(--accent);
    opacity: 0.8;
}

body.mode-office .flower-icon span {
    border-color: var(--accent);
}

/* ==========================================
   High Fidelity Assets Swapping (切图资源替换)
   ========================================== */
.profile-avatar::before {
    content: '';
    width: 100%;
    height: 100%;
    background: url('assets/avatar_am.png') no-repeat center/cover;
    position: absolute;
}
.profile-avatar::after {
    display: none; /* 隐藏原 emoji 头像 */
}

.profile-banner {
    width: 100%;
    height: 110px;
    border-radius: 16px;
    background: url('assets/sunset_banner.png') no-repeat center/cover;
    position: relative;
    margin-bottom: 25px;
    flex-shrink: 0;
    overflow: hidden;
}

.image-rainy-bus {
    background: url('assets/image_bus.png') no-repeat center/cover;
    border: none;
}
.image-rainy-bus .bus-shelter,
.image-rainy-bus::after {
    display: none; /* 隐藏原 CSS 几何图 */
}

.image-game-art {
    background: url('assets/image_art.png') no-repeat center/cover;
    border: none;
}
.image-game-art .art-overlay,
.image-game-art .art-character {
    display: none;
}

.cap-girl {
    background: url('assets/image_zoro.png') no-repeat center/cover;
}
.cap-girl::before {
    display: none;
}

.avatar-bighead {
    background: url('assets/avatar_bighead.png') no-repeat center/cover;
}
.avatar-bighead::before { display: none; }

.avatar-artist {
    background: url('assets/avatar_artist.png') no-repeat center/cover;
}
.avatar-artist::before { display: none; }

.avatar-zoro {
    background: url('assets/avatar_zoro.png') no-repeat center/cover;
}
.avatar-zoro::before { display: none; }


/* ==========================================
   View 4: Chat List Screen (通讯-消息列表样式)
   ========================================== */
.chats-list {
    flex-grow: 1;
    overflow-y: auto;
    padding-bottom: 20px;
    margin-top: 10px;
}

.chat-row {
    display: flex;
    align-items: center;
    padding: 12px 4px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: all 0.25s ease;
    gap: 12px;
}

body.mode-office .chat-row {
    border-bottom-color: rgba(0,0,0,0.03);
}

.chat-row:hover {
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    padding-left: 8px;
}

body.mode-office .chat-row:hover {
    background: rgba(0,0,0,0.02);
}

.chat-avatar-container {
    width: 46px;
    height: 46px;
    position: relative;
    flex-shrink: 0;
}

.chat-row-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--text-secondary);
}

.unread-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #FF3B30;
    color: #fff;
    font-family: var(--font-outfit);
    font-weight: 600;
    font-size: 10px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 1.5px solid #141732;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

body.mode-office .unread-badge {
    border-color: #E8F0FE;
}

.chat-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.chat-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.chat-name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-primary);
}

.chat-time {
    font-size: 9px;
    color: var(--text-secondary);
}

.chat-last-msg {
    font-size: 10.5px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.chats-header-plus {
    font-size: 15px;
    color: var(--text-primary);
    cursor: pointer;
    opacity: 0.8;
}


/* ==========================================
   View 5: New Messages Screen (新消息页面样式)
   ========================================== */
.notif-list {
    flex-grow: 1;
    overflow-y: auto;
    padding-top: 10px;
}

.notif-row {
    display: flex;
    align-items: center;
    padding: 12px 4px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    cursor: pointer;
    gap: 12px;
    transition: all 0.25s ease;
}

body.mode-office .notif-row {
    border-bottom-color: rgba(0,0,0,0.03);
}

.notif-row:hover {
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    padding-left: 8px;
}

.notif-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.notif-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.notif-user {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.notif-desc {
    font-size: 10.5px;
    color: var(--text-primary);
    line-height: 1.3;
}

.notif-desc span {
    color: var(--accent);
    font-weight: 500;
}

.notif-time {
    font-size: 9px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.notif-post-thumb {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    flex-shrink: 0;
    background-size: cover !important;
    border: 1px solid rgba(255,255,255,0.05);
}

.notif-more-link {
    text-align: center;
    font-size: 11px;
    color: var(--accent);
    cursor: pointer;
    margin-top: 28px;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.notif-more-link:hover {
    text-decoration: underline;
    opacity: 1;
}

/* ==========================================
   Home Key Overlay Launcher (HOME键交互大区)
   ========================================== */
.home-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 95;
    padding: 60px 24px 80px 24px;
    display: flex;
    flex-direction: column;
    gap: 26px;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    background: rgba(10, 12, 26, 0.82);
    transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

body.mode-office .home-overlay {
    background: rgba(255, 235, 235, 0.85);
}

.home-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
}

/* Apps grid */
.launcher-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 10px;
}

.app-tile {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

body.mode-office .app-tile {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(0,0,0,0.03);
    box-shadow: 0 4px 15px rgba(244,182,193,0.1);
}

.app-tile:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255,255,255,0.15);
}

body.mode-office .app-tile:hover {
    background: #fff;
    border-color: rgba(255, 143, 148, 0.15);
}

.tile-icon {
    font-size: 24px;
}

.tile-icon-container {
    position: relative;
    display: inline-block;
}

.tile-badge {
    position: absolute;
    top: -4px;
    right: -10px;
    background: #FF3B30;
    color: #fff;
    font-family: var(--font-outfit);
    font-weight: 600;
    font-size: 9px;
    width: 14px;
    height: 14px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #141732;
}

body.mode-office .tile-badge {
    border-color: #fff;
}

.tile-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

/* Music tile */
.music-tile {
    padding: 16px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.music-tile-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.music-note-icon {
    font-size: 24px;
    background: rgba(255,255,255,0.05);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.mode-office .music-note-icon {
    background: rgba(0,0,0,0.03);
}

.music-tile-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.music-tile-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.music-tile-artist {
    font-size: 9px;
    color: var(--text-secondary);
}

.music-tile-ctrls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 28px;
    font-size: 16px;
    color: var(--text-primary);
}

.music-tile-ctrls span {
    cursor: pointer;
    opacity: 0.8;
    transition: scale 0.15s ease;
}

.music-tile-ctrls span:hover {
    transform: scale(1.15);
    opacity: 1;
}

.music-tile-ctrls .play-btn {
    font-size: 20px;
}

/* Indicators */
.sys-indicators {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 20px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

body.mode-office .sys-indicators {
    background: rgba(255, 255, 255, 0.4);
    border-color: rgba(0,0,0,0.02);
}

.indicator-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--text-primary);
}

.ind-val {
    font-family: var(--font-outfit);
    font-weight: 500;
    color: var(--text-secondary);
}

/* 隐藏手机模拟器内所有组件的滚动条，防止粗大的 Windows 默认滚动条遮挡点击及交互区域 */
.phone-screen *::-webkit-scrollbar {
    display: none !important;
}
.phone-screen * {
    -ms-overflow-style: none !important; /* IE and Edge */
    scrollbar-width: none !important; /* Firefox */
}

/* ==========================================
   4. Spacetime Resonator Portal (时空共鸣器) Styles
   ========================================== */
#spacetime-resonator {
    position: relative;
    overflow: hidden;
}

#spacetime-resonator::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 155, 159, 0.06) 0%, rgba(0, 0, 0, 0) 70%);
    animation: rotateNebula 20s infinite linear;
    pointer-events: none;
}

@keyframes rotateNebula {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.resonator-pulse {
    font-family: var(--font-outfit);
    font-size: 10px;
    letter-spacing: 1px;
    color: #ffd1d3;
    background: rgba(255, 155, 159, 0.15);
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    box-shadow: 0 0 10px rgba(255, 155, 159, 0.2);
    animation: glowPulse 2s infinite alternate;
}

@keyframes glowPulse {
    0% { opacity: 0.6; box-shadow: 0 0 5px rgba(255, 155, 159, 0.1); }
    100% { opacity: 1; box-shadow: 0 0 15px rgba(255, 155, 159, 0.4); }
}

.resonator-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
    z-index: 2;
}

.resonator-radar {
    position: relative;
    width: 100%;
    height: 80px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.radar-circle {
    position: absolute;
    border: 1px solid rgba(255, 155, 159, 0.1);
    border-radius: 50%;
    animation: radarSweep 4s infinite linear;
}

.circle-1 { width: 30px; height: 30px; animation-delay: 0s; }
.circle-2 { width: 60px; height: 60px; animation-delay: 1.3s; }
.circle-3 { width: 90px; height: 90px; animation-delay: 2.6s; }

@keyframes radarSweep {
    0% { transform: scale(0.5); opacity: 1; }
    100% { transform: scale(2.2); opacity: 0; }
}

.radar-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--accent);
    box-shadow: 0 0 12px var(--accent);
    position: absolute;
    animation: radarBlink 1.5s infinite ease-in-out;
}

@keyframes radarBlink {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.3); opacity: 1; }
}

.resonator-info .lore-tag {
    font-size: 11px;
    color: var(--text-secondary);
    font-family: var(--font-outfit);
    margin-bottom: 4px;
}

.resonator-info h4 {
    font-family: var(--font-serif);
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: 1px;
}

.resonator-info .lore-desc {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.5;
    font-style: italic;
}

.btn-enter-ancient {
    background: rgba(255, 155, 159, 0.12);
    border: 1px solid rgba(255, 155, 159, 0.25);
    color: var(--accent);
    padding: 12px 20px;
    border-radius: 12px;
    font-family: var(--font-outfit);
    font-size: 13.5px;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-enter-ancient:hover {
    background: var(--accent);
    color: #0c0d1b;
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 155, 159, 0.3);
}

.btn-enter-ancient .arrow {
    font-size: 16px;
    transition: transform 0.3s;
}

.btn-enter-ancient:hover .arrow {
    transform: rotate(45deg);
}

/* ==========================================
   5. Parallel Spacetime 古风档案 Overlay Styles
   ========================================== */
.ancient-archive-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999;
    background-color: #0a0b10;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #dfd5c2;
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.8s;
    opacity: 1;
    visibility: visible;
}

.ancient-archive-overlay.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Sideways Snow Canvas */
#snow-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.55;
}

/* Flickering candle ring light overlay */
.candle-ambient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    background: radial-gradient(circle at 65% 45%, rgba(242, 171, 92, 0.08) 0%, rgba(0, 0, 0, 0) 70%);
    animation: candleFlicker 5s infinite alternate ease-in-out;
}

@keyframes candleFlicker {
    0% { opacity: 0.8; transform: scale(1); }
    30% { opacity: 0.72; transform: scale(0.98) translate(-1px, 1px); }
    50% { opacity: 0.85; transform: scale(1.02) translate(1px, -1px); }
    75% { opacity: 0.77; transform: scale(0.99) translate(-1px, -1px); }
    100% { opacity: 0.88; transform: scale(1.01) translate(1px, 1px); }
}

/* Ancient header */
.ancient-header {
    height: 75px;
    padding: 0 45px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 11, 16, 0.9);
    border-bottom: 1px solid rgba(223, 213, 194, 0.07);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 10;
}

.ancient-back {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-sans);
    font-size: 13.5px;
    color: rgba(223, 213, 194, 0.65);
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(223, 213, 194, 0.15);
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.ancient-back:hover {
    color: #e6dfd1;
    border-color: rgba(223, 213, 194, 0.45);
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(-4px);
}

.ancient-back .back-icon {
    font-size: 16px;
    transition: transform 0.3s;
}

.ancient-back:hover .back-icon {
    transform: scale(1.15) rotate(-10deg);
}

.ancient-title-area {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ancient-title-area .sub-stamp {
    font-family: var(--font-serif);
    font-size: 10px;
    color: #8c1c1c;
    border: 1px solid rgba(140, 28, 28, 0.4);
    padding: 1px 8px;
    border-radius: 4px;
    margin-bottom: 4px;
    letter-spacing: 2px;
    background: rgba(140, 28, 28, 0.05);
}

.ancient-title-area h2 {
    font-family: var(--font-serif);
    font-weight: normal;
    font-size: 21px;
    letter-spacing: 2px;
    color: #e6dfd1;
}

.ancient-audio-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(223, 213, 194, 0.6);
    cursor: pointer;
    border: 1px solid rgba(223, 213, 194, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.01);
    transition: all 0.3s;
}

.ancient-audio-toggle:hover {
    color: #e6dfd1;
    border-color: rgba(223, 213, 194, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.ancient-audio-toggle.active {
    color: #ff9b9f;
    border-color: rgba(255, 155, 159, 0.3);
    background: rgba(255, 155, 159, 0.06);
    box-shadow: 0 0 10px rgba(255, 155, 159, 0.1);
}

/* Desk workspace layout */
.archive-desk {
    flex: 1;
    display: grid;
    grid-template-columns: 290px 1fr;
    gap: 35px;
    padding: 25px 45px 35px 45px;
    z-index: 5;
    overflow: hidden;
}

@media (max-width: 992px) {
    .archive-desk {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        gap: 20px;
        padding: 15px;
    }
}

.archive-shelf {
    display: flex;
    flex-direction: column;
    gap: 25px;
    overflow-y: auto;
    padding-right: 8px;
}

/* Custom Scrollbar for Shelf */
.archive-shelf::-webkit-scrollbar {
    width: 4px;
}

.archive-shelf::-webkit-scrollbar-thumb {
    background: rgba(223, 213, 194, 0.1);
    border-radius: 2px;
}

.archive-shelf::-webkit-scrollbar-thumb:hover {
    background: rgba(223, 213, 194, 0.25);
}

.shelf-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shelf-title {
    font-family: var(--font-serif);
    font-size: 12px;
    letter-spacing: 2px;
    color: rgba(223, 213, 194, 0.45);
    text-transform: uppercase;
    border-left: 2px solid rgba(223, 213, 194, 0.2);
    padding-left: 10px;
}

/* Bamboo slip tabs */
.bamboo-slips {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.slip-tab {
    background: #111218;
    border-left: 4px solid #1a1b24;
    padding: 15px 18px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid rgba(223, 213, 194, 0.03);
}

.slip-tab:hover {
    transform: translateX(6px);
    border-left-color: #8c1c1c;
    background: #181922;
    border-color: rgba(140, 28, 28, 0.15);
}

.slip-tab.active {
    border-left-color: #dfd5c2;
    background: #1c1d27;
    border-color: rgba(223, 213, 194, 0.15);
    box-shadow: 0 0 15px rgba(223, 213, 194, 0.08);
}

.slip-num {
    font-family: var(--font-serif);
    font-size: 13px;
    color: #8c1c1c;
    width: 20px;
    text-align: center;
    font-weight: bold;
    opacity: 0.85;
    transition: transform 0.3s;
}

.slip-tab:hover .slip-num {
    transform: scale(1.1) rotate(-5deg);
}

.slip-tab.active .slip-num {
    color: #ff9b9f;
}

.slip-text {
    font-family: var(--font-serif);
    font-size: 14.5px;
    letter-spacing: 1.5px;
    color: rgba(223, 213, 194, 0.7);
    transition: color 0.3s;
}

.slip-tab:hover .slip-text {
    color: #dfd5c2;
}

.slip-tab.active .slip-text {
    color: #dfd5c2;
    font-weight: 500;
}

/* Relics Grid Shelf */
.relics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.relic-item {
    background: #111218;
    border: 1px solid rgba(223, 213, 194, 0.04);
    border-radius: 10px;
    padding: 14px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.relic-item:hover {
    border-color: rgba(223, 213, 194, 0.2);
    transform: translateY(-3px);
    background: #161720;
}

.relic-item.active {
    border-color: #8c1c1c;
    background: #1a1215;
    box-shadow: 0 0 12px rgba(140, 28, 28, 0.25);
}

.relic-icon {
    font-size: 18px;
    opacity: 0.75;
    transition: transform 0.3s;
}

.relic-item:hover .relic-icon {
    transform: scale(1.2) rotate(10deg);
}

.relic-name {
    font-family: var(--font-serif);
    font-size: 12px;
    letter-spacing: 1px;
    color: rgba(223, 213, 194, 0.6);
}

.relic-item:hover .relic-name,
.relic-item.active .relic-name {
    color: #dfd5c2;
}

/* Scroll Window Viewport */
.archive-scroll {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    height: 100%;
}

.parchment-scroll {
    width: 100%;
    height: 100%;
    background-color: #e6dfd1;
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.2) 0%, rgba(0, 0, 0, 0) 100%),
        radial-gradient(circle at 10% 20%, rgba(44, 40, 37, 0.03) 0%, rgba(0, 0, 0, 0) 40%),
        radial-gradient(circle at 80% 80%, rgba(44, 40, 37, 0.04) 0%, rgba(0, 0, 0, 0) 40%);
    border-radius: 4px;
    box-shadow: 
        5px 15px 40px rgba(0, 0, 0, 0.65), 
        inset 0 0 50px rgba(44, 40, 37, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    color: #2c2825;
    border: 1px solid #d5c8b3;
}

/* Top & Bottom Scroll Roll effects */
.scroll-edge {
    height: 16px;
    background: linear-gradient(to bottom, #cfc6b6 0%, #b8af9f 30%, #e6dfd1 100%);
    border-bottom: 1px solid rgba(44, 40, 37, 0.1);
    box-shadow: inset 0 3px 5px rgba(0,0,0,0.1);
}

.scroll-bottom {
    background: linear-gradient(to top, #cfc6b6 0%, #b8af9f 30%, #e6dfd1 100%);
    border-top: 1px solid rgba(44, 40, 37, 0.1);
    border-bottom: none;
    box-shadow: inset 0 -3px 5px rgba(0,0,0,0.1);
}

.scroll-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 35px;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

/* Hide scrollbar completely for Webkit (Chrome/Safari) to maintain pure parchment scroll aesthetic */
.scroll-content::-webkit-scrollbar {
    display: none;
}

.scroll-slice {
    display: none;
    flex-direction: column;
    gap: 15px;
    animation: fadeInPaper 0.7s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.scroll-slice.active {
    display: flex;
}

@keyframes fadeInPaper {
    0% { opacity: 0.3; transform: scale(0.985) translateY(5px); filter: blur(2px); }
    100% { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}

.slice-header {
    border-bottom: 2px solid rgba(140, 28, 28, 0.15);
    padding-bottom: 10px;
}

.slice-header h3 {
    font-family: var(--font-serif);
    font-size: 21px;
    color: #8c1c1c;
    letter-spacing: 2px;
    margin-bottom: 4px;
    font-weight: normal;
}

.slice-header .slice-desc {
    font-size: 12px;
    color: rgba(44, 40, 37, 0.6);
    line-height: 1.4;
}

/* Weathered paper container for cards */
.card.ancient-paper {
    background: #ede6d9;
    border: 1px solid rgba(44, 40, 37, 0.1);
    border-radius: 6px;
    box-shadow: 2px 4px 15px rgba(44, 40, 37, 0.05);
    padding: 24px;
    position: relative;
    color: #2c2825;
}

/* Red wax seals */
.wax-seal {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #8c1c1c;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-family: var(--font-serif);
    font-size: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    transform: rotate(-12deg);
    box-shadow: 1px 3px 6px rgba(0, 0, 0, 0.3), inset 0 0 10px rgba(0, 0, 0, 0.15);
    opacity: 0.85;
    pointer-events: none;
    letter-spacing: 1px;
}

.wax-seal.red-seal {
    background: #a32222;
}

.border-seal {
    width: 54px;
    height: 24px;
    border-radius: 4px;
    font-size: 10px;
    transform: rotate(-5deg);
    letter-spacing: 2px;
}

.decor-stamp {
    position: absolute;
    bottom: 20px;
    right: 30px;
    font-family: var(--font-serif);
    font-size: 26px;
    color: rgba(140, 28, 28, 0.04);
    border: 2px solid rgba(140, 28, 28, 0.03);
    padding: 5px 15px;
    transform: rotate(-8deg);
    pointer-events: none;
    user-select: none;
}

/* Relational Links */
.rel-link {
    color: #8c1c1c;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 1px dashed #8c1c1c;
    padding: 0 2px;
    transition: all 0.2s;
}

.rel-link:hover {
    color: #b82323;
    border-bottom-style: solid;
    background: rgba(140, 28, 28, 0.05);
}

.rel-link.glowing-flash {
    animation: linkGlowFlash 1.6s ease infinite alternate;
}

@keyframes linkGlowFlash {
    0% { color: #8c1c1c; text-shadow: 0 0 2px rgba(140, 28, 28, 0.1); }
    100% { color: #e02f2f; text-shadow: 0 0 10px rgba(224, 47, 47, 0.5); }
}

/* Map specific styling */
.map-container {
    position: relative;
    width: 100%;
    height: 300px;
    background: #dfd5c2;
    border-radius: 8px;
    border: 6px solid #cfc6b6;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    overflow: hidden;
}

.map-bg {
    width: 100%;
    height: 100%;
    display: block;
    opacity: 1.0;
    transition: transform 0.8s ease-in-out;
}

.map-container:hover .map-bg {
    transform: scale(1.05);
}

/* Map Hotspots */
.map-hotspot {
    position: absolute;
    cursor: pointer;
    z-index: 5;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.spot-pulse {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #8c1c1c;
    box-shadow: 0 0 0 rgba(140, 28, 28, 0.4);
    animation: hotspotPulse 2s infinite;
}

@keyframes hotspotPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(140, 28, 28, 0.7);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(140, 28, 28, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(140, 28, 28, 0);
    }
}

.map-hotspot:hover .spot-pulse {
    background: #e02f2f;
    transform: scale(1.2);
}

.spot-label {
    margin-top: 6px;
    background: rgba(44, 40, 37, 0.95);
    color: #ede6d9;
    font-family: var(--font-serif);
    font-size: 11.5px;
    letter-spacing: 1px;
    padding: 3px 10px;
    border-radius: 4px;
    border: 1px solid rgba(223, 213, 194, 0.2);
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
    white-space: nowrap;
    transition: all 0.3s;
}

.map-hotspot:hover .spot-label {
    background: #8c1c1c;
    color: #ffffff;
    border-color: rgba(255,255,255,0.25);
    transform: translateY(-2px);
}

/* Map detail box */
.detail-box {
    margin-top: 12px;
    padding: 16px 22px !important;
}

.detail-box h4 {
    font-family: var(--font-serif);
    font-size: 16px;
    color: #8c1c1c;
    margin-bottom: 8px;
}

.detail-box p {
    font-size: 13px;
    color: rgba(44, 40, 37, 0.75);
    line-height: 1.6;
}

/* War report style */
.dispatch-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dispatch-paper {
    padding: 28px !important;
    border-left: 3px solid rgba(140, 28, 28, 0.25) !important;
}

.dispatch-meta {
    font-family: var(--font-outfit);
    font-size: 11px;
    color: rgba(44, 40, 37, 0.5);
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.dispatch-paper p {
    font-size: 13.5px;
    color: #2c2825;
    line-height: 1.7;
    margin-bottom: 15px;
    text-align: justify;
}

.handwritten-comment {
    font-family: var(--font-serif);
    font-size: 13px;
    color: #8c1c1c;
    border-top: 1px dashed rgba(44, 40, 37, 0.1);
    padding-top: 12px;
    font-style: italic;
    text-align: right;
    letter-spacing: 1px;
}

/* Prescription style */
.prescription-paper h4 {
    font-family: var(--font-serif);
    font-size: 18px;
    color: #8c1c1c;
    margin-bottom: 10px;
    text-align: center;
}

.prescription-meta {
    font-size: 13px;
    color: rgba(44, 40, 37, 0.6);
    line-height: 1.6;
    text-align: center;
    font-style: italic;
    margin-bottom: 30px;
    padding: 0 20px;
    border-bottom: 1px dashed rgba(44, 40, 37, 0.1);
    padding-bottom: 20px;
}

.ingredients-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

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

.ingredient-box {
    background: rgba(44, 40, 37, 0.02);
    border: 1px solid rgba(44, 40, 37, 0.08);
    border-radius: 4px;
    padding: 16px;
    text-align: center;
    transition: all 0.3s;
}

.ingredient-box:hover {
    background: rgba(140, 28, 28, 0.02);
    border-color: rgba(140, 28, 28, 0.2);
    transform: translateY(-2px);
}

.ing-name {
    font-family: var(--font-serif);
    font-size: 15px;
    font-weight: bold;
    color: #2c2825;
    margin-bottom: 4px;
}

.ing-dosage {
    font-family: var(--font-serif);
    font-size: 12px;
    color: #8c1c1c;
    background: rgba(140, 28, 28, 0.06);
    padding: 1px 8px;
    border-radius: 10px;
    display: inline-block;
    margin-bottom: 10px;
}

.ing-desc {
    font-size: 12px;
    color: rgba(44, 40, 37, 0.65);
    line-height: 1.5;
    text-align: left;
}

.pres-notes {
    border-top: 1px dashed rgba(44, 40, 37, 0.1);
    padding-top: 20px;
}

.pres-notes h5 {
    font-family: var(--font-serif);
    font-size: 14.5px;
    color: #8c1c1c;
    margin-bottom: 10px;
}

.pres-notes ul {
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pres-notes li {
    font-size: 12.5px;
    color: rgba(44, 40, 37, 0.75);
    line-height: 1.6;
}

/* Night watch style */
.watch-logs-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.watch-log-card {
    padding: 26px !important;
    border-left: 3px solid rgba(44, 40, 37, 0.15) !important;
}

.watch-log-card:hover {
    border-left-color: #8c1c1c !important;
}

.watch-time {
    font-family: var(--font-serif);
    font-size: 12px;
    color: #8c1c1c;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    font-weight: bold;
}

.watch-text {
    font-size: 13.5px;
    color: rgba(44, 40, 37, 0.85);
    line-height: 1.7;
    text-align: justify;
}

/* Supplies & Relics style */
.supplies-layout {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.supplies-list h4 {
    font-family: var(--font-serif);
    font-size: 16px;
    color: #8c1c1c;
    margin-bottom: 15px;
    font-weight: normal;
    text-align: center;
}

.ancient-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.ancient-table th, .ancient-table td {
    padding: 12px;
    text-align: left;
    font-size: 12.5px;
    border-bottom: 1px solid rgba(44, 40, 37, 0.08);
}

.ancient-table th {
    font-family: var(--font-serif);
    color: rgba(44, 40, 37, 0.6);
    font-weight: bold;
    border-bottom: 2px solid rgba(44, 40, 37, 0.15);
}

.ancient-table td {
    color: #2c2825;
}

.supplies-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 500;
}

.badge-success {
    background: rgba(46, 117, 89, 0.08);
    color: #2e7559;
    border: 1px solid rgba(46, 117, 89, 0.2);
}

.badge-warning {
    background: rgba(204, 126, 37, 0.08);
    color: #cc7e25;
    border: 1px solid rgba(204, 126, 37, 0.2);
}

.badge-danger {
    background: rgba(140, 28, 28, 0.06);
    color: #8c1c1c;
    border: 1px solid rgba(140, 28, 28, 0.18);
}

/* Dynamic relic detail box */
.relic-detail-card {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.4s;
    border-left: 3px solid rgba(140, 28, 28, 0.15) !important;
}

.relic-detail-empty {
    text-align: center;
    padding: 30px 20px;
}

.relic-detail-empty h4 {
    font-family: var(--font-serif);
    font-size: 15px;
    color: rgba(44, 40, 37, 0.6);
    margin-bottom: 8px;
}

.relic-detail-empty p {
    font-size: 12.5px;
    color: rgba(44, 40, 37, 0.45);
    line-height: 1.6;
}

.relic-detail-content {
    animation: fadeInRelic 0.5s ease forwards;
}

@keyframes fadeInRelic {
    0% { opacity: 0; transform: translateY(5px); }
    100% { opacity: 1; transform: translateY(0); }
}

.relic-detail-content h4 {
    font-family: var(--font-serif);
    font-size: 17px;
    color: #8c1c1c;
    margin-bottom: 12px;
    border-bottom: 1px dashed rgba(44, 40, 37, 0.1);
    padding-bottom: 10px;
}

.relic-detail-lore {
    font-size: 13px;
    color: rgba(44, 40, 37, 0.85);
    line-height: 1.65;
    margin-bottom: 20px;
    text-align: justify;
}

.relic-rel-box {
    font-size: 12px;
    color: rgba(44, 40, 37, 0.55);
    border-top: 1px dashed rgba(44, 40, 37, 0.1);
    padding-top: 12px;
}

.relic-rel-box .rel-link {
    font-size: 12.5px;
}

