/* Canon Coach: the look of the iOS app (Theme.swift, Components.swift) in plain CSS.
   Dark by default, light when the system (or the setting) asks for it. */

:root {
  color-scheme: dark;
  --canon: #C70F2E;
  --bg: #000000; --card: #1c1c1e; --card2: #2c2c2e;
  --label: #ffffff; --label2: rgba(235, 235, 245, .6); --label3: rgba(235, 235, 245, .3);
  --sep: rgba(84, 84, 88, .6); --fill2: rgba(120, 120, 128, .32); --fill3: rgba(118, 118, 128, .24);
  --seg-on: #636366; --bar: rgba(28, 28, 30, .68); --bar-line: rgba(255, 255, 255, .1);
  --orange: #FF9F0A; --green: #30D158; --teal: #40CBE0; --pink: #FF375F; --purple: #BF5AF2; --blue: #0A84FF;
  --indigo: #5E5CE6; --yellow: #FFD60A; --red: #FF453A; --gray: #8E8E93;
  --tint: var(--canon);
  --nav-h: 44px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tab-h: 62px;
  --font: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f2f2f7; --card: #ffffff; --card2: #f2f2f7;
    --label: #000000; --label2: rgba(60, 60, 67, .6); --label3: rgba(60, 60, 67, .3);
    --sep: rgba(60, 60, 67, .29); --fill2: rgba(120, 120, 128, .16); --fill3: rgba(118, 118, 128, .12);
    --seg-on: #ffffff; --bar: rgba(250, 250, 252, .72); --bar-line: rgba(0, 0, 0, .08);
    --orange: #FF9500; --green: #34C759; --teal: #30B0C7; --pink: #FF2D55; --purple: #AF52DE; --blue: #007AFF;
    --indigo: #5856D6; --yellow: #FFCC00; --red: #FF3B30;
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f2f7; --card: #ffffff; --card2: #f2f2f7;
  --label: #000000; --label2: rgba(60, 60, 67, .6); --label3: rgba(60, 60, 67, .3);
  --sep: rgba(60, 60, 67, .29); --fill2: rgba(120, 120, 128, .16); --fill3: rgba(118, 118, 128, .12);
  --seg-on: #ffffff; --bar: rgba(250, 250, 252, .72); --bar-line: rgba(0, 0, 0, .08);
  --orange: #FF9500; --green: #34C759; --teal: #30B0C7; --pink: #FF2D55; --purple: #AF52DE; --blue: #007AFF;
  --indigo: #5856D6; --yellow: #FFCC00; --red: #FF3B30;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; background: transparent; color: var(--label);
  font-family: var(--font); font-size: 17px; line-height: 1.32; -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent; overflow-x: hidden;
}
/* Soft glow of the screen's accent colour at the top, like Screen in Theme.swift. */
body::before {
  content: ""; position: fixed; inset: 0 0 auto 0; height: 420px; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--tint) 22%, transparent), transparent);
  transition: background .3s;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
p { margin: 0; }
h1, h2, h3 { margin: 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; background: var(--fill3); padding: 1px 5px; border-radius: 5px; }
.sym { width: 1em; height: 1em; flex: none; vertical-align: -.125em; --sym-cut: var(--card); }
:focus-visible { outline: 2px solid var(--canon); outline-offset: 2px; }

/* ---------------------------------------------------------------- type */
.large-title { font-size: 34px; line-height: 41px; font-weight: 700; letter-spacing: .2px; margin: 2px 4px 12px; }
.title2 { font-size: 22px; line-height: 28px; font-weight: 700; }
.headline { font-size: 17px; font-weight: 600; }
.callout { font-size: 16px; }
.subhead { font-size: 15px; }
.footnote { font-size: 13px; color: var(--label2); }
.caption { font-size: 12px; color: var(--label2); }
.caption2 { font-size: 11px; color: var(--label2); }
.secondary { color: var(--label2); }
.center { text-align: center; justify-content: center; }
.body-text { padding: 0 4px; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------------------------------------------------------------- shell */
.screen {
  width: 100%; max-width: 720px; margin: 0 auto;
  padding: calc(var(--nav-h) + var(--safe-top) + 6px) max(16px, env(safe-area-inset-right)) calc(var(--tab-h) + var(--safe-bottom) + 44px) max(16px, env(safe-area-inset-left));
}
.stack { display: flex; flex-direction: column; gap: 18px; }
.screen > .stack + .stack { margin-top: 18px; }

.navbar {
  position: fixed; inset: 0 0 auto 0; z-index: 20; padding-top: var(--safe-top);
  background: transparent; border-bottom: .5px solid transparent; transition: background .2s, border-color .2s;
}
body.scrolled .navbar, body.is-detail .navbar {
  background: var(--bar); border-bottom-color: var(--bar-line);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
}
body.is-detail:not(.scrolled) .navbar { background: color-mix(in srgb, var(--bar) 40%, transparent); border-bottom-color: transparent; }
.navbar-inner { height: var(--nav-h); max-width: 720px; margin: 0 auto; padding: 0 max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left)); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.nav-title { grid-column: 2; font-size: 17px; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 56vw; opacity: 0; transition: opacity .2s; }
body.scrolled .nav-title, body.is-detail .nav-title { opacity: 1; }
.nav-back { grid-column: 1; justify-self: start; display: inline-flex; align-items: center; gap: 2px; border: 0; background: none; color: var(--canon); font-size: 17px; padding: 6px 4px; margin-left: -6px; cursor: pointer; max-width: 30vw; }
.nav-back .sym { width: 24px; height: 24px; stroke-width: 2.4; }
.nav-back span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-actions { grid-column: 3; justify-self: end; display: flex; gap: 8px; align-items: center; }
.nav-btn {
  display: inline-grid; place-items: center; min-width: 36px; height: 36px; border-radius: 999px; border: 0; cursor: pointer;
  color: var(--label); background: var(--fill3); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.nav-btn .sym { width: 20px; height: 20px; }
.nav-btn.on { color: var(--canon); }
.nav-btn.text { padding: 0 14px; font-weight: 600; font-size: 16px; color: var(--canon); }

.tabbar {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%);
  bottom: max(10px, calc(var(--safe-bottom) - 6px)); width: min(calc(100% - 24px), 480px); height: var(--tab-h);
  display: grid; grid-template-columns: repeat(5, 1fr); padding: 4px; border-radius: 999px;
  background: var(--bar); border: .5px solid var(--bar-line);
  -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .28);
}
.tabbar button {
  border: 0; background: none; cursor: pointer; border-radius: 999px; color: var(--label);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0; min-width: 0;
}
.tb-ico { position: relative; width: 24px; height: 24px; }
.tb-ico .sym { position: absolute; inset: 0; width: 24px; height: 24px; }
.tb-ico .onn, .tabbar button.on .tb-ico .off { display: none; }
.tabbar button.on .tb-ico .onn { display: block; }
.tb-label { font-size: 10px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tabbar button.on { color: var(--canon); background: var(--fill3); }
@media (max-width: 360px) { .tb-label { font-size: 9px; } }

.loading { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 60px 0; color: var(--label2); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--fill2); border-top-color: var(--canon); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-card { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }

/* ---------------------------------------------------------------- building blocks */
.card { background: var(--card); border-radius: 22px; padding: 16px; display: block; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }

.badge {
  display: inline-grid; place-items: center; flex: none; width: var(--s); height: var(--s); border-radius: calc(var(--s) * .28);
  color: #fff; --sym-cut: var(--c);
}
.badge > .sym { width: 52%; height: 52%; stroke-width: 2.2; }
.badge > .glyph { width: 100%; height: 100%; }

.hero {
  position: relative; overflow: hidden; display: flex; align-items: flex-end; border-radius: 28px; color: #fff;
  box-shadow: 0 10px 36px color-mix(in srgb, var(--c) 30%, transparent); isolation: isolate;
}
.hero-mark { position: absolute; top: -18px; right: -34px; width: 160px; height: 160px; color: rgba(255, 255, 255, .16); transform: rotate(-12deg); z-index: -1; }
.hero-mark .sym { width: 160px; height: 160px; stroke-width: 1.8; }
.hero-body { padding: 20px; display: flex; flex-direction: column; gap: 6px; width: 100%; }
.hero-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: rgba(255, 255, 255, .85); }
.hero-title { font-size: 28px; line-height: 34px; font-weight: 700; }
.hero-sub { font-size: 15px; color: rgba(255, 255, 255, .9); }
.hero-pills { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 6px; }
.glass-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; font-size: 15px; font-weight: 600; color: #fff;
  background: rgba(255, 255, 255, .18); border: .5px solid rgba(255, 255, 255, .3);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); --sym-cut: rgba(0, 0, 0, .35);
}
.glass-pill.done { background: color-mix(in srgb, var(--green) 45%, rgba(255, 255, 255, .1)); }
a.hero:active, a.card:active, a.link-row:active, a.chapter-tile:active, a.next-card:active { transform: scale(.985); transition: transform .1s; }

.section-title { display: flex; align-items: center; gap: 6px; font-size: 20px; font-weight: 700; margin-top: 6px; }
.section-title .sym { color: var(--label2); width: 19px; height: 19px; }

.link-row { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--card); border-radius: 18px; }
.lr-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.lr-title { font-weight: 500; }
.lr-sub { font-size: 12px; color: var(--label2); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chev { color: var(--label3); display: inline-flex; flex: none; }
.chev .sym { width: 15px; height: 15px; stroke-width: 2.6; }

.pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }

kbd.key { font-family: var(--font); font-size: .9em; font-weight: 600; background: var(--fill3); padding: 0 .3em; border-radius: 5px; white-space: nowrap; }
kbd.keycap { font-family: var(--font); font-size: 12px; font-weight: 700; padding: 3px 6px; border-radius: 5px; background: var(--card); box-shadow: inset 0 0 0 1px var(--sep); }

.menu-path { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 13px; }
.mp-chev { color: var(--label3); display: inline-flex; }
.mp-chev .sym { width: 10px; height: 10px; stroke-width: 3; }
.mp-tab { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 6px; color: #fff; font-weight: 600; }
.mp-tab .sym { width: 13px; height: 13px; }
.mp-item { padding: 3px 7px; border-radius: 6px; background: var(--fill3); font-weight: 500; }
.tab-text { font-weight: 900; font-size: 11px; letter-spacing: -.2px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; min-height: 40px; border-radius: 999px; border: 0; cursor: pointer;
  font-size: 15px; font-weight: 600; color: var(--canon); background: var(--fill3);
}
.btn .sym { width: 17px; height: 17px; }
.btn.prominent { background: var(--canon); color: #fff; }
.btn.tinted { color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.btn.large { width: 100%; padding: 14px 18px; font-size: 17px; }
.btn:active { opacity: .8; }

.segmented { display: flex; padding: 2px; border-radius: 10px; background: var(--fill3); gap: 2px; }
.segmented button {
  flex: 1; min-width: 0; border: 0; background: none; cursor: pointer; padding: 7px 6px; border-radius: 8px;
  font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.segmented button.on { background: var(--seg-on); font-weight: 600; box-shadow: 0 2px 6px rgba(0, 0, 0, .14); }
.segmented .sym { width: 15px; height: 15px; }

.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; color: var(--label2); padding: 48px 20px; }
.empty > .sym { width: 44px; height: 44px; margin-bottom: 4px; }
.empty h3 { color: var(--label); font-size: 20px; }

/* ---------------------------------------------------------------- search (home) */
.searchbar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.search-field { flex: 1; display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 10px; border-radius: 12px; background: var(--fill3); color: var(--label2); }
.search-field > .sym { width: 18px; height: 18px; }
.search-field input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font: inherit; font-size: 17px; color: var(--label); -webkit-appearance: none; appearance: none; }
.search-field input::placeholder { color: var(--label2); }
.search-field input::-webkit-search-cancel-button { display: none; }
.search-clear { border: 0; background: none; padding: 0; display: inline-flex; color: var(--label3); cursor: pointer; --sym-cut: var(--bg); }
.search-clear .sym { width: 18px; height: 18px; }
.search-cancel { border: 0; background: none; color: var(--canon); font-size: 17px; cursor: pointer; padding: 0; }
.suggest { padding: 4px 0; margin-bottom: 18px; }
.suggest-row { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; padding: 11px 16px; font-size: 17px; text-align: left; cursor: pointer; }
.suggest-row .sym { color: var(--label2); }
.suggest-row + .suggest-row { border-top: .5px solid var(--sep); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.tile-title { font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.camera-card { display: flex; align-items: center; gap: 12px; padding: 14px; }
.tip-card { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px; isolation: isolate; }
.tip-mark { position: absolute; top: 8px; right: 10px; color: color-mix(in srgb, var(--yellow) 10%, transparent); z-index: -1; }
.tip-mark .sym { width: 90px; height: 90px; stroke-width: 1.4; color: color-mix(in srgb, var(--yellow) 12%, transparent); }
.tip-head { display: flex; align-items: center; gap: 10px; }
.tip-text { font-size: 16px; display: -webkit-box; -webkit-line-clamp: 5; line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.tip-more { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; }
.tip-more span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tip-more .sym { width: 13px; height: 13px; }
.carousel { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.carousel::-webkit-scrollbar { display: none; }
.saved-card { flex: none; width: 150px; height: 120px; padding: 12px; display: flex; flex-direction: column; gap: 8px; scroll-snap-align: start; }
.sc-title { margin-top: auto; font-size: 15px; font-weight: 600; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sc-sub { font-size: 11px; color: var(--label2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#results { display: flex; flex-direction: column; gap: 10px; }
#results .footnote { margin-bottom: 2px; }

.sheet-item { display: flex; flex-direction: column; gap: 3px; padding: 10px 0; font-size: 15px; }
.sheet-item + .sheet-item { border-top: .5px solid var(--sep); }
.si-key { font-weight: 600; }
.si-val { color: var(--label2); }

/* ---------------------------------------------------------------- buttons & drawing */
.drawing { display: block; width: 100%; height: auto; overflow: visible; }
.drawing.small { max-width: 340px; margin: 0 auto; }
.drawing .beside { fill: var(--label2); }
.drawing .hits [data-part] { cursor: pointer; outline: none; }
.drawing .hits [data-part]:focus-visible { fill-opacity: .25; fill: var(--canon); }
.drawing .pulse { animation: pulse .8s ease-in-out infinite alternate; }
@keyframes pulse { from { fill-opacity: var(--o, 1); } to { fill-opacity: calc(var(--o, 1) * .55); } }
.drawing.appear { animation: appear .25s ease; }
@keyframes appear { from { opacity: 0; transform: scale(.96); } }
.drawing-card { display: flex; flex-direction: column; gap: 10px; }
.drawing-card .caption { display: flex; align-items: center; gap: 6px; font-weight: 500; }
.detail-head { display: flex; align-items: flex-start; gap: 14px; padding: 0 4px; }
.detail-head > div { display: flex; flex-direction: column; gap: 4px; }
.use { display: flex; flex-direction: column; gap: 3px; font-size: 15px; padding: 10px 0; }
.use:first-child { padding-top: 0; } .use:last-child { padding-bottom: 0; }
.use + .use { border-top: .5px solid var(--sep); }
.use-when { font-weight: 600; color: var(--blue); }

/* ---------------------------------------------------------------- menu (camera screen) */
.lcd {
  background: #000; color: #fff; border-radius: 12px; padding: 6px 0; border: 3px solid #2e2e2e; box-shadow: 0 0 0 3px #2e2e2e;
  font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif; margin: 3px; color-scheme: dark;
}
.lcd-wrap { border-radius: 15px; box-shadow: 0 8px 36px color-mix(in srgb, var(--tab) 35%, transparent); }
.lcd-tabs { display: flex; gap: 2px; padding: 0 6px; }
.lcd-tab { flex: 1; min-height: 26px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; color: #b3b3b3; border-radius: 4px 4px 0 0; font-size: 12px; padding: 0; cursor: pointer; }
span.lcd-tab { cursor: default; }
.lcd-tab .sym { width: 14px; height: 14px; }
.lcd-tab.on { background: var(--tc); color: #fff; }
.lcd-pages { display: flex; gap: 2px; padding: 4px 8px; flex-wrap: wrap; }
.lcd-page { min-width: 18px; height: 18px; display: inline-grid; place-items: center; border: 0; background: none; color: #a6a6a6; font-size: 11px; border-radius: 3px; padding: 0 3px; cursor: pointer; }
span.lcd-page { cursor: default; }
.lcd-page.on { background: var(--tab); color: #fff; font-weight: 700; }
.lcd-rule { height: 1px; background: #404040; }
.lcd-rows { padding: 2px 0; display: flex; flex-direction: column; }
.lcd-row { display: block; width: 100%; text-align: left; border: 0; background: none; color: #fff; font-size: 15px; padding: 6px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
span.lcd-row { cursor: default; }
.lcd-row.on { background: #3d3d3d; font-weight: 600; box-shadow: inset 3px 0 0 var(--tab); }
.lcd-note { font-size: 13px; color: #b3b3b3; padding: 12px; }
.screen-preview { display: flex; flex-direction: column; gap: 6px; }
.screen-preview .lcd { max-width: 360px; }

.controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-items: start; }
.ctl { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ctl-btns { display: flex; gap: 4px; }
.ctl-label { font-size: 11px; color: var(--label2); text-align: center; }
.glass-btn {
  border: .5px solid var(--bar-line); background: var(--fill3); color: var(--tab, var(--canon)); cursor: pointer; border-radius: 999px;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
}
.glass-btn.round { width: 40px; height: 40px; display: inline-grid; place-items: center; }
.glass-btn.round .sym { width: 20px; height: 20px; stroke-width: 2.4; }
.glass-btn.info { height: 40px; padding: 0 16px; font-weight: 900; font-size: 15px; letter-spacing: .3px; }
.glass-btn:active { transform: scale(.95); }
.help-card { box-shadow: inset 5px 0 0 var(--tab); display: flex; flex-direction: column; gap: 10px; }
.option { display: flex; flex-direction: column; gap: 2px; font-size: 15px; padding: 10px 0; }
.option + .option { border-top: .5px solid var(--sep); }
.opt-name { font-weight: 600; }

/* ---------------------------------------------------------------- topics */
.chapter-tile {
  position: relative; overflow: hidden; height: 150px; border-radius: 24px; padding: 14px; color: #fff;
  display: flex; flex-direction: column; gap: 4px; box-shadow: 0 6px 20px color-mix(in srgb, var(--c) 25%, transparent); isolation: isolate;
}
.ct-mark { position: absolute; right: -22px; bottom: -18px; color: rgba(255, 255, 255, .2); z-index: -1; }
.ct-mark .sym { width: 78px; height: 78px; }
.ct-ico .sym { width: 22px; height: 22px; }
.ct-title { margin-top: auto; -webkit-hyphens: auto; hyphens: auto; overflow-wrap: anywhere; font-size: 17px; font-weight: 600; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ct-count { font-size: 12px; opacity: .85; }
.topic-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px; }
.topic-row .chev { padding-top: 8px; }
.num { flex: none; width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 600; font-size: 17px; }
.step { display: flex; flex-direction: column; gap: 12px; }
.step-head { display: flex; align-items: center; gap: 12px; }
.step-head .num { width: 32px; height: 32px; }
.do-list { list-style: none; margin: 0; padding: 12px; display: flex; flex-direction: column; gap: 8px; border-radius: 14px; background: color-mix(in srgb, var(--accent, var(--canon)) 6%, transparent); }
.do-list li { display: flex; gap: 10px; align-items: baseline; }
.do-num { flex: none; width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; background: var(--accent, var(--canon)); transform: translateY(-1px); }
.lit-box { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px; border-radius: 16px; background: var(--card2); }
.where { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; }
.where:last-child { padding-bottom: 0; }
.where + .where { border-top: .5px solid var(--sep); }
.where-what { font-size: 15px; font-weight: 600; }
.card.tip { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--yellow) 45%, transparent); }
.tip-row { display: flex; align-items: flex-start; gap: 12px; }
.tip-row > div { display: flex; flex-direction: column; gap: 4px; }
.next-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px; border-radius: 22px; color: #fff; margin-top: 4px; }
.next-card > span { display: flex; flex-direction: column; gap: 2px; }
.next-card > .sym { width: 30px; height: 30px; --sym-cut: rgba(0, 0, 0, .25); }
.eyebrow-w { font-size: 11px; font-weight: 700; letter-spacing: .6px; color: rgba(255, 255, 255, .85); }
.eyebrow-s { font-size: 11px; font-weight: 700; letter-spacing: .6px; color: var(--label2); }

/* ---------------------------------------------------------------- today */
.streak { display: flex; align-items: center; gap: 16px; padding: 14px; }
.streak-count { width: 84px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.streak-count b { font-size: 22px; }
.flame .sym { width: 30px; height: 30px; color: var(--orange); filter: drop-shadow(0 2px 6px color-mix(in srgb, var(--canon) 40%, transparent)); }
.streak-rule { width: .5px; align-self: stretch; background: var(--sep); }
.streak-week { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.week { display: flex; gap: 6px; }
.wd { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.wd-l { font-size: 11px; font-weight: 600; color: var(--label2); }
.wd.today .wd-l { color: var(--label); }
.wd-c { width: 26px; height: 26px; border-radius: 50%; background: var(--fill3); display: inline-grid; place-items: center; color: #fff; }
.wd-c .sym { width: 12px; height: 12px; stroke-width: 3.5; }
.wd.today .wd-c { box-shadow: inset 0 0 0 2px var(--orange); }
.disclosure > summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary .chev { margin-left: auto; transition: transform .2s; }
.disclosure[open] > summary .chev { transform: rotate(90deg); }
.disclosure > p { padding-top: 10px; }
.check-card { display: flex; flex-direction: column; gap: 12px; }
.auto-src { display: flex; flex-direction: column; gap: 8px; padding-bottom: 12px; border-bottom: .5px solid var(--sep); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.row-between .subhead { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
select { font: inherit; font-size: 15px; color: var(--label); background: var(--fill3); border: 0; border-radius: 9px; padding: 6px 10px; max-width: 60%; }
.pick-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn.pick { position: relative; overflow: hidden; }
.btn.pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.hint-row { display: flex; gap: 12px; align-items: flex-start; }
.hint-row > .sym { width: 28px; height: 28px; color: var(--label2); }
.results { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.results li { display: flex; gap: 10px; align-items: flex-start; }
.results li > .sym { width: 22px; height: 22px; flex: none; }
.results li.ok > .sym { color: var(--green); }
.results li.bad > .sym { color: var(--red); }
.res-text { font-size: 15px; font-weight: 500; }
.passed { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 16px; color: #fff; font-weight: 600; }
.passed .sym { width: 24px; height: 24px; }
.thumbs { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px; scrollbar-width: none; }
.thumbs::-webkit-scrollbar { display: none; }
.thumb { flex: none; width: 150px; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.thumb.wide { width: 100%; max-width: 360px; }
.thumb-img { position: relative; height: 100px; border-radius: 12px; overflow: hidden; background: var(--fill2); display: grid; place-items: center; color: var(--label2); }
.thumb-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb.used .thumb-img { box-shadow: 0 0 0 2.5px var(--green); }
.thumb figcaption { display: flex; flex-direction: column; font-size: 12px; }
.thumb figcaption b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb figcaption span { font-size: 11px; color: var(--label2); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.honor { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding-top: 4px; }
.row-card { display: flex; align-items: center; gap: 12px; padding: 14px; }
.history { padding: 4px 14px; }
.hist-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.hist-row + .hist-row { border-top: .5px solid var(--sep); margin-left: 34px; }
.hist-row + .hist-row .ok { margin-left: -34px; }
.hist-row .ok { display: inline-flex; color: var(--green); }
.hist-row .ok .sym { width: 22px; height: 22px; }
.hist-row .subhead { flex: 1; }

/* ---------------------------------------------------------------- settings (inset grouped list) */
.settings { display: flex; flex-direction: column; gap: 26px; }
.group-header { font-size: 13px; font-weight: 400; text-transform: uppercase; color: var(--label2); padding: 0 16px 7px; letter-spacing: .2px; }
.group-body { background: var(--card); border-radius: 22px; overflow: hidden; }
.group-footer { font-size: 13px; color: var(--label2); padding: 7px 16px 0; }
.g-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; min-height: 48px; width: 100%; border: 0; background: none; text-align: left; font-size: 17px; color: var(--label); }
button.g-row, a.g-row { cursor: pointer; }
button.g-row:active, a.g-row:active { background: var(--fill3); }
.g-row + .g-row, .g-pad + .g-row, .g-row + .g-pad { border-top: .5px solid var(--sep); }
.g-pad { padding: 10px 16px; }
.g-title { flex: 1; min-width: 0; }
.g-title.two { display: flex; flex-direction: column; gap: 1px; }
.g-sub { font-size: 12px; color: var(--label2); }
.g-title.destructive { color: var(--red); }
.g-check { color: var(--canon); display: inline-flex; }
.g-check .sym { width: 18px; height: 18px; stroke-width: 2.8; }
.g-value { color: var(--label2); font-size: 15px; }
.g-step { display: flex; gap: 10px; align-items: baseline; font-size: 15px; }
.g-row[style*="block"] > .menu-path { margin: 8px 0 0 30px; }
.g-num { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--canon); color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; transform: translateY(-1px); }
.text-input { flex: 1; min-width: 0; font: inherit; font-size: 17px; color: var(--label); background: none; border: 0; outline: none; padding: 6px 0; }
.disclosure-row { display: block; }
.disclosure-row > summary { cursor: pointer; font-weight: 500; padding: 4px 0; }
.disclosure-row > p, .disclosure-row > a, .disclosure-row > .menu-path { margin-top: 8px; }
.disclosure-row > a { display: inline-flex; align-items: center; gap: 4px; color: var(--canon); }
.liveview { aspect-ratio: 3 / 2; background: #000; display: grid; place-items: center; color: rgba(255, 255, 255, .7); position: relative; }
.liveview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.liveview span { display: inline-flex; gap: 6px; align-items: center; }
#lastPhoto { padding: 0 16px 12px; }
.caption.bad { color: var(--red); }

/* ---------------------------------------------------------------- toasts & confetti */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab-h) + var(--safe-bottom) + 22px); z-index: 50; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: max-content; max-width: calc(100% - 32px); }
.toast {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; font-size: 15px; font-weight: 600;
  background: var(--bar); color: var(--label); border: .5px solid var(--bar-line); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25); animation: toast-in .25s ease, toast-out .3s ease 2.7s forwards;
}
.toast .sym { color: var(--canon); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px); } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.confetti i { position: absolute; top: -20px; display: block; animation: fall 1.8s ease-in forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); opacity: .2; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
  .drawing .pulse { animation: none; }
}
@media (min-width: 760px) {
  .grid2.tiles4 { grid-template-columns: repeat(4, 1fr); }
}
.btn-row { flex-wrap: wrap; gap: 8px; }
.btn-row .btn { flex: 1 1 auto; white-space: nowrap; }
