/* Texora Droid: phone home and application surfaces, scoped to Modern on phones. */

@media (max-width: 600px), (max-width: 1000px) and (max-height: 600px) and (pointer: coarse) {
  html[data-theme=modern]{
    --phone-top:calc(44px + env(safe-area-inset-top,0px));
    --phone-bottom:calc(144px + env(safe-area-inset-bottom,0px));
  }
  html[data-theme=modern] .windows-os{
    background:radial-gradient(ellipse at 105% 65%,#d4dcc5 0,transparent 58%),radial-gradient(ellipse at 0 0,#fbf4de 0,transparent 64%),linear-gradient(155deg,#eef0da,#dbe7da 55%,#e7decf);
    -webkit-tap-highlight-color:transparent;
  }
  html[data-theme=modern] .mac-menubar{
    height:var(--phone-top);padding:env(safe-area-inset-top,0px) max(24px,env(safe-area-inset-right,0px)) 0 max(24px,env(safe-area-inset-left,0px));
    display:flex;position:fixed;top:0;left:0;right:0;z-index:20002;align-items:center;background:transparent;color:#31463d;border:0;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;gap:12px;
  }
  html[data-theme=modern] .mac-menubar :is(button,.mac-active-app){display:none}
  html[data-theme=modern] .mac-wordmark{font-size:16px;letter-spacing:-.04em}
  html[data-theme=modern] .mac-clock{margin-left:auto;font-size:12px;font-weight:600;letter-spacing:.01em}
  html[data-theme=modern] .os-desktop{top:var(--phone-top);bottom:var(--phone-bottom);left:0;right:0;overflow:hidden;background:transparent}
  html[data-theme=modern] .os-desktop::before{inset:0;width:auto;height:auto;min-width:0;min-height:0;transform:none;filter:none;background:none;box-shadow:none}
  html[data-theme=modern] .wallpaper-brand{
    top:20px;bottom:auto;left:50%;right:auto;transform:translateX(-50%);width:min(260px,calc(100% - 64px));margin:0;filter:none;
  }
  html[data-theme=modern] .wallpaper-brand img{
    display:block;width:100%;height:auto;aspect-ratio:2/1;object-fit:contain;padding:0;border:0;border-radius:32px;background:#fffdf2;
    box-shadow:none;
  }
  html[data-theme=modern] .wallpaper-brand span{margin-top:15px;font-size:11px;font-weight:600;line-height:1.6;letter-spacing:.11em;color:#42594c;text-shadow:none}
  html[data-theme=modern] .desktop-icons{
    left:max(14px,env(safe-area-inset-left,0px));right:max(14px,env(safe-area-inset-right,0px));top:clamp(208px,28dvh,254px);bottom:auto;width:auto;
    grid-template-columns:repeat(3,minmax(0,1fr));gap:22px 4px;align-items:start;
  }
  html[data-theme=modern] .desktop-icon{
    min-width:0;min-height:91px;padding:3px 0;gap:9px;font-size:11px;font-weight:600;line-height:1.35;border-radius:22px;color:#263f34;text-shadow:none;touch-action:manipulation;
  }
  html[data-theme=modern] .desktop-icon>span:last-child{padding:0;max-width:100%;overflow-wrap:normal}
  html[data-theme=modern] .icon-art{
    width:62px;height:62px;border-radius:50%;border:0;box-shadow:none;
  }
  html[data-theme=modern] .icon-art .os-symbol{width:34px;height:34px}
  html[data-theme=modern] .icon-ueber{background:linear-gradient(145deg,#f6f0ff,#cec6ef);color:#654a9d}
  html[data-theme=modern] .desktop-hint{
    left:20px;right:20px;bottom:3px;margin:0;text-align:center;font:400 11px/1.55 var(--ui-font);letter-spacing:0;color:#4b6154;opacity:1;text-shadow:none;
  }
  html[data-theme=modern] .phone-app-open :is(.wallpaper-brand,.desktop-icons,.desktop-hint){visibility:hidden;pointer-events:none}

  /* Dock stays available in every app; less-frequent destinations live on Home. */
  html[data-theme=modern] footer.taskbar{
    display:flex;
    left:50%;right:auto;bottom:calc(44px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);
    width:calc(100% - 28px);max-width:410px;height:88px;padding:10px 9px;gap:7px;border-radius:27px;align-items:center;
    background:#f5f8eec9;border:1px solid #ffffffa8;box-shadow:none;
    backdrop-filter:blur(28px) saturate(1.4);-webkit-backdrop-filter:blur(28px) saturate(1.4);
  }
  html[data-theme=modern] footer.taskbar :is(.taskbar-divider,.task-buttons,.show-desktop,.desktop-clock){display:none}
  html[data-theme=modern] .dock-launchers{flex:3;min-width:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
  html[data-theme=modern] .dock-launchers :is(.dock-willkommen,.dock-leistungen,.dock-ablauf){display:none}
  html[data-theme=modern] .start-button{
    display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-width:0;width:auto;height:66px;min-height:44px;padding:0;gap:4px;background:transparent;border:0;border-radius:16px;font-size:10px;font-weight:500;color:#30493c;
  }
  html[data-theme=modern] .start-button>span{
    display:grid;place-items:center;width:48px;height:48px;border:0;border-radius:50%;background:#cbdcbd;font-size:29px;color:#314f31;box-shadow:none;
  }
  html[data-theme=modern] .start-button .os-symbol{width:29px;height:29px}
  html[data-theme=modern] .start-button[aria-expanded=true]{background:#ffffff6b;box-shadow:none}
  html[data-theme=modern] .dock-app{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0;border:0;background:transparent;box-shadow:none;cursor:pointer;width:100%;height:66px;min-height:44px;gap:4px;border-radius:16px;transform:none}
  html[data-theme=modern] .dock-app-art{display:grid;place-items:center;width:48px;height:48px;border:0;border-radius:50%;background:#dedaf3;color:#534575}
  html[data-theme=modern] .dock-app .os-symbol{width:28px;height:28px}
  html[data-theme=modern] .dock-dot{display:none}
  html[data-theme=modern] .dock-label{
    display:block;position:static;transform:none;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis;padding:0;background:none;border:0;box-shadow:none;font:500 10px/1.3 var(--ui-font);color:#30493c;
  }
  html[data-theme=modern] .dock-app:hover{transform:none}
  html[data-theme=modern] .dock-app[aria-pressed=true]{background:#ffffff73}
  html[data-theme=modern] .phone-home-indicator{
    display:flex;position:fixed;z-index:20000;bottom:env(safe-area-inset-bottom,0px);left:50%;transform:translateX(-50%);width:64px;height:44px;min-height:44px;align-items:center;justify-content:center;
    padding:0;border:0;border-radius:20px;background:transparent;color:transparent;font-size:0;cursor:pointer;touch-action:manipulation;
  }
  html[data-theme=modern] .phone-home-indicator::after{content:'';width:18px;height:18px;background:transparent;border:2px solid #40584b;border-radius:50%;box-shadow:none}
  html[data-theme=modern] .phone-home-indicator:focus-visible{outline:2px solid #40584b;outline-offset:-6px}

  /* Inline window geometry is intentionally replaced only on these phones. */
  html[data-theme=modern] #workspace .os-window{
    inset:0!important;width:100%!important;height:100%!important;max-width:none;max-height:none;min-width:0;margin:0;padding:0;border:0;border-radius:24px 24px 0 0;box-shadow:none;
  }
  html[data-theme=modern] #workspace .os-window.is-active{box-shadow:none}
  html[data-theme=modern] .os-window :is(.window-controls,.resize-handle,.os-window-bottom,.window-status){display:none}
  html[data-theme=modern] .os-titlebar,html[data-theme=modern] .os-window.is-active .os-titlebar{
    min-height:56px;padding:4px max(12px,env(safe-area-inset-right,0px)) 4px max(8px,env(safe-area-inset-left,0px));gap:6px;background:#f0f4e9;color:#263f34;border-bottom:1px solid #dce4d5;touch-action:manipulation;
  }
  html[data-theme=modern] .phone-home{
    display:flex;order:-2;align-items:center;justify-content:center;gap:3px;flex-shrink:0;min-width:66px;min-height:44px;padding:8px;border:0;border-radius:11px;background:transparent;color:#345e3e;box-shadow:none;font:500 14px/1.2 var(--ui-font);cursor:pointer;touch-action:manipulation;
  }
  html[data-theme=modern] .phone-home:hover{background:#dce8d3}
  html[data-theme=modern] .phone-home:focus-visible{outline:2px solid var(--blue);outline-offset:-2px}
  html[data-theme=modern] .drag-handle{justify-content:flex-start;min-height:44px;padding:6px 2px;gap:7px;font-size:14px;font-weight:600;touch-action:manipulation;cursor:default}
  html[data-theme=modern] .title-icon{display:none}
  html[data-theme=modern] .window-content{overflow-x:hidden;scrollbar-width:thin;-webkit-overflow-scrolling:touch}
  html[data-theme=modern] .window-content :is(.hero-grid,.section-content){padding:24px 20px}
  html[data-theme=modern] .window-content :is(.button,.example-tabs button){min-height:44px}
  html[data-theme=modern] .window-content :is(p,li,h1,h2,h3){overflow-wrap:break-word}
  html[data-theme=modern] .window-content .button{white-space:normal}
  html[data-theme=modern] .window-content h1{font-size:clamp(30px,8.8vw,38px)}
  html[data-theme=modern] .window-content h2{font-size:clamp(27px,7.5vw,33px)}
  html[data-theme=modern] .window-content .theme-settings h2{font-size:27px}
  html[data-theme=modern] .theme-settings{padding:24px 18px}
  html[data-theme=modern] .wizard-header{padding:9px 16px}
  html[data-theme=modern] .wizard-sidebar{padding:6px 8px}
  html[data-theme=modern] .wizard-sidebar button{min-height:52px;font-size:10px;gap:3px}
  html[data-theme=modern] .wizard-main{padding:20px 16px;scrollbar-gutter:auto}
  html[data-theme=modern] .window-content .wizard-main h2{font-size:25px}
  html[data-theme=modern] .project-wizard .button{min-height:44px}
  html[data-theme=modern] footer.wizard-footer{position:static;min-height:68px;padding:10px 12px;gap:7px;flex-shrink:0}
  html[data-theme=modern] .wizard-privacy summary{min-height:44px;display:flex;align-items:center}
  html[data-theme=modern] .start-menu,html[data-theme=modern] .start-menu.is-top-menu{
    top:auto;left:14px;right:14px;transform:none;bottom:var(--phone-bottom);width:auto;max-height:calc(100dvh - var(--phone-top) - var(--phone-bottom) - 10px);padding:12px;border-radius:24px;overflow-x:hidden;overflow-y:auto;
    background:#f5f7eef7;box-shadow:0 12px 40px #283d3133;
  }
  html[data-theme=modern] .start-menu-items>p{font-size:11px;padding:6px 12px 12px}
  html[data-theme=modern] .start-menu-items :is(button,a){min-height:48px;padding:11px 12px;font-size:14px;border-radius:12px}
  html[data-theme=modern] .start-menu-items :is(button,a):focus-visible{outline:2px solid var(--blue);outline-offset:-2px}
  html[data-theme=modern] .start-menu-divider{margin:8px 10px}
}

@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=modern] .wallpaper-brand{top:8px;width:220px}
  html[data-theme=modern] .wallpaper-brand span{margin-top:10px;font-size:10px}
  html[data-theme=modern] .desktop-icons{top:182px;gap:18px 4px}
  html[data-theme=modern] .desktop-hint{font-size:10px;bottom:4px}
}
@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=modern] .wallpaper-brand{width:150px;top:0}
  html[data-theme=modern] .wallpaper-brand span{display:none}
  html[data-theme=modern] .desktop-icons{top:88px;gap:8px 4px}
  html[data-theme=modern] .desktop-icon{min-height:80px;gap:5px}
  html[data-theme=modern] .icon-art{width:52px;height:52px;border-radius:50%}
  html[data-theme=modern] .desktop-hint{display:none}
}
@media(max-width:350px){html[data-theme=modern] .dock-label{font-size:9px}}

@media (max-width: 600px), (max-width: 1000px) and (max-height: 600px) and (pointer: coarse) {
  html[data-theme=modern]{--blue:#386641;--blue-hover:#284d30;--navy:#233d30;--paper:#fbfcf7;--theme-line:#dce4d5;--theme-radius:18px}
  html[data-theme=modern] .desktop-release,html[data-theme=modern] .os-desktop::after{display:none}
  html[data-theme=modern] .mac-wordmark{font-family:var(--ui-font);font-weight:700}
  html[data-theme=modern] .mac-clock{font-family:var(--ui-font)}
  html[data-theme=modern] .icon-art::after{display:none}
  html[data-theme=modern] .icon-art .os-symbol{display:block}
  html[data-theme=modern] .icon-projekt{background:#d7cfee;color:#594273}
  html[data-theme=modern] .icon-willkommen{background:#cbdcbd;color:#365c35}
  html[data-theme=modern] .icon-leistungen{background:#f2dfad;color:#765718}
  html[data-theme=modern] .icon-ablauf{background:#c4dce8;color:#315a70}
  html[data-theme=modern] .icon-ueber{background:#edd0c3;color:#7b4d3d}
  html[data-theme=modern] .icon-kontakt{background:#c4dfd3;color:#31664f}
  html[data-theme=modern] .dock-kontakt .dock-app-art{background:#c4dfd3;color:#31664f}
  html[data-theme=modern] .dock-einstellungen .dock-app-art{background:#e1dccb;color:#625937}
  html[data-theme=modern] .desktop-icon:hover{background:#ffffff52;border-color:transparent}
  html[data-theme=modern] :is(.desktop-icon,.dock-app):focus-visible{outline:2px solid #386641;outline-offset:2px}
  html[data-theme=modern] .dock-app .os-symbol{display:block}
  html[data-theme=modern] .start-button .os-symbol{display:block}
  html[data-theme=modern] .start-button>span::before{content:none}
  html[data-theme=modern] .window-content{background:#fbfcf7}
  html[data-theme=modern] .window-content .hero-grid{background:linear-gradient(140deg,#fbfcf7,#edf3e5)}
  html[data-theme=modern] .window-content .section-content{background:#fbfcf7}
  html[data-theme=modern] .process .window-content .section-content{background:#fbfcf7}
  html[data-theme=modern] .window-content .button{border-radius:24px}
  html[data-theme=modern] .window-content .button.primary{background:#386641;border-color:#386641;color:white}
  html[data-theme=modern] .window-content .button.primary:hover{background:#284d30}
  html[data-theme=modern] :is(.theme-settings,.wizard-main){background:#fbfcf7}
  html[data-theme=modern] :is(.wizard-header,footer.wizard-footer){background:#f0f4e9;border-color:#dce4d5}
  html[data-theme=modern] .theme-option:has(input:checked){border-color:#386641;background:#edf3e5}
  html[data-theme=modern] .theme-option input{accent-color:#386641}
  html[data-theme=modern] .wizard-field :is(input,textarea,select){min-height:44px}
  html[data-theme=modern] .project-wizard .wizard-choice{min-height:48px}
  html[data-theme=modern] .wizard-header{gap:8px}
  html[data-theme=modern] .menu-icon{background:#dce8d3;color:#345e3e;border-radius:50%}
  html[data-theme=modern] .start-menu-items :is(button,a){color:#30493c}
  html[data-theme=modern] .start-menu-items :is(button,a):hover{background:#dce8d3;color:#263f34}
}
