@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,500;0,9..40,700&family=Sora:wght@600;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f1f1f1;
  --surface: #ffffff;
  --card-hover: #f5f5f5;
  --text: #1a1a1a;
  --text-muted: #999;
  --teal: #00b4a0;
  --orange: #ff9500;
  --grad: linear-gradient(135deg, var(--teal), var(--orange));
  --shadow-sm: 0 2px 8px rgba(0,0,0,.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.10);
  --radius: 14px;
  --radius-sm: 10px;
  --touch: 48px;
  --font-d: 'Sora', sans-serif;
  --font-b: 'DM Sans', sans-serif;
}

html, body {
  height: 100%; overflow: hidden;
  background: var(--bg); color: var(--text);
  font-family: var(--font-b);
  -webkit-tap-highlight-color: transparent;
}

/* ═══ UTILITIES ═══ */
.hidden { display: none !important; }

/* ═══ BUTTONS ═══ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: var(--touch); padding: 12px 24px;
  border: none; border-radius: 100px; cursor: pointer;
  font-family: var(--font-b); font-weight: 600; font-size: .9rem;
  transition: transform .12s, box-shadow .2s; user-select: none;
}
.btn:active { transform: scale(.95); }
.btn-solid { background: var(--grad); color: #fff; box-shadow: 0 4px 16px rgba(0,180,160,.2); }
.btn-accent {
  background: var(--surface); color: var(--text); position: relative; z-index: 0;
  box-shadow: var(--shadow-sm);
}
.btn-accent::before {
  content: ''; position: absolute; inset: -2px; border-radius: calc(100px + 2px);
  background: var(--grad); z-index: -1;
}
.btn-accent::after {
  content: ''; position: absolute; inset: 0; border-radius: 100px;
  background: var(--surface); z-index: -1;
}
.btn-outline {
  background: var(--surface); color: var(--text);
  border: 1.5px solid rgba(0,0,0,.1); box-shadow: var(--shadow-sm);
}
.btn-sm { padding: 8px 16px; min-height: 36px; font-size: .82rem; }
.btn-link {
  background: none; border: none; color: var(--teal); font-family: var(--font-b);
  font-size: .78rem; font-weight: 600; cursor: pointer; padding: 4px 0;
}
.btn-icon {
  width: var(--touch); height: var(--touch); padding: 0; border-radius: 50%;
  background: var(--surface); border: none; color: var(--text); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; box-shadow: var(--shadow-sm); transition: background .15s, transform .12s;
}
.btn-icon:active { transform: scale(.9); background: var(--card-hover); }

/* ═══ SCREENS ═══ */
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  transition: opacity .35s ease, transform .35s ease;
  opacity: 0; pointer-events: none; transform: translateY(10px);
  overflow: hidden; background: var(--bg);
}
.screen.active { opacity: 1; pointer-events: all; transform: translateY(0); }

/* ═══ LANDING ═══ */
#landing { justify-content: center; align-items: center; overflow-y: auto; }
.landing-inner { text-align: center; padding: 24px 20px 40px; max-width: 440px; width: 100%; }
.landing-badge {
  display: inline-block; padding: 5px 14px; border-radius: 100px;
  background: rgba(0,180,160,.08); border: 1px solid rgba(0,180,160,.2);
  font-size: .7rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--teal); margin-bottom: 16px;
}
.landing-icon {
  width: 72px; height: 72px; margin: 0 auto 20px;
  background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: center; font-size: 2rem;
  position: relative;
}
.landing-icon::before {
  content: ''; position: absolute; inset: -2px; border-radius: 24px;
  background: var(--grad); z-index: -1;
}
.landing-title {
  font-family: var(--font-d); font-weight: 800;
  font-size: clamp(1.6rem, 6vw, 2.4rem); line-height: 1.15; margin-bottom: 6px;
}
.landing-sub { font-size: .92rem; color: var(--text-muted); font-weight: 300; margin-bottom: 28px; line-height: 1.5; }
.btn-start-glow {
  font-size: 1.05rem; padding: 14px 44px;
  box-shadow: 0 0 20px rgba(0,180,160,.25), 0 0 40px rgba(255,149,0,.12), var(--shadow-md);
  animation: glowPulse 2.5s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(0,180,160,.25), 0 0 40px rgba(255,149,0,.15), var(--shadow-md); }
  50% { box-shadow: 0 0 30px rgba(0,180,160,.4), 0 0 60px rgba(255,149,0,.25), var(--shadow-md); }
}

/* Competition box */
.competition-box {
  margin-top: 28px; padding: 16px 18px; border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,180,160,.12); text-align: center;
}
.competition-header {
  font-size: .85rem; margin-bottom: 8px; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.competition-text { font-size: .8rem; color: var(--text-muted); line-height: 1.6; }
.competition-text strong { color: var(--text); }
.competition-note {
  display: inline-block; margin-top: 6px; font-weight: 600; color: var(--teal); font-size: .75rem;
}

/* Landing livefeed link — secondary action for returning visitors */
.landing-livefeed-link {
  display: inline-block; margin-top: 16px;
  padding: 10px 18px; border-radius: 100px;
  background: rgba(0,180,160,.06);
  color: var(--teal); font-size: .78rem; font-weight: 600;
  text-decoration: none; border: 1.5px solid rgba(0,180,160,.2);
  transition: all .15s; -webkit-tap-highlight-color: transparent;
}
.landing-livefeed-link:active {
  transform: scale(.97); background: rgba(0,180,160,.12);
}

/* ═══ CAMERA ═══ */
#camera-screen { background: #000; }
.camera-header {
  position: absolute; top: 0; left: 0; right: 0; padding: 12px 16px;
  display: flex; justify-content: space-between; align-items: center; z-index: 10;
  gap: 12px;
}
.camera-header-spacer { width: 48px; flex-shrink: 0; }
.cam-btn { background: rgba(255,255,255,.15); color: #fff; box-shadow: none; }

/* Mode toggle (single / collage) */
.mode-toggle {
  display: inline-flex; background: rgba(0,0,0,.55); border-radius: 100px;
  padding: 4px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.12);
}
.mode-seg {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px; border-radius: 100px; border: none;
  background: transparent; color: rgba(255,255,255,.65); cursor: pointer;
  font-family: var(--font-b); font-size: .75rem; font-weight: 600;
  transition: all .18s; -webkit-tap-highlight-color: transparent;
}
.mode-seg.active {
  background: var(--grad); color: #fff;
  box-shadow: 0 2px 10px rgba(0,180,160,.35);
}
.mode-ic { font-size: .9rem; }

.camera-viewport {
  flex: 1; width: 100%; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; background: #000;
}
#camera-video { width: 100%; height: 100%; object-fit: cover; }
#camera-video.hidden { display: none; }

/* Review still-image overlay — shows full captured photo (no zoom/crop) */
.review-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: contain;
  background: #000;
}

/* Collage instruction header (top center, only in collage mode) */
.collage-header {
  position: absolute; top: 64px; left: 50%; transform: translateX(-50%);
  padding: 10px 18px 12px; border-radius: 18px;
  background: rgba(0,0,0,.55); backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.12);
  display: flex; flex-direction: column; gap: 8px; align-items: center;
  z-index: 8; pointer-events: none;
}
.collage-header.hidden { display: none; }
.ch-text {
  font-family: var(--font-d); font-weight: 800; font-size: .9rem;
  color: #fff; letter-spacing: .3px;
}
.ch-progress {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
}
.ch-dot {
  width: 12px; height: 12px; border-radius: 3px;
  background: rgba(255,255,255,.22);
  border: 1px solid rgba(255,255,255,.4);
  transition: all .25s ease;
}
.ch-dot.filled {
  background: var(--teal); border-color: var(--teal);
  box-shadow: 0 0 8px rgba(0,180,160,.5);
}
.ch-dot.active {
  background: rgba(255,255,255,.95); border-color: #fff;
  box-shadow: 0 0 0 2px rgba(0,180,160,.5);
}

.camera-controls {
  flex-shrink: 0; background: #000;
  padding: 20px 24px calc(20px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; justify-content: center; z-index: 10;
  gap: 8px;
}
.cc-group {
  flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.cc-group.hidden { display: none; }

.capture-btn {
  width: 72px; height: 72px; border-radius: 50%; border: 4px solid #fff;
  background: transparent; cursor: pointer; position: relative; transition: transform .12s;
  flex-shrink: 0;
}
.capture-btn::after {
  content: ''; position: absolute; inset: 5px; border-radius: 50%;
  background: var(--grad); transition: inset .12s;
}
.capture-btn:active { transform: scale(.9); }
.capture-btn:active::after { inset: 3px; }
.cam-side-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: 56px; background: none; border: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cam-side-icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; transition: transform .12s; color: #fff;
}
.cam-side-btn:active .cam-side-icon { transform: scale(.9); }
.cam-side-label { font-size: .6rem; font-weight: 600; color: rgba(255,255,255,.7); }
#file-upload { display: none; }

/* Review controls — both small icon buttons; confirm gets teal accent */
.cc-review { justify-content: center; gap: 60px; }
.cam-confirm .cam-side-icon {
  background: var(--grad); color: #fff;
  box-shadow: 0 3px 10px rgba(0,180,160,.35);
}
.cam-confirm .cam-side-label {
  color: var(--teal); font-weight: 700;
}

/* ═══ EDITOR ═══ */
#editor-screen { background: var(--bg); }

.editor-top-bar {
  flex-shrink: 0; display: flex; align-items: center; gap: 6px;
  padding: 4px 10px; width: 100%;
}
.editor-spacer { flex: 1; }

/* Frame chips (in Frame tab panel) */
.frame-chip {
  flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 8px 10px; min-width: 76px;
  border-radius: var(--radius-sm); border: 2px solid transparent;
  background: var(--bg); cursor: pointer; transition: all .15s;
  -webkit-tap-highlight-color: transparent;
}
.frame-chip:active { transform: scale(.96); }
.frame-chip.active {
  border-color: var(--teal); background: rgba(0,180,160,.08);
}
.fc-shape {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
}
.fc-rect {
  background: var(--text-muted); border-radius: 3px;
  transition: background .15s;
}
.frame-chip.active .fc-rect { background: var(--teal); }
.fc-rect-landscape { width: 38px; height: 28px; }
.fc-rect-portrait { width: 28px; height: 38px; }
.fc-none {
  width: 38px; height: 38px; border-radius: 50%;
  border: 2px dashed var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: var(--text-muted);
  transition: all .15s;
}
.frame-chip.active .fc-none { border-color: var(--teal); color: var(--teal); }
.fc-label {
  font-size: .7rem; font-weight: 700; color: var(--text); font-family: var(--font-b);
}

/* Layer controls — inline in editor-top-bar, shown when overlay selected */
.layer-controls {
  display: flex; gap: 4px; flex-shrink: 0;
}
.layer-controls.hidden { display: none; }
.layer-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 10px; border-radius: 100px; border: 1.5px solid rgba(0,0,0,.08);
  background: var(--surface); color: var(--text); cursor: pointer;
  font-family: var(--font-b); font-size: .7rem; font-weight: 600;
  box-shadow: var(--shadow-sm); transition: all .15s;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.layer-btn:active { transform: scale(.95); background: rgba(0,180,160,.08); }
.layer-ic { font-size: .8rem; color: var(--teal); font-weight: 800; }

/* On narrow screens, shorten layer button labels */
@media (max-width: 360px) {
  .layer-btn { padding: 6px 8px; font-size: .65rem; }
}

.canvas-area {
  flex: 1; width: 100%; display: flex; align-items: center; justify-content: center;
  padding: 4px 4px; overflow: hidden; position: relative; min-height: 0;
}
#edit-canvas {
  border-radius: 6px; box-shadow: var(--shadow-md); touch-action: none;
  max-width: 100%; max-height: 100%; display: block;
}

/* Delete bar */
.delete-bar {
  flex-shrink: 0; display: flex; justify-content: center; padding: 4px 16px;
}
.delete-bar.hidden { display: none; }
.btn-delete {
  padding: 6px 20px; border-radius: 100px; border: none;
  background: rgba(239,68,68,.08); color: #ef4444;
  font-family: var(--font-b); font-size: .78rem; font-weight: 600;
  cursor: pointer; transition: all .15s;
}
.btn-delete:active { transform: scale(.93); background: rgba(239,68,68,.15); }

/* Toolbar */
.toolbar {
  flex-shrink: 0; display: flex; justify-content: center; gap: 4px;
  padding: 3px 12px; width: 100%;
}
.toolbar-btn {
  flex: 1; max-width: 100px;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 5px 8px; border-radius: var(--radius-sm); cursor: pointer;
  background: none; border: 2px solid transparent; color: var(--text-muted);
  font-family: var(--font-b); transition: all .15s;
}
.toolbar-btn.active { background: rgba(0,180,160,.06); border-color: var(--teal); color: var(--teal); }
.tb-icon { font-size: 1.2rem; }
.tb-lbl { font-size: .62rem; font-weight: 600; }

/* Panels */
.panel-wrap {
  flex-shrink: 0; width: 100%; overflow: hidden;
  max-height: 0; transition: max-height .25s ease;
  background: var(--surface); border-top: 1px solid rgba(0,0,0,.05);
}
.panel-wrap.open { max-height: 260px; }
.tool-panel { display: none; padding: 8px 12px; }
.tool-panel.active { display: block; }
.panel-row {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none;
}
.panel-row::-webkit-scrollbar { display: none; }
.panel-hint { font-size: .62rem; color: var(--text-muted); text-align: center; padding: 2px 0; }

/* Sticker items */
.sticker-item {
  flex-shrink: 0; width: 52px; height: 52px; border-radius: 10px;
  background: var(--bg); display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: 1.5px solid rgba(0,0,0,.05);
  transition: transform .12s; overflow: hidden; box-shadow: var(--shadow-sm);
}
.sticker-item img { width: 38px; height: 38px; object-fit: contain; }
.sticker-item:active { transform: scale(.9); }

/* Slogan chips */
.slogan-chip {
  flex-shrink: 0; padding: 8px 16px; border-radius: 100px;
  background: var(--bg); font-size: .75rem; font-weight: 600;
  white-space: nowrap; cursor: pointer; border: 1.5px solid rgba(0,0,0,.06);
  color: var(--text); transition: all .12s; box-shadow: var(--shadow-sm);
}
.slogan-chip:active { transform: scale(.95); }
.slogan-chip.add-custom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  min-width: 120px;
  padding: 0 20px;
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
  font-family: var(--font-b);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .3px;
  box-shadow: 0 3px 10px rgba(0,180,160,.35);
}

/* Custom slogan */
.cs-input-row { display: flex; gap: 6px; align-items: center; margin: 6px 0; }
.cs-input {
  flex: 1; padding: 9px 14px; border-radius: 100px;
  border: 1.5px solid rgba(0,0,0,.1); background: var(--bg);
  font-family: var(--font-b); font-size: .82rem; font-weight: 500;
  color: var(--text); outline: none;
}
.cs-input:focus { border-color: var(--teal); }
.cs-color-row {
  display: flex; align-items: center; gap: 8px; margin: 6px 0 4px;
}
.cs-color-label {
  font-size: .7rem; font-weight: 600; color: var(--text-muted); flex-shrink: 0;
}
.hue-bar-wrap {
  flex: 1; position: relative; height: 28px; border-radius: 14px;
  cursor: pointer; touch-action: none; overflow: visible;
}
.hue-canvas { width: 100%; height: 28px; border-radius: 14px; display: block; box-shadow: var(--shadow-sm); }
.hue-thumb {
  position: absolute; top: 50%; width: 20px; height: 20px;
  border-radius: 50%; border: 3px solid #fff;
  box-shadow: 0 1px 6px rgba(0,0,0,.3); transform: translate(-50%, -50%);
  pointer-events: none; left: 0;
}
.color-swatch {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid rgba(0,0,0,.1); box-shadow: var(--shadow-sm);
}

/* Speech bubble sticker indicator (in Deco panel) */
.sticker-bubble {
  border-color: var(--teal) !important;
  position: relative;
}
.sticker-bubble::after {
  content: 'T'; position: absolute; top: -2px; right: -2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--teal); color: #fff;
  font-size: .55rem; font-weight: 800; font-family: var(--font-d);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.2); border: 1.5px solid #fff;
}

.sticker-slogan {
  width: 88px; height: 56px;
  background: #1a1a1a;
  border-color: rgba(255,255,255,.1);
}
.sticker-slogan img { width: 78px; height: 46px; object-fit: contain; }

/* Cancel link inside bubble input row */
#btn-cancel-bubble { white-space: nowrap; }

/* Action bar */
.action-bar {
  flex-shrink: 0; width: 100%; display: flex; align-items: stretch;
  gap: 8px; padding: 4px 16px 10px;
}
.action-bar .btn { flex: 1; }
/* Two-line action buttons: label + what it actually does */
.btn-stacked {
  flex-direction: column; gap: 1px; line-height: 1.2;
  padding: 9px 8px; text-align: center;
}
.btn-stacked .ab-main { font-size: .84rem; font-weight: 700; }
.btn-stacked .ab-sub { font-size: .6rem; font-weight: 500; opacity: .8; }

/* ═══ SUBMIT ═══ */
#submit-screen { background: var(--bg); }
.submit-header {
  flex-shrink: 0; width: 100%; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.submit-title { font-family: var(--font-d); font-size: .7rem; letter-spacing: 1.5px; }
.submit-inner {
  flex: 1; width: 100%; max-width: 480px; align-self: center;
  overflow-y: auto; padding: 0 20px 24px; -webkit-overflow-scrolling: touch;
}
.submit-preview-wrap { width: 100%; display: flex; justify-content: center; margin-bottom: 14px; }
.submit-preview { width: 120px; border-radius: 10px; box-shadow: var(--shadow-lg); }
.submit-form { display: flex; flex-direction: column; gap: 12px; }
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-label { font-size: .78rem; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.optional-tag {
  font-size: .63rem; font-weight: 500; color: var(--text-muted);
  background: rgba(0,0,0,.04); padding: 1px 7px; border-radius: 100px;
}
.form-input {
  padding: 11px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid rgba(0,0,0,.1); background: var(--surface);
  font-family: var(--font-b); font-size: .88rem; font-weight: 500;
  color: var(--text); outline: none; transition: border-color .2s;
}
.form-input:focus { border-color: var(--teal); }
.form-hint { font-size: .68rem; color: var(--text-muted); line-height: 1.4; }
.submit-foot { text-align: center; margin-top: 2px; }

/* Grouped fields, so public vs private is obvious at a glance */
.field-block {
  display: flex; flex-direction: column; gap: 12px;
  padding: 12px 13px 13px; border-radius: var(--radius-sm);
  background: rgba(0,0,0,.02); border: 1.5px solid rgba(0,0,0,.06);
}
.field-block-head { display: flex; }
.fb-tag {
  font-size: .62rem; font-weight: 700; letter-spacing: .3px;
  padding: 3px 9px; border-radius: 100px;
}
.fb-tag-public  { background: rgba(0,180,160,.12); color: #00857a; }
.fb-tag-private { background: rgba(0,0,0,.07); color: var(--text-muted); }

/* Explicit sharing consent */
.consent-box {
  padding: 13px 14px; border-radius: var(--radius-sm);
  background: rgba(0,180,160,.06); border: 1.5px solid rgba(0,180,160,.3);
  display: flex; flex-direction: column; gap: 7px;
}
.consent-title {
  font-size: .76rem; font-weight: 800; letter-spacing: .2px; color: #00857a;
}
.consent-text { font-size: .7rem; line-height: 1.5; color: var(--text); margin: 0; }
.consent-check {
  display: flex; align-items: flex-start; gap: 9px;
  margin-top: 3px; padding-top: 9px;
  border-top: 1px solid rgba(0,180,160,.22);
  cursor: pointer;
}
.consent-check input[type="checkbox"] {
  flex-shrink: 0; width: 20px; height: 20px; margin: 0;
  accent-color: var(--teal); cursor: pointer;
}
.consent-check-text {
  font-size: .72rem; font-weight: 600; line-height: 1.4; color: var(--text);
}
.caption-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 4px; }
.caption-chip {
  padding: 6px 12px; border-radius: 100px;
  background: var(--surface); font-size: .72rem; font-weight: 600;
  cursor: pointer; border: 1.5px solid rgba(0,0,0,.08);
  color: var(--text); transition: all .15s; box-shadow: var(--shadow-sm);
}
.caption-chip.selected { background: var(--teal); color: #fff; border-color: var(--teal); }
.btn-submit-final { width: 100%; padding: 13px; margin-top: 4px; }
.btn-submit-final:disabled { opacity: .5; cursor: not-allowed; }
.btn-submit-final:disabled:active { transform: none; }
.spinner {
  width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.3);
  border-top-color: #fff; border-radius: 50%;
  animation: spin .6s linear infinite; display: inline-block;
}
.spinner.hidden { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══ DONE ═══ */
#done-screen { justify-content: center; align-items: center; }
.done-inner { text-align: center; padding: 28px 20px; max-width: 440px; }
.done-icon {
  width: 72px; height: 72px; margin: 0 auto 20px;
  background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: center; font-size: 2rem;
  position: relative;
}
.done-icon::before {
  content: ''; position: absolute; inset: -2px; border-radius: 24px;
  background: var(--grad); z-index: -1;
}
.done-inner h2 { font-family: var(--font-d); font-size: 1.4rem; margin-bottom: 8px; }
.done-inner p { color: var(--text-muted); margin-bottom: 28px; line-height: 1.6; font-size: .88rem; }
.btn-livefeed-link { display: flex; width: 100%; font-size: .92rem; }
.done-inner .btn-outline { width: 100%; }
.done-email-note {
  display: inline-block; margin-top: 4px;
  background: rgba(0,180,160,.08); padding: 7px 14px; border-radius: 8px;
  color: var(--teal); font-weight: 600; font-size: .8rem;
}

/* ═══ TOAST ═══ */
.toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--text); color: #fff; padding: 10px 22px;
  border-radius: 100px; font-size: .82rem; font-weight: 600; box-shadow: var(--shadow-lg);
  opacity: 0; transition: opacity .3s, transform .3s; z-index: 999; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ═══ LANDSCAPE CAMERA — side bar layout ═══ */
@media (orientation: landscape) {
  /* Camera screen becomes horizontal: viewport on left, controls on right */
  #camera-screen { flex-direction: row; }
  .camera-viewport { flex: 1; height: 100%; }

  /* Header overlays top of viewport, doesn't span over the controls strip */
  .camera-header {
    right: 96px;
    padding: 8px 12px calc(8px + env(safe-area-inset-top, 0px));
  }

  /* Collage instruction header — top-left in landscape so it doesn't overlap mode toggle */
  .collage-header {
    top: 60px; left: 12px; transform: none;
    flex-direction: row; padding: 8px 12px;
  }
  .ch-text { font-size: .8rem; }

  /* Camera controls become a vertical strip on the right */
  .camera-controls {
    width: 96px; height: 100%; flex-direction: column;
    padding: 16px 8px calc(16px + env(safe-area-inset-right, 0px)) 8px;
    justify-content: center; align-items: center;
    gap: 12px;
  }
  .cc-group {
    flex-direction: column; height: 100%;
    justify-content: space-around; align-items: center;
  }
  .capture-btn { width: 64px; height: 64px; }
  .cam-side-btn { width: 56px; }
  .cam-side-icon { width: 40px; height: 40px; font-size: 1.2rem; }

  /* Review controls in landscape — gap between stacked icon buttons */
  .cc-review { gap: 24px; }

/* ═══ TABLET+ ═══ */
@media (min-width: 768px) {
  .landing-inner { max-width: 500px; }
  .canvas-area { padding: 8px 16px; }
  .toolbar, .action-bar, .panel-wrap { max-width: 580px; align-self: center; }
}