@media screen {
 .project-templates-strip{padding:14px!important;display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;border:1px solid var(--border);border-radius:12px;background:var(--card);color:var(--foreground)}
 .project-templates-strip strong{font-size:12px}.project-templates-strip button{font-size:12px;min-height:44px}
 .project-template-dialog{position:fixed;inset:0;margin:auto;width:min(920px,calc(100vw - 28px));max-height:calc(100dvh - 36px);padding:0;border:1px solid var(--border);border-radius:12px;background:var(--background);color:var(--foreground);box-shadow:0 20px 80px #0006;overflow:hidden;font:14px/1.5 Inter,'Segoe UI',sans-serif}
 .project-template-dialog[open]{display:flex;flex-direction:column}.project-template-dialog::backdrop{background:#0009}
 .project-template-dialog header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:20px 22px;border-bottom:1px solid var(--border);background:var(--card);flex-shrink:0}
 .project-template-dialog header>div{min-width:0}.project-template-dialog h2{font-size:20px;font-weight:750;line-height:1.35;margin:0;overflow-wrap:anywhere}
 .project-template-dialog header p{margin:6px 0 0;color:var(--muted-foreground);font-size:12px;line-height:1.6}
 .project-template-dialog header button{flex-shrink:0}
 .project-template-dialog button{cursor:pointer;border:1px solid var(--input);border-radius:7px;background:var(--card);color:var(--foreground);padding:10px 12px;min-height:44px;font:600 12px/1.5 Inter,'Segoe UI',sans-serif;white-space:normal}
 .project-template-dialog input{width:100%;min-height:44px;border:1px solid var(--input);border-radius:7px;background:var(--card);color:var(--foreground);padding:10px 12px;min-width:0;font:inherit}
 .project-template-dialog :is(button,input,summary):focus-visible{outline:2px solid var(--ring);outline-offset:2px}
 .project-template-body{min-height:0;overflow:auto;overscroll-behavior:contain;padding:18px 22px 22px}
 .project-template-tools{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:end;gap:8px;margin-bottom:14px}
 .project-template-search-field{min-width:0}.project-template-search-field label{display:block;font-size:12px;font-weight:650;line-height:1.5;margin-bottom:6px}
 .project-template-save-disclosure{margin:0 0 14px;border:1px solid var(--border);border-radius:8px;background:var(--card);overflow:clip}
 .project-template-save-disclosure>summary{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:44px;padding:10px 12px;font-size:13px;font-weight:650;cursor:pointer;list-style:none}
 .project-template-save-disclosure>summary::-webkit-details-marker{display:none}
 .project-template-save-disclosure>summary::after{content:'+';font-size:18px;font-weight:400;color:var(--muted-foreground)}
 .project-template-save-disclosure[open]>summary::after{content:'−'}
 .project-template-save-disclosure:not([open])>.project-template-save{display:none}
 .project-template-save{padding:16px;border-top:1px solid var(--border)}
 .project-template-save label{display:block;font-weight:650;font-size:12px}
 .project-template-save>div{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}.project-template-save input{flex:1 1 200px;width:auto}
 .project-template-save small{display:block;margin-top:10px;color:var(--muted-foreground);font-size:12px;line-height:1.6}
 .project-template-dialog [data-template-status]{padding:0;margin:0 0 14px;font-size:12px;line-height:1.6;color:var(--muted-foreground);overflow-wrap:anywhere}
 .project-template-dialog [data-template-status]:empty{display:none}
 .project-template-dialog [data-template-status][data-error=true]{color:var(--destructive,#b34a4a)}
 .project-template-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,350px),1fr));align-items:start;gap:12px}
 .project-template-card{min-width:0;padding:16px;border:1px solid var(--border);border-radius:9px;background:var(--card);overflow-wrap:anywhere}
 .project-template-card:has(.project-template-preview:not([hidden])){grid-column:1/-1}
 .project-template-card h3{margin:0;font-size:16px;font-weight:750;line-height:1.4}
 .project-template-card p,.project-template-empty{font-size:12px;line-height:1.6;color:var(--muted-foreground)}
 .project-template-card>.project-image-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;align-items:start;gap:8px;margin-top:14px}
 .project-template-card>.project-image-actions>button{width:100%;min-width:0}
 .project-template-dialog .project-template-use{background:var(--foreground);color:var(--card);border-color:var(--foreground)}
 .project-template-more{min-width:0}.project-template-more>summary{display:flex;align-items:center;justify-content:center;min-height:44px;padding:10px 12px;border:1px solid var(--input);border-radius:7px;list-style:none;font-size:12px;font-weight:650;cursor:pointer}
 .project-template-more>summary::-webkit-details-marker{display:none}
 .project-template-more[open]{grid-column:1/-1}
 .project-template-more[open]>summary{justify-content:flex-start;background:var(--muted)}
 .project-template-more>div{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,150px),1fr));gap:8px;margin-top:8px;padding:10px;border:1px solid var(--border);border-radius:7px}
 .project-template-more:not([open])>div{display:none}
 .project-template-preview{min-width:0;margin-top:16px;padding-top:14px;border-top:1px solid var(--border)}
 .project-template-preview h4{margin:0 0 6px;font-size:12px;font-weight:650;color:var(--muted-foreground)}
 .project-template-structure{display:block;font-size:16px;line-height:1.5;font-weight:650}
 .project-template-overview{display:grid;grid-template-columns:minmax(0,.6fr) minmax(0,1.4fr);gap:14px;margin:14px 0}
 .project-template-overview dt{font-size:12px;line-height:1.5;color:var(--muted-foreground)}
 .project-template-overview dd{margin:4px 0 0;font-size:18px;font-weight:750;line-height:1.5;font-variant-numeric:tabular-nums}
 .project-template-items{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:10px;list-style:none;padding:0;margin:12px 0}
 .project-template-items li{min-width:0;padding:12px;border:1px solid var(--border);border-radius:7px;background:var(--background)}
 .project-template-items li>strong{display:block;font-size:13px;font-weight:650;line-height:1.5}
 .project-template-items li>span{display:block;margin-top:4px;font-size:12px;line-height:1.5;color:var(--muted-foreground);font-variant-numeric:tabular-nums}
 .project-template-items li>p{margin:6px 0 0}
 .project-template-items li:focus{outline:2px solid var(--ring);outline-offset:2px}
 .project-template-preview .project-template-apply-help{margin:14px 0 0;padding-top:12px;border-top:1px solid var(--border)}
 .project-template-dialog.is-working button:not([data-template-close]){opacity:.6;pointer-events:none}
 .project-template-dialog [hidden]{display:none!important}
 @media(max-width:600px){
  .project-template-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}
  .project-template-dialog header{padding:16px}.project-template-dialog h2{font-size:18px}
  .project-template-body{padding:14px}.project-template-tools{grid-template-columns:repeat(2,minmax(0,1fr))}
  .project-template-search-field{grid-column:1/-1}.project-template-dialog input{font-size:16px}
  .project-template-save{padding:12px}.project-template-save input{flex-basis:100%}.project-template-save button{width:100%}
  .project-template-card{padding:14px}.project-template-card>.project-image-actions{grid-template-columns:minmax(0,1fr) auto}
  .project-template-card .project-template-use{grid-column:1/-1}.project-template-more>div{grid-template-columns:minmax(0,1fr)}
 }
}
@media print{.project-templates-strip,.project-template-dialog,.project-template-dialog::backdrop{display:none!important}}
