:root {
  --bg: #f3f3f1;
  --panel: #ffffff;
  --text: #111111;
  --muted: #686868;
  --line: #d8d8d4;
  --primary: #111111;
  --primary-dark: #333333;
  --accent: #5f5f5f;
  --danger: #b3261e;
  --success: #237548;
  --radius: 16px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}
a { color: var(--primary); text-decoration: none; }
h1, h2, h3, p { margin-top: 0; }
input, textarea, select, button { font: inherit; }
label { display: grid; gap: 6px; font-weight: 700; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fff;
  color: var(--text);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px max(18px, calc((100vw - 1120px) / 2));
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; }
.brand img { display: block; width: 165px; height: auto; }
.topbar nav { display: flex; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.credit-counter { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; color: #087f83; background: #e8f8f7; font-weight: 800; white-space: nowrap; }
.credit-counter.is-empty { color: var(--danger); background: #fff0ef; }
.page { max-width: 1120px; margin: 0 auto; padding: 22px 18px 72px; }

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}
.auth-box {
  width: min(440px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 18px 50px rgba(29,39,51,.08);
}
.auth-logo {
  display: block;
  width: min(220px, 72%);
  height: auto;
  margin: 0 auto 20px;
}
.auth-box form, .grid-form { display: grid; gap: 14px; }

.hero, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 18px;
}
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.kicker { color: var(--accent); text-transform: uppercase; font-size: 12px; font-weight: 800; letter-spacing: .06em; }
.muted { color: var(--muted); }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 6px 10px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 14px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}
.button.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.button.primary:hover { background: var(--primary-dark); }
.button.ghost { background: #f8fafb; }
.button.small { padding: 7px 10px; font-size: 13px; }
.button.full { width: 100%; }
.button:disabled { opacity: .45; cursor: not-allowed; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.client-search { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.client-form { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; }
.client-form .client-notes { grid-column: 1 / -1; }
.client-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 12px; }
.client-card { display: grid; grid-template-columns: 52px 1fr auto; gap: 13px; align-items: center; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.client-card:hover { border-color: #12b8bd; box-shadow: 0 8px 24px rgba(18,184,189,.09); }
.client-card h3, .client-card p { margin-bottom: 2px; }
.client-card p, .client-card small { color: var(--muted); }
.client-card > strong { font-size: 12px; color: var(--muted); text-align: right; }
.client-avatar { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: #e8f8f7; color: #087f83; font-weight: 900; }
.danger-zone { border-color: #efd0cd; }
.quota-status { padding: 10px 13px; border: 1px solid #bfe4cd; border-radius: var(--radius); color: var(--success); background: #edf8f1; }
.quota-status.quota-reached { color: var(--danger); border-color: #f1c5c1; background: #fff0ef; }
.result-actions { display: flex; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.score-comparison { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.comparison-source { margin: -9px 0 24px; color: var(--muted); font-size: 13px; text-align: right; }
.comparison-source a { font-weight: 800; text-decoration: underline; }
.delta { display: inline-flex; min-width: 38px; justify-content: center; padding: 3px 7px; border-radius: 999px; font-weight: 800; }
.delta-good { color: #237548; background: #e8f7ee; }
.delta-alert { color: #975913; background: #fff2df; }
.delta-flat { color: var(--muted); background: #eceeec; }

@media (max-width: 700px) {
  .client-form { grid-template-columns: 1fr 1fr; }
  .client-search { grid-template-columns: 1fr; }
  .client-card { grid-template-columns: 46px 1fr; }
  .client-card > strong { grid-column: 2; text-align: left; }
}

.notice {
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
}
.notice.success { background: #edf8f1; color: var(--success); border-color: #bfe4cd; }
.notice.error { background: #fff0ef; color: var(--danger); border-color: #f1c5c1; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; border-bottom: 1px solid var(--line); padding: 12px; }
th { color: var(--muted); font-size: 13px; }

.diagnostic-form { display: grid; gap: 18px; }
.question-group {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}
.question-group legend {
  width: 100%;
  padding: 14px 0 8px;
  font-weight: 900;
  font-size: 20px;
}
.question-group legend span { color: var(--primary); margin-right: 8px; }
.question-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  display: grid;
  gap: 14px;
}
.question-card p { color: var(--muted); margin-bottom: 0; }
.choice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  min-height: 44px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  font-size: 14px;
  font-weight: 800;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.choice span:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(28,45,58,.09); }
.choice input:checked + span {
  background: #12b8bd;
  border-color: #12b8bd;
  color: #fff;
  box-shadow: 0 8px 20px rgba(18,184,189,.25);
}
.sticky-actions {
  position: sticky;
  bottom: 0;
  padding: 12px 0 0;
  background: linear-gradient(to top, var(--bg) 65%, transparent);
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.score-grid.compact { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.score-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
}
.score-ring {
  --score: 0;
  width: 78px;
  height: 78px;
  margin: 0 auto 10px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: var(--ring-color, #12b8bd);
  line-height: 1;
  background:
    radial-gradient(circle at center, #fff 58%, transparent 59%),
    conic-gradient(var(--ring-color, #12b8bd) calc(var(--score) * 1%), #edf1f2 0);
}
.score-ring span { font-size: 22px; }
.score-ring small { display: block; font-size: 8px; margin-top: 2px; color: #8b9497; }
.tone-coral { --ring-color: #f36f7d; }
.tone-aqua { --ring-color: #20bcc2; }
.tone-lime { --ring-color: #8dcc64; }
.tone-violet { --ring-color: #a87bd6; }
.tone-amber { --ring-color: #f0ae4b; }
.tone-blue { --ring-color: #5a98db; }
.score-card h3 { margin-bottom: 2px; }
.score-card p { margin: 0; color: var(--muted); font-size: 13px; }
.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.clean-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.clean-list li {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fbfcfd;
}
.clean-list span { float: right; color: var(--muted); }

.tabs { display: flex; gap: 8px; margin-bottom: 18px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab {
  border: 0;
  background: transparent;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 800;
  color: var(--muted);
}
.tab.active { color: var(--primary); border-bottom: 3px solid var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.add-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 14px;
}
.add-box summary { cursor: pointer; font-weight: 900; }
.admin-question-list { display: grid; gap: 12px; }
.admin-question {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  display: grid;
  grid-template-columns: 150px 1fr 1.4fr 210px auto;
  gap: 10px;
  align-items: end;
}
.question-meta { display: grid; gap: 4px; }
.question-meta span { color: var(--muted); }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; }
.check { display: flex; gap: 8px; align-items: center; padding-bottom: 11px; }
.check input { width: auto; }

@media (max-width: 820px) {
  .hero, .section-head { align-items: stretch; flex-direction: column; }
  .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .columns { grid-template-columns: 1fr; }
  .admin-question { grid-template-columns: 1fr; }
  .mini-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .page { padding-inline: 12px; }
  .hero, .panel, .auth-box { padding: 16px; }
  .choice-grid { grid-template-columns: 1fr; }
}

@media print {
  .topbar, .button, .sticky-actions { display: none; }
  body { background: #fff; }
  .page { max-width: none; padding: 0; }
  .panel { border: 0; }
}

.calc-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); align-items: end; }

/* Identite Ericson Laboratoire et correctifs responsive */
html { overflow-x: hidden; }
body { overflow-x: hidden; background: var(--bg); }
.topbar {
  min-width: 0;
  background: rgba(255,255,255,.98);
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
}
.brand {
  min-width: 0;
  color: #111;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 15px;
}
.topbar nav a {
  color: #111;
  padding: 7px 0;
  border-bottom: 1px solid transparent;
}
.topbar nav a:hover { border-bottom-color: #111; }
.page, .panel, .hero, .diagnostic-form, .question-group, .question-card { min-width: 0; }
.panel, .hero, .auth-box { box-shadow: 0 8px 30px rgba(0,0,0,.035); }
.panel { border-top: 3px solid #111; }
h1, h2, h3, legend, strong { color: #111; }
.question-group { min-inline-size: 0; width: 100%; }
.question-group legend {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: .025em;
}
.question-group legend span { color: #666; }
.question-card { overflow: hidden; }
.question-card p { overflow-wrap: anywhere; }
.choice { min-width: 0; }
.choice span { min-width: 0; background: #fff; }
.choice input:focus-visible + span { outline: 2px solid #111; outline-offset: 2px; }
.choice input:checked + span { background: #111; border-color: #111; }
.button.primary { background: #111; border-color: #111; }
.button.primary:hover { background: #333; border-color: #333; }
input:focus, textarea:focus, select:focus { outline: 2px solid #111; outline-offset: 1px; border-color: #111; }
.sticky-actions { background: linear-gradient(to top, var(--bg) 72%, transparent); }

@media (max-width: 600px) {
  .brand img { width: 135px; }
  .topbar {
    position: static;
    padding: 15px 16px 13px;
    gap: 10px;
  }
  .topbar nav { width: 100%; gap: 20px; font-size: 14px; }
  .page { width: 100%; padding: 12px 10px 64px; }
  .panel, .hero, .auth-box { width: 100%; padding: 16px 14px; margin-bottom: 12px; }
  .section-head { gap: 8px; margin-bottom: 14px; }
  .section-head h1 { font-size: clamp(25px, 8vw, 34px); line-height: 1.08; margin-bottom: 0; }
  .pill { align-self: flex-start; }
  .diagnostic-form { gap: 16px; }
  .question-group { gap: 10px; }
  .question-group legend { padding: 12px 0 5px; font-size: 18px; }
  .question-card { padding: 14px 12px; gap: 12px; }
  .question-card p { font-size: 15px; line-height: 1.45; }
  .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .choice span { min-height: 46px; padding: 7px 4px; font-size: 13px; }
  input, textarea, select { padding: 11px; }
  .sticky-actions { margin-inline: -2px; padding-top: 10px; }
}

@media (max-width: 340px) {
  .choice-grid { grid-template-columns: 1fr; }
}
/* Correctif anti-debordement mobile renforce */
html, body { width: 100%; max-width: 100%; }
.topbar, .page, .panel, .diagnostic-form,
.diagnostic-form > *, .question-group, .question-card,
.question-card > *, .section-head, .section-head > * {
  min-width: 0;
  max-width: 100%;
}
.section-head h1, .question-group legend,
.question-card strong, .question-card p {
  overflow-wrap: anywhere;
  word-break: normal;
  white-space: normal;
}
.question-group {
  inline-size: 100%;
  min-inline-size: 0;
  max-inline-size: 100%;
  overflow: hidden;
}
.question-group legend {
  inline-size: auto;
  max-inline-size: 100%;
}
.choice-grid {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 600px) {
  .topbar { position: sticky; padding-top: 13px; }
  .topbar .brand { padding-right: 115px; }
  .topbar .credit-counter { position: absolute; top: 19px; right: 16px; }
  .topbar nav { padding-right: 0; }
  .page { max-width: 100vw; overflow: hidden; }
  .panel { max-width: 100%; overflow: hidden; }
  .diagnostic-form { width: 100%; overflow: hidden; }
  .question-card { width: 100%; max-width: 100%; }
  .choice-grid { display: flex; flex-wrap: wrap; }
  .choice { flex: 1 1 calc(50% - 7px); max-width: calc(50% - 4px); }
  .section-head h1 { width: 100%; }
}

@media (max-width: 340px) {
  .choice { flex-basis: 100%; max-width: 100%; }
}
/* Catalogue produits et administration */
.button.danger { color: var(--danger); border-color: #d8a5a1; background: #fff; }
.button.danger:hover { color: #fff; background: var(--danger); border-color: var(--danger); }
.form-actions, .inline-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inline-actions form { display: flex; align-items: center; gap: 8px; }
.inline-actions select { width: auto; min-width: 120px; }
.spaced-title { margin-top: 30px; }
.product-form, .engine-form { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); align-items: end; }
.admin-product-list { display: grid; gap: 14px; }
.admin-product {
  display: grid;
  grid-template-columns: 90px repeat(2, minmax(140px, .7fr)) repeat(2, minmax(190px, 1fr));
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
}
.admin-product .form-actions { grid-column: 2 / -1; justify-content: flex-end; }
.product-results { margin-top: 32px; padding-top: 26px; border-top: 1px solid var(--line); }
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.product-card { display: grid; grid-template-rows: 150px auto; min-width: 0; color: var(--text); border: 1px solid var(--line); background: #fff; }
.product-card:hover { border-color: #111; }
.product-thumb { display: grid; place-items: center; min-width: 0; overflow: hidden; background: #f3f3f1; color: var(--muted); }
.product-thumb img { display: block; width: auto; height: auto; max-width: 180px; max-height: 120px; object-fit: contain; }
.product-card-body { padding: 15px; }
.product-card-body h3 { margin: 5px 0 8px; }
.product-card-body p { margin-bottom: 12px; }
.admin-thumb { width: 90px; height: 90px; }

@media (max-width: 900px) {
  .admin-product { grid-template-columns: 90px 1fr 1fr; }
  .admin-product .form-actions { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .admin-product { grid-template-columns: 1fr; }
  .admin-product .form-actions { grid-column: auto; justify-content: flex-start; }
  .admin-thumb { width: 100%; height: 150px; }
  .product-grid { grid-template-columns: 1fr; }
  .product-card { grid-template-columns: 110px minmax(0, 1fr); grid-template-rows: auto; }
  .product-thumb { min-height: 120px; }
  .product-thumb img { max-width: 90px; max-height: 90px; }
  .table-wrap .inline-actions { min-width: 210px; }
}

/* Experience diagnostic visuelle */
.diagnostic-submit { gap: 12px; min-height: 54px; border-radius: 999px; font-size: 16px; background: linear-gradient(135deg, #10191a, #183d3e); }
.diagnostic-submit span { font-size: 22px; transition: transform .2s ease; }
.diagnostic-submit:hover span { transform: translateX(5px); }
.question-card { border-color: #e5e9e8; box-shadow: 0 5px 20px rgba(35,58,58,.04); }
.choice span { border-radius: 999px; }
.choice input:checked + span { background: #12b8bd; border-color: #12b8bd; color: #fff; box-shadow: 0 8px 20px rgba(18,184,189,.25); }
.intensity-scale { width: 100%; padding: 4px 3px 0; }
.scale-head, .scale-numbers { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.scale-head { margin-bottom: 8px; color: var(--muted); font-size: 13px; }
.scale-head output { min-width: 54px; padding: 5px 9px; color: #fff; text-align: center; font-weight: 700; border-radius: 999px; background: #12b8bd; }
.intensity-scale input[type="range"] { width: 100%; padding: 0; accent-color: #12b8bd; cursor: pointer; }
.scale-numbers { margin-top: 5px; color: var(--muted); font-size: 11px; }

.result-page { background: linear-gradient(145deg, #fff 0%, #fbfdfc 100%); }
.diagnostic-visual {
  display: grid;
  grid-template-columns: minmax(280px, .86fr) minmax(430px, 1.4fr);
  gap: 34px;
  align-items: center;
  margin: 0 -22px 30px;
  padding: 0 22px 30px;
  border-bottom: 1px solid #e9eeec;
}
.face-analysis { position: relative; min-height: 520px; margin: 0; overflow: hidden; border-radius: 24px; background: #eef2f0; box-shadow: 0 18px 45px rgba(32,66,64,.13); }
.face-analysis img { display: block; width: 100%; height: 520px; object-fit: cover; object-position: center 35%; }
.face-analysis::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(7,35,35,.56), transparent 25%); }
.face-analysis figcaption { position: absolute; z-index: 2; bottom: 17px; left: 20px; right: 20px; color: #fff; font-size: 12px; text-align: center; }
.face-zone { position: absolute; z-index: 2; display: block; border: 1.5px dashed rgba(32,188,194,.88); background: rgba(32,188,194,.055); box-shadow: inset 0 0 12px rgba(255,255,255,.12); }
.zone-forehead { width: 27%; height: 7%; left: 36.5%; top: 27%; border-radius: 48%; }
.zone-eye-left, .zone-eye-right { width: 15%; height: 5%; top: 43%; border-radius: 50%; border-color: rgba(168,123,214,.9); background: rgba(168,123,214,.05); }
.zone-eye-left { left: 29%; transform: rotate(5deg); }
.zone-eye-right { right: 29%; transform: rotate(-5deg); }
.zone-t { width: 8%; height: 17%; left: 46%; top: 39%; border-radius: 42%; border-color: rgba(240,174,75,.9); background: rgba(240,174,75,.05); }
.zone-cheek-left, .zone-cheek-right { width: 17%; height: 8%; top: 49%; border-radius: 50%; border-color: rgba(243,111,125,.9); background: rgba(243,111,125,.05); }
.zone-cheek-left { left: 26%; transform: rotate(7deg); }
.zone-cheek-right { right: 26%; transform: rotate(-7deg); }
.zone-mouth { width: 17%; height: 5%; left: 41.5%; top: 58%; border-radius: 50%; border-color: rgba(90,152,219,.9); background: rgba(90,152,219,.05); }
.zone-chin { width: 13%; height: 4%; left: 43.5%; top: 65%; border-radius: 50%; border-color: rgba(141,204,100,.9); background: rgba(141,204,100,.06); }
.score-overview h2 { font-size: clamp(25px, 3vw, 39px); line-height: 1.08; margin-bottom: 10px; }
.score-overview > .muted { max-width: 560px; }
.score-overview .score-grid { grid-template-columns: repeat(3, minmax(105px, 1fr)); margin: 24px 0 0; }
.score-card { border-radius: 18px; border-color: #e9eeec; background: rgba(255,255,255,.86); box-shadow: 0 9px 25px rgba(32,66,64,.06); }

.product-results { background: #f6f9f8; margin-inline: -22px; margin-bottom: -22px; padding: 30px 22px 22px; }
.product-grid { gap: 20px; }
.product-card { border: 0; border-radius: 20px; overflow: hidden; box-shadow: 0 12px 32px rgba(34,57,55,.1); transition: transform .2s ease, box-shadow .2s ease; }
.product-card:hover { border-color: transparent; transform: translateY(-5px); box-shadow: 0 18px 40px rgba(34,57,55,.16); }
.product-thumb { position: relative; background: linear-gradient(145deg, #fff, #eef6f4); }
.product-match-badge { position: absolute; top: 12px; left: 12px; z-index: 2; padding: 5px 9px; border-radius: 999px; color: #087d81; background: #dff7f5; font-size: 10px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.product-card-body { padding: 18px; }
.product-card-body strong { color: #087d81; }

@media (max-width: 820px) {
  .diagnostic-visual { grid-template-columns: 1fr; }
  .face-analysis, .face-analysis img { min-height: 420px; height: 420px; }
  .score-overview .score-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 821px) {
  .diagnostic-visual { grid-template-columns: minmax(433px, .9fr) minmax(520px, 1.35fr); align-items: start; }
  .face-analysis { width: 433px; max-width: 100%; height: 650px; min-height: 650px; justify-self: center; background: #e8ecea; }
  .face-analysis img { width: 100%; height: 650px; object-fit: contain; object-position: center; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 300px)); justify-content: start; }
  .product-card { width: 100%; max-width: 300px; }
}
@media (max-width: 520px) {
  .diagnostic-visual { margin-inline: -14px; padding-inline: 14px; gap: 25px; }
  .face-analysis, .face-analysis img { min-height: 390px; height: 390px; }
  .score-overview .score-grid { grid-template-columns: repeat(2, 1fr); }
  .product-results { margin-inline: -14px; margin-bottom: -16px; padding-inline: 14px; }
}

.app-footer {
  padding: 8px 18px 18px;
  color: #929997;
  font-size: 11px;
  text-align: center;
}
.welcome-message {
  margin-bottom: 7px;
  color: #087d81;
  font-size: 14px;
  font-weight: 800;
}
.diagnostic-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.diagnostic-actions form { margin: 0; }
.diagnostic-actions form .button { width: auto; }

@media (max-width: 600px) {
  .diagnostic-actions { justify-content: flex-start; }
}

@media print {
  .app-footer { display: none; }
}
