/* Compact landscape cards and a spacious, responsive style reference dialog. */
html .workflow-app .style-gallery-note{font-size:12px;margin:0 0 12px;color:var(--studio-muted)}
html .workflow-app .style-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:12px;margin-bottom:20px}
html .workflow-app .style-tile{position:relative;min-width:0}
html .workflow-app .style-cards .style-choice{position:relative;display:block;width:100%;height:auto;aspect-ratio:1.45;padding:0;overflow:hidden;border:1px solid var(--studio-line-strong)!important;border-radius:10px!important;background:var(--studio-control);color:var(--studio-text);translate:none!important;transform:none!important;box-shadow:none!important}
html .workflow-app .style-choice .style-sample{display:block;width:100%;height:100%;object-fit:cover}
html .workflow-app .style-card-caption{position:absolute;inset:auto 0 0;padding:20px 9px 9px;text-align:left;color:var(--studio-text)}
html .workflow-app .has-image .style-card-caption{background:linear-gradient(transparent,rgba(0,0,0,.88));color:#fff}
html .workflow-app .style-card-caption strong{display:block;padding:0;font-size:13px;line-height:19px;color:inherit}
html .workflow-app .style-card-caption small{display:block;font-size:10px;line-height:15px;color:inherit;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html .workflow-app .style-image-status{position:absolute;inset:34px 6px auto;font-size:11px;text-align:center;color:var(--studio-muted)}
html .workflow-app [data-style-card=custom] .style-image-status{font-size:23px;line-height:1}
html .workflow-app .style-choice[aria-pressed=true]{outline:2px solid var(--studio-accent);outline-offset:2px}
html .workflow-app .style-cards .style-detail-trigger{position:absolute;left:7px;top:7px;z-index:1;padding:1px 7px;min-height:24px;font-size:11px;line-height:20px;border:1px solid #ffffffa6!important;border-radius:6px!important;color:#fff!important;background:#171717dc!important;box-shadow:none!important;translate:none!important;transform:none!important}
html .workflow-app .style-selected{top:7px;right:7px;width:22px;height:22px;line-height:22px;border:1px solid #555;background:#fff;color:#171717}
html .workflow-app .style-choice:focus-visible,html .workflow-app .style-detail-trigger:focus-visible{outline:2px solid var(--studio-accent);outline-offset:3px}
html #styleDetailDialog{width:min(1320px,calc(100vw - 32px));height:min(800px,calc(100dvh - 32px));max-height:calc(100dvh - 32px);padding:22px;border:1px solid var(--studio-line-strong);background:var(--studio-panel);color:var(--studio-text);border-radius:16px;overflow:auto}
html #styleDetailDialog[open]{display:flex;flex-direction:column;gap:18px}
html #styleDetailDialog [hidden],html #styleZoomDialog [hidden]{display:none!important}
html .style-detail-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-shrink:0}
html .style-detail-heading h2{font-size:22px;margin:0 0 4px}
html .style-detail-heading p{margin:0;font-size:13px;color:var(--studio-muted)}
html #closeStyleDetail{display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;margin:0;padding:0;border:1px solid var(--studio-line-strong);border-radius:10px!important;background:var(--studio-control);color:var(--studio-text)}
html #closeStyleDetail svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;pointer-events:none}
html .style-detail-body{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(340px,1fr);gap:22px;flex:1;min-height:0}
html .style-detail-visual{display:flex;flex-direction:column;gap:12px;min-width:0;min-height:0}
html .style-detail-visual figure{position:relative;display:grid;place-items:center;flex:1;min-height:0;margin:0;overflow:hidden;border:1px solid var(--studio-line-strong);border-radius:13px;background:var(--studio-control)}
html #styleDetailImage{display:block;position:absolute;width:100%;height:100%;object-fit:contain}
html #styleReferenceCaption{position:absolute;inset:auto 0 0;padding:40px 18px 16px;background:linear-gradient(transparent,#000c);color:white;pointer-events:none}
html #styleReferenceCaption strong,html #styleReferenceCaption span{display:block}
html #styleReferenceCaption strong{font-size:14px}
html #styleReferenceCaption span{font-size:12px;margin-top:3px}
html #zoomStyleImage{position:absolute;right:12px;top:12px;border:1px solid #ffffffa6;background:#171717dc;color:white;font-size:12px;padding:7px 10px}
html #styleImageState{font-size:15px;padding:22px;text-align:center;color:var(--studio-muted)}
html .style-detail-navigation{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-shrink:0}
html .style-detail-navigation button,html #copyStylePrompt{font-size:12px;padding:7px 12px;border:1px solid var(--studio-line-strong);background:var(--studio-control);color:var(--studio-text)}
html #styleDetailPosition{font-size:12px;color:var(--studio-muted)}
html .style-detail-prompts{display:flex;flex-direction:column;min-height:0;min-width:0;padding:18px;border:1px solid var(--studio-line-strong);border-radius:13px;background:var(--studio-control)}
html .style-detail-prompts h3{font-size:15px;margin:0 0 6px}
html .style-detail-help{font-size:12px;color:var(--studio-muted);margin:0 0 12px;line-height:1.65}
html .style-detail-tabs{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));padding:4px;gap:2px;border:1px solid var(--studio-line);border-radius:10px;margin-bottom:12px;background:var(--studio-field)}
html .style-detail-tabs button{min-width:0;font-size:12px;padding:7px 1px;border:1px solid transparent;background:transparent;color:var(--studio-muted);white-space:nowrap;border-radius:7px}
html .style-detail-tabs button[aria-selected=true]{border-color:var(--studio-line-strong);background:var(--studio-panel);color:var(--studio-text);font-weight:600}
html #stylePromptPanel{display:flex;flex:1;min-height:100px}
html #styleDetailPrompt,html #stylePurposePrompt{width:100%;height:100%;min-height:0;resize:none;line-height:1.9;font-size:14px;padding:14px;background:var(--studio-field);color:var(--studio-text);border:1px solid var(--studio-line-strong);border-radius:10px}
html .style-copy-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:10px}
html #stylePromptCount,html #styleCopyStatus{font-size:12px;color:var(--studio-muted)}
html #styleCopyStatus{min-height:18px;margin-top:4px}
html .style-detail-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0}
html .style-detail-footer p{font-size:12px;color:var(--studio-muted);margin:0}
html #applyStyleDetail{padding:10px 22px;white-space:nowrap;background:var(--studio-text);color:var(--studio-panel);border:1px solid var(--studio-line-strong)}
html #styleZoomDialog{width:min(1200px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:12px;background:var(--studio-panel);color:var(--studio-text)}
html #closeStyleZoom{display:block;margin:0 0 10px auto}
html #styleZoomImage{display:block;width:100%;max-height:calc(100dvh - 115px);object-fit:contain}
@media(max-width:760px){
 html #styleDetailDialog{padding:14px;height:auto}
 html .style-detail-body{grid-template-columns:minmax(0,1fr);gap:14px}
 html .style-detail-visual figure{flex:none;height:34dvh;min-height:180px}
 html .style-detail-prompts{min-height:360px;padding:12px}
 html #stylePromptPanel{min-height:180px}
 html .style-detail-footer{align-items:flex-start}
 html .style-detail-footer p{font-size:11px}
 html .workflow-app .style-cards{grid-template-columns:repeat(auto-fill,minmax(125px,1fr));gap:10px}
}
@media(max-height:650px) and (min-width:761px){html #styleDetailDialog{padding:14px}html #styleDetailDialog[open]{gap:10px}html .style-detail-prompts{padding:12px}html .style-detail-help{margin-bottom:8px}}
