/*
Theme Name: KatZat Studios Family Computer
Theme URI: https://katzatstudios.com/
Author: KatZat Studios
Description: A neurodivergent family computer for making things.
Version: 3.0.2
Requires at least: 6.0
Requires PHP: 8.1
Text Domain: katzat-workstation
*/

:root {
    --desktop: #087b7c;
    --desktop-deep: #075d68;
    --surface: #d9d9d2;
    --surface-light: #f7f7f2;
    --surface-dark: #70736f;
    --ink: #151918;
    --muted: #4f5755;
    --navy: #082d65;
    --blue: #0758a8;
    --focus: #ffd400;
    --selected: #063b84;
    --shadow: #2d3331;
    --taskbar-height: 48px;
    color: var(--ink);
    background: var(--desktop-deep);
    font-family: Tahoma, Verdana, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 280px; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; overflow-x: hidden; background: var(--desktop); color: var(--ink); font-size: 16px; line-height: 1.5; }
a { color: #063d81; text-underline-offset: .17em; }
a:hover { text-decoration-thickness: 2px; }
img, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
button, .button, .app-link {
    min-height: 36px;
    padding: .35rem .7rem;
    border: 2px solid;
    border-color: #fff var(--shadow) var(--shadow) #fff;
    border-radius: 0;
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
    text-decoration: none;
}
button:active, .button:active, .app-link:active, [aria-pressed="true"] { border-color: var(--shadow) #fff #fff var(--shadow); }
button:disabled { color: #666; cursor: wait; text-shadow: 1px 1px #fff; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.skip-link { position: fixed; z-index: 9999; top: .5rem; left: .5rem; transform: translateY(-200%); background: #fff; color: #000; padding: .7rem 1rem; }
.skip-link:focus { transform: none; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.kz-icon { width: 1.35em; height: 1.35em; flex: 0 0 auto; color: currentColor; }
.kz-brand-mark { display: block; object-fit: contain; image-rendering: pixelated; }
.kz-brand-mark--small { width: 16px; height: 16px; }
.kz-brand-mark--large { width: 32px; height: 32px; }
.external-link::after { content: " ↗"; }

.site-shell {
    position: relative;
    min-height: 100vh;
    padding-bottom: var(--taskbar-height);
    overflow-x: clip;
    background-color: var(--desktop);
    background-image: radial-gradient(circle at 12% 16%, rgba(255,255,255,.18) 0 2px, transparent 3px), radial-gradient(circle at 78% 70%, rgba(255,255,255,.12) 0 2px, transparent 3px), linear-gradient(135deg, transparent 0 48%, rgba(0,34,50,.11) 49% 51%, transparent 52% 100%);
    background-size: 47px 47px, 61px 61px, 160px 160px;
}
.desktop-canvas { position: relative; min-height: calc(100vh - var(--taskbar-height)); padding: 1rem; outline: 0; }
.desktop-icons { position: relative; z-index: 2; display: grid; width: 94px; gap: .55rem; }
.desktop-icon { display: grid; justify-items: center; gap: .2rem; width: 90px; min-height: 78px; padding: .3rem; border: 0; background: transparent; color: #fff; text-align: center; text-decoration: none; text-shadow: 1px 1px #00363b; font-size: .76rem; line-height: 1.15; }
.desktop-icon .kz-icon { width: 40px; height: 40px; filter: drop-shadow(2px 2px 0 rgba(0,0,0,.35)); }
.desktop-icon .kz-brand-mark--large { width: 48px; height: 48px; }
.desktop-icon:hover, .desktop-icon:focus { background: rgba(0, 35, 85, .72); }
.window-layer { position: absolute; z-index: 3; inset: 0; pointer-events: none; }

.window {
    position: relative;
    width: min(880px, calc(100vw - 9rem));
    min-width: 0;
    margin: 1rem auto;
    border: 2px solid;
    border-color: #fff var(--shadow) var(--shadow) #fff;
    background: var(--surface);
    box-shadow: 3px 3px 0 rgba(0,0,0,.35);
    pointer-events: auto;
}
.window[data-active="false"] .title-bar { background: #687486; }
.window[hidden] { display: none !important; }
.title-bar { display: flex; align-items: center; min-height: 36px; gap: .45rem; padding: 3px 4px 3px 7px; background: linear-gradient(90deg, var(--navy), var(--blue)); color: #fff; font-weight: 700; user-select: none; }
.title-bar-title { display: flex; align-items: center; min-width: 0; gap: .4rem; margin-right: auto; }
.title-bar-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.window-actions { display: flex; gap: 3px; }
.window-action { display: grid; place-items: center; width: 29px; min-height: 26px; padding: 0; font: 700 16px/1 monospace; }
.window-action:active { padding: 2px 0 0 2px; }
.menu-strip { display: flex; gap: .15rem; padding: 2px 4px; border-bottom: 1px solid var(--surface-dark); font-size: .84rem; }
.menu-strip a { color: var(--ink); padding: .2rem .45rem; text-decoration: none; }
.menu-strip a:hover, .menu-strip a:focus { background: var(--selected); color: #fff; }
.window-content { max-height: min(72vh, 740px); margin: 5px; padding: clamp(.85rem, 2vw, 1.4rem); overflow: auto; overflow-wrap: anywhere; border: 2px solid; border-color: var(--shadow) #fff #fff var(--shadow); background: var(--surface-light); }
.window-content > :first-child { margin-top: 0; }
.window-content > :last-child { margin-bottom: 0; }
.window-status { display: flex; justify-content: space-between; gap: 1rem; margin: 4px; padding: 2px 7px; overflow: hidden; border: 1px solid; border-color: var(--surface-dark) #fff #fff var(--surface-dark); color: var(--muted); font-size: .76rem; }
.window-status span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.window.is-maximized { position: fixed !important; inset: 8px 8px calc(var(--taskbar-height) + 8px) 8px !important; width: auto !important; margin: 0; }
.window.is-maximized .window-content { max-height: calc(100vh - var(--taskbar-height) - 100px); }

.enhanced .window-layer > .window { position: absolute; top: 6vh; left: max(108px, calc(50% - 440px)); margin: 0; }
.enhanced .window-layer > .welcome-window, .enhanced .window-welcome { top: 7vh; left: max(108px, calc(50% - 390px)); width: min(780px, calc(100vw - 9rem)); }
.enhanced .window-layer > .child-window { top: 11vh; left: max(128px, calc(50% - 380px)); width: min(760px, calc(100vw - 10rem)); }
.enhanced .window[data-open="false"] { display: none; }
.enhanced .title-bar[data-draggable="true"] { cursor: move; }

h1, h2, h3 { line-height: 1.15; text-wrap: balance; }
h1 { margin: .15rem 0 .65rem; font-size: clamp(1.8rem, 4.5vw, 3.1rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.25rem, 2.7vw, 1.8rem); }
.eyebrow { margin: 0 0 .35rem; color: #075a5c; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.welcome-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(220px, .75fr); gap: 1.5rem; align-items: start; }
.welcome-brand { display: flex; align-items: center; gap: .75rem; margin-bottom: .65rem; }
.welcome-brand .kz-brand-mark--large { width: 48px; height: 48px; }
.welcome-brand h1 { margin: 0; }
.editable-copy { max-width: 68ch; font-size: 1.06rem; }
.notepad-content { min-height: 300px; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; white-space: normal; }
.quick-actions { display: grid; gap: .55rem; padding: .75rem; border: 1px solid var(--surface-dark); background: #e9ece7; }
.quick-actions .button, .inline-actions .button { display: inline-flex; align-items: center; gap: .45rem; }
.inline-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1rem; }
.app-heading, .client-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1rem; }
.client-toolbar h1 { margin: 0; }
.notice-panel { border-left: 5px solid #166667; background: #e7f1ed; padding: .8rem 1rem; }

.family-profile { max-width: 72ch; }
.folder-launcher { max-width: 260px; }
.kat-app { border-top: 6px solid #a52555; background: linear-gradient(180deg, #fff8fb, #f7f7f2 42%); }
.kat-header { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.kat-status { max-width: 54rem; margin: 1rem 0; border: 1px solid #8e7582; background: #fff; }
.kat-status div { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: .5rem; padding: .45rem .6rem; border-bottom: 1px solid #d7c5cf; }
.kat-status div:last-child { border-bottom: 0; }
.kat-status dt { font-weight: 800; }
.kat-status dd { margin: 0; }
.junior-lab { background: repeating-linear-gradient(-45deg, #f8f7f0 0 22px, #eef4ef 22px 44px); }
.junior-status { display: inline-block; padding: .3rem .5rem; background: #8b2342; color: #fff; font: 800 .82rem/1 ui-monospace, Consolas, monospace; }
.network-pi { width: 44px; min-height: 44px; border-radius: 50%; font: 800 1.25rem/1 Georgia, serif; }
.social-embed-catalog { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 1rem; }
.social-embed-card { min-width: 0; padding: .7rem; border: 1px solid #8b8f89; background: #fff; }
.social-embed-card > img { width: 100%; max-height: 420px; object-fit: contain; background: #e2e6e2; }
.social-embed-card h2, .social-embed-card h3 { margin: .65rem 0; }
.instagram-connection-panel { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .65rem; }
.instagram-media { min-width: 0 !important; max-width: 100% !important; }
.kankri-document { max-height: 58vh; overflow-y: auto; border-left: 8px solid #a52555; }
.lecture-mode { border-top: 6px solid #a52555; }
.planet-banner { margin: .2rem 0 1rem; color: #73ffb5; background: #07131e; padding: 1rem; text-align: center; font: 900 clamp(2rem, 8vw, 5rem)/1 ui-monospace, Consolas, monospace; text-shadow: 3px 3px #7b1fb3; }
.planet-progress { height: 24px; border: 2px solid #152220; background: #fff; }
.planet-progress span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #18d8aa, #7b1fb3); transition: width .7s linear; }
.site-shell.planet-mode { background-color: #051526; background-image: linear-gradient(30deg, transparent 48%, rgba(28,255,193,.36) 49% 51%, transparent 52%), linear-gradient(-30deg, transparent 48%, rgba(196,46,255,.25) 49% 51%, transparent 52%); background-size: 90px 52px; }
.site-shell.planet-mode .taskbar { background: #101726; color: #73ffb5; }
.gatekeeper { border-top: 6px solid #61217f; }
.gatekeeper [data-gatekeeper-status] { white-space: pre-line; }
.task-manager ul { list-style: none; margin: 0; padding: 0; border: 1px solid #8b8f89; background: #fff; }
.task-manager li { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .4rem .55rem; border-bottom: 1px solid #ccc; }
.task-manager li:last-child { border-bottom: 0; }
.kz-mart-dashboard { display: grid; grid-template-columns: auto auto auto auto; align-items: baseline; justify-content: start; gap: .25rem .5rem; margin-bottom: .75rem; padding: .7rem; background: #082d65; color: #fff1c7; }
.kz-mart-dashboard strong { font: 900 2rem/1 ui-monospace, Consolas, monospace; }
.mart-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.mart-items button { min-height: 58px; text-align: left; }
.kz-mart [data-mart-result] { white-space: pre-line; font: 800 1rem/1.5 ui-monospace, Consolas, monospace; }
.alchemy-inventory { display: flex; flex-wrap: wrap; gap: .4rem; }
.alchemy-inventory button { font-family: ui-monospace, Consolas, monospace; }
.alchemy-circle { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: .7rem; max-width: 600px; margin: 1.2rem auto; padding: 1.2rem; border: 4px double #5d2d7e; border-radius: 50%; background: radial-gradient(circle, #fff 0 34%, #eadff2 35% 37%, #fff 38%); }
.alchemy-circle button { min-width: 0; min-height: 62px; overflow-wrap: anywhere; font-family: ui-monospace, Consolas, monospace; }

.explorer-layout { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: .75rem; }
.folder-tree { border: 1px solid #8b8f89; background: #fff; padding: .65rem; }
.folder-tree ul { list-style: none; margin: 0; padding: 0 0 0 .8rem; }
.folder-tree > ul { padding-left: 0; }
.folder-tree a { display: flex; gap: .35rem; align-items: center; padding: .3rem; color: var(--ink); text-decoration: none; }
.folder-tree a:hover, .folder-tree a:focus, .folder-tree a[aria-current="page"] { background: var(--selected); color: #fff; }
.explorer-pane { min-width: 0; border: 1px solid #8b8f89; background: #fff; }
.view-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.view-toolbar button { min-height: 32px; padding: .2rem .5rem; }
.explorer-list { list-style: none; margin: 0; padding: 0; }
.explorer-item { border-bottom: 1px solid #c5c7c2; }
.explorer-item:last-child { border-bottom: 0; }
.explorer-item > a { display: grid; grid-template-columns: 36px minmax(180px, 1fr) 9rem 8rem; align-items: center; gap: .55rem; min-height: 54px; padding: .45rem .6rem; color: var(--ink); text-decoration: none; }
.explorer-item > a:hover, .explorer-item > a:focus { background: var(--selected); color: #fff; }
.explorer-item-icon .kz-icon { width: 30px; height: 30px; }
.explorer-item-main { display: grid; min-width: 0; }
.explorer-item-main strong, .explorer-item-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.explorer-item-main span, .explorer-item time, .explorer-publication { color: inherit; font-size: .76rem; }
.explorer-list[data-view="list"] .explorer-publication { display: none; }

.application-icons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.application-icon { display: grid; justify-items: center; gap: .35rem; min-width: 0; min-height: 150px; padding: 1rem .6rem; border: 1px solid transparent; color: var(--ink); text-align: center; text-decoration: none; }
.application-icon:hover, .application-icon:focus { border-color: #fff; background: var(--selected); color: #fff; }
.application-icon .kz-icon { width: 64px; height: 64px; filter: drop-shadow(2px 2px 0 rgba(0,0,0,.28)); }
.application-icon span { font-family: ui-monospace, "Cascadia Mono", monospace; font-size: .78rem; overflow-wrap: anywhere; }
.client-state { min-height: 1.5em; color: var(--muted); }
.feed-list { list-style: none; margin: 0; padding: 0; }
.feed-list li { padding: .75rem 0; border-bottom: 1px solid #aaa; }
.feed-list p { white-space: pre-wrap; }
.feed-list time { display: block; color: var(--muted); font-size: .75rem; }
.feed-list a { display: inline-block; margin-top: .35rem; }
.feed-context { display: block; margin-bottom: .45rem; color: var(--navy); font: 800 .75rem/1.2 ui-monospace, Consolas, monospace; letter-spacing: .04em; }
.feed-author { display: flex; align-items: center; gap: .55rem; }
.feed-author > img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #d5dad5; }
.feed-author > span { display: grid; }
.feed-author small, .feed-quote small { color: var(--muted); }
.feed-images { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .35rem; margin-top: .6rem; }
.feed-images img { width: 100%; max-height: 320px; object-fit: cover; background: #d5dad5; }
.feed-quote { margin-top: .7rem; padding: .65rem .75rem; border: 1px solid #9aa19a; background: #fff; }
.feed-quote strong, .feed-quote small { display: block; }
.image-catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; list-style: none; margin: 0; padding: 0; }
.image-catalog a { display: grid; gap: .35rem; height: 100%; padding: .45rem; border: 1px solid #8b8f89; background: #fff; color: var(--ink); text-decoration: none; }
.image-catalog a:hover, .image-catalog a:focus { box-shadow: 0 0 0 3px var(--selected); }
.image-catalog img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #d8dfd9; }
.image-catalog time { color: var(--muted); font-size: .75rem; }
.local-image-viewer figure { margin: 0 0 1rem; }
.local-image-viewer img { max-height: 56vh; margin: 0 auto; object-fit: contain; background: #222; }
.image-viewer-menu { display: flex; margin: -.45rem -.45rem .75rem; border-bottom: 1px solid var(--surface-dark); }
.image-viewer-menu button { min-height: 32px; padding: .2rem .45rem; border: 0; background: transparent; }
.image-viewer-menu button:hover, .image-viewer-menu button:focus { background: var(--selected); color: #fff; }
.store-description { max-width: 70ch; }
.store-description p { white-space: pre-line; }
.file-properties { margin-top: 1rem; border: 1px solid var(--surface-dark); background: #eceee9; }
.file-properties summary { padding: .55rem .7rem; cursor: pointer; font-weight: 700; }
.file-properties dl { margin: 0; padding: 0 .7rem .7rem; }
.file-properties dl div { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: .55rem; padding: .35rem 0; border-top: 1px solid #bbb; }
.file-properties dt { font-weight: 700; }
.file-properties dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.file-properties code { font-size: .72rem; }

.process-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(220px, .6fr); gap: 1rem; }
.process-stage { min-width: 0; }
.process-stage video, .process-stage > img { width: 100%; max-height: 55vh; object-fit: contain; background: #171b1c; }
.process-details { padding: .75rem; border: 1px solid #8b8f89; background: #fff; }
.process-details h2 { margin-top: 0; }
.process-playlist { list-style: none; margin: 0; padding: 0; border: 1px solid #8b8f89; background: #fff; }
.process-playlist button { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: .5rem; width: 100%; min-height: 70px; padding: .35rem; border-width: 0 0 1px; border-color: #aaa; text-align: left; }
.process-playlist img { width: 64px; height: 54px; object-fit: cover; }
.process-playlist span { display: grid; min-width: 0; }
.process-playlist strong { overflow: hidden; text-overflow: ellipsis; }
.process-playlist small { color: var(--muted); }
.postcard-list { list-style: none; margin: 0; padding: 0; }
.postcard-list li { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; gap: .75rem; padding: .55rem 0; border-bottom: 1px solid #aaa; }
.postcard-list img { width: 72px; height: 58px; object-fit: contain; background: #ddd; }
.postcard-list span { display: grid; }

.roundup-header { margin-bottom: 1rem; }
.roundup-month { color: var(--muted); }
.roundup-copy { max-width: 70ch; }
.roundup-style { padding: .6rem .75rem; border-left: 4px solid #1685a0; background: #e4eeee; }
.gallery-toolbar { position: sticky; z-index: 2; top: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin: 1rem 0 .6rem; padding: .35rem; border: 1px solid #8b8f89; background: var(--surface); }
.gallery-toolbar span { margin-left: auto; padding: 0 .4rem; font-variant-numeric: tabular-nums; }
.gallery-stage { border: 2px solid; border-color: var(--shadow) #fff #fff var(--shadow); background: #202728; }
.gallery-slide { margin: 0; }
.gallery-image-button { position: relative; display: grid; width: 100%; min-height: 0; padding: 0; border: 0; background: #202728; }
.gallery-image-button img { width: 100%; max-height: 62vh; object-fit: contain; }
.gallery-image-button > span { position: absolute; right: .5rem; bottom: .5rem; padding: .25rem .45rem; background: rgba(8,45,101,.92); color: #fff; font-size: .75rem; }
.gallery-details { padding: .8rem; background: #f7f7f2; }
.gallery-details h2 { margin-top: 0; }
.gallery-details dl { margin: 0; }
.gallery-details dl div { display: grid; grid-template-columns: 7rem minmax(0, 1fr); padding: .35rem 0; border-bottom: 1px solid #bbb; }
.gallery-details dt { font-weight: 700; }
.gallery-details dd { margin: 0; }
.gallery-thumbnails { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .45rem; margin-top: .6rem; }
.gallery-thumbnails a { display: grid; gap: .3rem; padding: .3rem; border: 2px solid transparent; color: var(--ink); text-decoration: none; font-size: .72rem; }
.gallery-thumbnails a[aria-current="true"] { border-color: var(--selected); background: #dbe4ef; }
.gallery-thumbnails img { width: 100%; height: 72px; object-fit: contain; background: #d8dfd9; }
.hide-gallery-thumbnails .gallery-thumbnails, .hide-gallery-details .gallery-details { display: none; }
.error-state { max-width: 660px; margin: 0 auto; text-align: center; }
.error-state > .kz-icon { width: 72px; height: 72px; }

.taskbar { position: fixed; z-index: 100; inset: auto 0 0; display: flex; align-items: center; gap: 4px; height: var(--taskbar-height); padding: 4px; border-top: 2px solid #fff; background: var(--surface); box-shadow: 0 -1px 0 var(--shadow); }
.launcher-button { display: flex; align-items: center; gap: .4rem; font-weight: 800; }
.task-buttons { display: flex; flex: 1; min-width: 0; gap: 3px; overflow-x: auto; }
.task-button { display: none; min-width: 112px; max-width: 190px; min-height: 36px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.task-button[data-open="true"] { display: block; }
.task-button[aria-pressed="true"] { background: #c5c7c1; }
.system-tray { display: flex; align-items: center; gap: 3px; }
.task-status { display: flex; align-items: center; gap: .35rem; height: 36px; padding: 0 .55rem; border: 1px solid; border-color: var(--shadow) #fff #fff var(--shadow); font-size: .76rem; white-space: nowrap; }
.launcher-menu { position: fixed; z-index: 110; bottom: calc(var(--taskbar-height) - 1px); left: 4px; width: min(330px, calc(100vw - 8px)); border: 2px solid; border-color: #fff var(--shadow) var(--shadow) #fff; background: var(--surface); box-shadow: 3px 3px 0 rgba(0,0,0,.35); }
.launcher-menu[hidden] { display: none; }
.launcher-brand { padding: .6rem .8rem; background: var(--navy); color: #fff; font-weight: 800; letter-spacing: .04em; }
.launcher-menu ul { list-style: none; margin: 0; padding: .35rem; }
.launcher-menu a { display: flex; align-items: center; gap: .7rem; min-height: 44px; padding: .45rem .6rem; color: var(--ink); text-decoration: none; }
.launcher-menu a:hover, .launcher-menu a:focus { background: var(--selected); color: #fff; }

/* Route-global workstation extras. These applications are inert in no-JS mode. */
.launcher-menu .launcher-entry { display: flex; align-items: center; gap: .7rem; width: 100%; min-height: 44px; padding: .45rem .6rem; border: 0; background: transparent; color: var(--ink); text-align: left; }
.launcher-menu .launcher-entry:hover, .launcher-menu .launcher-entry:focus { background: var(--selected); color: #fff; }
.launcher-separator { height: 2px; margin: .25rem .35rem; background: var(--surface-dark); box-shadow: 0 1px #fff; }
.run-dialog { width: auto; }
.run-dialog form { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .75rem; }
.run-dialog input { width: 100%; min-height: 38px; padding: .35rem .45rem; border: 2px solid; border-color: var(--shadow) #fff #fff var(--shadow); background: #fff; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .45rem; grid-column: 1 / -1; margin-top: .8rem; }
.compact-dialog { max-width: 52ch; }
.command-help { margin: 0; }
.command-help div { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: .7rem; padding: .45rem 0; border-bottom: 1px solid #bbb; }
.command-help dt { font-weight: 800; }
.command-help dd { margin: 0; }
.zat-properties dl, .system-properties dl { margin: 0; }
.zat-properties dl div, .system-properties dl div { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: .5rem; padding: .35rem 0; }
.zat-properties dt, .system-properties dt { font-weight: 800; }
.zat-properties dd, .system-properties dd { margin: 0; }
.system-properties { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: 1.2rem; }
.system-properties-mark .kz-icon { width: 96px; height: 96px; image-rendering: pixelated; }

.dialer-heading { display: grid; grid-template-columns: 68px minmax(0, 1fr); align-items: center; gap: .8rem; }
.dialer-heading .kz-icon { width: 64px; height: 64px; }
.dialer-heading h1, .dialer-heading p { margin: 0; }
.dialer-heading p { color: var(--muted); }
.dialer-display { width: 100%; min-height: 50px; margin: .35rem 0 .8rem; padding: .45rem .65rem; border: 3px solid; border-color: var(--shadow) #fff #fff var(--shadow); background: #e8f0d1; font: 700 clamp(1.2rem, 3vw, 1.8rem)/1.2 ui-monospace, Consolas, monospace; letter-spacing: .06em; }
.telephone-keypad { display: grid; grid-template-columns: repeat(3, minmax(70px, 1fr)); gap: .45rem; max-width: 420px; margin: 0 auto; }
.telephone-keypad button { display: grid; place-items: center; min-height: 58px; }
.telephone-keypad strong { font-size: 1.25rem; line-height: 1; }
.telephone-keypad small { min-height: 1em; color: var(--muted); font-size: .64rem; letter-spacing: .13em; }
.dialer-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem; margin-top: .8rem; }
.transmission-app > img { width: 100%; max-height: 48vh; object-fit: contain; background: #171b1c; image-rendering: auto; }
.transmission-description { max-width: 70ch; margin: 1rem auto; }
.transmission-description p { white-space: pre-line; }
.transmission-roundup { padding: .55rem .7rem; background: #e5ebe6; border-left: 4px solid var(--navy); }

.recycle-toolbar { display: flex; min-height: 34px; align-items: center; margin-bottom: .35rem; padding: .25rem .5rem; border: 1px solid #aaa; background: #fff; color: var(--muted); }
.recycle-list { margin: 0; padding: 0; list-style: none; border: 2px solid; border-color: var(--shadow) #fff #fff var(--shadow); background: #fff; }
.recycle-list li { border-bottom: 1px solid #c5c7c2; }
.recycle-list li:last-child { border-bottom: 0; }
.recycle-list button { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: .6rem; width: 100%; min-height: 62px; padding: .45rem .65rem; border: 0; background: #fff; text-align: left; }
.recycle-list button:hover, .recycle-list button:focus { background: var(--selected); color: #fff; }
.recycle-list button > span:last-child { display: grid; min-width: 0; }
.recycle-list strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recycle-list small { color: inherit; }
.recycle-file-icon .kz-icon { width: 40px; height: 40px; }
.scrap-viewer img { width: 100%; max-height: 55vh; object-fit: contain; background: #222; }
.scrap-viewer figcaption { margin-top: .7rem; white-space: pre-line; }

.zat-pet { --zat-x: 12px; position: fixed; z-index: 2; bottom: calc(var(--taskbar-height) - 5px); left: 0; width: 64px; height: 64px; transform: translateX(var(--zat-x)); pointer-events: none; }
.zat-pet[hidden] { display: none; }
.zat-pixel-sprite { width: 64px; height: 64px; cursor: pointer; pointer-events: auto; transform-origin: 50% 100%; }
.zat-pixel-sprite svg { width: 64px; height: 64px; filter: drop-shadow(3px 3px 0 rgba(0,0,0,.3)); image-rendering: pixelated; }
.zat-pet[data-facing="left"] .zat-pixel-sprite { transform: scaleX(-1); }
.zat-pet[data-state="enter"] .zat-pixel-sprite, .zat-pet[data-state="exit"] .zat-pixel-sprite { animation: zat-pop .5s steps(3, end); }
.zat-pet[data-state="walk"] .zat-pixel-sprite svg { animation: zat-step .34s steps(2, end) infinite; }
.zat-pet[data-state="sit"] .zat-pixel-sprite { transform: scaleY(.94); }
.zat-pet[data-state="clean"] .zat-pixel-sprite svg { animation: zat-clean .45s steps(2, end) 3; }
.zat-pet[data-state="nap"] .zat-pixel-sprite { transform: scaleY(.78) translateY(9px); }
.zat-pet[data-facing="left"][data-state="sit"] .zat-pixel-sprite { transform: scaleX(-1) scaleY(.94); }
.zat-pet[data-facing="left"][data-state="nap"] .zat-pixel-sprite { transform: scaleX(-1) scaleY(.78) translateY(9px); }
.zat-tray-button { display: flex; align-items: center; gap: .25rem; min-height: 36px; padding: 0 .4rem; font-size: .72rem; }
.zat-tray-button[hidden] { display: none; }
@keyframes zat-pop { 0% { opacity: 0; transform: scale(.4); } 100% { opacity: 1; transform: scale(1); } }
@keyframes zat-step { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes zat-clean { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-7deg); } }

.kz-screensaver { position: fixed; z-index: 10000; inset: 0; overflow: hidden; background: #020711; color: #fff1c7; cursor: none; touch-action: none; }
.kz-screensaver[hidden] { display: none; }
.screensaver-sprite { position: absolute; top: 0; left: 0; width: clamp(82px, 9vw, 132px); height: clamp(82px, 9vw, 132px); will-change: transform; }
.screensaver-variant { display: none; width: 100%; height: 100%; filter: drop-shadow(5px 5px 0 rgba(255,159,28,.24)); }
.screensaver-variant .kz-icon, .screensaver-variant svg { width: 100%; height: 100%; image-rendering: pixelated; }
.kz-screensaver[data-variant="kz"] .screensaver-kz, .kz-screensaver[data-variant="hotdog"] .screensaver-hotdog, .kz-screensaver[data-variant="zat"] .screensaver-zat { display: block; }
.screensaver-clock { position: absolute; right: 1rem; bottom: 1rem; font: 700 clamp(1rem, 3vw, 1.6rem)/1 ui-monospace, Consolas, monospace; letter-spacing: .08em; }
.screensaver-celebration { position: absolute; inset: 42% 0 auto; color: var(--focus); text-align: center; font: 800 clamp(1.4rem, 6vw, 4.5rem)/1 ui-monospace, Consolas, monospace; text-shadow: 4px 4px var(--navy); }
.screensaver-celebration[hidden] { display: none; }
.kz-screensaver[data-corner-hit="true"] { box-shadow: inset 0 0 0 10px #f3bf3d; }
.kz-screensaver[data-corner-hit="true"] .screensaver-celebration { text-shadow: 4px 4px var(--navy), 0 0 22px #f3bf3d; }
.kz-screensaver[data-reduced-motion="true"] .screensaver-sprite { top: 44%; left: 50%; transform: translate(-50%, -50%) !important; will-change: auto; }

html.no-js .window-layer { position: static; pointer-events: auto; }
html.no-js .window { width: min(1000px, calc(100% - 2rem)); }
html.no-js .window-actions, html.no-js .launcher-menu, html.no-js .taskbar, html.no-js .gallery-toolbar, html.no-js .js-only-app, html.no-js .js-only-control, html.no-js [data-load-instagram], html.no-js [data-zat-pet], html.no-js [data-screensaver] { display: none !important; }
html.no-js .site-shell { padding-bottom: 1rem; }

@media (max-width: 980px) and (min-width: 761px) {
    .explorer-item > a { grid-template-columns: 36px minmax(160px, 1fr) 7rem; }
    .explorer-publication { display: none; }
}

@media (max-width: 760px) {
    :root { --taskbar-height: 58px; }
    body { font-size: 15px; }
    button, .button, .app-link { min-height: 44px; }
    .button, .app-link { display: inline-flex; align-items: center; }
    .site-shell { overflow: visible; }
    .desktop-canvas { min-height: calc(100dvh - var(--taskbar-height)); padding: 0 0 var(--taskbar-height); }
    .enhanced .desktop-icons { display: none; }
    .window-layer { position: static; }
    .enhanced .window-layer > .window, .enhanced .window-layer > .welcome-window, .enhanced .window-layer > .child-window {
        position: relative !important;
        inset: auto !important;
        width: 100% !important;
        min-height: calc(100dvh - var(--taskbar-height));
        margin: 0;
        border-width: 0;
        box-shadow: none;
    }
    .window-content { max-height: none; margin: 0; border-right: 0; border-left: 0; overflow: visible; }
    .window-status { margin-bottom: 0; }
    .window-actions [data-action="maximize"] { display: none; }
    .window-action { width: 44px; min-height: 44px; }
    .title-bar { min-height: 48px; }
    .menu-strip { overflow-x: auto; }
    .menu-strip a { display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap; }
    .welcome-grid, .explorer-layout, .process-layout { grid-template-columns: 1fr; }
    .folder-tree { display: none; }
    .application-icons { grid-template-columns: 1fr; }
    .application-icon { grid-template-columns: 52px minmax(0, 1fr); justify-items: start; align-items: center; min-height: 76px; text-align: left; }
    .application-icon .kz-icon { grid-row: span 2; width: 48px; height: 48px; }
    .explorer-item > a { grid-template-columns: 34px minmax(0, 1fr); min-height: 64px; }
    .explorer-item time { grid-column: 2; }
    .explorer-publication { display: none; }
    .view-toolbar button, .gallery-toolbar button { min-height: 44px; }
    .gallery-details dl div, .file-properties dl div { grid-template-columns: 1fr; gap: .1rem; }
    .gallery-thumbnails { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .postcard-list li { grid-template-columns: 60px minmax(0, 1fr); }
    .postcard-list .button { grid-column: 1 / -1; }
    .taskbar { gap: 3px; }
    .launcher-button { min-width: 52px; min-height: 44px; justify-content: center; }
    .launcher-button span { display: none; }
    .task-button { min-width: 70px; max-width: 100px; min-height: 44px; text-align: center; font-size: .72rem; }
    .task-status { min-width: 44px; height: 44px; padding: 0 .35rem; justify-content: center; }
    .task-status .network-label { display: none; }
    .launcher-menu { inset: 0 0 var(--taskbar-height); width: 100%; overflow-y: auto; }
    .launcher-brand { padding: 1rem; font-size: 1.1rem; }
    .launcher-menu a { min-height: 54px; }
    .launcher-menu .launcher-entry { min-height: 54px; }
    .run-dialog form { grid-template-columns: 1fr; }
    .run-dialog .dialog-actions { grid-column: auto; }
    .telephone-keypad { grid-template-columns: repeat(3, minmax(64px, 1fr)); }
    .telephone-keypad button { min-height: 54px; }
    .system-properties { grid-template-columns: 72px minmax(0, 1fr); }
    .system-properties-mark .kz-icon { width: 64px; height: 64px; }
    .zat-pet { bottom: calc(var(--taskbar-height) - 4px); width: 52px; height: 52px; }
    .zat-pixel-sprite, .zat-pixel-sprite svg { width: 52px; height: 52px; }
    .zat-tray-button span { display: none; }
    .kat-header { align-items: start; flex-direction: column; }
    .kat-status div { grid-template-columns: 1fr; gap: .1rem; }
    .mart-items { grid-template-columns: 1fr; }
    .alchemy-circle { padding: .7rem; }
    html.no-js .desktop-canvas { padding: .5rem; }
    html.no-js .desktop-icons { display: grid; width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    html.no-js .desktop-icon { width: 100%; }
    html.no-js .window { width: 100%; min-height: 0; margin: .75rem 0; border-width: 2px; }
}

@media (max-width: 390px) {
    .window-content { padding: .75rem; }
    .gallery-thumbnails { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .system-tray .kz-icon { display: none; }
    html.no-js .desktop-icons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

@media print {
    .taskbar, .launcher-menu, .desktop-icons, .window-actions, .menu-strip, .view-toolbar, .gallery-toolbar { display: none !important; }
    body, .site-shell { background: #fff; }
    .window-layer { position: static; }
    .window { position: static !important; display: block !important; width: 100%; min-height: 0; margin: 1rem 0; border: 1px solid #333; box-shadow: none; }
    .window-content { max-height: none; border: 0; }
}
