:root {
  color-scheme: light;
  --ink: #28251f;
  --muted: #8d877f;
  --line: #eae4dd;
  --paper: #fffdfa;
  --cream: #f7f2ed;
  --rose: #dc897e;
  --rose-dark: #bf6e64;
  --rose-pale: #fae8e3;
  --sage: #87967c;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
html { min-height: 100%; }
body { min-height: 100vh; min-height: 100dvh; }
button, select, input { font: inherit; }
button { color: inherit; }
button:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; }
[hidden] { display: none !important; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 5.2%; background: rgba(255,253,250,.88); border-bottom: 1px solid #eee8e2; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 50%; color: white; background: var(--rose); font-size: 23px; }
.brand strong, .brand small { display: block; }
.brand strong { font-family: var(--serif); font-size: 19px; letter-spacing: -.3px; }
.brand small { margin-top: 2px; color: #999087; font-size: 8px; font-weight: 700; letter-spacing: 1.4px; }
.main-nav { display: flex; align-self: stretch; gap: 34px; }
.nav-link { position: relative; border: 0; background: none; color: #827b74; font-size: 13px; cursor: pointer; }
.nav-link.active { color: var(--ink); font-weight: 700; }
.nav-link.active:after { position: absolute; right: 0; bottom: 0; left: 0; height: 2px; background: var(--rose); content: ""; }
.gallery-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 4px; border-radius: 10px; background: #f4ebe4; color: #897d72; font-size: 10px; }
.top-actions { display: flex; align-items: center; gap: 18px; }
.local-note { display: flex; align-items: center; gap: 7px; color: #8a847d; font-size: 11px; }
.status-dot, .live-pill span { width: 7px; height: 7px; border-radius: 50%; background: #8aab85; }
.icon-button, .small-icon-button, .camera-toggle, .flip-button { display: grid; place-items: center; border: 1px solid var(--line); background: var(--paper); cursor: pointer; }
.icon-button { width: 35px; height: 35px; border-radius: 50%; color: #777067; font-size: 15px; }
.studio-page, .gallery-page { max-width: 1320px; margin: 0 auto; padding: 45px 5.2% 64px; }
.intro { display: flex; align-items: end; justify-content: space-between; margin-bottom: 35px; }
.eyebrow { margin: 0 0 10px; color: var(--rose-dark); font-size: 9px; font-weight: 700; letter-spacing: 1.8px; }
.eyebrow-star { padding-right: 4px; font-size: 13px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-family: var(--serif); font-size: clamp(32px, 4vw, 43px); font-weight: 500; letter-spacing: -1.4px; }
h1 em { color: var(--rose-dark); font-weight: 500; }
.intro-copy { margin: 0; color: #89827a; font-size: 12px; }
.session-badge { display: flex; align-items: center; gap: 9px; padding: 10px 14px; border: 1px solid #eadfd7; border-radius: 30px; color: #766d63; background: rgba(255,253,250,.68); font-family: var(--serif); font-size: 12px; }
.sparkle { color: var(--rose); font-size: 16px; }
.workflow-stepper { display: flex; align-items: center; max-width: 800px; margin: 0 auto 9px; padding: 13px 18px; border: 1px solid #ebe2da; border-radius: 10px; background: #fffdfa; }
.workflow-step { display: flex; flex: 1 1 0; align-items: center; gap: 10px; min-width: 0; padding: 4px; border: 0; background: none; color: #a39a91; text-align: left; cursor: pointer; }
.workflow-step:disabled { cursor: default; }
.workflow-step-number { display: grid; flex: 0 0 31px; place-items: center; width: 31px; height: 31px; border: 1px solid #e8e1da; border-radius: 50%; background: #fff; color: #9d948a; font-size: 10px; font-weight: 700; }
.workflow-step strong, .workflow-step small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workflow-step strong { font-size: 10px; font-weight: 600; }
.workflow-step small { margin-top: 3px; font-size: 8px; }
.workflow-step.active { color: var(--rose-dark); }
.workflow-step.active .workflow-step-number { border-color: var(--rose); background: var(--rose); color: white; }
.workflow-step.complete { color: #71856e; }
.workflow-step.complete .workflow-step-number { border-color: #cbd8c6; background: #edf3e9; color: #71856e; }
.workflow-connector { flex: 0 0 35px; height: 1px; background: #e8e1da; }
.workflow-connector.complete { background: #a9bea1; }
.workflow-context { margin: 0 auto 18px; color: #91877e; font-size: 10px; text-align: center; }
.frame-step-content, .capture-step-content { min-width: 0; }
.stage-navigation { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 15px; }
.stage-button { min-height: 36px; padding: 9px 13px; border: 1px solid #e6ddd5; border-radius: 5px; background: #fffdfa; color: #786e64; font-size: 10px; font-weight: 700; cursor: pointer; }
.stage-button:hover { border-color: #d5b7ab; }
.stage-button:active, .capture-button:active, .category-tab:active { transform: translateY(1px); }
.primary-stage-button { border-color: var(--rose); background: var(--rose); color: white; }
.primary-stage-button:hover { border-color: var(--rose-dark); background: var(--rose-dark); }
.final-navigation { justify-content: flex-start; }
.workflow-stepper .workflow-step:focus-visible, .stage-button:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; }
.studio-page[data-workflow-step="1"] .studio-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: 22px; }
.studio-page[data-workflow-step="1"] .workbench, .studio-page[data-workflow-step="1"] .preview-column { display: contents; }
.studio-page[data-workflow-step="1"] .editor-controls { display: contents; }
.studio-page[data-workflow-step="1"] .frame-step-content { grid-column: 1; grid-row: 1 / span 3; }
.studio-page[data-workflow-step="1"] .filter-step-panel { grid-column: 2; grid-row: 1; align-self: start; margin: 0; border: 1px solid #e8e1da; border-radius: 9px; background: #fffdfa; }
.studio-page[data-workflow-step="1"] .preview-heading { grid-column: 2; grid-row: 2; margin: 0; }
.studio-page[data-workflow-step="1"] .preview-card { grid-column: 2; grid-row: 3; align-self: start; }
.studio-page[data-workflow-step="1"] .capture-step-content,
.studio-page[data-workflow-step="1"] .decoration-section,
.studio-page[data-workflow-step="1"] .export-section,
.studio-page[data-workflow-step="1"] .final-navigation { display: none; }
.studio-page[data-workflow-step="2"] .studio-grid { display: block; max-width: 820px; margin: 0 auto; }
.studio-page[data-workflow-step="2"] .frame-step-content,
.studio-page[data-workflow-step="2"] .preview-column { display: none; }
.studio-page[data-workflow-step="3"] .studio-grid { display: block; max-width: 980px; margin: 0 auto; }
.studio-page[data-workflow-step="3"] .workbench { display: none; }
.studio-page[data-workflow-step="3"] .preview-column { display: block; }
.studio-page[data-workflow-step="3"] .preview-card { margin-bottom: 13px; }
.studio-page[data-workflow-step="3"] .editor-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .9fr); align-items: start; }
.studio-page[data-workflow-step="3"] .filter-step-panel { grid-column: 1; grid-row: 1; }
.studio-page[data-workflow-step="3"] .decoration-section { grid-column: 2; grid-row: 1; }
.studio-page[data-workflow-step="3"] .export-section { grid-column: 1; grid-row: 2; border-top: 1px solid #eee8e2; }
.studio-page[data-workflow-step="3"] .final-navigation { grid-column: 2; grid-row: 2; margin: 0 14px 14px; }
.studio-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(350px, .88fr); align-items: start; gap: 38px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.section-heading > div:first-child { display: flex; align-items: center; gap: 10px; }
.section-heading h2 { margin: 0; font-family: var(--serif); font-size: 19px; font-weight: 600; letter-spacing: -.3px; }
.step-number { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: #f8e7e1; color: var(--rose-dark); font-size: 10px; font-weight: 700; }
.text-button { padding: 4px 0; border: 0; background: none; color: var(--rose-dark); font-size: 11px; font-weight: 700; cursor: pointer; }
.text-button:hover { color: #99564e; }
.category-tabs { display: flex; gap: 7px; margin: 0 0 12px; overflow-x: auto; scrollbar-width: none; }
.category-tabs::-webkit-scrollbar, .frame-scroller::-webkit-scrollbar { display: none; }
.category-tab { flex: 0 0 auto; padding: 7px 12px; border: 1px solid #e8e1da; border-radius: 20px; background: #fffdfa; color: #827a72; font-size: 10px; cursor: pointer; }
.category-tab.selected { border-color: var(--rose); background: #fae9e4; color: #9e5b52; font-weight: 700; }
.frame-scroller { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-height: 240px; overflow-y: auto; padding: 2px 1px 8px; }
.frame-count-field { display: flex; align-items: center; justify-content: space-between; gap: 10px; max-width: 210px; margin: -3px 0 12px; color: #9a9189; font-size: 8px; font-weight: 700; letter-spacing: .9px; }
.frame-count-field select { min-width: 104px; height: 31px; padding: 0 9px; border: 1px solid #e8e1da; border-radius: 5px; background: #fffdfa; color: #4c463f; font-size: 10px; letter-spacing: 0; }
.frame-card { position: relative; min-width: 0; padding: 7px; border: 1px solid #e8e1da; border-radius: 9px; background: #fffdfa; cursor: pointer; text-align: left; transition: transform .18s, border-color .18s, box-shadow .18s; }
.frame-card:hover { transform: translateY(-2px); box-shadow: 0 5px 16px #533e3012; }
.frame-card.selected { border: 1.5px solid var(--rose); box-shadow: 0 0 0 2px #dc897e1a; }
.frame-card.selected::after { position: absolute; top: 7px; left: 7px; padding: 3px 5px; border-radius: 10px; background: var(--rose); color: white; content: "Selected"; font-size: 7px; font-weight: 700; }
.frame-card:focus-visible, .category-tab:focus-visible, .flip-button:focus-visible, .camera-toggle:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; }
.mini-frame { display: flex; flex-direction: column; gap: 3px; width: 54px; height: 72px; margin: 3px auto 8px; padding: 6px; background: var(--frame-color); box-shadow: 0 2px 6px #39271b1a; }
.mini-frame.layout-grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.mini-frame.layout-single { padding: 5px; }
.mini-slot { min-height: 0; flex: 1; background: linear-gradient(145deg,#d5c0b5,#ede1d8); }
.mini-frame[data-design="botanical"] { outline: 2px dotted var(--frame-accent); outline-offset: 2px; }
.mini-frame[data-design="rainbow"] { border-radius: 10px 10px 2px 2px; border-top: 3px double var(--frame-accent); }
.mini-frame[data-design="tape"] { outline: 3px solid color-mix(in srgb, var(--frame-accent) 35%, transparent); }
.mini-frame[data-design="neon"] { outline: 2px solid var(--frame-accent); box-shadow: 0 0 8px var(--frame-accent); }
.mini-frame[data-design="checker"] { background-image: conic-gradient(var(--frame-accent) 25%, transparent 0 50%, var(--frame-accent) 0 75%, transparent 0); background-size: 7px 7px; }
.mini-frame[data-design="postage"] { outline: 2px dashed var(--frame-accent); outline-offset: -4px; }
.mini-frame[data-design="waves"] { border-bottom: 3px dashed var(--frame-accent); }
.mini-frame[data-design="vintage-paper"] { border: 2px solid var(--frame-accent); outline: 1px solid var(--frame-accent); outline-offset: -5px; }
.mini-frame[data-design="film-frame"] { border-right: 4px dotted var(--frame-accent); border-left: 4px dotted var(--frame-accent); }
.mini-frame[data-design="classic-white"] { padding: 7px; background: #f1e3d1; outline: 1px solid #786b5e; outline-offset: -3px; }
.mini-frame[data-design="classic-white"] .mini-slot { border: 1px solid #786b5e; background: #d1c4b7; }
.mini-caption { width: 25px; height: 2px; margin: 1px auto 0; background: #b5a99e; }
.frame-title { display: block; overflow: hidden; color: #504940; font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.frame-subtitle { display: block; margin-top: 3px; color: #a19a91; font-size: 8px; text-transform: uppercase; letter-spacing: .35px; }
.favorite-frame { position: absolute; top: 6px; right: 6px; border: 0; background: transparent; color: #c3b8ae; font-size: 14px; cursor: pointer; }
.favorite-frame.is-favorite { color: var(--rose); }
.tool-rule { height: 1px; margin: 14px 0 21px; background: var(--line); }
.capture-heading { margin-bottom: 15px; }
.capture-shortcuts { display: flex; align-items: center; gap: 13px; }
.mobile-camera-button { display: none; }
.capture-options { display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: 9px; margin-bottom: 13px; }
.select-field { display: flex; flex-direction: column; gap: 6px; }
.select-field > span, .control-label { color: #9a9189; font-size: 8px; font-weight: 700; letter-spacing: .9px; }
.select-field select, .full-select, .full-input { width: 100%; height: 35px; padding: 0 9px; border: 1px solid #e8e1da; border-radius: 5px; background: #fffdfa; color: #4c463f; font-size: 10px; }
.full-select { height: 40px; }
.capture-panel { overflow: hidden; border: 1px solid #e8e1da; border-radius: 10px; background: #fffdfa; }
.camera-stage { position: relative; display: grid; place-items: center; min-height: 267px; overflow: hidden; background: #e8e0d9; }
#cameraVideo { display: none; width: 100%; height: 100%; max-height: 410px; object-fit: cover; transform: scaleX(1); }
.camera-stage.camera-on #cameraVideo { display: block; }
.camera-placeholder { display: flex; flex-direction: column; align-items: center; gap: 9px; color: #857d75; text-align: center; }
.camera-on .camera-placeholder { display: none; }
.camera-icon { color: #b58b7e; font-size: 34px; }
.camera-placeholder strong { color: #635b52; font-family: var(--serif); font-size: 15px; font-weight: 600; }
.camera-placeholder > span:last-child { font-size: 10px; }
.camera-overlay { position: absolute; top: 13px; right: 13px; left: 13px; display: flex; justify-content: space-between; }
.live-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 20px; background: #322e2a9c; color: white; font-size: 8px; letter-spacing: .6px; }
.live-pill span { background: #bd8277; }
.live-pill.is-live span { background: #9dc293; }
.flip-button { width: 29px; height: 29px; border: 0; border-radius: 50%; background: #322e2a9c; color: white; font-size: 17px; }
.camera-stage.mirrored #cameraVideo { transform: scaleX(-1); }
.camera-corner { position: absolute; width: 17px; height: 17px; border-color: #fff9; border-style: solid; pointer-events: none; }
.corner-tl { top: 38px; left: 13px; border-width: 1px 0 0 1px; }.corner-tr { top: 38px; right: 13px; border-width: 1px 1px 0 0; }.corner-bl { bottom: 13px; left: 13px; border-width: 0 0 1px 1px; }.corner-br { right: 13px; bottom: 13px; border-width: 0 1px 1px 0; }
.countdown-overlay { position: absolute; display: grid; place-items: center; width: 94px; height: 94px; border: 2px solid #fff; border-radius: 50%; background: #2925217a; color: #fff; font-family: var(--serif); font-size: 55px; text-shadow: 0 2px 12px #0006; animation: count-pop .45s ease both; }
@keyframes count-pop { from { transform: scale(.7); opacity: .4; } to { transform: scale(1); opacity: 1; } }
.flash-overlay { position: absolute; inset: 0; background: white; opacity: 0; pointer-events: none; }
.flash-overlay.flash { animation: flash .24s ease-out; }
@keyframes flash { 0% { opacity: .95; } 100% { opacity: 0; } }
.capture-footer { display: flex; align-items: center; gap: 12px; padding: 11px 13px; }
.capture-progress { flex: 1; min-width: 80px; }
.progress-label { display: block; margin-bottom: 6px; color: #7f776f; font-size: 9px; }
.progress-track { height: 3px; overflow: hidden; border-radius: 3px; background: #f0ebe6; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--rose); transition: width .3s; }
.capture-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 9px 15px; border: 0; border-radius: 5px; background: var(--rose); color: white; font-size: 10px; font-weight: 700; cursor: pointer; }
.capture-button:hover, .primary-button:hover, .primary-download:hover { background: var(--rose-dark); }
.capture-button:disabled { opacity: .65; cursor: wait; }
.capture-button-icon { font-size: 16px; line-height: 10px; }
.camera-toggle { width: 44px; height: 44px; border-radius: 50%; color: #827a71; font-size: 14px; }
.capture-error { padding: 10px 14px; border-top: 1px solid #f2d6d1; background: #fff2f0; color: #994d46; font-size: 10px; line-height: 1.5; }
.photo-review { margin-top: 12px; padding: 12px; border: 1px solid #e8e1da; border-radius: 8px; background: #fffdfa; }
.review-title, .decoration-heading, .export-heading { display: flex; align-items: center; justify-content: space-between; }
.review-title > span { color: #9a9189; font-size: 8px; font-weight: 700; letter-spacing: 1px; }
.photo-thumbnails { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0 2px; }
.photo-thumb { position: relative; flex: 0 0 62px; height: 74px; overflow: hidden; border-radius: 5px; background: #ede7e0; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-thumb span { position: absolute; right: 3px; bottom: 3px; padding: 2px 4px; border-radius: 3px; background: #27231fc9; color: white; font-size: 8px; }
.thumb-action { position: absolute; top: 3px; display: grid; place-items: center; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 4px; background: #fffdfae8; color: #665b51; font-size: 13px; cursor: pointer; }
.zoom-in { left: 3px; }.replace-shot { right: 24px; }.remove-shot { right: 3px; }
.preview-heading { margin-bottom: 15px; }
.history-actions { display: flex; gap: 6px; }
.small-icon-button { width: 27px; height: 27px; border-radius: 5px; color: #827a71; font-size: 17px; }
.small-icon-button:disabled { opacity: .4; cursor: default; }
.preview-card { padding: 13px; border: 1px solid #e8e1da; border-radius: 9px; background: #fffdfa; }
.preview-topline { display: flex; justify-content: space-between; margin-bottom: 11px; color: #9a9189; font-size: 8px; font-weight: 700; letter-spacing: 1px; }
.preview-resolution { color: var(--rose-dark); }
.canvas-wrap { position: relative; display: grid; place-items: center; min-height: 340px; overflow: hidden; border-radius: 4px; background: #f4eee8; }
#photoCanvas { display: block; width: auto; max-width: 100%; height: 340px; object-fit: contain; box-shadow: 0 6px 18px #54403322; touch-action: none; }
.empty-canvas-message { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 7px; color: #aaa098; pointer-events: none; }
.empty-canvas-message > span { color: #d0aaa0; font-size: 28px; }
.empty-canvas-message strong { color: #81776e; font-family: var(--serif); font-size: 13px; font-weight: 500; }
.empty-canvas-message small { font-size: 9px; }
.drag-hint { margin: 10px 0 0; color: #aaa198; font-size: 9px; text-align: center; }
.editor-controls { margin-top: 13px; overflow: hidden; border: 1px solid #e8e1da; border-radius: 9px; background: #fffdfa; }
.control-section { padding: 14px; border-bottom: 1px solid #eee8e2; }
.control-section:last-child { border-bottom: 0; }
.control-section h3 { margin: 0 0 12px; font-family: var(--serif); font-size: 13px; font-weight: 600; }
.control-section h3 span { margin-right: 5px; color: var(--rose); font-family: var(--sans); font-size: 15px; }
.full-select { display: block; margin: 6px 0 12px; }
.slider-row { display: grid; grid-template-columns: 75px 1fr 37px; align-items: center; gap: 9px; margin: 9px 0; color: #777067; font-size: 9px; }
.slider-row input { width: 100%; height: 3px; accent-color: var(--rose); }
.slider-row output { color: #9b9086; font-size: 8px; text-align: right; }
.filter-control-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.filter-target-label { display: flex; align-items: center; gap: 6px; color: #9a9189; font-size: 8px; font-weight: 700; letter-spacing: .7px; }
.filter-target-label select { max-width: 132px; height: 27px; padding: 0 7px; border: 1px solid #e8e1da; border-radius: 5px; background: #fffdfa; color: #62584f; font-size: 9px; font-weight: 500; letter-spacing: 0; }
.decoration-heading { margin-bottom: 11px; }
.decoration-heading h3 { margin: 0; }
.sticker-tray { display: flex; gap: 7px; margin-bottom: 11px; }
.sticker-tray button { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid #efe6df; border-radius: 6px; background: #fdf7f2; color: var(--rose-dark); font-size: 17px; cursor: pointer; }
.sticker-tray button:hover { background: var(--rose-pale); transform: translateY(-1px); }
.text-entry { display: flex; gap: 6px; margin-bottom: 12px; }
.text-entry input { flex: 1; min-width: 0; height: 32px; padding: 0 9px; border: 1px solid #e8e1da; border-radius: 5px; font-size: 10px; }
.text-entry button { padding: 0 12px; border: 0; border-radius: 5px; background: #f5e7e1; color: #99564e; font-size: 10px; font-weight: 700; cursor: pointer; }
.full-input { display: block; margin: 6px 0 11px; }
.color-label { display: flex; align-items: center; justify-content: space-between; color: #9a9189; font-size: 8px; font-weight: 700; letter-spacing: .9px; }
.color-label input { width: 34px; height: 22px; padding: 1px; border: 1px solid #e8e1da; border-radius: 4px; background: white; cursor: pointer; }
.export-heading { align-items: start; }
.export-heading h3 { margin: 0 0 5px; }
.export-heading p { margin: 0 0 11px; color: #989087; font-size: 9px; }
.export-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.download-button, .print-button { height: 34px; border: 1px solid #e7dcd4; border-radius: 5px; background: #fffdfa; color: #776b61; font-size: 9px; font-weight: 700; cursor: pointer; }
.primary-download { border-color: var(--rose); background: var(--rose); color: white; }
.print-button { width: 100%; margin-top: 7px; }
.export-note { margin-top: 10px; color: #a69e95; font-size: 8px; text-align: center; }
.gallery-page { min-height: calc(100vh - 130px); }
.gallery-header { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 32px; }
.primary-button { padding: 11px 17px; border: 0; border-radius: 5px; background: var(--rose); color: white; font-size: 11px; font-weight: 700; cursor: pointer; }
.gallery-toolbar { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.gallery-filters { display: flex; gap: 7px; }
.filter-chip { padding: 7px 11px; border: 1px solid #e5ddd5; border-radius: 20px; background: #fffdfa; color: #777067; font-size: 9px; cursor: pointer; }
.filter-chip.selected { border-color: var(--rose); background: var(--rose-pale); color: #99564e; }
.search-box { display: flex; align-items: center; gap: 6px; width: 180px; height: 31px; margin-left: auto; padding: 0 8px; border: 1px solid #e5ddd5; border-radius: 5px; background: white; color: #9b9188; }
.search-box input { width: 100%; border: 0; outline: 0; font-size: 10px; }
.danger-text { color: #a16e66; }
.saved-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.saved-card { overflow: hidden; border: 1px solid #e8e1da; border-radius: 8px; background: white; }
.saved-card img { display: block; width: 100%; height: 220px; object-fit: contain; background: #f4eee8; }
.saved-card-body { padding: 11px; }
.saved-card-body strong { display: block; margin-bottom: 4px; font-family: var(--serif); font-size: 13px; }
.saved-card-body small { color: #999087; font-size: 9px; }
.saved-card-actions { display: flex; gap: 7px; margin-top: 10px; }
.saved-card-actions button { flex: 1; padding: 6px; border: 1px solid #eee5de; border-radius: 4px; background: #fffdfa; color: #766c62; font-size: 9px; cursor: pointer; }
.saved-card-actions .delete-session { color: #a4655d; }
.gallery-empty { padding: 70px 0; color: #938a81; text-align: center; }
.gallery-empty > span { color: #d39389; font-size: 40px; }
.gallery-empty h2 { margin: 12px 0 6px; color: var(--ink); font-family: var(--serif); font-weight: 500; }
.gallery-empty p { font-size: 11px; }
.toast { position: fixed; z-index: 20; right: 22px; bottom: 22px; max-width: min(360px, calc(100vw - 40px)); padding: 11px 15px; transform: translateY(20px); border-radius: 6px; background: #302c28; color: white; font-size: 11px; opacity: 0; pointer-events: none; transition: .22s; }
.toast.visible { transform: translateY(0); opacity: 1; }
.modal-backdrop { position: fixed; z-index: 10; inset: 0; display: grid; place-items: center; padding: 18px; background: #2c272355; }
.settings-dialog { position: relative; width: min(440px, 100%); padding: 28px; border-radius: 10px; background: #fffdfa; box-shadow: 0 20px 80px #0002; }
.settings-dialog h2 { margin: 0 0 18px; font-family: var(--serif); font-size: 24px; }
.modal-close { position: absolute; top: 12px; right: 14px; border: 0; background: none; color: #8d857d; font-size: 24px; cursor: pointer; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 14px 0; border-top: 1px solid #eee8e2; }
.setting-row strong, .setting-row small { display: block; }
.setting-row strong { font-size: 11px; }
.setting-row small { max-width: 295px; margin-top: 4px; color: #928980; font-size: 9px; line-height: 1.5; }
.setting-row input { accent-color: var(--rose); }
.privacy-copy { margin: 12px 0 0; padding: 11px; border-radius: 5px; background: #f8f2ed; color: #847a70; font-size: 9px; line-height: 1.6; }
.site-footer { display: flex; justify-content: space-between; padding: 18px 5.2%; border-top: 1px solid #eee8e2; color: #a39b92; font-size: 9px; }
.site-footer span:first-child { color: #87786f; font-family: var(--serif); font-size: 11px; }
@media (max-width: 900px) {
  .studio-page, .gallery-page { padding-right: 4%; padding-left: 4%; }
  .studio-grid { grid-template-columns: minmax(0, 1fr) minmax(310px, .9fr); gap: 20px; }
  .frame-scroller { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .saved-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .topbar { position: sticky; z-index: 5; top: 0; height: 61px; padding: 0 4%; backdrop-filter: blur(14px); }
  .brand strong { font-size: 17px; }.brand small { font-size: 7px; }
  .main-nav { gap: 15px; }.nav-link { font-size: 11px; }
  .local-note { display: none; }.top-actions { gap: 0; }
  .studio-page, .gallery-page { padding-top: 26px; }
  .workflow-stepper { gap: 4px; padding: 10px 8px; }
  .workflow-step { gap: 7px; }
  .workflow-step-number { flex-basis: 27px; width: 27px; height: 27px; }
  .workflow-step strong { font-size: 9px; }
  .workflow-step small { font-size: 7px; }
  .workflow-connector { flex-basis: 14px; }
  .studio-page[data-workflow-step="1"] .studio-grid { grid-template-columns: 1fr; gap: 0; }
  .studio-page[data-workflow-step="1"] .frame-step-content,
  .studio-page[data-workflow-step="1"] .filter-step-panel,
  .studio-page[data-workflow-step="1"] .preview-heading,
  .studio-page[data-workflow-step="1"] .preview-card { grid-column: 1; }
  .studio-page[data-workflow-step="1"] .frame-step-content { grid-row: 1; }
  .studio-page[data-workflow-step="1"] .filter-step-panel { grid-row: 2; }
  .studio-page[data-workflow-step="1"] .preview-heading { grid-row: 3; margin-top: 16px; }
  .studio-page[data-workflow-step="1"] .preview-card { grid-row: 4; }
  .studio-page[data-workflow-step="1"] .filter-step-panel { margin-top: 6px; }
  .studio-page[data-workflow-step="3"] .preview-column { display: block; }
  .studio-page[data-workflow-step="3"] .editor-controls { display: block; }
  .studio-page[data-workflow-step="3"] .filter-step-panel,
  .studio-page[data-workflow-step="3"] .decoration-section,
  .studio-page[data-workflow-step="3"] .export-section { border-right: 0; border-left: 0; }
  .studio-page[data-workflow-step="3"] .export-section { border-left: 0; }
  .intro { align-items: start; gap: 12px; }.session-badge { margin-top: 12px; white-space: nowrap; font-size: 10px; }
  .studio-grid { grid-template-columns: 1fr; gap: 26px; }
  .preview-column { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); align-items: start; gap: 0 14px; }
  .preview-heading { grid-column: 1 / -1; }
  .preview-card { grid-column: 1; }
  .editor-controls { grid-column: 2; grid-row: 2; margin-top: 0; }
  .canvas-wrap { min-height: 290px; }
  #photoCanvas { height: 285px; }
  .saved-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .topbar { padding: 0 14px; }
  .brand { gap: 7px; }.brand-mark { width: 32px; height: 32px; font-size: 20px; }
  .main-nav { gap: 11px; }.nav-link { font-size: 10px; }
  .icon-button { width: 31px; height: 31px; }
  .studio-page, .gallery-page { padding: 26px 14px 42px; }
  .workflow-stepper { margin-right: -3px; margin-left: -3px; padding: 9px 5px; }
  .workflow-step { flex-direction: column; align-items: flex-start; gap: 4px; padding: 2px; }
  .workflow-step-number { flex-basis: 25px; width: 25px; height: 25px; }
  .workflow-step strong { max-width: 90px; font-size: 8px; }
  .workflow-step small { max-width: 90px; font-size: 7px; }
  .workflow-connector { flex-basis: 9px; margin-top: -16px; }
  .workflow-context { margin-bottom: 15px; font-size: 9px; }
  .stage-navigation { align-items: stretch; }
  .stage-button { padding: 8px 9px; font-size: 9px; }
  .mobile-camera-button { display: inline-block; }
  .capture-shortcuts { gap: 10px; }
  .intro { flex-direction: column; margin-bottom: 25px; }.session-badge { margin: 0; }
  h1 { font-size: 34px; }
  .frame-scroller { grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: 300px; }
  .capture-options { grid-template-columns: 1fr 1fr; }.camera-select-field, .camera-filter-field { grid-column: 1 / -1; }
  .camera-stage { min-height: 0; aspect-ratio: 4 / 3; }
  .capture-footer { gap: 8px; padding: 10px; }.capture-button { min-height: 44px; padding: 9px 12px; font-size: 10px; }
  .stage-button { min-height: 44px; padding: 10px 12px; font-size: 10px; }
  .camera-toggle { flex: 0 0 44px; }
  .flip-button { width: 40px; height: 40px; }
  .preview-column { display: block; }
  .editor-controls { margin-top: 13px; }
  .canvas-wrap { min-height: 350px; }
  #photoCanvas { height: 345px; }
  .studio-page[data-workflow-step="1"] .canvas-wrap { min-height: 300px; }
  .studio-page[data-workflow-step="1"] #photoCanvas { height: 295px; max-width: 100%; }
  .gallery-header { align-items: start; gap: 10px; margin-top: 0; }
  .gallery-header .primary-button { flex: 0 0 auto; padding: 9px 11px; font-size: 9px; }
  .gallery-toolbar { flex-wrap: wrap; gap: 8px; }
  .search-box { order: 3; width: 100%; margin-left: 0; }
  .gallery-toolbar .danger-text { margin-left: auto; }
  .saved-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
  .saved-card img { height: 175px; }.saved-card-body { padding: 8px; }
  .site-footer { gap: 8px; padding: 15px; font-size: 7px; }
}
@media (max-width: 380px) {
  .brand strong { font-size: 15px; }
  .brand small { letter-spacing: 1px; }
  .main-nav { gap: 7px; }
  .nav-link { font-size: 9px; }
  .studio-page, .gallery-page { padding-right: 11px; padding-left: 11px; }
  .frame-scroller { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .capture-shortcuts { gap: 7px; }
  .capture-heading .text-button { font-size: 10px; }
}
