/* Le Chantier: calm, warm, light. Paper background, deep green like a seed sprouting, clay for warnings. */

:root {
  --bg: #f6f1e6;
  --paper: #fffdf7;
  --ink: #26251f;
  --muted: #625d52;
  --line: #e2d9c6;
  --green: #2e6b3a;
  --green-ink: #ffffff;
  --green-dark: #1d4826;
  --green-soft: #e2eedc;
  --amber: #8a5a0b;
  --amber-bg: #fbecc9;
  --amber-line: #d9a640;
  --clay: #a3461f;
  --clay-bg: #f8e2d6;
  --grey: #6f6a60;
  --shadow: 0 1px 2px rgba(60, 45, 20, 0.06), 0 2px 8px rgba(60, 45, 20, 0.05);
  --radius: 14px;
  --tabbar: 64px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --team-pg: #7a3f6b;
  --team-pg-bg: #f3e3ef;
  --team-pgen: #24557a;
  --team-pgen-bg: #e0ecf6;
  --team-atl: #6b4f12;
  --team-atl-bg: #f1e8cf;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1c17;
    --paper: #23261f;
    --ink: #ece7da;
    --muted: #b1aa9a;
    --line: #3a3d33;
    --green: #8cc78f;
    --green-ink: #10230f;
    --green-dark: #b7e0b5;
    --green-soft: #26372a;
    --amber: #f0c46a;
    --amber-bg: #3a2f17;
    --amber-line: #a5822f;
    --clay: #f0a07c;
    --clay-bg: #3d261c;
    --grey: #a39d90;
    --shadow: none;
    --team-pg: #e9b4dc;
    --team-pg-bg: #3b2636;
    --team-pgen: #a8cdf0;
    --team-pgen-bg: #1f3040;
    --team-atl: #e6cf8f;
    --team-atl-bg: #3a3220;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1.0625rem/1.45 var(--font); /* 17px; scales with "Larger text" */
  padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 16px);
}
body.no-chrome { padding-bottom: 24px; }
body.no-chrome #tabs { display: none; }

#view {
  max-width: 760px;
  margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top)) 16px 24px;
}

h1 { font-size: 1.6rem; line-height: 1.2; margin: 0.2em 0 0.4em; letter-spacing: -0.01em; }
h2 { font-size: 1.15rem; margin: 0 0 0.6em; }
h3 { font-size: 1.02rem; margin: 0 0 0.5em; }
p { margin: 0 0 0.7em; }
a { color: var(--green); }
a:hover { color: var(--green-dark); }
:focus-visible { outline: 3px solid var(--focus, var(--amber-line)); outline-offset: 2px; border-radius: 6px; }
[tabindex="-1"]:focus:not(:focus-visible) { outline: none; }
.cam :focus-visible, .viewer :focus-visible { outline-color: #f0c46a; }

.sr {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
.center { text-align: center; }
.pre { white-space: pre-wrap; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row { display: flex; align-items: center; }
.wrap { flex-wrap: wrap; }
.gap { gap: 8px; }
.grow { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
[hidden] { display: none !important; }

/* icons */
.ic { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic-s { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.ic-xs { width: 12px; height: 12px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ic-xl { width: 64px; height: 64px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 16px;
  border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--paper); color: var(--ink);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { border-color: var(--green); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.btn.primary { background: var(--green); border-color: var(--green); color: var(--green-ink); }
.btn.primary:hover { background: var(--green-dark); border-color: var(--green-dark); color: var(--green-ink); }
@media (prefers-color-scheme: dark) { .btn.primary:hover { background: var(--green-dark); } }
.btn.big { min-height: 54px; font-size: 1.08rem; width: 100%; }
.btn.small { min-height: 44px; padding: 6px 12px; font-size: 0.92rem; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--green); }
.btn.danger { color: var(--clay); border-color: var(--clay-bg); }
.btn.danger:hover { border-color: var(--clay); color: var(--clay); }
.btn.warn { color: var(--clay); }
.btn.on-dark { background: rgba(255, 255, 255, 0.14); border-color: transparent; color: #fff; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 12px; border: 0;
  background: transparent; color: var(--ink); cursor: pointer;
}
.icon-btn:hover { background: var(--green-soft); }
.icon-btn:disabled { opacity: 0.4; }
.icon-btn.on-dark { color: #fff; }
.icon-btn.on-dark:hover { background: rgba(255, 255, 255, 0.15); }
.icon-btn.on { background: var(--clay); color: #fff; animation: pulse 1.4s infinite; }
.link { background: none; border: 0; padding: 4px 6px; min-height: 44px; font: inherit; color: var(--green); text-decoration: underline; cursor: pointer; }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; text-decoration: none; font-weight: 600; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  min-height: 44px; padding: 6px 14px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--paper); color: var(--ink);
  font: inherit; font-size: 0.95rem; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.chip[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: var(--green-ink); }
.link-chip { white-space: normal; text-align: left; border-style: dashed; border-color: var(--green); }

/* sections, cards */
.section { margin: 26px 0 8px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.page-head h1 { margin: 0.2em 0; }
.empty { color: var(--muted); padding: 14px; border: 1.5px dashed var(--line); border-radius: var(--radius); text-align: center; }
.note { background: var(--green-soft); border-radius: 12px; padding: 12px 14px; }
.alert { background: var(--clay-bg); color: var(--clay); border-radius: 12px; padding: 12px 14px; font-weight: 600; }
.form-error { color: var(--clay); font-weight: 600; margin: 0; }
.form-error:empty { display: none; }
.hint-box { background: var(--paper); border: 1.5px dashed var(--green); border-radius: var(--radius); padding: 14px 16px; }
.hint-box p:last-child { margin: 0; }

.hero { padding: 6px 0 4px; }
.eyebrow { display: flex; align-items: center; gap: 6px; color: var(--green); font-weight: 700; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.06em; margin: 0; }
.progress { height: 14px; border-radius: 999px; background: var(--green-soft); overflow: hidden; margin: 6px 0 6px; }
.progress span { display: block; height: 100%; background: var(--green); border-radius: 999px; min-width: 4px; transition: width 0.4s; }

.banner {
  display: flex; align-items: center; gap: 6px; margin: 14px 0;
  padding: 14px 16px; border-radius: var(--radius);
  background: var(--amber-bg); color: var(--ink); text-decoration: none; border: 1.5px solid var(--amber-line);
}
.banner svg { margin-left: auto; }

.cards { display: grid; gap: 10px; margin-bottom: 12px; }
@media (min-width: 700px) { .cards { grid-template-columns: 1fr 1fr; } }
.card {
  display: block; padding: 14px 14px 12px; border-radius: var(--radius);
  background: var(--paper); color: var(--ink); text-decoration: none;
  border: 1.5px solid var(--line); border-left-width: 6px; box-shadow: var(--shadow);
}
a.card:hover { border-color: var(--green); color: var(--ink); }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.card-title { font-weight: 700; font-size: 1.02rem; color: var(--ink); text-decoration: none; display: block; }
.card .who { margin: 8px 0 0; }
.card.review .row { margin-top: 10px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 6px; color: var(--muted); font-size: 0.88rem; align-items: center; }
.meta > span, .meta > a { display: inline-flex; align-items: center; gap: 4px; }
.meta .warn { color: var(--clay); font-weight: 600; }
.meta .kid { color: var(--green); font-weight: 600; }
.meta .count { color: var(--green); }
.urgent { color: var(--clay); font-weight: 700; font-size: 0.88rem; }
.who { display: flex; align-items: center; gap: 6px; font-size: 0.92rem; margin: 6px 0; }

/* status colours: suggested grey dashed, todo green outline, taken amber, done green filled, checked darker green */
.pill { flex: none; display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; border: 1.5px solid transparent; white-space: nowrap; }
.pill.st-suggested { border: 1.5px dashed var(--grey); color: var(--grey); }
.pill.st-todo { border-color: var(--green); color: var(--green); background: transparent; }
.pill.st-taken { background: var(--amber-bg); border-color: var(--amber-line); color: var(--amber); }
.pill.st-done { background: var(--green); border-color: var(--green); color: var(--green-ink); }
.pill.st-checked { background: var(--green-dark); border-color: var(--green-dark); color: var(--bg); }
.card.st-suggested { border-style: dashed; border-left-style: dashed; border-left-color: var(--grey); }
.card.st-todo { border-left-color: var(--green); }
.card.st-taken { border-left-color: var(--amber-line); }
.card.st-done { border-left-color: var(--green); background: var(--green-soft); }
.card.st-checked { border-left-color: var(--green-dark); background: var(--green-soft); }

.team { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 0.78rem; font-weight: 700; }
.team-petite-graine { background: var(--team-pg-bg); color: var(--team-pg); }
.team-petitgen { background: var(--team-pgen-bg); color: var(--team-pgen); }
.team-atelier { background: var(--team-atl-bg); color: var(--team-atl); }

.badge { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 0.78rem; font-weight: 700; }
.badge.suggested { border: 1.5px dashed var(--grey); color: var(--grey); }
.badge.broken { background: var(--clay-bg); color: var(--clay); }
.badge.needed { background: var(--amber-bg); color: var(--amber); }

/* task page */
.task-head { margin: 6px 0 12px; }
.task-head h1 { margin-top: 10px; }
.actions { margin: 14px 0 18px; }
.owner-actions { margin-top: 8px; padding-top: 10px; border-top: 1.5px dashed var(--line); }
.owner-actions p { margin: 0 0 6px; }
.safety {
  background: var(--clay-bg); color: var(--ink); border-left: 6px solid var(--clay);
  border-radius: var(--radius); padding: 12px 14px; margin: 16px 0;
}
.safety h2 { display: flex; align-items: center; gap: 8px; color: var(--clay); margin: 0 0 6px; }
.safety p { margin: 0; }
.facts { margin: 18px 0; display: grid; gap: 0; }
.kv { display: grid; grid-template-columns: 8.5em 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* forms */
.form { max-width: 560px; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0; border: 0; padding: 0; min-width: 0; }
.field > label, .field > legend { font-weight: 600; }
.field legend { margin-bottom: 6px; }
.hint { color: var(--muted); font-size: 0.86rem; margin: 0; }
input[type="text"], input[type="search"], input[type="url"], input[type="password"], input[type="number"], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 12px;
  border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--paper); color: var(--ink); font: inherit; font-size: max(16px, 1.0625rem); /* ≥ 16px: no zoom on iPhone */
}
textarea { resize: vertical; line-height: 1.4; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus, var(--amber-line)); outline-offset: 1px; }
.field.check label { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; cursor: pointer; }
input[type="checkbox"], input[type="radio"] { width: 22px; height: 22px; accent-color: var(--green); flex: none; margin: 0; }
.radio { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; margin-bottom: 8px; cursor: pointer; background: var(--paper); }
.radio span { display: flex; flex-direction: column; }
.radio:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.inline-form { display: flex; align-items: flex-end; gap: 8px; margin: 12px 0; }
.inline-form .field { flex: 1; }
.owner-box { margin: 18px 0; padding: 4px 14px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.owner-box summary { min-height: 44px; display: flex; align-items: center; font-weight: 600; cursor: pointer; }
.owner-box[open] { padding-bottom: 14px; }
.filters { display: grid; gap: 10px; margin-bottom: 8px; }
@media (min-width: 620px) { .filters { grid-template-columns: 1fr auto; align-items: end; } .filters .chips { margin: 0; } }

/* activity, thanks */
.activity { list-style: none; padding: 0; margin: 0; }
.act { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.act > span:last-child { flex: none; }
.thanks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.thanks li { display: flex; flex-direction: column; padding: 8px 14px; border-radius: 14px; background: var(--green-soft); }
.how { padding-left: 1.2em; }
.how li { margin-bottom: 8px; }

/* photos */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-bottom: 12px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 740px) { .grid { grid-template-columns: repeat(5, 1fr); } }
.thumb { position: relative; padding: 0; border: 0; aspect-ratio: 1; background: var(--line); border-radius: 8px; overflow: hidden; cursor: pointer; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tag-idea, .badge-count {
  position: absolute; top: 5px; padding: 1px 7px; border-radius: 6px; font-size: 0.72rem; font-weight: 700;
  display: inline-flex; align-items: center; gap: 3px;
}
.tag-idea { left: 5px; background: var(--team-pg-bg); color: var(--team-pg); }
.badge-count { right: 5px; background: rgba(20, 20, 15, 0.72); color: #fff; }
.day h2 { margin-top: 18px; }
.tl-box { display: grid; gap: 10px; padding: 12px; margin: 8px 0 14px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.single-photo { padding: 0; border: 0; background: none; display: block; width: 100%; cursor: pointer; }
.single-photo img { width: 100%; border-radius: var(--radius); display: block; }
.tag { padding: 1px 8px; border-radius: 6px; background: var(--green-soft); color: var(--green); font-weight: 700; font-size: 0.8rem; }
.tag.kind-vision { background: var(--team-pg-bg); color: var(--team-pg); }

/* before / after */
.cmp-wrap { display: grid; gap: 6px; }
.cmp { position: relative; width: 100%; border-radius: var(--radius); overflow: hidden; background: #000; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: ew-resize; }
.cmp-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.cmp-handle { position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 6px rgba(0, 0, 0, 0.4); pointer-events: none; }
.cmp-handle span {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%;
  background: #fff; color: #222; box-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}
.cmp-label { position: absolute; bottom: 8px; padding: 3px 9px; border-radius: 8px; background: rgba(20, 20, 15, 0.7); color: #fff; font-size: 0.8rem; font-weight: 600; pointer-events: none; }
.cmp-label.left { left: 8px; }
.cmp-label.right { right: 8px; }
.cmp-range { width: 100%; accent-color: var(--green); }

/* upload sheet */
.pick-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pick-row .btn { padding: 10px 8px; }
.up-list:empty { display: none; }
.up-list { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.up-row { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 12px; border: 1.5px solid var(--line); }
.up-row.ok { border-color: var(--green); background: var(--green-soft); }
.up-row.failed { border-color: var(--clay); background: var(--clay-bg); }
.up-prev { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: var(--line); flex: none; }
.up-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; font-size: 0.9rem; }
.up-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-row.failed .up-stage { color: var(--clay); font-weight: 600; }
.up-text progress { width: 100%; height: 6px; accent-color: var(--green); }

/* sheets */
dialog { color: var(--ink); }
dialog::backdrop { background: rgba(25, 22, 15, 0.45); }
.sheet {
  border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 620px; max-height: 92vh;
  border-radius: 20px 20px 0 0; background: var(--bg); box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.2);
  overflow: hidden; display: flex; flex-direction: column;
}
.sheet:not([open]) { display: none; }
@media (min-width: 700px) { .sheet { margin: auto; border-radius: 20px; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 10px 4px 18px; }
.sheet-head h2 { margin: 0; font-size: 1.15rem; }
.sheet-body { padding: 6px 18px calc(18px + env(safe-area-inset-bottom)); overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.sheet.tall { height: 92vh; }
.list-btn { display: flex; justify-content: space-between; gap: 10px; align-items: center; width: 100%; min-height: 52px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.list-btn.current { border-color: var(--green); }

/* viewer, timelapse */
.viewer {
  border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; max-width: none; max-height: none;
  height: 100dvh; background: #0f0f0d; color: #f1eee6; overflow-y: auto;
}
.viewer:not([open]) { display: none; }
.viewer::backdrop { background: #000; }
.viewer-top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: calc(6px + env(safe-area-inset-top)) 8px 6px 16px; background: rgba(15, 15, 13, 0.85); }
.viewer-count { font-weight: 600; }
.viewer-main { position: relative; display: flex; align-items: center; justify-content: center; min-height: 40vh; }
.viewer-stage { width: 100%; display: flex; justify-content: center; touch-action: pan-y; }
.viewer-img { max-width: 100%; max-height: 72vh; max-height: 72dvh; object-fit: contain; display: block; }
.viewer-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 1;
  width: 48px; height: 64px; border: 0; border-radius: 12px; background: rgba(0, 0, 0, 0.4); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.viewer-nav:disabled { opacity: 0.2; }
.viewer-nav.prev { left: 6px; }
.viewer-nav.next { right: 6px; }
.viewer-info {
  max-width: 760px; margin: 0 auto; padding: 14px 16px calc(30px + env(safe-area-inset-bottom));
  --paper: #1d1e1a; --ink: #f1eee6; --muted: #b8b2a4; --line: #3a3b34; --bg: #0f0f0d; --green: #8cc78f; --green-ink: #10230f; --green-soft: #22301f; --green-dark: #b7e0b5; --clay: #f0a07c; --clay-bg: #3d261c;
  color: var(--ink);
}
.viewer-info a { color: var(--green); }
.photo-info .caption { font-size: 1.1rem; font-weight: 600; }
.photo-info .meta { color: var(--muted); }
.viewer .owner-box { background: var(--paper); }
.tl-stage { position: relative; display: flex; justify-content: center; align-items: center; height: calc(100dvh - 150px); height: calc(100vh - 150px); }
.tl-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.tl-date { position: absolute; left: 12px; bottom: 12px; padding: 6px 12px; border-radius: 10px; background: rgba(0, 0, 0, 0.6); color: #fff; font-weight: 700; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.tl-controls { display: flex; gap: 12px; align-items: center; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); max-width: 760px; margin: 0 auto; }
.tl-controls input { flex: 1; accent-color: #8cc78f; height: 40px; }

/* comments */
.comments { margin: 24px 0 8px; padding: 14px; border-radius: var(--radius); background: var(--paper); border: 1.5px solid var(--line); }
.comments.on-photo { border-color: var(--green); }
.comment { padding: 8px 0; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: 0; }
.comment-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.comment-head .link { margin-left: auto; }
.comment-text { margin: 4px 0 0; white-space: pre-wrap; }
.comment-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; }
.comment-form textarea { min-height: 48px; }

/* tools */
.tabs-seg { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 10px 0; padding: 0 16px 4px 0; scrollbar-width: none; }
.tabs-seg::-webkit-scrollbar { display: none; }
.search { position: relative; margin-bottom: 12px; }
.search .ic-s { position: absolute; left: 14px; top: 16px; color: var(--muted); }
.search input { padding-left: 40px; }
.items { display: grid; gap: 8px; }
.item-row {
  display: block; width: 100%; text-align: left; padding: 12px 14px; border-radius: var(--radius);
  border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; cursor: pointer;
}
.item-row:hover { border-color: var(--green); }
.item-row.is-suggested { border-style: dashed; }
.item-top { display: flex; justify-content: space-between; gap: 10px; }
.item-name { font-weight: 700; }
.item-qty { color: var(--muted); flex: none; }
.item-row .small { margin: 6px 0 0; }
.holder { color: var(--amber); font-weight: 600; }

/* ask */
.chat-list { display: flex; flex-direction: column; gap: 10px; margin: 10px 0 14px; }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 16px; overflow-wrap: anywhere; }
.msg p:last-child { margin-bottom: 0; }
.msg.user { align-self: flex-end; background: var(--green); color: var(--green-ink); border-bottom-right-radius: 4px; }
.msg.user .link { color: inherit; }
.msg.user.failed { background: var(--clay-bg); color: var(--ink); }
.msg.ai { align-self: flex-start; background: var(--paper); border: 1.5px solid var(--line); border-bottom-left-radius: 4px; }
.msg.ai ul, .msg.ai ol { margin: 0 0 0.7em; padding-left: 1.3em; }
.msg.ai li { margin-bottom: 3px; }
.msg.ai .hd { margin-bottom: 0.3em; }
.msg .chips { margin: 10px 0 0; }
.msg-photos { display: flex; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.msg-photo { padding: 0; border: 0; border-radius: 8px; overflow: hidden; width: 72px; height: 72px; cursor: pointer; background: rgba(0, 0, 0, 0.1); }
.msg-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thinking { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: 0.2s; }
.dots i:nth-child(3) { animation-delay: 0.4s; }
.composer {
  position: sticky; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 6px);
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 18px;
  padding: 8px; box-shadow: 0 -2px 16px rgba(60, 45, 20, 0.08);
}
.composer textarea { border: 0; min-height: 44px; max-height: 180px; resize: none; background: transparent; box-shadow: none; padding: 8px 6px; }
.composer textarea:focus { box-shadow: none; }
.composer-row { display: flex; align-items: center; gap: 2px; }
.composer .send { min-height: 44px; }
.chat-photos { display: flex; gap: 8px; padding: 4px 4px 8px; overflow-x: auto; }
.pend { position: relative; width: 64px; height: 64px; flex: none; border-radius: 10px; overflow: hidden; background: var(--line); }
.pend img { width: 100%; height: 100%; object-fit: cover; }
.pend.failed { outline: 2px solid var(--clay); }
.pend-state { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.35); color: #fff; }
.pend-x { position: absolute; top: 0; right: 0; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, 0.65); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.spinner { width: 22px; height: 22px; border: 3px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite; }

/* gates */
.gate { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; max-width: 440px; margin: 0 auto; text-align: center; gap: 6px; }
.gate .stack, .gate .owner-box { text-align: left; }
.gate-mark { color: var(--green); display: flex; justify-content: center; }
.gate-mark.pulse { animation: pulse 1.6s infinite; }
.lead { font-size: 1.15rem; }

/* tab bar */
#tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; justify-content: center;
  background: var(--paper); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  position: relative; flex: 1; max-width: 120px; height: var(--tabbar);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); text-decoration: none; font-size: 0.74rem; font-weight: 600;
  -webkit-tap-highlight-color: transparent;
}
.tab[aria-current="page"] { color: var(--green); }
.tab[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 22%; right: 22%; height: 3px; border-radius: 0 0 3px 3px; background: var(--green); }
.tab-badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--clay); color: #fff; font-size: 0.7rem; line-height: 18px; text-align: center; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 14px); z-index: 1000;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: min(92vw, 520px); padding: 12px 18px; border-radius: 14px;
  background: var(--ink); color: var(--bg); font-weight: 600; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--clay); color: #fff; }
body.no-chrome .toast { bottom: 20px; }

/* poster (screen preview) */
.poster-preview { margin-top: 20px; }
.poster {
  background: #fffdf7; color: #1d1c18; border: 1px solid var(--line); border-radius: 8px;
  padding: 28px 24px; aspect-ratio: 210 / 297; display: flex; flex-direction: column; gap: 14px;
}
.poster-brand { display: flex; align-items: center; gap: 8px; color: #2e6b3a; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; margin: 0; }
.poster h1 { font-size: clamp(1.6rem, 6vw, 2.6rem); margin: 0; color: #1d4826; }
.poster-sub { font-size: 1.1rem; margin: 0; }
.poster-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; flex: 1; align-items: start; }
.poster-step { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.poster-step h2 { display: flex; align-items: center; gap: 8px; font-size: 1.2rem; margin: 0; }
.poster-step p { margin: 0; overflow-wrap: anywhere; }
.step-n { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: #2e6b3a; color: #fff; font-weight: 800; }
.qr-svg { width: 100%; max-width: 260px; height: auto; background: #fff; }
.poster-rules { border-top: 3px solid #2e6b3a; padding-top: 12px; font-size: 1.15rem; }
.poster-rules p { margin: 0 0 6px; }

/* today: bell, camera button */
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bell { position: relative; margin-right: -8px; }
.bell-dot { display: none; position: absolute; top: 10px; right: 11px; width: 10px; height: 10px; border-radius: 50%; background: var(--clay); box-shadow: 0 0 0 2px var(--bg); }
.bell.has-new .bell-dot { display: block; }
.cam-cta { margin: 14px 0 4px; }
.notes { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.note-row > a, .note-row > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); text-decoration: none; }
.note-row > a:hover { border-color: var(--green); }
.note-row.new > a, .note-row.new > div { border-color: var(--green); background: var(--green-soft); }
.note-body { overflow-wrap: anywhere; }
.push-card h2 { display: flex; align-items: center; gap: 6px; }
.push-card .note { display: flex; align-items: center; gap: 6px; margin: 0; }
.push-card .alert { margin: 0; }

/* imagine it finished */
.btn.imagine { width: 100%; margin: 4px 0 8px; border-color: var(--green); }
.sim-src { display: flex; align-items: center; gap: 12px; }
.sim-src img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; background: var(--line); flex: none; }
.sim-src p { margin: 0; }
.sim-wait { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 12px; background: var(--green-soft); font-weight: 600; }
.spinner.dark { border-color: var(--line); border-top-color: var(--green); flex: none; }

/* camera: full screen, edge to edge, controls inside the safe areas */
body[data-route="camera"] { padding: 0; overflow: hidden; background: #000; overscroll-behavior: none; }
body[data-route="camera"] #view { max-width: none; padding: 0; }
body[data-route="camera"] .toast { bottom: auto; top: calc(env(safe-area-inset-top) + 110px); transform: translate(-50%, -10px); }
body[data-route="camera"] .toast.show { transform: translate(-50%, 0); }
.cam {
  position: fixed; inset: 0; z-index: 5; background: #000; color: #fff; overflow: hidden;
  height: 100vh; height: 100dvh; touch-action: manipulation; -webkit-user-select: none; user-select: none;
}
.cam-stage { position: absolute; inset: 0; }
.cam-video, .cam-ghost { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.cam-video { background: #000; }
.cam-ghost { opacity: 0.35; pointer-events: none; }
.cam-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.cam-flash.go { animation: camflash 0.35s ease-out; }
@keyframes camflash { from { opacity: 0.85; } to { opacity: 0; } }
.cam-top {
  position: absolute; left: 0; right: 0; top: 0; z-index: 2; display: grid; gap: 6px;
  padding: calc(8px + env(safe-area-inset-top)) calc(10px + env(safe-area-inset-right)) 14px calc(10px + env(safe-area-inset-left));
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0));
}
.cam-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cam-row.chips { flex-wrap: wrap; }
.cam-row.chips:empty { display: none; }
.cam select, .cam input[type="text"] {
  min-height: 44px; padding: 6px 10px; border-radius: 12px; font-size: 16px;
  border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(0, 0, 0, 0.45); color: #fff;
}
.cam select:focus, .cam input:focus { border-color: #8cc78f; box-shadow: none; }
.cam select { flex: 1.3; min-width: 0; width: auto; }
.cam select option { color: #000; }
.cam-spot { flex: 1; min-width: 0; width: auto !important; }
.cam input::placeholder { color: rgba(255, 255, 255, 0.65); }
.cam-round {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0, 0, 0, 0.45); color: #fff; -webkit-tap-highlight-color: transparent;
}
.cam-round.small { width: 44px; height: 44px; }
.cam-round.on { background: var(--clay); animation: pulse 1.4s infinite; }
.cam-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; max-width: 100%; padding: 4px 12px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.3); background: rgba(0, 0, 0, 0.45);
  color: #fff; font: inherit; font-size: 0.86rem; font-weight: 600; text-decoration: none; cursor: pointer;
}
.cam-chip[aria-pressed="true"] { border-color: #8cc78f; }
.cam-chip-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cam-msg {
  position: absolute; z-index: 3; left: 50%; top: 42%; transform: translate(-50%, -50%);
  width: min(88vw, 420px); padding: 16px; border-radius: 16px; background: rgba(20, 20, 16, 0.88); text-align: center;
  display: grid; gap: 10px; justify-items: center;
}
.cam-msg p { margin: 0; }
.cam-answer {
  position: absolute; z-index: 4; left: calc(10px + env(safe-area-inset-left)); right: calc(10px + env(safe-area-inset-right));
  top: calc(env(safe-area-inset-top) + 104px); max-height: 46vh; max-height: 46dvh; overflow-y: auto;
  border-radius: 16px; background: rgba(15, 15, 13, 0.78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  padding: 4px 6px 12px 14px; -webkit-user-select: text; user-select: text;
}
.cam-answer-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cam-answer-body p:last-child { margin-bottom: 0; }
.cam-answer-body ul, .cam-answer-body ol { margin: 0 0 0.6em; padding-left: 1.2em; }
.cam-answer a, .cam-caption a { color: #b7e0b5; }
.cam-error { color: #f0a07c; font-weight: 600; }
.cam-saved {
  position: absolute; z-index: 4; left: 50%; top: 45%; transform: translate(-50%, -50%) scale(0.9);
  display: flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px;
  background: rgba(46, 107, 58, 0.92); font-weight: 700; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s;
}
.cam-saved.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.cam-bottom {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: grid; gap: 8px;
  padding: 18px calc(10px + env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) calc(10px + env(safe-area-inset-left));
  background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.7) 30%);
}
.cam-caption {
  max-height: 8.5em; overflow-y: auto; padding: 8px 12px; border-radius: 12px; background: rgba(0, 0, 0, 0.55);
  font-size: 0.95rem; line-height: 1.35;
}
.cam-caption p { margin: 0 0 4px; }
.cam-caption p:last-child { margin: 0; }
.cam-caption p.old { opacity: 0.6; }
.cam-caption .cam-cap-note { font-style: italic; color: #e6cf8f; }
.cam-strip { display: flex; gap: 6px; overflow-x: auto; align-items: center; scrollbar-width: none; }
.cam-strip::-webkit-scrollbar { display: none; }
.cam-thumb { position: relative; flex: none; width: 52px; height: 52px; padding: 0; border: 2px solid rgba(255, 255, 255, 0.7); border-radius: 10px; overflow: hidden; background: #222; cursor: pointer; }
.cam-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-thumb.ok { border-color: #8cc78f; }
.cam-thumb.failed { border-color: #f0a07c; }
.cam-imagine { flex: none; min-height: 44px; padding: 6px 14px; border-radius: 999px; border: 1px solid #8cc78f; background: rgba(0, 0, 0, 0.5); color: #fff; font: inherit; font-size: 0.9rem; font-weight: 700; cursor: pointer; }
.cam-ai-box { display: grid; gap: 6px; }
.cam-qrow { display: flex; gap: 6px; align-items: center; }
.cam-q { flex: 1; min-width: 0; width: auto !important; }
.cam-ai-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.cam-ai-row::-webkit-scrollbar { display: none; }
.cam-ai {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 12px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.35); background: rgba(0, 0, 0, 0.5);
  color: #fff; font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.cam-ai:disabled { opacity: 0.5; }
.cam-ai.on { background: var(--clay); border-color: var(--clay); }
.cam-ai.on .ic-s { animation: pulse 1.4s infinite; }
.cam-note { margin: 0; font-size: 0.78rem; color: rgba(255, 255, 255, 0.75); text-align: center; }
.cam-controls { display: flex; align-items: center; justify-content: space-around; padding-top: 2px; }
.cam-shutter {
  width: 74px; height: 74px; border-radius: 50%; border: 4px solid #fff; padding: 4px; background: transparent; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cam-shutter span { display: block; width: 100%; height: 100%; border-radius: 50%; background: #fff; transition: transform 0.1s; }
.cam-shutter:active span { transform: scale(0.88); }
.cam [hidden] { display: none !important; }
@media (orientation: landscape) and (max-height: 500px) {
  .cam-ai-box .cam-qrow, .cam-note { display: none; }
  .cam-shutter { width: 60px; height: 60px; }
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* print: only the poster, on A4 */
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; padding: 0; color: #000; }
  #tabs, .toast, .no-print, dialog { display: none !important; }
  #view { max-width: none; padding: 0; }
  .poster-preview { margin: 0; }
  .poster { border: 0; border-radius: 0; padding: 0; aspect-ratio: auto; height: 270mm; gap: 8mm; }
  .poster h1 { font-size: 34pt; }
  .poster-sub { font-size: 15pt; }
  .poster-step h2 { font-size: 18pt; }
  .poster-step p { font-size: 13pt; }
  .qr-svg { max-width: 75mm; }
  .poster-rules { font-size: 15pt; }
  .step-n { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- easy to read: larger text, high contrast ---------- */
html.text-l { font-size: 112.5%; }
html.text-xl { font-size: 125%; }
html.text-xl .tab { font-size: 0.7rem; }
html.text-xl .tab span { overflow: hidden; text-overflow: ellipsis; max-width: 100%; white-space: nowrap; }

/* High contrast: black on white (white on black in dark mode), stronger lines, no greys under 7:1.
   Also switched on when the phone asks for more contrast (prefers-contrast: more), see applyEasy(). */
html.hc {
  --bg: #ffffff; --paper: #ffffff; --ink: #000000; --muted: #2b2b2b; --line: #4d4d4d;
  --green: #0f4419; --green-ink: #ffffff; --green-dark: #082c0f; --green-soft: #e3f0e0;
  --amber: #4d3000; --amber-bg: #fff3d6; --amber-line: #6b4400;
  --clay: #7a1f00; --clay-bg: #fde6dc; --grey: #2b2b2b; --shadow: none; --focus: #000000;
  --team-pg: #4f1745; --team-pgen: #0d3456; --team-atl: #3d2c00;
  --warm: #ffffff; --warm-line: #000000;
}
@media (prefers-color-scheme: dark) {
  html.hc {
    --bg: #000000; --paper: #000000; --ink: #ffffff; --muted: #e6e6e6; --line: #bdbdbd;
    --green: #a6f0a9; --green-ink: #000000; --green-dark: #d4ffd5; --green-soft: #0f2a12;
    --amber: #ffd98a; --amber-bg: #2a1f00; --amber-line: #ffd98a;
    --clay: #ffb59a; --clay-bg: #2e1206; --grey: #e6e6e6; --focus: #ffffff;
    --team-pg: #ffd1f3; --team-pgen: #cfe6ff; --team-atl: #ffe9a8;
    --warm: #000000; --warm-line: #ffffff;
  }
}
html.hc .btn, html.hc .chip, html.hc .card, html.hc .item-row, html.hc .list-btn, html.hc .radio,
html.hc input[type="text"], html.hc input[type="search"], html.hc input[type="url"], html.hc input[type="password"],
html.hc select, html.hc textarea, html.hc .comments, html.hc .owner-box, html.hc .helper { border-width: 2px; }
html.hc .helper { border-color: var(--line); }
html.hc .btn.ghost { border-color: transparent; text-decoration: underline; }
html.hc .btn.primary { border-color: var(--green); }
html.hc .card { border-left-width: 6px; }
html.hc ::placeholder { color: var(--muted); opacity: 1; }
html.hc .tab { color: var(--ink); }
html.hc a { text-decoration-thickness: 2px; }
html.hc :focus-visible { outline-width: 4px; }

/* read aloud */
.speak { flex: none; font-size: 1.25rem; }
.speak.on { background: var(--green-soft); animation: pulse 1.4s infinite; }
.speak.on-dark.on { background: rgba(255, 255, 255, 0.2); }
.title-row { display: flex; align-items: flex-start; gap: 8px; }
.title-row h1 { flex: 1; }
.msg-speak { margin: 4px 0 -6px -10px; }
.note-row { display: flex; align-items: stretch; gap: 6px; }
.note-row > a, .note-row > div { flex: 1; min-width: 0; }

/* Me: text size choice */
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg-opt { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper); cursor: pointer; }
.seg-opt:has(input:checked) { border-color: var(--green); background: var(--green-soft); font-weight: 700; }
.seg-large { font-size: 1.1em; }
.seg-xl { font-size: 1.22em; }

/* Today: filters behind one button */
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.chip.on { background: var(--green); border-color: var(--green); color: var(--green-ink); }
.filter-panel { padding: 10px 12px 2px; margin: 0 0 12px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.filter-panel .chips.scroll { margin-right: 0; padding-right: 0; }
.section h3 { margin-top: 4px; }

/* install card */
.install-card { padding: 12px 14px; border: 1.5px solid var(--green); border-radius: var(--radius); background: var(--paper); }
.install-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.install-head h2 { margin: 6px 0 8px; }
.install-head .icon-btn { margin: -6px -8px 0 0; }
.install-card p:last-child { margin-bottom: 0; }
.install-steps { list-style: none; counter-reset: st; padding: 0; margin: 0 0 8px; display: grid; gap: 8px; }
.install-steps li { counter-increment: st; display: flex; align-items: center; gap: 10px; }
.install-steps li::before { content: counter(st); flex: none; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--green); color: var(--green-ink); font-weight: 800; font-size: 0.85rem; }
.step-ic { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 9px; border: 1.5px solid var(--line); color: #0a6cff; }
html.hc .step-ic { color: var(--ink); }

/* ---------- helpers wall ---------- */
:root { --warm: #fbf1dc; --warm-line: #e9d3a4; }
@media (prefers-color-scheme: dark) { :root { --warm: #2b2519; --warm-line: #4d4128; } }
.helpers-wall { background: var(--warm); border: 1.5px solid var(--warm-line); border-radius: var(--radius); padding: 14px 0 14px 14px; overflow: hidden; }
.helpers-wall > h2 { padding-right: 14px; }
.helpers { list-style: none; margin: 0; padding: 4px 14px 6px 4px; display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
.helpers::-webkit-scrollbar { display: none; }
.helpers li { flex: none; width: 116px; scroll-snap-align: start; }
@media (min-width: 700px) {
  .helpers-wall { padding-right: 14px; }
  .helpers { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); overflow: visible; padding-right: 4px; }
  .helpers li { width: auto; }
}
.helper {
  width: 100%; height: 100%; min-height: 44px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 6px 10px; border: 1.5px solid transparent; border-radius: 14px; background: var(--paper); color: var(--ink);
  font: inherit; text-align: center; cursor: pointer; box-shadow: var(--shadow);
}
.helper:hover { border-color: var(--warm-line); }
.avatar {
  width: 72px; height: 72px; flex: none; border-radius: 50%; object-fit: cover; background: var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  border: 3px solid var(--paper); box-shadow: 0 0 0 2px var(--warm-line);
  color: #fff; font-weight: 800; font-size: 1.6rem; line-height: 1; letter-spacing: 0.02em;
}
.avatar.big { width: min(60vw, 220px); height: min(60vw, 220px); font-size: 4.2rem; }
.av-0 { background: #2e6b3a; }
.av-1 { background: #a3461f; }
.av-2 { background: #24557a; }
.av-3 { background: #7a3f6b; }
.av-4 { background: #6b4f12; }
.av-5 { background: #3f5f5a; }
.helper-name { font-weight: 700; overflow-wrap: anywhere; }
.helper-word {
  font-size: 0.84rem; color: var(--muted); font-style: italic; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.helper-done { font-size: 0.8rem; font-weight: 700; color: var(--green); }
.join-wall { margin: 12px 14px 0 0; padding: 12px 14px; border: 1.5px dashed var(--amber-line); border-radius: 12px; background: var(--paper); }
.join-wall p { margin-bottom: 6px; }
.helper-big { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.helper-quote { font-size: 1.2rem; font-style: italic; margin: 0; overflow-wrap: anywhere; }
.my-helper { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.my-helper p { margin: 2px 0 0; }
.selfie-pic { display: flex; justify-content: center; }
.selfie-cam { position: relative; width: min(72vw, 300px); aspect-ratio: 1; margin: 0 auto; border-radius: 50%; overflow: hidden; background: #000; }
.selfie-video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; }
.selfie-shoot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; justify-items: center; }
.selfie-shutter { border-color: var(--green); }
.selfie-shutter span { background: var(--green); }

/* credits */
.credits { margin: 30px 0 6px; text-align: center; color: var(--muted); font-size: 0.82rem; }
.credits a { color: inherit; }
.gate .credits { margin-top: 24px; }
.poster-credits { margin: 0; text-align: center; font-size: 0.72rem; color: #625d52; }
@media print { .poster-credits { font-size: 8pt; } }
.credits a { display: inline-block; padding: 13px 2px; }
.section h2 > a { display: inline-flex; align-items: center; min-height: 44px; }
