:root {
  --bg: #f3efe8;
  --surface: rgba(255, 253, 249, 0.92);
  --coach-surface: #eee5db;
  --card: #fff;
  --ink: #28231f;
  --muted: #766f68;
  --line: #e5ddd3;
  --coral: #ed683b;
  --coral-dark: #b64521;
  --coral-ink: #a83c1c;
  --coral-soft: #fde4d9;
  --blue: #607aaa;
  --blue-soft: #e8edf6;
  --green: #547a66;
  --green-soft: #e3eee7;
  --shadow: 0 24px 60px rgba(64, 48, 37, 0.09);
  font-family: Inter, "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--bg); overflow-x: hidden; }
button, input, textarea { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }

.ambient { position: fixed; z-index: -1; width: 34rem; height: 34rem; border-radius: 50%; filter: blur(3px); opacity: .6; }
.ambient-one { top: -16rem; right: -10rem; background: radial-gradient(circle, #f9c9b5, transparent 68%); }
.ambient-two { bottom: -20rem; left: -15rem; background: radial-gradient(circle, #cad7ed, transparent 67%); }

.site-header { width: min(1480px, calc(100% - 48px)); margin: 0 auto; padding: 22px 0 14px; display: flex; align-items: center; justify-content: space-between; }
.brand { min-height: 44px; display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 15px; color: white; background: var(--coral-dark); font-size: 21px; font-weight: 800; box-shadow: 0 10px 22px rgba(237, 104, 59, .2); }
.brand b, .brand small { display: block; }
.brand b { font-size: 20px; letter-spacing: -.5px; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.direct-workshop-entry { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; white-space: nowrap; font-size: 14px; }
@media (max-width: 720px) { .site-header { flex-wrap: wrap; gap: 8px; } .header-actions { flex-wrap: wrap; justify-content: flex-end; margin-left: auto; max-width: 100%; } }
.status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px; border-radius: 99px; background: var(--surface); color: var(--muted); font-size: 12px; }
.status-pill i, .submit-row i, .live-dot { width: 8px; height: 8px; border-radius: 50%; background: #c1b9b0; }
.status-pill.online i, .submit-row i, .live-dot { background: #67a27f; box-shadow: 0 0 0 5px rgba(103, 162, 127, .11); }

.button { min-height: 44px; border: 0; border-radius: 999px; padding: 12px 20px; cursor: pointer; font-weight: 700; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); }
.button.primary { color: white; background: var(--coral-dark); box-shadow: 0 12px 24px rgba(237, 104, 59, .2); }
.button.primary:hover { background: var(--coral-dark); }
.button.ghost { background: rgba(255,255,255,.76); border: 1px solid var(--line); }

main { width: min(1480px, calc(100% - 48px)); margin: 0 auto; padding-bottom: 50px; }
.view { animation: rise .48s cubic-bezier(.2,.8,.2,1) both; }
.welcome-intro-overlay { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: var(--bg); animation: welcome-intro-out 1000ms ease both; }
.welcome-intro-overlay img { display: block; width: 180px; height: 180px; object-fit: contain; mix-blend-mode: multiply; opacity: .86; animation: welcome-logo-pop 780ms cubic-bezier(.2,.8,.2,1) both; }
#uploadView { animation: welcome-page-enter 360ms cubic-bezier(.2,.8,.2,1) 740ms both; }
@keyframes welcome-logo-pop {
  0% { opacity: 0; transform: translateY(18px) scale(.72); }
  42% { opacity: .86; transform: translateY(-9px) scale(1.08); }
  68% { transform: translateY(3px) scale(.98); }
  100% { opacity: .86; transform: translateY(0) scale(1); }
}
@keyframes welcome-intro-out { 0%, 72% { opacity: 1; visibility: visible; } 100% { opacity: 0; visibility: hidden; } }
@keyframes welcome-page-enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .welcome-intro-overlay { display: none; animation: none; }
  .welcome-intro-overlay img, #uploadView { animation: none; }
}
.upload-view { display: grid; grid-template-columns: .8fr 1.35fr; gap: clamp(36px, 6vw, 92px); align-items: center; min-height: calc(100vh - 110px); padding: 34px 4vw 80px; }
.eyebrow { margin: 0 0 8px; color: var(--coral-ink); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.hero-copy h1 { margin: 0; font-size: clamp(48px, 5vw, 78px); line-height: 1.03; letter-spacing: -.055em; }
.hero-copy h1 em { color: var(--coral); font-style: normal; }
.hero-copy > p:last-child { max-width: 500px; margin: 24px 0 0; color: var(--muted); font-size: 16px; line-height: 1.8; }
.upload-card { padding: 18px 0; }
.form-heading { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.form-heading > span { color: var(--coral-ink); font-size: 22px; font-weight: 800; }
.form-heading h2, .form-heading p { margin: 0; }
.form-heading h2 { font-size: 21px; }
.form-heading p { margin-top: 3px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.shooting-intro { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 16px; padding: 10px 14px; border-left: 3px solid var(--coral); background: #fff7ef; font-size: 13px; line-height: 1.45; }
.shooting-intro b { color: var(--coral-ink); }
.shooting-intro span { color: var(--muted); }
.drop-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.drop-zone { min-width: 0; display: flex; flex-direction: column; padding: 18px; border: 1.5px dashed #cbbfb4; border-radius: 20px; background: rgba(255, 253, 249, .72); transition: border .2s, background .2s; }
.drop-zone.dragging, .drop-zone:focus-within { border-color: var(--coral-ink); background: #fff7f0; }
.drop-zone.has-file { border-style: solid; border-color: #d9a58d; }
.drop-zone.invalid { border-style: solid; border-color: #b3422a; background: #fff4f1; }
.drop-zone input[type=file], .file-field input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.step-heading { order: 0; display: flex; align-items: center; gap: 10px; }
.step-index { width: 32px; height: 32px; flex: 0 0 32px; display: grid; place-items: center; border-radius: 50%; color: var(--coral-ink); background: var(--coral-soft); font-weight: 800; }
.step-heading b, .step-heading small { display: block; }
.step-heading b { font-size: 17px; }
.step-heading small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.photo-actions { order: 1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.photo-action { flex: 1 1 120px; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--coral-ink); font-size: 14px; font-weight: 800; cursor: pointer; }
.camera-action { border-color: var(--coral-dark); color: white; background: var(--coral-dark); }
.photo-remove { min-height: 48px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: transparent; color: #a13521; font-size: 13px; font-weight: 700; cursor: pointer; }
.photo-preview { order: 2; display: flex; align-items: center; gap: 10px; min-width: 0; margin-top: 12px; }
.photo-preview[hidden] { display: none; }
.photo-preview img { width: 62px; height: 62px; flex: 0 0 62px; border-radius: 9px; object-fit: cover; background: #ede7df; }
.file-name { min-width: 0; color: var(--coral-ink); font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-quality { order: 3; margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.quality-warning .photo-quality { color: #8a5514; }
.step-guide { order: 4; display: flex; gap: 12px; align-items: center; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); }
.step-example { position: relative; width: 120px; height: 100px; flex: 0 0 120px; margin: 0; overflow: hidden; border-radius: 10px; background: #e9e0d7; }
.drop-zone[data-picker="top_image"] .step-example { width: 100px; height: 84px; flex-basis: 100px; }
.step-example img { width: 100%; height: 100%; object-fit: contain; }
.step-example figcaption { position: absolute; bottom: 0; left: 0; right: 0; padding: 3px; color: white; background: rgba(40,35,31,.76); text-align: center; font-size: 12px; }
.step-tips { min-width: 0; }
.step-tips p { margin: 0 0 4px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.step-tips p:last-child { margin-bottom: 0; }
.step-tips .mistake { color: #a13521; }
.step-error { order: 5; margin: 10px 0 0; color: #a13521; font-size: 13px; font-weight: 700; }
.optional-row { display: grid; grid-template-columns: 1.2fr .8fr; gap: 14px; margin-top: 14px; }
.compact-field { min-height: 76px; padding: 13px 4px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.compact-field b, .compact-field small { display: block; }
.compact-field b { font-size: 13px; }
.compact-field small { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.reference-control { display: flex; align-items: center; gap: 8px; min-width: 0; border-bottom: 1px solid var(--line); }
.reference-control .file-field { flex: 1; min-width: 0; border-bottom: 0; }
.reference-control .file-field.invalid { box-shadow: inset 0 -2px #b3422a; }
.reference-control .file-field > span { min-width: 0; }
.reference-control .photo-remove { flex: 0 0 auto; min-height: 44px; }
.file-field { cursor: pointer; }
.file-field.invalid { border-color: #b3422a; }
.file-field strong { max-width: 130px; color: var(--coral-ink); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.number-wrap { display: flex; align-items: center; gap: 5px; }
.number-wrap input { width: 86px; min-height: 44px; padding: 8px; border: 1px solid var(--line); border-radius: 11px; outline: none; background: white; text-align: center; }
.number-wrap i { color: var(--muted); font-size: 12px; font-style: normal; }
.analysis-error { margin-top: 16px; padding: 14px; border: 1px solid #dba49a; border-radius: 14px; color: #912d1c; background: #fff3ef; }
.analysis-error b { font-size: 14px; }
.analysis-error p { margin: 5px 0 10px; font-size: 13px; line-height: 1.5; }
.analysis-error div { display: flex; flex-wrap: wrap; gap: 8px; }
.analysis-error button { min-height: 44px; padding: 8px 12px; border: 1px solid #c37769; border-radius: 10px; color: #912d1c; background: white; font-size: 13px; cursor: pointer; }
.mobile-privacy, .mobile-action-bar { display: none; }
.submit-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 20px; }
.submit-row > p { display: flex; align-items: center; gap: 9px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.submit-row > p i { flex: 0 0 8px; }
.submit-controls { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.submit-controls > span { color: var(--muted); font-size: 13px; line-height: 1.4; }
.submit-controls .button { min-width: 160px; min-height: 50px; }
.submit-controls .button:disabled { background: #a59b92; box-shadow: none; cursor: not-allowed; transform: none; }
button:focus-visible, .file-field:focus-within, .number-wrap input:focus-visible { outline: 3px solid rgba(168, 60, 28, .45); outline-offset: 2px; }

.loading-view { min-height: calc(100svh - 130px); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 0 60px; text-align: center; animation: none; }
.loading-visual { position: relative; width: 390px; max-width: 100%; height: 250px; margin-bottom: 30px; isolation: isolate; }
.loading-visual::before { content: ""; position: absolute; inset: -40px -20px -30px; z-index: -1; border-radius: 50%; background: radial-gradient(ellipse, #f0d7bf88, #f3efe800 68%); }
.loading-photo { --photo-tilt: -9deg; position: absolute; top: 20px; left: 34px; width: 192px; padding: 8px 8px 0; border: 1px solid #e4d9cb; border-radius: 13px; background: #fffdf9; box-shadow: 0 12px 32px #67503c15, 0 2px 5px #67503c0a; transform: rotate(var(--photo-tilt)); animation: photo-breathe 5s ease-in-out infinite; }
.loading-photo-side { --photo-tilt: 8deg; top: 44px; left: 169px; z-index: 1; animation-delay: -2.5s; }
.loading-photo-window { position: relative; height: 137px; overflow: hidden; border-radius: 7px; background: #e7dfd4; }
.loading-photo-window img { display: block; width: 100%; height: 100%; object-fit: cover; }
.loading-photo-caption { display: block; padding: 11px 0 12px; color: #756657; font-size: 11px; letter-spacing: .06em; }
.loading-photo-sweep { position: absolute; inset: 0; opacity: 0; background: linear-gradient(180deg, transparent 42%, #fff5dc55 49%, #fff5dcaa 50%, transparent 57%); transform: translateY(-100%); }
.loading-view[data-phase="1"] .loading-photo-sweep { opacity: 1; animation: photo-sweep 3.8s ease-in-out infinite; }
.loading-photo-side .loading-photo-sweep { animation-delay: -1.9s; }
.loading-copy { max-width: 420px; }
.loading-copy p { margin: 12px 0 0; color: #61736c; font-size: 14px; line-height: 1.6; }
.loading-view h2 { margin: 0; font-size: clamp(24px, 4vw, 30px); font-weight: 600; letter-spacing: -.035em; }
.loading-progress { width: 224px; height: 2px; overflow: hidden; margin: 26px 0; border-radius: 2px; background: #e2d6c8; }
.loading-progress::after { content: ""; display: block; width: 42%; height: 100%; border-radius: inherit; background: #b7805b; animation: loading-travel 2.8s ease-in-out infinite; }
.loading-view[hidden] *, .loading-view[hidden] *::after { animation-play-state: paused; }
@keyframes photo-breathe { 0%, 100% { transform: translateY(0) rotate(var(--photo-tilt)); } 50% { transform: translateY(-5px) rotate(var(--photo-tilt)); } }
@keyframes photo-sweep { 0%, 12% { transform: translateY(-100%); } 78%, 100% { transform: translateY(100%); } }
@keyframes loading-travel { 0% { transform: translateX(-105%); } 100% { transform: translateX(340%); } }
@media (max-width: 500px) {
  .loading-view { min-height: calc(100svh - 130px); padding: 30px 0 44px; }
  .loading-visual { width: 310px; height: 224px; margin-bottom: 26px; }
  .loading-visual::before { inset-inline: 0; }
  .loading-photo { left: 15px; width: 164px; }
  .loading-photo-side { left: 135px; top: 38px; }
  .loading-photo-window { height: 119px; }
}
@media (prefers-reduced-motion: reduce) {
  .loading-photo, .loading-photo-sweep, .loading-progress::after { animation: none !important; }
  .loading-view .loading-photo-sweep { display: none; }
  .loading-progress::after { width: 100%; opacity: .5; }
}

.result-view { padding: 28px 0; }
.result-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; }
.result-heading h1, .result-heading p { margin: 0; }
.result-heading h1 { font-size: 38px; letter-spacing: -.04em; }
.result-heading div > p:last-child { margin-top: 5px; color: var(--muted); }
.coach-workspace { max-width: 1040px; margin: 0 auto; }
.action-summary { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 18px 18px 0; }
.action-card { min-height: 185px; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255, 253, 249, .88); animation: rise .4s both; }
.action-card:first-child { border-color: #efc4b3; background: #fff5ee; }
.action-label, .action-value, .action-detail { display: block; }
.action-label { color: var(--coral-ink); font-size: 13px; font-weight: 800; }
.action-value { margin: 14px 0 10px; font-size: 19px; line-height: 1.4; overflow-wrap: anywhere; }
.action-detail { color: var(--muted); font-size: 13px; line-height: 1.5; }
.advice-status { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 18px 0; color: var(--muted); font-size: 13px; }
.advice-status .button { min-height: 44px; }
.summary-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.metric-tile { min-height: 135px; padding: 19px; border-radius: 22px; background: var(--card); animation: rise .4s both; }
.metric-tile:nth-child(1) { background: var(--coral-soft); }
.metric-tile:nth-child(2) { background: var(--blue-soft); }
.metric-tile:nth-child(3) { background: var(--green-soft); }
.metric-tile small, .metric-tile b, .metric-tile span { display: block; }
.metric-tile small { color: var(--muted); }
.metric-tile b { margin: 8px 0 5px; color: var(--coral-ink); font-size: 24px; }
.metric-tile:nth-child(2) b { color: var(--blue); }
.metric-tile:nth-child(3) b { color: var(--green); }
.metric-tile span { color: var(--muted); font-size: 13px; line-height: 1.5; }
.evidence-grid, .image-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.evidence-card, .image-card { overflow: hidden; border-radius: 22px; background: var(--card); }
.card-heading { padding: 17px 19px 10px; display: flex; align-items: center; justify-content: space-between; }
.card-heading b { font-size: 15px; }
.card-heading span { padding: 5px 10px; border-radius: 99px; color: var(--coral-ink); background: var(--coral-soft); font-size: 12px; font-weight: 800; }
.evidence-list { padding: 0 19px 15px; }
.evidence-row { padding: 10px 0; display: grid; grid-template-columns: 110px 1fr auto; gap: 8px; border-top: 1px solid #f0ebe5; font-size: 12px; }
.evidence-row span, .evidence-row small { color: var(--muted); }
.evidence-row b { font-size: 12px; }
.image-stage { height: 310px; margin: 0 12px 12px; display: grid; place-items: center; overflow: hidden; border-radius: 15px; background: linear-gradient(135deg, #d8d2ca, #eee9e2); }
.image-stage img { width: 100%; height: 100%; object-fit: contain; }
.quality-notice { margin-top: 12px; padding: 13px 16px; border-radius: 15px; color: var(--green); background: var(--green-soft); font-size: 12px; font-weight: 700; }
.quality-notice.warning { color: #946522; background: #f6ead7; }

.chat-panel { display: flex; flex-direction: column; overflow: visible; border: 1px solid rgba(255,255,255,.85); border-radius: 32px; background: var(--surface); box-shadow: var(--shadow); backdrop-filter: blur(20px); }
.coach-panel { position: relative; }
.coach-panel::before { content: ""; position: absolute; inset: 0 0 auto; height: 130px; background: linear-gradient(110deg, rgba(237,104,59,.16), rgba(96,122,170,.12)); pointer-events: none; }
.chat-heading { position: relative; padding: 22px 24px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid rgba(229,221,211,.75); }
.advisor-avatar { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 17px; color: white; background: var(--coral-dark); font-weight: 800; box-shadow: 0 14px 26px rgba(237,104,59,.22); }
.chat-heading b, .chat-heading small { display: block; }
.chat-heading b { font-size: 18px; }
.chat-heading small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.chat-heading .live-dot { margin-left: auto; }
.report-drawer { position: relative; margin: 16px 18px 0; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.72); overflow: hidden; }
.report-drawer summary { min-height: 72px; padding: 15px 17px; display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; list-style: none; }
.report-drawer summary::-webkit-details-marker { display: none; }
.report-drawer summary span b, .report-drawer summary span small { display: block; }
.report-drawer summary span b { font-size: 14px; }
.report-drawer summary span small { margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.report-drawer summary i { flex: 0 0 auto; min-height: 44px; display: grid; place-items: center; padding: 7px 11px; border-radius: 99px; color: var(--coral-ink); background: var(--coral-soft); font-size: 12px; font-style: normal; font-weight: 800; }
.report-drawer summary i::before { content: "展开"; }
.report-drawer[open] summary i { color: var(--blue); background: var(--blue-soft); }
.report-drawer[open] summary i::before { content: "收起"; }
.report-drawer-body { padding: 0 15px 15px; }
.chat-history { flex: 0 1 auto; max-height: min(54vh, 560px); padding: 24px clamp(20px, 4vw, 46px); overflow-y: auto; scroll-behavior: smooth; }
.message { width: fit-content; max-width: min(760px, 92%); margin-bottom: 16px; padding: 16px 18px; border-radius: 21px; font-size: 14px; line-height: 1.78; overflow-wrap: anywhere; animation: rise .3s both; }
.message p { margin: 0; white-space: pre-wrap; }
.message p + p, .message ul + p, .message p + ul, .message h4 + p, .message h4 + ul { margin-top: 9px; }
.message h4 { margin: 0 0 6px; color: var(--coral-ink); font-size: 13px; letter-spacing: .02em; }
.message-list { margin: 0; padding-left: 18px; }
.message-list li + li { margin-top: 4px; }
.message.assistant { margin-right: auto; border-bottom-left-radius: 6px; background: var(--card); box-shadow: 0 10px 26px rgba(64,48,37,.05); }
.message.user { margin-left: auto; border-bottom-right-radius: 6px; color: white; background: var(--coral-dark); box-shadow: 0 12px 26px rgba(237,104,59,.16); }
.message.user h4 { color: white; }
.message.measurement { width: auto; max-width: min(820px, 100%); border: 1px solid var(--line); background: #faf7f2; }
.message-label { margin-bottom: 10px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .1em; }
.chat-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.chat-tile { padding: 11px; border-radius: 13px; background: white; }
.chat-tile small, .chat-tile b { display: block; }
.chat-tile small { color: var(--muted); font-size: 12px; }
.chat-tile b { margin-top: 4px; color: var(--coral-ink); font-size: 12px; }
.typing { display: inline-flex; gap: 5px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: typing 1s infinite alternate; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
.quick-prompts { padding: 0 clamp(18px, 4vw, 42px) 13px; display: flex; gap: 8px; overflow-x: auto; }
.quick-prompts button { flex: 0 0 auto; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 99px; background: white; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 700; transition: border .2s, color .2s, transform .2s; }
.quick-prompts button:hover { border-color: var(--coral-ink); color: var(--coral-ink); transform: translateY(-1px); }
.chat-form { margin: 0 clamp(18px, 4vw, 42px); padding: 10px; display: flex; gap: 9px; border: 1px solid var(--line); border-radius: 22px; background: white; box-shadow: 0 14px 34px rgba(64,48,37,.06); }
.chat-form textarea { flex: 1; min-height: 54px; resize: none; border: 0; outline: 0; padding: 7px; color: var(--ink); background: transparent; font-size: 14px; line-height: 1.55; }
.chat-form button { width: 48px; height: 48px; align-self: end; border: 0; border-radius: 15px; color: white; background: var(--coral-dark); cursor: pointer; font-size: 18px; }
.chat-form button:disabled { opacity: .45; cursor: not-allowed; }
.chat-disclaimer { margin: 10px 15px 16px; color: var(--muted); text-align: center; font-size: 12px; }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 20; padding: 11px 17px; border-radius: 99px; color: white; background: #342d28; opacity: 0; transform: translate(-50%, 18px); pointer-events: none; transition: .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.login-main { min-height: calc(100vh - 90px); display: grid; place-items: center; padding: 30px 0 70px; }
.login-card { width: min(100%, 440px); padding: 36px; border: 1px solid var(--line); border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); }
.login-card h1 { margin: 0; font-size: clamp(34px, 6vw, 46px); letter-spacing: -.04em; }
.login-intro { margin: 12px 0 26px; color: var(--muted); line-height: 1.7; font-size: 14px; }
.login-field { display: block; margin-top: 16px; font-size: 13px; font-weight: 700; }
.login-field input { display: block; width: 100%; min-height: 48px; margin-top: 8px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: white; outline: none; font-size: 16px; }
.login-field input:focus { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(237,104,59,.13); }
.login-error { margin: 14px 0 0; color: #a13521; font-size: 13px; line-height: 1.5; }
.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 72px; }
.password-toggle { position: absolute; right: 3px; bottom: 2px; min-width: 58px; min-height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--coral-ink); font-size: 13px; font-weight: 700; cursor: pointer; }
.caps-hint { margin: 8px 0 0; color: #8a5514; font-size: 13px; }
.login-field input[aria-invalid=true] { border-color: #b3422a; }
.login-submit { width: 100%; margin-top: 22px; }
.login-submit:disabled { opacity: .6; cursor: wait; }
.login-hint { margin: 20px 0 0; color: var(--muted); text-align: center; font-size: 12px; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes typing { to { transform: translateY(-4px); opacity: .45; } }

@media (max-width: 1120px) {
  .upload-view { grid-template-columns: 1fr; padding-top: 55px; }
  .hero-copy { max-width: 720px; }
  .coach-workspace { max-width: none; }
}
@media (max-width: 720px) {
  .site-header, main { width: min(100% - 24px, 1480px); }
  .site-header { padding: 10px 0 4px; }
  .header-actions { gap: 4px; }
  .brand { gap: 7px; }
  .brand-mark { width: 36px; height: 36px; border-radius: 12px; }
  .brand b { font-size: 15px; }
  .brand small, .status-pill { display: none; }
  .header-actions .button { min-height: 44px; padding: 8px 10px; font-size: 12px; }
  .upload-view { min-height: 0; gap: 12px; padding: 14px 0 122px; }
  .hero-copy h1 { font-size: clamp(31px, 9vw, 40px); line-height: 1.08; }
  .hero-copy > p:last-child { margin-top: 10px; font-size: 14px; line-height: 1.5; }
  .upload-card { padding: 0; }
  .form-heading { margin-bottom: 8px; }
  .form-heading h2 { font-size: 18px; }
  .shooting-intro { margin-bottom: 10px; padding: 8px 10px; }
  .drop-grid, .optional-row, .action-summary, .summary-tiles, .evidence-grid, .image-grid, .chat-tiles { grid-template-columns: 1fr; }
  .drop-zone { padding: 14px; }
  .step-guide { gap: 9px; }
  .step-example { width: 112px; height: 96px; flex-basis: 112px; }
  .drop-zone[data-picker="top_image"] .step-example { width: 92px; height: 78px; flex-basis: 92px; }
  .photo-action { flex-basis: 110px; }
  .submit-row { display: none; }
  .mobile-privacy { display: block; margin: 16px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
  .mobile-action-bar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fffcf7; box-shadow: 0 -8px 22px rgba(64,48,37,.12); }
  .mobile-action-progress { min-width: 0; display: grid; gap: 3px; }
  .mobile-action-progress strong { font-size: 14px; }
  .mobile-action-progress span { color: var(--muted); font-size: 12px; line-height: 1.3; overflow-wrap: anywhere; }
  .mobile-action-bar .button { flex: 0 0 142px; min-height: 52px; padding: 10px 12px; font-size: 14px; }
  .mobile-action-bar .button:disabled { background: #a59b92; box-shadow: none; cursor: not-allowed; transform: none; }
  .result-heading { align-items: flex-start; gap: 16px; flex-direction: column; }
  .result-view { padding-top: 16px; }
  .action-summary { padding: 12px 12px 0; }
  .action-card { min-height: 0; padding: 18px; }
  .chat-panel { border-radius: 24px; }
  .chat-heading { padding: 17px; }
  .advisor-avatar { width: 42px; height: 42px; }
  .report-drawer { margin: 12px 12px 0; border-radius: 18px; }
  .report-drawer summary { align-items: flex-start; min-height: auto; }
  .report-drawer-body { padding: 0 12px 12px; }
  .chat-history { padding: 18px 14px; }
  .message { max-width: 94%; font-size: 13px; }
  .quick-prompts { padding: 0 12px 11px; }
  .chat-form { margin: 0 12px; }
  .evidence-row { grid-template-columns: 94px 1fr; }
  .evidence-row small { grid-column: 2; }
  .login-card { padding: 25px; }
}

.artifact-downloads { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.artifact-card small { display: block; color: var(--muted, #68727b); }

.model-entry-card { display: flex; gap: 15px; align-items: center; width: min(100%, 460px); padding: 18px; border: 1px solid #e6c7b8; border-radius: 20px; background: linear-gradient(125deg, #fffaf3, #ffede0); color: var(--ink); text-decoration: none; transition: transform .2s, box-shadow .2s; }
.model-entry-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px #c6856420; }
.model-entry-card:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; }
.model-entry-icon { display: grid; place-items: center; width: 56px; height: 56px; flex-shrink: 0; border-radius: 16px; background: #efd7c4; color: var(--coral-ink); font-size: 42px; }
.model-entry-content { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 6px; }
.model-entry-content small { color: var(--coral-ink); font-size: 11px; }
.model-entry-content b { font-size: 15px; }
.model-entry-content > span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.model-entry-arrow { color: var(--coral-ink); font-size: 24px; }
@media(max-width:700px) { .model-entry-card { padding: 14px; gap: 12px; } .model-entry-icon { width: 44px; height: 44px; font-size: 34px; } }

/* A quiet result page: two images, one advice panel and a folded report. */
.analysis-dashboard { display: grid; gap: 14px; }
.analysis-main { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(320px, 1fr); gap: 24px; align-items: stretch; }
.analysis-gallery { min-width: 0; padding: 18px 0 0; border: 0; border-radius: 0; background: transparent; }
.gallery-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 16px; gap: 12px; }
.gallery-heading b { font-size: 15px; }
.gallery-heading > span { color: var(--muted); font-size: 12px; }
.analysis-gallery .image-grid { position: relative; display: block; height: 400px; margin: 0; overflow: visible; isolation: isolate; }
.analysis-gallery .analysis-image { position: absolute; z-index: 1; min-width: 0; margin: 0; background: transparent; border-radius: 16px; overflow: visible; transform: rotate(var(--stack-rotate)); transition: transform 340ms cubic-bezier(.2,.7,.2,1); }
.analysis-gallery .analysis-image:first-child { left: 19%; top: 10px; width: min(42%, calc(320px * var(--photo-ratio, .75))); --stack-rotate: -6deg; --active-rotate: -1.5deg; }
.analysis-gallery .analysis-image:nth-child(2) { left: 37%; top: 65px; width: min(64%, calc(270px * var(--photo-ratio, 1.5))); --stack-rotate: 5deg; --active-rotate: 1.5deg; }
.analysis-gallery .analysis-image.image-front { z-index: 3; transform: translateY(-8px) rotate(var(--active-rotate)); }
.analysis-gallery .image-stage { position: relative; display: block; width: 100%; height: auto; aspect-ratio: var(--photo-aspect, 4 / 3); margin: 0; padding: 0; border: 0; border-radius: 16px; overflow: hidden; cursor: zoom-in; background: transparent; box-shadow: 0 12px 28px #7a604a20; }
.analysis-gallery .analysis-image:first-child .image-stage { aspect-ratio: var(--photo-aspect, 3 / 4); }
.analysis-image .image-stage img { display: block; width: 100%; height: 100%; object-fit: contain; opacity: 0; }
.analysis-image.image-loaded .analysis-photo { animation: analysis-image-reveal 900ms cubic-bezier(.2,.7,.2,1) var(--image-delay) both; }
.analysis-image.image-loaded .image-stage::after { content: ""; position: absolute; inset: -50% -20%; background: linear-gradient(transparent 43%, #fff5 50%, transparent 57%); transform: translateY(-75%); pointer-events: none; animation: analysis-image-sweep 1600ms ease-out calc(var(--image-delay) + 300ms) both; }
.analysis-image-button:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }
.analysis-image-caption { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 10px 6px 0; }
.analysis-image-caption b { font-size: 13px; font-weight: 600; }
.analysis-image-caption span { font-size: 11px; color: var(--muted); }
.image-tabs { display: none; }
.gallery-touch-hint { display: none; }
.image-error { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; color: var(--muted); font-size: 13px; }
.image-failed img { display: none !important; }
.analysis-advice { align-self: center; min-width: 0; }
.analysis-dashboard .action-summary { display: grid; grid-template-columns: 1fr; padding: 0; gap: 0; }
.analysis-dashboard .action-card { min-height: 0; padding: 18px 4px; border: 0; border-radius: 0; background: transparent; animation: none; }
.analysis-dashboard .action-card + .action-card { border-top: 1px solid var(--line); }
.analysis-dashboard .action-card:first-child { padding-top: 4px; }
.analysis-dashboard .action-label { font-size: 12px; color: var(--muted); }
.analysis-dashboard .action-value { margin: 8px 0 0; font-size: 17px; font-weight: 600; line-height: 1.65; }
.analysis-dashboard .action-card:first-child .action-value { font-size: 25px; line-height: 1.4; }
.analysis-dashboard .action-detail { display: block; margin-top: 8px; font-size: 12px; }
.analysis-confidence { color: #936321; font-size: 12px; line-height: 1.6; margin: 2px 0 0; }
.analysis-advice .advice-status { padding: 4px 0; flex-wrap: wrap; font-size: 12px; }
.result-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 2px 0; }
.model-recommendations { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.recommendation-link { display: inline-block; color: var(--muted); font-size: 12px; text-decoration: none; padding: 12px 8px; overflow-wrap: anywhere; }
.recommendation-link:hover { color: var(--coral-ink); text-decoration: underline; }
/* The folded report is a text-sized disclosure, rather than a full-width card. */
.analysis-dashboard .report-drawer { margin: 0; border: 0; border-radius: 0; background: transparent; overflow: visible; }
.analysis-dashboard .report-drawer summary { display: inline-flex; min-height: 44px; padding: 4px 2px; justify-content: flex-start; gap: 9px; color: var(--muted); }
.analysis-dashboard .report-drawer summary span b { font-size: 13px; font-weight: 500; }
.analysis-dashboard .report-drawer summary:hover { color: var(--coral-ink); }
.report-toggle-icon { width: 19px; height: 19px; flex-shrink: 0; }
.analysis-dashboard .report-drawer summary i { width: 20px; min-height: 20px; padding: 0; border-radius: 0; color: inherit; background: transparent; transition: transform .2s; }
.analysis-dashboard .report-drawer summary i::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.analysis-dashboard .report-drawer[open] summary i { transform: rotate(180deg); }
.analysis-dashboard .report-drawer[open] .report-drawer-body { margin-top: 10px; padding: 18px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.analysis-image-dialog { width: min(1100px, calc(100% - 32px)); max-width: 100%; max-height: calc(100dvh - 32px); border: 0; border-radius: 24px; padding: 16px; color: var(--ink); background: #fffcf7; }
.analysis-image-dialog[open] { display: flex; flex-direction: column; gap: 12px; }
.analysis-image-dialog::backdrop { background: #28231fb3; backdrop-filter: blur(8px); }
.image-dialog-heading, .image-dialog-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; }
.image-dialog-heading b { font-size: 16px; }
#analysisFullImage { min-height: 0; width: 100%; height: min(65dvh, 700px); object-fit: contain; border-radius: 14px; background: #e8e3db; }
.image-changing { animation: analysis-image-change 300ms ease-out both; }
.image-dialog-controls span { color: var(--muted); font-size: 12px; }
.coach-dialog { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(520px, 100%); height: 100dvh; max-width: 100%; max-height: 100dvh; padding: 0; border: 0; background: var(--bg); box-shadow: -20px 0 70px #28231f33; }
.coach-dialog::backdrop { background: #28231f55; }
.coach-dialog .chat-panel { height: 100%; border: 0; border-radius: 0; overflow: hidden; }
.coach-dialog .chat-heading { flex-shrink: 0; }
.coach-dialog .chat-history { flex: 1; min-height: 0; max-height: none; padding: 20px; }
.coach-dialog .quick-prompts { flex-shrink: 0; }
.viewer-close { margin-left: auto; width: 44px; height: 44px; flex-shrink: 0; border: 1px solid var(--line); border-radius: 50%; background: white; cursor: pointer; font-size: 25px; }
body:has(.coach-dialog[open]), body:has(.analysis-image-dialog[open]) { overflow: hidden; }
a.button { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
a.button.ghost { color: var(--ink); }
@keyframes analysis-image-reveal { from { opacity: 0; transform: scale(1.025) translateY(8px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes analysis-image-sweep { from { transform: translateY(-75%); opacity: 0; } 25% { opacity: 1; } to { transform: translateY(75%); opacity: 0; } }
@keyframes analysis-image-change { from { opacity: .3; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@media (min-width: 1100px) { .result-view { padding-top: 12px; } .result-heading { margin-bottom: 18px; } .result-heading h1 { font-size: 32px; } }
@media (min-width: 1100px) and (max-height: 800px) {
  .result-view { padding-top: 6px; }
  .result-heading { margin-bottom: 12px; }
  .result-heading h1 { font-size: 28px; }
  .result-heading p:not(.eyebrow) { margin: 6px 0 0; }
  .analysis-dashboard { gap: 10px; }
  .analysis-gallery .image-grid { height: 375px; }
  .analysis-dashboard .action-card { padding: 14px 4px; }
}
@media (max-width: 1000px) {
  .analysis-main { grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); gap: 18px; }
  .analysis-image-caption { flex-direction: column; gap: 3px; }
}
@media (max-width: 700px) {
  .result-heading { flex-direction: row; align-items: center; gap: 10px; }
  .result-heading h1 { font-size: 25px; }
  .result-heading .eyebrow { display: none; }
  .result-heading p:not(.eyebrow) { margin-top: 6px; font-size: 12px; }
  .result-heading > button { flex-shrink: 0; padding: 10px 12px; font-size: 12px; }
  .analysis-main { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .analysis-gallery { padding: 8px 0 0; }
  .gallery-heading { padding-bottom: 12px; }
  .gallery-heading b { font-size: 14px; }
  .gallery-heading > span { font-size: 11px; }
  .image-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
  .image-tabs button { flex: 1; min-height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
  .image-tabs button[aria-pressed="true"] { color: var(--coral-ink); background: var(--coral-soft); }
  .gallery-desktop-hint { display: none; }
  .gallery-touch-hint { display: inline; }
  .analysis-gallery .image-grid { display: block; height: clamp(310px, 88vw, 390px); overflow: visible; }
  .analysis-gallery .analysis-image:first-child { left: 5%; top: 10px; width: min(52%, calc(250px * var(--photo-ratio, .75))); }
  .analysis-gallery .analysis-image:nth-child(2) { left: 24%; top: 85px; width: min(74%, calc(210px * var(--photo-ratio, 1.5))); }
  .analysis-image-caption { flex-direction: row; }
  .analysis-advice { padding: 0 4px; }
  .analysis-dashboard .action-card { padding: 14px 0; }
  .analysis-dashboard .action-card:first-child .action-value { font-size: 23px; }
  .analysis-dashboard .action-value { font-size: 15px; }
  .result-tools { gap: 8px; }
  .result-tools > .button { flex: 1; padding: 12px; font-size: 13px; }
  .model-recommendations { order: 3; flex-basis: 100%; }
  .recommendation-link { padding: 4px 0; }
  .analysis-image-dialog { padding: 12px; border-radius: 18px; }
  .image-dialog-controls .button { padding: 10px 14px; font-size: 12px; }
  .coach-dialog .chat-form { margin-bottom: env(safe-area-inset-bottom); }
  .coach-dialog .chat-heading b { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .analysis-image.image-loaded .analysis-photo, .image-changing { animation: none; opacity: 1; transform: none; filter: none; }
  .analysis-image.image-loaded .image-stage::after { display: none; }
}

/* Pictures retain their original proportions, with no letterbox or frame. */
.analysis-image .image-stage .analysis-photo { display: block; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; border-radius: 16px; box-shadow: none; }
.analysis-advice .coach-cta { display: flex; align-items: center; justify-content: flex-start; width: 100%; gap: 13px; min-height: 64px; margin-top: 20px; padding: 12px 16px; border: 1px solid #e8a285; border-radius: 20px; background: linear-gradient(120deg, #b54120, #da582d); font-size: 18px; box-shadow: 0 12px 26px #b6452130, inset 0 1px 0 #ffffff30; }
.coach-cta-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 12px; background: #ffffff20; }
.coach-cta-icon svg { width: 25px; height: 25px; }
.coach-cta-arrow { display: grid; place-items: center; margin-left: auto; width: 30px; height: 30px; border-radius: 50%; font-size: 20px; background: #ffffff15; }
.analysis-advice .coach-cta:hover { background: linear-gradient(120deg, #a7391b, #ce5026); box-shadow: 0 16px 30px #b6452140; }
.analysis-advice .coach-cta:focus-visible { outline: 3px solid var(--coral); outline-offset: 4px; }
@media (max-width: 700px) {
  .analysis-advice .coach-cta { min-height: 60px; margin-top: 16px; font-size: 17px; }
  .result-tools > .button { flex: 0 0 auto; padding: 9px 14px; font-size: 12px; }
  .model-recommendations { order: 0; flex-basis: auto; }
  .analysis-dashboard .report-drawer[open] .report-drawer-body { padding: 12px; }
}

@media (hover: none) {
  .gallery-desktop-hint { display: none; }
  .gallery-touch-hint { display: inline; }
  .image-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
  .image-tabs button { flex: 1; min-height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
  .image-tabs button[aria-pressed="true"] { color: var(--coral-ink); background: var(--coral-soft); }
}
@media (prefers-reduced-motion: reduce) {
  .analysis-gallery .analysis-image { transition: none; }
}

.quick-test-button { color: var(--coral-ink); border-style: dashed !important; font-size: 12px; }
.quick-test-button:disabled { opacity: .5; cursor: wait; transform: none; }
.quick-test-mobile { display: none; }
.quick-test-progress { position: fixed; z-index: 40; bottom: 22px; right: 22px; width: min(370px, calc(100% - 28px)); padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: #fffcf7; box-shadow: var(--shadow); }
.quick-test-progress-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; }
.quick-test-progress-heading button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--coral-soft); color: var(--coral-ink); font-size: 23px; cursor: pointer; }
.quick-test-progress-heading button:disabled { opacity: .4; cursor: wait; }
.quick-test-progress p { font-size: 13px; line-height: 1.7; margin: 8px 0; }
#quickTestLinks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
#quickTestDownloads { display: flex; gap: 8px; flex-wrap: wrap; }
#quickTestLinks .button { font-size: 12px; padding: 10px 14px; }
.quick-test-progress.test-error { border-color: #d69887; color: #912d1c; }
.quick-test-progress.test-complete { border-color: #94b7a4; }
.quick-test-chat-status { color: var(--muted); font-size: 12px; line-height: 1.6; padding: 10px 4px; }
@media (max-width: 700px) { .quick-test-desktop { display: none; } .quick-test-mobile { display: inline; } .quick-test-progress { bottom: max(16px, env(safe-area-inset-bottom)); right: 14px; } body:has(#uploadView:not([hidden])) .quick-test-progress { bottom: 96px; } }

/* Welcome keeps shooting examples on the left and all inputs on the right. */
.upload-view { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(350px, .9fr); gap: clamp(42px, 6vw, 92px); align-items: start; max-width: 1200px; min-height: 0; margin: 0 auto; padding: 42px 0 44px; }
.welcome-guide { min-width: 0; }
.welcome-examples { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 26px; margin-bottom: 38px; }
.welcome-example { min-width: 0; }
.upload-view .step-example { position: relative; width: 100%; height: auto; margin: 0; padding: 0; overflow: visible; border: 0; border-radius: 0; background: transparent; }
.example-button { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; width: 100%; height: 260px; padding: 0; border: 0; background: transparent; cursor: zoom-in; overflow: visible; }
.upload-view .step-example img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; border: 0; border-radius: 0; transition: transform 680ms cubic-bezier(.22,.61,.36,1), filter 680ms; }
.upload-view .step-example figcaption { position: static; display: flex; flex-direction: column; gap: 6px; margin-top: 20px; padding: 0; background: transparent; color: var(--ink); font-size: 17px; text-align: left; }
.upload-view .step-example figcaption span { color: var(--muted); font-size: 12px; }
.upload-view .step-tips { margin-top: 13px; font-size: 13px; line-height: 1.75; }
.upload-view .step-tips p { margin: 3px 0; }
.upload-view .step-tips .mistake { color: #9b4b35; font-size: 12px; }
.upload-view .hero-copy { max-width: none; margin: 0; }
.upload-view .hero-copy .eyebrow { margin-bottom: 12px; }
.upload-view .hero-copy h1 { font-size: clamp(32px, 3.4vw, 44px); line-height: 1.2; letter-spacing: -.035em; }
.upload-view .hero-copy > p:last-child { max-width: none; margin: 16px 0 0; font-size: 14px; line-height: 1.7; }
.upload-view .shooting-intro { display: flex; flex-direction: column; gap: 8px; margin: 24px 0 0; padding: 0; border: 0; background: transparent; }
.upload-view .shooting-intro b { font-size: 17px; color: var(--ink); }
.upload-view .shooting-intro span { color: var(--muted); font-size: 13px; line-height: 1.7; }
.example-help { margin: 12px 0 0; color: var(--muted); font-size: 11px; }
.upload-view .upload-card { padding: 26px; border: 0; border-radius: 24px; background: var(--coach-surface); }
.upload-view .form-heading { margin-bottom: 6px; }
.upload-view .form-heading > span { display: none; }
.upload-view .form-heading > div { width: 100%; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.upload-view .form-heading h2 { font-size: 22px; font-weight: 650; line-height: 1.45; letter-spacing: -.025em; }
.upload-view .form-heading p { margin: 0; font-size: 12px; }
.upload-view .drop-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.upload-view .drop-zone { display: flex; flex-direction: column; align-items: stretch; min-width: 0; padding: 16px 0; border: 0; border-bottom: 1px solid #d8cbbd; border-radius: 0; background: transparent; }
.upload-view .drop-zone.dragging { background: #fff8ee; }
.upload-view .drop-zone.invalid { background: #fff4f1; }
.upload-view .step-heading { order: 0; text-align: left; }
.upload-view .step-index { display: none; }
.upload-view .step-heading b { font-size: 15px; font-weight: 600; }
.upload-view .step-heading small { font-size: 12px; margin-top: 5px; }
.upload-view .photo-actions { order: 2; margin-top: 10px; gap: 8px; }
.upload-view .photo-actions .photo-action { flex: 1; min-height: 44px; padding: 10px 12px; border-radius: 11px; font-size: 14px; font-weight: 550; color: #665044; border-color: #d8cbbd; background: #fffcf7b8; }
.upload-view .photo-actions .camera-action { color: white; border-color: #665044; background: #665044; }
.upload-view .photo-actions .photo-remove { min-height: 44px; padding: 8px 10px; color: #765542; border-color: #d8cbbd; font-size: 12px; font-weight: 500; }
.upload-view .photo-preview { order: 1; margin: 14px 0 0; gap: 12px; }
.upload-view .photo-preview img { width: 56px; height: 56px; flex: 0 0 56px; object-fit: contain; border: 0; border-radius: 0; background: transparent; }
.upload-view .file-name { min-width: 0; font-size: 12px; font-weight: 500; }
.upload-view .photo-quality { order: 3; font-size: 11px; }
.upload-view .drop-zone:not(.has-file) .photo-quality { display: none; }
.upload-view .step-error { order: 4; }
.optional-settings { margin-top: 20px; }
.optional-settings h3 { margin: 0 0 10px; font-size: 14px; font-weight: 600; }
.optional-settings h3 span { color: var(--muted); margin-left: 8px; font-size: 12px; font-weight: 400; }
.optional-settings .optional-row { grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 0; }
.upload-view .compact-field { min-height: 60px; padding: 8px 12px; border: 0; border-radius: 11px; background: #fffcf780; }
.upload-view .compact-field b { font-size: 13px; font-weight: 500; }
.upload-view .reference-control { padding: 0 12px; border: 0; border-radius: 11px; background: #fffcf780; }
.upload-view .reference-control .file-field { padding-inline: 0; background: transparent; }
.upload-view .reference-control .photo-remove { padding-inline: 8px; border: 0; color: #765542; }
.upload-view .file-field strong { max-width: 100px; color: #765542; font-weight: 550; }
.upload-view .number-wrap input { width: 78px; min-height: 44px; padding: 8px; border-color: #dfd4c8; font-size: 14px; }
.upload-view .number-wrap i { font-size: 12px; }
.upload-view .submit-row { display: flex; flex-direction: column-reverse; align-items: stretch; margin-top: 24px; padding: 0; border: 0; gap: 12px; }
.upload-view .submit-controls { flex-direction: column; align-items: stretch; gap: 12px; }
.upload-view .submit-controls > span { font-size: 12px; }
.upload-view #analyzeButton { width: 100%; min-height: 48px; padding: 10px 16px; justify-content: space-between; font-size: 15px; font-weight: 600; background: #665044; box-shadow: none; }
.upload-view #analyzeButton:disabled { background: #b4a698; }
.mobile-action-bar #mobileAnalyzeButton { background: #665044; box-shadow: none; }
.mobile-action-bar #mobileAnalyzeButton:disabled { background: #b4a698; }
.upload-view .submit-row > p { font-size: 11px; }
#exampleFullImage { min-height: 0; width: 100%; height: min(65dvh, 620px); object-fit: contain; border: 0; border-radius: 0; }
.example-dialog { width: min(860px, calc(100% - 32px)); }
.example-dialog > p { margin: 2px 0; color: var(--muted); font-size: 12px; text-align: center; }
.example-button:focus-visible { outline: 2px solid var(--coral); outline-offset: 6px; }
@media (hover: hover) and (pointer: fine) {
  .welcome-example:has(.example-button:hover), .welcome-example:has(.example-button:focus-visible) { position: relative; z-index: 5; }
  .example-button:hover img, .example-button:focus-visible img { transform: translateY(-4px) scale(1.18); filter: drop-shadow(0 12px 16px #7a604a25); }
}
@media (min-width: 721px) and (hover: hover) {
  .upload-view .camera-action { display: none; }
}
@media (min-width: 1100px) and (max-height: 800px) {
  .upload-view { padding-top: 24px; gap: 68px; }
  .example-button { height: 225px; }
  .welcome-examples { margin-bottom: 28px; }
  .upload-view .hero-copy h1 { font-size: 36px; }
  .upload-view .drop-zone { padding: 14px 0; }
}
@media (max-width: 1000px) { .upload-view { grid-template-columns: minmax(0, 1fr) minmax(300px, .9fr); gap: 32px; } .welcome-examples { gap: 16px; } .example-button { height: 210px; } }
@media (max-width: 720px) {
  .upload-view { display: block; padding: 26px 4px 110px; }
  .welcome-examples { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 30px; }
  .example-button { height: 170px; }
  .upload-view .step-example figcaption { font-size: 15px; margin-top: 16px; }
  .upload-view .step-example figcaption span { font-size: 11px; line-height: 1.6; }
  .upload-view .step-tips { font-size: 11px; line-height: 1.7; }
  .upload-view .step-tips .mistake { font-size: 11px; }
  .upload-view .hero-copy h1 { font-size: 32px; }
  .upload-view .hero-copy > p:last-child { font-size: 13px; }
  .upload-view .shooting-intro { margin-top: 20px; }
  .upload-view .shooting-intro b { font-size: 16px; }
  .upload-view .shooting-intro span { font-size: 12px; }
  .example-hover-hint { display: none; }
  .upload-view .upload-card { margin-top: 32px; padding: 22px 18px; border-radius: 22px; }
  .upload-view .form-heading h2 { font-size: 20px; }
  .upload-view .submit-row { display: none; }
  .upload-view .mobile-privacy { font-size: 11px; margin-top: 16px; }
}

/* Hover grows the photo itself so entry animations cannot mask the effect. */
.analysis-gallery .image-stage { transition: transform 680ms cubic-bezier(.22,.61,.36,1), box-shadow 680ms; transform-origin: center; }
@media (hover: hover) and (pointer: fine) {
  .analysis-gallery .analysis-image:hover .image-stage, .analysis-gallery .analysis-image:focus-within .image-stage { transform: scale(1.085); box-shadow: 0 18px 34px #7a604a30; }
}
.upload-view .step-example img { transition-duration: 680ms; }
@media (prefers-reduced-motion: reduce) { .analysis-gallery .image-stage, .upload-view .step-example img { transition: none; } }

/* Small photo labels stay attached to their own image in the collage. */
.analysis-gallery .analysis-image-caption { position: absolute; top: 11px; left: 11px; padding: 6px 10px; border-radius: 12px; background: #fffcf7df; backdrop-filter: blur(6px); pointer-events: none; }
.analysis-gallery .analysis-image:nth-child(2) .analysis-image-caption { left: auto; right: 11px; }
.analysis-gallery .analysis-image-caption span { display: none; }

.upload-view .welcome-guide .hero-copy { margin-bottom: 34px; }
.upload-view .welcome-guide .hero-copy h1 { font-size: clamp(30px, 3vw, 40px); }
.upload-view .welcome-guide .hero-copy h1 br { display: none; }
.upload-view .welcome-examples { margin-bottom: 24px; }
.upload-view .welcome-guide .example-button img { transition: transform 800ms cubic-bezier(.22,.61,.36,1), filter 800ms; will-change: transform; }
@media (max-width: 720px) { .upload-view .welcome-guide .hero-copy { margin-bottom: 28px; } .upload-view .welcome-guide .hero-copy h1 { font-size: 29px; } }
@media (prefers-reduced-motion: reduce) { .upload-view .welcome-guide .example-button img { transition: none; } }

/* Bold, rounded graphic arrows share one shape across every action. */
.action-icon { display: inline-block; width: 22px; height: 22px; flex: 0 0 auto; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.button:has(> .action-icon) { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.button.primary > .action-icon { width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: #ffffff26; }
#analyzeButton, #mobileAnalyzeButton, .generate-button, .download-link { justify-content: space-between; }
.coach-cta-arrow .action-icon { width: 19px; height: 19px; }
.chat-form button { display: grid; place-items: center; }
.model-entry-arrow { width: 24px; height: 24px; color: var(--coral-ink); }
.download-stp .action-icon, #downloadSource .action-icon { width: 18px; height: 18px; margin-left: 5px; }
@media (max-width: 700px) { .button.primary > .action-icon { width: 28px; height: 28px; padding: 5px; } .return-link .action-icon { width: 18px; height: 18px; } }

/* Keep the page focused on photos, recommendations and the next action. */
.brand-model { display: block; margin-top: 3px; color: var(--coral-ink); font-size: 14px; font-weight: 600; }
.model-motto { margin: 0 0 14px; color: var(--coral-ink); font-size: 16px; font-weight: 600; letter-spacing: .01em; line-height: 1.6; }
.upload-view .hero-copy > .model-motto { margin: 0 0 16px; color: var(--coral-ink); font-size: 16px; }
.upload-view .hero-copy h1:last-child { margin: 0; }
.upload-view .step-tips p { display: flex; align-items: flex-start; gap: 8px; margin: 7px 0; color: #655c52; font-size: 14px; line-height: 1.65; }
.upload-view .step-tips p > span { flex: 1; min-width: 0; text-wrap: balance; }
.tip-icon { display: block; flex: 0 0 19px; width: 19px; height: 19px; margin-top: 2px; padding: 2px; border-radius: 50%; color: #63775b; background: #e4eadd; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.upload-view .step-tips .mistake { color: #927156; font-size: 13px; }
.mistake .tip-icon { color: #98754b; background: #efe1cb; }
.upload-view .photo-quality { display: none; }
.upload-view .quality-warning .photo-quality { display: block; font-size: 14px; }
.coach-identity { display: flex; align-items: center; gap: 15px; margin-bottom: 22px; }
.coach-identity h2 { margin: 0; font-size: 22px; line-height: 1.4; font-weight: 650; }
.coach-photo-link { display: block; flex-shrink: 0; border-radius: 50%; }
.coach-photo { display: block; width: 68px; height: 68px; border-radius: 50%; object-fit: cover; object-position: center 32%; box-shadow: 0 8px 20px #7a604a15; }
.coach-photo-link:focus-visible { outline: 3px solid var(--coral); outline-offset: 4px; }
.analysis-dashboard .action-label { font-size: 15px; font-weight: 500; }
.analysis-dashboard .action-card { padding: 15px 0; }
.analysis-dashboard .action-value { margin-top: 7px; }
.next-accessory { display: flex; align-items: center; gap: 12px; min-height: 44px; color: var(--coral-ink); text-decoration: none; font-size: 19px; font-weight: 650; }
.next-accessory:hover { text-decoration: underline; text-underline-offset: 5px; }
.next-accessory .action-icon { flex-shrink: 0; }
.result-tools { display: flex; flex-wrap: nowrap; gap: 28px; padding: 0; }
.model-previews { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; flex: 1; min-width: 0; }
.model-preview { position: relative; display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--ink); text-decoration: none; border-radius: 16px; transition: background .3s; }
.model-preview:hover { background: #ffffff70; }
.model-preview:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }
.model-preview-stage { height: 92px; width: 125px; flex-shrink: 0; pointer-events: none; }
.model-preview-stage canvas { display: block; width: 100%; height: 100%; }
.model-preview-stage img { display: block; width: 100%; height: 100%; object-fit: contain; }
.model-preview b { font-size: 15px; font-weight: 500; line-height: 1.5; }
.model-preview-download { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid #dfd3c5; border-radius: 50%; background: #fffaf2e6; color: #836448; pointer-events: none; transition: background .18s, color .18s; }
.model-preview:hover .model-preview-download, .model-preview:focus-visible .model-preview-download { background: #8d684b; border-color: #8d684b; color: #fffaf4; }
.model-preview-download .action-icon { width: 15px; height: 15px; }
.preview-unavailable { min-height: 60px; padding: 8px; }
.result-tools > .button { flex-shrink: 0; font-size: 15px; }
.analysis-image-caption b { font-size: 15px; }
.evidence-row { grid-template-columns: 1fr 1fr; font-size: 14px; }
.evidence-row b { font-size: 14px; text-align: right; }
.metric-label { color: var(--muted); font-size: 14px; }
.analysis-dashboard .summary-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.analysis-dashboard .metric-tile { min-height: 0; padding: 16px; }
.analysis-dashboard .metric-label { font-size: 14px; }
.analysis-dashboard .report-drawer summary span b { font-size: 15px; }
.coach-panel::before { display: none; }
.coach-dialog .chat-panel { background: #fffdf9; box-shadow: none; backdrop-filter: none; }
.chat-coach-photo { width: 48px; height: 48px; flex-shrink: 0; object-fit: cover; object-position: center 32%; border-radius: 50%; }
.coach-dialog .chat-history { padding: 24px 22px 24px 62px; }
.chat-welcome { margin: 22px 0 32px -36px; padding: 12px 0; }
.chat-welcome h3 { max-width: 360px; margin: 14px 0 12px; font-size: 24px; font-weight: 600; line-height: 1.5; letter-spacing: -.03em; text-wrap: balance; }
.chat-start-prompts { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 26px; }
.chat-start-prompts button { min-height: 44px; padding: 10px 14px; border: 1px solid #ded3c6; border-radius: 13px; background: #f8f3eb; color: #755a47; font-size: 13px; cursor: pointer; transition: background .2s, border-color .2s; }
.chat-start-prompts button:hover { border-color: #c6aa91; background: #f0e7da; }
.chat-error { margin: 14px 0 20px; padding: 12px 14px; border: 1px solid #e6dbcf; border-radius: 12px; background: #faf5ee; color: var(--muted); font-size: 13px; }
.chat-error p { margin: 0; line-height: 1.6; }
.chat-error button { min-height: 44px; margin-top: 6px; padding: 7px 0; border: 0; background: transparent; color: var(--coral-ink); font-size: 13px; cursor: pointer; }
.message.assistant { position: relative; max-width: 100%; box-shadow: none; background: #f2eee7; }
.message-avatar { position: absolute; left: -44px; top: 0; width: 34px; height: 34px; border-radius: 50%; object-fit: cover; object-position: center 32%; }
.coach-dialog .chat-form { margin: 0; padding: 18px 20px max(18px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fffdf9; }
.model-entry-card { margin-bottom: 16px; width: 100%; padding: 14px 16px; background: #f5efe7; border: 0; gap: 12px; }
.model-entry-card b { flex: 1; font-size: 15px; }
@media (max-width: 1100px) {
  .model-preview { flex-direction: column; gap: 0; text-align: center; }
  .model-preview-stage { height: 90px; width: 100%; }
}
@media (min-width: 701px) and (max-height: 800px) {
  .result-view { padding-top: 6px; }
  .result-heading { margin-bottom: 12px; }
  .result-heading h1 { font-size: 28px; }
  .result-heading .model-motto { margin-bottom: 8px; }
  .analysis-dashboard { gap: 10px; }
  .analysis-gallery .image-grid { height: 375px; }
  .coach-identity { margin-bottom: 16px; }
}
@media (max-width: 700px) {
  .brand-model { display: none; }
  .model-motto, .upload-view .hero-copy > .model-motto { font-size: 15px; }
  .result-heading p.model-motto { display: block; font-size: 14px; margin: 0 0 8px; }
  .coach-identity { margin: 10px 0 20px; gap: 12px; }
  .coach-identity h2 { font-size: 21px; }
  .coach-photo { width: 58px; height: 58px; }
  .next-accessory { font-size: 17px; }
  .result-tools { flex-wrap: wrap; gap: 16px; }
  .model-previews { flex-basis: 100%; gap: 8px; }
  .model-preview-stage { height: 95px; }
  .model-preview b { font-size: 14px; }
  .upload-view .step-tips p, .upload-view .step-tips .mistake { font-size: 13px; }
  .result-tools > .button { flex: 1; font-size: 16px; }
  .analysis-dashboard .summary-tiles { grid-template-columns: 1fr; }
  .coach-dialog .chat-history { padding: 20px 14px 20px 54px; }
  .coach-dialog .chat-form { padding: 14px 14px max(14px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .model-preview { transition: none; } }

/* Both advice paragraphs come from the AI response, including the English reveal. */
.advice-copy-stage { position: relative; display: grid; isolation: isolate; }
.advice-copy-stage > span { grid-area: 1 / 1; align-self: start; }
.advice-english, .advice-english-measure { font-size: 15px; font-weight: 500; line-height: 1.65; }
.advice-english-measure { visibility: hidden; pointer-events: none; }
.advice-copy-stage .advice-chinese { clip-path: inset(0 100% 0 0); }
.advice-copy-stage.is-typing .advice-english::after { content: ''; display: inline-block; width: 2px; height: 1em; margin-left: 3px; vertical-align: -.1em; background: var(--coral); animation: typing-caret 600ms steps(2, jump-none) infinite; }
.advice-copy-stage.is-wiping .advice-english { animation: advice-english-wipe 680ms cubic-bezier(.4,0,.2,1) both; }
.advice-copy-stage.is-wiping .advice-chinese { animation: advice-chinese-wipe 680ms cubic-bezier(.4,0,.2,1) both; }
.advice-copy-stage.is-wiping::after { content: ''; position: absolute; inset: 0 auto 0 -15%; width: 12%; background: linear-gradient(90deg, transparent, #f2a57788, #fff5d999, transparent); pointer-events: none; animation: advice-sweep 680ms cubic-bezier(.4,0,.2,1) both; }
#adviceNextStep { font-size: 16px; font-weight: 500; line-height: 1.75; }
#adviceAccessory { margin-top: 7px; font-size: 16px; font-weight: 650; }
.accessory-showcase { padding: 16px 18px 6px; border-radius: 22px; background: linear-gradient(105deg, #f7e2d3bb, #fffaf285); }
.accessory-showcase-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 18px; }
.accessory-showcase-heading h2 { margin: 0; color: var(--coral-ink); font-size: 19px; font-weight: 650; }
.accessory-showcase-heading p { margin: 0; font-size: 16px; font-weight: 500; }
.accessory-showcase .model-preview-stage { height: 80px; }
.accessory-showcase .result-tools > .button { gap: 10px; }
@keyframes typing-caret { to { opacity: 0; } }
@keyframes advice-english-wipe { from { clip-path: inset(0); } to { clip-path: inset(0 0 0 100%); } }
@keyframes advice-chinese-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
@keyframes advice-sweep { from { left: -15%; opacity: 0; } 15% { opacity: 1; } to { left: 103%; opacity: 0; } }
@media (min-width: 701px) and (max-height: 800px) {
  .analysis-gallery .image-grid { height: 335px; }
  .analysis-dashboard .action-card { padding: 10px 0; }
  .coach-identity { margin-bottom: 12px; }
  .coach-photo { width: 58px; height: 58px; }
  .analysis-advice .coach-cta { min-height: 56px; margin-top: 12px; }
  .accessory-showcase { padding: 12px 16px 2px; }
  .accessory-showcase .model-preview-stage { height: 68px; }
}
@media (max-width: 700px) {
  .accessory-showcase { padding: 18px 12px 12px; margin-top: 6px; }
  .accessory-showcase-heading { display: block; }
  .accessory-showcase-heading h2 { font-size: 18px; }
  .accessory-showcase-heading p { margin-top: 8px; font-size: 15px; }
  .accessory-showcase .model-previews { margin-top: 12px; }
  .accessory-showcase .model-preview-stage { height: 90px; }
  #adviceNextStep, #adviceAccessory { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .advice-copy-stage .advice-chinese { clip-path: none; }
  .advice-english, .advice-english-measure, .advice-copy-stage::after { display: none; }
}
/* Keep the accessories beside the longer coach advice on desktop. */
.analysis-main { row-gap: 10px; align-items: start; }
.analysis-main > .analysis-gallery { grid-column: 1; grid-row: 1; }
.analysis-main > .analysis-advice { grid-column: 2; grid-row: 1 / span 2; align-self: start; padding-top: 18px; }
.analysis-main > .accessory-showcase { grid-column: 1; grid-row: 2; }
.accessory-showcase .result-tools { gap: 16px; }
.accessory-showcase .model-preview { flex-direction: column; gap: 0; text-align: center; }
.accessory-showcase .model-preview-stage { width: 100%; }
.accessory-showcase .model-preview b { font-size: 14px; }
@media (max-width: 700px) {
  .analysis-main > .analysis-gallery { grid-column: 1; grid-row: 1; }
  .analysis-main > .analysis-advice { grid-column: 1; grid-row: 2; padding-top: 0; }
  .analysis-main > .accessory-showcase { grid-column: 1; grid-row: 3; }
}

/* Put the signature in the page margin so it never crosses the report text. */
body { position: relative; }
.brand-watermark { position: absolute; left: 24px; bottom: max(4px, env(safe-area-inset-bottom)); z-index: 0; width: 64px; height: 44px; opacity: .3; mix-blend-mode: multiply; pointer-events: none; user-select: none; }
.brand-watermark img { display: block; width: 100%; height: 100%; object-fit: cover; }
.site-header, main { position: relative; z-index: 1; }
.coach-identity { gap: 12px; }
@media (max-width: 700px) {
  .brand-watermark { left: 12px; bottom: max(4px, env(safe-area-inset-bottom)); width: 56px; height: 38px; }
  .customize-main ~ .brand-watermark { width: 36px; height: 24px; bottom: max(2px, env(safe-area-inset-bottom)); }
  .mobile-action-bar:not([hidden]) ~ .brand-watermark { bottom: calc(88px + env(safe-area-inset-bottom)); }
  .coach-identity { gap: 10px; }
}

/* An open-source model shelf and a separate, quiet space for the coach. */
.analysis-main { column-gap: 36px; }
.analysis-main > .analysis-advice { padding: 24px; border-radius: 24px; background: var(--coach-surface); }
.analysis-advice .action-card { border-bottom-color: #d8cbbd; }
.analysis-advice .next-accessory { color: #665044; }
.analysis-advice .coach-cta { margin-top: 22px; border-color: #665044; background: #665044; box-shadow: none; }
.analysis-advice .coach-cta:hover { background: #503e34; box-shadow: none; }
.analysis-main > .accessory-showcase { padding: 14px 0 0; border-radius: 0; background: transparent; }
.accessory-showcase-heading h2 { color: var(--ink); font-size: 18px; font-weight: 600; }
.accessory-showcase-heading p { color: var(--muted); font-size: 15px; }
.accessory-showcase .result-tools { gap: 24px; }
.accessory-showcase .result-tools > .button { align-self: center; color: #665044; background: transparent; border-color: #c7b8aa; box-shadow: none; }
@media (min-width: 701px) and (max-height: 800px) {
  .analysis-main { column-gap: 30px; }
  .analysis-main > .analysis-advice { padding: 20px; }
  .analysis-advice .coach-cta { margin-top: 18px; }
}
@media (max-width: 700px) {
  .analysis-main { row-gap: 28px; }
  .analysis-main > .analysis-advice { padding: 20px 18px; border-radius: 22px; }
  .analysis-advice .coach-identity { margin-top: 0; }
  .analysis-main > .accessory-showcase { padding: 4px 2px 0; margin-top: 0; }
  .accessory-showcase .result-tools { gap: 20px; }
}

.upload-view .hero-copy > .welcome-intro { margin: 18px 0 0; max-width: 490px; font-size: 18px; line-height: 1.7; color: var(--muted); }
@media (max-width: 700px) { .upload-view .hero-copy > .welcome-intro { font-size: 16px; } }

/* Keep the welcome headline prominent and the purpose underneath quiet. */
.upload-view .welcome-guide .hero-copy h1 { font-size: clamp(34px, 3.5vw, 48px); line-height: 1.18; letter-spacing: -.045em; }
.upload-view .hero-copy > .welcome-intro { margin-top: 14px; font-size: 16px; line-height: 1.65; }
@media (max-width: 700px) {
  .upload-view .welcome-guide .hero-copy h1 { font-size: clamp(28px, 7.8vw, 34px); }
  .upload-view .hero-copy > .welcome-intro { font-size: 15px; }
}
.model-preview-stage > img { width: 100%; height: 100%; object-fit: contain; }

/* Product choice uses identical image boxes, neutral light and no photo backdrop. */
.mouse-picker { border: 0; margin: 24px 0 0; padding: 0; min-width: 0; }
.mouse-color-picker { border: 0; padding: 0; margin: 20px 0 0; min-width: 0; container-type: inline-size; }
.mouse-color-picker legend { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.mouse-color-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mouse-color-choice { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 24px; cursor: pointer; font-size: 13px; white-space: nowrap; }
@container (max-width: 300px) { .mouse-color-choice { flex-direction: column; gap: 5px; padding: 10px 4px; font-size: 12px; white-space: normal; text-align: center; } }
.mouse-color-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mouse-color-choice:has(input:checked) { border-color: var(--coral-dark); background: #f4eadf; box-shadow: inset 0 0 0 1px var(--coral-dark); }
.mouse-color-choice:has(input:focus-visible) { outline: 2px solid var(--coral-dark); outline-offset: 3px; }
.mouse-color-swatch { width: 20px; height: 20px; border-radius: 50%; border: 1px solid #0002; flex-shrink: 0; }
.swatch-auto { background: conic-gradient(#ece8df 0deg 120deg,#303133 120deg 240deg,#d52f64 240deg); }
.swatch-white { background: #f7f6f2; }
.swatch-black { background: #262729; }
.swatch-pink { background: #d52f64; }
.swatch-red { background: #b72430; }
.mouse-color-choice[hidden] { display:none; }
.mouse-color-picker[data-mouse="infinity_r2"] .swatch-auto { background:conic-gradient(#ece8df 0deg 120deg,#303133 120deg 240deg,#b72430 240deg); }
.mouse-color-picker > p { font-size: 12px; color: var(--muted); margin: 9px 0 0; line-height: 1.6; }
.mouse-color-picker.invalid > p { color: var(--coral-dark); }
.mouse-picker legend { font-size: 13px; font-weight: 600; margin-bottom: 12px; color: var(--muted); }
.mouse-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mouse-choice { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: #f6f3ee; cursor: pointer; text-align: center; transition: background .2s, border-color .2s; }
.mouse-choice:has(input:checked) { border-color: #b7805d; background: #f4eadf; }
.mouse-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mouse-choice:has(input:focus-visible) { outline: 2px solid var(--coral-dark); outline-offset: 3px; }
/* A zero-minimum grid track keeps portrait photos' intrinsic aspect ratio from
   expanding an implicit row beyond the fixed picture box when colors change. */
.mouse-choice-picture { display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; height: 118px; width: 82px; max-width: 100%; flex-shrink: 0; overflow: hidden; }
.mouse-choice img { display: block; height: 100%; width: 100%; min-height: 0; min-width: 0; max-height: 100%; max-width: 100%; object-fit: contain; filter: drop-shadow(0 3px 3px #3b302712); }
.mouse-choice-name { font-size: 13px; font-weight: 600; line-height: 1.7; }
.mouse-choice-name small { display: block; color: #96806e; font-size: 11px; font-weight: 400; }
.mouse-choice-check { position: absolute; top: 10px; right: 10px; font-size: 10px; color: #9b6642; opacity: 0; }
.mouse-choice:has(input:checked) .mouse-choice-check { opacity: 1; }
.mouse-silhouette { height: 100%; width: 100%; min-height: 0; min-width: 0; max-height: 100%; max-width: 100%; color: #80776e; }
.reference-guide { margin: 8px 0 12px; color: var(--muted); font-size: 13px; line-height: 1.7; }
@media (max-width: 600px) { .mouse-choice { gap: 6px; padding: 12px; flex-direction: column; text-align: center; } .mouse-choice-picture { height: 128px; width: 84px; } .mouse-choice-name { font-size: 11px; } .mouse-choice-name small { display: inline; margin-left: 4px; } }

.change-coach { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; margin-left: auto; padding: 0; border: 1px solid #ddcdbd; border-radius: 50%; background: transparent; color: #987456; font: inherit; font-size: 19px; cursor: pointer; }
.change-coach:hover { background: #e9ded1; }
.change-coach:focus-visible { outline: 2px solid #b48661; outline-offset: 3px; }

/* Official product links follow the report, keeping the coach's action in place. */
.analysis-main > .mouse-products{grid-column:1 / -1;grid-row:3;padding:28px 0 8px}
.mouse-products-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin-bottom:18px}
.mouse-products-eyebrow{font-size:10px;letter-spacing:.19em;color:var(--muted);font-weight:700}
.mouse-products-heading h2{font-size:25px;letter-spacing:-.035em;font-weight:600;margin:8px 0 0}
.mouse-products-heading>p{margin:0 0 3px;color:var(--muted);font-size:12px}
.mouse-product-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.mouse-product-card{display:flex;flex-direction:column;min-width:0;border:1px solid #e4dbcf;border-radius:20px;overflow:hidden;color:var(--ink);background:#faf7f1;text-decoration:none;transition:transform .2s,border-color .2s,box-shadow .2s}
.mouse-product-card:hover{transform:translateY(-4px);border-color:#bda994;box-shadow:0 14px 28px #57443514}
.mouse-product-card:focus-visible{outline:3px solid var(--coral-dark);outline-offset:4px}
.mouse-product-pair{display:flex;align-items:center;justify-content:center;width:100%;height:100%}
.mouse-product-card.is-recommended{border-color:var(--coral-dark);box-shadow:0 0 0 1px var(--coral-dark)}
.mouse-product-recommendation{align-self:flex-start;font-size:9px;line-height:1.5;font-weight:700;letter-spacing:.04em;color:var(--coral-dark);margin-bottom:9px}
#mouseRecommendation{font-size:12px;color:var(--muted);line-height:1.65;margin:9px 0 0;font-weight:400;letter-spacing:0}
.result-heading{display:flex;align-items:center;justify-content:space-between;gap:18px}
.retest-grip{font-size:12px;white-space:nowrap}
.report-actions{display:flex;align-items:center;gap:10px;margin-top:22px}
.report-actions .coach-cta{margin:0;min-height:52px;width:auto}
.report-actions .diagnose-cta{flex:1;display:flex;justify-content:space-between;padding:15px 20px;font-size:16px}
.report-actions .diagnose-cta>.action-icon{width:21px;height:21px;padding:0;border-radius:0;background:transparent}
.report-actions .customize-cta{padding:12px 14px;font-size:12px;font-weight:650;gap:8px;color:#355e58;background:#edf2ee;box-shadow:none;border:1px solid #c5d5cb;transition:background .18s,border-color .18s,color .18s}
.report-actions .customize-cta:hover{color:#244b43;background:#dce9df;border-color:#a8c3b4;box-shadow:none;transform:none}
.report-actions .customize-cta:focus-visible{outline:3px solid #5a8273;outline-offset:3px}
.report-actions .customize-cta>.action-icon{width:17px;height:17px}
.retest-grip>.action-icon,.change-coach>.action-icon{width:17px;height:17px}
.coach-dialog::backdrop{backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);background:#28231f33}
.chat-report-context{display:flex;align-items:center;gap:8px;padding:12px 22px;background:#f4eee4;font-size:11px;color:var(--muted);border-bottom:1px solid var(--line)}
.chat-report-context b{margin-left:auto;color:var(--ink);font-weight:600}
.chat-context-dot{width:6px;height:6px;flex-shrink:0;border-radius:50%;background:#65866a}
.mouse-product-visual{position:relative;display:flex;align-items:center;justify-content:center;height:205px;padding:32px 20px 8px;overflow:hidden;background:radial-gradient(ellipse at 50% 60%,#dcd7cf55,transparent 68%)}
.mouse-product-97 .mouse-product-visual{background:radial-gradient(ellipse at 50% 62%,#f5c5d366,transparent 70%)}
.mouse-product-100 .mouse-product-visual{background:radial-gradient(ellipse at 50% 60%,#f2ceae77,transparent 68%)}
.mouse-product-visual img{height:155px;width:auto;max-width:100%;object-fit:contain;filter:drop-shadow(0 10px 10px #3b291e14);transition:transform .25s}
.mouse-product-visual .mouse-product-pair{max-width:180px;margin:auto;gap:0}
.mouse-product-visual .mouse-product-pair img{width:85px;max-width:48%;height:168px;object-fit:cover}
.mouse-product-100 .mouse-product-visual .mouse-product-pair img{filter:brightness(0)}
.mouse-product-visual .mouse-product-pair img:first-child{position:relative;z-index:1;transform:rotate(-7deg)}
.mouse-product-visual .mouse-product-pair img:last-child{height:150px;margin-left:-22px;margin-top:18px;transform:rotate(9deg)}
.mouse-product-97 .mouse-product-visual img{width:100%;height:auto;max-height:160px}
.mouse-product-card:hover img{transform:translateY(-3px) rotate(-3deg)}
.mouse-product-tag{position:absolute;top:17px;left:18px;color:#817467;font-size:9px;font-weight:700;letter-spacing:.1em}
.mouse-product-copy{display:flex;flex:1;flex-direction:column;padding:17px 20px 20px;border-top:1px solid #e6ded377}
.mouse-product-kicker{font-size:11px;color:var(--coral-dark);font-weight:600}
.mouse-product-copy h3{font-size:17px;letter-spacing:-.025em;margin:9px 0 8px;font-weight:650}
.mouse-product-copy p{font-size:12px;line-height:1.65;color:var(--muted);margin:0 0 18px}
.mouse-product-link{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:auto;font-size:12px;font-weight:600}
.mouse-product-link span{font-size:19px;font-weight:400}
@media(max-width:700px){.analysis-main>.mouse-products{grid-row:4;padding-top:14px}.mouse-products-heading{display:block}.mouse-products-heading h2{font-size:23px}.mouse-products-heading>p{margin-top:10px}.mouse-product-grid{grid-template-columns:1fr;gap:12px}.mouse-product-card{display:grid;grid-template-columns:38% 1fr;border-radius:18px}.mouse-product-visual{height:205px;padding:36px 12px 12px}.mouse-product-visual img{height:145px;max-width:100%}.mouse-product-97 .mouse-product-visual img{max-width:none;width:185%;max-height:135px}.mouse-product-copy{padding:22px 18px;border-top:0;border-left:1px solid #e6ded377}.mouse-product-copy h3{font-size:15px}.mouse-product-tag{left:12px;top:14px;font-size:8px}}
@media(prefers-reduced-motion:reduce){.mouse-product-card,.mouse-product-visual img{transition:none}.mouse-product-card:hover,.mouse-product-card:hover img{transform:none}}
@media(prefers-reduced-motion:reduce){.message{animation:none}}
@media(max-width:700px){.mouse-product-visual .mouse-product-pair img{max-width:none;flex-shrink:0}.mouse-product-visual .mouse-product-pair img:first-child{width:65px;height:122px}.mouse-product-visual .mouse-product-pair img:last-child{width:65px;height:112px;margin-left:-30px}.report-actions .diagnose-cta{font-size:14px;padding:14px}.report-actions .customize-cta{font-size:11px;max-width:45%}}
.analysis-main > .mouse-products-compact { padding: 16px 0 4px; }
.mouse-products-compact .mouse-products-heading { margin-bottom: 12px; }
.mouse-products-compact .mouse-products-heading h2 { font-size: 19px; margin-top: 5px; }
.mouse-products-compact .mouse-product-card { display: grid; grid-template-columns: 30% minmax(0, 1fr); border-radius: 14px; }
.mouse-products-compact .mouse-product-visual { height: 112px; padding: 12px 8px; }
.mouse-products-compact .mouse-product-visual img { height: 86px; max-width: 100%; }
.mouse-products-compact .mouse-product-visual .mouse-product-pair img{width:48px;max-width:none;height:92px;object-fit:cover;flex-shrink:0}
.mouse-products-compact .mouse-product-visual .mouse-product-pair img:last-child{height:80px}
.mouse-products-compact .mouse-product-97 .mouse-product-visual img { height: auto; width: 140%; max-width: none; max-height: 85px; }
.mouse-products-compact .mouse-product-tag, .mouse-products-compact .mouse-product-kicker, .mouse-products-compact .mouse-product-copy p { display: none; }
.mouse-products-compact .mouse-product-copy { padding: 14px 10px; border-top: 0; border-left: 1px solid #e6ded377; justify-content: center; }
.mouse-products-compact .mouse-product-copy h3 { font-size: 12px; margin: 0 0 12px; overflow-wrap: anywhere; }
.mouse-products-compact .mouse-product-link { font-size: 11px; margin-top: 0; }
.result-view[data-mouse="other"] .analysis-main > .mouse-products { grid-row: 2; }
.result-view[data-mouse="other"] .analysis-main > .analysis-advice { grid-row: 1; }
@media(max-width:700px){
  .mouse-products-compact .mouse-product-grid { gap: 8px; }
  .mouse-products-compact .mouse-product-card { grid-template-columns: 26% minmax(0, 1fr); }
  .mouse-products-compact .mouse-product-visual { height: 82px; padding: 8px; }
  .mouse-products-compact .mouse-product-visual img { height: 66px; }
  .mouse-products-compact .mouse-product-visual .mouse-product-pair img:first-child{width:38px;height:70px}
  .mouse-products-compact .mouse-product-visual .mouse-product-pair img:last-child{width:38px;height:62px;margin-left:-18px;margin-top:10px}
  .mouse-products-compact .mouse-product-97 .mouse-product-visual img { max-height: 65px; }
  .mouse-products-compact .mouse-product-copy { padding: 10px 14px; }
  .mouse-products-compact .mouse-product-copy h3 { margin-bottom: 4px; }
  .result-view[data-mouse="other"] .analysis-main > .mouse-products { grid-row: 3; }
  .result-view[data-mouse="other"] .analysis-main > .analysis-advice { grid-row: 2; }
}
