:root {
  --bg: #fbf8f5;
  --ink: #1d1a17;
  --muted: #78706a;
  --line: #e9e3dc;
  --accent: #b8927b;
  --accent-dark: #8e6d58;
  --rose: #d9b7a8;
  --danger: #b4372a;
  --success: #2f6a4f;
  --radius: 14px;
  --shadow: 0 6px 30px rgba(29, 26, 23, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

h1, h2, h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0 0 0.4em;
}
h1 { font-size: 2.4rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.25rem; }

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.muted { color: var(--muted); }
.fine { color: var(--muted); font-size: 0.85rem; }
.hidden { display: none !important; }

/* ---- header ---- */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 40px; border-bottom: 1px solid var(--line);
  background: #fff;
}
.brand {
  font-family: "Cormorant Garamond", serif; font-size: 1.4rem;
  color: var(--ink); letter-spacing: 0.05em;
}
.brand-mark { color: var(--accent); margin-right: 4px; }
.site-header nav { display: flex; gap: 18px; align-items: center; }
.site-header nav a { color: var(--ink); }
.credits-chip {
  border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px;
  font-size: 0.9rem; background: #fff;
}

/* ---- buttons ---- */
.btn {
  display: inline-block; padding: 10px 20px; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer; font-size: 0.95rem;
  font-weight: 500; text-decoration: none; transition: all 0.15s ease;
}
.btn-primary {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: #fff; }
.btn-large { padding: 14px 28px; font-size: 1.05rem; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---- flashes ---- */
.flashes { max-width: 900px; margin: 16px auto; padding: 0 20px; }
.flash { padding: 10px 14px; border-radius: 10px; margin-bottom: 8px; font-size: 0.95rem; }
.flash-error   { background: #fbe4e1; color: var(--danger); }
.flash-success { background: #e1f1e8; color: var(--success); }
.flash-info    { background: #eee6df; color: var(--muted); }

/* ---- main layout ---- */
main { max-width: 1100px; margin: 0 auto; padding: 40px 24px 80px; }

/* ---- landing ---- */
.hero {
  display: grid; grid-template-columns: 1fr; gap: 32px;
  padding: 40px 0 24px; text-align: center;
}
.hero h1 { font-size: 3rem; line-height: 1.1; }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 620px; margin: 0 auto; }
.hero-cta { display: flex; gap: 10px; justify-content: center; margin-top: 10px; }

.collection { margin-top: 48px; }
.dress-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px; margin-top: 16px;
}
.dress-card {
  margin: 0; background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform 0.15s;
}
.dress-card:hover { transform: translateY(-2px); }
.dress-card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
.dress-card figcaption { padding: 12px 14px 16px; }
.dress-card figcaption .dress-designer { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 2px; }
.dress-card figcaption strong { display: block; font-family: "Cormorant Garamond", serif; font-size: 1.15rem; }
.dress-card figcaption span { display: block; color: var(--muted); font-size: 0.85rem; margin-top: 2px; }

.how { margin-top: 64px; }
.steps { list-style: none; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.steps li { background: #fff; padding: 20px; border-radius: var(--radius); box-shadow: var(--shadow); }
.steps li strong { display: block; color: var(--accent); font-size: 1.2rem; margin-bottom: 6px; }

/* ---- auth ---- */
.auth-card {
  max-width: 400px; margin: 40px auto; background: #fff; padding: 32px;
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack label { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; color: var(--muted); }
.stack input {
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); font-size: 1rem;
}
.stack input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---- social login ---- */
.social-buttons { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.social-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 11px 14px; border-radius: 10px; font-weight: 500; font-size: 0.95rem;
  border: 1px solid var(--line); text-decoration: none; transition: filter 0.15s;
}
.social-btn:hover { filter: brightness(0.97); text-decoration: none; }
.social-google   { background: #fff; color: #1f1f1f; }
.social-facebook { background: #1877f2; color: #fff; border-color: #1877f2; }
.social-apple    { background: #000; color: #fff; border-color: #000; }

.social-icon {
  width: 18px; height: 18px; display: inline-block;
  background-repeat: no-repeat; background-position: center; background-size: contain;
}
.social-icon-google {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'><path fill='%23FFC107' d='M43.6 20.5H42V20H24v8h11.3C33.7 32.9 29.3 36 24 36c-6.6 0-12-5.4-12-12s5.4-12 12-12c3.1 0 5.9 1.2 8 3.1l5.7-5.7C34.5 6.1 29.6 4 24 4 12.9 4 4 12.9 4 24s8.9 20 20 20 20-8.9 20-20c0-1.3-.1-2.4-.4-3.5z'/><path fill='%23FF3D00' d='M6.3 14.7l6.6 4.8C14.6 15.1 18.9 12 24 12c3.1 0 5.9 1.2 8 3.1l5.7-5.7C34.5 6.1 29.6 4 24 4 16.3 4 9.7 8.3 6.3 14.7z'/><path fill='%234CAF50' d='M24 44c5.5 0 10.3-2 14-5.3l-6.5-5.3c-2 1.4-4.5 2.3-7.5 2.3-5.3 0-9.7-3.1-11.3-7.5l-6.6 5.1C9.5 39.6 16.1 44 24 44z'/><path fill='%231976D2' d='M43.6 20.5H42V20H24v8h11.3c-.8 2.4-2.5 4.4-4.6 5.7l6.5 5.3C40.2 36 44 30.7 44 24c0-1.3-.1-2.4-.4-3.5z'/></svg>");
}
.social-icon-facebook {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%23ffffff' d='M13 22v-8h3l1-4h-4V7.5c0-1.2.5-2 2-2h2V2h-3c-3 0-5 1.8-5 5v3H6v4h3v8h4z'/></svg>");
}
.social-icon-apple {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%23ffffff' d='M16.365 1.43c0 1.14-.438 2.22-1.154 3.014-.83.93-2.18 1.64-3.27 1.55-.14-1.12.42-2.25 1.12-2.98.8-.84 2.16-1.52 3.3-1.58zM20.56 17.27c-.53 1.23-.78 1.78-1.46 2.86-.95 1.52-2.29 3.41-3.94 3.42-1.47 0-1.85-.96-3.85-.95-2 .01-2.41.97-3.88.96-1.65-.01-2.92-1.71-3.87-3.23C.96 16.63.67 11.59 2.47 8.92c1.28-1.9 3.29-3.01 5.17-3.01 1.92 0 3.13 1.05 4.72 1.05 1.54 0 2.48-1.06 4.71-1.06 1.67.01 3.45.91 4.72 2.48-4.15 2.27-3.48 8.2.77 9.89z'/></svg>");
}

.divider {
  text-align: center; color: var(--muted); font-size: 0.85rem; margin: 14px 0;
  position: relative;
}
.divider::before, .divider::after {
  content: ""; position: absolute; top: 50%; width: 38%; height: 1px; background: var(--line);
}
.divider::before { left: 0; }
.divider::after  { right: 0; }
.divider span { background: #fff; padding: 0 10px; }

/* ---- try-on page ---- */
.tryon-header { text-align: center; margin-bottom: 24px; }
.tryon-grid {
  display: grid; gap: 20px;
  grid-template-columns: 1fr 1fr;
}
.tryon-grid .generate-panel { grid-column: 1 / -1; text-align: center; }
@media (max-width: 820px) { .tryon-grid { grid-template-columns: 1fr; } }

.panel {
  background: #fff; border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow);
}

.dropzone {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 2px dashed var(--line); border-radius: var(--radius);
  padding: 20px; min-height: 320px; cursor: pointer; background: var(--bg);
  transition: border-color 0.15s, background-color 0.15s;
}
.dropzone.small { min-height: 220px; }
.dropzone:hover { border-color: var(--accent); }
.dropzone.drag-over {
  border-color: var(--accent);
  background: #f2e7df;
  border-style: solid;
}
.dropzone.drag-over .dropzone-hint-main { color: var(--accent-dark); }
.dropzone img { max-width: 100%; max-height: 280px; border-radius: 10px; display: none; }
.dropzone img.has-image { display: block; }
.dropzone.has-image .dropzone-hint { display: none; }
.dropzone-hint {
  color: var(--muted); font-size: 0.9rem; margin-top: 10px; text-align: center;
  display: flex; flex-direction: column; gap: 2px;
  pointer-events: none;
}
.dropzone-hint-main { color: var(--ink); font-weight: 500; font-size: 0.95rem; }
.dropzone-hint-sub  { color: var(--muted); font-size: 0.82rem; }

/* Floating × "remove/change" button overlaid on the preview image. */
.dropzone-remove {
  position: absolute; top: 10px; right: 10px;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(29, 26, 23, 0.72); color: #fff;
  border: none; cursor: pointer;
  font-size: 1.3rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: background 0.15s, transform 0.15s;
  z-index: 2;
}
.dropzone-remove:hover { background: var(--danger); transform: scale(1.08); }
.dropzone-remove:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- explicit camera / upload buttons inside the dropzone ---- */
.dropzone-actions {
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: center; align-items: center;
  margin-bottom: 10px;
  width: 100%;
  max-width: 380px;
}
.dropzone.has-image .dropzone-actions { display: none; }
.dropzone-action-btn {
  flex: 1 1 140px;
  min-height: 48px;       /* touch-friendly */
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px;
  font-size: 0.95rem; font-weight: 500;
  white-space: nowrap;
}
.dropzone-action-btn svg { flex-shrink: 0; }
.dropzone-hint-desktop { display: inline; }

@media (max-width: 640px) {
  /* Tighter dropzone for small viewports, but bigger tap targets. */
  .dropzone { min-height: 240px; padding: 16px; }
  .dropzone.small { min-height: 200px; }
  .dropzone-actions { flex-direction: column; max-width: 280px; gap: 8px; }
  .dropzone-action-btn { width: 100%; min-height: 52px; font-size: 1rem; }
  /* Drag-and-drop is desktop-only; hide the hint on phones. */
  .dropzone-hint-desktop { display: none; }
  .dropzone-hint { margin-top: 4px; }
  .dropzone-remove { width: 40px; height: 40px; font-size: 1.5rem; top: 8px; right: 8px; }
}

/* ---- photo tips ---- */
.photo-tips {
  margin-top: 14px;
  background: #f6efe8;
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 12px 16px 14px;
  font-size: 0.88rem;
  color: var(--ink);
}
.photo-tips summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent-dark);
  list-style: none;
  display: flex; align-items: center; gap: 8px;
  padding: 2px 0;
  user-select: none;
}
.photo-tips summary::-webkit-details-marker { display: none; }
.photo-tips summary::before {
  content: "▸";
  color: var(--accent);
  font-size: 0.8rem;
  transition: transform 0.15s;
  display: inline-block;
}
.photo-tips[open] summary::before { transform: rotate(90deg); }
.photo-tips-list {
  margin: 10px 0 0; padding-left: 20px;
  color: var(--ink); line-height: 1.55;
}
.photo-tips-list li { margin-bottom: 5px; }
.photo-tips-list li strong { color: var(--accent-dark); }
.photo-tips-footnote {
  margin: 10px 0 0; padding-top: 8px;
  border-top: 1px dashed var(--line);
  color: var(--muted); font-size: 0.82rem; font-style: italic;
}
.photo-tips-compact { font-size: 0.85rem; padding: 10px 14px 12px; }
.photo-tips-compact .photo-tips-list { margin-top: 8px; }

.tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.tab {
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
  padding: 8px 14px; border-radius: 999px; cursor: pointer; font-size: 0.9rem;
}
.tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---- saved / all scope pills on try-on ---- */
.dress-scope-pills {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}
.scope-pill {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: 7px 14px; border-radius: 999px; cursor: pointer;
  font-family: inherit; font-size: 0.85rem; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none;
  transition: all 0.15s;
}
.scope-pill:hover { border-color: var(--rose); color: var(--accent-dark); text-decoration: none; }
.scope-pill.active {
  background: var(--ink); color: #fff; border-color: var(--ink);
}
.scope-count {
  font-size: 0.72rem;
  background: rgba(0, 0, 0, 0.08);
  padding: 1px 7px; border-radius: 999px;
  font-weight: 600;
}
.scope-pill.active .scope-count {
  background: rgba(255,255,255,0.22);
}
.scope-link {
  margin-left: auto;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
}
.scope-link:hover { color: var(--accent-dark); background: transparent; }

.saved-empty {
  grid-column: 1 / -1;
  text-align: center; padding: 24px 12px;
  color: var(--muted);
}

.dress-filter-pills {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px;
}
.filter-pill {
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; font-family: inherit; font-size: 0.8rem; font-weight: 500;
  color: var(--muted); cursor: pointer; transition: all 0.15s;
  white-space: nowrap;
}
.filter-pill:hover { border-color: var(--accent); color: var(--ink); }
.filter-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.dress-search-wrap {
  position: relative; margin-bottom: 12px; display: flex; align-items: center; gap: 10px;
}
.dress-search-wrap input {
  flex: 1; padding: 9px 14px 9px 36px;
  border: 1px solid #e5d8cc; border-radius: 999px;
  font-family: inherit; font-size: 0.875rem; color: var(--ink);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2399897a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat 12px center;
  outline: none; transition: border-color 0.2s;
}
.dress-search-wrap input:focus { border-color: var(--rose); }
.dress-search-count { font-size: 0.78rem; color: var(--muted); white-space: nowrap; }

.dress-picker {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  max-height: 380px; overflow-y: auto; padding: 4px;
}
.dress-option { cursor: pointer; text-align: center; }
.dress-option input { display: none; }
.dress-option img {
  width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 10px;
  border: 3px solid transparent; transition: border-color 0.15s;
}
.dress-option input:checked + img { border-color: var(--accent); }
.dress-option-name { display: block; font-size: 0.8rem; color: var(--muted); margin-top: 4px; }
.dress-option-name em { display: block; font-style: normal; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--accent); }

.status { margin-top: 12px; min-height: 1.4em; color: var(--muted); font-size: 0.95rem; }
.status.error { color: var(--danger); }

/* ---- result ---- */
.result {
  margin-top: 32px; background: #fff; padding: 26px; border-radius: var(--radius);
  box-shadow: var(--shadow); text-align: center;
}
.result img { max-width: 100%; max-height: 640px; border-radius: var(--radius); }
.result-actions { margin-top: 18px; display: flex; gap: 10px; justify-content: center; }

/* ---- history ---- */
.history-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  margin-top: 18px;
}
.history-card { margin: 0; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.history-card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
.history-card figcaption { padding: 10px 14px; }

/* ---- billing ---- */
.pack-grid {
  display: grid; gap: 16px; margin-top: 20px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.pack-card {
  background: #fff; padding: 28px; border-radius: var(--radius);
  text-align: center; box-shadow: var(--shadow);
}
.notice {
  margin-top: 20px; padding: 20px; background: #fff;
  border-left: 4px solid var(--accent); border-radius: 10px; box-shadow: var(--shadow);
}

/* ---- dress card interactive ---- */
.dress-card { cursor: pointer; }
.dress-card figcaption .try-on-hint {
  display: block; font-size: 0.78rem; color: var(--accent);
  margin-top: 6px; opacity: 0; transition: opacity 0.15s;
}
.dress-card:hover figcaption .try-on-hint { opacity: 1; }

/* ---- modal ---- */
.modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(29,26,23,0.55); backdrop-filter: blur(3px); }
.modal-box {
  position: relative; background: #fff; border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(29,26,23,0.25); max-width: 860px; width: 100%;
  max-height: 90vh; overflow-y: auto;
}
.modal-close {
  position: absolute; top: 14px; right: 16px; background: none; border: none;
  font-size: 1.5rem; cursor: pointer; color: var(--muted); line-height: 1; z-index: 1;
}
.modal-close:hover { color: var(--ink); }
.modal-layout { display: grid; grid-template-columns: 1fr 1.4fr; min-height: 480px; }
@media (max-width: 640px) { .modal-layout { grid-template-columns: 1fr; } }
.modal-dress-col {
  background: var(--bg); border-radius: var(--radius) 0 0 var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
}
.modal-dress-col img { width: 100%; aspect-ratio: 3/4; object-fit: cover; flex: 1; min-height: 0; }
.modal-dress-meta { padding: 14px 16px; }
.modal-action-col { padding: 32px 28px; display: flex; flex-direction: column; gap: 16px; }
.modal-action-col h2 { margin-bottom: 4px; }
.modal-auth-btns { display: flex; flex-direction: column; gap: 10px; }

/* ---- pre-photo notice on tryon page ---- */
.pre-photo-notice {
  display: flex; align-items: center; justify-content: space-between;
  background: #e8f4ed; border-radius: 10px; padding: 12px 16px;
  color: var(--success); font-size: 0.95rem; margin-bottom: 10px;
}

/* ---- spinner ---- */
.spinner {
  display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin 0.8s linear infinite; vertical-align: -2px; margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.site-footer {
  text-align: center; padding: 24px; color: var(--muted);
  border-top: 1px solid var(--line);
}

/* ==========================================================================
   Mobile adaptations — applied below so they override earlier rules.
   Target: all pages, phones up to ~600px, plus secondary tweaks to 820px.
   ========================================================================== */
@media (max-width: 820px) {
  main:not(.main-flush) { padding: 88px 16px 48px; }       /* fixed-header clearance, smaller edges */
  main.main-flush { padding: 0; }
  .tryon { padding-top: 12px; }
  h1 { font-size: 1.85rem; }
  h2 { font-size: 1.4rem; }
  h3 { font-size: 1.15rem; }
  .auth-card { margin: 24px 12px; padding: 22px; max-width: none; }
  .auth-card h1 { font-size: 1.8rem; }
  .stack input { font-size: 16px; }        /* 16px prevents iOS zoom-on-focus */
  .social-btn { font-size: 0.9rem; padding: 10px 12px; }
  .pack-grid { grid-template-columns: 1fr; gap: 12px; }
  .pack-card { padding: 22px; }
  .history-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .history-card figcaption { padding: 8px 10px; font-size: 0.85rem; }
  .tryon-grid { gap: 14px; }
  .panel { padding: 16px; border-radius: 12px; }
  .tabs { gap: 4px; }
  .tab { padding: 8px 12px; font-size: 0.82rem; }
  .dress-picker { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); max-height: 320px; gap: 8px; }
  .dress-option-name { font-size: 0.72rem; }
  .dress-scope-pills { gap: 6px; padding-bottom: 8px; flex-wrap: wrap; }
  .scope-pill { padding: 6px 12px; font-size: 0.82rem; }
  .scope-link { margin-left: 0; }
  .dress-filter-pills { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 4px; }
  .dress-filter-pills::-webkit-scrollbar { display: none; }
  .filter-pill { flex-shrink: 0; }
  .dress-search-wrap input { font-size: 16px; }
  .tryon-header h1 { font-size: 1.6rem; }
  .tryon-header { margin-bottom: 14px; }
  .status { font-size: 0.9rem; }
  .result { padding: 20px 16px; }
  .result img { max-height: 540px; }
  .result-actions { flex-direction: column; }
  .result-actions .btn { width: 100%; }
  .pre-photo-notice { flex-direction: column; gap: 8px; align-items: stretch; text-align: center; }
  .pre-photo-notice button { width: 100%; }
  /* photo-tips stay readable on narrow screens */
  .photo-tips { font-size: 0.85rem; padding: 10px 14px 12px; }
  .photo-tips-list { padding-left: 18px; }
}

@media (max-width: 480px) {
  main { padding-top: 80px; padding-bottom: 36px; }
  .btn-large { padding: 14px 22px; font-size: 1rem; }
  .tryon-header p { font-size: 0.9rem; }
  .history-grid { grid-template-columns: repeat(2, 1fr); }
  .modal-box { padding: 18px; }
  .modal-auth-btns .btn { width: 100%; text-align: center; }
}
