:root{color-scheme:light;--bg:#f6f6f3;--surface:#fff;--ink:#20221f;--muted:#666a63;--line:#dedfd8;--soft:#efefea;--accent:#344d42;--accent-soft:#e9efe9;--danger:#8c453b;--radius:14px;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC",sans-serif;font-size:14px}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink)}button,input,select{font:inherit;color:inherit}button,a,select{touch-action:manipulation}button{cursor:pointer;min-height:38px;border:1px solid var(--line);border-radius:8px;background:var(--surface);padding:8px 12px;transition:background .15s,border-color .15s}button:hover{background:var(--soft);border-color:#a3aaa1}button:active{background:#e2e4dd}button:disabled{cursor:default;opacity:.45}input,select{background:var(--surface);border:1px solid #bdc1b8;border-radius:7px;padding:9px;min-height:38px}a{color:inherit;text-decoration:none}a:hover{text-decoration:underline}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,[tabindex]:focus-visible{outline:3px solid #668270;outline-offset:3px}[hidden]{display:none!important}.studio-shell{display:grid;grid-template-columns:232px minmax(0,1fr);min-height:100vh}.studio-sidebar{background:var(--surface);border-right:1px solid var(--line);padding:24px 16px;position:sticky;top:0;height:100dvh;display:flex;flex-direction:column;overflow-y:auto;scrollbar-width:thin}.studio-brand{display:flex;align-items:center;gap:10px;font-size:19px;font-weight:650;letter-spacing:-.6px;margin:0 8px 32px}.studio-brand small{display:block;font-size:8px;letter-spacing:1.6px;color:var(--muted);font-weight:500;margin-top:5px}.brand-mark{height:35px;width:35px;display:grid;place-items:center;background:var(--ink);border-radius:10px;color:white;font:italic 29px Georgia,serif}.project-label,.section-label{font-size:11px;color:var(--muted);letter-spacing:.04em}.project-label{padding:0 10px}.project-name{margin:8px 0 24px;padding:10px;border:1px solid var(--line);border-radius:9px;background:var(--surface);font-size:13px;font-weight:600;display:flex;justify-content:space-between;gap:8px}.project-name span{font-size:10px;color:var(--muted);font-weight:400;border:1px solid var(--line);border-radius:4px;padding:1px 4px}.search-label{display:block;margin:0 0 24px}.search-label>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}#studio-search{width:100%;font-size:12px;background:transparent;min-height:38px;border-color:var(--line)}.section-label{display:flex;justify-content:space-between;padding:0 10px;margin-bottom:10px}.section-label span{font-variant-numeric:tabular-nums}.page-list-heading{margin-top:28px}#group-nav,#page-nav{display:grid;gap:3px}#group-nav button,#page-nav button{background:transparent;text-align:left;border-color:transparent;min-height:38px;font-size:12px;display:flex;align-items:center;justify-content:space-between;gap:8px}#group-nav button small{font-size:10px;color:var(--muted)}#group-nav button[aria-current=true]{background:var(--accent-soft);color:var(--accent);font-weight:600}#page-nav button{font-size:11px;color:var(--muted);padding:7px 10px;line-height:1.5}#page-nav button[aria-current=true]{background:#eaece5;color:var(--ink)}#page-nav button:before{content:'';border:1px solid #9bA094;border-radius:3px;width:9px;height:11px;flex-shrink:0}#page-nav button span{flex:1}.sidebar-footer{display:flex;align-items:center;gap:6px;font-size:10px;color:var(--muted);margin-top:auto;padding:30px 8px 0}.status-dot{width:5px;height:5px;border-radius:50%;background:var(--accent)}#baseline-short{margin-left:auto}.studio-content{min-width:0}.topbar-actions{display:flex;gap:8px}.topbar-actions button{font-size:11px;background:transparent}#check-count{font-variant-numeric:tabular-nums}#export-review{background:var(--ink);color:white;border-color:var(--ink)}#studio-main{padding:24px 28px;margin:0;min-width:0}.workspace-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px}.eyebrow{font-size:9px;letter-spacing:1.8px;font-weight:600;color:var(--muted);margin:0 0 10px}.workspace-heading h1{font-size:26px;letter-spacing:-.7px;font-weight:600;margin:0;line-height:1.35;overflow-wrap:anywhere}.workspace-heading #workspace-description{color:var(--muted);font-size:12px;line-height:1.6;margin:10px 0 0}.view-switch{display:flex;background:#eaece5;padding:4px;border-radius:10px;flex-shrink:0}.view-switch button{border-color:transparent;background:transparent;font-size:13px;min-height:36px;padding:8px 16px}.view-switch button[aria-pressed=true]{background:var(--surface);box-shadow:0 1px 3px #00000010;border-color:#d8dbd1}.workspace-toolbar{display:flex;align-items:center;gap:12px;font-size:12px;margin:0 0 16px;padding:12px 16px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}.workspace-toolbar>div{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.workspace-toolbar label{display:flex;align-items:center;gap:8px;color:var(--muted)}.workspace-toolbar select,.workspace-toolbar button{font-size:12px;min-height:38px}.workspace-toolbar select{max-width:190px}#workspace-counter{color:var(--muted);white-space:nowrap;font-size:10px}#studio-message{font-size:12px;line-height:1.6;color:var(--accent);margin:0}#studio-message:not(:empty){padding:10px 0 16px}.workspace-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:20px;align-items:start}
.workspace-view-actions{display:flex;align-items:center;gap:10px;flex-shrink:0}.workspace-meta{font-size:12px;color:var(--muted);margin:6px 0 0;line-height:1.5}.workspace-toolbar:not(.is-experience){display:none}.details-toggle{display:grid;place-items:center;width:40px;min-height:40px;padding:8px;background:var(--surface)}.details-toggle[aria-expanded="true"]{background:var(--accent-soft);border-color:#acb9ad;color:var(--accent)}
.workspace-grid.has-inspector{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:20px;align-items:start}#diagram-panel{border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;background:#f0f1eb;min-width:0}.diagram-legend{display:flex;flex-wrap:wrap;gap:10px 16px;font-size:10px;color:var(--muted);padding:15px 18px;border-bottom:1px solid var(--line);background:#f8f8f5}.diagram-legend span{display:flex;align-items:center;gap:6px}.diagram-legend span:last-child{margin-left:auto;font-size:9px}.diagram-legend i{width:15px;border-top:1px solid var(--accent)}.diagram-legend .back{border-top-style:dashed}.diagram-legend .exception{border-top:2px dotted var(--danger)}#diagram-scroll{height:620px;overflow:auto;background-image:radial-gradient(#bdc3b357 .7px,transparent .7px);background-size:16px 16px;scroll-padding:32px}#diagram-canvas{position:relative;padding:48px 48px 56px;min-width:740px;min-height:100%}#diagram-cards{position:relative;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:76px 42px;z-index:1}#diagram-edges{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none;z-index:2}#diagram-edges path{fill:none;stroke:var(--accent);stroke-width:1.4;opacity:.8}#diagram-edges path.back{stroke-dasharray:5 4;opacity:.6}#diagram-edges path.exception{stroke:var(--danger);stroke-dasharray:2 4}#diagram-edges text{font-family:inherit;font-size:10px;fill:var(--accent);stroke:#f0f1eb;stroke-width:5px;paint-order:stroke;stroke-linejoin:round}.flow-card{height:auto;align-self:start;min-width:0;position:relative;border:1px solid #cdd1c6;border-radius:11px;background:var(--surface);box-shadow:0 3px 7px #28331e05;transition:border-color .15s,box-shadow .15s}.flow-card.selected{border-color:var(--accent);box-shadow:0 0 0 2px #344d421a,0 4px 12px #28331e0a}.card-select{display:block;border:0;border-radius:10px 10px 0 0;padding:0;width:100%;height:auto;text-align:left;overflow:hidden;background:var(--surface)}.card-select:hover{background:#fdfefb}.card-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:11px 12px;border-bottom:1px solid #eeefe9}.card-meta small{font-size:9px;letter-spacing:.02em;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.card-meta b{font-size:9px;color:var(--muted);font-weight:400;font-variant-numeric:tabular-nums}.card-preview{min-width:0;position:relative}.card-heading{min-width:0}.card-heading h3{font-size:13px;margin:4px 0 0;line-height:1.5;font-weight:600;overflow-wrap:anywhere}.mini-heading{font-size:15px;line-height:1.5;margin:10px 0;font-weight:600}.mini-text{font-size:9px;line-height:1.7;color:#74776e;margin:9px 0;white-space:pre-line}.mini-button,.mini-input{border:1px solid #d8dbd2;border-radius:4px;padding:6px 8px;font-size:8px;line-height:1.5;margin:6px 0;color:#5d655b}.mini-input{background:#f8f9f5;color:#808477}.mini-image{height:64px;border:1px dashed #c6cbbf;background:#f1f3ed;display:grid;place-items:center;font-size:9px;color:#747b6d;border-radius:4px;text-align:center;white-space:pre-line}.card-footer{height:41px;padding:4px 9px 4px 12px;border-top:1px solid #eeefe9;display:flex;align-items:center;justify-content:space-between;gap:6px}.card-footer span{font-size:9px;color:var(--muted)}.card-footer button{min-height:30px;border:0;background:transparent;font-size:10px;padding:4px 6px;color:var(--accent)}.diagram-footer{display:flex;justify-content:space-between;gap:10px;padding:12px 16px;border-top:1px solid var(--line);font-size:9px;color:var(--muted);background:#f8f8f5}.inspector{border:1px solid var(--line);border-radius:12px;background:var(--surface);overflow:auto;position:sticky;top:24px;max-height:calc(100dvh - 48px);scrollbar-width:thin}.inspector-section{padding:18px;border-bottom:1px solid var(--line)}.inspector-section:last-child{border:0}.inspector-eyebrow{font-size:11px;color:var(--muted);margin:0 0 8px}.inspector h2{font-size:17px;font-weight:550;line-height:1.5;margin:0 0 6px}.page-id{font:10px ui-monospace,SFMono-Regular,monospace;color:var(--muted);overflow-wrap:anywhere}.inspector h3{font-size:12px;font-weight:600;margin:0 0 12px}.inspector p,.inspector li{font-size:12px;line-height:1.7;color:var(--muted)}.inspector ul{margin:0;padding-left:15px}.inspector details summary{font-size:12px;cursor:pointer;line-height:1.7}.inspector details li{margin-bottom:10px}.inspector .primary{display:block;width:100%;margin-top:16px;background:var(--ink);color:white;border-color:var(--ink);font-size:11px}.relation{display:block;text-align:left;width:100%;background:#fafbf8;border-color:#eaede5;font-size:11px;margin:6px 0;line-height:1.5;padding:9px}.relation small{display:block;font-size:9px;margin-top:4px;color:var(--muted)}.relation b{display:block;font-size:10px;font-weight:500;color:var(--accent)}.relation.exception b{color:var(--danger)}.relation.back b{color:var(--muted)}.condition-row{display:flex;justify-content:space-between;gap:10px;font-size:10px;margin:8px 0;line-height:1.5;color:var(--muted)}.condition-row strong{font-weight:500;white-space:nowrap;color:var(--accent)}.trace-list{max-height:240px;overflow-y:auto;padding-left:16px!important}.trace-list li{font-size:10px;margin-bottom:9px;overflow-wrap:anywhere}.inspector a{font-size:10px}.inspector section>button+button{margin-top:6px}#experience-panel{border:1px solid var(--line);border-radius:var(--radius);background:#eceee7;min-width:0;padding-bottom:28px}.experience-caption{display:flex;justify-content:space-between;gap:10px;font-size:10px;color:var(--muted);padding:16px 20px;border-bottom:1px solid #dce0d4}.experience-caption span:first-child{color:var(--ink)}#player-slot #gi-lowfi{padding:28px 12px!important}#player-slot #gi-lowfi .phone{width:min(100%,390px)!important;min-height:680px;border-radius:24px!important;border-color:#bfc5b7!important;box-shadow:0 12px 32px #293b1f0b;--paper:#fff;--ink:#242a22;--soft:#f1f3ed;--line:#d3d8cb;--muted-ink:#697160;padding:24px!important}#player-slot #gi-lowfi .status{padding-bottom:30px!important}#player-slot #gi-lowfi .profile-nav{gap:12px!important}#player-slot #gi-lowfi .profile-nav h2{font-size:22px!important;line-height:1.45}#player-slot #gi-lowfi .icon-button{border-radius:9px!important;font-size:10px!important}#player-slot #gi-lowfi .flow-content p{font-size:14px;line-height:1.8!important}#player-slot #gi-lowfi .flow-button{border-radius:9px;margin:10px 0!important;font-size:13px!important;min-height:46px!important;padding:12px 14px!important}#player-slot #gi-lowfi .flow-button:hover{background:#f5f7f1}#player-slot #gi-lowfi .flow-field{font-size:12px!important;margin:20px 0!important}#player-slot #gi-lowfi .flow-field input,#player-slot #gi-lowfi .flow-field select{font-size:14px!important;border-radius:7px;border:1px solid #b8c1ad;background:#fff}#player-slot #gi-lowfi .flow-cover{border-radius:10px;font-size:14px!important;min-height:210px!important}#player-slot #gi-lowfi .phone.onboarding .flow-content h3{font-size:30px!important;letter-spacing:-.7px}#player-slot #gi-lowfi .phone.onboarding .flow-content{min-height:440px!important}#player-slot #gi-lowfi .profile-nav .icon-button{flex-shrink:0}#player-slot #gi-lowfi .home{margin-top:32px!important}#player-slot #gi-lowfi .review-header{max-width:390px;padding:16px 4px 0;font-size:11px;line-height:1.7}#player-slot #gi-lowfi .review-header summary{cursor:pointer}#player-slot #gi-lowfi #review-simulations{display:grid;gap:8px}#player-slot #gi-lowfi #review-simulations p{font-size:11px}#player-slot #gi-lowfi #review-simulations button{font-size:11px;text-align:left;min-height:42px}.workspace-footer{display:flex;flex-wrap:wrap;gap:12px;font-size:10px;color:var(--muted);padding:24px 0 0}.workspace-footer span{margin-right:auto}.empty-search{padding:24px;color:var(--muted);font-size:12px;grid-column:1/-1}.mobile-summary{display:none}@media(min-width:1600px){.workspace-grid.has-inspector{grid-template-columns:minmax(0,1fr) 290px}#diagram-scroll{height:700px}#diagram-canvas{min-width:800px}}@media(max-width:1120px){.studio-shell{grid-template-columns:190px minmax(0,1fr)}#studio-main{padding:24px 20px}.workspace-grid.has-inspector{grid-template-columns:minmax(0,1fr) 230px;gap:14px}.workspace-heading h1{font-size:25px}.view-switch button{padding:7px 10px}.diagram-legend span:last-child{display:none}}@media(max-width:900px){.workspace-grid.has-inspector{grid-template-columns:minmax(0,1fr)}.inspector{display:block}.inspector-section{padding:18px}.inspector-section:first-child .primary{max-width:250px}.studio-sidebar{width:180px}.studio-shell{grid-template-columns:180px minmax(0,1fr)}.workspace-heading{align-items:flex-start;flex-direction:column;gap:16px}.workspace-toolbar{flex-wrap:wrap}.topbar-actions button{font-size:10px}.diagram-footer span:last-child{display:none}#diagram-scroll{height:590px}}@media(max-width:600px){.studio-shell{display:block}.studio-sidebar{width:auto;height:auto;position:relative;padding:18px 16px;border-right:0;border-bottom:1px solid var(--line);overflow:visible}.studio-brand{margin:0 0 16px;font-size:18px}.studio-brand small{display:none}.brand-mark{width:28px;height:28px;font-size:24px}.project-label,.project-name,.page-list-heading,#page-nav,.sidebar-footer,.search-label{display:none}.section-label{display:none}#group-nav{display:flex;overflow-x:auto;gap:4px;padding:0 0 4px}#group-nav button{white-space:nowrap;min-height:44px;font-size:11px}#group-nav button small{display:none}.topbar-actions button{min-height:36px;padding:7px 9px}#studio-main{padding:24px 14px}.workspace-heading h1{font-size:26px}.workspace-heading #workspace-description{font-size:11px}.workspace-heading{margin-bottom:20px}.view-switch{width:100%}.view-switch button{flex:1;min-height:40px}.workspace-toolbar>div{flex-wrap:wrap;gap:8px}.workspace-toolbar select{max-width:180px}.workspace-toolbar button,.workspace-toolbar select{min-height:40px}#workspace-counter{display:none}#diagram-scroll{height:530px}#diagram-canvas{min-width:740px}.diagram-legend{padding:12px}.diagram-footer{padding:12px;font-size:9px}.workspace-footer{line-height:1.8}.workspace-footer span{flex-basis:100%}#experience-panel{padding-bottom:12px}#player-slot #gi-lowfi{padding:16px 8px!important}#player-slot #gi-lowfi .phone{padding:20px!important}.experience-caption{padding:14px 12px;font-size:9px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important;animation:none!important}}@media print{.studio-sidebar,.workspace-toolbar,.view-switch,.workspace-footer{display:none}.studio-shell{display:block}.workspace-grid.has-inspector{display:block}#diagram-scroll{height:auto;overflow:visible}#diagram-canvas{min-width:0}.inspector{margin-top:20px}}
#project-select{margin:8px 0 0;font-size:12px;width:100%;background:#fff;border:1px solid var(--line)}.project-name{display:none}.search-label{margin-top:20px}@media(max-width:600px){#project-select{position:absolute;right:16px;top:16px;max-width:160px;margin:0;min-height:34px;font-size:10px}.studio-brand{max-width:170px}}
#player-slot #gi-lowfi .status{display:flex;justify-content:space-between;font-size:11px;color:var(--muted-ink)}#player-slot #gi-lowfi .profile-nav{display:flex;align-items:center;margin-bottom:24px}#player-slot #gi-lowfi .profile-nav h2{font-weight:550;margin:0}#player-slot #gi-lowfi .icon-button{min-width:44px;min-height:44px;padding:6px;background:var(--paper);border:1px solid var(--line)}#player-slot #gi-lowfi .flow-content h3{font-size:24px;font-weight:550;line-height:1.4}#player-slot #gi-lowfi .flow-content .flow-button{display:block;width:100%;text-align:left;background:var(--paper);border:1px solid var(--line);color:var(--ink)}#player-slot #gi-lowfi .flow-cover{display:grid;place-items:center;background:var(--soft);border:1px dashed var(--line);padding:20px}#player-slot #gi-lowfi .phone.onboarding .flow-content{min-height:440px;display:flex;flex-direction:column;justify-content:center}#player-slot #gi-lowfi .home{width:90px;height:4px;border-radius:4px;background:#343c30;margin:28px auto 0}#player-slot #gi-lowfi [hidden]{display:none!important}

@media(max-width:600px){.card-footer{height:49px}.card-footer button{min-height:44px}.topbar-actions button{min-height:44px}#group-nav button{min-height:44px}}
#player-slot #gi-lowfi .phone{margin:auto;background:var(--paper);color:var(--ink);border:1px solid var(--line)}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.project-controls{display:flex;gap:6px;margin-top:8px}.project-controls button{font-size:10px;min-height:34px;background:transparent;flex:1}#new-project{background:var(--ink);color:#fff;border-color:var(--ink)}dialog{color:var(--ink);font-family:inherit;border:1px solid var(--line);border-radius:20px;box-shadow:0 24px 100px #18201733;padding:0;background:var(--surface)}dialog::backdrop{background:#20261f66;backdrop-filter:blur(3px)}.project-dialog{width:min(1024px,calc(100vw - 48px));max-height:90dvh}.project-dialog-header{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:24px 28px;border-bottom:1px solid var(--line)}.project-dialog h2,.project-editor h2{font-size:25px;font-weight:550;letter-spacing:-.7px;margin:0 0 10px}.project-dialog-header p:last-child,.project-editor>p,.project-form-intro{font-size:12px;color:var(--muted);line-height:1.7;margin:0}.project-dialog-header>button{font-size:11px}.project-manager-toolbar{display:flex;align-items:center;gap:12px;padding:20px 28px 0;flex-wrap:wrap}.project-manager-toolbar>label{margin-left:auto}.project-manager-toolbar input{font-size:12px;width:210px}.project-manager-toolbar .view-switch button{font-size:11px}.project-primary{background:var(--ink)!important;color:#fff!important;border-color:var(--ink)!important}.project-manager-toolbar>button{font-size:12px}.project-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;padding:0 28px 28px}.project-card{border:1px solid var(--line);border-radius:13px;padding:18px;min-width:0;display:flex;flex-direction:column;align-items:flex-start;background:#fdfefb}.project-card-heading{display:flex;align-items:center;justify-content:space-between;width:100%;gap:12px;margin-bottom:18px}.project-tile{width:38px;height:42px;background:#e9eee5;color:var(--accent);border:1px solid #d2dbc9;border-radius:8px;display:grid;place-items:center;font-size:18px;font-weight:500}.project-badge{font-size:9px;color:var(--muted);border:1px solid var(--line);padding:4px 6px;border-radius:5px}.project-card h3{font-size:15px;font-weight:550;line-height:1.5;margin:0 0 8px;overflow-wrap:anywhere}.project-card>p{font-size:11px;line-height:1.8;color:var(--muted);margin:0 0 20px;white-space:pre-line;overflow-wrap:anywhere}.project-date{font-size:10px;color:var(--muted);margin-top:auto;margin-bottom:14px}.project-card-actions{display:flex;flex-wrap:wrap;gap:5px}.project-card-actions button,.project-card-actions a{font-size:10px;min-height:32px;padding:7px 8px;border-radius:6px;display:inline-flex;align-items:center;border:1px solid var(--line)}.project-card-actions a{text-decoration:none}.project-list-count{font-size:12px;color:var(--muted);padding:0 28px;margin:18px 0 12px}.project-empty{grid-column:1/-1;text-align:center;padding:56px 24px;border:1px dashed var(--line);border-radius:14px}.project-empty strong{font-size:16px;font-weight:500}.project-empty p{font-size:12px;color:var(--muted);line-height:1.8}.project-dialog-footer{border-top:1px solid var(--line);font-size:12px;color:var(--muted);padding:16px 28px;line-height:1.6}.project-editor{width:min(560px,calc(100vw - 32px));max-height:90dvh;padding:28px}.project-editor label{display:block;font-size:13px;font-weight:500;margin-top:20px}.project-editor label>span{font-weight:400;color:var(--muted);font-size:10px;margin-left:6px}.project-editor input,.project-editor textarea,.project-editor select{width:100%;margin-top:8px;min-height:44px;font-size:14px;background:var(--surface);resize:vertical}.project-editor textarea{border:1px solid #bdc1b8;border-radius:7px;padding:12px;line-height:1.7;max-height:300px}.project-form-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:24px;flex-wrap:wrap}.project-form-actions button{min-height:44px;font-size:13px;padding:10px 16px}.project-message{font-size:12px;color:var(--accent);line-height:1.7;min-height:0;margin:0}.project-message:not(:empty){margin-top:12px}.project-dialog>.project-message{padding:0 28px}.project-message.error{color:#933f36}.project-service-note{font-size:12px;padding:14px 16px;margin:18px 32px 0;background:#f6f1e6;border:1px solid #ded3b8;border-radius:8px;color:#6d5632;line-height:1.8}.project-service-note a{text-decoration:underline;white-space:nowrap}.project-editor input[aria-invalid=true]{border-color:#a7473e}@media(max-width:800px){.project-list{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.project-controls{margin:12px 0 8px;justify-content:flex-end}.project-controls button{flex:none;min-height:40px;font-size:11px;padding:8px 14px}.project-controls button:first-child{margin-right:auto}.project-dialog{width:calc(100vw - 20px);max-height:92vh;border-radius:15px}.project-dialog-header{padding:22px 20px 18px}.project-dialog h2{font-size:23px}.project-manager-toolbar{padding:16px 20px 0;gap:10px}.project-manager-toolbar>label{order:3;width:100%;margin:0}.project-manager-toolbar input{width:100%;min-height:44px}.project-manager-toolbar>button{margin-left:auto;min-height:44px}.project-manager-toolbar .view-switch{width:auto;flex:1}.project-list{grid-template-columns:1fr;padding:0 20px 20px}.project-list-count{padding:0 20px}.project-card-actions button,.project-card-actions a{min-height:44px;font-size:11px}.project-card{padding:20px}.project-card>p{font-size:12px}.project-dialog-footer{padding:16px 20px}.project-editor{padding:24px}.project-dialog>.project-message{padding:0 20px}.project-service-note{margin:16px 20px 0}.project-form-actions button{min-height:44px}}
.agent-entry{display:grid;gap:10px;margin:10px 0 18px}.agent-entry button{background:var(--surface);color:var(--accent);border-color:#b8c6b9;font-size:12px;min-height:42px}.agent-entry a{font-size:11px;color:var(--muted);text-align:center}.agent-welcome{margin:20px 28px 0;padding:16px 18px;background:var(--surface);border:1px solid var(--line);border-radius:10px;display:flex;gap:14px;align-items:center;flex-wrap:wrap}.agent-welcome div{flex:1;min-width:180px}.agent-welcome strong{font-size:15px;font-weight:550}.agent-welcome p{font-size:12px;color:var(--muted);margin:7px 0 0;line-height:1.7}.agent-welcome button{background:var(--ink);color:white;font-size:12px;min-height:42px}.agent-welcome a{font-size:11px}.agent-page{max-width:1040px;margin:auto;padding:32px 24px 80px}.agent-page header{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-bottom:48px}.agent-page h1{font-size:36px;font-weight:500;letter-spacing:-1px}.agent-page h2{font-size:20px;font-weight:550}.agent-page p,.agent-page li{font-size:14px;line-height:1.9;color:var(--muted)}.agent-page section{padding:28px;margin:24px 0;background:white;border:1px solid var(--line);border-radius:14px}.agent-links,.agent-actions{display:flex;gap:12px;flex-wrap:wrap;align-items:center}.agent-links a{font-size:13px;text-decoration:underline}.agent-page label{display:block;font-size:13px;margin:18px 0 8px}.agent-page select,.agent-page textarea{width:100%;font-size:13px}.agent-page textarea{font-family:ui-monospace,monospace;border:1px solid #aeb6a9;border-radius:10px;padding:16px;line-height:1.6;resize:vertical;background:#fbfcf9}.agent-page button{min-height:44px;font-size:12px}.agent-actions{margin-top:16px}.agent-page pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;line-height:1.7}.agent-notice{padding:14px 18px;border-left:3px solid var(--accent);background:var(--accent-soft)}#agent-feedback{white-space:pre-wrap;color:var(--accent)}#agent-feedback.error{color:var(--danger)}@media(max-width:600px){.agent-welcome{margin:20px 20px 0;padding:16px}.agent-entry{margin:8px 0}.agent-entry a{text-align:left}.agent-page{padding:24px 16px}.agent-page h1{font-size:28px}.agent-page section{padding:20px}.agent-page header{margin-bottom:30px}.agent-page .agent-actions>*{flex:1}.agent-page textarea{padding:10px}}
#agent-overview{max-height:340px;overflow:auto;background:#f6f8f3;border:1px solid var(--line);padding:16px;border-radius:8px}#agent-page-context{max-height:360px;overflow:auto}#agent-page-workspace{margin:24px 0;padding-top:16px;border-top:1px solid var(--line)}#agent-full{margin-top:26px;border-top:1px solid var(--line);padding-top:20px}#agent-full>summary,#agent-related>summary{font-size:13px;cursor:pointer;line-height:1.8}#agent-related{margin-top:16px}#agent-page-json[readonly]{background:#f1f2ee;color:var(--muted)}

#agent-check{margin-top:24px;border-top:1px solid var(--line);padding-top:16px}#agent-check-result{max-height:420px;overflow:auto;background:#f6f8f3;border:1px solid var(--line);padding:16px;border-radius:8px}#agent-check>p{font-size:12px;line-height:1.7}

.agent-role-nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:28px 0}.agent-role-nav a{display:flex;flex-direction:column;gap:10px;padding:22px;border:1px solid var(--line);border-radius:10px;background:#f6f8f3;min-height:112px}.agent-role-nav a:hover{border-color:var(--accent)}.agent-role-nav strong{font-size:18px}.agent-role-nav span{font-size:13px;line-height:1.7}.agent-page section[id]{scroll-margin-top:24px}.agent-quality{margin:20px 0}.agent-quality summary{cursor:pointer;min-height:44px;line-height:1.8;font-size:14px;padding:10px 0}.agent-quality li{margin:12px 0;line-height:1.8;font-size:14px}@media(max-width:600px){.agent-role-nav{grid-template-columns:1fr;gap:12px}.agent-role-nav a{padding:18px;min-height:100px}}

/* The viewport owns navigation; cards and edges share one world transform. */
#diagram-panel{position:relative;display:flex;flex-direction:column}#diagram-scroll{position:relative;overflow:hidden;touch-action:none;overscroll-behavior:contain;cursor:grab;flex:1;min-height:240px;height:clamp(420px,calc(100dvh - 180px),1000px)}#diagram-canvas{position:absolute;top:0;left:0;width:900px;min-width:0;min-height:0;transform-origin:0 0;will-change:transform}#diagram-scroll.space-pan,#diagram-scroll.space-pan button{cursor:grab}#diagram-scroll.is-dragging,#diagram-scroll.is-dragging *{cursor:grabbing!important;user-select:none}#diagram-panel #diagram-scroll{flex:auto}#diagram-cards{grid-template-columns:repeat(3,minmax(0,1fr))}/* Canvas navigation is a single floating surface, independent of content controls. */
.canvas-stage{position:relative;min-height:0;display:flex;flex-direction:column;flex:1}
.canvas-toolbar{position:absolute;z-index:5;bottom:16px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:2px;width:max-content;max-width:calc(100% - 24px);padding:4px;background:rgba(255,255,252,.96);border:1px solid #d9ddd4;border-radius:12px;box-shadow:0 3px 14px #2028200d}
.canvas-toolbar button{display:grid;place-items:center;min-width:36px;width:36px;min-height:36px;height:36px;padding:0;border:0;border-radius:7px;background:transparent;color:#50594f;flex-shrink:0}
.canvas-toolbar button:hover{background:var(--accent-soft);color:var(--accent)}
.canvas-toolbar button:active{background:#dfe6dc}.canvas-toolbar button:focus-visible{outline-offset:0}
.canvas-toolbar #zoom-level{width:52px;font-size:11px;font-variant-numeric:tabular-nums;color:var(--ink)}
.canvas-divider{width:1px;height:18px;background:var(--line);margin:0 3px}
.icon-collapse{display:none}#canvas-fullscreen[aria-pressed=true] .icon-expand{display:none}#canvas-fullscreen[aria-pressed=true] .icon-collapse{display:block}
.canvas-fullscreen-open{overflow:hidden}#diagram-panel.is-fullscreen,#diagram-panel:fullscreen{position:fixed;inset:0;z-index:1000;width:100vw;height:100dvh;max-width:none;border:0;border-radius:0;margin:0;background:var(--bg)}#diagram-panel.is-fullscreen #diagram-scroll,#diagram-panel:fullscreen #diagram-scroll{flex:1;height:auto;min-height:0}@media(pointer:coarse){.canvas-toolbar button{min-width:44px;width:44px;min-height:44px;height:44px}}
@media(max-width:600px){.canvas-toolbar{bottom:12px;padding:3px;gap:0;border-radius:11px}.canvas-toolbar button{min-width:40px;width:40px;min-height:44px;height:44px}.canvas-toolbar #zoom-level{width:48px}.canvas-divider{margin:0 2px}}
@media print{#diagram-canvas{position:relative;transform:none!important;width:100%}.canvas-toolbar{display:none}#diagram-scroll{height:auto!important;overflow:visible;min-height:0}}

.diagram-legend{align-items:center;justify-content:space-between;gap:12px;padding:10px 14px;min-height:54px;background:#fafaf7}
.diagram-legend .canvas-edge-filter{display:flex;align-items:center;margin:0;font-size:11px;min-width:0}
.canvas-edge-filter select{min-height:32px;max-width:155px;padding:5px 26px 5px 8px;border:0;background-color:transparent;font-size:11px;color:var(--ink);cursor:pointer}
.edge-key{display:flex;gap:14px;align-items:center}.diagram-legend .edge-key span{display:flex;margin:0;font-size:10px;gap:5px}.diagram-legend i{width:13px}
@media(max-width:600px){.diagram-legend{padding:8px 10px;gap:6px}.canvas-edge-filter select{max-width:135px;min-height:38px;padding-left:2px}.edge-key{gap:8px}.diagram-legend .edge-key span{font-size:9px}}

/* Common form, list and card-choice patterns; project data supplies content only. */
#player-slot .flow-block{margin:12px 0}#player-slot .flow-block[hidden]{display:none!important}#player-slot .flow-inline{display:inline-block;vertical-align:top;width:calc(50% - 5px);margin:6px 2px}#player-slot .flow-inline .flow-button{margin:0!important;height:100%}#player-slot .flow-field{display:flex!important;flex-direction:column;gap:8px;margin:18px 0!important;font-size:14px!important}#player-slot .flow-field>span{font-weight:550}#player-slot .flow-field small{font-size:12px;color:var(--muted);font-weight:400;line-height:1.6}#player-slot .flow-field input,#player-slot .flow-field select,#player-slot .flow-field textarea{width:100%;min-width:0;min-height:44px;padding:11px;border:1px solid #b8c1ad;border-radius:7px;background:#fff;font:inherit;resize:vertical}#player-slot .flow-field input[aria-invalid=true]{border-color:var(--danger)}#player-slot .flow-choices{border:0;padding:0;margin:20px 0;display:grid;gap:10px;min-width:0}#player-slot .flow-choices legend{font-size:14px;font-weight:550;margin-bottom:12px}#player-slot .flow-choices legend>span>small{font-size:12px;color:var(--muted)}#player-slot .choice-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#player-slot .flow-choice{display:flex;align-items:flex-start;gap:9px;border:1px solid var(--line);border-radius:9px;padding:14px 10px;min-height:52px;cursor:pointer;min-width:0;background:var(--surface)}#player-slot .flow-choice:has(input:checked){background:var(--accent-soft);border-color:var(--accent)}#player-slot .flow-choice input{min-height:20px;min-width:18px;width:18px;height:20px;margin:0;accent-color:var(--accent);flex-shrink:0}#player-slot .flow-choice strong{display:block;font-size:13px;font-weight:550;overflow-wrap:anywhere}#player-slot .flow-choice small{display:block;font-size:11px;color:var(--muted);line-height:1.6;margin-top:6px}#player-slot .flow-toggle{display:flex;gap:12px;align-items:center;min-height:48px;font-size:14px}#player-slot .flow-toggle input{width:20px;min-height:20px;height:20px;accent-color:var(--accent)}#player-slot .flow-form-error{font-size:13px;color:var(--danger)}.mini-choice{display:grid;gap:4px}.mini-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.mini-choice .mini-input{margin:0}

/* Prototype structure: semantic regions, conventional layouts and scoped overlays. */
#player-slot #gi-lowfi.generic-prototype .phone{height:760px;min-height:0!important;display:flex;flex-direction:column;padding:16px 0 0!important;overflow:hidden;position:relative;isolation:isolate}
#player-slot #gi-lowfi.generic-prototype .status{padding:0 22px 14px!important;flex:none;font-size:11px;display:flex;justify-content:space-between}
#player-slot #gi-lowfi.generic-prototype .home{flex:none;width:110px;height:4px;margin:10px auto 8px!important;border-radius:4px;background:#343a32}
.prototype-stack{position:relative;flex:1;min-height:0;display:flex;flex-direction:column}.prototype-base,.page-shell{height:100%;min-height:0;display:flex;flex-direction:column}.prototype-base{flex:1}.page-body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scroll-padding:16px}.page-content{padding:12px 20px 20px;min-width:0}.page-region{flex:none;min-width:0}.region-top:not(:empty){border-bottom:1px solid var(--line)}.region-bottom:not(:empty){border-top:1px solid var(--line);background:var(--surface);padding:6px 12px}.ui-default-nav{display:flex;gap:10px;align-items:center;padding:10px 20px 16px;border-bottom:1px solid var(--line);min-height:56px;flex:none}.ui-default-nav h2{font-size:20px;font-weight:600;line-height:1.4;margin:0}.ui-icon-button{display:grid;place-items:center;min-width:44px;min-height:44px;padding:8px;border:0;background:transparent}
#player-slot .flow-block{min-width:0;margin:10px 0}#player-slot .flow-block p{margin:0;font-size:14px;line-height:1.65}#player-slot .flow-block h3{font-size:17px;line-height:1.45;margin:0;font-weight:600}#player-slot .flow-field{margin:12px 0!important}#player-slot .ui-action{width:100%;display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 14px;font-size:13px;text-align:center;background:white;border:1px solid #cdd2c7}.ui-action svg{flex:none}.ui-action.icon-only{width:44px;min-width:44px;padding:10px;border-color:transparent;background:transparent}#player-slot .emphasis-primary{background:#344d42;color:white;border-color:#344d42}#player-slot .emphasis-danger{color:#8c453b;border-color:#d4b6b0}#player-slot .ui-action[aria-pressed=true]{background:var(--accent-soft);color:var(--accent);border-color:var(--accent)}
.block-stack>.ui-container,.block-group>.ui-container,.block-card>.ui-container,.block-list>.ui-container{display:flex;flex-direction:column;gap:12px}.block-row>.ui-container,.block-list-row>.ui-container{display:flex;align-items:center;gap:12px}.block-row>.ui-container>.flow-block{flex:1}.block-row>.ui-container>.flow-block,.block-list-row>.ui-container>.flow-block,.block-stack>.ui-container>.flow-block{margin:0!important}.block-list-row>.ui-container>.flow-block:not(.block-image):not(.block-placeholder){flex:1}.block-row>.align-between{justify-content:space-between}.block-card>.ui-container,.ui-clickable-card{width:100%;padding:16px;border:1px solid var(--line);border-radius:10px;background:white;min-width:0;text-align:left}.ui-clickable-card{display:block;min-height:44px}.block-list>.ui-container{gap:0}.block-list>.ui-container>.flow-block{margin:0!important;border-bottom:1px solid #e6e9e1;padding:12px 0}.block-group>.ui-container{padding:12px;background:#f1f3ee;border-radius:9px}.gap-none>.ui-container{gap:0}.gap-small>.ui-container{gap:6px}.gap-large>.ui-container{gap:20px}.align-start>.ui-container{align-items:flex-start}.align-center>.ui-container{align-items:center}.align-end>.ui-container{align-items:flex-end}.align-between>.ui-container{justify-content:space-between}.block-list-row>.ui-container>.block-image,.block-list-row>.ui-container>.block-placeholder{flex:0 0 64px}.ui-container>h3{margin-bottom:4px!important}
.ui-image{width:100%;display:flex;align-items:center;justify-content:center;overflow:hidden;border:1px dashed #bcc5b7;border-radius:8px;background:#eef1e9;color:#697460;text-align:center;font-size:13px;padding:12px}.ui-image img{display:block;width:100%;height:100%;object-fit:cover}.ui-image:has(img){padding:0;border-style:solid}.aspect-square{aspect-ratio:1}.aspect-portrait{aspect-ratio:3/4}.aspect-landscape{aspect-ratio:4/3}.aspect-wide{aspect-ratio:16/9}.ui-image button{height:100%}
.ui-nav{display:grid;grid-template-columns:1fr minmax(0,2fr) 1fr;gap:6px;align-items:center;padding:4px 10px;min-height:56px}.ui-nav>strong{text-align:center;font-size:16px;line-height:1.4;overflow-wrap:anywhere}.ui-nav-side{display:flex;align-items:center;min-width:0}.ui-nav-side:last-child{justify-content:flex-end}.ui-nav .flow-block{margin:0!important}.ui-nav .ui-action{border-color:transparent;font-size:12px;padding:8px;min-width:44px}.ui-bar{display:flex;align-items:center;gap:8px;min-height:52px}.ui-bar>.flow-block{flex:1;margin:0!important}.ui-bar>.block-row{flex:1}.ui-bar>.block-row .ui-container{gap:4px}.ui-bar .ui-action{padding:10px 8px}.ui-tabs{justify-content:space-around;gap:4px}.ui-tabs .ui-action{flex-direction:column;gap:4px;border:0;background:transparent;font-size:10px;padding:8px 4px;min-height:54px}.ui-tabs .ui-action[aria-pressed=true]{background:var(--accent-soft)}.ui-tabs .icon-only{width:100%}
#player-slot .ui-segments{display:flex;gap:3px;background:#e9ede4;padding:4px;border-radius:9px;border:0}#player-slot .ui-segments legend{font-size:12px;padding:0 4px;margin:0 0 5px}#player-slot .ui-segments .flow-choice{position:relative;display:flex;align-items:center;justify-content:center;flex:1;padding:8px;min-height:40px;border:1px solid transparent;background:transparent;border-radius:6px;margin:0}#player-slot .ui-segments .flow-choice:has(input:checked){background:white;border-color:#d4dbcc;box-shadow:0 1px 3px #00000008}#player-slot .ui-segments input{position:absolute;opacity:0;width:1px;height:1px;min-width:0;min-height:0}#player-slot .ui-segments .flow-choice:has(input:focus-visible){outline:2px solid var(--accent);outline-offset:1px}.ui-disclosure{display:flex;justify-content:space-between;align-items:center;width:100%;min-height:48px;border:0;border-bottom:1px solid var(--line);border-radius:0;text-align:left;background:transparent;padding:8px 0;font-size:14px}.ui-disclosure svg{transition:transform .15s}.ui-disclosure[aria-expanded=true] svg{transform:rotate(90deg)}
.ui-collection{display:grid;gap:12px;touch-action:pan-y}.ui-collection.mode-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ui-collection-item{display:block;min-width:0;text-align:left;border:1px solid var(--line);border-radius:9px;padding:12px;background:white;color:inherit}.ui-collection-item>.flow-block:first-child{margin-top:0!important}.ui-collection-item>.flow-block:last-child{margin-bottom:0!important}.ui-collection-item[aria-pressed=true]{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}.ui-collection .ui-container{padding:0;border:0;background:transparent}.ui-collection .flow-block h3{font-size:14px!important}.ui-empty{padding:24px 10px;text-align:center;color:var(--muted);grid-column:1/-1}.ui-pagination{display:flex;align-items:center;justify-content:center;gap:18px;margin-top:12px}.ui-pagination button{min-height:44px;width:44px;display:grid;place-items:center;padding:8px;border:0;background:transparent}.ui-pagination span{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.ui-feedback{display:flex;flex-direction:column;gap:10px;padding:18px;border:1px solid var(--line);border-radius:9px;background:#f4f5f1;font-size:13px;line-height:1.6}.ui-feedback strong{font-weight:550}.feedback-error{border-color:#d5b8b1;background:#fcf7f5;color:#803c32}.feedback-empty{border-style:dashed;text-align:center;padding:32px 18px}.feedback-toast{background:#293b31;color:white;box-shadow:0 4px 14px #00000018}.feedback-toast .ui-action{background:transparent!important;color:white!important}.ui-feedback progress{width:100%;height:8px;accent-color:var(--accent)}.ui-feedback>.flow-block{margin:0!important}.ui-spinner{width:18px;height:18px;border:2px solid #c2cabb;border-top-color:var(--accent);border-radius:50%;animation:prototype-spin 1s linear infinite}@keyframes prototype-spin{to{transform:rotate(360deg)}}
.prototype-layer{position:absolute;inset:0;z-index:10;display:flex;align-items:flex-end;justify-content:center;padding:12px}.overlay-scrim{position:absolute;inset:0;background:#20271f55}.overlay-shell{position:relative;width:100%;height:auto;max-height:90%;background:white;border:1px solid #cbd1c3;border-radius:18px 18px 10px 10px;overflow:hidden;box-shadow:0 10px 32px #00000020}.overlay-shell .page-body{flex:1;min-height:60px}.overlay-shell .ui-default-nav{padding:8px 14px;min-height:54px}.overlay-shell .ui-default-nav h2{font-size:17px}.overlay-shell .page-content{padding:12px 16px 20px}.layer-dialog{align-items:center;padding:24px}.layer-dialog .overlay-shell{border-radius:14px;max-height:85%}.layer-menu{align-items:flex-end;padding:16px}.layer-menu .overlay-shell{border-radius:12px;max-height:75%}.layer-menu .ui-action{border:0;justify-content:flex-start}.layer-sheet .overlay-shell:before{content:'';display:block;flex:none;width:36px;height:4px;border-radius:4px;background:#c8cfc2;margin:8px auto 0}
@media(max-width:600px){#player-slot #gi-lowfi.generic-prototype .phone{height:740px;max-height:85dvh}.page-content{padding:12px 16px 18px}.ui-nav{padding:4px 6px}.ui-bar{gap:4px}}@media(prefers-reduced-motion:reduce){.ui-spinner{animation:none}.ui-disclosure svg{transition:none}}
.mini-nav{font-size:10px;font-weight:600;text-align:center;border-bottom:1px solid var(--line);padding:6px}.mini-bar{font-size:8px;display:flex;justify-content:space-around;border-top:1px solid var(--line);padding:6px}.mini-container{border:1px solid #e1e5dc;padding:5px;border-radius:4px;margin:5px 0}.mini-row{display:flex;gap:4px}.mini-row>*{flex:1;min-width:0}
#player-slot .phone.onboarding .page-content>.block-heading h3{font-size:28px;letter-spacing:-.5px;margin:24px 0}.prototype-base[aria-hidden=true]{pointer-events:none}
#player-slot .ui-action.icon-only{width:44px;min-width:44px;padding:10px;border-color:transparent;background:transparent}#player-slot .ui-nav .ui-action{border-color:transparent;padding:8px;font-size:12px}#player-slot .ui-tabs .ui-action{border:0;background:transparent;font-size:10px;padding:8px 4px;min-height:54px;flex-direction:column;gap:4px;border-radius:0;color:var(--muted)}#player-slot .ui-tabs .ui-action[aria-pressed=true]{background:transparent;border:0;color:var(--accent);font-weight:600}#player-slot .ui-tabs{border-top:1px solid #edf0e8;margin-top:8px}#player-slot .ui-tabs .ui-action:hover{background:var(--accent-soft)}

.release-notice{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:12px 14px;margin:0 0 16px;border:1px solid var(--line);border-radius:8px;background:var(--accent-soft);color:var(--accent);font-size:12px;line-height:1.6}.release-notice button{font-size:12px;min-height:36px;white-space:nowrap;background:var(--surface)}
.review-console-panel{margin-top:12px;padding:10px 14px;border:1px solid var(--line);border-radius:8px;background:var(--surface);display:flex;flex-direction:column;gap:8px;font-size:12px}.review-console-label{font-weight:600;color:var(--text);margin-right:6px}.btn-console-outcome{margin:0 4px;padding:4px 8px;font-size:11px;border:1px solid var(--line);border-radius:4px;background:var(--accent-soft);cursor:pointer}.btn-console-cancel{margin-left:4px;padding:4px 8px;font-size:11px;border:1px solid #d37373;color:#a33;border-radius:4px;background:#fff;cursor:pointer}.btn-console-event{margin:0 4px 4px 0;padding:4px 8px;font-size:11px;border:1px solid var(--line);border-radius:4px;background:var(--surface);cursor:pointer}

/* RM-009: 连线触发语义、图例、连线高亮与非页面逻辑节点 */
.diagram-legend .edge-key span i.user{border-top:2px solid #344d42}
.diagram-legend .edge-key span i.condition{border-top:2px dashed #286047}
.diagram-legend .edge-key span i.task{border-top:2px dashed #24587a}
.diagram-legend .edge-key span i.event{border-top:2px dotted #a05915}
.diagram-legend .edge-key span i.back{border-top:2px dashed #73796f}
.diagram-legend .edge-key span i.exception{border-top:2px dotted var(--danger)}

#diagram-edges path.user, #diagram-edges path.forward{stroke:#344d42;stroke-width:1.5}
#diagram-edges path.condition{stroke:#286047;stroke-width:1.5;stroke-dasharray:6 3}
#diagram-edges path.task{stroke:#24587a;stroke-width:1.6;stroke-dasharray:5 3}
#diagram-edges path.event{stroke:#a05915;stroke-width:1.6;stroke-dasharray:3 3}
#diagram-edges path.back{stroke:#73796f;stroke-dasharray:5 4;opacity:.6}
#diagram-edges path.exception{stroke:var(--danger);stroke-dasharray:2 4}
#diagram-edges path.selected-edge{stroke-width:2.8!important;stroke:#123e2a!important;filter:drop-shadow(0 0 3px rgba(18,62,42,0.45))}
#diagram-edges .edge-hitbox{fill:none;stroke:transparent;stroke-width:14;cursor:pointer;pointer-events:stroke}
#diagram-edges text{cursor:pointer;pointer-events:auto;user-select:none}
#diagram-edges text.selected-edge{font-weight:600;fill:#103522}

.flow-card.logic-card{width:240px;max-width:100%;justify-self:center;background:#f8f9f6;border:1px dashed #b8bfb0;height:auto;min-height:220px}
.flow-card.logic-card.selected{border-color:#24587a;border-style:solid;box-shadow:0 0 0 2px #24587a22,0 4px 12px #28331e0a}
.flow-card.logic-card .card-select{height:auto;min-height:175px;background:transparent}
.logic-badge{font-size:9px;font-weight:600;padding:2px 6px;border-radius:4px}
.badge-task{background:#e2ebf2;color:#1e4a68}
.badge-event{background:#f7ebe1;color:#7a3e10}
.logic-preview{padding:12px 14px}
.logic-preview h3{font-size:13px;margin:0 0 8px;line-height:1.4}
.logic-effect{font-size:10px;color:var(--muted);margin-bottom:8px;padding:4px 6px;background:#f0f2ed;border-radius:4px}
.logic-branches{display:flex;flex-direction:column;gap:5px;font-size:10px}
.logic-branch{display:flex;align-items:center;gap:6px;line-height:1.4}
.branch-tag{display:inline-block;padding:1px 5px;font-size:9px;border-radius:3px;font-family:monospace;white-space:nowrap}
.branch-tag.success{background:#e1efe3;color:#1f632b}
.branch-tag.danger{background:#fae8e6;color:#8c453b}
.branch-tag.neutral{background:#edf0eb;color:#50564d}
.logic-footer{border-top:1px solid #eeefe9}
.logic-footer button{color:#24587a}

.inspector-edge-detail{background:#fdfefb;border-left:3px solid var(--accent)}
.edge-detail-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.btn-clear-edge{background:transparent;border:0;color:var(--muted);font-size:13px;padding:2px 6px;cursor:pointer}
.btn-clear-edge:hover{color:var(--ink)}
.edge-detail-grid{display:flex;flex-direction:column;gap:8px;font-size:11px;margin:12px 0}
.edge-detail-row{display:flex;justify-content:space-between;gap:10px;line-height:1.5}
.edge-detail-row>span{color:var(--muted);flex-shrink:0}
.edge-kind-badge{padding:2px 6px;border-radius:4px;font-size:10px;font-weight:550}
.edge-kind-badge.user{background:#e9efe9;color:#344d42}
.edge-kind-badge.condition{background:#e3f0e8;color:#286047}
.edge-kind-badge.task{background:#e2ebf2;color:#1e4a68}
.edge-kind-badge.event{background:#f7ebe1;color:#7a3e10}
.edge-kind-badge.back{background:#eeeeea;color:#60655c}
.edge-kind-badge.exception{background:#fae8e6;color:#8c453b}
.edge-detail-actions{display:flex;gap:6px;margin-top:10px}
.edge-detail-actions button{flex:1;font-size:10px;padding:6px 8px}
.relation-item.selected .relation{border-color:var(--accent);background:var(--accent-soft)}


/* Compact, progressive disclosure for authoring and review controls. */
#agent-short-loop{margin-top:24px;border-top:1px solid var(--line);padding-top:20px}
#agent-short-loop>summary{cursor:pointer;min-height:44px;line-height:1.8;font-size:13px}
#agent-scope-context,#agent-save-receipt{max-height:320px;overflow:auto;background:#f6f8f3;border-radius:8px;padding:12px}
#agent-save-receipt:empty,#agent-scope-context:empty{display:none}
.review-console-panel{background:var(--paper);padding:16px;gap:12px}
.review-task-item{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.btn-console-outcome,.btn-console-cancel,.btn-console-event{min-height:44px;padding:8px 12px;margin:0;border-radius:7px;font-size:12px}
#review-console-events-list{display:flex;flex-wrap:wrap;gap:8px}
.logic-branch{overflow-wrap:anywhere}
.edge-hitbox:focus{outline:none;stroke:var(--accent)!important;stroke-opacity:.25}

.review-console-title{font-size:13px;margin:0;color:var(--muted);font-weight:600}.review-console-label{display:block;margin-bottom:8px}

.agent-page #agent-short-loop .agent-actions>*{flex:1 1 130px;min-height:44px;white-space:nowrap;text-align:center}#agent-short-loop input{width:100%}

.edge-rule-list{padding-left:18px;font-size:12px;line-height:1.8}.edge-rule-list li+li{margin-top:12px}.edge-key>span[hidden]{display:none}

/* Keep review controls next to the phone when space permits, above it on narrow views. */
.generic-prototype{container-type:inline-size}
.prototype-layout{display:flex;flex-direction:column;align-items:center;gap:16px}
.prototype-layout>.phone,.prototype-review{width:min(100%,390px)}
.has-review-console .prototype-review{order:-1}
#player-slot #gi-lowfi .prototype-review .review-header{margin:0;padding:16px;max-width:none;width:100%}
.prototype-review:has(>[hidden]:only-child){display:none}
@container(min-width:680px){
 .has-review-console .prototype-layout{display:grid;grid-template-columns:minmax(0,390px) minmax(180px,240px);justify-content:center;align-items:start;gap:24px}
 .has-review-console .prototype-review{order:0;position:sticky;top:24px}
}

.review-task-item .task-title{flex-basis:100%;font-weight:500}.review-task-item .btn-console-outcome{flex:1 1 88px}.prototype-review:not(:has(>:not([hidden]))){display:none}

/* Route in reserved gutters; labels never paint over cards or each other. */
#diagram-edges .edge-label-bg{fill:var(--bg);stroke:none;pointer-events:none}
#diagram-edges .edge-label{font-size:10px;paint-order:normal;stroke:none}
#diagram-edges .edge-group:not(.related):not(.selected){opacity:.3}
#diagram-edges .edge-group:hover,#diagram-edges .edge-group:focus-within{opacity:1}
#diagram-edges .edge-group.selected{opacity:1}

#player-slot #gi-lowfi #review-simulations button{min-height:44px;padding:10px 12px;line-height:1.6}#review-console-simulations{min-width:0}
#agent-behavior{margin-top:26px;border-top:1px solid var(--line);padding-top:16px}#agent-behavior>summary,#agent-check summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-size:13px}#agent-behavior-report{max-height:420px;overflow:auto;background:#f6f8f3;border:1px solid var(--line);padding:16px;border-radius:8px}#agent-behavior-cases{padding-left:20px}#agent-behavior-cases li{margin:8px 0;overflow-wrap:anywhere}#agent-behavior-summary{scroll-margin-top:24px}
#agent-task{margin:24px 0;border-top:1px solid var(--line);padding-top:16px}#agent-task>summary{min-height:44px;display:flex;align-items:center;font-size:13px;cursor:pointer}.agent-task-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 16px}.agent-task-grid input{width:100%}#agent-task-result{max-height:480px;overflow:auto}#agent-change-review{margin-top:20px;border:1px solid var(--line);padding:16px;border-radius:10px;background:#fbfcf9}#agent-diff-items{padding-left:18px}#agent-diff-items strong{font-size:12px;overflow-wrap:anywhere}#agent-diff-items p{margin:6px 0 16px;white-space:pre-wrap;overflow-wrap:anywhere}#agent-review-json{max-height:360px;overflow:auto}@media(max-width:600px){.agent-task-grid{grid-template-columns:1fr}}
#agent-overview-panel>summary,#agent-page-workspace>summary{min-height:44px;display:flex;align-items:center;cursor:pointer;font-size:13px}

/* Secondary tools disclosure */

.secondary-tools{display:flex;align-items:center;gap:8px;margin-left:auto}
.tool-btn{display:inline-flex;align-items:center;gap:6px;font-size:11px;padding:6px 12px;border-radius:6px;border:1px solid var(--line);background:var(--paper);color:var(--ink);cursor:pointer;min-height:32px;transition:all .15s ease}
.tool-btn:hover{background:var(--soft);border-color:var(--ink)}

/* Coherent project actions in sidebar */
.project-controls{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.project-controls button{font-size:11px;min-height:32px;padding:6px 10px;background:transparent;flex:1 1 calc(50% - 6px);white-space:nowrap}
#undo-project-btn{background:#fdf5ea;color:#8c5315;border-color:#ebd7bd;flex:1 1 100%}

/* Secondary more-tools menu in sidebar - inline disclosure */
.more-tools-menu{position:static;flex:1 1 100%}
.more-tools-menu summary{cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:center;gap:4px;font-size:11px;min-height:32px;padding:6px 10px;background:var(--surface);border:1px solid var(--line);border-radius:8px;color:var(--muted);transition:background .15s,color .15s}
.more-tools-menu summary::-webkit-details-marker{display:none}
.more-tools-menu summary:hover{background:var(--soft);color:var(--ink);border-color:#a3aaa1}
.more-tools-menu summary:focus-visible{outline:3px solid #668270;outline-offset:2px}
.more-tools-menu[open] summary{background:var(--accent-soft);color:var(--accent);border-color:var(--accent)}
.more-tools-panel{width:100%;margin-top:4px;background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:4px;display:flex;flex-direction:column;gap:2px;box-sizing:border-box}
.more-tools-panel button{width:100%;text-align:left;border:0;background:transparent;border-radius:5px;padding:7px 10px;font-size:11px;min-height:32px;display:flex;align-items:center;color:var(--ink);flex:none}
.more-tools-panel button:hover{background:var(--accent-soft);color:var(--accent)}

/* Project card actions hierarchy: primary action and secondary more menu - inline disclosure */
.project-card{overflow:visible}
.project-card-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;width:100%;gap:8px}
.project-card-actions>.btn-project-primary{flex:1 1 auto;min-height:34px;font-size:11px;font-weight:600;color:var(--accent);background:var(--accent-soft);border:1px solid #c9d6c5;border-radius:7px;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;transition:background .15s}
.project-card-actions>.btn-project-primary:hover{background:#dfe9dd}
.project-card-actions>.btn-project-restore{color:#234a36;background:#e2ebe1}
.project-card-more{flex:0 0 auto}
.project-card-more[open]{flex:1 1 100%;width:100%}
.project-card-more summary{cursor:pointer;list-style:none;min-height:34px;padding:6px 10px;border:1px solid var(--line);border-radius:7px;background:var(--surface);font-size:11px;display:inline-flex;align-items:center;justify-content:center;color:var(--muted);transition:background .15s,color .15s}
.project-card-more summary::-webkit-details-marker{display:none}
.project-card-more summary:hover{background:var(--soft);color:var(--ink)}
.project-card-more summary:focus-visible{outline:3px solid #668270;outline-offset:2px}
.project-card-more[open] summary{background:var(--accent-soft);color:var(--accent);border-color:var(--accent)}
.project-card-menu{width:100%;margin-top:6px;background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:4px;display:flex;flex-direction:column;gap:2px;box-sizing:border-box}
.project-card-menu button{width:100%;text-align:left;border:0;background:transparent;border-radius:5px;padding:7px 10px;font-size:11px;min-height:32px;display:flex;align-items:center;color:var(--ink)}
.project-card-menu button:hover{background:var(--accent-soft);color:var(--accent)}

/* Accessible icon catalog directory */
.icon-catalog-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(135px,1fr));gap:12px;padding:4px}
.icon-card{border:1px solid var(--line);border-radius:8px;padding:12px;text-align:center;background:var(--surface);display:flex;flex-direction:column;align-items:center;gap:6px}
.icon-preview{display:flex;justify-content:center;align-items:center;color:var(--ink);min-height:32px}
.icon-id{font-size:12px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}
.icon-label{font-size:11px;color:var(--muted)}
.icon-desc{font-size:10px;color:var(--muted-ink);margin:0;line-height:1.4;flex:1}
.btn-copy-icon{font-size:10px;padding:4px 8px;min-height:26px;width:100%;border-radius:4px;border:1px solid var(--line);background:var(--paper);cursor:pointer;margin-top:4px}
.btn-copy-icon:hover{background:var(--soft);border-color:var(--ink)}

/* Small-screen navigation disclosure and touch targets */
.mobile-nav-toggle{display:none}
.sidebar-nav-container{margin:8px 0 0}
@media(max-width:600px){
  .mobile-nav-toggle{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:44px;padding:10px 14px;border:1px solid var(--line);border-radius:8px;background:var(--surface);font-size:13px;font-weight:550;color:var(--ink);margin:8px 0}
  .mobile-nav-toggle:hover{background:var(--soft)}
  .mobile-nav-toggle .nav-toggle-hint{font-size:11px;color:var(--muted);font-weight:400}
  .mobile-nav-toggle[aria-expanded=true]{background:var(--accent-soft);border-color:var(--accent);color:var(--accent)}
  .mobile-nav-toggle[aria-expanded=true] .nav-toggle-hint{color:var(--accent)}
  .sidebar-nav-body{display:none;padding:8px 0}
  .sidebar-nav-body.is-open{display:block}
  .sidebar-nav-body.is-open .search-label{display:block;margin:0 0 14px}
  .sidebar-nav-body.is-open #studio-search{width:100%;min-height:44px;font-size:13px;display:block}
  .sidebar-nav-body.is-open .section-label{display:flex;justify-content:space-between;margin:12px 0 6px;font-size:11px}
  .sidebar-nav-body.is-open .page-list-heading{display:flex;margin-top:16px}
  .sidebar-nav-body.is-open #group-nav{display:flex;overflow-x:auto;gap:6px;padding:2px 0 6px}
  .sidebar-nav-body.is-open #group-nav button{min-height:44px;padding:8px 12px;font-size:12px;white-space:nowrap}
  .sidebar-nav-body.is-open #page-nav{display:grid;gap:4px}
  .sidebar-nav-body.is-open #page-nav button{min-height:44px;padding:10px 12px;font-size:12px;border:1px solid var(--line);border-radius:6px;background:var(--surface)}
  .sidebar-nav-body.is-open #page-nav button[aria-current=true]{background:#eaece5;border-color:#bdc1b8;font-weight:600}
  .project-controls button{flex:1 1 calc(50% - 6px);min-height:40px}
  .more-tools-menu{flex:1 1 100%}
  .more-tools-menu summary{min-height:40px;font-size:12px}
  .prototype-layout{display:flex;flex-direction:column;align-items:center}
  .prototype-review{order:-1;width:min(100%,390px);margin-bottom:12px}
  #review-console{margin-top:0}
  .btn-console-outcome,.btn-console-cancel,.btn-console-event{min-height:44px;font-size:12px;padding:8px 12px}
  .project-card-actions>.btn-project-primary,.project-card-more summary{min-height:44px;font-size:12px}
  .project-card-menu button{min-height:44px;font-size:12px}
  .secondary-tools{margin-left:8px}
}


/* A project's logical display size is independent of the reviewer's window. */
.display-creation-hint{font-size:12px;color:var(--muted);line-height:1.6;margin:10px 0 0}
.display-fields{border:0;padding:0;margin:20px 0 0;min-width:0}.display-fields legend{font-size:13px;font-weight:500;color:var(--ink)}.display-fields .sr-only{margin:0}
.prototype-device-slot{position:relative;flex:none;margin-inline:auto}
#player-slot{min-width:0;overflow-x:auto}
#player-slot #gi-lowfi.generic-prototype .phone[data-device]{width:var(--prototype-width)!important;height:var(--prototype-height)!important;max-height:none!important;min-height:0!important;margin:0!important;position:absolute;inset:0 auto auto 0;transform-origin:top left}
#player-slot #gi-lowfi.generic-prototype .phone[data-device="tablet"]{border-radius:16px!important}
#player-slot #gi-lowfi.generic-prototype .phone[data-device="desktop"],#player-slot #gi-lowfi.generic-prototype .phone[data-device="web"]{border-radius:8px!important;padding:0!important}
#player-slot #gi-lowfi.generic-prototype .phone[data-device="desktop"]>.status,#player-slot #gi-lowfi.generic-prototype .phone[data-device="web"]>.status{min-height:38px;padding:8px 16px!important;gap:16px;border-bottom:1px solid var(--line);background:var(--soft);justify-content:flex-start}
.frame-window-controls{color:var(--muted);font-size:10px;letter-spacing:4px}.frame-window-title{font-size:12px;color:var(--muted)}
.phone[data-device="web"] .frame-window-title{border:1px solid var(--line);border-radius:4px;padding:3px 16px;min-width:35%;background:var(--surface)}
.wide-prototype .prototype-layout{display:flex;flex-direction:column;align-items:flex-start}.wide-prototype .prototype-review{order:-1;position:static;width:100%;max-width:none}
.mini-device{position:relative;width:100%;overflow:hidden;border:1px solid var(--line);border-radius:5px;background:var(--surface)}.mini-device[data-device=phone]{border-radius:12px}
/* Titles and review controls sit outside the screen-shaped preview. */
.flow-card.page-card{border:0;border-radius:0;background:transparent;box-shadow:none}
.page-card .card-select{background:transparent;border-radius:0}
.page-card .card-meta{padding:0 0 10px;border:0;align-items:flex-start}
.page-card .card-meta>b{margin-top:2px}
.page-card .card-footer{border:0;padding-inline:0}
.page-card .mini-device{box-shadow:0 3px 7px #28331e0a}
.page-card.selected .mini-device{border-color:var(--accent);box-shadow:0 0 0 2px #344d421a}
.page-card .card-select:hover .mini-device{border-color:var(--accent)}
.mini-device-content{position:absolute;inset:0;padding:8px;overflow:hidden;overflow-wrap:anywhere}

/* Workspace and creation flow share one spacing and action hierarchy. */
.project-start-options{margin-top:20px;border-top:1px solid var(--line);padding-top:16px;font-size:13px;color:var(--muted)}.project-start-options summary{cursor:pointer;min-height:32px}.project-start-options label{margin-top:8px}.project-handoff-dialog{width:min(640px,calc(100vw - 32px))}#project-handoff-text{font-size:13px;line-height:1.7}#project-editor-cancel{margin-right:auto}#new-project{background:var(--accent);border-color:var(--accent);color:#fff}.section-label{margin-top:14px}#group-nav button,#page-nav button{font-size:13px;min-height:40px}.project-controls #new-project:hover{background:#283e33}
@media(max-width:900px){.inspector{position:static;max-height:none}.workspace-grid.has-inspector{grid-template-columns:minmax(0,1fr)}.workspace-view-actions{width:100%}.workspace-view-actions .view-switch{flex:1}.workspace-view-actions .view-switch button{flex:1}.workspace-toolbar{padding:10px 12px}}
@media(max-width:600px){#studio-main{padding:20px 14px}.workspace-heading{gap:12px;margin-bottom:16px}.workspace-heading h1{font-size:23px}.workspace-view-actions{gap:8px}.details-toggle{min-height:44px;width:44px}.project-manager-toolbar{gap:8px}.project-dialog-header{gap:12px}#group-nav button,#page-nav button{min-height:44px}}

/* New project starts with AI; manual fields are optional progressive disclosure. */
.project-create-header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}.project-create-header h2{margin:0}.project-create-header>button{display:grid;place-items:center;flex:none;width:40px;min-height:40px;padding:8px;border:0;background:transparent}
.project-ai-start{padding:20px;background:var(--accent-soft);border:1px solid #d2ddcf;border-radius:12px}.project-ai-start h3{margin:0;font-size:20px;font-weight:600;letter-spacing:-.4px}.project-ai-start>p:first-of-type{font-size:13px;line-height:1.7;color:var(--muted);margin:8px 0 16px}#project-new-ai-copy{width:100%;min-height:44px;background:var(--accent);border-color:var(--accent);color:#fff;font-size:14px}#project-new-ai-copy:hover{background:#283e33}#project-new-ai-message:not(:empty){margin-top:12px}
.project-manual-entry{margin-top:20px;padding-top:12px;border-top:1px solid var(--line)}.project-manual-entry>summary{font-size:13px;min-height:44px;padding:12px 0;cursor:pointer;color:var(--muted)}.project-manual-entry:has(>summary[hidden]){margin-top:0;padding-top:0;border-top:0}
