/* The builder workspace; shared and administration pages keep their own layout. */
body.home-page{background:var(--deck-bg);font-family:"Segoe UI",Arial,sans-serif}
body.home-page::before{display:none}
.home-page .app-shell{width:min(1120px,calc(100% - 48px))}
.home-page .topbar{position:relative;padding:20px 0;background:var(--deck-bg-2);box-shadow:none;backdrop-filter:none}
.home-page .app-shell-top{padding:0;border:0;background:none}
.home-page .brand-title{font-size:1.3rem;line-height:1.4}
.home-page .techtahi-animated{text-shadow:none}
.home-page .subtitle{font-size:.85rem;color:var(--deck-muted);font-weight:400}
.home-page .brand-mark{width:46px;height:46px;box-shadow:none}
.home-page .brand-sub{font-size:.8rem;margin-top:4px}
.home-page .top-actions{margin-top:8px;justify-content:flex-start}
.home-page .app-shell-main{padding-top:28px}
.home-page .glass,.home-page .middle-panel{background:var(--deck-panel-strong);border:1px solid var(--deck-line);border-radius:16px;box-shadow:0 4px 18px rgba(0,0,0,.05);border-image:none;transform:none}
.home-page .glass::before{display:none}
.home-page .card-pad{padding:26px}
.home-page .section-title,.home-page .middle-panel .section-title{display:block;color:var(--deck-text);font-size:1.2rem;font-weight:700;letter-spacing:-.02em;margin-bottom:6px}
.home-page .prompt-head .section-title::before,.home-page label[for="outputText"]::before{display:inline-grid;place-items:center;width:28px;height:28px;margin-right:10px;border-radius:50%;background:var(--deck-cyan);color:var(--deck-bg);font-size:.85rem;vertical-align:middle;content:"1"}
.home-page label[for="outputText"]::before{content:"2"}
.home-page .helper,.home-page .middle-panel .helper{display:block;font-size:.9rem;line-height:1.6;color:var(--deck-muted);max-width:75ch}
.home-page #script-prompt,.home-page #outputText{background:var(--deck-bg)!important;border:1px solid var(--deck-line);border-radius:10px;color:var(--deck-text);box-shadow:none;padding:18px;margin-top:12px;resize:vertical}
.home-page #script-prompt{height:170px;min-height:140px;font:1rem/1.65 "Segoe UI",Arial,sans-serif}
.home-page #outputText{height:260px;min-height:180px;font: .9rem/1.65 Consolas,monospace}
.home-page .btn,.home-page .overlay-btn,.home-page .language-select{min-height:44px;padding:10px 14px;font-size:.85rem;font-weight:600;border-radius:8px;box-shadow:none;transform:none}
.home-page .btn,.home-page .overlay-btn{background:var(--deck-panel-strong)!important;border-color:var(--deck-line)!important;color:var(--deck-text)!important}
.home-page .btn::before,.home-page .overlay-btn::before{display:none}
.home-page .btn:hover,.home-page .overlay-btn:hover{background:var(--deck-bg)!important;border-color:var(--deck-cyan)!important}
.home-page #copybtn,.home-page #viewBtn{background:var(--deck-cyan)!important;border-color:var(--deck-cyan)!important;color:var(--deck-bg)!important;font-weight:700;padding-inline:24px}
.home-page :is(button,a,select,textarea,summary):focus-visible{outline:3px solid var(--deck-cyan)!important;outline-offset:4px;box-shadow:none}
.home-page .prompt-actions{flex-wrap:wrap!important;overflow:visible;gap:16px!important}
.home-page .prompt-actions>.d-flex:first-child{flex-wrap:wrap!important}
.home-page .llm-status-wrap{margin-left:0}
.home-page .llm-buttons{flex:1 1 100%;flex-wrap:wrap!important;border-top:1px solid var(--deck-line);padding-top:16px;overflow:visible}
.home-page .llm-buttons .btn{flex:0 0 auto}
.home-page .action-row{flex-wrap:wrap!important;overflow:visible;gap:10px!important}
.home-page .action-row>.btn,.home-page .output-history-actions{flex:0 0 auto}
.home-page .output-history-actions{margin-left:auto}
.home-page .equal-panels-row{--bs-gutter-y:16px}
.home-page .help-panel{padding:16px 24px}
.home-page .help-panel summary{cursor:pointer;min-height:44px;gap:16px}
.home-page .help-panel summary::after{content:"+";font-size:1.5rem;color:var(--deck-cyan)}
.home-page .help-panel[open] summary::after{content:"−"}
.home-page .help-panel summary::-webkit-details-marker{display:none}
.home-page .help-panel .section-title{font-size:1rem;margin:0}
.home-page .help-panel .badge{display:none}
.home-page #instructionsBox{height:auto;min-height:0;max-height:440px;overflow:auto;scrollbar-width:auto;background:transparent!important;border:0;box-shadow:none;margin-top:12px}
.home-page #instructionsBox::-webkit-scrollbar{display:block;width:8px}
.home-page .page-footer{margin-top:24px;padding-bottom:24px}
.home-page .guided-shine,.home-page .guided-shine-active{animation:none!important}
@media(max-width:600px){
 .home-page .app-shell{width:calc(100% - 24px)}
 .home-page .topbar{padding:16px 0}
 .home-page .card-pad{padding:18px}
 .home-page .top-actions{display:flex;width:100%;flex-wrap:wrap}
 .home-page .top-actions .btn{min-height:44px;padding:10px;font-size:.8rem}
 .home-page .subtitle{display:block}
 .home-page .brand-sub{line-height:1.5}
 .home-page .prompt-text-actions{position:static;display:flex;flex-wrap:wrap}
 .home-page .prompt-actions>.d-flex:first-child{width:100%}
 .home-page #copybtn{width:100%}
 .home-page .output-history-actions{margin-left:0}
 .home-page .help-panel .helper{display:none}
}
@media(prefers-reduced-motion:reduce){
 .home-page *, .home-page *::before,.home-page *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}

/* Match light-mode specificity in the shared stylesheet. */
html[data-theme="light"] body.home-page{background:var(--deck-bg)}
html[data-theme="light"] .home-page .btn,html[data-theme="light"] .home-page .overlay-btn{box-shadow:none}
.home-page .section-title{text-transform:none}
.home-page #instructionsBox li::marker{color:var(--deck-green)}
.home-page .equal-panels-row>.col-12+.col-12{margin-top:16px}

/* Fit tablet and desktop workspaces to the available browser height. */
@media(min-width:744px) and (min-height:700px){
 body.home-page{height:100dvh;display:grid;grid-template-rows:auto minmax(0,1fr)}
 .home-page .app-shell{width:calc(100% - 40px);max-width:1680px}
 .home-page .topbar{padding:12px 0}
 .home-page .brand-sub{max-width:620px}
 .home-page .app-shell-main{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;gap:12px 16px;min-height:0;padding:14px 0 10px}
 .home-page .card-pad{padding:18px}
 .home-page .prompt-panel{display:flex;flex-direction:column;margin:0!important;min-height:0}
 .home-page .prompt-panel>.d-flex:first-child{gap:10px!important}
 .home-page .prompt-head{flex:1 1 260px}
 .home-page .section-title,.home-page .middle-panel .section-title{font-size:1.05rem;margin-bottom:4px}
 .home-page .helper,.home-page .middle-panel .helper{font-size:.82rem;line-height:1.45}
 .home-page .textarea-container{flex:1 1 auto;min-height:100px;display:flex}
 .home-page #script-prompt,.home-page #outputText{height:100%;min-height:100px;margin:0;padding:14px;resize:none}
 .home-page .btn,.home-page .overlay-btn,.home-page .language-select{min-height:38px;padding:8px 11px;font-size:.8rem}
 .home-page .prompt-actions{flex:none;gap:10px!important;margin-top:12px!important}
 .home-page .llm-buttons{padding-top:10px;gap:6px!important}
 .home-page .equal-panels-row{display:grid;grid-template-rows:auto minmax(0,1fr);gap:12px;margin:0!important;min-height:0}
 .home-page .equal-panels-row>.col-12{width:auto;padding:0;margin:0!important;min-height:0}
 .home-page .equal-panels-row>.col-12:nth-child(2)>.middle-panel{display:flex;flex-direction:column}
 .home-page .help-panel{padding:10px 16px}
 .home-page .help-panel summary{min-height:36px}
 .home-page .help-panel .helper{display:none}
 .home-page #instructionsBox{max-height:110px;margin-top:6px;padding:4px 12px!important;font-size:.82rem}
 .home-page #instructionsBox li{margin:.25rem 0}
 .home-page .action-row{flex:none;gap:6px!important;margin-top:12px!important}
 .home-page .action-row>.btn,.home-page .output-history-actions .btn{padding:8px 10px}
 .home-page .output-history-actions{margin-left:0}
 .home-page .page-footer{grid-column:1/-1;margin:0;padding:0}
 .home-page .footer-bar{padding:5px 12px;box-shadow:none}
}

@media(min-width:744px) and (max-width:1099px) and (min-height:700px){
 .home-page .app-shell{width:calc(100% - 24px)}
 .home-page .topbar{padding:8px 0}
 .home-page .topbar .app-shell-top>.d-flex{gap:8px!important}
 .home-page .top-actions{margin-top:0}
 .home-page .app-shell-main{gap:10px;padding-top:10px}
 .home-page .card-pad{padding:12px}
 .home-page .prompt-head{flex-basis:100%}
 .home-page .prompt-text-actions{display:flex;flex-wrap:wrap;gap:6px}
 .home-page .prompt-actions>.d-flex:first-child{flex:1 1 100%;gap:6px!important}
 .home-page .llm-status-wrap{white-space:normal;min-width:0}
 .home-page .llm-buttons{gap:6px!important}
 .home-page .help-panel{padding:8px 12px}
 .home-page #instructionsBox{max-height:90px}
 .home-page .footer-bar{flex-wrap:wrap;justify-content:center}
}

/* Keep controls comfortable to tap, including larger iPad displays. */
@media(pointer:coarse){
 .home-page .btn,.home-page .overlay-btn,.home-page .language-select,
 .home-page .footer-link,.home-page .help-panel summary{min-height:44px}
 .home-page #script-prompt,.home-page #outputText,.home-page .language-select{font-size:16px}
}
