.template-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.template-card{padding:8px;overflow:hidden}.template-card strong{font-size:11px;white-space:nowrap}.template-card small{line-height:1.6;font-size:10px}.composition-mini{display:block;width:100%;height:auto;aspect-ratio:210/297;object-fit:contain;background:white;border:1px solid #e3e7de;margin-bottom:9px}.legacy-designs{margin:0 0 22px;font-size:12px;line-height:2;color:#6c7c65}.legacy-designs button{margin:7px 4px 0 0}.frame-settings{border:1px solid #dce3d5;border-radius:8px;margin:12px 0;padding:12px;background:#fafcf8}.frame-settings summary{font-size:12px;font-weight:600;cursor:pointer}.frame-settings summary small{float:right;color:#8b9982;font-size:10px;font-weight:400}.frame-settings .fields{margin-top:16px}.frame-settings .field{font-size:11px;min-width:0}.frame-settings .field input{min-width:0;width:100%}.flow-check{display:flex;gap:8px;align-items:center;font-size:12px;color:#65785b;margin:14px 0}.flow-check input{width:auto}.portrait-tools{display:flex;align-items:center;gap:15px;margin:12px 0 18px}.portrait-mini{width:56px;height:70px;object-fit:contain;border:1px solid #dce3d5;background:white}.panel h3{font-size:13px;font-weight:600;margin:26px 0 10px}.fields{min-width:0}.field input[type=number]{min-width:0;width:100%}

.reference-grid{max-height:640px;overflow-y:auto;padding-right:3px}.reference-grid .template-card strong{white-space:normal;line-height:1.5}.reference-filters{display:flex;gap:8px;margin:12px 0}.reference-filters input{min-width:0;flex:1}.reference-filters select{max-width:110px}.prototype-note,.layout-notice{font-size:11px;line-height:1.8;color:#65785b;background:#f1f5ec;padding:10px 12px;border-radius:7px}.layout-notice{margin:0 0 12px}.reference-grid .composition-mini{min-height:120px}
/* Roomier gallery is a first-class tab, independent from layout controls. */
.template-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:11px}.template-card{padding:10px;border-radius:10px}.template-card strong,.template-card small{white-space:normal;overflow-wrap:anywhere}.template-card strong{font-size:12px;line-height:1.6;color:#304c37}.template-card small{font-size:11px;line-height:1.7;color:#586f5e}.reference-grid{max-height:none;overflow:visible;padding:0}.reference-grid .composition-mini{min-height:0}.reference-filters{position:sticky;top:63px;background:#f8faf8;padding:8px 0;z-index:1}.reference-filters input,.reference-filters select{font-size:13px}.prototype-note{font-size:12px;color:#536b58}.panel h3{font-size:15px;color:#294e37}.frame-settings summary{font-size:13px;color:#3d5c44}.frame-settings summary small{color:#5c715f;font-size:11px}.frame-settings .field{font-size:12px;color:#536757}.layout-control>.caption{font-size:11px;color:#536958;margin:0 0 6px}.layout-control>.field{margin-bottom:5px}.flow-check{color:#536a59}
@media(max-width:1190px){.template-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.template-card{padding:8px}}
@media(max-width:960px){.template-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:600px){.template-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.template-card{padding:10px}.template-card strong{font-size:12px}.template-card small{font-size:11px}.reference-filters{top:56px}.reference-filters select{max-width:108px}.frame-settings .fields{grid-template-columns:1fr 1fr}}
