
:root{
  --bg:#08090b;--panel:rgba(255,255,255,.06);--line:rgba(255,255,255,.10);
  --text:#f6f7f9;--muted:#8c919b;--accent:#ff3450;--radius:26px;
  --shadow:0 24px 80px rgba(0,0,0,.34)
}
*{box-sizing:border-box}
html{background:var(--bg);color-scheme:dark}
body{
  margin:0;min-height:100dvh;color:var(--text);overflow-x:hidden;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:linear-gradient(180deg,#0f1013 0%,#08090b 65%,#07080a 100%)
}
button,input,textarea{font:inherit}button{color:inherit}
.noise{position:fixed;inset:0;pointer-events:none;opacity:.12;mix-blend-mode:soft-light;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E")}
.ambient{position:fixed;border-radius:50%;filter:blur(80px);pointer-events:none;opacity:.18}
.a1{width:430px;height:430px;background:#ff3450;right:-180px;top:-180px}.a2{width:500px;height:500px;background:#4b63ff;left:-300px;top:35%}
.os-shell{width:min(1120px,100%);margin:0 auto;padding:14px 16px 118px}
.glass{background:linear-gradient(180deg,rgba(255,255,255,.085),rgba(255,255,255,.04));border:1px solid var(--line);box-shadow:inset 0 1px 0 rgba(255,255,255,.07),var(--shadow);backdrop-filter:blur(24px) saturate(1.25);-webkit-backdrop-filter:blur(24px) saturate(1.25)}
.topbar{position:sticky;top:10px;z-index:30;height:60px;padding:0 11px;border-radius:21px;display:flex;align-items:center;justify-content:space-between}
.brand{border:0;background:transparent;padding:0;display:flex;align-items:center;gap:10px;font-weight:800;letter-spacing:.03em}
.mark{display:grid;place-items:center;width:37px;height:37px;border-radius:12px;background:#f5f6f7;color:#0c0d0f;font-weight:950;font-size:13px;letter-spacing:-.04em}
.brand-copy{font-size:13px}.brand-copy small{color:var(--muted);margin-left:4px}
.top-actions{display:flex;align-items:center;gap:7px}.system-action,.status-pill{border:1px solid var(--line);background:rgba(0,0,0,.22);height:36px;border-radius:999px}
.system-action{width:36px}.status-pill{padding:0 12px;display:flex;gap:8px;align-items:center;font-weight:800;font-size:12px}
.dot{width:7px;height:7px;border-radius:50%;background:#59e391;box-shadow:0 0 14px #59e391}
.view{display:none}.view.active{display:block;animation:viewIn .28s ease}
@keyframes viewIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.hero{padding:48px 6px 26px;display:flex;gap:20px;justify-content:space-between;align-items:flex-end}
.eyebrow,.section-title{font-size:10px;font-weight:900;letter-spacing:.18em;color:#b3b7bf}
.hero h1,.view-head h2{font-size:clamp(36px,7vw,72px);line-height:.95;letter-spacing:-.06em;margin:10px 0 14px}
.sub,.view-head p{margin:0;color:var(--muted);font-size:14px}
.hero-badge{border-left:1px solid var(--line);padding-left:18px;min-width:120px}.hero-badge span,.hero-badge b{display:block}.hero-badge span{font-size:8px;letter-spacing:.16em;color:#747a84}.hero-badge b{font-size:18px;margin-top:3px}
.workspace-grid,.build-layout{display:grid;grid-template-columns:1.25fr .75fr;gap:12px}
.panel{border-radius:var(--radius);min-height:220px;padding:18px}
.panel-head{display:flex;justify-content:space-between;align-items:center;font-size:10px;font-weight:900;letter-spacing:.15em;color:#aeb2ba}
.tiny{border:1px solid var(--line);background:rgba(255,255,255,.05);border-radius:9px;width:28px;height:28px}
.focus-card{height:calc(100% - 28px);display:flex;flex-direction:column;justify-content:flex-end}
.tag{align-self:flex-start;padding:6px 8px;border-radius:8px;background:rgba(255,51,78,.14);color:#ff6b7d;font-size:9px;font-weight:900;letter-spacing:.12em;border:1px solid rgba(255,51,78,.2)}
.focus-card h2{font-size:30px;letter-spacing:-.04em;margin:10px 0 7px}.focus-card p{color:var(--muted);margin:0;max-width:560px;font-size:13px;line-height:1.5}
.progress{height:3px;background:rgba(255,255,255,.07);border-radius:99px;margin-top:18px;overflow:hidden}.progress i{height:100%;width:28%;display:block;background:linear-gradient(90deg,#ff334e,#ff7690);border-radius:99px}
.notes-panel textarea{width:100%;height:160px;resize:none;border:0;outline:0;background:transparent;color:#f2f3f4;padding:20px 0 0;font-size:15px;line-height:1.55}.notes-panel textarea::placeholder{color:#686d76}
.save-state{font-size:9px;color:#737984}.section-title{display:flex;justify-content:space-between;margin:28px 5px 12px}.section-title .muted{color:#5d626b}
.app-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.app-card{min-height:106px;border-radius:22px;border:1px solid var(--line);background:rgba(255,255,255,.045);padding:15px;text-align:left;display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center;box-shadow:inset 0 1px rgba(255,255,255,.05);transition:.22s ease;position:relative;overflow:hidden}
.app-card:before{content:"";position:absolute;inset:auto -30px -50px auto;width:110px;height:110px;border-radius:50%;filter:blur(20px);opacity:.22;background:var(--glow)}.app-card:active{transform:scale(.985)}.app-card:hover{border-color:rgba(255,255,255,.2);transform:translateY(-2px)}
.red{--glow:#ff3450}.cyan{--glow:#21d5ff}.violet{--glow:#956fff}.green{--glow:#54e9a1}.amber{--glow:#ffbb48}.silver{--glow:#d7dde7}
.app-icon{width:46px;height:46px;border-radius:15px;display:grid;place-items:center;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.08);font-weight:950;font-size:12px}
.app-card b{display:block;font-size:12px;letter-spacing:.08em}.app-card small{display:block;color:#858b95;font-size:10px;margin-top:4px}.app-card em{font-style:normal;color:#8b9099;font-size:13px}
.idea-strip{display:flex;gap:8px;overflow:auto;padding:0 2px 4px;scrollbar-width:none}.idea-strip:empty:before{content:"Noch nichts gespeichert.";color:#5f646d;font-size:11px;padding:8px 3px}
.idea-chip{flex:none;max-width:260px;border:1px solid var(--line);background:rgba(255,255,255,.04);border-radius:15px;padding:11px 13px;font-size:11px;color:#cfd2d7}.ghost-link{border:0;background:transparent;color:#666c75;font-size:9px;font-weight:900;letter-spacing:.12em}
.view-head{padding:48px 5px 24px;display:flex;justify-content:space-between;gap:24px;align-items:flex-end}.view-head h2{font-size:clamp(38px,7vw,68px)}.back-btn{border:1px solid var(--line);background:rgba(255,255,255,.05);padding:10px 12px;border-radius:999px;font-size:9px;font-weight:900;letter-spacing:.1em}
.project-list{display:grid;gap:8px;margin-top:14px}.project-item{border:1px solid var(--line);background:rgba(255,255,255,.035);border-radius:17px;padding:13px;text-align:left;display:flex;justify-content:space-between;gap:12px}.project-item.active{background:rgba(255,255,255,.10)}.project-item b,.project-item small{display:block}.project-item b{font-size:12px}.project-item small{color:#777d87;margin-top:4px;font-size:9px}
.build-console{display:flex;flex-direction:column}.console-block{margin-top:auto}.console-label{font-size:8px;letter-spacing:.15em;color:#777d87}.console-block h3{font-size:28px;margin:7px 0 5px;letter-spacing:-.04em}.console-block p{font-size:10px;color:#787e88;word-break:break-all}
.console-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:12px}.console-actions button,.studio-footer button{border:1px solid var(--line);background:rgba(255,255,255,.05);border-radius:12px;padding:10px;font-size:9px;font-weight:900;letter-spacing:.08em}
.build-note{margin-top:18px;border-top:1px solid var(--line);padding-top:13px}.build-note span{font-size:8px;letter-spacing:.14em;color:#737984}.build-note textarea{width:100%;min-height:90px;margin-top:8px;border:0;outline:0;resize:none;background:transparent;color:#fff}
.studio-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.studio-tile{min-height:130px;border-radius:22px;padding:16px;text-align:left;display:flex;flex-direction:column;justify-content:space-between}.studio-tile span{font-size:9px;color:#6c727c}.studio-tile b{font-size:16px;letter-spacing:-.02em}.studio-tile small{color:#777d87}.studio-tile.selected{outline:1px solid rgba(255,255,255,.35);background:rgba(255,255,255,.09)}
.studio-board{margin-top:12px;min-height:330px}.studio-title{width:100%;border:0;outline:0;background:transparent;color:#fff;font-size:32px;font-weight:800;letter-spacing:-.04em;margin-top:28px}.studio-board textarea{width:100%;min-height:160px;border:0;outline:0;resize:none;background:transparent;color:#d8dbe0;font-size:14px;line-height:1.6;margin-top:10px}.studio-footer{display:flex;justify-content:space-between;align-items:center;border-top:1px solid var(--line);padding-top:12px}.studio-footer span{font-size:8px;letter-spacing:.12em;color:#656b74}
.dock{position:fixed;z-index:25;bottom:max(13px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(520px,calc(100% - 28px));height:72px;border-radius:25px;padding:7px;display:grid;grid-template-columns:repeat(4,1fr)}
.dock button{border:0;background:transparent;border-radius:18px;display:grid;place-items:center;align-content:center;gap:3px}.dock button.active{background:rgba(255,255,255,.08)}.dock span{font-size:18px}.dock small{font-size:8px;font-weight:900;letter-spacing:.11em;color:#8f949e}
.sheet{border:0;background:transparent;padding:0;width:min(760px,100%);max-width:none;color:var(--text)}.sheet::backdrop{background:rgba(0,0,0,.68);backdrop-filter:blur(10px)}.sheet[open]{display:grid;align-items:end;min-height:100dvh;margin:0 auto}
.sheet-inner{width:100%;border-radius:30px 30px 0 0;padding:11px 16px calc(24px + env(safe-area-inset-bottom))}.sheet-grabber{width:38px;height:4px;background:#4a4e56;border-radius:99px;margin:0 auto 15px}
.search-wrap{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;padding:11px 12px;background:rgba(0,0,0,.25);border:1px solid var(--line);border-radius:17px}.search-wrap input{border:0;outline:0;background:transparent;color:#fff;min-width:0}.search-wrap button,.control-head button{border:1px solid var(--line);background:rgba(255,255,255,.05);border-radius:10px;padding:6px 8px;font-size:9px}
.command-list{display:grid;gap:6px;margin-top:12px}.command-item{border:1px solid transparent;background:transparent;border-radius:15px;padding:12px;display:flex;justify-content:space-between;text-align:left}.command-item:hover,.command-item:focus{background:rgba(255,255,255,.06);border-color:var(--line);outline:0}.command-item b{font-size:12px}.command-item small{color:#777d87}
.control-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.control-head small{color:#737984;font-size:9px;letter-spacing:.12em}.control-head h3{font-size:24px;margin:2px 0 0;letter-spacing:-.03em}
.toggle-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.toggle{border:1px solid var(--line);background:rgba(255,255,255,.04);border-radius:18px;padding:15px;text-align:left}.toggle.on{background:#f1f2f4;color:#0d0e10}.toggle b,.toggle small{display:block}.toggle b{font-size:11px}.toggle small{font-size:9px;opacity:.58;margin-top:4px}
.system-card{margin-top:10px;border:1px solid var(--line);border-radius:17px;padding:14px;display:flex;justify-content:space-between;font-size:9px;letter-spacing:.12em;color:#818791}.system-card b{color:#59e391}
.toast{position:fixed;z-index:80;left:50%;bottom:100px;transform:translate(-50%,20px);opacity:0;pointer-events:none;border-radius:999px;padding:11px 15px;font-size:11px;font-weight:800;transition:.25s}.toast.show{opacity:1;transform:translate(-50%,0)}
body.quiet .hero .sub,body.quiet .eyebrow,body.quiet .section-title .muted,body.quiet .notes-panel{display:none}body.quiet .workspace-grid{grid-template-columns:1fr}body.night{filter:brightness(.72)}body.no-motion *,body.no-motion *:before{animation:none!important;transition:none!important}
@media(max-width:760px){.hero,.view-head{padding-top:36px;align-items:flex-start}.hero-badge{display:none}.workspace-grid,.build-layout{grid-template-columns:1fr}.app-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.studio-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:390px){.os-shell{padding-left:11px;padding-right:11px}.app-grid{grid-template-columns:1fr}.view-head{display:block}.back-btn{margin-top:18px}}

.focus-timer-float{
  position:fixed;
  z-index:70;
  left:50%;
  bottom:100px;
  transform:translate(-50%,22px) scale(.96);
  width:min(360px,calc(100% - 34px));
  padding:13px 14px;
  border-radius:20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  opacity:0;
  pointer-events:none;
  transition:.24s ease;
}
.focus-timer-float.show{
  opacity:1;
  transform:translate(-50%,0) scale(1);
  pointer-events:auto;
}
.focus-timer-float small{
  display:block;
  font-size:8px;
  font-weight:900;
  letter-spacing:.16em;
  color:#8d939c;
  margin-bottom:2px;
}
.focus-timer-float strong{
  display:block;
  font-size:28px;
  line-height:1;
  letter-spacing:-.04em;
}
.focus-timer-float button{
  border:1px solid var(--line);
  background:rgba(255,255,255,.06);
  border-radius:12px;
  padding:10px 12px;
  font-size:9px;
  font-weight:900;
  letter-spacing:.10em;
}

/* P5.STUDIO v0.3 */
.studio-shell{
  display:grid;
  grid-template-columns:280px 1fr;
  gap:12px;
  align-items:start;
}
.studio-sidebar{
  position:sticky;
  top:82px;
  min-height:520px;
}
.studio-project-list{
  display:grid;
  gap:8px;
  margin-top:14px;
}
.studio-project-item{
  border:1px solid var(--line);
  background:rgba(255,255,255,.035);
  border-radius:17px;
  padding:13px;
  text-align:left;
  display:flex;
  justify-content:space-between;
  gap:12px;
}
.studio-project-item.active{
  background:rgba(255,255,255,.10);
  border-color:rgba(255,255,255,.22);
}
.studio-project-item b,
.studio-project-item small{
  display:block;
}
.studio-project-item b{
  font-size:12px;
}
.studio-project-item small{
  margin-top:4px;
  color:#777d87;
  font-size:9px;
}
.studio-main{
  min-width:0;
}
.studio-project-head{
  min-height:auto;
}
.studio-topline{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-end;
}
.studio-kicker{
  display:block;
  font-size:8px;
  font-weight:900;
  letter-spacing:.16em;
  color:#727883;
  margin-bottom:5px;
}
.studio-project-name{
  width:100%;
  border:0;
  outline:0;
  background:transparent;
  color:#fff;
  font-size:34px;
  font-weight:850;
  letter-spacing:-.05em;
  padding:0;
}
.studio-select{
  border:1px solid var(--line);
  background:rgba(255,255,255,.06);
  color:#fff;
  border-radius:12px;
  padding:10px 12px;
  font-size:9px;
  font-weight:900;
  letter-spacing:.10em;
}
.studio-status-row{
  display:flex;
  gap:7px;
  flex-wrap:wrap;
  margin-top:18px;
}
.status-chip{
  border:1px solid var(--line);
  background:rgba(255,255,255,.035);
  color:#8d939c;
  border-radius:999px;
  padding:8px 10px;
  font-size:8px;
  font-weight:900;
  letter-spacing:.12em;
}
.status-chip.active{
  background:#f3f4f6;
  color:#0b0c0e;
}
.studio-module-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-top:12px;
}
.studio-module{
  min-height:240px;
}
.studio-module textarea{
  width:100%;
  min-height:175px;
  border:0;
  outline:0;
  resize:none;
  background:transparent;
  color:#e6e8eb;
  font-size:13px;
  line-height:1.6;
  margin-top:14px;
}
.studio-idea-module{
  grid-column:1 / -1;
  min-height:210px;
}
.studio-idea-module textarea{
  min-height:130px;
  font-size:15px;
}
.studio-notes-module{
  grid-column:1 / -1;
}
.check-list,
.link-list{
  display:grid;
  gap:8px;
  margin-top:14px;
}
.check-item,
.link-item{
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:10px;
  align-items:center;
  border:1px solid var(--line);
  background:rgba(255,255,255,.035);
  border-radius:14px;
  padding:11px 12px;
}
.check-item.done .check-text{
  opacity:.45;
  text-decoration:line-through;
}
.check-toggle{
  width:18px;
  height:18px;
  border-radius:6px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.05);
  display:grid;
  place-items:center;
  font-size:10px;
}
.check-item.done .check-toggle{
  background:#f3f4f6;
  color:#0a0b0d;
}
.check-text{
  font-size:11px;
  line-height:1.35;
}
.item-remove{
  border:0;
  background:transparent;
  color:#656b75;
  font-size:12px;
}
.link-item{
  grid-template-columns:1fr auto;
}
.link-main{
  min-width:0;
}
.link-main b,
.link-main small{
  display:block;
}
.link-main b{
  font-size:11px;
}
.link-main small{
  margin-top:4px;
  color:#737984;
  font-size:9px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.link-actions{
  display:flex;
  gap:5px;
}
.link-actions button{
  border:1px solid var(--line);
  background:rgba(255,255,255,.04);
  border-radius:9px;
  padding:6px 8px;
  font-size:9px;
}
@media(max-width:860px){
  .studio-shell{grid-template-columns:1fr}
  .studio-sidebar{position:static;min-height:auto}
  .studio-project-list{display:flex;overflow:auto;padding-bottom:2px}
  .studio-project-item{min-width:190px}
}
@media(max-width:700px){
  .studio-module-grid{grid-template-columns:1fr}
  .studio-idea-module,.studio-notes-module{grid-column:auto}
  .studio-topline{align-items:flex-start;flex-direction:column}
  .studio-project-name{font-size:28px}
}

/* =========================================================
   P5.FOLD OS v0.4 — FOLD WORKSPACE / SPLIT VIEW
   ========================================================= */
.fold-workspace{
  display:grid;
  grid-template-columns:72px minmax(0,1fr) 320px;
  gap:12px;
  align-items:start;
  margin-top:12px;
}
.fold-main{min-width:0}
.fold-rail{
  position:sticky;
  top:82px;
  height:calc(100dvh - 102px);
  min-height:520px;
  border-radius:24px;
  padding:10px 8px;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  z-index:20;
}
.rail-logo{
  width:44px;height:44px;margin:2px auto 12px;border-radius:14px;
  border:1px solid var(--line);background:#f2f3f5;color:#0a0b0d;
  font-weight:950;font-size:12px
}
.rail-stack,.rail-bottom{display:grid;gap:6px}
.rail-bottom{margin-top:auto}
.rail-btn{
  border:0;background:transparent;border-radius:15px;
  min-height:58px;display:grid;place-items:center;align-content:center;gap:3px;
  color:#7f858f
}
.rail-btn span{font-size:17px}
.rail-btn small{font-size:7px;font-weight:900;letter-spacing:.10em}
.rail-btn.active{background:rgba(255,255,255,.09);color:#fff}
.utility-pane{
  position:sticky;
  top:82px;
  height:calc(100dvh - 102px);
  min-height:520px;
  border-radius:24px;
  padding:14px;
  overflow:hidden;
  z-index:19;
  transition:.25s ease
}
.utility-top{
  display:flex;justify-content:space-between;align-items:center;
  padding-bottom:12px;border-bottom:1px solid var(--line)
}
.utility-top small,.utility-top strong{display:block}
.utility-top small{font-size:7px;letter-spacing:.16em;color:#6e747e;font-weight:900}
.utility-top strong{font-size:17px;margin-top:3px;letter-spacing:-.02em}
.utility-top button{
  width:30px;height:30px;border-radius:10px;border:1px solid var(--line);
  background:rgba(255,255,255,.04);color:#7f858e
}
.utility-tabs{
  display:grid;grid-template-columns:repeat(3,1fr);gap:5px;margin:12px 0
}
.utility-tab{
  border:1px solid var(--line);background:rgba(255,255,255,.03);
  border-radius:10px;padding:8px 5px;font-size:7px;font-weight:900;letter-spacing:.08em;color:#707680
}
.utility-tab.active{background:#f3f4f6;color:#0b0c0e}
.utility-view{display:none;height:calc(100% - 96px)}
.utility-view.active{display:block}
#utilityScratch,.utility-capture textarea{
  width:100%;height:calc(100% - 28px);border:0;outline:0;resize:none;
  background:transparent;color:#e7e9ec;font-size:13px;line-height:1.6;padding:8px 2px
}
.utility-foot{
  display:flex;justify-content:space-between;font-size:7px;font-weight:900;letter-spacing:.12em;color:#626873
}
.utility-focus{
  height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center
}
.utility-focus>span{font-size:8px;letter-spacing:.16em;color:#727883;font-weight:900}
.utility-focus strong{font-size:54px;letter-spacing:-.06em;margin:8px 0 18px}
.utility-focus-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;width:100%}
.utility-focus-actions button,.utility-capture>button{
  border:1px solid var(--line);background:rgba(255,255,255,.05);
  border-radius:12px;padding:10px;font-size:8px;font-weight:900;letter-spacing:.10em
}
.utility-capture{height:100%;display:flex;flex-direction:column}
.utility-capture textarea{height:96px;min-height:96px;border-bottom:1px solid var(--line)}
.utility-capture>button{margin:10px 0}
.utility-capture-list{display:grid;gap:7px;overflow:auto;padding-bottom:6px}
.utility-capture-item{
  border:1px solid var(--line);background:rgba(255,255,255,.03);border-radius:12px;
  padding:10px;font-size:10px;line-height:1.4;color:#cfd3d8
}
.utility-fab{
  display:none;position:fixed;right:14px;bottom:94px;z-index:60;
  border-radius:999px;padding:10px 12px;font-size:8px;font-weight:900;letter-spacing:.12em
}
.hero-badge small{
  display:block;font-size:7px;letter-spacing:.14em;color:#5f6570;margin-top:4px;font-weight:900
}
body.utility-hidden .fold-workspace{
  grid-template-columns:72px minmax(0,1fr)
}
body.utility-hidden .utility-pane{display:none}
body.utility-hidden .utility-fab{display:block}

/* In workspace mode, the bottom dock becomes a mobile/cover fallback */
@media(min-width:900px){
  .dock{display:none}
  .os-shell{width:min(1480px,100%);padding-bottom:28px}
  .hero{padding-top:36px}
}
@media(max-width:899px){
  .fold-workspace{display:block;margin-top:0}
  .fold-rail{display:none}
  .utility-pane{
    position:fixed;left:50%;bottom:92px;top:auto;transform:translateX(-50%);
    width:min(520px,calc(100% - 24px));height:min(62dvh,560px);min-height:0;
    z-index:65;border-radius:26px;display:none
  }
  body.utility-mobile-open .utility-pane{display:block}
  .utility-fab{display:block}
  body.utility-hidden .utility-fab{display:block}
  .utility-view{height:calc(100% - 96px)}
}
@media(min-width:900px) and (max-width:1180px){
  .fold-workspace{grid-template-columns:68px minmax(0,1fr) 280px}
}


/* =========================================================
   P5.FOLD OS v0.5 — DESIGN REDESIGN / P5 SIGNATURE
   Functionality unchanged. Visual system only.
   ========================================================= */
:root{
  --bg:#090909;
  --bg-2:#11110f;
  --paper:#ebe8df;
  --paper-2:#d8d4ca;
  --text:#f4f1e9;
  --muted:#88877f;
  --line:rgba(244,241,233,.12);
  --line-strong:rgba(244,241,233,.24);
  --accent:#ff3b30;
  --accent-soft:rgba(255,59,48,.14);
  --radius:20px;
  --shadow:0 30px 90px rgba(0,0,0,.42);
}

html{background:#090909}
body{
  background:
    radial-gradient(circle at 74% -8%,rgba(255,59,48,.12),transparent 28rem),
    linear-gradient(135deg,#090909 0%,#0c0c0b 45%,#12120f 100%);
  color:var(--text);
  letter-spacing:-.005em;
}
body:before{
  content:"";
  position:fixed;inset:0;pointer-events:none;z-index:-2;
  background:
    linear-gradient(rgba(255,255,255,.018) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.018) 1px,transparent 1px);
  background-size:44px 44px;
  mask-image:linear-gradient(to bottom,rgba(0,0,0,.75),transparent 85%);
}
.noise{opacity:.07}
.ambient{opacity:.09;filter:blur(120px)}
.a1{background:#ff3b30}
.a2{background:#d8d4ca;opacity:.035}

.glass{
  background:rgba(20,20,18,.68);
  border:1px solid var(--line);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035),var(--shadow);
  backdrop-filter:blur(30px) saturate(1.05);
  -webkit-backdrop-filter:blur(30px) saturate(1.05);
}

.os-shell{padding-top:12px}
.topbar{
  height:64px;
  border-radius:18px;
  padding:0 12px 0 10px;
  background:rgba(10,10,9,.80);
  border-color:rgba(244,241,233,.15);
}
.brand{gap:12px}
.mark{
  width:42px;height:42px;border-radius:11px;
  background:var(--accent);color:#fff;
  box-shadow:0 10px 28px rgba(255,59,48,.22);
  font-size:12px;
}
.brand-copy{
  display:flex;align-items:baseline;gap:7px;
  font-size:11px;font-weight:850;letter-spacing:.13em;
}
.brand-copy small{
  margin:0;color:#77766f;font-size:8px;letter-spacing:.06em
}
.brand-copy i{
  font-style:normal;font-size:7px;color:#5f5e58;letter-spacing:.14em;font-weight:800
}
.system-action,.status-pill{
  background:transparent;
  border-color:rgba(244,241,233,.13);
}
.system-action{font-size:16px}
.status-pill{font-size:10px;letter-spacing:.08em}
.dot{background:var(--accent);box-shadow:0 0 12px rgba(255,59,48,.85)}

.hero{
  position:relative;
  padding:58px 4px 34px;
  align-items:flex-start;
}
.hero:after{
  content:"";
  position:absolute;left:4px;right:4px;bottom:12px;
  height:1px;background:linear-gradient(90deg,var(--accent) 0 64px,var(--line) 64px 100%);
}
.hero-meta{
  display:flex;gap:16px;align-items:center;
}
.hero-meta>span{
  font-size:7px;font-weight:900;letter-spacing:.18em;color:#595852
}
.eyebrow{
  color:#aaa79f;
  font-size:8px;
  letter-spacing:.22em;
}
.hero h1,.view-head h2{
  max-width:960px;
  font-size:clamp(48px,8.2vw,116px);
  line-height:.82;
  letter-spacing:-.075em;
  font-weight:850;
  margin:18px 0 20px;
}
.sub,.view-head p{
  color:#77766f;
  font-size:12px;
  letter-spacing:.01em;
}
.hero-badge{
  margin-top:17px;
  min-width:136px;
  padding:12px 0 0 18px;
  border-left:1px solid var(--accent);
}
.hero-badge span{font-size:7px;color:#65645e;letter-spacing:.18em}
.hero-badge b{font-size:21px;letter-spacing:-.03em;margin-top:5px}
.hero-badge small{color:#4d4c47}

.panel{
  border-radius:18px;
  padding:18px;
  border-color:rgba(244,241,233,.11);
}
.panel-head{
  color:#85837b;
  font-size:8px;
  letter-spacing:.19em;
}
.tiny{
  width:29px;height:29px;border-radius:50%;
  background:transparent;border-color:rgba(244,241,233,.14);
}
.focus-panel{
  min-height:250px;
  background:
    linear-gradient(145deg,rgba(255,59,48,.08),transparent 42%),
    rgba(20,20,18,.70);
}
.focus-card h2{
  font-size:clamp(36px,4vw,58px);
  line-height:.9;letter-spacing:-.065em;
}
.focus-card p{max-width:620px;color:#7d7b74}
.tag{
  background:transparent;
  border:1px solid rgba(255,59,48,.35);
  color:#ff665d;
  border-radius:999px;
  padding:6px 9px;
  font-size:7px;
}
.progress{
  background:rgba(244,241,233,.08);
  height:2px;
}
.progress i{background:var(--accent)}

.notes-panel{
  background:rgba(235,232,223,.055);
}
.notes-panel textarea{
  font-size:14px;color:#ddd9cf;
}
.notes-panel textarea::placeholder{color:#55544f}

.section-title{
  margin:30px 3px 11px;
  font-size:8px;
  letter-spacing:.20em;
  color:#9a978f;
}
.section-title:after{
  content:"";
  flex:1;height:1px;background:var(--line);margin-left:14px;align-self:center
}
.section-title .muted{margin-left:12px;color:#4e4d48}
.ghost-link{position:relative;z-index:2;background:#090909;padding-left:10px}

.app-grid{gap:8px}
.app-card{
  min-height:124px;
  border-radius:16px;
  padding:16px;
  background:#11110f;
  border-color:rgba(244,241,233,.10);
  grid-template-columns:auto 1fr auto;
  transition:transform .2s ease,border-color .2s ease,background .2s ease;
}
.app-card:before{
  width:150px;height:150px;right:-65px;bottom:-88px;
  opacity:.09;filter:blur(30px)
}
.app-card:hover{
  transform:translateY(-3px);
  background:#151512;
  border-color:rgba(244,241,233,.22);
}
.app-card:nth-child(1){grid-column:span 2}
.app-card:nth-child(1) .app-icon{
  background:var(--accent);color:#fff;border-color:transparent
}
.app-icon{
  width:42px;height:42px;border-radius:11px;
  background:transparent;
  border:1px solid rgba(244,241,233,.16);
  font-size:10px;
}
.app-card b{
  font-size:11px;letter-spacing:.13em;
}
.app-card small{
  color:#64635e;font-size:9px;
}
.app-card em{color:#55544f}
.red,.cyan,.violet,.green,.amber,.silver{--glow:var(--accent)}

.idea-chip{
  border-radius:12px;
  background:#11110f;
  border-color:rgba(244,241,233,.10);
  color:#c7c3b8;
}

/* Editorial headers for secondary views */
.view-head{
  position:relative;
  padding:54px 4px 30px;
  border-bottom:1px solid var(--line);
  margin-bottom:12px;
}
.view-head:before{
  content:"P5 / WORKSPACE";
  position:absolute;right:4px;top:62px;
  color:#4d4c47;font-size:7px;font-weight:900;letter-spacing:.18em
}
.view-head h2{font-size:clamp(50px,7vw,96px);margin-top:14px}
.back-btn{
  border-radius:999px;background:transparent;
  border-color:rgba(244,241,233,.16);color:#aaa79f
}

/* BUILD */
.project-item,.check-item,.link-item{
  border-radius:12px;
  background:#11110f;
  border-color:rgba(244,241,233,.09);
}
.project-item.active{
  background:var(--paper);
  color:#11110f;
  border-color:var(--paper);
}
.project-item.active small{color:#69675f}
.console-label,.studio-kicker{color:#68665f}
.console-block h3{font-size:34px;letter-spacing:-.055em}
.console-actions button,.studio-footer button{
  border-radius:10px;background:transparent;border-color:rgba(244,241,233,.14)
}

/* STUDIO */
.studio-shell{gap:10px}
.studio-sidebar{
  border-radius:18px;
  background:#0f0f0d;
}
.studio-project-item{
  border-radius:12px;
  background:transparent;
  border-color:rgba(244,241,233,.08);
}
.studio-project-item.active{
  background:var(--paper);color:#11110f;border-color:var(--paper)
}
.studio-project-item.active small{color:#6f6c64}
.studio-project-head{
  background:
    linear-gradient(120deg,rgba(255,59,48,.07),transparent 45%),
    #10100e;
}
.studio-project-name{
  font-size:clamp(34px,4vw,58px);
  letter-spacing:-.065em;
}
.studio-select{
  background:transparent;border-color:rgba(244,241,233,.14);
  border-radius:999px;color:#c5c1b7;
}
.status-chip{
  background:transparent;
  border-color:rgba(244,241,233,.10);
  color:#6f6d67;
}
.status-chip.active{
  background:var(--accent);color:#fff;border-color:var(--accent)
}
.studio-module-grid{gap:10px}
.studio-module{
  border-radius:16px;
  background:#10100e;
}
.studio-idea-module{
  background:var(--paper);
  color:#11110f;
}
.studio-idea-module .panel-head{color:#737068}
.studio-idea-module textarea{
  color:#161613;
  font-size:16px;
}
.studio-idea-module textarea::placeholder{color:#9b978c}
.check-toggle{border-radius:50%}

/* RAIL — feels like system hardware, not a web sidebar */
.fold-rail{
  border-radius:18px;
  background:#0d0d0c;
  border-color:rgba(244,241,233,.11);
  padding:9px 7px;
}
.rail-logo{
  width:46px;height:46px;border-radius:11px;
  background:var(--accent);color:#fff;border:0;
  box-shadow:0 14px 30px rgba(255,59,48,.17)
}
.rail-btn{
  border-radius:11px;color:#55544f
}
.rail-btn.active{
  background:var(--paper);
  color:#0e0e0c;
}
.rail-btn small{font-size:6px;letter-spacing:.13em}

/* UTILITY — signature contrast panel on unfolded Fold */
.utility-pane{
  border-radius:18px;
  background:var(--paper);
  color:#151512;
  border-color:rgba(255,255,255,.2);
  box-shadow:0 35px 100px rgba(0,0,0,.42);
}
.utility-top{border-color:rgba(15,15,13,.12)}
.utility-top small{color:#8b877e}
.utility-top strong{color:#151512}
.utility-top button{
  border-color:rgba(15,15,13,.15);
  background:transparent;color:#77736b
}
.utility-tabs{gap:4px}
.utility-tab{
  border-color:rgba(15,15,13,.10);
  background:transparent;color:#8c887f;
  border-radius:999px
}
.utility-tab.active{
  background:#151512;color:var(--paper);border-color:#151512
}
#utilityScratch,.utility-capture textarea{
  color:#171714;
}
#utilityScratch::placeholder,.utility-capture textarea::placeholder{color:#9a968d}
.utility-foot{color:#8c887f}
.utility-focus>span{color:#8c887f}
.utility-focus strong{color:#151512;font-size:62px}
.utility-focus-actions button,.utility-capture>button{
  border-color:rgba(15,15,13,.13);
  background:transparent;color:#151512;
  border-radius:999px
}
.utility-focus-actions button:first-child,.utility-capture>button{
  background:var(--accent);color:#fff;border-color:var(--accent)
}
.utility-capture textarea{border-color:rgba(15,15,13,.12)}
.utility-capture-item{
  background:rgba(15,15,13,.045);
  border-color:rgba(15,15,13,.08);
  color:#37362f;
  border-radius:10px
}
.utility-fab{
  background:var(--paper);color:#11110f;
  border-color:rgba(255,255,255,.3);
  box-shadow:0 18px 50px rgba(0,0,0,.3)
}

/* Floating Focus Timer */
.focus-timer-float{
  background:var(--paper);
  color:#141411;
  border-color:rgba(255,255,255,.25);
  border-radius:16px;
}
.focus-timer-float small{color:#87837a}
.focus-timer-float button{
  border-color:rgba(15,15,13,.14);
  background:#151512;color:var(--paper);
  border-radius:999px
}

/* Dialogs */
.sheet::backdrop{background:rgba(0,0,0,.78)}
.sheet-inner{
  background:#11110f;
  border-color:rgba(244,241,233,.14);
  border-radius:24px 24px 0 0
}
.search-wrap{
  background:#0b0b0a;border-color:rgba(244,241,233,.13);
  border-radius:14px
}
.command-item{border-radius:11px}
.command-item:hover,.command-item:focus{
  background:var(--paper);
  color:#11110f;
}
.toggle{
  border-radius:14px;background:transparent
}
.toggle.on{background:var(--paper);color:#11110f}
.system-card{border-radius:12px}

/* Mobile dock: strong editorial strip */
.dock{
  border-radius:18px;
  background:rgba(13,13,12,.90);
  border-color:rgba(244,241,233,.13);
}
.dock button{border-radius:11px}
.dock button.active{
  background:var(--paper);
  color:#11110f
}
.dock button.active small{color:#55534e}

/* More deliberate selected/focus states */
button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{
  outline:1px solid var(--accent);
  outline-offset:2px;
}

/* Wide Fold / desktop proportions */
@media(min-width:900px){
  .fold-workspace{
    grid-template-columns:70px minmax(0,1fr) 326px;
    gap:10px;
  }
  .os-shell{width:min(1510px,100%)}
  .workspace-grid{grid-template-columns:1.45fr .55fr;gap:10px}
}
@media(min-width:1200px){
  .app-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .app-card:nth-child(1){grid-column:span 2}
  .app-card:nth-child(2){grid-column:span 1}
}
@media(max-width:899px){
  .hero h1{font-size:clamp(48px,13vw,78px)}
  .utility-pane{
    background:var(--paper);
    border-radius:20px
  }
  .app-card:nth-child(1){grid-column:span 2}
}
@media(max-width:520px){
  .topbar{border-radius:15px}
  .brand-copy i{display:none}
  .hero{padding-top:38px}
  .hero h1{font-size:clamp(46px,14vw,66px)}
  .app-grid{grid-template-columns:1fr}
  .app-card:nth-child(1){grid-column:auto}
  .app-card{min-height:104px}
  .workspace-grid{gap:8px}
  .panel{border-radius:15px}
}
