/* Retro 95 Mobile: a tactile handset around a pale LCD home screen. */
@media (max-width: 600px), (max-width: 1000px) and (max-height: 600px) and (pointer: coarse) {
  html[data-theme=retro]{--phone-top:calc(58px + env(safe-area-inset-top,0px));--phone-bottom:calc(144px + env(safe-area-inset-bottom,0px));--handset-ink:#293523;--handset-lcd:#d0dcb2}
  html[data-theme=retro] .windows-os{background:linear-gradient(105deg,#282b2b,#424746 45%,#262a29);-webkit-tap-highlight-color:transparent}
  html[data-theme=retro] .mac-menubar{display:flex;position:fixed;top:0;left:0;right:0;z-index:20002;height:var(--phone-top);padding:env(safe-area-inset-top,0px) 23px 0;gap:10px;align-items:center;background:transparent;border:0;box-shadow:none;backdrop-filter:none;color:#e1e5d8}
  html[data-theme=retro] .mac-menubar :is(button,.mac-active-app){display:none}
  html[data-theme=retro] .mac-wordmark{font:700 17px/1.2 var(--mono);letter-spacing:.03em}
  html[data-theme=retro] .mac-clock{margin-left:auto;font:12px/1.3 var(--mono);white-space:nowrap}
  html[data-theme=retro] :is(.desktop-release,.os-desktop::before,.os-desktop::after){display:none}
  html[data-theme=retro] .os-desktop{top:var(--phone-top);bottom:var(--phone-bottom);left:12px;right:12px;overflow:hidden;background:var(--handset-lcd);border:3px solid #171d19;border-radius:12px;box-shadow:0 1px 0 #737971,inset 0 3px 9px #39452b36}
  html[data-theme=retro] .wallpaper-brand{top:22px;left:50%;right:auto;bottom:auto;transform:translateX(-50%);width:min(244px,calc(100% - 40px));max-width:none;margin:0;filter:none}
  html[data-theme=retro] .wallpaper-brand img{display:block;width:100%;height:auto;aspect-ratio:2/1;object-fit:contain;padding:0;border:0;border-radius:0;box-shadow:none;background:#d0dcb2;filter:none}
  html[data-theme=retro] .wallpaper-brand span{margin-top:8px;color:var(--handset-ink);font:18px/1.2 var(--pixel);letter-spacing:.05em;text-shadow:none}
  html[data-theme=retro] .desktop-icons{left:12px;right:12px;top:clamp(192px,27dvh,236px);bottom:auto;width:auto;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px 8px}
  html[data-theme=retro] .desktop-icon{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-width:0;min-height:68px;padding:6px 2px;border:1px solid #65774f;border-radius:2px;color:var(--handset-ink);background:#c6d4a5;box-shadow:inset 1px 1px #e4ecca;font:15px/1.1 var(--pixel);text-shadow:none;touch-action:manipulation}
  html[data-theme=retro] .desktop-icon>span:last-child{max-width:100%;padding:0;overflow-wrap:normal}
  html[data-theme=retro] .icon-art{width:30px;height:27px;border:0;border-radius:0;background:none;color:var(--handset-ink);box-shadow:none;font:29px/1 var(--pixel)}
  html[data-theme=retro] .icon-art .os-symbol{display:none}
  html[data-theme=retro] .icon-art .retro-glyph{display:block}
  html[data-theme=retro] .icon-art::after{display:none}
  html[data-theme=retro] .desktop-icon:hover{background:#bac99a;border-color:#293523}
  html[data-theme=retro] .desktop-icon:focus-visible{outline:2px solid #293523;outline-offset:2px;background:#dce7bd}
  html[data-theme=retro] .desktop-hint{left:10px;right:10px;bottom:13px;text-align:center;color:#3f4f32;font:10px/1.5 var(--mono);letter-spacing:0;text-shadow:none;opacity:1}
  html[data-theme=retro] .phone-app-open :is(.wallpaper-brand,.desktop-icons,.desktop-hint){visibility:hidden;pointer-events:none}
  /* Four physical soft keys, backed by the existing launch controls. */
  html[data-theme=retro] footer.taskbar{display:flex;left:14px;right:14px;bottom:calc(55px + env(safe-area-inset-bottom,0px));width:auto;height:76px;padding:3px 0;gap:7px;border:0;border-radius:0;background:transparent;box-shadow:none;align-items:stretch;transform:none;backdrop-filter:none}
  html[data-theme=retro] footer.taskbar :is(.taskbar-divider,.task-buttons,.show-desktop,.desktop-clock){display:none}
  html[data-theme=retro] .dock-launchers{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));flex:3;min-width:0;gap:7px}
  html[data-theme=retro] .dock-launchers :is(.dock-willkommen,.dock-leistungen,.dock-ablauf){display:none}
  html[data-theme=retro] :is(.start-button,.dock-app){display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:68px;min-height:44px;min-width:0;padding:5px 2px;gap:5px;border:1px solid #0b100e;border-radius:9px 9px 15px 15px;background:linear-gradient(#626964,#414842);color:#f3f4e8;box-shadow:inset 0 2px 0 #91988e,0 3px 0 #171d19;font:11px/1.2 Tahoma,Arial,sans-serif;transform:none;touch-action:manipulation;cursor:pointer}
  html[data-theme=retro] .start-button{flex:1}
  html[data-theme=retro] :is(.start-button>span,.dock-app-art){display:grid;place-items:center;width:28px;height:27px;padding:0;border:0;border-radius:0;background:none;box-shadow:none;color:#e0e9cd;font:26px/1 var(--pixel)}
  html[data-theme=retro] .start-button>span::before{content:none}
  html[data-theme=retro] :is(.dock-app,.start-button) .os-symbol{display:block;width:24px;height:24px}
  html[data-theme=retro] .dock-label{display:block;position:static;transform:none;max-width:100%;padding:0;border:0;background:none;box-shadow:none;color:#f3f4e8;font:10px/1.2 Tahoma,Arial,sans-serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  html[data-theme=retro] .dock-dot{display:none}
  html[data-theme=retro] .dock-app:hover{transform:none;background:#56604e}
  html[data-theme=retro] :is(.dock-app[aria-pressed=true],.start-button[aria-expanded=true]){background:#68765a;box-shadow:inset 0 2px 4px #151d13}
  html[data-theme=retro] :is(.dock-app,.start-button):focus-visible{outline:2px solid #e1edc4;outline-offset:2px}
  html[data-theme=retro] .phone-home-indicator{display:flex;position:fixed;z-index:20000;bottom:calc(5px + env(safe-area-inset-bottom,0px));left:50%;transform:translateX(-50%);width:94px;height:44px;min-height:44px;align-items:center;justify-content:center;padding:0;border:2px solid #111812;border-radius:12px;background:linear-gradient(#77816d,#46503f);box-shadow:inset 0 1px #abb49f,0 2px #141a15;color:transparent;font-size:0;cursor:pointer;touch-action:manipulation}
  html[data-theme=retro] .phone-home-indicator::after{content:'HOME';font:16px/1 var(--pixel);letter-spacing:.1em;color:#eff4df}
  html[data-theme=retro] .phone-home-indicator:focus-visible{outline:2px solid #e1edc4;outline-offset:2px}
  /* Apps occupy the screen; document and form colours remain intact. */
  html[data-theme=retro] #workspace .os-window{inset:0!important;width:100%!important;height:100%!important;min-width:0;max-width:none;max-height:none;margin:0;padding:0;border:0;border-radius:0;box-shadow:none}
  html[data-theme=retro] #workspace .os-window.is-active{box-shadow:none}
  html[data-theme=retro] .os-window :is(.window-controls,.resize-handle,.os-window-bottom,.window-status){display:none}
  html[data-theme=retro] .os-titlebar,html[data-theme=retro] .os-window.is-active .os-titlebar{min-height:54px;padding:3px 7px;gap:4px;background:#c6d3aa;color:#293523;border-bottom:2px solid #5a6c46;touch-action:manipulation}
  html[data-theme=retro] .phone-home{display:flex;order:-2;align-items:center;justify-content:center;min-width:66px;min-height:44px;gap:3px;padding:6px;border:1px solid #64764f;border-radius:3px;background:#dae4bf;color:#293523;box-shadow:inset 1px 1px #f1f4e3;font:13px/1.2 Tahoma,Arial,sans-serif;cursor:pointer;touch-action:manipulation}
  html[data-theme=retro] .phone-home:focus-visible{outline:2px solid #293523;outline-offset:-3px}
  html[data-theme=retro] .drag-handle{justify-content:flex-start;min-height:44px;padding:4px;gap:4px;font:18px/1 var(--pixel);touch-action:manipulation;cursor:default}
  html[data-theme=retro] .title-icon{display:none}
  html[data-theme=retro] .window-content{overflow-x:hidden;scrollbar-width:thin;-webkit-overflow-scrolling:touch}
  html[data-theme=retro] .window-content::-webkit-scrollbar{width:7px}
  html[data-theme=retro] .window-content :is(.hero-grid,.section-content){padding:22px 16px}
  html[data-theme=retro] .window-content :is(p,li,h1,h2,h3){overflow-wrap:break-word}
  html[data-theme=retro] .window-content h1{font-size:clamp(38px,11vw,46px)}
  html[data-theme=retro] .window-content h2{font-size:clamp(33px,9vw,39px)}
  html[data-theme=retro] .window-content .button{min-height:44px;white-space:normal}
  html[data-theme=retro] .window-content .example-tabs button{min-height:44px}
  html[data-theme=retro] .theme-settings{padding:22px 16px}
  html[data-theme=retro] .wizard-header{padding:8px 12px;gap:6px}
  html[data-theme=retro] .wizard-sidebar{padding:5px 6px}
  html[data-theme=retro] .wizard-sidebar button{min-height:48px;font-size:10px;gap:2px}
  html[data-theme=retro] .wizard-main{padding:18px 12px;scrollbar-gutter:auto}
  html[data-theme=retro] .window-content .wizard-main h2{font-size:31px}
  html[data-theme=retro] .wizard-field :is(input,textarea,select){min-height:44px;font-size:16px}
  html[data-theme=retro] .project-wizard .wizard-choice{min-height:48px}
  html[data-theme=retro] footer.wizard-footer{position:static;min-height:68px;padding:9px 10px;gap:6px;flex-shrink:0}
  html[data-theme=retro] .project-wizard .button{min-height:44px}
  html[data-theme=retro] .wizard-privacy summary{min-height:44px;display:flex;align-items:center}
  html[data-theme=retro] .start-menu,html[data-theme=retro] .start-menu.is-top-menu{top:auto;left:15px;right:15px;bottom:var(--phone-bottom);width:auto;max-width:none;max-height:calc(100dvh - var(--phone-top) - var(--phone-bottom) - 8px);padding:7px;transform:none;border:2px solid #293523;border-radius:4px;background:#d0dcb2;box-shadow:0 4px 15px #10180b66;overflow-x:hidden;overflow-y:auto}
  html[data-theme=retro] .start-menu-rail{display:none}
  html[data-theme=retro] .start-menu-items>p{padding:8px 9px;color:#293523;font:17px/1.2 var(--pixel)}
  html[data-theme=retro] .start-menu-items :is(button,a){min-height:48px;padding:10px 9px;color:#293523;font:14px/1.3 Tahoma,Arial,sans-serif}
  html[data-theme=retro] .start-menu-items :is(button,a):is(:hover,:focus-visible){background:#334529;color:#f0f4e5;outline:0}
  html[data-theme=retro] .start-menu [data-command=arrange]{display:none}
  html[data-theme=retro] .start-menu-divider{margin:7px 9px;background:#7b8d62;box-shadow:none}
}
@media (max-width: 600px) and (max-height:700px), (max-width: 1000px) and (max-height: 600px) and (pointer: coarse) and (max-height:700px) {
  html[data-theme=retro] .wallpaper-brand{top:9px;width:196px}
  html[data-theme=retro] .wallpaper-brand span{font-size:16px;margin-top:4px}
  html[data-theme=retro] .desktop-icons{top:149px;gap:7px}
  html[data-theme=retro] .desktop-icon{min-height:66px}
  html[data-theme=retro] .desktop-hint{bottom:8px;font-size:9px}
}
@media (max-width: 600px) and (max-height:580px), (max-width: 1000px) and (max-height: 600px) and (pointer: coarse) and (max-height:580px) {
  html[data-theme=retro] .wallpaper-brand{top:5px;width:125px}
  html[data-theme=retro] .wallpaper-brand span,html[data-theme=retro] .desktop-hint{display:none}
  html[data-theme=retro] .desktop-icons{top:78px;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px 4px}
  html[data-theme=retro] .desktop-icon{min-height:67px;font-size:13px}
}
