/* Beauty Check Skin Check: the same look as the institute app (knebster/bc-institute, public/app.css),
   iPad first. Light grey page, white cards without borders, black rounded menu bar, orange accent,
   Work Sans Light, uppercase light titles, orange section headings, uppercase pill buttons
   (Kevin, 25 Nov 2026: "compare with design of institute … make it more consistent").
   Shared parts keep the institute's class names; the Skin Check's own parts (steps, chips, grades,
   photos, programmes) are drawn in the same language. */
@font-face { font-family: 'Work Sans'; font-weight: 300; font-style: normal; font-display: swap; src: url('/static/fonts/work-sans-latin-300-normal.woff2') format('woff2'); }
@font-face { font-family: 'Work Sans'; font-weight: 300; font-style: italic; font-display: swap; src: url('/static/fonts/work-sans-latin-300-italic.woff2') format('woff2'); }
@font-face { font-family: 'Work Sans'; font-weight: 400; font-style: normal; font-display: swap; src: url('/static/fonts/work-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Work Sans'; font-weight: 500; font-style: normal; font-display: swap; src: url('/static/fonts/work-sans-latin-500-normal.woff2') format('woff2'); }

:root {
  --bg: #F7F7F7; --card: #FFFFFF; --ink: #111111; --text: #333333; --muted: #666666; --line: #EBEBEB;
  --accent: #F6781F; --accent-ink: #A34A0B; --accent-soft: #FEF0E5; --heading: #F6781F;
  --ok: #1F6B43; --ok-soft: #E5F3EA; --bad: #A6322A; --bad-soft: #FBE7E5; --warn: #6B4A00; --warn-soft: #FFF4D6;
  --r: 18px;
  --font: 'Work Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; } /* no grey flash on taps */
/* keep room for the scroll bar on every page, so nothing jumps sideways between long and short pages */
html { scrollbar-gutter: stable; }
body { margin: 0; background: var(--bg); color: var(--text); font: 300 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--text); }
@media (hover: hover) { a:hover { color: var(--heading); } }
b, strong { font-weight: 500; color: var(--ink); }
h1, h2, h3 { margin: 0; font-weight: 300; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img { max-width: 100%; }
.hidden { display: none !important; }
[hidden] { display: none !important; }

/* top bar */
.top { position: sticky; top: 0; z-index: 10; padding: calc(env(safe-area-inset-top) + 10px) 12px 0; background: var(--bg); }
.top-in { max-width: 920px; margin: 0 auto; background: #111; border-radius: 22px; padding: 10px 12px 10px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.brand img { height: 24px; width: auto; display: block; }
.brand span { font-size: 10px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.75); border-left: 1px solid rgba(255,255,255,.3); padding-left: 10px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: #111; font-size: 13px; font-weight: 500; display: grid; place-items: center; text-decoration: none; flex: none; }
.avatar[aria-current="page"] { box-shadow: 0 0 0 2px #111, 0 0 0 4px #fff; } /* on your account and its settings */
@media (hover: hover) { .avatar:hover { color: #111; } }
/* the menu with icons, as in the institute app: the tabs share the row; on a phone a tab bar at the bottom */
.staffnav { max-width: 920px; margin: 8px auto 0; display: flex; gap: 4px; padding: 2px; }
.staffnav a { flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 6px; min-height: 42px; border-radius: 25px; text-decoration: none; font-size: 13px; font-weight: 400; letter-spacing: .04em; text-transform: uppercase; color: var(--text); background: #fff; }
.staffnav a[aria-current="page"] { background: var(--ink); color: #fff; }
.nico { width: 23px; height: 23px; flex: none; stroke-width: 1.5; }
.staffnav .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 719.98px) {
  .staffnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; margin: 0; max-width: none; gap: 4px; padding: 6px 10px calc(env(safe-area-inset-bottom) + 6px); background: #fff; border-top: 1px solid var(--line); }
  .staffnav a { background: transparent; min-height: 46px; flex-direction: column; gap: 3px; padding: 5px 4px 4px; border-radius: 16px; }
  .staffnav a[aria-current="page"] { background: var(--ink); color: #fff; }
  .staffnav .lbl { font-size: 10px; letter-spacing: .08em; line-height: 1; }
  .staffnav .nico { width: 22px; height: 22px; }
  body.tabbar main.wrap { padding-bottom: calc(env(safe-area-inset-bottom) + 96px); }
  html.typing .staffnav { display: none; }
}
@media (min-width: 720px) { .staffnav a { flex: 1 1 auto; } .nico { width: 19px; height: 19px; } }

main.wrap { max-width: 920px; margin: 0 auto; padding: 18px 16px calc(env(safe-area-inset-bottom) + 48px); display: grid; gap: 18px; }

/* type */
h1, .h1 { font-size: 30px; letter-spacing: .04em; text-transform: uppercase; color: var(--text); line-height: 1.15; }
.sec { font-size: 17px; letter-spacing: .08em; text-transform: uppercase; color: var(--heading); padding: 0 4px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.label { font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
h3 { font-size: 16px; font-weight: 400; color: var(--ink); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hint { font-size: 12.5px; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.lead { color: var(--muted); max-width: 68ch; }
.empty { color: var(--muted); font-size: 14px; padding: 0 4px; }
/* the path on top: every step the same colour and size */
.crumbs { font-size: 15px; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; min-height: 32px; padding: 0 4px; color: var(--ink); }
.crumbs a { text-decoration: none; color: var(--ink); }
.crumbs .sep { color: #bbb; }
.hello { display: grid; gap: 4px; padding: 0 4px; }
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; padding: 0 4px; }
/* who is looking at the screen: "Skin therapist · Anna", "Kundenansicht" with the language switch */
.mode { padding: 0 4px; font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.mode .who { color: var(--ink); }
.mode .lang { margin-left: 10px; vertical-align: middle; }

/* cards and lists */
.card { background: var(--card); border-radius: var(--r); padding: 18px 20px; display: grid; gap: 14px; min-width: 0; }
a.card { text-decoration: none; color: var(--text); border: 2px solid transparent; }
@media (hover: hover) { a.card:hover { border-color: var(--accent); } }
.stack { display: grid; gap: 12px; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.title-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.title-row .name { font-size: 20px; font-weight: 400; color: var(--ink); }
.list { background: var(--card); border-radius: var(--r); padding: 2px 18px; display: grid; }
.list > * { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); min-height: 56px; }
.list > *:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; display: grid; gap: 2px; }
.list .t { font-size: 15px; font-weight: 400; color: var(--ink); }
.list .s { font-size: 12.5px; color: var(--muted); }
@media (hover: hover) { a.item:hover .t { color: var(--heading); } }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
/* a fold-out card: "Not possible now", "Rules used" */
details.fold { display: block; }
details.fold > :not(summary) { margin-top: 14px; }
details.fold > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; font-size: 17px; font-weight: 400; color: var(--ink); min-height: 28px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold .chev { width: 8px; height: 8px; border: solid var(--muted); border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); margin: 0 4px 4px; flex: none; }
details.fold[open] .chev { transform: rotate(-135deg); margin: 4px 4px 0; }

/* status pills */
.pill { display: inline-flex; align-items: center; font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 20px; white-space: nowrap; }
.pill.best { background: var(--accent); color: #111; }
.pill.alt { background: var(--bg); color: var(--text); }
.pill.new { border: 1px solid #c9c9c9; color: #555; padding: 3px 9px; }
.pill.blocked { background: var(--bad-soft); color: var(--bad); }
.pill.draft { background: var(--accent-soft); color: var(--accent-ink); }
.pill.done { background: var(--ok-soft); color: var(--ok); }

/* buttons */
.btn { appearance: none; font: 500 13px/1.2 var(--font); letter-spacing: .06em; text-transform: uppercase; padding: 13px 20px; min-height: 46px; border-radius: 30px; border: 2px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; text-align: center; }
@media (hover: hover) { .btn:hover { background: var(--ink); color: #fff; } }
.btn.dark { background: var(--ink); color: #fff; }
@media (hover: hover) { .btn.dark:hover { background: #333; border-color: #333; } }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #111; }
@media (hover: hover) { .btn.accent:hover { background: #e6680f; border-color: #e6680f; color: #111; } }
.btn.white { background: #fff; }
@media (hover: hover) { .btn.white:hover { background: var(--ink); color: #fff; } }
.btn.sm { padding: 9px 14px; min-height: 38px; font-size: 12px; }
.btn.block { width: 100%; }
.btn.danger { border-color: var(--accent); color: var(--accent); background: #fff; }
@media (hover: hover) { .btn.danger:hover { background: var(--accent); border-color: var(--accent); color: #111; } }
.btn[disabled] { opacity: .45; cursor: default; pointer-events: none; }
.linkbtn { appearance: none; border: 0; background: none; padding: 0; font: inherit; font-size: 14px; color: var(--bad); text-decoration: underline; cursor: pointer; }
/* Back on the left, the next step on the right */
.actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: space-between; align-items: center; }
.btnrow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* forms */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; border: 0; margin: 0; padding: 0; min-width: 0; align-content: start; }
.field > label, .flabel { font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: #555; padding: 0; }
/* a field whose label is a question: written like the other questions */
.field.ask > label { font-size: 16px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink); }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=search], input[type=number], input[type=date], select, textarea {
  font: 400 16px/1.4 var(--font); letter-spacing: normal; text-transform: none; color: var(--ink); width: 100%; padding: 12px 14px; min-height: 48px; border: 1px solid #d4d4d4; border-radius: 14px; background: #fff;
}
textarea { min-height: 96px; resize: vertical; }
/* iOS Safari: date fields keep their own minimum width and centre the value */
input[type=date] { -webkit-appearance: none; appearance: none; min-width: 0; display: block; }
input[type=date]::-webkit-date-and-time-value { text-align: left; }
.search { display: flex; gap: 8px; }
.search input { flex: 1; min-width: 0; }
.copybox { display: flex; gap: 8px; align-items: center; }
.copybox input { flex: 1; min-width: 0; font-size: 13px; }
/* a question with its answers (chips, a 0–3 scale) */
.q { font-size: 16px; font-weight: 400; color: var(--ink); }
.qsub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.qa { display: grid; gap: 8px; align-content: start; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { font: 400 15px/1.3 var(--font); border: 1.5px solid var(--line); background: #fff; color: var(--ink); border-radius: 99px; padding: 9px 16px; min-height: 42px; cursor: pointer; text-align: left; display: inline-flex; align-items: center; gap: 8px; }
.chip.on { border-color: var(--ink); background: var(--ink); color: #fff; }
/* the app's suggestion: a small orange dot (no orange outline) */
.chip.sug::before, .srow.sug em::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; display: inline-block; }
.dotkey { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin: 0 2px 1px; vertical-align: middle; }
.seg { display: inline-flex; max-width: 100%; border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; flex: none; }
.seg button { font: 400 15px/1 var(--font); border: 0; border-left: 1.5px solid var(--line); background: #fff; min-width: 46px; min-height: 44px; cursor: pointer; color: var(--ink); font-variant-numeric: tabular-nums; }
.seg button:first-child { border-left: 0; }
.seg button.on { background: var(--ink); color: #fff; }
.frow { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.frow:first-child { border-top: 0; }
.frow .t { color: var(--ink); font-weight: 400; }
.frow .was, .ctag { font-size: 12.5px; color: var(--muted); }
.ctag.gap { color: var(--accent-ink); font-weight: 500; }
.todo { font-size: 13px; color: var(--accent-ink); font-weight: 400; }
/* messages inside a page */
.flag { border-radius: 14px; padding: 12px 16px; font-size: 15px; font-weight: 400; display: grid; gap: 2px; }
.flag b { font-weight: 500; color: inherit; }
.flag.warn { background: var(--warn-soft); color: var(--warn); }
.flag.bad { background: var(--bad-soft); color: var(--bad); }
.flag.good { background: var(--ok-soft); color: var(--ok); }
.flag.info { background: var(--accent-soft); color: var(--accent-ink); }
.error { background: var(--bad-soft); color: var(--bad); padding: 12px 16px; border-radius: 14px; font-weight: 400; }

/* the Skin Check's steps: like the menu tabs, sticky under the logo bar */
.steps { position: sticky; top: calc(env(safe-area-inset-top) + 68px); z-index: 5; background: var(--bg); margin: -18px -16px 0; padding: 10px 16px 8px; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; align-items: center; }
.steps::-webkit-scrollbar { display: none; }
.steps button { flex: 1 1 auto; font: 400 13px/1 var(--font); letter-spacing: .04em; text-transform: uppercase; border: 0; background: #fff; color: var(--text); border-radius: 25px; padding: 8px 12px; min-height: 42px; cursor: pointer; white-space: nowrap; }
.steps button .n { font-variant-numeric: tabular-nums; margin-right: 6px; color: var(--muted); }
.steps button.on { background: var(--ink); color: #fff; }
.steps button.on .n { color: rgba(255,255,255,.7); }
.steps .saved { flex: none; font-size: 12px; color: var(--muted); padding: 0 4px 0 8px; white-space: nowrap; }
.steps .saved.bad { color: var(--bad); }
#view { display: grid; gap: 18px; min-width: 0; }
#finish-errors:empty { display: none; }
.todo-note { color: var(--accent-ink); padding: 0 4px; }
.lang { display: inline-flex; background: #fff; border-radius: 99px; padding: 2px; }
.lang button { font: 400 12px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; border: 0; background: transparent; padding: 9px 14px; border-radius: 99px; cursor: pointer; color: var(--text); }
.lang button.on { background: var(--ink); color: #fff; }

/* programmes */
.prog { display: grid; gap: 10px; }
.prog .top-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.prog .name { font-size: 20px; font-weight: 400; color: var(--ink); }
.prog .tag { font-style: italic; color: var(--muted); font-size: 14px; }
.prog h3 { font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.prog ul { margin: 0; padding-left: 18px; font-size: 15px; color: var(--ink); }
.prog .score { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.fold .prog { border-top: 1px solid var(--line); padding-top: 14px; }
.fold .prog .name { font-size: 17px; color: var(--muted); }

/* photos */
.photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.ph { border: 1.5px dashed #d4d4d4; border-radius: 14px; background: #FAFAFA; display: grid; gap: 8px; padding: 10px; text-align: center; position: relative; }
.ph .frame { aspect-ratio: 3/4; border-radius: 10px; overflow: hidden; background: #F1F0EF; position: relative; display: grid; place-items: center; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph .frame svg { width: 60%; opacity: .5; }
.ph .row { justify-content: center; gap: 6px; }
.ph .alt { font-size: 12.5px; color: var(--muted); cursor: pointer; text-decoration: underline; }
.ph input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ph.busy .frame::after { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,.6); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.thumbs figure { margin: 0; display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
.thumbs img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 10px; background: #F1F0EF; display: block; }

/* live camera with the outline over the viewfinder */
.cam { position: fixed; inset: 0; z-index: 60; background: #000; display: grid; grid-template-rows: 1fr auto; }
.cam .view { position: relative; overflow: hidden; display: grid; place-items: center; }
.cam video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.cam .guide { position: absolute; inset: 0; pointer-events: none; display: grid; place-items: center; overflow: hidden; }
.cam .guide svg { height: 86%; max-width: 92%; opacity: .85; }
.cam .guide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: .35; }
.cam .label { position: absolute; top: calc(env(safe-area-inset-top) + 14px); left: 0; right: 0; text-align: center; color: #fff; font-size: 12px; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.cam .bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px calc(env(safe-area-inset-bottom) + 14px); background: #000; }
.cam .shoot { width: 72px; height: 72px; border-radius: 50%; border: 4px solid #fff; background: var(--accent); cursor: pointer; }
.cam .btn { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }

/* acne: the grade list, and the spot count */
.mark { position: relative; border-radius: 14px; overflow: hidden; background: #F1F0EF; touch-action: manipulation; user-select: none; -webkit-user-select: none; width: fit-content; max-width: 100%; margin: 0 auto; }
.mark img { display: block; max-width: 100%; max-height: 58vh; width: auto; height: auto; }
.dot { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 3px solid #E0263A; background: rgba(255,255,255,.15); cursor: pointer; }
.crow { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 12px; background: #fff; }
.crow .pick { display: flex; gap: 12px; align-items: center; min-height: 44px; }
.crow .pick i { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 4px solid #E0263A; }
.crow .pick b { display: block; font-weight: 400; font-size: 16px; }
.crow .pick small { display: block; font-size: 12.5px; color: var(--muted); }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button { font: 300 22px/1 var(--font); width: 46px; height: 46px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; color: var(--ink); }
.stepper b { min-width: 44px; text-align: center; font-size: 26px; font-weight: 300; font-variant-numeric: tabular-nums; }
.scale { display: grid; gap: 6px; }
.srow { font: inherit; text-align: left; display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; padding: 8px 14px; min-height: 48px; cursor: pointer; color: var(--ink); }
.srow b { font-size: 20px; font-weight: 300; }
.srow span { font-size: 15px; font-weight: 400; }
.srow em { font-style: normal; font-size: 12.5px; color: var(--accent-ink); display: inline-flex; align-items: center; gap: 6px; }
.srow.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.srow.on b { color: #fff; }
.srow.on em { color: #FFD2B0; }
.sig { border: 1px solid #d4d4d4; border-radius: 14px; background: #fff; touch-action: none; width: 100%; height: 160px; display: block; }
.sigimg { max-width: 360px; border: 1px solid var(--line); border-radius: 10px; background: #fff; display: block; }
.kv { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 6px 14px; font-size: 15px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; white-space: pre-line; color: var(--ink); }
/* the summary's figures */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.tile { background: var(--card); border-radius: var(--r); padding: 16px 18px; display: grid; gap: 6px; align-content: start; }
.tile .lab { font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.tile .dec { font-size: 20px; font-weight: 400; color: var(--ink); line-height: 1.25; }
.big { font-size: 48px; font-weight: 300; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.bars { display: grid; gap: 8px; }
.bar { display: grid; grid-template-columns: minmax(130px, 230px) 1fr 40px; gap: 12px; align-items: center; font-size: 14px; color: var(--ink); }
.bar .track { height: 6px; background: #E8E8E8; border-radius: 99px; overflow: hidden; position: relative; }
.bar .fill { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.bar span:last-child { font-variant-numeric: tabular-nums; text-align: right; }
pre.mail { white-space: pre-wrap; font: 400 13.5px/1.55 var(--font); background: var(--bg); border-radius: 12px; padding: 12px 14px; margin: 0; color: var(--ink); }
table.rules { width: 100%; border-collapse: collapse; font-size: 14px; color: var(--ink); }
table.rules th, table.rules td { text-align: left; padding: 9px 8px; border-top: 1px solid var(--line); vertical-align: top; font-weight: 400; }
table.rules thead th { border-top: 0; font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
table.cmp td:nth-child(2), table.cmp td:nth-child(3) { font-variant-numeric: tabular-nums; font-size: 16px; text-align: center; }
table.cmp tr.gap td { background: var(--warn-soft); }
table.cmp tr.gap td:first-child { border-radius: 10px 0 0 10px; }
table.cmp tr.gap td:last-child { border-radius: 0 10px 10px 0; }
.scroll { overflow-x: auto; }
.agreement .card p, .agreement .card li { color: var(--ink); }
.agreement .card ul { margin: 0; padding-left: 20px; }

/* messages: they float over the page under the logo bar; a green one fades away after 2 seconds,
   a red one stays until tapped (the Skin Check's own notes, "Photo saved", look the same) */
.flash, .toast { position: fixed; left: 12px; right: 12px; top: calc(env(safe-area-inset-top) + 78px); z-index: 50; max-width: 520px; margin: 0 auto; padding: 12px 16px; border-radius: 14px; font-weight: 400; box-shadow: 0 8px 24px rgba(0, 0, 0, .12); cursor: pointer; animation: flash-in .25s ease-out; }
.flash.ok { background: var(--ok-soft); color: var(--ok); animation: flash-in .25s ease-out, flash-out .4s ease-in 2s forwards; }
.flash.error, .toast.error { background: var(--bad-soft); color: var(--bad); }
.toast.ok { background: var(--ok-soft); color: var(--ok); }
.toast { top: calc(env(safe-area-inset-top) + 130px); }
@media (min-width: 720px) { .flash { top: calc(env(safe-area-inset-top) + 134px); } }
@keyframes flash-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes flash-out { to { opacity: 0; visibility: hidden; transform: translateY(-8px); } }

/* login and other small pages */
.auth { max-width: 440px; margin: 6vh auto 0; width: 100%; }

@media (max-width: 560px) { .kv { grid-template-columns: 1fr; gap: 0 14px; } .kv dd { margin-bottom: 8px; } .bar { grid-template-columns: 110px 1fr 34px; } .frow { grid-template-columns: 1fr; gap: 8px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* pressing: no grey tap flash, just the orange line while the finger is down */
a.card:active { border-color: var(--accent); }
a.item:active .t { color: var(--heading); }
.btn:active, .chip:active, .seg button:active, .srow:active, .steps button:active { border-color: var(--accent); }
.btn.accent:active { border-color: var(--accent-ink); }
