#yapcode-open{font:inherit;font-weight:700;border-radius:10px;border:1px solid var(--border,#9ca3af);background:var(--btn,#e7f0e8);color:var(--fg,#243);padding:9px 13px;margin:5px;cursor:pointer}
#yapcode-dialog{box-sizing:border-box;width:min(1160px,calc(100vw - 18px));max-width:1160px;height:min(94dvh,970px);max-height:94dvh;margin:auto;padding:0;overflow:auto;background:#f8faf7;border:1px solid #d4e2d5;border-radius:19px;color:#1d372b;box-shadow:0 16px 55px #11182742;font:14px/1.5 system-ui,sans-serif}
#yapcode-dialog::backdrop{background:#101b28a6}
#yapcode-dialog *{box-sizing:border-box}
#yapcode-dialog [hidden]{display:none!important}
#yapcode-dialog .yc-header{position:sticky;top:0;z-index:3;background:#fff;padding:18px 23px;border-bottom:1px solid #dbe7dd;display:flex;align-items:start;justify-content:space-between;gap:10px}
#yapcode-dialog .yc-header h2{font-size:26px;letter-spacing:-.035em;margin:0}
#yapcode-dialog .yc-header p{color:#64766a;margin:3px 0 0}
#yapcode-dialog .yc-header small{font-weight:800;letter-spacing:.13em;color:#56836b}
#yapcode-dialog .yc-version{display:inline-block;color:#577469;font-size:12px;letter-spacing:0;padding:3px 8px;border:1px solid #d6e5d7;border-radius:8px;vertical-align:middle}
#yapcode-dialog .yc-layout{display:grid;grid-template-columns:minmax(260px,370px) minmax(0,1fr);min-height:520px}
#yapcode-dialog .yc-settings{padding:20px;border-right:1px solid #dbe7dd;background:#f5f8f3}
#yapcode-dialog .yc-output{padding:20px;min-width:0}
#yapcode-dialog h3{font-size:17px;margin:18px 0 8px}
#yapcode-dialog label{display:block;font-size:13px;font-weight:650;margin:12px 0;color:#354e3b}
#yapcode-dialog label input,#yapcode-dialog label select,#yapcode-dialog label textarea{display:block;width:100%;margin-top:5px}
#yapcode-dialog button,#yapcode-dialog input,#yapcode-dialog select,#yapcode-dialog textarea{font:inherit;border-radius:9px;border:1px solid #c7dacb;padding:10px;background:#fff;color:#1c392b;max-width:100%}
#yapcode-dialog input,#yapcode-dialog select,#yapcode-dialog textarea{font-size:16px}
#yapcode-dialog textarea{resize:vertical;min-height:75px;line-height:1.5}
#yapcode-dialog button{cursor:pointer;background:#e8f1e8;font-weight:650;min-height:40px}
#yapcode-dialog button:hover{background:#d7e9da}
#yapcode-dialog button:focus-visible,#yapcode-dialog input:focus-visible,#yapcode-dialog select:focus-visible,#yapcode-dialog textarea:focus-visible{outline:3px solid #60a17b;outline-offset:2px}
#yapcode-dialog .yc-primary{background:#235c40;color:white;border-color:#235c40}
#yapcode-dialog .yc-primary:hover{background:#17472f}
#yapcode-dialog .yc-note{font-size:12px;color:#5e7266;line-height:1.55}
#yapcode-dialog .yc-actions{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 15px}
#yapcode-dialog .yc-actions button{flex:1 1 180px}
#yapcode-dialog .yc-settings>button{margin-bottom:6px}
#yapcode-dialog .yc-step{display:flex;justify-content:space-between;flex-wrap:wrap;gap:7px;color:#466f56;font-size:11px;font-weight:700;letter-spacing:.025em;border-bottom:1px solid #d9e6dc;padding-bottom:14px}
#yapcode-dialog #yc-status{min-height:45px;background:#edf5ee;padding:10px 12px;border-radius:9px;color:#285439}
#yapcode-dialog .yc-review{border:2px solid #a7c5ad;border-radius:14px;padding:15px;background:#f0f8ee}
#yapcode-dialog .yc-files{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:8px}
#yapcode-dialog .yc-files button{font-size:12px;text-align:left;max-width:100%;overflow-wrap:anywhere}
#yapcode-dialog .yc-files .yc-selected{background:#28633f;color:#fff}
#yapcode-dialog .yc-code,#yapcode-dialog pre{font:12px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace;white-space:pre-wrap;overflow-wrap:anywhere}
#yapcode-dialog .yc-code{min-height:290px}
#yapcode-dialog pre{max-height:310px;overflow:auto;background:#182b23;color:#def2e2;padding:14px;border-radius:10px;border:1px solid #345643}
#yapcode-dialog [aria-busy=true] button{opacity:.75}
@media(max-width:740px){#yapcode-dialog{width:calc(100vw - 10px);height:calc(100dvh - 12px);max-height:calc(100dvh - 12px);border-radius:12px}#yapcode-dialog .yc-layout{display:block}#yapcode-dialog .yc-settings{border-right:0;border-bottom:1px solid #dbe7dd;padding:15px}#yapcode-dialog .yc-output{padding:15px}#yapcode-dialog .yc-header{padding:15px}#yapcode-dialog .yc-header h2{font-size:22px}#yapcode-dialog .yc-step{gap:9px}}

/* YapCode in-chat workspace polish: visually aligned with the Plugin gallery. */
#yapcode-dialog{
 width:min(1090px,calc(100vw - 26px));max-width:1090px;
 height:min(800px,calc(100dvh - 30px));max-height:calc(100dvh - 30px);
 overflow:hidden;border-radius:20px;
 background:var(--panel,#fff);color:var(--fg,#233a2d);
 border:1px solid var(--border,#dce6dc);box-shadow:0 26px 90px #091c163d;
}
#yapcode-dialog::backdrop{background:#0e211b80}
#yapcode-dialog .yc-frame{display:grid;grid-template-columns:225px minmax(0,1fr);height:100%;min-height:0}
#yapcode-dialog .yc-rail{
 display:flex!important;flex-direction:column;min-width:0;min-height:0;
 padding:24px 13px 17px;background:var(--side,var(--bubble,#f2f7f2));
 border-right:1px solid var(--border,#dce6dc);
}
#yapcode-dialog .yc-rail-brand{display:flex;align-items:center;gap:11px;padding:2px 11px 30px;letter-spacing:-.03em;font-size:18px}
#yapcode-dialog .yc-rail-icon{width:33px;height:33px;display:grid;place-items:center;border-radius:11px;background:#e0f0e4;color:#2b6443;font:800 12px/1 ui-monospace,monospace}
#yapcode-dialog .yc-rail-label{margin:0 11px 10px;letter-spacing:.11em;font-size:10px;font-weight:780;opacity:.58}
#yapcode-dialog .yc-tabs{display:grid;gap:5px}
#yapcode-dialog .yc-tabs button{
 display:flex;align-items:center;gap:10px;min-height:44px;width:100%;margin:0;
 padding:10px 13px;text-align:left;white-space:nowrap;border:1px solid transparent;
 background:transparent;color:inherit;font-size:13px;font-weight:600;border-radius:11px;
}
#yapcode-dialog .yc-tabs button:hover{background:var(--panel,#fff)}
#yapcode-dialog .yc-tabs button[aria-selected=true]{background:var(--panel,#fff);border-color:var(--border,#dce6dc);box-shadow:0 2px 10px #0a1d1010;font-weight:760}
#yapcode-dialog .yc-rail-footer{margin-top:auto;border-top:1px solid var(--border,#dce6dc);padding:15px 10px 4px;font-size:11px;line-height:1.5;font-weight:650;opacity:.85}
#yapcode-dialog .yc-rail-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#409b64;margin-right:6px}
#yapcode-dialog .yc-rail-footer p{font-weight:450;opacity:.75;margin:5px 0 0}
#yapcode-dialog .yc-main{min-width:0;min-height:0;overflow-y:auto;overscroll-behavior:contain;background:var(--panel,#fff);scrollbar-gutter:stable}
#yapcode-dialog .yc-header{
 position:sticky;top:0;z-index:4;display:flex;align-items:center;
 padding:25px clamp(20px,3.5vw,42px) 17px;gap:16px;
 background:var(--panel,#fff);border-bottom:1px solid var(--border,#e2e9e2);
}
#yapcode-dialog .yc-header small{display:block;font-size:10px;letter-spacing:.12em;font-weight:760;color:var(--accent,#52795b);opacity:.85}
#yapcode-dialog .yc-header h2{font-size:clamp(24px,2.7vw,30px);font-weight:760;letter-spacing:-.045em;line-height:1.15;margin:4px 0}
#yapcode-dialog .yc-header p{font-size:12px;margin:5px 0 0;color:inherit;opacity:.69}
#yapcode-dialog .yc-version{font-size:10px;font-weight:650;border-radius:999px;border-color:var(--border,#dce6dc);color:inherit;opacity:.6;vertical-align:middle;padding:3px 8px}
#yapcode-dialog .yc-header button[data-yc=close]{margin-left:auto;border:0;background:transparent;color:inherit;font-size:12px;flex:none;min-height:36px;padding:7px 11px}
#yapcode-dialog .yc-header button[data-yc=close]:hover{background:var(--bubble,#eff3ef)}
#yapcode-dialog #yc-live-feedback{margin:14px clamp(20px,3.5vw,42px) 0;padding:12px 14px;border-radius:12px;border:1px solid var(--border,#dce6dc);background:var(--bubble,#edf5ee);font-size:13px;line-height:1.55}
#yapcode-dialog .yc-layout{display:block;min-height:0;padding:25px clamp(20px,3.5vw,42px) 35px}
#yapcode-dialog .yc-pane[hidden]{display:none!important}
#yapcode-dialog .yc-eyebrow{display:inline-block;font-size:10px;font-weight:800;letter-spacing:.11em;color:var(--accent,#4d805b)}
#yapcode-dialog .yc-hero{position:relative;isolation:isolate;overflow:hidden;border-radius:19px;border:1px solid var(--border,#deeadf);padding:30px 28px 28px;min-height:180px;background:linear-gradient(120deg,#eef8f0 0%,#e6f4ef 48%,#e9eef8 100%);color:#244733}
#yapcode-dialog .yc-hero h3{position:relative;z-index:1;max-width:460px;margin:15px 0 9px;font-size:clamp(21px,2.4vw,27px);line-height:1.2;letter-spacing:-.04em;font-weight:760}
#yapcode-dialog .yc-hero p{position:relative;z-index:1;max-width:460px;margin:0;color:#4d6c5b;font-size:13px;line-height:1.55}
#yapcode-dialog .yc-hero-art{position:absolute;right:-20px;top:-42px;width:205px;height:205px;border-radius:50%;border:2px solid #ffffffa8;background:#d6ece4a8;display:grid;place-items:center;transform:rotate(-14deg)}
#yapcode-dialog .yc-hero-art:after{content:'';position:absolute;inset:19px;border:1px solid #ffffffd4;border-radius:50%}
#yapcode-dialog .yc-hero-art span{display:grid;place-items:center;width:92px;height:92px;border:1px solid #fff;border-radius:26px;background:#fff;box-shadow:0 12px 32px #31594525;color:#316f4d;font:800 24px ui-monospace,monospace}
#yapcode-dialog .yc-chat-card{margin:18px 0 20px;padding:20px;border:1px solid var(--border,#dfe8e0);border-radius:17px;background:var(--panel,#fff);box-shadow:0 3px 15px #112b1d0d}
#yapcode-dialog .yc-chat-card label{font-size:14px;margin:0 0 10px;font-weight:720;color:inherit}
#yapcode-dialog .yc-chat-card textarea{min-height:105px;resize:vertical;border-radius:12px;background:var(--panel,#fff);color:inherit;border:1px solid var(--border,#cfded2);line-height:1.55;width:100%;padding:12px 14px}
#yapcode-dialog .yc-chat-submit{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:12px}
#yapcode-dialog .yc-chat-submit span{font-size:11px;opacity:.64}
#yapcode-dialog .yc-chat-submit button{white-space:nowrap;flex:none;min-height:42px;padding:10px 16px}
#yapcode-dialog .yc-suggestions-title{margin:18px 2px 12px;font-size:13px;font-weight:720}
#yapcode-dialog .yc-starters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}
#yapcode-dialog .yc-starters button{display:grid;justify-items:start;gap:8px;min-height:135px;padding:12px;border:1px solid var(--border,#dae5dc);border-radius:15px;background:var(--panel,#fff);color:inherit;text-align:left;transition:transform .16s,box-shadow .16s,border-color .16s}
#yapcode-dialog .yc-starters button:hover{transform:translateY(-2px);border-color:var(--accent,#558b67);box-shadow:0 6px 19px #0e251216}
#yapcode-dialog .yc-starters strong{font-size:13px;line-height:1.3}
#yapcode-dialog .yc-starters small{font-size:11px;line-height:1.4;opacity:.7}
#yapcode-dialog .yc-starter-art{display:grid;place-items:center;width:40px;height:37px;border-radius:11px;font-size:19px;font-weight:750;color:#305a45}
#yapcode-dialog .yc-art-mint{background:#e2f4e9}#yapcode-dialog .yc-art-blue{background:#e4eefc}#yapcode-dialog .yc-art-lilac{background:#eee8fa}
#yapcode-dialog .yc-mode-heading{margin:0 0 18px;max-width:690px}
#yapcode-dialog .yc-mode-heading h3{font-size:clamp(21px,2.6vw,27px);letter-spacing:-.035em;margin:8px 0;line-height:1.2;font-weight:740}
#yapcode-dialog .yc-mode-heading p{font-size:13px;line-height:1.6;margin:0;opacity:.72}
#yapcode-dialog .yc-cloud-slot{max-width:750px}
#yapcode-dialog #yapcoding-cloud{border:1px solid var(--border,#dce7dc);border-radius:17px;padding:20px;background:var(--panel,#fff);box-shadow:0 3px 15px #152b1710}
#yapcode-dialog #yapcoding-cloud h3{font-size:16px;margin:0 0 9px}
#yapcode-dialog #yapcoding-cloud p{font-size:12px;line-height:1.6;opacity:.78}
#yapcode-dialog .yc-local-grid{display:grid;grid-template-columns:minmax(0,340px) minmax(0,1fr);align-items:start;gap:18px}
#yapcode-dialog .yc-settings,#yapcode-dialog .yc-output{padding:18px;border:1px solid var(--border,#dce7df);border-radius:17px;min-width:0;background:var(--panel,#fff);box-shadow:0 2px 12px #122b1910}
#yapcode-dialog .yc-output{position:relative;overflow:hidden}
#yapcode-dialog .yc-settings h3,#yapcode-dialog .yc-output h3{font-size:14px;margin:16px 0 10px;letter-spacing:-.015em}
#yapcode-dialog .yc-settings h3:first-of-type{margin-top:16px}
#yapcode-dialog .yc-note{color:inherit;opacity:.68;font-size:11px;line-height:1.55}
#yapcode-dialog label{color:inherit}
#yapcode-dialog button,#yapcode-dialog input,#yapcode-dialog textarea,#yapcode-dialog select{border-color:var(--border,#cbd9cf);color:inherit;background:var(--panel,#fff)}
#yapcode-dialog input:not([type=checkbox]),#yapcode-dialog select,#yapcode-dialog textarea{min-width:0;width:100%}
#yapcode-dialog input[type=checkbox]{display:inline-block!important;width:16px!important;height:16px;margin:0 8px 0 0;vertical-align:middle;accent-color:#35734b}
#yapcode-dialog button{background:var(--bubble,#eff5ef);font-size:12px;font-weight:650}
#yapcode-dialog button:hover{background:var(--bubble,#e5f0e5);filter:brightness(.98)}
#yapcode-dialog .yc-primary{background:#286346!important;border-color:#286346!important;color:#fff!important}
#yapcode-dialog .yc-primary:hover{background:#1c5238!important}
#yapcode-dialog .yc-actions{gap:8px}
#yapcode-dialog .yc-actions button{flex:1 1 130px}
#yapcode-dialog #yc-status{font-size:12px;color:inherit;min-height:0;border:1px solid var(--border,#dce7df);background:var(--bubble,#edf5ee);line-height:1.55}
#yapcode-dialog .yc-review{border:1px solid #9abb9e;background:var(--bubble,#f0f8ee)}
#yapcode-dialog .yc-step{gap:7px;font-size:10px;opacity:.7;color:inherit}
#yapcode-dialog .yc-files .yc-selected{background:#286346!important;color:#fff!important}
#yapcode-dialog pre{max-width:100%;overflow:auto;white-space:pre-wrap;background:#162b22;color:#e4f2e7;border-color:#244733}
#yapcode-dialog .yc-code{min-height:200px}
#yapcode-dialog [aria-busy=true] button{opacity:.7}
@media(max-width:940px){
 #yapcode-dialog .yc-frame{grid-template-columns:195px minmax(0,1fr)}
 #yapcode-dialog .yc-local-grid{grid-template-columns:1fr}
}
@media(max-width:700px){
 #yapcode-dialog{width:calc(100vw - 12px);max-width:none;height:calc(100dvh - 12px);max-height:calc(100dvh - 12px);border-radius:16px}
 #yapcode-dialog .yc-frame{display:flex;flex-direction:column}
 #yapcode-dialog .yc-rail{flex:none;display:block!important;padding:12px 14px 9px;border-right:0;border-bottom:1px solid var(--border,#dce7df);overflow:hidden}
 #yapcode-dialog .yc-rail-brand{padding:0 2px 9px;font-size:15px}
 #yapcode-dialog .yc-rail-icon{width:28px;height:28px;font-size:10px}
 #yapcode-dialog .yc-rail-label,#yapcode-dialog .yc-rail-footer{display:none}
 #yapcode-dialog .yc-tabs{display:flex;gap:6px;overflow-x:auto;max-width:100%;padding:1px 1px 4px;scrollbar-width:thin}
 #yapcode-dialog .yc-tabs button{flex:none;width:auto;min-height:35px;padding:7px 11px;font-size:11px;border-radius:999px}
 #yapcode-dialog .yc-main{flex:1;min-height:0;overflow-y:auto}
 #yapcode-dialog .yc-header{padding:17px 17px 13px}
 #yapcode-dialog .yc-header h2{font-size:23px}
 #yapcode-dialog .yc-layout{padding:17px 15px 28px}
 #yapcode-dialog .yc-hero{padding:24px 20px;min-height:178px}
 #yapcode-dialog .yc-hero h3{font-size:22px;max-width:310px}
 #yapcode-dialog .yc-hero p{font-size:12px;max-width:300px}
 #yapcode-dialog .yc-hero-art{width:145px;height:145px;right:-45px;top:-24px;opacity:.7}
 #yapcode-dialog .yc-hero-art span{width:60px;height:60px;font-size:16px;border-radius:18px}
 #yapcode-dialog .yc-starters{grid-template-columns:1fr}
 #yapcode-dialog .yc-starters button{min-height:70px;grid-template-columns:44px 1fr;grid-template-rows:auto auto;align-items:center;column-gap:10px;row-gap:2px}
 #yapcode-dialog .yc-starters button .yc-starter-art{grid-row:1/3}
 #yapcode-dialog .yc-chat-submit{align-items:stretch;flex-direction:column}
 #yapcode-dialog .yc-chat-submit button{width:100%}
 #yapcode-dialog .yc-settings,#yapcode-dialog .yc-output{padding:15px}
 #yapcode-dialog #yc-live-feedback{margin:12px 15px 0}
}
@media(prefers-reduced-motion:reduce){#yapcode-dialog .yc-starters button{transition:none}#yapcode-dialog .yc-starters button:hover{transform:none}}
