.studio-fields { margin: 1.5rem 0; padding: 12px 18px; border: 1px solid var(--line); display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 16px; }
.studio-fields legend { font: 1.3rem Georgia,serif; padding:0 6px; }
.studio-wide { grid-column:1/-1; }
.studio-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.studio-actions button, .editor-tools button { min-height:44px; }
.editor-tools { display:flex; justify-content:flex-start; gap:.4rem; flex-wrap:wrap; margin:12px 0; }
.editor-tools button:disabled { opacity:.5; }
.editor-preview { container-type:inline-size; }
.editor-preview .sample { align-self:center; }
.editor-preview[data-device="mobile"] .sample.photo { width:min(100%,260px); }
.editor-preview[data-device="desktop"] .sample.photo { width:100%; max-width:460px; }
.editor-preview .editor-note, .stationery-note { white-space:pre-line; overflow-wrap:anywhere; text-align:center; font: 1.05rem/1.55 Georgia,serif; }
[data-font="classic"] .sample.photo h2, [data-font="classic"] .paper h1 { font-family:Georgia,serif; font-style:normal; }
[data-font="roman"] .sample.photo h2, [data-font="roman"] .paper h1 { font-family:Palatino,'Times New Roman',serif; font-style:normal; letter-spacing:.025em; }
[data-font="italic"] .sample.photo h2, [data-font="italic"] .paper h1 { font-family:Baskerville,Georgia,serif; font-style:italic; }
[data-ink="walnut"] { --custom-ink:#483428; }
[data-ink="forest"] { --custom-ink:#254b3b; }
[data-ink="claret"] { --custom-ink:#692d41; }
[data-ink]:not([data-ink="theme"]) .sample-copy, [data-ink]:not([data-ink="theme"]) .paper h1 { color:var(--custom-ink)!important; }
[data-size="small"] .sample.photo h2 { font-size:clamp(12px,6cqw,38px); }
[data-size="large"] .sample.photo h2 { font-size:clamp(18px,9.7cqw,58px); }
.sample.photo .sample-copy.long-name h2 { font-size:clamp(10px,4.4cqw,30px); }
@media(max-width:540px) { .studio-fields { grid-template-columns:1fr; } .editor-preview { position:static; } }
[data-surface="paper"] .sample.photo {
  background: #fcfaf3;
  aspect-ratio: 4/5;
  border: 1px solid #cfc5b2;
  outline: 1px solid #d6c9b4;
  outline-offset: -12px;
  --copy-x: 50%; --copy-y: 52%; --copy-w: 72%;
}
[data-surface="paper"] .sample.photo::before {
  display: block; content: ''; position: absolute; inset: 7% 8% auto auto; width: 13%; aspect-ratio: 4/5;
  background: url(/assets/stamp.webp) center/contain no-repeat; z-index: 0; transform: rotate(4deg);
}
[data-surface="paper"] .sample.photo::after {
  content:''; position:absolute; width:12%; aspect-ratio:1; left:44%; bottom:12%;
  background:url(/assets/seal.webp) center/contain no-repeat; pointer-events:none;
}
.studio-guest-details { margin-block:12px; text-align:left; }
.studio-guest-details summary { cursor:pointer; padding-block:8px; }
.studio-guest-details h3 { margin:12px 0 4px; }
.studio-guest-details p { white-space:pre-line; overflow-wrap:anywhere; margin:0 0 8px; }

.studio-page {
  --studio-border:#ddd0c0;
  --studio-sheet:#fffcf6;
  --studio-ink:#40322c;
  color:var(--studio-ink);
  padding-block:10px 40px;
}
.studio-heading { padding:0 0 21px; border-bottom:1px solid var(--studio-border); }
.studio-heading a { display:inline-flex; align-items:center; min-height:44px; font-size:13px; }
.studio-heading h1 { font:400 clamp(34px,6vw,59px)/1.08 Baskervville,Georgia,serif; margin:4px 0 0; }
.studio-workspace.editor-grid {
  display:grid; grid-template-columns:minmax(0,.96fr) minmax(0,1.04fr); gap:clamp(20px,4vw,48px);
  max-width:none; align-items:start; margin-top:26px;
}
.studio-workspace #editor,.studio-workspace .editor-preview {
  min-width:0; width:100%; max-width:none; margin:0; border:1px solid var(--studio-border);
  box-shadow:none; background:var(--studio-sheet); padding:clamp(15px,3vw,30px);
}
.studio-workspace #editor h2 { margin:0 0 10px; font:400 29px/1.15 Baskervville,Georgia,serif; }
.studio-workspace #editor label { display:block; color:var(--studio-ink); font-size:14px; }
.studio-workspace #editor label.inv-check { display:flex; }
.studio-workspace #editor :is(input:not([type="checkbox"]),select,textarea) {
  border:1px solid #bfae9e; color:#382b25; background:#fffefa; min-height:44px;
}
.studio-workspace .editor-preview { position:sticky; top:12px; background:#f1e7da; }
.studio-preview-options { text-align:center; }
.studio-preview-options h2 { margin:15px 0 12px; font:400 clamp(22px,3.1vw,36px)/1.12 Baskervville,Georgia,serif; }
.studio-switch { display:inline-flex; justify-content:center; flex-wrap:wrap; gap:4px; padding:3px; border:1px solid var(--studio-border); background:#fcf7ee; }
.studio-switch button { min-height:44px; padding:6px 14px; border:0; border-radius:0; color:var(--studio-ink); background:transparent; }
.studio-switch button[aria-pressed="true"] { background:#503d34; color:#fffaf2; }
.studio-closed-preview {
  position:relative; isolation:isolate; display:block; width:min(100%,285px); aspect-ratio:2/3; max-width:none;
  margin:0 auto; padding:0; overflow:hidden; border:1px solid #917463; border-radius:0; background:#dec8b9;
  box-shadow:0 12px 24px #533c2a29;
}
.studio-closed-preview img { display:block; width:100%; height:100%; object-fit:cover; }
.studio-closed-preview > span {
  position:absolute; inset:auto 10px 12px; padding:10px 4px; color:#49352c;
  border:1px solid #917463; background:#fff9ec; font:500 15px/1.3 Georgia,serif;
}
.studio-workspace .studio-preview-size { margin:12px auto 8px; width:min(100%,285px); }
.studio-workspace .sample.photo { margin:0 auto; }
.studio-workspace .editor-preview[data-preview-mode="cover"] .editor-note { display:none; }
@media(max-width:780px) {
  .studio-workspace.editor-grid { grid-template-columns:minmax(0,1fr); gap:18px; margin-top:18px; }
  .studio-workspace .editor-preview { position:static; }
}
.publish-controls { margin-top:14px; }
.publish-controls details { margin-top:14px; }
.publish-controls summary { cursor:pointer; padding-block:8px; }
.publish-controls input { max-width:380px; }
