:root {
  color-scheme: light;
  --ink: #1d2324;
  --muted: #7d827e;
  --line: #e7e9e3;
  --paper: #fff;
  --bg: #f6f7f2;
  --purple: #6a55d7;
  --purple-dark: #4a3e9b;
  --lime: #d9fa82;
  --radius: 24px;
  font-family: "Inter", "Avenir Next", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select, a { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .46; cursor: not-allowed; transform: none !important; }
a { color: inherit; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; white-space: nowrap; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #8e75ed; outline-offset: 3px; }

/* Shared navigation */
.topbar { height: 78px; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 0 max(30px, calc((100% - 1250px)/2)); border-bottom: 1px solid #e8e9e3; background: #fff; }
.brand { display: inline-flex; gap: 11px; align-items: center; color: #242927; font-size: 19px; font-weight: 850; letter-spacing: -.9px; text-decoration: none; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 12px; color: #19201e; background: var(--lime); }
.brand-dot { color: #705bd9; }
.topbar-right { display: flex; align-items: center; gap: 24px; }
.privacy-pill { display: inline-flex; align-items: center; gap: 8px; color: #4c6854; font-weight: 700; font-size: 12px; }
.admin-link { text-decoration: none; color: #787e79; font-size: 12px; font-weight: 750; }
.admin-link:hover { color: #272d29; }

/* Main layout */
.page { max-width: 1250px; margin: 0 auto; padding: 27px 24px 20px; }
.simple-workspace { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(345px, .82fr); grid-template-areas: "preview controls" "preview effects"; gap: 18px 22px; align-items: start; }
.simple-workspace.no-effect-choice { grid-template-areas: "preview controls"; }
.panel, .preview-panel { min-width: 0; border-radius: 25px; }
.panel { background: #fff; padding: 27px; border: 1px solid #e9ebe5; box-shadow: 0 7px 25px #28322906; }
.simple-controls { grid-area: controls; }
.simple-effects { grid-area: effects; }
.section-overline { display: flex; gap: 8px; align-items: center; color: #858b83; font-size: 10px; font-weight: 850; letter-spacing: 1.4px; }
.overline-dot { width: 8px; height: 8px; border-radius: 50%; background: #92ae67; }
.simple-title { font-size: clamp(25px, 3vw, 31px); font-weight: 850; letter-spacing: -1.2px; margin: 12px 0 7px; line-height: 1.13; }
.panel-description { font-size: 13px; line-height: 1.5; color: #777e79; margin: 0 0 22px; }
.upload-actions { display: grid; gap: 10px; }
.upload-tile { display: flex; align-items: center; min-height: 75px; gap: 14px; padding: 12px 13px; width: 100%; border: 1px solid #e4e6df; border-radius: 16px; text-align: left; color: var(--ink); background: #fff; transition: background .18s, transform .18s, border-color .18s, box-shadow .18s; }
.upload-tile:not(:disabled):hover { transform: translateY(-2px); border-color: #c4cfaa; box-shadow: 0 8px 18px #3c492311; }
.upload-tile-camera { background: var(--lime); border-color: var(--lime); }
.upload-tile-camera:hover { background: #e2ffa3; }
.tile-icon { display: grid; place-items: center; width: 45px; height: 45px; flex: 0 0 45px; border-radius: 13px; background: #161f19; color: #fff; }
.upload-tile-gallery .tile-icon { background: #f0f1ec; color: #373d39; }
.tile-copy { flex: 1; min-width: 0; }
.tile-copy strong { display: block; font-size: 14px; letter-spacing: -.2px; font-weight: 800; }
.tile-copy small { display: block; color: #737e72; font-weight: 500; font-size: 11px; margin-top: 4px; }
.tile-arrow { font-size: 22px; line-height: 1; color: #3a4337; }
.panel-divider { border-top: 1px solid var(--line); margin: 24px 0 20px; }
.controls-heading, .effect-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.simple-section-title { margin: 0; font-size: 17px; line-height: 1.2; font-weight: 820; letter-spacing: -.45px; }
.controls-label { color: #999f98; font-size: 9px; font-weight: 850; letter-spacing: .8px; }
.zoom-controls { margin-top: 17px; }
.zoom-label { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 770; }
.zoom-label output { font-size: 12px; font-weight: 800; color: #4a4b51; background: #f2f3ee; border-radius: 7px; padding: 4px 8px; }
input[type="range"] { accent-color: #272e2b; width: 100%; cursor: pointer; margin: 14px 0 0; }
.zoom-ends { display: flex; justify-content: space-between; margin-top: 1px; font-size: 17px; color: #949a94; }
.secondary-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 17px; }
.button-secondary { border: 1px solid #e4e7e1; color: #414944; background: #fff; padding: 12px 9px; border-radius: 12px; font-size: 12px; font-weight: 780; text-align: center; transition: background .18s, border-color .18s; }
.button-secondary:not(:disabled):hover { background: #f3f5ef; border-color: #cbd4c8; }
.button-secondary > span { font-size: 16px; margin-right: 4px; }
.advanced-details { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 16px; }
.advanced-details summary { display: flex; justify-content: space-between; align-items: center; cursor: pointer; list-style: none; color: #515a55; font-size: 12px; font-weight: 750; }
.advanced-details summary::-webkit-details-marker { display:none; }
.advanced-details[open] summary span { transform: rotate(180deg); }
.support-text { color: #717a73; font-size: 12px; line-height: 1.5; }
.face-status { background: #f4f6f0; border-radius: 12px; padding: 11px 12px; }
.accessory-adjust { margin-top: 12px; border: 1px solid var(--line); border-radius: 13px; padding: 14px; }
.adjust-field { margin-top: 15px; }
.adjust-field label { color: #59635b; font-size: 12px; font-weight: 720; }
.btn-full { display: block; width: 100%; margin-top: 7px; }

/* Photo stage */
.preview-panel { grid-area: preview; position: sticky; top: 20px; overflow: hidden; isolation: isolate; background: #202327; color: white; padding: 25px 26px 26px; min-height: 685px; box-shadow: 0 18px 50px #272a3020; display: flex; flex-direction: column; }
.preview-panel::before { content: ''; position: absolute; z-index: -1; width: 560px; height: 560px; border-radius: 50%; background: radial-gradient(circle,#51496680 0,#38334358 41%, transparent 72%); left: -150px; top: -110px; pointer-events: none; }
.preview-panel::after { content: ''; position: absolute; z-index: -1; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle,#5a665038,transparent 71%); right: -130px; bottom: 60px; pointer-events: none; }
.preview-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: #f2f2eb; font-size: 10px; font-weight: 850; letter-spacing: 1.3px; }
.preview-top > div { display: flex; align-items: center; gap: 11px; }
.live-circle { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 5px #dafa821b; }
.preview-format { font-size: 9px; letter-spacing: .7px; color: #c7cbc3; border: 1px solid #ffffff2f; border-radius: 6px; padding: 8px 9px; white-space: nowrap; }
.preview-outer { flex: 1; min-height: 505px; position: relative; display: flex; align-items: center; justify-content: center; padding: 26px 0 18px; }
.stage-spark { position: absolute; color: #d9fa82; opacity: .72; pointer-events: none; line-height: 1; }
.stage-spark-one { top: 19%; right: 9%; font-size: 29px; }
.stage-spark-two { bottom: 18%; left: 7%; font-size: 20px; opacity: .36; }
.photo-frame { width: min(100%, 334px); aspect-ratio: 3 / 4; position: relative; isolation: isolate; overflow: hidden; border: 7px solid #fff; background: #eee8df; border-radius: 7px; box-shadow: 0 24px 45px #0005, 0 2px 6px #0002; touch-action: none; cursor: grab; -webkit-user-select: none; user-select: none; }
.photo-frame:not(.is-empty) { border-width: 5px; }
.photo-frame:active { cursor: grabbing; }
.photo-frame canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.photo-frame.is-empty canvas { display: none; }
.empty-preview { display: grid; place-items: center; position: absolute; inset: 0; overflow: hidden; background: #f6e5d7; z-index: 2; }
.empty-pattern { position: absolute; inset: 0; background: radial-gradient(circle at 75% 16%, #fbc799 0 17%, transparent 17.3%),radial-gradient(circle at 9% 62%, #b4bcee 0 13%, transparent 13.3%), linear-gradient(140deg,#f9e6d6,#dfdff8); }
.empty-person { position: absolute; width: 86%; height: auto; bottom: -7%; max-height: 96%; }
.empty-message { position: absolute; z-index: 3; bottom: 17px; left: 50%; transform: translateX(-50%); white-space: nowrap; border-radius: 50px; padding: 11px 17px; background: #fff; color: #292b2d; font-size: 11px; font-weight: 800; box-shadow: 0 5px 12px #31315118; }
.empty-message span { color: #6c5ed5; margin-left: 4px; }
.face-guide { position: absolute; z-index: 3; inset: 0; pointer-events: none; }
.guide-oval { position: absolute; width: 52%; height: 55%; left: 24%; top: 15.5%; border: 2.5px dashed rgba(255,255,255,.98); border-radius: 50% 50% 47% 47%; box-shadow: 0 0 0 1px #262a3b70; }
.eye-marker { position: absolute; height: 1px; width: 10%; background: #fff; top: 44%; box-shadow: 0 0 3px #363445; }
.eye-left { left: 22%; }.eye-right { right: 22%; }
.nose-marker { position: absolute; left: 50%; top: 53%; border-left: 1px solid #fffc; height: 8%; }
.drag-hint { position: absolute; z-index: 4; bottom: 6%; left: 50%; transform: translateX(-50%); white-space: nowrap; background: #202327d9; color: #fff; font-size: 11px; font-weight: 750; border-radius: 40px; padding: 10px 16px; pointer-events: none; }
.photo-frame.edit-accessory { outline: 4px solid #d9fa82; outline-offset: 3px; cursor: move; }
.photo-frame.edit-accessory .drag-hint { background: #4e6f38; }
.preview-footer { margin-top: auto; }
.preview-caption { color: #a7aba7; font-size: 11px; line-height: 1.5; text-align: center; margin: 0 0 16px; }
.preview-caption span { color: #c6cbc5; }
.button-primary { display: inline-flex; justify-content: center; align-items: center; gap: 14px; background: var(--ink); color: #fff; border: 0; border-radius: 13px; font-size: 13px; font-weight: 800; padding: 15px 20px; text-decoration: none; transition: transform .18s, box-shadow .18s, background .18s; }
.button-primary:not(:disabled):hover { background: #333c35; box-shadow: 0 10px 22px #17201b23; transform: translateY(-2px); }
.preview-panel > .preview-footer > .button-primary { display: flex; width: 100%; max-width: 390px; margin: 0 auto; color: #202721; background: var(--lime); font-size: 14px; padding: 12px 12px 12px 24px; justify-content: space-between; }
.preview-panel > .preview-footer > .button-primary:not(:disabled):hover { background: #e6ffa6; }
.primary-arrow { display: grid; place-items: center; width: 37px; height: 37px; background: #1e2821; color: #fff; border-radius: 9px; font-size: 22px; }
.preview-panel > .preview-footer > .button-primary:disabled { opacity: .64; }

/* Effect choices */
.effects-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 20px; }
.effects-header .simple-section-title { margin-top: 7px; font-size: 19px; }
.effects-star { display: grid; place-items: center; height: 35px; width: 35px; border-radius: 10px; background: #eee9ff; color: #7466ce; font-size: 21px; }
.effect-heading { margin: 0 0 13px; }
.effect-label { margin: 0; font-size: 12px; color: #434b45; font-weight: 800; }
.effect-heading > span { color: #b7bab1; font-size: 11px; font-weight: 800; }
.effect-divider { border-top: 1px solid #eceee9; margin: 19px 0 21px; }
.overlay-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.overlay-option { min-width: 0; padding: 5px; border: 1px solid #e5e9e1; background: #fff; border-radius: 11px; color: #727a71; font-size: 10px; font-weight: 700; text-align: center; transition: border-color .18s, background .18s, transform .18s; }
.overlay-option:hover { transform: translateY(-2px); border-color: #b5c3a9; }
.overlay-option.selected { border-color: #658456; background: #f3f9e9; box-shadow: 0 0 0 1px #658456; color: #3f6245; }
.overlay-thumbnail { height: 68px; width: 100%; display: grid; place-items: center; overflow: hidden; background: linear-gradient(145deg,#eeece4,#d9e3de); border-radius: 7px; }
.overlay-thumbnail img { width: 100%; height: 100%; object-fit: contain; }
.overlay-thumbnail.no-overlay { font-size: 27px; color: #a0a9a0; }
.overlay-name { display: block; font-size: 9px; line-height: 1.25; min-height: 26px; margin-top: 7px; overflow-wrap: anywhere; }
.loading-message { color: var(--muted); font-size: 12px; }
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; color: #9da29b; font-size: 11px; padding: 22px 4px 0; }
.site-footer span span { color: #7c6db1; }

/* Camera + result dialogs */
.modal { width: min(92vw, 900px); max-height: min(94dvh, 910px); overflow: auto; border: 1px solid #e1e4dc; border-radius: 22px; padding: 25px; box-shadow: 0 25px 100px #0007; background: #fff; color: var(--ink); }
.modal::backdrop { background: #1c211ed4; backdrop-filter: blur(7px); }
.camera-modal { max-width: 490px; }
.dialog-header { display: flex; justify-content: space-between; gap: 10px; align-items: start; margin-bottom: 17px; }
.dialog-header h2 { font-size: 25px; letter-spacing: -.7px; margin: 6px 0 0; }
.modal-eyebrow { color: #858c7f; font-size: 10px; letter-spacing: 1px; font-weight: 850; }
.icon-close { border: none; border-radius: 9px; width: 33px; height: 33px; background: #f1f3ed; color: #464d46; font-size: 17px; }
.camera-view { position: relative; display: grid; place-items: center; max-height: 65dvh; overflow: hidden; aspect-ratio: 3/4; border-radius: 15px; background: #191d1b; }
.camera-view video { width: 100%; height: 100%; object-fit: cover; }
.camera-view video.mirror { transform: scaleX(-1); }
.camera-face-guide { position: absolute; width: 52%; height: 53%; top: 17%; left: 24%; border: 2px dashed #fffffff0; border-radius: 50%; pointer-events: none; }
.camera-actions { display: flex; gap: 11px; margin-top: 16px; }
.camera-actions > * { flex: 1; }
.result-content { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); align-items: center; gap: 33px; }
.result-content > img { display: block; width: 100%; max-width: 310px; aspect-ratio: 3/4; object-fit: contain; border-radius: 10px; box-shadow: 0 12px 30px #1a251b1b; background: #e7e8e2; }
.result-done { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: #e5f7c7; color: #39704e; font-weight: 850; font-size: 28px; }
.result-side h3 { font-size: 31px; letter-spacing: -1px; margin: 16px 0 8px; }
.result-side p { color: #7c837c; font-size: 13px; line-height: 1.5; margin: 0 0 21px; }
.result-side .button-primary, .result-side .button-secondary { display: flex; width: 100%; margin-bottom: 9px; }
.result-side small { color: #a0a49c; display: block; text-align: center; padding-top: 7px; }
.toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); max-width: calc(100vw - 25px); transform: translate(-50%, 25px); opacity: 0; pointer-events: none; background: #232e26; color: #fff; padding: 13px 18px; border-radius: 11px; font-size: 12px; font-weight: 720; text-align: center; box-shadow: 0 15px 35px #0e1e1380; z-index: 50; transition: transform .2s, opacity .2s; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

/* Admin */
.admin-page { max-width: 1200px; margin: 0 auto 65px; padding: 38px 24px 0; }
.admin-intro { margin-bottom: 25px; }
.admin-intro .eyebrow { font-size: 10px; color: #678052; font-weight: 850; letter-spacing: 1.6px; }
.admin-intro h1 { margin: 9px 0 9px; font-size: clamp(30px, 4vw, 42px); letter-spacing: -1.5px; line-height: 1.1; }
.admin-intro p { margin: 0; max-width: 680px; color: #777f76; font-size: 13px; line-height: 1.6; }
.admin-card { background: #fff; border: 1px solid #e9ebe4; border-radius: 24px; padding: 28px; box-shadow: 0 10px 25px #28322909; }
.admin-login { max-width: 490px; margin: 35px auto; }
.admin-login h2, .admin-topline h2 { margin: 0; font-size: 23px; letter-spacing: -.7px; }
.admin-login form { margin-top: 24px; }
.admin-login label, .upload-form label { display: block; font-size: 12px; color: #444e46; font-weight: 800; margin-bottom: 8px; }
.admin-login input, .upload-form input[type="text"], .upload-form input[type="file"], .upload-form select, .upload-form input[type="number"], .admin-default-grid select { width: 100%; min-width: 0; font-size: 13px; color: #29312d; background: #fff; border: 1px solid #dfe4dc; border-radius: 11px; padding: 12px; outline-offset: 2px; }
.admin-login button { width: 100%; margin-top: 17px; }
.admin-topline { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 23px; }
.admin-topline h2 { font-size: 20px; }
.admin-settings { margin-bottom: 27px; padding: 23px; border: 1px solid #e5e9e0; border-radius: 19px; background: #f8faf5; }
.admin-settings h3 { font-size: 18px; margin: 0 0 16px; letter-spacing: -.4px; }
.admin-mode-toggle { display: flex; gap: 13px; align-items: center; cursor: pointer; padding: 17px; border: 1px solid #e4e9dc; border-radius: 14px; background: white; }
.admin-mode-toggle input { width: 20px; height: 20px; margin: 0; flex: 0 0 20px; accent-color: #5a835c; }
.admin-mode-toggle strong, .admin-mode-toggle small { display: block; }
.admin-mode-toggle strong { font-size: 13px; font-weight: 800; }
.admin-mode-toggle small { color: #828880; font-size: 11px; line-height: 1.5; margin-top: 5px; }
.admin-mode-help { color: #777e76; font-size: 12px; line-height: 1.5; margin: 14px 0 18px; }
.admin-settings .is-locked .admin-mode-toggle { border-color: #bccaa5; background: #f0f6e4; }
.admin-default-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.admin-default-grid .field label { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 800; }
.admin-settings-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 17px; }
.admin-settings-actions .button-primary { padding: 12px 18px; }
.admin-settings .admin-error { min-height: 0; }
.admin-columns { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 22px; align-items: start; }
.upload-box { min-width: 0; background: #fff; border: 1px solid #e5e9e0; border-radius: 18px; padding: 23px; }
.admin-list { min-width: 0; padding: 17px 4px; }
.upload-box h3, .admin-list h3 { font-size: 19px; margin: 0 0 9px; letter-spacing: -.5px; }
.upload-box p, .admin-list p { font-size: 12px; line-height: 1.6; color: #7e867d; margin: 0 0 18px; }
.upload-form .field { margin-bottom: 17px; }
.upload-form input[type="file"] { font-size: 11px; }
.upload-form .button-primary { min-width: 0; }
.admin-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 12px; }
.face-admin-options { background: #f8faf5; border: 1px solid #e5e9e0; border-radius: 13px; padding: 17px; margin: 17px 0; }
.admin-checkbox { display: flex !important; align-items: center; gap: 9px; line-height: 1.45; margin: 4px 0 14px !important; }
.admin-checkbox input { width: 17px; height: 17px; margin: 0; accent-color: #547a4c; }
.preview-admin-wrap { background: #f7f8f4; border: 1px solid #e8ebe4; border-radius: 14px; padding: 14px; text-align: center; margin: 15px 0; }
.preview-admin-wrap h4 { font-size: 13px; margin: 0 0 12px; text-align: left; }
#adminPreviewCanvas { width: min(100%, 205px); height: auto; aspect-ratio: 3/4; display: block; border-radius: 9px; margin: 0 auto; }
.anchor-picker { padding: 14px 0 0; }
.anchor-picker > span { display: block; color: #798079; font-size: 11px; margin-bottom: 9px; }
.anchor-picture { width: min(100%, 200px); margin: 0 auto; max-height: 240px; position: relative; overflow: hidden; border-radius: 8px; background: #ece9fa; cursor: crosshair; }
.anchor-picture img { width: 100%; height: 100%; display: block; object-fit: fill; }
.anchor-cross { position: absolute; transform: translate(-50%,-50%); top: 53%; left: 46%; width: 22px; height: 22px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 50%; color: #fff; font-weight: 900; font-size: 15px; line-height: 1; background: #7553c1; box-shadow: 0 1px 5px #0005; pointer-events: none; }
.admin-edit-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.admin-edit-actions .button-primary { flex: 1 1 180px; }
.admin-edit-actions .button-secondary { flex: 1 1 110px; }
.admin-item { display: flex; align-items: center; gap: 13px; min-height: 88px; padding: 10px; margin-bottom: 9px; border: 1px solid #e9ece5; border-radius: 13px; background: #fff; }
.admin-item.is-off { opacity: .53; }
.admin-item img { width: 53px; height: 68px; object-fit: contain; background: #e9ece5; border-radius: 8px; }
.admin-item-main { flex: 1; min-width: 80px; }
.admin-item-main strong { font-size: 13px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-item-main small { color: #929990; display: block; margin-top: 5px; font-size: 11px; }
.admin-item-actions { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
.admin-smallbtn { color: #596359; border: 1px solid #e4e9e1; background: #fff; border-radius: 8px; padding: 8px; font-size: 12px; min-width: 32px; }
.admin-smallbtn:hover { color: #3f6146; background: #f2f8e9; }
.admin-smallbtn.danger:hover { color: #ac3e3e; background: #fff1f1; }
.admin-error { color: #a83e3e !important; font-size: 12px; line-height: 1.5; min-height: 20px; }
.admin-ok { color: #30794f; font-size: 12px; line-height: 1.5; min-height: 20px; }
.admin-small-note { display: inline-block; font-size: 11px; color: #9aa198; }

@media (max-width: 980px) {
  .simple-workspace { grid-template-columns: minmax(0, 1fr) minmax(300px,.8fr); gap: 13px; }
  .panel { padding: 20px; }
  .preview-panel { padding: 20px; }
  .overlay-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .admin-columns { grid-template-columns: minmax(0,1fr); }
  .admin-list { padding: 10px 0; }
}
@media (max-width: 720px) {
  .topbar { height: 65px; padding: 0 17px; }
  .brand { font-size: 17px; gap: 8px; }
  .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
  .topbar-right { gap: 9px; }
  .privacy-pill { font-size: 0; gap: 0; }
  .privacy-pill svg { width: 18px; height: 18px; }
  .admin-link { font-size: 11px; }
  .page { padding: 15px 12px 16px; }
  .simple-workspace, .simple-workspace.no-effect-choice { grid-template-columns: minmax(0,1fr); grid-template-areas: "controls" "preview" "effects"; gap: 12px; max-width: 540px; margin: 0 auto; }
  .simple-controls { padding: 21px 18px; }
  .simple-title { font-size: 26px; }
  .panel-description { margin-bottom: 17px; }
  .upload-actions { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .upload-tile { flex-wrap: wrap; align-content: start; gap: 8px; min-height: 113px; padding: 12px; }
  .tile-icon { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; }
  .tile-copy { flex-basis: calc(100% - 50px); }
  .tile-copy strong { font-size: 12px; line-height: 1.3; }
  .tile-copy small { font-size: 10px; margin-top: 3px; }
  .tile-arrow { display: none; }
  .panel-divider { margin: 20px 0 18px; }
  .preview-panel { position: relative; top: auto; min-height: 0; padding: 19px 16px 19px; border-radius: 23px; }
  .preview-top { letter-spacing: .7px; font-size: 9px; }
  .preview-format { font-size: 9px; }
  .preview-outer { min-height: 410px; padding: 22px 0; }
  .photo-frame { width: min(100%, 268px); }
  .preview-caption { font-size: 10px; }
  .preview-panel > .preview-footer > .button-primary { max-width: 350px; }
  .simple-effects { padding: 22px 18px; }
  .overlay-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .overlay-thumbnail { height: 74px; }
  .site-footer { flex-direction: column; gap: 5px; padding-top: 22px; text-align: center; }
  .admin-page { padding: 24px 13px 0; }
  .admin-card { padding: 16px; }
  .admin-settings { padding: 15px 12px; }
  .admin-default-grid { grid-template-columns: minmax(0,1fr); }
  .admin-item { flex-wrap: wrap; }
  .admin-item-main { flex: 1 1 125px; }
  .admin-item-actions { flex: 1 1 100%; }
  .modal { padding: 18px; border-radius: 15px; width: min(94vw,900px); }
  .result-content { grid-template-columns: minmax(0,1fr); gap: 17px; }
  .result-content > img { max-width: 210px; margin: 0 auto; }
  .result-side { text-align: center; }
  .result-done { margin: 0 auto; }
  .result-side h3 { margin: 7px 0; }
}
@media (max-width: 385px) {
  .upload-tile { min-height: 124px; }
  .overlay-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .photo-frame { width: min(100%, 245px); }
  .preview-outer { min-height: 385px; }
  .topbar-right { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }

/* Feedback for the first automatic crop, without adding another panel. */
.auto-frame-status { margin: 11px 1px 0; font-size: 11px; line-height: 1.45; color: #647064; }
.auto-frame-status[hidden] { display: none; }
