/* A small silver/plum postcard window, using only the personal photo catalogue. */
#hyd-postcard{position:fixed;inset:0;margin:auto;width:min(1040px,calc(100vw - 34px));max-width:none;max-height:calc(100dvh - 34px);overflow:auto;padding:4px;border:2px solid;border-color:#f1eaf6 #605168 #605168 #f1eaf6;border-radius:7px;background:#21162d;color:#f6edfa;box-shadow:0 5px 0 #0b0712,0 24px 90px #0009;rotate:0deg;transform:none;font:12px/1.5 Tahoma,sans-serif;color-scheme:dark}
#hyd-postcard::backdrop{background:#0b0714ba;backdrop-filter:blur(3px)}
#hyd-postcard .postcard-titlebar{display:flex;align-items:center;justify-content:space-between;gap:16px;position:sticky;top:-4px;z-index:2;padding:6px 8px;background:repeating-linear-gradient(0deg,#ffffff20 0 1px,transparent 1px 3px),linear-gradient(#e9e5ef,#b2aabb 48%,#cbc4d3);border:1px solid;border-color:#fff #7c7285 #7c7285 #fff;border-radius:3px 3px 0 0;color:#30213b;text-shadow:0 1px #fff9}
#hyd-postcard h2{display:flex;align-items:center;gap:8px;font:bold 12px/1.4 Tahoma,sans-serif;letter-spacing:0;margin:0;color:#30213b}
#hyd-postcard h2>span{font-size:19px;font-weight:400;line-height:1}
#hyd-postcard .postcard-close{flex:none;width:28px;height:27px;padding:0;font:20px/1 Tahoma,sans-serif;background:linear-gradient(#f6f1f9,#aa9bb8);color:#30213b;border:1px solid;border-color:#fff #65576f #65576f #fff;border-radius:3px;box-shadow:inset 0 1px #fff9}
#hyd-postcard .postcard-layout{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(260px,.8fr);align-items:start;gap:22px;padding:24px 21px}
#hyd-postcard .postcard-preview-panel{min-width:0;align-self:start;padding:14px 1px}
#hyd-postcard .postcard-paper{padding:5px;background:linear-gradient(130deg,#9883ab55,#31213f);border:1px solid #746080;box-shadow:4px 6px 0 #0d081680;rotate:0deg}
#hyd-postcard canvas{display:block;width:100%;height:auto;aspect-ratio:14/9;box-shadow:0 2px 8px #0007}
#hyd-postcard .postcard-preview-caption{margin:17px 0 0;text-align:center;font:italic 18px/1.35 Georgia,serif;color:#e4bdd6}
#hyd-postcard .postcard-form{display:flex;flex-direction:column;min-width:0;gap:5px;padding-left:20px;border-left:1px solid #665170}
#hyd-postcard fieldset{border:0;padding:0;margin:0 0 11px;min-width:0}
#hyd-postcard legend{padding:0;font:bold 11px/1.5 Tahoma,sans-serif;margin-bottom:7px;color:#f2e3fa}
#hyd-postcard .postcard-photos{display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));grid-auto-rows:max-content;align-content:start;gap:8px;min-height:0;max-height:280px;max-height:min(280px,34dvh);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;scroll-padding:5px;padding:5px}
#hyd-postcard .postcard-photos button{display:block;min-width:0;overflow:hidden;padding:3px;text-align:left;border:1px solid #82708f;border-radius:2px;background:#30223e;box-shadow:2px 2px #0c0810;color:#e8d9f0}
#hyd-postcard .postcard-photos img{display:block;width:100%;height:66px;object-fit:cover;filter:none}
#hyd-postcard .postcard-photos span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:10px/1.3 Tahoma,sans-serif;padding:5px 2px 2px}
#hyd-postcard .postcard-photos button[aria-pressed=true]{border-color:#efd2e9;box-shadow:0 0 0 1px #d998c2,inset 0 0 0 1px #fff1fa50;background:#5b3a61;color:#fff4fc}
#hyd-postcard .postcard-form>label{display:flex;align-items:baseline;gap:5px;color:#f1e4f9;font:11px/1.4 Tahoma,sans-serif;margin-top:5px}
#hyd-postcard .postcard-form>label span,#hyd-postcard output{color:#bfaccb;font-size:10px}
#hyd-postcard output{margin-left:auto;font-variant-numeric:tabular-nums}
#hyd-postcard .postcard-form>input,#hyd-postcard textarea{display:block;width:100%;min-width:0;min-height:34px;padding:8px 9px;border:1px solid;border-color:#100a18 #806b91 #806b91 #100a18;border-radius:3px;background:#150e20;color:#fff3ff;box-shadow:inset 0 2px 4px #0005;font:12px/1.5 Tahoma,sans-serif}
#hyd-postcard .postcard-form>input::placeholder,#hyd-postcard textarea::placeholder{color:#9f8fad;opacity:1}
#hyd-postcard textarea{min-height:104px;max-height:230px;resize:vertical}
#hyd-postcard .postcard-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:13px}
#hyd-postcard .postcard-actions button{flex:1 1 110px;min-height:36px;padding:7px 9px;border:1px solid;border-color:#eee1f8 #685079 #685079 #eee1f8;border-radius:4px;background:linear-gradient(#bd9dcf,#8d6aa7 49%,#72508c 51%,#9b76b4);color:#fff6ff;text-shadow:0 1px #443052;box-shadow:inset 0 1px #fff5,0 2px #0d0718;font:11px/1.35 Tahoma,sans-serif}
#hyd-postcard #postcard-share{background:linear-gradient(#594562,#37263f);border-color:#9e86ac #100a17 #100a17 #9e86ac}
#hyd-postcard #postcard-email{background:linear-gradient(#e4d7eb,#bd9dce 47%,#9b76ac 50%,#bea0cd);color:#261530;text-shadow:0 1px #ffffff60;font-weight:bold}
#hyd-postcard #postcard-share{flex-basis:100%}
#hyd-postcard [hidden]{display:none!important}
#hyd-postcard .postcard-sheet{position:relative;isolation:isolate}
#hyd-postcard .postcard-sticker-layer{position:absolute;inset:0;pointer-events:none}
#hyd-postcard .postcard-sticker-handle{position:absolute;padding:0;margin:0;border:1px solid transparent;border-radius:5px;box-shadow:none;background:transparent!important;pointer-events:auto;touch-action:none;cursor:grab;min-width:0;min-height:0;transition:none}
#hyd-postcard .postcard-sticker-handle[aria-pressed=true]{border-color:#6a426d;outline:2px dashed #f8edf8;outline-offset:2px}
#hyd-postcard .postcard-sticker-handle:active{cursor:grabbing;border-style:solid;box-shadow:none}
#hyd-postcard .postcard-sticker-handle:focus-visible{outline:3px solid #5e3478;outline-offset:3px}
#hyd-postcard .postcard-sticker-tray{margin:26px 0 0;padding:12px 13px;border:1px solid;border-color:#96819e #130c1a #130c1a #96819e;border-radius:5px;background:linear-gradient(#362940,#251a2f);box-shadow:inset 0 1px #fff1}
#hyd-postcard .postcard-sticker-tray legend{padding:0 6px;margin:0;font-size:11px;color:#f2e6f7}
#hyd-postcard #postcard-sticker-count{margin-left:10px;font-weight:normal;color:#b8a5c5;font-size:10px}
#hyd-postcard .postcard-sticker-palette{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:5px}
#hyd-postcard .postcard-sticker-palette button{padding:5px 2px;border:1px solid transparent;border-radius:6px;background:none;min-width:0;box-shadow:none;transition:background .12s,transform .12s}
#hyd-postcard .postcard-sticker-palette button:not(:disabled):hover{border-color:#9c84ac;background:#79628b40;transform:translateY(-2px)}
#hyd-postcard .postcard-sticker-palette img{display:block;width:100%;height:auto;max-width:62px;aspect-ratio:1;filter:drop-shadow(0 3px 2px #09041160)}
#hyd-postcard .postcard-sticker-controls{display:flex;align-items:center;flex-wrap:wrap;gap:5px;margin-top:12px;padding-top:10px;border-top:1px solid #73607e}
#hyd-postcard #postcard-selected-sticker{flex:1 1 120px;font-size:11px;color:#ebdcee}
#hyd-postcard .postcard-sticker-controls button{min-width:28px;min-height:28px;padding:3px 7px;border:1px solid;border-color:#f3ecf5 #51455c #51455c #f3ecf5;border-radius:3px;background:linear-gradient(#eee6f0,#baacc5 48%,#a999b6 50%,#cbbdd4);color:#30203e;text-shadow:0 1px #fff8;font:12px Tahoma,sans-serif;box-shadow:0 1px #100a17}
#hyd-postcard button:not(:disabled):active{border-style:inset;box-shadow:inset 0 2px 3px #0005}
#hyd-postcard button:disabled{opacity:.42;cursor:default}
#hyd-postcard :is(button,input,textarea,a):focus-visible{outline:2px solid #f2c6e7;outline-offset:3px}
#hyd-postcard #postcard-open{align-self:flex-start;color:#edc4e1;font:11px/1.5 Tahoma,sans-serif;text-underline-offset:3px;margin-top:4px;padding:3px 0}
#hyd-postcard .postcard-close:focus-visible{outline-color:#553564;outline-offset:1px}
#hyd-postcard .postcard-hint{font:10px/1.5 Tahoma,sans-serif;color:#c2afce;margin:5px 0 0}
#hyd-postcard #postcard-status{min-height:30px;color:#edc9e0;font:11px/1.5 Tahoma,sans-serif;margin:3px 0 0}
#hyd-postcard .postcard-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:760px){#hyd-postcard{width:calc(100vw - 24px);max-height:calc(100dvh - 24px)}#hyd-postcard .postcard-layout{grid-template-columns:1fr;gap:16px;padding:15px}#hyd-postcard .postcard-preview-panel{padding:2px 4px 0}#hyd-postcard .postcard-preview-caption{margin-top:10px;font-size:16px}#hyd-postcard .postcard-form{padding:15px 0 0;border-left:0;border-top:1px solid #665170}#hyd-postcard .postcard-photos{max-height:240px;max-height:min(240px,32dvh)}#hyd-postcard .postcard-photos img{height:66px}#hyd-postcard textarea{min-height:88px}#hyd-postcard .postcard-form>input,#hyd-postcard textarea{font-size:16px}#hyd-postcard .postcard-titlebar{gap:8px}#hyd-postcard h2{font-size:11px}}
@media(max-width:440px){#hyd-postcard .postcard-sticker-palette{grid-template-columns:repeat(4,minmax(0,1fr))}#hyd-postcard .postcard-sticker-palette img{max-width:50px;margin:auto}#hyd-postcard .postcard-sticker-tray{padding:8px}#hyd-postcard .postcard-sticker-controls button{min-height:34px;min-width:34px}}
@media(prefers-reduced-motion:reduce){#hyd-postcard .postcard-sticker-palette button{transition:none;transform:none!important}}
/* A readable shelf for the detailed local souvenir renders. */
#hyd-postcard .postcard-sticker-palette{grid-template-columns:repeat(5,minmax(0,1fr));gap:8px 5px}
#hyd-postcard .postcard-sticker-palette button{padding:5px 2px 6px;display:flex;flex-direction:column;align-items:center;gap:3px}
#hyd-postcard .postcard-sticker-palette img{max-width:88px;margin:auto}
#hyd-postcard .postcard-sticker-palette button>span{font:9px/1.25 Tahoma,sans-serif;color:var(--paper-text,#f3e6f8);text-align:center}
@media(max-width:440px){#hyd-postcard .postcard-sticker-palette{grid-template-columns:repeat(4,minmax(0,1fr))}#hyd-postcard .postcard-sticker-palette img{max-width:68px}}
#hyd-postcard .postcard-sticker-palette [data-kind=stamp] img{filter:brightness(3)}
/* Photo choice belongs beside the preview, not below the sticker shelf. */
#hyd-postcard .postcard-photo-tools{display:flex;align-items:center;gap:7px;margin:0 0 12px;padding:0;min-height:32px}
#hyd-postcard .postcard-photo-tools button{min-height:32px;min-width:32px;padding:4px 10px;border:1px solid #777;border-top-color:#eee;border-left-color:#ddd;border-radius:4px;background:linear-gradient(#f6f6f6,#c8c8c8);color:#242424;font:12px var(--desktop-font,Tahoma,sans-serif);box-shadow:0 1px 1px #0004;text-shadow:0 1px #fff}
#hyd-postcard #postcard-change-photo{margin-right:auto}
#hyd-postcard #postcard-photo-position{font:11px var(--desktop-font,Tahoma,sans-serif);color:var(--paper-muted,#cbc5cd);white-space:nowrap;font-variant-numeric:tabular-nums}
#hyd-postcard #postcard-photo-picker{margin:0 0 14px;padding:10px;border:1px solid var(--paper-edge,#858089);background:var(--paper-panel,#333038);border-radius:4px}
#hyd-postcard #postcard-photo-picker .postcard-photos{grid-template-columns:repeat(auto-fill,minmax(90px,1fr));max-height:220px}
#hyd-postcard #postcard-photo-picker legend{padding:0 5px}
