/* Compact navigation and stable phone-sized image areas. */
.site-header #size-toggle {display:none}
.site-header .header-actions {gap:10px}
#scene-caption {background:var(--paper);border:2px solid var(--teal);border-radius:18px;padding:14px 20px;text-align:center;font-weight:700}
.message-choice {font-size:clamp(16px,4.15vw,23px);padding:16px 12px;white-space:nowrap}
.message-choice[aria-pressed=true]::before {margin-right:6px}
#photo-upload-state {position:absolute;inset:0;display:grid;place-items:center;background:#e2eddf;overflow:hidden;padding:18px}
#photo-upload-state[hidden] {display:none}
.upload-fill {position:absolute;inset:auto 0 0;height:var(--uploaded,0%);background:#b5d2bb;transition:height .15s linear}
.upload-copy {position:relative;color:#214d42;font-size:clamp(18px,4.5vw,27px);font-weight:750;text-wrap:balance;text-align:center}
#live-preview {position:relative;width:100%;height:100%}
#library-view {padding-top:18px}
#library-view .library-account-panel {margin-top:28px;padding:20px;background:var(--paper);border-radius:20px}
.library-heading[hidden],.library-tools[hidden],#library-drag-hint[hidden],.filtered-out {display:none!important}
.saved-card-open {cursor:grab}
.saved-card-open img {object-fit:cover;object-position:center top}
.saved-card-edit {position:absolute;bottom:14px;left:14px;width:44px;height:44px;display:grid;place-items:center;border:1px solid #b7a78e;border-radius:50%;background:#fffaf1;color:#742e38;cursor:pointer;padding:8px}
.saved-card-edit svg {fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.library-photo-stage {touch-action:pan-y pinch-zoom}
#library-recovery {margin:0 0 18px}
#library-recovery-status:empty,.recent-card-state:empty {display:none}
#result-view {padding-top:12px}
#result-view .result-grid {display:flex;flex-direction:column;gap:20px;align-items:center}
#result-view .result-print {order:-1;margin:0;width:100%;display:flex;justify-content:center;transform:none;background:none;padding:0;box-shadow:none}
#result-view .result-print>.result-image {display:block;width:auto;height:auto;max-width:100%;max-height:var(--result-photo-height,calc(100svh - 200px));object-fit:contain;transform:none;cursor:zoom-in;transition:none}
#result-view .result-grid>div {width:min(100%,700px);text-align:center}
#result-view .intro {font-size:20px;margin:0 0 16px}
.result-photo-dialog {position:fixed;inset:0;max-width:none;max-height:none;width:100%;height:100%;margin:0;border:0;border-radius:0;padding:12px;background:#fbf6eb}
.result-photo-dialog[open] {display:flex;flex-direction:column;gap:12px}
.result-viewer-toolbar {display:flex;justify-content:space-between;gap:8px}
.result-viewer-toolbar button {font-size:18px;padding:10px 14px;min-height:48px}
.result-photo-dialog>img {display:block;flex:1;min-height:0;width:100%;object-fit:contain}
.result-photo-open {overflow:hidden}
@media(max-width:700px){
 .site-header {display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:10px;padding:14px 16px;min-height:0}
 .site-header .wordmark {grid-column:1;min-width:0;gap:5px}
 .site-header .brand-name {font-size:clamp(24px,6.8vw,36px)}
 .site-header .brand-mark {width:34px;height:38px}
 .site-header .header-actions {display:contents}
 .site-header #language-open {grid-column:2;grid-row:1;padding:8px;min-width:44px;min-height:44px}
 .site-header #help-open {grid-column:3;grid-row:1;font-size:17px;padding:8px;min-height:44px;margin:0}
 .site-header #help-open .help-icon,.site-header .language-code {display:none}
 .site-header #account-open {grid-column:1/-1;grid-row:2;width:100%;min-height:48px;padding:8px 14px;font-size:22px}
 .site-header #recent-open {grid-column:1/-1;grid-row:3}
 .site-header #language-open img {width:28px;height:auto}
 #library-view {padding:12px 16px 28px}
 .library-sidebar {margin:0}
 .library-layout {gap:14px}
 .saved-card h2 {font-size:20px;line-height:1.3}
 #result-view .result-print>.result-image {max-height:var(--result-photo-height,calc(100svh - 190px))}
}
@media(prefers-reduced-motion:reduce){.upload-fill{transition:none}}

.template-footer {display:none}

.site-header #account-open {white-space:normal;overflow-wrap:anywhere;text-align:center}

.recovery-placeholder {display:grid;place-items:center;width:100%;min-height:180px;padding:16px;color:var(--teal);font-weight:700}
.gesture-hint {display:inline-flex;flex:none;pointer-events:none;vertical-align:middle;border-radius:16px;overflow:hidden;background:white}
.gesture-hint img {display:block;object-fit:contain;width:64px;height:64px}
.scroll-hint {display:flex;align-items:center;gap:12px}
#preview-empty>svg {display:none}
#photo-tap-hint img {width:80px;height:80px}

.saved-card-info{position:absolute;bottom:14px;right:14px;width:44px;height:44px;border:1px solid #b7a78e;border-radius:50%;background:#fffaf1;color:#742e38;font:700 24px/1 var(--body);cursor:pointer}.card-information-dialog{box-sizing:border-box;width:min(92vw,520px);max-height:90dvh;overflow:auto}.card-information-dialog dt{font-weight:700;margin-top:16px}.card-information-dialog dd{margin:6px 0 0;overflow-wrap:anywhere;user-select:text}.card-information-dialog h2{padding-right:24px;font-size:clamp(26px,7vw,38px);overflow-wrap:anywhere}.card-copy-reference{margin-top:24px}

/* Show only the accepted source photo: no composed greeting or card footer. */
#uploaded-photo-preview{display:block;position:absolute;inset:0;width:100%;height:100%;object-fit:contain;object-position:center;background:var(--paper)}
#uploaded-photo-preview[hidden]{display:none}
.remove-photo.primary-remove{width:44px;height:44px;min-height:44px;min-width:44px;padding:10px;border:1px solid #b7a78e;border-radius:50%;background:#fffaf1;color:var(--wine);z-index:3;display:grid;place-items:center}
.remove-photo.primary-remove[hidden]{display:none}
.remove-photo.primary-remove:hover{background:#e7eddd}
.primary-remove svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
