/* ================================================================
   دليل تدريب الطفلة على الحمّام — Botty Training PWA
   Design thesis: patience & growth (صبر ونمو)
   Palette: warm paper + sage pine + honey amber, brick used sparingly
   Type:  El Messiri (headings) · Readex Pro (body) · Amiri (نص شرعي)
   ================================================================ */

:root {
  --bg:          #F7F4EC;   /* warm paper */
  --surface:     #FFFFFF;
  --surface-2:   #F1EEE4;   /* faint panel */
  --ink:         #223730;   /* deep pine text */
  --ink-soft:    #4C5F58;   /* secondary text */
  --line:        #E4E0D4;   /* hairline */

  --primary:     #3E6B5C;   /* sage pine */
  --primary-d:   #234B43;   /* deep pine */
  --primary-soft:#E7EFEA;   /* pale sage panel */

  --accent:      #C67B2E;   /* honey amber */
  --accent-soft: #F7E9D2;

  --good:        #3E6B5C;
  --good-soft:   #E7EFEA;
  --warn:        #A9502F;   /* muted brick (تجنّب) */
  --warn-soft:   #F6E3DA;

  --radius:      18px;
  --radius-sm:   12px;
  --shadow:      0 6px 22px rgba(34, 55, 48, .07);
  --shadow-sm:   0 2px 8px rgba(34, 55, 48, .06);

  --maxw:        720px;
  --nav-h:       58px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Readex Pro", system-ui, "Segoe UI", Tahoma, sans-serif;
  font-size: 17px;
  line-height: 1.85;
  direction: rtl;
  text-align: right;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, .display {
  font-family: "El Messiri", "Readex Pro", sans-serif;
  line-height: 1.35;
  color: var(--primary-d);
  font-weight: 700;
}

a { color: var(--primary); }

/* ---------- app shell ---------- */
.app { max-width: var(--maxw); margin: 0 auto; min-height: 100vh; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
}
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px; flex: 0 0 auto;
  background: var(--primary); display: grid; place-items: center;
  box-shadow: var(--shadow-sm);
}
.brand-mark svg { width: 24px; height: 24px; }
.brand-title { font-family: "El Messiri", sans-serif; font-weight: 700;
  font-size: 19px; color: var(--primary-d); line-height: 1.2; }
.brand-sub { font-size: 12.5px; color: var(--ink-soft); line-height: 1.2; }

/* ---------- tab strip ---------- */
.tabs {
  position: sticky; top: var(--nav-h); z-index: 30;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.tabs-scroll {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; gap: 8px; padding: 10px 16px;
  overflow-x: auto; scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.tabs-scroll::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto; scroll-snap-align: end;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  font-family: "Readex Pro", sans-serif; font-size: 14.5px; font-weight: 500;
  padding: 8px 15px; border-radius: 999px; cursor: pointer;
  display: flex; align-items: center; gap: 7px;
  transition: background .18s, color .18s, border-color .18s, transform .12s;
  white-space: nowrap;
}
.tab .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); opacity: .55; }
.tab:hover { border-color: var(--primary); color: var(--primary-d); }
.tab[aria-selected="true"] {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.tab[aria-selected="true"] .dot { background: #fff; opacity: 1; }

/* ---------- panels ---------- */
main { padding: 0 16px 120px; }
.panel { display: none; animation: rise .38s ease both; padding-top: 22px; }
.panel.active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .panel { animation: none; }
  html { scroll-behavior: auto; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: "Readex Pro", sans-serif; font-weight: 600; font-size: 13px;
  letter-spacing: .3px; color: var(--accent);
  background: var(--accent-soft); padding: 5px 12px; border-radius: 999px;
  margin-bottom: 12px;
}
.panel h2 { font-size: 26px; margin: 4px 0 6px; }
.lead { color: var(--ink-soft); font-size: 16px; margin: 0 0 20px; }

/* ---------- hero (home) ---------- */
.hero {
  background:
    radial-gradient(120% 80% at 90% -10%, var(--primary-soft) 0%, transparent 55%),
    linear-gradient(180deg, #fff 0%, var(--surface-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px 24px;
  box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset-inline-start: -40px; bottom: -40px;
  width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
  opacity: .8;
}
.hero .kicker { color: var(--accent); font-weight: 600; font-size: 13.5px; }
.hero h1 { font-size: 30px; margin: 8px 0 10px; line-height: 1.3; }
.hero p { color: var(--ink-soft); margin: 0 0 4px; position: relative; z-index: 1; }
.hero .note {
  margin-top: 18px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--primary-soft) 70%, #fff);
  border: 1px solid var(--line); color: var(--primary-d);
  font-size: 15px; position: relative; z-index: 1;
}

/* home index cards */
.index-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
@media (max-width: 460px){ .index-grid { grid-template-columns: 1fr; } }
.index-card {
  text-align: right; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 16px; cursor: pointer;
  box-shadow: var(--shadow-sm); transition: transform .14s, box-shadow .18s, border-color .18s;
  display: flex; gap: 12px; align-items: flex-start; font-family: "Readex Pro", sans-serif;
}
.index-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--primary); }
.index-card .ic {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 11px;
  background: var(--primary-soft); color: var(--primary-d);
  display: grid; place-items: center;
}
.index-card .ic svg { width: 22px; height: 22px; }
.index-card b { display: block; color: var(--primary-d); font-size: 16px; font-weight: 700; }
.index-card span { color: var(--ink-soft); font-size: 13.5px; line-height: 1.6; }

/* ---------- generic cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 18px; margin: 14px 0;
  box-shadow: var(--shadow-sm);
}
.card h3 { font-size: 19px; margin: 0 0 8px; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }

.callout {
  border-radius: var(--radius-sm); padding: 14px 16px; margin: 16px 0;
  border: 1px solid var(--line); font-size: 15.5px; line-height: 1.8;
}
.callout .t { font-weight: 700; display: block; margin-bottom: 4px; }
.callout.tip   { background: var(--primary-soft); border-color: #cfe0d8; }
.callout.tip .t   { color: var(--primary-d); }
.callout.warn  { background: var(--warn-soft); border-color: #ecc9bc; }
.callout.warn .t  { color: var(--warn); }
.callout.amber { background: var(--accent-soft); border-color: #eecfa8; }
.callout.amber .t { color: var(--accent); }

/* ---------- lists ---------- */
ul.clean, ul.check, ul.cross { list-style: none; padding: 0; margin: 10px 0; }
ul.clean li, ul.check li, ul.cross li {
  position: relative; padding-inline-start: 30px; margin-bottom: 11px; line-height: 1.75;
}
ul.clean li::before {
  content: ""; position: absolute; inset-inline-start: 4px; top: 13px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}
ul.check li::before {
  content: "✓"; position: absolute; inset-inline-start: 0; top: 0;
  color: var(--good); font-weight: 700; background: var(--good-soft);
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 13px;
  margin-top: 4px;
}
ul.cross li::before {
  content: "✕"; position: absolute; inset-inline-start: 0; top: 0;
  color: var(--warn); font-weight: 700; background: var(--warn-soft);
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px;
  margin-top: 4px;
}
ul.check li b, ul.cross li b { color: var(--ink); }

/* ---------- numbered steps ---------- */
.steps { counter-reset: step; margin: 8px 0; }
.step {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 18px 16px 18px;
  margin-bottom: 14px; box-shadow: var(--shadow-sm);
  padding-inline-start: 66px;
}
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; inset-inline-start: 16px; top: 16px;
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--primary); color: #fff;
  font-family: "El Messiri", sans-serif; font-weight: 700; font-size: 18px;
  display: grid; place-items: center; box-shadow: var(--shadow-sm);
}
.step h3 { margin: 2px 0 6px; font-size: 18px; }
.step p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }
.step .when {
  display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 600;
  color: var(--accent); background: var(--accent-soft);
  padding: 3px 10px; border-radius: 999px;
}

/* ---------- FAQ / issues accordion ---------- */
.acc { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--surface); margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.acc summary {
  list-style: none; cursor: pointer; padding: 16px 18px;
  display: flex; align-items: center; gap: 12px; font-weight: 600; color: var(--primary-d);
  font-family: "Readex Pro", sans-serif; font-size: 16px;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary .chev {
  margin-inline-start: auto; flex: 0 0 auto; transition: transform .22s; color: var(--accent);
}
.acc[open] summary .chev { transform: rotate(180deg); }
.acc summary .q {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px; font-size: 13px;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-weight: 700;
}
.acc .body { padding: 0 18px 16px; color: var(--ink-soft); font-size: 15.5px; line-height: 1.8; }
.acc .body p { margin: 0 0 8px; }
.acc .body p:last-child { margin-bottom: 0; }

/* problem card variant */
.acc.problem summary .q { background: var(--warn-soft); color: var(--warn); }
.acc.problem summary .q svg { width: 15px; height: 15px; }
.acc .fix { margin-top: 10px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--good-soft); border: 1px solid #cfe0d8; color: var(--primary-d); }
.acc .fix b { color: var(--primary-d); }

/* ---------- religious block ---------- */
.dua {
  background: linear-gradient(180deg, var(--primary-soft) 0%, #fff 100%);
  border: 1px solid #cfe0d8; border-radius: var(--radius);
  padding: 20px; margin: 14px 0; box-shadow: var(--shadow-sm);
}
.dua .ar {
  font-family: "Amiri", serif; font-size: 25px; line-height: 2.1;
  color: var(--primary-d); font-weight: 700; text-align: center; margin: 4px 0 10px;
}
.dua .meaning { color: var(--ink-soft); font-size: 15px; margin: 0 0 8px; }
.dua .src { font-size: 13px; color: var(--primary); font-weight: 600;
  border-top: 1px dashed #cfe0d8; padding-top: 8px; }

/* ---------- doctor banner ---------- */
.doctor {
  background: var(--warn-soft); border: 1px solid #ecc9bc; border-radius: var(--radius);
  padding: 18px; margin: 18px 0; box-shadow: var(--shadow-sm);
}
.doctor h3 { color: var(--warn); display: flex; align-items: center; gap: 10px; margin-top: 0; }
.doctor h3 svg { width: 22px; height: 22px; }

/* ---------- checklist (interactive) ---------- */
.todo { list-style: none; padding: 0; margin: 8px 0; }
.todo li {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); margin-bottom: 10px; cursor: pointer;
  transition: background .15s; font-size: 15.5px;
}
.todo li:hover { background: var(--surface-2); }
.todo .box {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 7px;
  border: 2px solid var(--primary); display: grid; place-items: center;
  margin-top: 2px; transition: background .15s;
}
.todo .box svg { width: 15px; height: 15px; opacity: 0; transition: opacity .15s; color: #fff; }
.todo li.done .box { background: var(--primary); }
.todo li.done .box svg { opacity: 1; }
.todo li.done .txt { color: var(--ink-soft); text-decoration: line-through; text-decoration-color: #b9c6c0; }

/* ---------- footer ---------- */
.foot { text-align: center; color: var(--ink-soft); font-size: 12.5px;
  padding: 26px 16px 12px; border-top: 1px solid var(--line); margin-top: 30px; }
.foot b { color: var(--primary-d); }

/* ---------- install hint ---------- */
.install {
  position: fixed; inset-inline: 16px; bottom: 16px; z-index: 60; max-width: 690px;
  margin: 0 auto; background: var(--primary-d); color: #fff;
  border-radius: var(--radius); padding: 14px 16px; box-shadow: 0 10px 30px rgba(34,55,48,.28);
  display: none; align-items: center; gap: 12px; font-size: 14.5px;
}
.install.show { display: flex; }
.install button { font-family: "Readex Pro", sans-serif; cursor: pointer; border: 0;
  border-radius: 10px; padding: 8px 14px; font-weight: 600; }
.install .go { background: var(--accent); color: #fff; }
.install .x { background: transparent; color: #cfe0d8; }

/* ---------- to-top ---------- */
.totop {
  position: fixed; inset-inline-end: 16px; bottom: 16px; z-index: 55;
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--primary); cursor: pointer;
  box-shadow: var(--shadow); display: none; place-items: center;
}
.totop.show { display: grid; }
.totop svg { width: 22px; height: 22px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ================================================================
   ADDITIONS — onboarding modal · my-plan · tracker
   ================================================================ */

/* ---------- onboarding modal ---------- */
.modal-wrap {
  position: fixed; inset: 0; z-index: 90; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(28, 44, 39, .55); backdrop-filter: blur(3px);
}
.modal-wrap.show { display: flex; animation: fade .25s ease both; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.modal {
  background: var(--surface); border-radius: 22px; max-width: 460px; width: 100%;
  padding: 24px 22px; box-shadow: 0 24px 60px rgba(28,44,39,.4);
  animation: rise .3s ease both;
}
.modal .m-kicker { color: var(--accent); font-weight: 600; font-size: 13.5px; }
.modal h2 { font-size: 23px; margin: 8px 0 6px; }
.modal p { color: var(--ink-soft); font-size: 15px; margin: 0 0 18px; }
.choice {
  display: block; width: 100%; text-align: right; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: var(--radius-sm); padding: 15px 16px; margin-bottom: 11px;
  font-family: "Readex Pro", sans-serif; font-size: 15.5px; font-weight: 500;
  display: flex; align-items: center; gap: 13px;
  transition: border-color .16s, background .16s, transform .12s;
}
.choice:hover { border-color: var(--primary); background: var(--primary-soft); transform: translateY(-1px); }
.choice .ci {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px;
  background: var(--primary-soft); color: var(--primary-d);
  display: grid; place-items: center;
}
.choice .ci svg { width: 22px; height: 22px; }
.choice b { display: block; color: var(--primary-d); font-size: 16px; }
.choice small { color: var(--ink-soft); font-size: 13px; font-weight: 400; }

/* ---------- my plan panel ---------- */
.plan-hero {
  border-radius: var(--radius); padding: 22px; margin-bottom: 6px;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  background: linear-gradient(180deg, var(--primary-soft) 0%, #fff 100%);
}
.plan-hero .badge {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px;
  color: var(--primary-d); background: #fff; border: 1px solid #cfe0d8;
  padding: 5px 12px; border-radius: 999px; margin-bottom: 10px;
}
.plan-hero h2 { font-size: 23px; margin: 0 0 6px; }
.plan-hero p { color: var(--ink-soft); margin: 0; font-size: 15px; }

.plan-step {
  display: flex; gap: 14px; align-items: flex-start; padding: 15px 16px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
  margin-bottom: 11px; box-shadow: var(--shadow-sm);
}
.plan-step .n {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 10px; background: var(--accent);
  color: #fff; font-family: "El Messiri", sans-serif; font-weight: 700;
  display: grid; place-items: center; font-size: 16px;
}
.plan-step .pt b { color: var(--primary-d); display: block; font-size: 15.5px; }
.plan-step .pt span { color: var(--ink-soft); font-size: 14px; }
.plan-step .jump {
  margin-inline-start: auto; align-self: center; flex: 0 0 auto;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--primary-d);
  font-family: "Readex Pro", sans-serif; font-size: 13px; font-weight: 600; cursor: pointer;
  padding: 7px 12px; border-radius: 999px; white-space: nowrap;
}
.plan-step .jump:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.change-path {
  margin-top: 6px; border: 1px dashed var(--line); background: transparent; color: var(--primary);
  font-family: "Readex Pro", sans-serif; font-size: 14px; font-weight: 600; cursor: pointer;
  padding: 11px; border-radius: var(--radius-sm); width: 100%;
}
.change-path:hover { background: var(--surface-2); }

/* ---------- tracker ---------- */
.tracker-form {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-sm); margin-bottom: 16px;
}
.tf-row { margin-bottom: 14px; }
.tf-row > label { display: block; font-weight: 600; color: var(--primary-d); font-size: 14.5px; margin-bottom: 7px; }
.tf-date input {
  width: 100%; font-family: "Readex Pro", sans-serif; font-size: 15px; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 12px; background: var(--bg);
}
.counter { display: flex; align-items: center; gap: 10px; }
.counter .cbtn {
  width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--surface); color: var(--primary-d); font-size: 22px; cursor: pointer;
  display: grid; place-items: center; line-height: 1; font-family: "Readex Pro", sans-serif;
}
.counter .cbtn:hover { background: var(--primary-soft); border-color: var(--primary); }
.counter .cval { min-width: 44px; text-align: center; font-size: 20px; font-weight: 700; color: var(--ink); }
.counter .clab { color: var(--ink-soft); font-size: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-t {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
  border-radius: 999px; padding: 8px 14px; cursor: pointer; font-size: 14px;
  font-family: "Readex Pro", sans-serif; user-select: none; transition: all .14s;
}
.chip-t[aria-pressed="true"] { background: var(--primary); color: #fff; border-color: var(--primary); }
.chip-t.warn-chip[aria-pressed="true"] { background: var(--warn); border-color: var(--warn); }

.tf-note textarea {
  width: 100%; min-height: 64px; resize: vertical; font-family: "Readex Pro", sans-serif;
  font-size: 15px; color: var(--ink); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 11px 12px; background: var(--bg);
}
.save-log {
  width: 100%; border: 0; background: var(--primary); color: #fff; cursor: pointer;
  font-family: "Readex Pro", sans-serif; font-size: 16px; font-weight: 600;
  padding: 13px; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
}
.save-log:hover { background: var(--primary-d); }

/* analysis */
.analysis { margin: 4px 0 16px; }
.stat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 14px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 13px 10px; text-align: center; box-shadow: var(--shadow-sm);
}
.stat .v { font-family: "El Messiri", sans-serif; font-weight: 700; font-size: 24px; color: var(--primary-d); line-height: 1.1; }
.stat .l { color: var(--ink-soft); font-size: 12.5px; margin-top: 3px; }

.verdict {
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; border: 1px solid var(--line);
  box-shadow: var(--shadow-sm); display: flex; gap: 13px; align-items: flex-start;
}
.verdict .vi { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; }
.verdict .vi svg { width: 22px; height: 22px; }
.verdict b { display: block; font-size: 16px; margin-bottom: 3px; }
.verdict p { margin: 0; font-size: 14.5px; line-height: 1.7; }
.verdict.up    { background: var(--good-soft); border-color:#cfe0d8; }
.verdict.up .vi{ background:#fff; color:var(--good); } .verdict.up b{ color:var(--primary-d); } .verdict.up p{ color:var(--ink-soft); }
.verdict.flat  { background: var(--accent-soft); border-color:#eecfa8; }
.verdict.flat .vi{ background:#fff; color:var(--accent); } .verdict.flat b{ color:var(--accent); } .verdict.flat p{ color:var(--ink-soft); }
.verdict.down  { background: var(--warn-soft); border-color:#ecc9bc; }
.verdict.down .vi{ background:#fff; color:var(--warn); } .verdict.down b{ color:var(--warn); } .verdict.down p{ color:var(--ink-soft); }
.verdict.doc   { background: var(--warn-soft); border-color:#e0a58f; }
.verdict.doc .vi{ background:var(--warn); color:#fff; } .verdict.doc b{ color:var(--warn); } .verdict.doc p{ color:#7a3f2c; }
.verdict.none  { background: var(--surface-2); }
.verdict.none .vi{ background:#fff; color:var(--ink-soft); } .verdict.none b{ color:var(--primary-d); } .verdict.none p{ color:var(--ink-soft); }

/* chart */
.chart-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 16px 12px; box-shadow: var(--shadow-sm); margin-bottom: 14px;
}
.chart-card h3 { font-size: 16px; margin: 0 0 4px; }
.chart-legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--ink-soft); margin-bottom: 12px; }
.chart-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-inline-start: 5px; vertical-align: -1px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 128px; padding-top: 6px; }
.bar-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; height: 100%; }
.bar-stack { width: 100%; max-width: 26px; display: flex; flex-direction: column; justify-content: flex-end;
  border-radius: 6px 6px 3px 3px; overflow: hidden; background: var(--surface-2); flex: 1; }
.bar-win { background: var(--good); width: 100%; }
.bar-acc { background: var(--warn); width: 100%; opacity: .9; }
.bar-lab { font-size: 10.5px; color: var(--ink-soft); }

.log-tools { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.log-tools button {
  flex: 1; min-width: 130px; border: 1px solid var(--line); background: var(--surface); color: var(--primary-d);
  font-family: "Readex Pro", sans-serif; font-size: 14px; font-weight: 600; cursor: pointer;
  padding: 11px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; gap: 8px;
}
.log-tools button:hover { background: var(--primary-soft); border-color: var(--primary); }
.log-tools button svg { width: 17px; height: 17px; }
.log-tools .danger { color: var(--warn); }
.log-tools .danger:hover { background: var(--warn-soft); border-color: #e0a58f; }

/* log list */
.log-list { list-style: none; padding: 0; margin: 6px 0 0; }
.log-item {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 13px 15px; margin-bottom: 10px; box-shadow: var(--shadow-sm);
}
.log-item .lh { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.log-item .ld { font-weight: 700; color: var(--primary-d); font-size: 15px; }
.log-item .del {
  margin-inline-start: auto; border: 0; background: transparent; color: var(--warn); cursor: pointer;
  font-size: 13px; font-family: "Readex Pro", sans-serif; padding: 4px 8px; border-radius: 8px;
}
.log-item .del:hover { background: var(--warn-soft); }
.log-item .lstats { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; color: var(--ink-soft); }
.log-item .lstats .g { color: var(--good); font-weight: 600; }
.log-item .lstats .r { color: var(--warn); font-weight: 600; }
.log-item .lflag {
  display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--warn);
  background: var(--warn-soft); border: 1px solid #ecc9bc; padding: 3px 9px; border-radius: 999px;
}
.log-item .lnote { margin-top: 7px; font-size: 14px; color: var(--ink-soft); line-height: 1.6;
  border-top: 1px dashed var(--line); padding-top: 7px; }
.empty-log { text-align: center; color: var(--ink-soft); padding: 26px 16px; font-size: 14.5px; }

.toast {
  position: fixed; inset-inline: 0; bottom: 22px; margin: 0 auto; width: max-content; max-width: 90%;
  background: var(--primary-d); color: #fff; padding: 11px 18px; border-radius: 999px; z-index: 95;
  font-size: 14px; box-shadow: 0 10px 30px rgba(28,44,39,.35); opacity: 0; transform: translateY(10px);
  transition: opacity .25s, transform .25s; pointer-events: none;
}
.toast.show { opacity: 1; transform: none; }

.disclaimer {
  font-size: 12.5px; color: var(--ink-soft); background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 14px; margin-top: 14px; line-height: 1.7;
}
