/* ==========================================================================
   DarwishOS — Dual Desktop PC (Windows 98) & Retro Smartphone Stylesheet
   ========================================================================== */

:root {
    --c-desktop: #008080;
    --c-silver: #c0c0c0;
    --c-silver-light: #dfdfdf;
    --c-white: #ffffff;
    --c-gray: #808080;
    --c-dark: #000000;
    
    --c-title-active-1: #000080;
    --c-title-active-2: #1084d0;
    --c-title-inactive-1: #7f7f7f;
    --c-title-inactive-2: #a0a0a0;

    --font-system: 'MS Sans Serif', Tahoma, 'Segoe UI', Geneva, sans-serif;
    --font-mono: 'Courier New', Courier, monospace;
    --font-phone: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #000000;
    font-family: var(--font-system);
    user-select: none;
    -webkit-user-select: none;
}

/* ==========================================================================
   VIEW TOGGLING (Desktop vs Phone)
   ========================================================================== */
body.mode-desktop #desktopView {
    display: block !important;
}

body.mode-desktop #phoneView {
    display: none !important;
}

body.mode-phone #desktopView {
    display: none !important;
}

body.mode-phone #phoneView {
    display: flex !important;
}

/* ==========================================================================
   CRT SCANLINE OVERLAY
   ========================================================================== */
.crt-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 99999;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
                linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 3px, 6px 100%;
    box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.crt-active .crt-overlay {
    opacity: 1;
}

/* ==========================================================================
   1. DESKTOP VIEW (Windows 98 PC)
   ========================================================================== */
.desktop {
    position: relative;
    width: 100vw;
    height: calc(100vh - 30px);
    overflow: hidden;
    background-color: var(--c-desktop);
}

/* Cross-Device Sticky Note on Desktop */
.desktop-hint-note {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 250px;
    background: #ffffe0;
    border: 1px solid #d4c878;
    box-shadow: 2px 3px 8px rgba(0,0,0,0.3);
    padding: 10px 12px;
    z-index: 5;
    font-size: 11px;
    line-height: 1.4;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.desktop-hint-note:hover {
    transform: translateY(-2px);
}

.hint-note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    color: #5c5010;
    margin-bottom: 4px;
    border-bottom: 1px dashed #d4c878;
    padding-bottom: 3px;
}

.hint-note-body {
    color: #444;
}

.hint-note-body strong {
    color: #000;
}

.hint-note-action {
    display: inline-block;
    margin-top: 6px;
    color: #000080;
    font-weight: bold;
    text-decoration: underline;
}

/* Desktop Icons Grid */
.desktop-icons {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 16px;
    max-height: calc(100vh - 60px);
    z-index: 2;
}

.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 74px;
    padding: 6px 4px;
    cursor: pointer;
    text-align: center;
    border: 1px solid transparent;
    transition: background 0.1s;
}

.desktop-icon:hover {
    background: rgba(255, 255, 255, 0.12);
}

.desktop-icon:focus,
.desktop-icon.selected {
    outline: none;
    background: rgba(0, 0, 128, 0.5);
    border: 1px dotted #ff0;
}

.desktop-icon .icon-img {
    width: 32px;
    height: 32px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.desktop-icon .icon-label {
    color: #ffffff;
    font-size: 11px;
    line-height: 1.25;
    text-shadow: 1px 1px 1px #000;
    word-break: break-word;
    padding: 1px 3px;
}

.desktop-icon:focus .icon-label,
.desktop-icon.selected .icon-label {
    background: #000080;
    color: #ffffff;
}

/* Retro Bevel Utilities */
.bevel-btn {
    font-family: var(--font-system);
    font-size: 11px;
    background: var(--c-silver);
    border: none;
    padding: 4px 14px;
    cursor: pointer;
    box-shadow: inset 1px 1px var(--c-white), 
                inset -1px -1px var(--c-dark), 
                inset 2px 2px var(--c-silver-light), 
                inset -2px -2px var(--c-gray);
    outline: none;
}

.bevel-btn:active {
    box-shadow: inset 1px 1px var(--c-dark), 
                inset -1px -1px var(--c-white), 
                inset 2px 2px var(--c-gray), 
                inset -2px -2px var(--c-silver-light);
    padding: 5px 13px 3px 15px;
}

/* Window Component */
.window {
    position: absolute;
    background: var(--c-silver);
    box-shadow: inset 1px 1px var(--c-white), 
                inset -1px -1px var(--c-dark), 
                inset 2px 2px var(--c-silver-light), 
                inset -2px -2px var(--c-gray),
                3px 3px 12px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    padding: 3px;
    z-index: 10;
    min-width: 280px;
    min-height: 180px;
}

.window.minimized {
    display: none !important;
}

.window.maximized {
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: calc(100vh - 30px) !important;
    box-shadow: none !important;
}

.window-titlebar {
    height: 20px;
    background: linear-gradient(90deg, var(--c-title-inactive-1), var(--c-title-inactive-2));
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 3px;
    cursor: move;
}

.window.active .window-titlebar {
    background: linear-gradient(90deg, var(--c-title-active-1), var(--c-title-active-2));
}

.titlebar-text {
    color: #dfdfdf;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.2px;
    display: flex;
    align-items: center;
    gap: 5px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.window.active .titlebar-text {
    color: #ffffff;
}

.titlebar-icon {
    font-size: 12px;
}

.titlebar-controls {
    display: flex;
    gap: 2px;
}

.win-btn {
    width: 16px;
    height: 14px;
    background: var(--c-silver);
    border: none;
    font-family: var(--font-system);
    font-size: 9px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: inset 1px 1px var(--c-white), 
                inset -1px -1px var(--c-dark), 
                inset 2px 2px var(--c-silver-light), 
                inset -2px -2px var(--c-gray);
    line-height: 1;
    padding: 0;
}

.win-btn:active {
    box-shadow: inset 1px 1px var(--c-dark), 
                inset -1px -1px var(--c-white), 
                inset 2px 2px var(--c-gray), 
                inset -2px -2px var(--c-silver-light);
}

.window-menubar {
    display: flex;
    gap: 4px;
    padding: 3px 2px;
    border-bottom: 1px solid var(--c-gray);
    margin-bottom: 2px;
}

.menu-item {
    padding: 2px 6px;
    cursor: pointer;
    font-size: 11px;
}

.menu-item:hover {
    background: #000080;
    color: #ffffff;
}

.window-body {
    flex: 1;
    background: var(--c-white);
    box-shadow: inset 1px 1px var(--c-gray), 
                inset -1px -1px var(--c-white), 
                inset 2px 2px var(--c-dark), 
                inset -2px -2px var(--c-silver-light);
    overflow: auto;
    position: relative;
}

.window-statusbar {
    display: flex;
    gap: 3px;
    padding-top: 3px;
    margin-top: 2px;
}

.status-cell {
    flex: 1;
    padding: 2px 6px;
    font-size: 11px;
    color: #333;
    box-shadow: inset 1px 1px var(--c-gray), 
                inset -1px -1px var(--c-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Window Content Bodies */
.iframe-window-body {
    background: #110e0c;
    overflow: hidden;
}

.iframe-window-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.notepad-body {
    background: #ffffff;
    padding: 4px;
}

.notepad-textarea {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    resize: none;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.45;
    color: #000000;
    background: transparent;
    user-select: text;
    -webkit-user-select: text;
}

.terminal-body {
    background: #000000;
    color: #22c55e;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.4;
    padding: 10px;
    user-select: text;
    -webkit-user-select: text;
}

.terminal-output {
    display: flex;
    flex-direction: column;
}

.term-line {
    white-space: pre-wrap;
    word-break: break-all;
}

.text-amber { color: #f59e0b; }
.text-white { color: #ffffff; font-weight: bold; }

.terminal-input-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.term-prompt {
    color: #ffffff;
    font-weight: bold;
    flex-shrink: 0;
}

.term-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #22c55e;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: bold;
    caret-color: #22c55e;
}

/* Contact Dialog */
.contact-dialog-body {
    background: var(--c-silver);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dialog-top-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--c-gray);
}

.banner-avatar {
    width: 44px;
    height: 44px;
    background: #000080;
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 1px 1px var(--c-dark), inset -1px -1px var(--c-white);
}

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

.banner-info strong {
    font-size: 13px;
}

.banner-info span {
    font-size: 11px;
    color: #444;
}

.social-links-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.retro-social-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    background: var(--c-silver);
    text-decoration: none;
    color: var(--c-dark);
    box-shadow: inset 1px 1px var(--c-white), 
                inset -1px -1px var(--c-dark), 
                inset 2px 2px var(--c-silver-light), 
                inset -2px -2px var(--c-gray);
}

.retro-social-btn:hover {
    background: #000080;
    color: #ffffff;
}

.retro-social-btn:hover .btn-sub {
    color: #dfdfdf;
}

.retro-social-btn:active {
    box-shadow: inset 1px 1px var(--c-dark), 
                inset -1px -1px var(--c-white), 
                inset 2px 2px var(--c-gray), 
                inset -2px -2px var(--c-silver-light);
}

.btn-icon-retro {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.btn-text-block {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.btn-title {
    font-weight: bold;
    font-size: 11px;
}

.btn-sub {
    font-size: 10px;
    color: #555;
}

.btn-arrow {
    font-size: 12px;
}

.dialog-button-row {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: auto;
}

/* Explorer / Recycle Bin */
.explorer-body {
    background: #ffffff;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.explorer-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px;
    cursor: pointer;
    font-size: 11px;
}

.explorer-item:hover {
    background: #000080;
    color: #ffffff;
}

.explorer-item:hover .item-size {
    color: #dfdfdf;
}

.item-icon { font-size: 16px; }
.item-name { flex: 1; }
.item-size { color: #777; font-size: 10px; }

/* Shutdown Dialog */
.shutdown-dialog-body {
    background: var(--c-silver);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shutdown-msg-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.shutdown-big-icon { font-size: 32px; }

.shutdown-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-left: 44px;
}

.shutdown-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* Desktop Taskbar & Start Menu */
.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: var(--c-silver);
    box-shadow: inset 1px 1px var(--c-white), inset 0 2px var(--c-silver-light);
    border-top: 1px solid var(--c-white);
    display: flex;
    align-items: center;
    padding: 2px 3px;
    gap: 4px;
    z-index: 1000;
}

.start-button {
    height: 24px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 2px 6px;
    background: var(--c-silver);
    border: none;
    cursor: pointer;
    box-shadow: inset 1px 1px var(--c-white), 
                inset -1px -1px var(--c-dark), 
                inset 2px 2px var(--c-silver-light), 
                inset -2px -2px var(--c-gray);
    outline: none;
}

.start-button.active,
.start-button:active {
    box-shadow: inset 1px 1px var(--c-dark), 
                inset -1px -1px var(--c-white), 
                inset 2px 2px var(--c-gray), 
                inset -2px -2px var(--c-silver-light);
    padding: 3px 5px 1px 7px;
}

.start-label {
    font-weight: bold;
    font-size: 11px;
    letter-spacing: 0.3px;
}

.taskbar-divider {
    width: 2px;
    height: 20px;
    box-shadow: inset 1px 1px var(--c-gray), inset -1px -1px var(--c-white);
    margin: 0 2px;
}

.taskbar-tabs {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 3px;
    overflow-x: auto;
    height: 100%;
}

.taskbar-tab {
    display: flex;
    align-items: center;
    gap: 5px;
    max-width: 150px;
    height: 24px;
    padding: 2px 6px;
    background: var(--c-silver);
    border: none;
    cursor: pointer;
    box-shadow: inset 1px 1px var(--c-white), 
                inset -1px -1px var(--c-dark), 
                inset 2px 2px var(--c-silver-light), 
                inset -2px -2px var(--c-gray);
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    outline: none;
}

.taskbar-tab.active {
    background: var(--c-silver-light);
    box-shadow: inset 1px 1px var(--c-dark), 
                inset -1px -1px var(--c-white), 
                inset 2px 2px var(--c-gray), 
                inset -2px -2px var(--c-silver-light);
    font-weight: bold;
}

.system-tray {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 22px;
    padding: 0 6px;
    box-shadow: inset 1px 1px var(--c-gray), 
                inset -1px -1px var(--c-white);
}

.tray-icon-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 12px;
    padding: 0 2px;
    line-height: 1;
}

.tray-switch-btn {
    background: #000080;
    color: #ffffff;
    font-size: 10px;
    font-weight: bold;
    border: none;
    padding: 2px 6px;
    cursor: pointer;
    border-radius: 2px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.tray-switch-btn:hover {
    background: #1084d0;
}

.tray-clock {
    font-size: 11px;
    letter-spacing: 0.5px;
}

/* Start Menu */
.start-menu {
    position: fixed;
    bottom: 30px;
    left: 2px;
    width: 220px;
    background: var(--c-silver);
    box-shadow: inset 1px 1px var(--c-white), 
                inset -1px -1px var(--c-dark), 
                inset 2px 2px var(--c-silver-light), 
                inset -2px -2px var(--c-gray),
                3px -3px 12px rgba(0, 0, 0, 0.4);
    display: flex;
    z-index: 10000;
}

.start-menu-sidebar {
    width: 28px;
    background: linear-gradient(180deg, #000080, #1084d0);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 12px;
}

.sidebar-text {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    color: #ffffff;
    font-size: 14px;
    letter-spacing: 1px;
}

.start-menu-items {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 3px;
}

.start-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 11px;
}

.start-item:hover {
    background: #000080;
    color: #ffffff;
}

.start-item-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.start-separator {
    height: 1px;
    background: var(--c-gray);
    border-bottom: 1px solid var(--c-white);
    margin: 4px 2px;
}

/* ==========================================================================
   2. RETRO SMARTPHONE INTERFACE (DarwishPhone / Mobile Mode)
   ========================================================================== */
.phone-viewport {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: linear-gradient(160deg, #090d16 0%, #111827 50%, #030712 100%);
    display: flex;
    flex-direction: column;
    font-family: var(--font-phone);
    color: #ffffff;
}

/* Phone Status Bar */
.phone-statusbar {
    height: 44px;
    padding: 10px 18px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.2px;
    z-index: 10;
}

.phone-carrier-block {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    letter-spacing: 0.5px;
    color: #94a3b8;
}

.signal-dots {
    display: flex;
    gap: 2px;
}

.signal-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #cbd5e1;
}

.phone-status-time {
    font-weight: 700;
    font-size: 14px;
}

.phone-status-battery-block {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #94a3b8;
}

/* Cross-Device Hint Banner on Smartphone */
.phone-desktop-hint-banner {
    margin: 10px 16px 4px;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #cbd5e1;
    backdrop-filter: blur(12px);
    cursor: pointer;
    transition: background 0.15s ease;
}

.phone-desktop-hint-banner:hover {
    background: rgba(51, 65, 85, 0.85);
}

.hint-banner-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hint-banner-icon {
    font-size: 16px;
}

.hint-banner-text strong {
    color: #ffffff;
}

.hint-banner-switch {
    font-size: 11px;
    color: #60a5fa;
    font-weight: 600;
}

/* Home Screen Clock & Date Widget */
.phone-widget-area {
    padding: 24px 16px 12px;
    text-align: center;
}

.phone-widget-clock {
    font-size: 54px;
    font-weight: 200;
    letter-spacing: -1.5px;
    line-height: 1;
    margin-bottom: 6px;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.phone-widget-date {
    font-size: 15px;
    font-weight: 500;
    color: #94a3b8;
    letter-spacing: 0.2px;
}

/* Phone App Grid */
.phone-grid-area {
    flex: 1;
    padding: 16px 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px 14px;
    align-content: flex-start;
}

.phone-app-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.phone-app-icon:active {
    transform: scale(0.92);
}

.phone-icon-squircle {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.phone-icon-squircle::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 45%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0) 100%);
    border-radius: 14px 14px 0 0;
}

.icon-bg-letter { background: linear-gradient(135deg, #7c2d12, #b91c1c); }
.icon-bg-notes { background: linear-gradient(135deg, #f59e0b, #d97706); }
.icon-bg-terminal { background: linear-gradient(135deg, #18181b, #09090b); border: 1px solid #27272a; }
.icon-bg-contacts { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.icon-bg-github { background: linear-gradient(135deg, #27272a, #18181b); }
.icon-bg-linkedin { background: linear-gradient(135deg, #0284c7, #0369a1); }
.icon-bg-safari { background: linear-gradient(135deg, #38bdf8, #0284c7); }
.icon-bg-trash { background: linear-gradient(135deg, #475569, #334155); }

.phone-icon-title {
    margin-top: 6px;
    font-size: 11px;
    font-weight: 500;
    color: #f1f5f9;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    letter-spacing: -0.1px;
    white-space: nowrap;
}

/* Phone Bottom Dock */
.phone-dock-shelf {
    margin: auto 16px 20px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 28px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.dock-item:active {
    transform: scale(0.9);
}

.dock-item .phone-icon-squircle {
    width: 54px;
    height: 54px;
    border-radius: 13px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

/* Full-Screen Phone App Sheets */
.phone-app-sheet {
    position: absolute;
    inset: 0;
    background: #0f172a;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.34s cubic-bezier(0.32, 0.72, 0, 1);
}

.phone-app-sheet.open {
    transform: translateY(0);
}

.phone-sheet-navbar {
    height: 50px;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    flex-shrink: 0;
}

.sheet-back-btn {
    background: transparent;
    border: none;
    color: #38bdf8;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 3px;
}

.sheet-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.sheet-action-btn {
    background: transparent;
    border: none;
    color: #38bdf8;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.phone-sheet-content {
    flex: 1;
    overflow-y: auto;
    background: #000000;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

/* 1. Mobile ChronoLetter Frame */
.mobile-letter-frame {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: #110e0c;
}

/* 2. Mobile Notes Sheet (Lined Paper) */
.mobile-notes-paper {
    background: #faf7ee;
    min-height: 100%;
    padding: 24px 20px;
    color: #1c1917;
    font-family: var(--font-phone);
    line-height: 1.6;
}

.notes-heading {
    font-size: 24px;
    font-weight: 800;
    color: #0c0a09;
    margin-bottom: 4px;
}

.notes-subtitle {
    font-size: 13px;
    color: #78716c;
    font-weight: 500;
    margin-bottom: 20px;
    border-bottom: 1px solid #e7e5e4;
    padding-bottom: 12px;
}

.notes-section-title {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #b45309;
    margin-top: 18px;
    margin-bottom: 8px;
}

.notes-body-text {
    font-size: 14px;
    color: #292524;
    margin-bottom: 12px;
}

.notes-stack-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0;
}

.notes-stack-item {
    background: #ffffff;
    border: 1px solid #e7e5e4;
    border-radius: 8px;
    padding: 10px 12px;
}

.notes-stack-item strong {
    display: block;
    font-size: 13px;
    color: #0c0a09;
}

.notes-stack-item span {
    font-size: 12px;
    color: #57534e;
}

/* 3. Mobile Terminal Sheet */
.mobile-terminal-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #000000;
}

.mobile-terminal-screen {
    flex: 1;
    padding: 14px;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 13px;
    color: #22c55e;
    line-height: 1.45;
}

.mobile-quick-pills {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    background: #111827;
    border-top: 1px solid #1f2937;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-pill-btn {
    background: #1f2937;
    color: #4ade80;
    border: 1px solid #374151;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-family: var(--font-mono);
    cursor: pointer;
    white-space: nowrap;
    font-weight: 600;
}

.mobile-pill-btn:active {
    background: #22c55e;
    color: #000000;
}

.mobile-terminal-input-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #030712;
    border-top: 1px solid #1f2937;
}

.mobile-term-prompt {
    color: #ffffff;
    font-family: var(--font-mono);
    font-weight: bold;
    font-size: 13px;
}

.mobile-term-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #22c55e;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: bold;
}

/* 4. Mobile Contacts Card */
.mobile-contact-card {
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #0f172a;
    min-height: 100%;
}

.mobile-avatar-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: #ffffff;
    font-size: 26px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
    margin-bottom: 12px;
}

.mobile-contact-name {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}

.mobile-contact-role {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 24px;
}

.mobile-contact-actions-grid {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-action-card-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    text-decoration: none;
    color: #ffffff;
    transition: background 0.15s ease;
}

.mobile-action-card-btn:active {
    background: #334155;
}

.action-card-icon {
    font-size: 24px;
    width: 32px;
    text-align: center;
}

.action-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.action-card-title {
    font-size: 14px;
    font-weight: 600;
}

.action-card-sub {
    font-size: 12px;
    color: #94a3b8;
}

.action-card-arrow {
    font-size: 14px;
    color: #64748b;
}

/* ==========================================================================
   SHUTDOWN SCREEN SIMULATION
   ========================================================================== */
.shutdown-blackout {
    position: fixed;
    inset: 0;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
}

.shutdown-screen-content {
    text-align: center;
    color: #f59e0b;
    font-family: var(--font-mono);
}

.shutdown-screen-text {
    font-size: 1.8rem;
    line-height: 1.4;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}
