/* poster-maker: two-column studio (input/preview | settings), single column on phones */
.rp-poster{display:grid;gap:24px;padding:16px;background:var(--card);color:var(--text);border:1px solid var(--border);border-radius:16px;box-shadow:var(--shadow-1);text-align:left;font-size:14px;line-height:1.5}
@media (min-width:768px){.rp-poster{grid-template-columns:minmax(0,1fr) 320px;padding:24px}}
.rp-poster *,.rp-poster *::before,.rp-poster *::after{box-sizing:border-box}
.rp-poster [hidden]{display:none!important}
.rp-poster .rp-col{display:flex;flex-direction:column;gap:12px;min-width:0}
.rp-poster .rp-settings{gap:20px}
.rp-poster .rp-stack{display:flex;flex-direction:column;gap:20px}
.rp-poster .rp-step{display:flex;align-items:center;gap:8px;margin:0;font-size:16px;font-weight:600;line-height:1.2;color:var(--text)}
.rp-poster .rp-step-n{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:var(--primary);color:#fff;font-size:12px}
.rp-poster .rp-icon{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.rp-poster .rp-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.rp-poster .rp-drop{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;width:100%;aspect-ratio:4/3;padding:24px;border:2px dashed var(--border);border-radius:var(--radius);background:transparent;color:var(--text);font:inherit;text-align:center;cursor:pointer;transition:border-color .15s,background .15s}
.rp-poster .rp-drop:hover,.rp-poster .rp-drop.is-drag{border-color:var(--primary);background:var(--primary-soft)}
.rp-poster .rp-drop .rp-icon{width:40px;height:40px;color:var(--muted);stroke-width:1.5}
.rp-poster .rp-drop-title{font-size:16px;font-weight:600}
.rp-poster .rp-drop-hint{color:var(--muted)}
.rp-poster .rp-preview{position:relative;width:100%;overflow:hidden;border:1px solid var(--border);border-radius:8px;background:repeating-conic-gradient(#f4f4f5 0% 25%,#fff 0% 50%) 0 0/16px 16px}
.rp-poster .rp-preview canvas{position:absolute;inset:0;width:100%;height:100%}
.rp-poster .rp-grid{position:absolute;inset:0;display:grid}
.rp-poster .rp-grid>div{position:relative;border:1px dashed rgba(255,255,255,.9);box-shadow:inset 0 0 0 1px rgba(0,0,0,.25)}
.rp-poster .rp-grid span{position:absolute;left:4px;top:4px;padding:0 4px;border-radius:4px;background:rgba(0,0,0,.6);color:#fff;font-size:10px;font-weight:600;line-height:1.6}
.rp-poster .rp-below{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;color:var(--muted)}
.rp-poster .rp-field{display:flex;flex-direction:column;gap:8px}
.rp-poster .rp-label{font-weight:600;color:var(--text)}
.rp-poster .rp-row{display:flex;align-items:center;justify-content:space-between;gap:8px}
.rp-poster .rp-num{font-variant-numeric:tabular-nums}
.rp-poster .rp-hint{margin:0;font-size:12px;color:var(--muted)}
.rp-poster .rp-seg{display:flex;flex-wrap:wrap;gap:6px}
.rp-poster .rp-seg-btn{min-height:44px;padding:8px 12px;border:1px solid var(--border);border-radius:8px;background:var(--card);color:var(--text);font:inherit;cursor:pointer;transition:background .15s,border-color .15s}
.rp-poster .rp-seg-btn:hover{background:var(--primary-soft)}
.rp-poster .rp-seg-btn[aria-checked=true]{border-color:var(--primary);background:var(--primary);color:#fff}
.rp-poster button:disabled,.rp-poster input:disabled{opacity:.5;cursor:not-allowed}
.rp-poster button:focus-visible,.rp-poster input:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
.rp-poster .rp-range{width:100%;height:44px;margin:0;accent-color:var(--primary);cursor:pointer}
.rp-poster .rp-toggle{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;cursor:pointer}
.rp-poster .rp-toggle .rp-hint{display:block}
.rp-poster .rp-switch{appearance:none;-webkit-appearance:none;position:relative;flex:none;width:44px;height:24px;margin:10px 0;border-radius:12px;background:var(--border);cursor:pointer;transition:background .15s}
.rp-poster .rp-switch::after{content:"";position:absolute;top:2px;left:2px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:var(--shadow-1);transition:transform .15s}
.rp-poster .rp-switch:checked{background:var(--primary)}
.rp-poster .rp-switch:checked::after{transform:translateX(20px)}
.rp-poster .rp-stats{display:grid;grid-template-columns:auto auto;gap:4px 12px;margin:0;padding:12px;border-radius:8px;background:var(--bg)}
.rp-poster .rp-stats dt{color:var(--muted)}
.rp-poster .rp-stats dd{margin:0;text-align:right;font-weight:600;font-variant-numeric:tabular-nums}
.rp-poster .rp-notice{display:flex;gap:8px;margin:0;padding:12px;border:1px solid;border-radius:8px}
.rp-poster .rp-notice .rp-icon{margin-top:2px}
.rp-poster .rp-info{border-color:#bae6fd;background:#f0f9ff;color:#0c4a6e}
.rp-poster .rp-warn{border-color:#fcd34d;background:#fffbeb;color:#78350f}
.rp-poster .rp-export{display:flex;flex-direction:column;gap:12px;padding-top:20px;border-top:1px solid var(--border)}
.rp-poster .rp-btn,.rp-poster .rp-btn-ghost{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:8px 16px;border-radius:8px;font:inherit;font-weight:600;cursor:pointer;transition:background .15s}
.rp-poster .rp-btn{width:100%;min-height:48px;border:0;background:var(--primary);color:#fff;font-size:16px}
.rp-poster .rp-btn:hover:not(:disabled){background:var(--primary-hover)}
.rp-poster .rp-btn.is-busy .rp-icon{animation:rp-pulse 1s ease-in-out infinite}
.rp-poster .rp-btn-ghost{border:1px solid var(--border);background:var(--card);color:var(--text)}
.rp-poster .rp-btn-ghost:hover{background:var(--primary-soft)}
.rp-poster .rp-progress{display:flex;flex-direction:column;gap:4px}
.rp-poster .rp-track{height:8px;overflow:hidden;border-radius:4px;background:var(--primary-soft)}
.rp-poster .rp-bar{width:0;height:100%;background:var(--primary);transition:width .2s}
.rp-poster .rp-error{margin:0;color:#b91c1c}
.rp-poster .rp-skel{height:56px;border-radius:8px;background:var(--bg);animation:rp-pulse 1.5s ease-in-out infinite}
@keyframes rp-pulse{50%{opacity:.5}}
@media (max-width:640px){.rp-poster{padding:12px;border-radius:12px}.rp-poster .rp-drop{aspect-ratio:auto;min-height:220px}}
