/* ==========================================================================
   OrbitOS system screens (H209B)
   Boot and power screens, lock screen, status bar, the home screen (terminal
   header + greeting card) and the recovery menu, in the same style as the apps.
   Backgrounds are left to the themes so Glass/AMOLED/wallpapers still apply.
   ========================================================================== */

/* ---------- Orbit mark (boot, reboot, shutdown, recovery, wipe) ---------- */

.sys-orbit {
    position: relative;
    width: 92px;
    height: 92px;
    margin: 0 auto 22px;
}

.sys-orbit-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1.5px solid color-mix(in srgb, var(--on-surface, #ffffff) 22%, transparent);
}

.sys-orbit-planet {
    position: absolute;
    inset: 26px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ffffff 0%, color-mix(in srgb, var(--accent-primary, #4790e6) 55%, #ffffff) 45%, var(--accent-primary, #4790e6) 100%);
}

.sys-orbit-track {
    position: absolute;
    inset: 0;
    animation: sysOrbit 2.4s linear infinite;
}

.sys-orbit-moon {
    position: absolute;
    top: -5px;
    left: 50%;
    width: 10px;
    height: 10px;
    margin-left: -5px;
    border-radius: 50%;
    background: var(--on-surface, #ffffff);
}

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

:is(#boot-screen, #reboot-screen, #shutdown-screen, #entering-recovery-screen, #wipe-screen, #update-screen) .boot-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

:is(#boot-screen, #reboot-screen, #shutdown-screen, #entering-recovery-screen, #wipe-screen, #update-screen) .boot-title {
    font-family: var(--font-main) !important;
    font-size: 1.7rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.03em !important;
    text-transform: none !important;
    color: var(--on-surface) !important;
    margin: 0 0 18px !important;
}

/* The spinner becomes a slim moving bar. */
:is(#boot-screen, #reboot-screen, #shutdown-screen, #entering-recovery-screen, #wipe-screen, #update-screen) .boot-loader {
    position: relative;
    width: 120px !important;
    height: 4px !important;
    border: none !important;
    border-radius: 4px !important;
    background: color-mix(in srgb, var(--on-surface, #ffffff) 14%, transparent) !important;
    overflow: hidden;
    animation: none !important;
}

:is(#boot-screen, #reboot-screen, #shutdown-screen, #entering-recovery-screen, #wipe-screen, #update-screen) .boot-loader::after {
    content: '';
    position: absolute;
    top: 0;
    left: -40%;
    width: 40%;
    height: 100%;
    border-radius: 4px;
    background: var(--accent-primary, #4790e6);
    animation: sysBar 1.1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes sysBar {
    to { left: 100%; }
}

:is(#reboot-screen, #shutdown-screen, #entering-recovery-screen, #wipe-screen, #update-screen) [id$="-status-label"] {
    margin-top: 16px !important;
    font-family: var(--font-main) !important;
    font-size: 0.9rem !important;
    letter-spacing: 0 !important;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 65%, transparent) !important;
    opacity: 1 !important;
}

#boot-screen .boot-footer {
    font-family: var(--font-main) !important;
    font-size: 0.75rem !important;
    font-weight: 600;
    letter-spacing: 0.08em !important;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 45%, transparent) !important;
    opacity: 1 !important;
}

@media (prefers-reduced-motion: reduce) {
    .sys-orbit-track,
    :is(#boot-screen, #reboot-screen, #shutdown-screen, #entering-recovery-screen, #wipe-screen, #update-screen) .boot-loader::after {
        animation-duration: 6s;
    }
}

/* ---------- Lock screen ---------- */

#lock-screen .lock-header {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#lock-screen .lock-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 18px;
    border-radius: 50%;
    border: 1px solid color-mix(in srgb, var(--on-surface, #ffffff) 22%, transparent);
    color: var(--on-surface);
}

#lock-screen #lock-time {
    font-family: var(--font-main) !important;
    font-size: clamp(4.5rem, 24vw, 7.5rem) !important;
    font-weight: 300 !important;
    letter-spacing: -0.05em !important;
    line-height: 1 !important;
    font-variant-numeric: tabular-nums;
}

#lock-screen #lock-date {
    margin-top: 10px !important;
    font-family: var(--font-main) !important;
    font-size: 1.1rem !important;
    font-weight: 500 !important;
    opacity: 0.85;
}

#lock-screen .lock-status-bar {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px !important;
}

#lock-screen .lock-status-bar span:not(:empty) {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--on-surface, #ffffff) 18%, transparent);
    font-family: var(--font-main);
    font-size: 0.8rem !important;
    font-weight: 600;
    opacity: 1 !important;
}

/* "Tap to unlock" sits at the bottom like a phone lock screen. */
#lock-screen #lock-welcome {
    position: fixed;
    left: 50%;
    bottom: calc(40px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    padding: 10px 20px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--on-surface, #ffffff) 18%, transparent);
    font-family: var(--font-main) !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    color: var(--on-surface) !important;
    opacity: 1 !important;
}

#lock-screen #lock-welcome::before {
    content: '';
    width: 14px;
    height: 14px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 15 12 9 18 15'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 15 12 9 18 15'/%3E%3C/svg%3E") center / contain no-repeat;
}

#lock-screen #password-form {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 8px;
    width: 100% !important;
    max-width: 360px;
    margin: 0 auto;
    box-sizing: border-box;
}

#lock-screen #password-container[style*="block"],
#lock-screen #password-container[style*="flex"] {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    width: 100% !important;
    max-width: none !important;
    padding: 0 20px !important;
    box-sizing: border-box;
}

#lock-screen #password-input {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0;
    height: 50px !important;
    padding: 0 20px !important;
    border-radius: 999px !important;
    border: 1px solid color-mix(in srgb, var(--on-surface, #ffffff) 22%, transparent) !important;
    background: color-mix(in srgb, var(--background, #05080c) 60%, transparent) !important;
    color: var(--on-surface) !important;
    font-family: var(--font-main) !important;
    font-size: 16px !important;
    box-shadow: none !important;
    outline: none;
}

#lock-screen #password-input:focus {
    border-color: color-mix(in srgb, var(--on-surface, #ffffff) 50%, transparent) !important;
}

#lock-screen #unlock-button {
    width: auto !important;
    flex: 0 0 auto !important;
    height: 50px !important;
    padding: 0 22px !important;
    border: none !important;
    border-radius: 999px !important;
    background: color-mix(in srgb, var(--on-surface, #ffffff) 22%, #ffffff) !important;
    color: color-mix(in srgb, var(--background, #05080c) 85%, #000000) !important;
    font-family: var(--font-main) !important;
    font-weight: 700 !important;
    box-shadow: none !important;
}

#lock-screen #password-error {
    font-family: var(--font-main);
    font-size: 0.85rem;
}

#lock-screen #forgot-password {
    font-family: var(--font-main);
    font-size: 0.85rem;
    font-weight: 600;
}

/* ---------- Status bar (H209B) ----------
   Time on the left, then what's playing; quick icons, network, battery and the
   account on the right. Flush with the theme background, no pill borders. */

body.new-design #status-bar {
    height: 40px !important;
    padding: 0 12px 0 18px !important;
    gap: 10px;
    background: var(--background, #05080c) !important;
    font-family: var(--font-main) !important;
}

body.new-design #status-bar.has-wallpaper {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0)) !important;
}

body.new-design #status-bar::before {
    display: none !important;
}

#status-bar .sb-left,
#status-bar .sb-right {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

#status-bar .sb-right {
    gap: 2px;
    flex-shrink: 0;
}

#status-bar .sb-left {
    flex: 1 1 auto;
    overflow: hidden;
}

body.new-design #status-bar #status-time {
    font-family: var(--font-main) !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    white-space: nowrap;
}

body.new-design #status-bar .sb-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px !important;
    min-width: 0 !important;
    height: 32px !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 50% !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--on-surface) !important;
    cursor: pointer;
}

body.new-design #status-bar .sb-icon-btn svg {
    width: 17px;
    height: 17px;
}

body.new-design #status-bar .sb-icon-btn:active {
    background: color-mix(in srgb, var(--on-surface, #ffffff) 12%, transparent) !important;
}

#status-bar .sb-net {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 32px;
    color: var(--on-surface);
    opacity: 0.9;
}

#status-bar .sb-net.is-offline {
    color: var(--error, #e5534b);
    opacity: 1;
}

body.new-design #status-bar #status-battery {
    align-items: center;
    gap: 5px;
    padding: 0 6px !important;
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    font-family: var(--font-main) !important;
    font-size: 0.8rem;
    font-weight: 700 !important;
    font-variant-numeric: tabular-nums;
}

body.new-design #status-bar .sb-batt-text {
    font-family: var(--font-main);
}

#status-bar .status-account-pill {
    margin-left: 4px;
}

body.new-design #status-bar .status-now-playing-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 150px !important;
    height: 26px;
    padding: 0 10px !important;
    border: none !important;
    border-radius: 999px !important;
    background: color-mix(in srgb, #e8557f 22%, transparent) !important;
    color: var(--on-surface) !important;
    box-shadow: none !important;
    font-family: var(--font-main) !important;
    font-size: 0.76rem !important;
    font-weight: 600 !important;
}

body.new-design #status-bar .status-now-playing-icon {
    flex-shrink: 0;
    color: #e8557f;
}

body.new-design #status-bar .status-now-playing-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.new-design #status-bar #status-fps {
    padding: 0 !important;
    border: none !important;
    background: none !important;
    font-family: var(--font-mono) !important;
    font-size: 0.72rem !important;
    opacity: 0.7;
}

html.theme-amoled body.new-design #status-bar {
    background: #000000 !important;
}

html.theme-amoled body.new-design #status-bar .status-now-playing-pill {
    background: #1c1c1c !important;
}

html.theme-amoled body.new-design #status-bar .status-now-playing-icon {
    color: #ffffff;
}

/* ---------- Home screen: terminal header ---------- */

html:not(.theme-glassmorphism):not(.theme-glass):not(.theme-glass-static) body.new-design .terminal-header {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

body.new-design .terminal-header {
    display: flex !important;
    align-items: center;
    gap: 10px;
    min-height: 48px !important;
    padding: 6px 16px !important;
}

body.new-design .terminal-header .terminal-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 10px;
    background: var(--accent-primary, #4790e6);
    color: var(--background, #05080c);
}

body.new-design .terminal-header .terminal-title {
    font-family: var(--font-main) !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    opacity: 1 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.new-design .terminal-header .terminal-user {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 50%, transparent);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

body:not(.new-design) .terminal-header :is(.terminal-mark, .terminal-user) {
    display: none;
}

html.theme-amoled body.new-design .terminal-header .terminal-mark {
    background: #ffffff !important;
    color: #000000 !important;
}

/* ---------- Home screen: greeting card ---------- */

.output .home-hello {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0 0 12px !important;
    padding: 18px;
    border-radius: 24px;
    border: 1px solid color-mix(in srgb, var(--on-surface, #ffffff) 11%, transparent);
    background: var(--surface-color, #0d1117);
    font-family: var(--font-main);
    animation: none;
}

.output .home-hello * {
    margin: 0 !important;
}

.output .home-hello-top {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 60%, transparent) !important;
}

.output .home-hello-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: var(--accent-primary, #4790e6);
    color: var(--background, #05080c) !important;
}

.output .home-hello-title {
    margin-top: 10px !important;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--on-surface);
    word-break: break-word;
}

.output .home-hello-sub {
    font-size: 0.86rem;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 60%, transparent) !important;
}

.output .home-hello-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px !important;
}

.output .home-chip {
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--on-surface, #ffffff) 20%, transparent);
    background: transparent;
    color: var(--on-surface);
    font-family: var(--font-main);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
}

.output .home-chip:first-child {
    border-color: transparent;
    background: color-mix(in srgb, var(--on-surface, #ffffff) 22%, #ffffff);
    color: color-mix(in srgb, var(--background, #05080c) 85%, #000000);
}

.output .home-safe .home-hello-mark { background: #f59e0b !important; color: #111111 !important; }
.output .home-safe .home-hello-title { font-size: 1.35rem; }
.output .home-safe .home-hello-sub { line-height: 1.5; }

.output .home-hint {
    font-size: 0.85em;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 60%, transparent) !important;
}

html.theme-amoled .output .home-hello {
    background: #0a0a0a !important;
    border-color: #262626 !important;
}

html.theme-amoled .output .home-hello-mark {
    background: #ffffff !important;
    color: #000000 !important;
}

html.theme-amoled .output .home-chip:first-child {
    background: #ffffff !important;
    color: #000000 !important;
}

html.theme-solar-flare .output .home-chip:first-child {
    background: var(--on-surface);
    color: var(--background);
}

/* ---------- Help (H212B): grouped command cards you can tap ---------- */

.output .help-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 640px;
    margin: 0 0 12px !important;
    padding: 16px;
    border-radius: 24px;
    border: 1px solid color-mix(in srgb, var(--on-surface, #ffffff) 11%, transparent);
    background: var(--surface-color, #0d1117);
    font-family: var(--font-main);
    color: var(--on-surface);
}

.output .help-card * { margin: 0 !important; }
.output .help-card div { margin: 0 !important; }

.output .help-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.output .help-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 13px;
    background: var(--accent-primary, #4790e6);
    color: var(--background, #05080c);
}

.output .help-head-text { display: flex; flex-direction: column; min-width: 0; }
.output .help-title { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; word-break: break-word; }
.output .help-sub { font-size: 0.82rem; color: color-mix(in srgb, var(--on-surface, #ffffff) 60%, transparent); }

.output .help-groups { display: flex; flex-direction: column; gap: 6px; }

.output .help-group {
    border-radius: 18px;
    background: color-mix(in srgb, var(--on-surface, #ffffff) 4%, transparent);
    border: 1px solid color-mix(in srgb, var(--on-surface, #ffffff) 7%, transparent);
    overflow: hidden;
}

.output .help-group.is-open { border-color: color-mix(in srgb, var(--hue) 35%, transparent); }

.output .help-group-head {
    all: unset;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 54px;
    padding: 8px 10px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.output .help-group-head:focus-visible { outline: 2px solid var(--hue); outline-offset: -2px; border-radius: 18px; }

.output .help-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: var(--hue);
    color: #ffffff;
}

.output .help-group-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.output .help-group-text b { font-size: 0.95rem; font-weight: 650; }
.output .help-group-text small {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 50%, transparent);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.output .help-count {
    flex: none;
    min-width: 26px;
    padding: 2px 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--hue) 18%, transparent);
    color: color-mix(in srgb, var(--hue) 70%, var(--on-surface, #ffffff));
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
}

.output .help-chev { display: inline-flex; flex: none; opacity: 0.55; }
.output .help-group.is-open .help-chev { transform: rotate(180deg); }

/* Closed groups fold to nothing; open ones grow to fit. */
.output .help-group-body { display: grid; grid-template-rows: 0fr; }
.output .help-group.is-open .help-group-body { grid-template-rows: 1fr; }
.output .help-group-inner { min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 2px; padding: 0 6px; }
.output .help-group.is-open .help-group-inner { padding: 0 6px 6px; }

.output .help-row {
    all: unset;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 52px;
    padding: 8px 10px;
    border-radius: 13px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.output .help-row:active,
.output .help-chip:active { background: color-mix(in srgb, var(--hue) 16%, transparent); }
.output .help-row:focus-visible,
.output .help-chip:focus-visible { outline: 2px solid var(--hue); outline-offset: -2px; }

.output .help-row-text { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: 1px; }

.output .help-syntax {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    word-break: break-word;
}

.output .help-syntax b { font-weight: 700; color: color-mix(in srgb, var(--hue) 55%, var(--on-surface, #ffffff)); }
.output .help-syntax i { font-style: normal; color: color-mix(in srgb, var(--on-surface, #ffffff) 45%, transparent); }
.output .help-desc { font-size: 0.8rem; line-height: 1.35; color: color-mix(in srgb, var(--on-surface, #ffffff) 65%, transparent); }

.output .help-go {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--on-surface, #ffffff) 7%, transparent);
    color: color-mix(in srgb, var(--on-surface, #ffffff) 70%, transparent);
}

.output .help-tag {
    flex: none;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--on-surface, #ffffff) 18%, transparent);
    font-size: 0.7rem;
    font-weight: 700;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 70%, transparent);
}

.output .help-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 6px 6px; }

.output .help-chip {
    height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--hue) 35%, transparent);
    background: color-mix(in srgb, var(--hue) 8%, transparent);
    color: var(--on-surface);
    font-family: var(--font-main);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.output .help-chip.is-missing { opacity: 0.55; border-style: dashed; }

.output .help-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px !important;
    padding: 18px 8px;
    text-align: center;
    font-size: 0.86rem;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 65%, transparent);
}

.output .help-pill {
    height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    border: none;
    background: var(--accent-primary, #4790e6);
    color: var(--background, #05080c);
    font: 600 0.85rem var(--font-main);
    cursor: pointer;
}

.output .help-foot {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 0 4px;
    font-size: 0.78rem;
    line-height: 1.45;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 55%, transparent) !important;
}

.output .help-foot > svg { flex: none; margin-top: 2px !important; }
.output .help-foot b { font-family: var(--font-mono); font-weight: 600; color: var(--on-surface); }
.output .help-foot span svg { vertical-align: -1px; }

html.theme-amoled .output .help-card { background: #0a0a0a !important; border-color: #262626 !important; }
html.theme-amoled .output .help-mark { background: #ffffff !important; color: #000000 !important; }
html.theme-amoled .output .help-group { background: #111111; border-color: #222222; }

/* ---------- Recovery (4.4.1): a full page in the Design v3 kit ---------- */

#recovery-screen {
    padding: 0 !important;
    align-items: stretch !important;
    justify-content: center !important;
    background: var(--background) !important;
    font-family: var(--font-main);
}

#recovery-screen .rv {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    color: var(--on-surface);
    background: var(--background);
    animation: rvIn 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

#recovery-screen .rv-page {
    max-width: 560px;
    margin: 0 auto;
    padding: calc(14px + env(safe-area-inset-top, 0px)) 16px calc(28px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}

#recovery-screen .rv-in {
    animation: rvRise 0.36s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    animation-delay: calc(var(--i, 0) * 35ms);
}

@keyframes rvIn { from { opacity: 0; transform: scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes rvRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

#recovery-screen .rv-top {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
}

#recovery-screen .rv-top-mark {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--hue);
    color: #ffffff;
}

#recovery-screen .rv-top-title { flex: 1; font-size: 1.05rem; font-weight: 700; }
#recovery-screen .rv-top-count { font-size: 0.82rem; color: var(--ok-muted); font-variant-numeric: tabular-nums; }

#recovery-screen .ok-section { margin: 6px 4px -4px; }

#recovery-screen .rv-row {
    width: 100%;
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.18s ease, transform 0.12s ease;
}

#recovery-screen .ok-list > * + .rv-row { border-top: 1px solid var(--ok-line); }
#recovery-screen .rv-row:active { transform: scale(0.985); }
#recovery-screen .rv-row:hover,
#recovery-screen .rv-row.is-focus { background: color-mix(in srgb, var(--on-surface) 6%, transparent); }
#recovery-screen .rv-row:focus-visible { outline: 2px solid var(--hue); outline-offset: -2px; }
#recovery-screen .rv-row.is-danger .ok-row-title { color: #ef4444; }

#recovery-screen .rv-status.is-bad { box-shadow: inset 3px 0 0 #ef4444; }
#recovery-screen .rv-status .rv-msg { color: var(--on-surface); opacity: 0.9; margin-top: 2px; overflow-wrap: anywhere; }
#recovery-screen .rv-status .rv-fix { margin-top: 4px; }

#recovery-screen .rv-foot { margin: 4px 4px 0; font-size: 0.78rem; color: var(--ok-muted); text-align: center; }

/* Logs */
#recovery-screen .rv-search {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 46px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--ok-line);
    background: var(--ok-card);
    color: var(--ok-muted);
}
#recovery-screen .rv-search:focus-within { border-color: var(--hue); }
#recovery-screen .rv-search input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    color: var(--on-surface);
    font: 500 0.95rem var(--font-main);
}

#recovery-screen .rv-seg { --hue: var(--app-hue); }

#recovery-screen .rv-log-list { display: flex; flex-direction: column; gap: 8px; }

#recovery-screen .rv-log {
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--ok-line);
    background: var(--ok-card);
    box-shadow: inset 3px 0 0 var(--lv);
    animation: rvRise 0.25s ease both;
}

#recovery-screen .rv-log-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 0.74rem; }
#recovery-screen .rv-log-level {
    padding: 2px 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--lv) 18%, transparent);
    color: var(--lv);
    font-weight: 800;
}
#recovery-screen .rv-log-tag { font-weight: 700; color: var(--ok-muted); letter-spacing: 0.04em; }
#recovery-screen .rv-log-time { margin-left: auto; color: var(--ok-muted); font-variant-numeric: tabular-nums; }
#recovery-screen .rv-log-msg { font-size: 0.9rem; line-height: 1.45; overflow-wrap: anywhere; }

#recovery-screen .rv-actions { display: flex; gap: 10px; flex-wrap: wrap; }
#recovery-screen .rv-actions .ok-btn { flex: 1 1 160px; justify-content: center; }
#recovery-screen .rv-danger-btn { color: #ef4444; border-color: color-mix(in srgb, #ef4444 45%, transparent); }

#recovery-screen .rv-fatal .rv-page { justify-content: center; min-height: 100%; }

html.no-animations #recovery-screen .rv,
html.no-animations #recovery-screen .rv-in,
html.no-animations #recovery-screen .rv-log,
body.no-animations #recovery-screen .rv,
body.no-animations #recovery-screen .rv-in,
body.no-animations #recovery-screen .rv-log { animation: none !important; }

@media (prefers-reduced-motion: reduce) {
    #recovery-screen .rv, #recovery-screen .rv-in, #recovery-screen .rv-log { animation: none !important; }
}

html.theme-amoled #recovery-screen,
html.theme-amoled #recovery-screen .rv { background: #000000 !important; }
html.theme-amoled #recovery-screen .rv-top-mark { background: #ffffff; color: #000000; }
html.theme-amoled #recovery-screen .rv-log,
html.theme-amoled #recovery-screen .rv-search { background: #000000; }

html.theme-amoled .sys-orbit-planet {
    background: radial-gradient(circle at 35% 30%, #ffffff 0%, #bdbdbd 100%);
}

html.theme-amoled :is(#boot-screen, #reboot-screen, #shutdown-screen, #entering-recovery-screen, #wipe-screen, #update-screen) .boot-loader::after {
    background: #ffffff;
}

/* ==========================================================================
   Accounts (app/accounts.js): avatars, the editor, lock screen, status bar,
   home greeting and the Settings profile card.
   ========================================================================== */

.acct-avatar {
    --size: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--size);
    height: var(--size);
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(150deg, color-mix(in srgb, var(--acct, #f08c2e) 70%, #000000), var(--acct, #f08c2e) 60%, color-mix(in srgb, var(--acct, #f08c2e) 60%, #ffffff));
    color: #ffffff !important;
    font-family: var(--font-main);
    font-size: calc(var(--size) * 0.4);
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.01em;
}

.acct-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.acct-avatar.is-empty {
    background: color-mix(in srgb, var(--on-surface, #ffffff) 12%, transparent);
    color: var(--on-surface) !important;
}

.acct-avatar.is-empty svg {
    width: 55%;
    height: 55%;
}

/* Editor (Setup step and Accounts app) */

.acct-editor {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.acct-editor-photo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 6px 0 2px;
}

.acct-photo-btn {
    position: relative;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: none;
    cursor: pointer;
}

.acct-photo-badge {
    position: absolute;
    right: 0;
    bottom: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 3px solid var(--background, #05080c);
    background: color-mix(in srgb, var(--on-surface, #ffffff) 22%, #ffffff);
    color: #111318;
}

.acct-photo-hint,
.acct-photo-remove {
    font-family: var(--font-main);
    font-size: 0.82rem;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 60%, transparent);
}

.acct-photo-remove {
    padding: 4px 10px;
    border: none;
    background: none;
    color: var(--error, #e5534b);
    font-weight: 600;
    cursor: pointer;
}

.acct-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.acct-field-label {
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 60%, transparent);
}

.acct-input {
    width: 100%;
    box-sizing: border-box;
    height: 50px;
    padding: 0 16px;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--on-surface, #ffffff) 22%, transparent) !important;
    background: var(--surface-color, #0d1117) !important;
    color: var(--on-surface) !important;
    font: 1rem var(--font-main);
    outline: none;
    box-shadow: none !important;
}

.acct-input:focus {
    border-color: color-mix(in srgb, var(--on-surface, #ffffff) 50%, transparent) !important;
}

.acct-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.acct-color {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
    border: 3px solid transparent;
    background: var(--c) padding-box;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--on-surface, #ffffff) 14%, transparent);
    cursor: pointer;
}

.acct-editor .acct-color:not(.is-selected) {
    border-color: transparent !important;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--on-surface, #ffffff) 14%, transparent) !important;
}

.acct-editor .acct-color.is-selected {
    border-color: var(--background, #05080c) !important;
    box-shadow: 0 0 0 2px var(--on-surface, #ffffff) !important;
}

.acct-error {
    min-height: 1em;
    margin: -6px 0 0;
    font-size: 0.85rem;
    color: var(--error, #e5534b);
}

.acct-error:empty {
    display: none;
}

/* Accounts app */

#accounts-fullscreen .acct-hero .acct-hero-avatar {
    margin-bottom: 10px;
    border: 3px solid rgba(255, 255, 255, 0.35);
}

#accounts-fullscreen .acct-hero .acct-avatar.is-empty {
    background: rgba(0, 0, 0, 0.2);
    color: #ffffff !important;
}

#accounts-fullscreen .acct-active-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #10b981;
    color: #ffffff;
}

#accounts-fullscreen .acct-note p {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-size: 0.82rem;
    color: var(--ok-muted);
}

#accounts-fullscreen .acct-note svg {
    flex-shrink: 0;
    margin-top: 2px;
}

#accounts-fullscreen .ok-btn--block + .ok-btn--block {
    margin-top: -2px;
}

/* Lock screen */

#lock-screen .lock-account {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 28px 0 6px;
}

#lock-screen .lock-account-name {
    font-family: var(--font-main);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--on-surface);
}

#lock-screen .lock-account-switch {
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--on-surface, #ffffff) 22%, transparent);
    background: transparent;
    color: var(--on-surface);
    font: 600 0.8rem var(--font-main);
    cursor: pointer;
}

/* Status bar and home greeting */

#status-bar .status-account-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: none;
    cursor: pointer;
}

.output .home-hello-account {
    margin-left: auto;
    display: inline-flex;
}

/* Settings profile card as a button */

.settings-profile.settings-profile--account {
    width: 100%;
    border: none;
    text-align: left;
    font-family: var(--font-main);
    color: var(--on-surface);
    cursor: pointer;
}

.settings-profile--account .settings-profile-text {
    flex: 1;
}

.settings-profile-go {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    align-self: flex-start;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 60%, transparent);
}

html.theme-amoled .acct-avatar:not(:has(img)) {
    background: #1c1c1c;
    border: 1px solid #2a2a2a;
}

html.theme-amoled .acct-input {
    background: #0a0a0a !important;
    border-color: #2a2a2a !important;
}

/* Lock screen "Forgot password" reset: a bottom sheet like the rest. */
#reset-modal.reset-sheet[style*="flex"],
#reset-modal.reset-sheet[style*="block"] {
    display: flex !important;
    flex-direction: column !important;
    align-items: center;
    justify-content: center;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    background: rgba(0, 0, 0, 0.55) !important;
    animation: fadeIn 0.18s ease-out both;
}

/* ---------- Status bar extras and quick panel (app/statusbar.js) ---------- */

body.new-design #status-bar #status-time {
    cursor: pointer;
}

#status-bar .sb-date {
    font-size: 0.82rem;
    font-weight: 600;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 62%, transparent);
    white-space: nowrap;
    cursor: pointer;
}

#status-bar .sb-date[hidden],
#status-bar .sb-chip[hidden],
#status-bar .sb-net[hidden],
#status-bar .status-account-pill[hidden] {
    display: none !important;
}

#status-bar .sb-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 24px;
    padding: 0 8px;
    margin-right: 2px;
    border: none;
    border-radius: 999px;
    background: color-mix(in srgb, var(--on-surface, #ffffff) 9%, transparent);
    color: var(--on-surface);
    font: 700 0.74rem var(--font-main);
    cursor: pointer;
}

#status-bar #status-alerts {
    background: none;
    padding: 0 4px;
    color: var(--accent-primary);
}

#status-bar #status-alerts svg {
    color: var(--accent-primary);
}

body.new-design #status-bar #status-fps {
    margin-right: 4px;
}

.quick-panel {
    position: fixed;
    inset: 0;
    z-index: 19000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0);
    transition: background-color 0.2s ease;
}

.quick-panel.is-open {
    background: rgba(0, 0, 0, 0.5);
}

.quick-panel .qp-card {
    width: 100%;
    max-width: 440px;
    padding: 18px;
    border-radius: 28px;
    border: 1px solid color-mix(in srgb, var(--on-surface, #ffffff) 12%, transparent);
    background: var(--surface-color, #0d1117);
    color: var(--on-surface);
    font-family: var(--font-main);
    transform: translateY(-24px);
    opacity: 0;
    transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s ease;
}

.quick-panel.is-open .qp-card {
    transform: none;
    opacity: 1;
}

.quick-panel.is-leaving .qp-card {
    transform: translateY(-16px);
    opacity: 0;
}

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

.qp-time {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.qp-date {
    font-size: 0.85rem;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 62%, transparent);
}

.qp-account {
    padding: 0;
    border: none;
    border-radius: 50%;
    background: none;
    cursor: pointer;
}

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

.qp-toggle {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid color-mix(in srgb, var(--on-surface, #ffffff) 12%, transparent);
    background: transparent;
    color: var(--on-surface);
    font: 600 0.8rem var(--font-main);
    text-align: left;
    cursor: pointer;
}

.qp-toggle.is-on {
    border-color: transparent;
    background: color-mix(in srgb, var(--on-surface, #ffffff) 22%, #ffffff);
    color: color-mix(in srgb, var(--background, #05080c) 85%, #000000);
}

.qp-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 18px;
    border: 1px solid color-mix(in srgb, var(--on-surface, #ffffff) 12%, transparent);
    background: transparent;
    color: var(--on-surface);
    font-family: var(--font-main);
    text-align: left;
    cursor: pointer;
}

.qp-row-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 11px;
    color: #ffffff;
}

.qp-row-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.qp-row-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 60%, transparent);
}

.qp-row-sub {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qp-shortcuts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-top: 16px;
}

.qp-shortcut {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: none;
    background: none;
    color: var(--on-surface);
    font: 600 0.74rem var(--font-main);
    cursor: pointer;
}

.qp-shortcut span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    color: #ffffff;
}

.qp-power {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 44px;
    margin-top: 16px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--on-surface, #ffffff) 18%, transparent);
    background: transparent;
    color: var(--on-surface);
    font: 600 0.86rem var(--font-main);
    cursor: pointer;
}

html.theme-amoled .quick-panel .qp-card {
    background: #000000;
    border-color: #2a2a2a;
}

html.theme-amoled .qp-shortcut span,
html.theme-amoled .qp-row-icon {
    background: #1c1c1c !important;
    border: 1px solid #2a2a2a;
}

html.theme-amoled .qp-toggle.is-on {
    background: #ffffff;
    color: #000000;
}

html.theme-amoled #status-bar .sb-chip {
    background: #1c1c1c;
}

/* On phones the now-playing chip is just the note icon, so the rest fits. */
@media (max-width: 440px) {
    body.new-design #status-bar .status-now-playing-title {
        display: none;
    }

    body.new-design #status-bar .status-now-playing-pill {
        padding: 0 8px !important;
    }
}

/* Switching accounts: a short cover while the other OrbitOS loads. */
.acct-switching {
    position: fixed;
    inset: 0;
    z-index: 30000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: var(--background, #05080c);
    color: var(--on-surface);
    font: 600 1rem var(--font-main);
    animation: fadeIn 0.2s ease-out both;
}

#accounts-fullscreen .acct-size {
    opacity: 0.85;
}

/* "Use it in the terminal" switch in the account editor. */
.acct-sync {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--on-surface, #ffffff) 11%, transparent);
    cursor: pointer;
}

.acct-sync-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.acct-sync-title {
    font-weight: 600;
    color: var(--on-surface);
}

.acct-sync-desc {
    font-size: 0.82rem;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 62%, transparent);
    overflow-wrap: anywhere;
}

/* ---------- Battery (4.4.1) ----------
   A rounded battery with the level inside it and a small cap. */
body.new-design #status-bar #status-battery.sb-batt-wrap {
    gap: 3px;
    padding: 0 4px !important;
}

#status-bar .sb-batt {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 27px;
    height: 13px;
    border-radius: 4.5px;
    background: color-mix(in srgb, var(--on-surface, #ffffff) 26%, transparent);
    margin-right: 3px;
}

#status-bar .sb-batt::after {
    content: "";
    position: absolute;
    right: -3px;
    top: 4px;
    width: 2px;
    height: 5px;
    border-radius: 0 2px 2px 0;
    background: color-mix(in srgb, var(--on-surface, #ffffff) 40%, transparent);
}

#status-bar .sb-batt-wrap {
    overflow: visible;
}

#status-bar .sb-batt-num,
#status-bar .sb-batt-fill::after {
    font: 800 9px/13px var(--font-main);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

#status-bar .sb-batt-num {
    position: relative;
    color: var(--on-surface);
}

#status-bar .sb-batt-fill {
    position: absolute;
    inset: 0 auto 0 0;
    overflow: hidden;
    border-radius: 4.5px 1.5px 1.5px 4.5px;
    background: var(--on-surface, #ffffff);
    transition: width 0.4s ease;
}

#status-bar .sb-batt-fill::after {
    content: attr(data-level);
    position: absolute;
    top: 0;
    left: 0;
    width: 27px;
    height: 13px;
    text-align: center;
    color: var(--background, #05080c);
}

#status-bar .is-low .sb-batt-fill { background: var(--error, #e5534b); }
#status-bar .is-low .sb-batt-fill::after { color: #ffffff; }
#status-bar .is-charging .sb-batt-fill { background: #34c759; }
#status-bar .is-charging .sb-batt-fill::after { color: #06230f; }
#status-bar .sb-batt-bolt { color: #34c759; }
#status-bar .is-low .sb-batt-num { color: var(--error, #e5534b); }

/* ---------- Notifications (4.4.2) ---------- */

.quick-panel .qp-card {
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.nt-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 30%;
    color: #ffffff;
}

/* Status bar: small app icons for unread notifications */
#status-bar .sb-notifs {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    height: 24px;
    margin-left: 8px;
    padding: 0 2px;
    border: none;
    background: none;
    cursor: pointer;
    animation: osPop 0.25s ease both;
}

#status-bar .sb-notifs[hidden] { display: none !important; }

#status-bar .sb-notifs .nt-icon {
    width: 16px;
    height: 16px;
    border-radius: 5px;
}

#status-bar .sb-notifs-more {
    font: 700 0.7rem var(--font-main);
    color: var(--on-surface);
    opacity: 0.75;
}

/* Quick panel list */
.qp-notifs {
    margin: 14px 0 4px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.qp-notifs.is-empty span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: 18px;
    border: 1px dashed color-mix(in srgb, var(--on-surface, #ffffff) 16%, transparent);
    color: color-mix(in srgb, var(--on-surface, #ffffff) 55%, transparent);
    font-size: 0.85rem;
}

.qp-notifs-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 60%, transparent);
}

.qp-notifs-head b {
    margin-left: 4px;
    padding: 1px 7px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--on-surface, #ffffff) 12%, transparent);
    color: var(--on-surface);
    font-size: 0.72rem;
}

.qp-link {
    border: none;
    background: none;
    color: var(--on-surface);
    font: 700 0.82rem var(--font-main);
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
    padding: 4px 2px;
}

.qp-notifs-more { align-self: center; opacity: 0.75; }

.qp-notif-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.qp-notif {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 40px 12px 12px;
    border-radius: 18px;
    border: 1px solid color-mix(in srgb, var(--on-surface, #ffffff) 10%, transparent);
    background: color-mix(in srgb, var(--on-surface, #ffffff) 4%, var(--surface-color, #0d1117));
    cursor: pointer;
    touch-action: pan-y;
    transition: transform 0.2s ease, opacity 0.2s ease;
    animation: osRise 0.25s var(--os-ease, ease) both;
}

.qp-notif.is-unread { border-color: color-mix(in srgb, var(--accent-primary) 45%, transparent); }

.qp-notif .nt-icon {
    width: 32px;
    height: 32px;
    border-radius: 11px;
}

.qp-notif-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.qp-notif-app {
    font-size: 0.74rem;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 55%, transparent);
}

.qp-notif-text strong {
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qp-notif-body {
    font-size: 0.84rem;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 72%, transparent);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.qp-notif-x {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: none;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 55%, transparent);
    cursor: pointer;
}

/* Heads-up banner */
.nt-banner {
    position: fixed;
    top: calc(8px + env(safe-area-inset-top, 0px));
    left: 50%;
    z-index: 30000;
    width: min(calc(100vw - 20px), 440px);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 22px;
    border: 1px solid color-mix(in srgb, var(--on-surface, #ffffff) 14%, transparent);
    background: var(--surface-color, #0d1117);
    color: var(--on-surface);
    font-family: var(--font-main);
    text-align: left;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    transform: translateX(-50%);
    animation: ntIn 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    touch-action: none;
}

.nt-banner.is-leaving { animation: ntOut 0.22s ease-in forwards; }

.nt-banner .nt-icon {
    width: 34px;
    height: 34px;
    border-radius: 11px;
}

.nt-banner .nt-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.nt-banner .nt-app {
    font-size: 0.74rem;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 55%, transparent);
}

.nt-banner strong { font-size: 0.95rem; }

.nt-banner .nt-body {
    font-size: 0.86rem;
    color: color-mix(in srgb, var(--on-surface, #ffffff) 75%, transparent);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@keyframes ntIn {
    from { opacity: 0; transform: translate(-50%, -110%); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes ntOut {
    to { opacity: 0; transform: translate(-50%, -110%); }
}

html.theme-amoled .nt-icon { background: #1c1c1c !important; border: 1px solid #2a2a2a; }
html.theme-amoled .nt-banner,
html.theme-amoled .qp-notif { background: #000000; }

body.no-animations .nt-banner,
body.no-animations .qp-notif,
body.no-animations #status-bar .sb-notifs { animation: none !important; }

/* Installing an update (app/updater.js): the restart screen with a real progress bar. */
#update-screen {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--background, #0f1115);
    color: var(--on-surface, #ffffff);
    font-family: var(--font-main);
    animation: fadeIn 0.35s ease-out;
}
#update-screen .boot-title { margin: 0 0 4px !important; }
#update-screen .us-name { margin-bottom: 22px; font-size: 0.9rem; font-weight: 600; color: color-mix(in srgb, var(--on-surface, #ffffff) 60%, transparent); }
#update-screen .us-track { width: min(240px, 70vw); height: 6px; border-radius: 6px; background: color-mix(in srgb, var(--on-surface, #ffffff) 14%, transparent); overflow: hidden; }
#update-screen .us-track span { display: block; width: 0; height: 100%; border-radius: 6px; background: var(--accent-primary, #4790e6); transition: width 0.2s linear; }
#update-screen.is-done .us-track span { background: #22a35a; transition-duration: 0.4s; }
#update-screen .us-label { margin-top: 14px; font-size: 0.88rem; font-variant-numeric: tabular-nums; color: color-mix(in srgb, var(--on-surface, #ffffff) 70%, transparent); }
#update-screen .us-foot { position: absolute; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); left: 24px; right: 24px; text-align: center; font-size: 0.78rem; color: color-mix(in srgb, var(--on-surface, #ffffff) 45%, transparent); }
html.theme-amoled #update-screen { background: #000000; }
html.theme-amoled #update-screen .us-track span { background: #ffffff; }

/* H211H hotfix: notifications can make the lock screen taller than the phone.
   It scrolls instead, with room at the bottom so the account and the
   notifications never slide under "Tap to unlock", which stays pinned there. */
#lock-screen {
    justify-content: flex-start;
    overflow-y: auto;
    overscroll-behavior: contain;
    box-sizing: border-box;
    padding: 24px 0 calc(104px + env(safe-area-inset-bottom, 0px));
}
#lock-screen > .lock-container { margin: auto 0; flex-shrink: 0; }

/* Suggested apps on the home card (app/today.js). */
.output .home-suggest { margin-top: 16px; padding-top: 14px; border-top: 1px solid color-mix(in srgb, var(--on-surface, #ffffff) 10%, transparent); }
.output .home-suggest-label { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-main); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: color-mix(in srgb, var(--on-surface, #ffffff) 55%, transparent); }
.output .home-suggest-apps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.output .home-app { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; padding: 6px 2px; border: none; border-radius: 16px; background: transparent; color: var(--on-surface); font-family: var(--font-main); cursor: pointer; }
.output .home-app:active { transform: scale(0.94); }
.output .home-app-icon { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 15px; color: #ffffff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22); }
.output .home-app-name { max-width: 100%; font-size: 0.78rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.output .home-app-why { max-width: 100%; font-size: 0.66rem; color: color-mix(in srgb, var(--on-surface, #ffffff) 50%, transparent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.theme-amoled .output .home-app-icon { background: #1c1c1c !important; border: 1px solid #2a2a2a; }

/* Terminal AI retirement note in the terminal (app/legacy.js). */
.output .legacy-retire-note { font-family: var(--font-main); font-size: 0.82rem; color: color-mix(in srgb, var(--on-surface, #ffffff) 60%, transparent) !important; }
.output .legacy-retire-why { border: none; background: none; padding: 0; color: var(--accent-primary); font: inherit; text-decoration: underline; cursor: pointer; }

/* An app still open in the background, on the home card. */
.output .home-app.is-open .home-app-icon { position: relative; }
.output .home-app.is-open .home-app-icon::after { content: ''; position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; background: #22c55e; border: 2px solid var(--surface-color, #191d25); }
