/* A photographic worktable: the keepsake leads, controls stay within reach. */
#share-preview{--share-paper:#faf8f1;--share-ink:#183e32;--share-muted:#53675c;--share-line:#d9ded3;--share-bed:#e9ece3;box-sizing:border-box;width:min(960px,calc(100vw - 32px));height:min(760px,calc(100dvh - 32px));max-width:none;max-height:none;padding:0;overflow:hidden;border:1px solid var(--share-line);border-radius:24px;background:var(--share-paper);color:var(--share-ink);box-shadow:0 20px 72px #142c2430;color-scheme:light}
#share-preview .share-studio{display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:0;width:100%;height:100%;padding:0;text-align:left;min-height:0}
#share-preview .share-studio-header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0;padding:20px 24px;border-bottom:1px solid var(--share-line)}
#share-preview .share-brand{display:block;font:600 10px/1.5 var(--sans);letter-spacing:.15em;color:var(--share-muted)}
#share-preview #share-heading{font:600 28px/1.15 var(--sans);letter-spacing:-.01em;margin:4px 0 0;padding:0;color:var(--share-ink);text-wrap:balance}
#share-preview #share-close{position:static;flex:0 0 44px;width:44px;height:44px;min-height:44px;padding:0;border:1px solid var(--control-line);border-radius:50%;background:var(--control-paper);color:var(--control-ink);font:400 25px/1 var(--sans)}
#share-preview .share-studio-main{display:grid;grid-template-columns:minmax(0,1fr) 280px;min-height:0;overflow:hidden}
#share-preview .share-stage{position:relative;display:flex;align-items:center;justify-content:center;min-width:0;min-height:0;margin:0;padding:24px;background:var(--share-bed);overflow:hidden}
#share-preview #share-image{display:block;width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain;border-radius:0;margin:0;box-shadow:0 8px 28px #203b2520}
#share-preview #share-image:not([src]){visibility:hidden}
#share-preview .share-loading{display:none;position:absolute;width:32px;height:32px;border:2px solid var(--share-line);border-top-color:var(--share-ink);border-radius:50%;animation:share-turn .8s linear infinite}
#share-preview .share-stage[aria-busy="true"] .share-loading{display:block}
#share-preview .share-controls{min-height:0;min-width:0;padding:24px 20px;overflow:auto;overscroll-behavior:contain;border-left:1px solid var(--share-line)}
#share-preview #share-template-control{display:block;margin:0}
#share-preview #share-template-label{display:block;margin:0 0 12px;font:600 13px/1.4 var(--sans);letter-spacing:0;color:var(--share-muted)}
#share-preview .share-template-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
#share-preview .share-template-choices button{display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0;min-height:44px;padding:10px 4px;border:1px solid transparent;border-radius:10px;background:transparent;color:var(--share-ink);font:500 12px/1.3 var(--sans);overflow-wrap:anywhere;text-align:center}
#share-preview .share-template-choices button[aria-pressed="true"]{background:#e6ebdf;border-color:#82988a;box-shadow:0 0 0 1px #82988a}
#share-preview .share-template-mini{display:block;width:32px;height:40px;background:#f6f0e4;border:1px solid #d2d8c9;position:relative;overflow:hidden}
#share-preview .share-template-mini:before{content:"";position:absolute;inset:4px 4px 13px;background:#8a9e8b}
#share-preview .share-template-mini:after{content:"";position:absolute;left:4px;right:9px;bottom:7px;height:2px;background:#284b3c;box-shadow:0 4px 0 #a4afa0}
#share-preview .share-template-mini.magazine:before{inset:0;background:#718c7a}
#share-preview .share-template-mini.magazine:after{bottom:10px;background:#fbf8ed;box-shadow:0 4px 0 #fbf8ed}
#share-preview .share-template-mini.record{background:#244537}
#share-preview .share-template-mini.record:before{inset:6px 4px 10px;border-radius:50%;background:#c6cdb9}
#share-preview .share-template-mini.record:after{background:#f4eedf;box-shadow:none;bottom:4px}
#share-preview #share-details{margin-top:24px;border-top:1px solid var(--share-line)}
#share-preview #share-details summary{cursor:pointer;min-height:44px;padding:16px 0 8px;color:var(--share-muted);font:600 13px/1.4 var(--sans)}
#share-preview .share-detail-fields{display:grid;gap:20px;padding-top:12px}
#share-preview .share-options{display:grid;gap:0}
#share-preview .share-options label{display:flex;gap:10px;align-items:center;min-height:44px;margin:0;font:500 14px/1.4 var(--sans);color:var(--share-ink);text-align:left}
#share-preview .share-options input{width:18px;height:18px;min-height:18px;flex:0 0 18px;margin:0;accent-color:var(--share-ink)}
#share-preview #share-photo-control{display:grid;gap:8px;min-width:0;margin:0;font:600 13px/1.4 var(--sans);color:var(--share-muted);text-align:left}
#share-preview #share-photo{width:100%;min-width:0;min-height:44px;padding:10px 28px 10px 10px;border:1px solid var(--control-line);border-radius:8px;background:var(--control-paper);color:var(--control-ink);font:500 14px/1.4 var(--sans);text-align:left}
#share-preview .share-studio-footer{padding:16px 24px;border-top:1px solid var(--share-line);background:var(--share-paper)}
#share-preview .form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:0}
#share-preview .form-row button{min-height:48px;padding:12px 16px;border:1px solid var(--share-line);border-radius:10px;background:transparent;color:var(--share-ink);font:600 15px/1.3 var(--sans)}
#share-preview #share-send{background:var(--control-paper);border-color:var(--control-line);color:var(--control-ink)}
#share-preview #share-send:disabled{background:var(--control-disabled);color:var(--control-muted);border-color:#d1d9d1;opacity:1}
#share-preview .form-row button:disabled{opacity:.45;cursor:wait}
#share-preview #share-error{margin:0 0 10px;color:#8d352d;font:500 13px/1.5 var(--sans);text-align:center}
#share-preview [hidden]{display:none!important}
#share-preview :is(button,select,input,summary):focus-visible{outline:3px solid #43765e;outline-offset:3px}
@keyframes share-turn{to{transform:rotate(360deg)}}
@media(max-width:700px){
 #share-preview{width:calc(100vw - 16px);height:calc(100dvh - 24px);border-radius:20px}
 #share-preview .share-studio-header{padding:12px 16px;gap:8px}
 #share-preview #share-heading{font-size:23px}
 #share-preview .share-brand{font-size:9px}
 #share-preview .share-studio-main{display:flex;flex-direction:column;overflow:auto;overscroll-behavior:contain}
 #share-preview .share-stage{flex:1 0 200px;min-height:200px;padding:16px}
 #share-preview .share-controls{flex:0 0 auto;padding:12px 16px;overflow:visible;border-left:0;border-top:1px solid var(--share-line)}
 #share-preview #share-template-label{margin-bottom:8px;font-size:12px}
 #share-preview .share-template-choices button{flex-direction:row;justify-content:center;gap:6px;padding:8px 4px;font-size:12px!important;line-height:1.3!important}
 #share-preview .share-template-mini{flex:0 0 18px;width:18px;height:24px}
 #share-preview .share-template-mini:before{inset:3px 3px 8px}
 #share-preview .share-template-mini:after{left:3px;right:4px;bottom:4px;box-shadow:none}
 #share-preview .share-template-mini.magazine:before{inset:0}
 #share-preview .share-template-mini.record:before{inset:4px 2px 6px}
 #share-preview #share-details{margin-top:8px;border-top:0}
 #share-preview #share-details summary{padding:12px 0 8px}
 #share-preview .share-detail-fields{gap:8px;padding-top:4px}
 #share-preview .share-options{grid-template-columns:1fr 1fr;gap:8px}
 #share-preview .share-options label{font-size:13px!important}
 #share-preview .share-studio-footer{padding:12px 16px max(12px,env(safe-area-inset-bottom))}
 #share-preview .form-row{gap:8px}
 #share-preview .form-row button{min-height:44px;padding:10px 8px}
}
@media(prefers-reduced-motion:reduce){#share-preview .share-loading{animation:none}}
body:has(.app.reduce-motion) #share-preview .share-loading{animation:none}
/* Reset the app-wide 42px page-header sizing inside this dedicated dialog. */
#share-preview .share-studio-header{height:auto;min-height:80px}
#share-preview #share-heading{text-align:left}
#share-preview .share-template-choices button{overflow-wrap:normal;hyphens:auto}
@media(max-width:340px){#share-preview .share-template-mini{display:none}}
/* Give translated template names their own readable measure. */
#share-preview .share-template-choices button>span{min-width:0;overflow-wrap:anywhere}
@media(min-width:701px){
 #share-preview .share-template-choices{grid-template-columns:minmax(0,1fr)}
 #share-preview .share-template-choices button{flex-direction:row;justify-content:flex-start;gap:12px;padding:12px;text-align:left}
 #share-preview .share-template-mini{flex:0 0 32px}
}
@media(max-width:700px){html:lang(de) #share-preview .share-template-mini{display:none}}
