body[data-view="office"] {
  color:#fff0d1; background:#142e27;
  background-image:radial-gradient(circle,#e5be7640 0 1px,transparent 1.6px),radial-gradient(ellipse at 50% 0,#2d4f41,transparent 75%);
  background-size:27px 27px,100% 100%;
}
body[data-view="office"] main { width:100%; }
body[data-view="office"] .topbar { background:#142e27; color:#fff1d8; }
body[data-view="office"] footer { color:#eee2c5; border-color:#d3b47955; }
body[data-view="office"] footer span:first-child { color:#f2cb82; }
.postcard-desk { --preview-card:clamp(190px,57svh,520px); color-scheme:light; padding:clamp(15px,3vw,32px) 0 44px; }
.desk-header,.desk-editor { width:min(calc(100% - 24px),760px); margin-inline:auto; }
.desk-header { display:flex; align-items:end; justify-content:space-between; gap:18px; margin-bottom:16px; }
.desk-header h1 { font-size:clamp(1.14rem,2.6vw,1.9rem); line-height:1.02; margin-top:5px; color:#fff0d1; letter-spacing:-.04em; }
.desk-header a { color:#f2cb82; font-size:.86rem; text-decoration:underline; text-underline-offset:3px; }
.desk-office-mark {
  display:grid; gap:4px; text-align:center; padding:8px 14px;
  border:1px solid #c59f60; outline:1px solid #c59f6055; outline-offset:3px;
  color:#f2cb82; font:700 clamp(.83rem,1.5vw,1.1rem)/1.05 Georgia,serif; transform:rotate(-4deg);
}
.desk-office-mark small { font:600 .62rem/1.1 "Trebuchet MS",sans-serif; text-transform:uppercase; letter-spacing:.13em; white-space:nowrap; }
.desk-live { position:sticky; top:0; z-index:2; width:100%; }
.desk-preview-frame {
  position:relative; isolation:isolate; overflow:hidden; display:grid; justify-items:center;
  width:100%; padding:9px 12px 10px; border-block:1px solid #b58d4a82;
  background:radial-gradient(ellipse at center,#35594a,#1d372f 78%);
  box-shadow:0 9px 19px #0a1d19a0;
}
.desk-preview-decoration::before,.desk-preview-decoration::after {
  content:"❄"; position:absolute; z-index:-1; top:18%; color:#f2cc8060;
  font:clamp(35px,9vw,118px)/1 Georgia,serif; text-shadow:0 .86em .02em #f2cc802c; transform:rotate(-16deg);
}
.desk-preview-decoration::before { left:clamp(6px,11vw,17%); }
.desk-preview-decoration::after { right:clamp(6px,11vw,17%); transform:rotate(16deg); }

.desk-board { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px; align-items:center; width:100%; }
.desk-preview-frame .desk-board { width:min(100%,var(--preview-card)); }
.desk-board > .desk-flips { flex-direction:column; gap:4px; margin:0; }
.desk-board > .desk-flips button { min-width:36px; padding:6px 4px; font-size:.7rem; }

.desk-card { position:relative; width:100%; aspect-ratio:1.55; container-type:inline-size; perspective:1100px; text-align:left; }
.desk-face {
  position:absolute; inset:0; border-radius:6px; overflow:hidden; backface-visibility:hidden;
  box-shadow:0 3px 9px #29190c65; transition:transform .48s cubic-bezier(.22,.68,.3,1);
}
.desk-front { transform:rotateY(0); background:var(--card-edge,#453c35); color:#fff1cb; }
.desk-back { transform:rotateY(-180deg); }
.desk-card[data-side="back"] .desk-front { transform:rotateY(180deg); }
.desk-card[data-side="back"] .desk-back { transform:rotateY(0); }
.desk-cover { position:absolute; inset:2.4%; overflow:hidden; border-radius:2px; }
.desk-cover .card-art { position:absolute; inset:0; }
.desk-cover .card-art { background-position:center 48%; }
.desk-front::after {
  content:""; position:absolute; z-index:2; inset:2.4%; border:1px solid #fff3cba6; pointer-events:none;
}
.desk-card:not([data-margin="artwork"]) { --front-inset:4%; }
.desk-card[data-margin] .desk-cover,.desk-card[data-margin] .desk-front::after { inset:var(--front-inset,2.4%); }
.desk-border-swatch { width:100%; min-height:28px; border:1px solid #af935d; border-radius:3px; }
.desk-border-swatch[data-margin="artwork"] { background:var(--card-edge,#51362d); }
[data-margin="candy"] .desk-front,.desk-border-swatch[data-margin="candy"] {
  background:repeating-linear-gradient(135deg,#93282c 0 5px,#fff0d7 5px 12px,#a44840 12px 14px,#fff0d7 14px 20px);
}
[data-margin="pine"] .desk-front,[data-back-border="pine"] .desk-back,.desk-border-swatch[data-margin="pine"] {
  background:repeating-linear-gradient(45deg,#1c4b39 0 6px,#36705a 6px 9px,#d7ab62 9px 10px,#204e3e 10px 17px);
}
[data-margin="snow"] .desk-front,[data-back-border="snow"] .desk-back,.desk-border-swatch[data-margin="snow"] {
  background:radial-gradient(circle,#f7faff 0 1.1px,transparent 1.6px) 0 0 / 8px 8px,#719fb7;
}
[data-margin="ribbon"] .desk-front,[data-back-border="ribbon"] .desk-back,.desk-border-swatch[data-margin="ribbon"] {
  background:repeating-linear-gradient(90deg,#85333d 0 7px,#ab4554 7px 10px,#e0b979 10px 12px,#742635 12px 19px);
}
[data-margin="stars"] .desk-front,[data-back-border="stars"] .desk-back,.desk-border-swatch[data-margin="stars"] {
  background:radial-gradient(circle,#f6ce7a 0 1.1px,transparent 1.7px) 0 0 / 11px 11px,
    radial-gradient(circle,#ffe4ab 0 .6px,transparent 1px) 4px 5px / 11px 11px,#202c50;
}
.desk-border-swatch[data-margin="airmail"],[data-back-border="airmail"] .desk-back {
  background:repeating-linear-gradient(133deg,#902f38 0 7px,#f9efd7 7px 14px,#315043 14px 21px,#f9efd7 21px 28px);
}
.desk-border-swatch[data-margin="plain"] { background:#f9edcf; }
.desk-back {
  display:grid; grid-template-columns:61% 39%; padding:5% 5% 10%; gap:0;
  isolation:isolate; background:#f6e9ce; color:#272232;
}
.desk-back::before {
  content:""; position:absolute; z-index:-1; inset:var(--back-inset,0); border-radius:2px;
  background:repeating-linear-gradient(0deg,#c39a5a0c 0 1px,transparent 1px 4px),radial-gradient(ellipse at 35% 40%,#fff9ea,#f5e5c6);
  border:1px solid #d9b989;
}
.desk-card[data-back-border]:not([data-back-border="plain"]) { --back-inset:2.8%; }
.desk-note,.desk-address { display:flex; flex-direction:column; min-height:0; min-width:0; }
.desk-note { padding-right:8%; border-right:1px solid #af8c69; }
.desk-address { padding-left:10%; gap:4%; }
.desk-address > div:not(.desk-postal-row) { min-height:0; overflow:hidden; }
.desk-paper-label { display:block; color:#794139; text-transform:uppercase; letter-spacing:.13em; font-size:clamp(7px,2.15cqw,13px); font-weight:700; line-height:1.1; }
.desk-back p {
  color:#272232; margin:4% 0 0; font:italic var(--ink-size, 4.3cqw)/1.18 Georgia,serif;
  overflow-wrap:anywhere; white-space:pre-wrap;
}
.desk-note p { flex:1 1 0; min-height:0; overflow:hidden; }
.desk-message-text { display:block; }
.desk-note > .desk-paper-label { flex:none; }
.desk-message-nav { display:flex; justify-content:flex-end; gap:4px; margin-top:auto; padding-top:3px; }
.desk-message-nav button {
  width:clamp(21px,6cqw,32px); height:clamp(18px,5cqw,27px); padding:0;
  color:#fff1d2; background:#315447; border:1px solid #b68c50; border-radius:4px; line-height:1;
}
.desk-message-nav button:hover { background:#486b59; }
.desk-address p { font-size:3.5cqw; padding-bottom:3%; border-bottom:1px solid #b58e6c85; }
.desk-card[data-font="script"] .desk-back p,.desk-font-letter[data-font="script"] { font-family:"Segoe Script","Apple Chancery","URW Chancery L","Comic Sans MS",Georgia,cursive; letter-spacing:-.025em; }
.desk-card[data-font="script"] .desk-note p { font-size:calc(var(--ink-size) * 1.08); line-height:1.17; }
.desk-card[data-font="script"] .desk-address p { font-size:3.8cqw; }
.desk-card[data-font="type"] .desk-back p { font-family:"Courier New",monospace; font-style:normal; font-size:calc(var(--ink-size) * .86); }
.desk-card[data-font="type"] .desk-address p { font-size:3.1cqw; }
.desk-back .desk-placeholder { color:#665344; }
.desk-postal-row {
  display:grid; grid-template-columns:1fr 48%; align-items:center; gap:2%; flex:none; margin-bottom:3%;
}
.desk-postage { position:relative; }
.desk-postmark {
  position:relative; isolation:isolate; width:100%; aspect-ratio:1; border-radius:50%;
  display:flex; flex-direction:column; justify-content:center; align-items:center; gap:.25cqw;
  color:#72594e; border:1px solid #80685a; outline:1px solid #80685a70; outline-offset:-3px;
  text-align:center; transform:rotate(-13deg); text-transform:uppercase;
}
.desk-postmark::after {
  content:""; position:absolute; z-index:-1; top:32%; left:85%; width:47%; height:34%;
  border-block:1px solid #80685a9c; border-radius:42%;
  background:linear-gradient(0deg,transparent 47%,#80685a9c 47% 53%,transparent 53%);
}
.desk-postmark strong { max-width:84%; font:700 1.55cqw/1.02 Georgia,serif; }
.desk-postmark span { font:normal 2.55cqw/1 Georgia,serif; }
.desk-postmark small { max-width:75%; font:700 1.23cqw/1.02 Georgia,serif; letter-spacing:.04em; }
.desk-stamp {
  display:block; position:relative; container-type:inline-size;
  width:100%; aspect-ratio:77 / 100; overflow:hidden;
  background:#fbf1d8; color:#312a24; text-align:center;
  mask:
    radial-gradient(circle closest-side,#000 91%,transparent) 0 0 / 10% 12% repeat-x,
    radial-gradient(circle closest-side,#000 91%,transparent) 0 100% / 10% 12% repeat-x,
    radial-gradient(circle closest-side,#000 91%,transparent) 0 0 / 12% 8.33% repeat-y,
    radial-gradient(circle closest-side,#000 91%,transparent) 100% 0 / 12% 8.33% repeat-y,
    linear-gradient(#000 0 0) center / 89% 90% no-repeat;
}
.desk-stamp-face {
  position:absolute; inset:9%; display:grid; grid-template-rows:auto minmax(0,1fr) auto;
  padding:3%; background:var(--stamp-paper); border:1px solid #60473545;
}
.desk-stamp .desk-stamp-name { display:block; color:#312a24; font:700 14cqw/1.05 Georgia,serif; white-space:nowrap; }
.desk-stamp .desk-stamp-picture { display:block; width:100%; height:100%; min-height:0; object-fit:contain; mix-blend-mode:multiply; }
.desk-stamp-code { display:flex; justify-content:space-between; padding-inline:5%; font:700 11cqw/1 Georgia,serif; }
.desk-stickers { position:absolute; display:flex; gap:1.2cqw; pointer-events:none; }
.desk-front-stickers { top:6%; right:6%; }
.desk-back-stickers { bottom:4%; left:5%; }
.desk-stickers .desk-sticker-art {
  width:var(--sticker-size,8.2cqw); height:var(--sticker-size,8.2cqw); object-fit:contain; transform:rotate(-9deg);
  filter:drop-shadow(0 2px 2px #43211970);
}
[data-sticker-size="small"] { --sticker-size:6cqw; }
[data-sticker-size="big"] { --sticker-size:11cqw; }
[data-sticker-size="big"] .desk-back { padding-bottom:13%; }
.desk-stickers .desk-sticker-art:nth-child(even) { transform:rotate(9deg); }
.desk-note,.desk-address > div:not(.desk-postal-row) { position:relative; }
.desk-back p { position:relative; }
.desk-caret-anchor { display:inline; visibility:hidden; }
.desk-writing-pen { position:absolute; width:0; height:0; pointer-events:none; }
.desk-writing-pen::after {
  content:""; position:absolute; left:-.55cqw; bottom:0; height:4cqw; width:1.1cqw;
  background:linear-gradient(#a84239 0 62%,#d4ab59 62% 82%,#3d2630 82%);
  clip-path:polygon(0 0,100% 0,100% 80%,50% 100%,0 80%);
  transform-origin:50% 100%; animation:desk-pen .65s ease-out both;
}
@keyframes desk-pen { 0% { transform:rotate(38deg); opacity:1; } 32% { transform:rotate(49deg); } 68% { opacity:1; } 100% { transform:translate(2px,-2px) rotate(40deg); opacity:0; } }
.desk-flips { display:flex; justify-content:center; gap:6px; margin-top:10px; }
.desk-flips button,.desk-dialog-heading button { border:1px solid #6e573a68; background:#fff2d6; color:#473423; border-radius:6px; padding:6px 12px; font-size:.8rem; font-weight:700; }
.desk-flips button[aria-pressed="true"] { background:#f0c982; color:#3c271b; border-color:#9d713b; }
.desk-editor {
  container-type:inline-size;
  min-width:0; margin-top:17px; background:#203d33; border:1px solid #b5956a88; border-radius:12px;
  padding:clamp(12px, 2.5vw, 26px); box-shadow:0 9px 24px #66412a27;
}
.desk-editor fieldset { margin:0 0 19px; padding:0 0 16px; border-bottom:1px solid #b9955b88; }
.desk-editor legend { color:#fff0d1; font:700 clamp(1.02rem, 1.8vw, 1.25rem)/1.15 Georgia,serif; margin-bottom:9px; }
.desk-choices,.desk-stamp-choices,.desk-margin-choices,.desk-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.desk-choice { position:relative; display:block; margin:0; min-width:0; }
.desk-choice input { position:absolute; opacity:0; }
.desk-choice > span {
  display:grid; height:100%; align-content:start; text-align:center; gap:6px; cursor:pointer;
  padding:5px; border:1px solid #c8b089; border-radius:7px; background:#f8e9cc;
}
.desk-choice input:checked + span { border-color:#834837; box-shadow:inset 0 0 0 1px #834837; background:#f2dbac; }
.desk-choice input:focus-visible + span,.postcard-desk :focus-visible { outline:2px solid #2b6957; outline-offset:2px; }
.desk-choice .card-art { aspect-ratio:1.55; border:2px solid var(--card-color); border-radius:4px; }
.desk-choice > span > strong { color:#5a3c2f; font-size:clamp(.68rem, 1.15vw, .83rem); line-height:1.14; }
.desk-stamp-choices { grid-template-columns:repeat(3,minmax(0,1fr)); }
.desk-stamp-choices .desk-choice > span { justify-items:center; padding:7px 5px; }
.desk-stamp-choices .desk-stamp { width:min(100%,70px); }
.desk-no-stamp { width:max-content; max-width:100%; margin-top:7px; }
.desk-no-stamp > span { padding:6px 12px; color:#5a3c2f; font-size:.8rem; }
.desk-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
.desk-editor label:not(.desk-choice) { display:grid; gap:5px; color:#fff0d1; font-size:.85rem; margin-bottom:10px; }
.desk-editor input:not([type="radio"],[type="checkbox"]),.desk-editor textarea,.desk-editor select {
  width:100%; min-width:0; min-height:40px; padding:8px; border:1px solid #bd9b73; border-radius:6px;
  background:#fffbef; color:#302220; font-size:1rem; font-weight:400;
}
.desk-editor textarea { resize:vertical; }
.desk-editor .desk-handwriting { border:0; padding:0; margin:15px 0 0; }
.desk-font-choices { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
.desk-font-choices .desk-choice > span { padding:6px; }
.desk-sticker-sides { justify-content:start; margin:0 0 8px; }
.desk-sticker-options { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:6px; }
@media(max-width:450px) { .desk-sticker-options { grid-template-columns:repeat(4,minmax(0,1fr)); } }
.desk-sticker-options button { display:grid; place-items:center; min-width:0; min-height:44px; padding:4px; background:#fbedd0; border:1px solid #ccb08a; border-radius:8px; }
.desk-sticker-options .desk-sticker-art { width:min(100%,60px); height:auto; aspect-ratio:1; object-fit:contain; filter:drop-shadow(0 1px 1px #67463270); }
.desk-sticker-options button[aria-pressed="true"] { background:#f0c982; border-color:#8b513a; }
.desk-feedback { display:block; font-size:.77rem; color:#ffdc92; margin-top:5px; }
.desk-feedback:empty { display:none; }
.desk-actions { display:flex; flex-wrap:wrap; gap:7px; }
.desk-actions .button { flex:1 1 135px; padding-inline:9px; white-space:nowrap; }
.desk-share-note { color:#e8d8b7; font-size:.78rem; margin-top:8px; }
.desk-dialog {
  width:min(740px,calc(100% - 24px)); max-height:calc(100% - 24px); overflow:auto; color:#fff4d9;
  background:#29463b; border:1px solid #d5b47d; border-radius:12px; padding:clamp(10px,3vw,24px);
}
.desk-dialog::backdrop { background:#101c16bf; }
.desk-dialog-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:12px; }
.desk-dialog-heading h2 { font-size:clamp(1.2rem,3.5vw,1.9rem); }
.desk-dialog-heading button { font-size:1.15rem; }
.desk-received { margin-top:18px; }
.desk-received-gift:not(:empty) { margin-top:16px; }
.desk-card[data-font="letter"] .desk-back p { font-style:normal; }
.desk-note p:focus-visible { outline-offset:-2px; }
.desk-font-letter {
  display:block; padding:6px 4px; text-align:left; border-radius:5px; color:#45352e;
  border:1px solid #c4a277; border-left:3px solid #a75847; background:#fff2da;
  font:italic clamp(.72rem,1.75vw,1rem)/1.3 Georgia,serif;
}
.desk-font-letter[data-font="letter"] { font-style:normal; }
.desk-font-letter[data-font="type"] { font-family:"Courier New",monospace; font-style:normal; }
.desk-editor :is(input,textarea,select,button) { scroll-margin-top:calc(var(--preview-card) / 1.55 + 60px); }
.postcard-desk :focus-visible { outline-color:#f3c878; }
.desk-message-options { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:4px 10px; }
.desk-editor .desk-message-options label { display:flex; align-items:center; margin:0; }
.desk-message-options input { accent-color:#b35b42; }
.desk-message-options output { font-size:.75rem; color:#f3d59a; }
.desk-message-warning { margin-top:8px; padding:7px 9px; border:1px solid #c19757; border-radius:5px; color:#ffe3a9; background:#4b3c26; font-size:.8rem; }
.desk-editor .desk-sticker-size { border:0; padding:0; margin:12px 0 0; }
.desk-size-options { display:flex; flex-wrap:wrap; gap:6px; }
.desk-size-options .desk-choice > span { padding:6px 12px; color:#5a3c2f; }
@media (min-width:740px) {
  .desk-header,.desk-layout { width:min(calc(100% - 32px),1330px); margin-inline:auto; }
  .desk-layout { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,1fr); align-items:start; gap:clamp(12px,2vw,26px); }
  .desk-live { top:12px; height:calc(100svh - 24px); display:grid; place-items:center; }
  .desk-preview-frame { width:min(100%,calc(155svh - 18px)); border:1px solid #b58d4a82; border-radius:9px; padding:8px; }
  .desk-preview-frame .desk-board { width:100%; }
  .desk-editor { width:100%; margin:0; }
  .desk-editor :is(input,textarea,select,button) { scroll-margin-top:12px; }
}
@media (max-width:739px) {
  .desk-header { align-items:start; }
  .desk-office-mark { padding:5px 7px; }
  .desk-flips button { padding:5px 10px; }
  .desk-flips { margin-top:6px; }
}
@media (max-width:400px) {
  .desk-header { flex-wrap:wrap; gap:9px; }
  .desk-office-mark { transform:none; }
  .desk-fields { gap:6px; }
}

.desk-stamp-festive .desk-stamp-name,.desk-stamp-festive .desk-stamp-code { color:#fff5d9; }
.desk-stamp-festive .desk-stamp-picture { mix-blend-mode:normal; }
.desk-stamp-pair { grid-template-columns:37% 61%; padding-top:1.2cqw; }
.desk-stamp-pair .desk-postage { width:72%; justify-self:end; }
.desk-stamp-pair .desk-postage .desk-stamp:first-child { transform:rotate(8deg); }
.desk-stamp-pair .desk-postage .desk-stamp-festive { position:absolute; top:-15%; left:-61%; width:94%; transform:rotate(-12deg); }
.desk-stamp-pair .desk-postmark { transform:translateX(-8%) translateY(20%) rotate(-13deg); }
.desk-stamp-pair .desk-postmark strong { font-size:1.25cqw; }
.desk-stamp-pair .desk-postmark small { font-size:1cqw; }
.desk-export { margin-top:19px; }
.desk-export h2 { font-size:1.1rem; }
.desk-export .actions { margin-top:8px; }
.desk-export [role="status"] { display:block; margin-top:7px; font-size:.83rem; }

.desk-enclosure-choices {
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px;
}
.desk-enclosure-art {
  display:block; width:min(100%,66px); aspect-ratio:1; overflow:hidden; border-radius:4px;
  justify-self:center; background:#f4e4ca;
}
.desk-enclosure-art img {
  display:block; width:100%; height:100%; object-fit:cover;
}
.desk-enclosure-choices .desk-choice > span {
  grid-template-columns:minmax(0,1fr);
  padding:7px;
}
.desk-enclosure-choices .desk-choice > span > strong {
  font-size:.8rem; line-height:1.2; text-wrap:balance;
}
.desk-enclosure-reveal { margin-top:12px; }
.desk-enclosure-reveal .gift-surprise img {
  display:block; width:min(40vw,154px); height:auto; margin:0 auto 9px; border-radius:10px;
}
@container (max-width:284px) {
  .desk-enclosure-choices { gap:6px; }
  .desk-enclosure-choices .desk-choice > span { padding:5px 3px; }
  .desk-enclosure-choices .desk-choice > span > strong { font-size:.72rem; overflow-wrap:anywhere; }
}
@container (min-width:490px) {
  .desk-enclosure-choices,.desk-stamp-choices { grid-template-columns:repeat(6,minmax(0,1fr)); }
}
