.scene-purpose { display:block; color:var(--muted); font-size:13px; margin-top:2px }
#editor:has(#maker:not([hidden])) { width:min(925px,calc(100% - 32px)); border-radius:7px; border:0 }
#editor:has(#maker:not([hidden])) .dialog-inner { padding:0 }
#editor .close { z-index:2; background:#faf7edcf }
.desk { display:grid; grid-template-columns: .87fr 1.13fr; --desk-bg:#59352f; --desk-ink:#ffefe0; --accent:#974c3f; --sheet:#fff7e7 }
[data-theme=cabin] { --desk-bg:#304655; --desk-ink:#f1edda; --accent:#715c37; --sheet:#fff9e9 }
[data-theme=village] { --desk-bg:#67494d; --desk-ink:#fff0dd; --accent:#97555d; --sheet:#fff3e8 }
[data-theme=forest] { --desk-bg:#214b47; --desk-ink:#eff6dc; --accent:#427165; --sheet:#f2f6e8 }
[data-theme=photo] { --desk-bg:#3a4d48; --desk-ink:#fff4da; --accent:#486659; --sheet:#fbf7e8 }
.cover-desk { min-width:0; padding:38px 29px 31px; color:var(--desk-ink); background:radial-gradient(ellipse at 10% 0%,#ffffff16,transparent 70%),var(--desk-bg); display:flex; flex-direction:column; justify-content:center }
#editor-heading { font:normal clamp(37px,4.4vw,60px)/.97 var(--serif); letter-spacing:-.03em; margin:0 0 25px }
#editor-heading em { font-weight:400 }
.desk-print { position:relative; margin:7px 2px 30px; padding:8px 8px 0; background:#fff3d9; color:#3d473c; transform:rotate(-3deg); box-shadow:2px 9px 18px #17140f55 }
.desk-print::before { content:""; position:absolute; width:64px; height:18px; top:-8px; left:39%; background:#ddcba999; transform:rotate(4deg); z-index:1 }
#draft-cover { width:100%; aspect-ratio:1.54; object-fit:cover }
.desk-print figcaption { display:flex; justify-content:space-between; align-items:center; padding:8px 3px 10px; gap:4px; font:italic clamp(21px,2vw,28px)/1 var(--serif) }
.desk-cancel { font:19px/1 Georgia; letter-spacing:-4px; color:#9e8c73; padding-right:4px }
.cover-desk fieldset { margin:0; min-width:0 }
.cover-desk legend { font-weight:500; font-size:12px; margin-bottom:9px }
.cover-desk .options { gap:5px }
.cover-desk .options button { color:inherit; background:#ffffff0c; border-color:#ffffff52; padding:3px; line-height:1.5; font-size:11px }
.cover-desk .options button[aria-pressed=true] { outline:1px solid #fae4b9; border:1px solid #fae4b9; background:#fff2da22 }
.cover-desk .options img,.cover-desk .upload-img { height:32px }
.cover-desk .upload-img { color:#fff4da; background-color:#ffffff1c }
.writing-desk { min-width:0; padding:48px 31px 28px; background:#eae6d9 }
.writing-paper { position:relative; isolation:isolate; background:var(--sheet); box-shadow:0 4px 10px #50412517,0 0 0 1px #cbbfa366; padding:18px 22px 24px; color:#364d41 }
.paper-head { height:44px; display:flex; justify-content:space-between; align-items:flex-start; border-bottom:1px solid #bcab8860; margin-bottom:14px; color:var(--accent) }
.paper-head span { font:24px/1 Georgia,serif }
.paper-head img { height:36px; width:29px; transform:rotate(5deg) }
.ink-name { display:flex; align-items:baseline; gap:6px; font:italic 25px/1.3 var(--serif) }
.ink-name input,.writing-paper textarea { color:#263e35; border:0; border-radius:0; background:transparent; margin:0; padding:0; min-width:0; font:inherit }
.ink-name input { flex:1; width:0 }
.writing-paper :is(input,textarea):focus { outline:0; box-shadow:0 2px 0 var(--accent,#916451) }
.writing-paper :is(input,textarea):focus-visible { outline:1px dashed #a495774d; outline-offset:3px }
.ink-name input::placeholder,.writing-paper textarea::placeholder { color:#706e5d; opacity:.87 }
.writing-paper textarea { margin:10px 0 14px; width:100%; min-height:124px; font:22px/31px var(--serif); background:repeating-linear-gradient(to bottom,transparent 0 30px,#b8aa8c6b 30px 31px); resize:vertical }
.ink-name.sign { color:var(--accent); font-size:22px }
.writing-desk .form-bottom { margin:8px 1px 15px; gap:8px }
#extras,#recovery { border-block:1px solid #bcbfac; padding:10px 0 }
#extras summary,#recovery summary { cursor:pointer; font-size:13px; font-weight:600 }
#extras summary small { float:right; color:#526858; font-size:11px; font-weight:500; margin-top:2px }
.extras-content p,#mailbox p { font-size:13px; line-height:1.5; margin:9px 0 }
.extras-content p:empty { display:none }
.desk-action,.text-link { font-size:12px; font-family:var(--sans) }
.desk-action { display:inline-block; padding:6px 10px; border:1px solid #829689; border-radius:4px; margin:3px 4px 4px 0; background:#faf9f0 }
.text-link { padding:6px 1px; text-decoration:underline; text-underline-offset:3px }
.check { display:flex; align-items:center; gap:7px; margin-block:6px; font-weight:400 }
.check input { width:auto; margin:0 }
#extra-thumbs { display:flex; gap:6px; flex-wrap:wrap }
#extra-thumbs button { position:relative; padding:0; margin-block:5px }
#extra-thumbs img { width:54px; height:43px; object-fit:cover }
#extra-thumbs span { position:absolute; top:-3px; right:-3px; border-radius:50%; background:#24443c; color:white; padding:0 4px; line-height:15px }
#record-status { font-size:12px }
audio { display:block; width:100%; max-width:100%; margin-block:8px; height:38px }
#receipt-notice { font-size:11px; text-align:center; color:#d9e4d7; margin:4px 0 0 }
#enclosures { margin-top:18px; padding-top:10px; border-top:1px solid #b6ad94 }
#album { margin:0 }
#album img { width:100%; max-height:290px; object-fit:contain; background:#e5dfcf }
#album figcaption { display:flex; align-items:center; justify-content:center; gap:14px; font:12px/1.5 var(--sans) }
#album button { min-width:36px; min-height:34px }
#mail-list { padding:0; list-style:none; margin:14px 0 }
#mail-list li { display:flex; gap:10px; align-items:baseline; justify-content:space-between; border-bottom:1px solid #c9cec1; padding:8px 0; overflow-wrap:anywhere }
#mail-list small { flex-shrink:0; color:var(--muted) }
#mail-list a { text-decoration:underline }
#mailbox #recovery { margin:16px 0 0 }
#record[aria-pressed=true] { background:#774338; color:white }
#received-note[data-theme] .letter-ornament { color:var(--accent,#867149) }
#received-note[data-theme] .letter-paper { background-color:var(--sheet,#f8f1df); background-image:linear-gradient(to bottom,transparent 49%,#b3a08026 50%,transparent 56%) }
@media(max-width:700px) {
  #editor:has(#maker:not([hidden])) { width:min(465px,calc(100% - 16px)); max-height:calc(100dvh - 16px) }
  .desk { grid-template-columns:1fr }
  .cover-desk { display:grid; grid-template-columns:minmax(0,1fr) 36%; gap:10px 18px; align-items:center; padding:22px 20px 15px }
  #editor-heading { margin:0; font-size:38px; max-width:175px }
  .desk-print { margin:6px 13px 4px 0; padding:4px 4px 0; grid-column:2; grid-row:1 }
  .desk-print figcaption { padding:3px 0 5px; font-size:14px }
  .desk-cancel { display:none }
  .desk-print::before { width:32px; height:10px; top:-5px }
  .cover-desk fieldset { grid-column:1/-1 }
  .cover-desk legend { margin-bottom:4px }
  .cover-desk .options img,.cover-desk .upload-img { height:25px }
  .writing-desk { padding:18px 15px }
  .writing-paper { padding:13px 15px 18px }
  .writing-paper textarea { min-height:90px; height:90px; line-height:30px; background:repeating-linear-gradient(to bottom,transparent 0 29px,#b8aa8c6b 29px 30px) }
  .paper-head { height:31px; margin-bottom:8px }
  .paper-head img { height:28px; width:23px }
  .scene-purpose { font-size:12px }
  .footer-inner { flex-wrap:wrap; gap:8px; padding-block:12px }
  .footer-inner button { font-size:11px }
}

