/* Template selection uses the same contained scrolling as the category editor. */
#createForm .creator-preset-picker,
#createForm .creator-preset-editor{display:flex;flex:1;flex-direction:column;min-width:0;min-height:0;overflow:hidden;background:var(--panel);color:var(--text)}
#createForm .creator-preset-picker[hidden],
#createForm .creator-preset-editor[hidden]{display:none!important}
#createForm .creator-preset-scroll{flex:1;min-height:0;min-width:0;overflow-y:auto;overscroll-behavior:contain;padding:24px 26px 26px;scroll-padding:24px}
#createForm .creator-preset-heading{margin:0 0 22px;max-width:630px}
#createForm .creator-preset-heading h2{font-size:27px;line-height:1.2;letter-spacing:-.7px;color:var(--text);margin:0 0 9px}
#createForm .creator-preset-heading h2:focus{outline:none}
#createForm .creator-preset-heading p{font-size:13px;line-height:1.65;color:var(--muted);margin:0}
#createForm .creator-preset-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:stretch}
#createForm .creator-preset-card{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:0;min-width:0;width:100%;padding:20px;text-align:left;border:1px solid var(--line)!important;border-radius:8px;background:var(--panel);color:var(--text);font:inherit;overflow-wrap:anywhere;transition:border-color .15s,background-color .15s,box-shadow .15s}
#createForm .creator-preset-card::after{content:'';position:absolute;top:17px;right:17px;width:19px;height:19px;border:1px solid var(--theme-border);border-radius:50%;background:var(--theme-input);pointer-events:none}
#createForm .creator-preset-card:not(:disabled):hover{border-color:var(--theme-accent);background:var(--theme-hover)}
#createForm .creator-preset-card[aria-pressed=true]{border-color:var(--theme-selected-border);background:var(--theme-selected);box-shadow:inset 0 0 0 1px var(--theme-selected-border)}
#createForm .creator-preset-card[aria-pressed=true]::after{content:'✓';display:grid;place-items:center;background:var(--brand-red);border-color:var(--brand-red);color:#fff;font-size:12px;line-height:1;font-weight:750}
#createForm .creator-preset-card:focus-visible{outline:2px solid var(--theme-accent);outline-offset:3px}
#createForm .creator-preset-intro{display:flex;align-items:center;gap:12px;width:100%;min-height:112px;margin:0 0 12px}
#createForm .creator-preset-art{display:block;flex:0 0 112px;width:112px;height:112px;overflow:hidden}
#createForm .creator-preset-art .interface-art{display:block;width:100%;height:100%;max-width:none;object-fit:contain}
#createForm .creator-preset-copy{display:block;flex:1;min-width:0;padding-right:8px}
#createForm .creator-preset-category{display:block;margin:0 0 7px;font-size:9px;line-height:1.5;font-weight:700;letter-spacing:1.1px;text-transform:uppercase;color:var(--theme-accent)}
#createForm .creator-preset-title{display:block;font-size:18px;line-height:1.25;letter-spacing:-.35px;font-weight:700;color:var(--text)}
#createForm .creator-preset-card p{font-size:12px;line-height:1.65;margin:0 0 16px;color:var(--muted)}
#createForm .creator-preset-highlights{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 16px;max-width:100%}
#createForm .creator-preset-highlights span{display:inline-block;padding:4px 7px;border:1px solid var(--line);border-radius:6px;background:var(--theme-input);color:var(--muted);font-size:10px;line-height:1.4;font-weight:550;max-width:100%}
#createForm .creator-preset-payment{display:block;padding-top:12px;margin-top:auto;border-top:1px solid var(--line);color:var(--muted);font-size:11px;line-height:1.6;width:100%}
#createForm .creator-preset-card:disabled{opacity:1;cursor:not-allowed;background:var(--panel2);border-style:dashed}
#createForm .creator-preset-card:disabled::after{display:none}
#createForm .creator-preset-card:disabled .creator-preset-category{color:var(--muted)}
#createForm .creator-preset-card:disabled .creator-preset-art{opacity:.55}
#createForm .creator-preset-unavailable{display:block;font-size:11px;font-weight:600;line-height:1.5;color:var(--theme-warning-text);margin:12px 0 0}
#createForm .creator-preset-replace{margin:18px 0 0;padding:13px 15px;border:1px solid var(--line);border-radius:10px;background:var(--panel2);color:var(--muted);font-size:12px;line-height:1.65}
#createForm .creator-preset-actions{display:flex;flex:none;flex-wrap:wrap;align-items:center;gap:10px;padding:16px 26px;border-top:1px solid var(--line);background:var(--panel);box-shadow:0 -5px 20px #00000008}
#createForm #creatorPresetSelection{flex:1;min-width:140px;font-size:12px;line-height:1.5;color:var(--muted);margin:0}
#createForm .creator-preset-actions .btn{min-height:44px;white-space:normal;text-align:center;font-size:12px;line-height:1.4;padding:11px 15px}
#createForm .creator-preset-actions #creatorPresetApply{margin-left:auto}
#createForm .creator-preset-summary{display:flex;flex:none;align-items:center;justify-content:space-between;gap:14px;padding:13px 26px;border-bottom:1px solid var(--line);background:var(--panel2)}
#createForm .creator-preset-summary>div{flex:1;min-width:0}
#createForm #creatorPresetArt{display:block;flex:0 0 44px;width:44px;height:44px}
#createForm .creator-preset-summary-art{display:block;width:44px;height:44px;object-fit:contain}
#createForm .creator-preset-summary small{display:block;font-size:9px;line-height:1.5;letter-spacing:1px;font-weight:650;text-transform:uppercase;color:var(--muted);margin-bottom:3px}
#createForm .creator-preset-summary strong{display:block;font-size:13px;line-height:1.4;font-weight:650;color:var(--text);overflow-wrap:anywhere}
#createForm .creator-preset-summary .btn{flex:none;white-space:normal;min-height:36px;font-size:11px;padding:8px 11px}
#createForm .creator-preset-editor>p{flex:none;margin:0;padding:13px 26px 0;font-size:12px;line-height:1.5;color:var(--muted)}
#createForm .creator-preset-editor>p.creator-edit-notice{margin:12px 26px 0;padding:10px 12px;font-size:11px}
#createForm .creator-payment-rule{padding:14px 16px;border:1px solid var(--theme-warning-border);border-radius:11px;background:var(--theme-warning-bg);color:var(--theme-warning-text);font-size:12px;line-height:1.65;margin:16px 0}
#createForm .creator-payment-rule strong{display:block;margin:0 0 4px;font-size:12px;font-weight:650}
#createForm .creator-payment-rule p{color:inherit;font-size:12px;line-height:1.65;margin:0}
#createForm .creator-stage-heading{display:flex;align-items:center;gap:14px}
#createForm .creator-stage-heading>div{flex:1;min-width:0}
#createForm .creator-stage-heading .creator-stage-art{display:block;flex:0 0 64px;width:64px;height:64px;object-fit:contain}
@media(max-width:600px){
 #createForm .creator-preset-scroll{padding:20px 17px;scroll-padding:20px}
 #createForm .creator-preset-heading{margin-bottom:18px}
 #createForm .creator-preset-heading h2{font-size:25px}
 #createForm .creator-preset-heading p{font-size:12px}
 #createForm .creator-preset-grid{grid-template-columns:minmax(0,1fr);gap:12px}
 #createForm .creator-preset-card{padding:18px}
 #createForm .creator-preset-intro{gap:10px;min-height:88px;margin-bottom:10px}
 #createForm .creator-preset-art{flex-basis:88px;width:88px;height:88px}
 #createForm .creator-preset-title{font-size:18px}
 #createForm .creator-preset-copy{padding-right:6px}
 #createForm .creator-preset-category{font-size:8px;letter-spacing:.8px;margin-bottom:6px}
 #createForm .creator-preset-card p{margin-bottom:13px}
 #createForm .creator-preset-highlights{margin-bottom:13px}
 #createForm .creator-preset-actions{padding:12px 17px max(12px,env(safe-area-inset-bottom,0px));gap:8px}
 #createForm #creatorPresetSelection{flex-basis:100%;font-size:11px}
 #createForm .creator-preset-actions .btn{flex:1;min-width:0;font-size:11px;padding:10px 12px}
 #createForm .creator-preset-summary{padding:11px 17px;gap:10px}
 #createForm .creator-preset-summary strong{font-size:12px}
 #createForm .creator-preset-summary .btn{max-width:110px;font-size:10px;padding:8px 10px}
 #createForm #creatorPresetArt{flex-basis:36px;width:36px;height:36px}
 #createForm .creator-preset-summary-art{width:36px;height:36px}
 #createForm .creator-stage-heading{gap:10px}
 #createForm .creator-stage-heading .creator-stage-art{flex-basis:52px;width:52px;height:52px}
 #createForm .creator-preset-editor>p{padding:11px 17px 0;font-size:11px}
 #createForm .creator-preset-editor>p.creator-edit-notice{margin:10px 17px 0;font-size:10px}
}
@media(max-width:360px){
 #createForm .creator-preset-intro{gap:8px}
 #createForm .creator-preset-art{flex-basis:72px;width:72px;height:80px}
 #createForm .creator-preset-title{font-size:17px}
 #createForm .creator-preset-summary{gap:8px}
 #createForm .creator-preset-summary .btn{max-width:88px}
}
@media(max-width:600px) and (max-height:640px){
 #createForm .creator-preset-editor>p:not(.creator-edit-notice){display:none}
 #createForm .creator-preset-summary{padding-top:8px;padding-bottom:8px}
 #createForm .creator-preset-summary small{display:none}
 #createForm .creator-preset-actions{padding-top:9px;padding-bottom:max(9px,env(safe-area-inset-bottom,0px))}
}
@media(prefers-reduced-motion:reduce){#createForm .creator-preset-card{transition:none}}
