@font-face {
  font-family: "Heebo";
  src: url("fonts/Heebo-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f5f7ff;
  --text: #080d17;
  --primary: #2962ec;
  --accent: #6b95ff;
  --card: #ffffff;
  --line: rgba(8, 13, 23, 0.08);
  --line-strong: rgba(8, 13, 23, 0.14);
  --muted: #3d4c66;
  --good: #04693d;
  --good-bg: #e7f6ee;
  --bad: #9f1c1c;
  --bad-bg: #fdecec;
  --wait: #8a5a00;
  --wait-bg: #fff6e0;
  --surface: #ffffff;
  --text-2: #4a5670;
  --text-3: #6b7690;
  --primary-soft: #eef3ff;
  --shadow: none;
  --shadow-pop: 0 8px 24px rgba(8, 13, 23, 0.08);
  --radius: 12px;
  --r-sm: 10px;
  --r-md: 12px;
  --r-lg: 16px;
  --radius-lg: 16px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --tap: 44px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
}
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Heebo", "Arial Hebrew", "Noto Sans Hebrew", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
a { color: var(--primary); text-decoration: none; }
button, input, textarea, select { font-family: inherit; color: inherit; }
.hidden { display: none !important; }
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.app {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100vh;
}

.side {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: var(--space-5) var(--space-4);
  background: #ffffff;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.brand { display: flex; gap: 10px; align-items: center; padding: 0 6px; }
.logo {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--primary);
  flex: none;
}
.brand strong { display: block; font-size: 15px; letter-spacing: -0.02em; }
.brand span, .side-foot span { color: var(--muted); font-size: 13px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a, .tabbar a, .btn, .level-opt span, .foot-link {
  min-height: var(--tap);
}
.nav a {
  display: flex; align-items: center; gap: 10px;
  color: var(--text); padding: 0 12px; border-radius: 12px;
  font-weight: 550;
}
.nav a svg, .tabbar a svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; flex: none; }
.nav a.active { background: #e8eeff; color: var(--primary); }
.nav a .badge, .tabbar a .badge {
  margin-inline-start: auto;
  background: var(--primary);
  color: #ffffff;
  border-radius: 999px;
  min-width: 22px;
  text-align: center;
  font-size: 13px;
  padding: 1px 7px;
}
.side-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.menu-btn { display: none; }
.side-foot { margin-top: auto; padding: 12px 8px; color: var(--muted); font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.side-foot strong { color: var(--text); font-size: 15px; }
.foot-link { display: inline-flex; align-items: center; color: var(--primary); font-weight: 650; }
.logout {
  margin-top: 4px; background: transparent; border: 0; color: var(--primary);
  padding: 0; cursor: pointer; font-size: 15px; font-weight: 650; min-height: var(--tap); text-align: start;
}
.mobile-bar { display: none; }
.mobile-logout { display: none; margin: 0; }
.mobile-logout .logout { margin: 0; white-space: nowrap; min-height: var(--tap); }
.pending-count { text-decoration: none; }
.tabbar { display: none; }

.doc, .invite-card textarea, .token-card textarea, .login-card textarea {
  color: #0c1424;
}
.doc {
  white-space: pre-wrap;
  background: #f7f9ff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin: 12px 0;
}
input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: 16px;
  min-height: 44px;
}
input:not([type=checkbox]):not([type=radio]):not([type=hidden]):focus, select:focus, textarea:focus {
  outline: 3px solid rgba(107, 149, 255, 0.35);
  outline-offset: 0;
}
textarea { min-height: 96px; resize: vertical; }

.main { padding: var(--space-6) 36px 56px; min-width: 0; }
.top {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: var(--space-5); margin-bottom: var(--space-5);
}
.hello, h1 {
  margin: 0;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.date, .lead { margin: 6px 0 0; color: var(--muted); font-size: 16px; }
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.top-tools { display: flex; align-items: center; gap: 12px; }
.search {
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 4px 14px;
  min-width: min(340px, 46vw);
  min-height: var(--tap);
  display: flex; align-items: center; gap: 8px;
}
.search input {
  background: transparent; border: 0; outline: none; width: 100%;
  min-height: 36px; padding: 0; font-size: 15px;
}
.search svg { width: 16px; height: 16px; stroke: var(--muted); fill: none; }
.me {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: #e8eeff; color: var(--primary); font-weight: 700;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 18px 18px 16px;
  color: var(--text);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  min-height: 118px;
}
.stat strong { font-size: 34px; letter-spacing: -0.04em; line-height: 1; }
.stat span { color: var(--muted); font-size: 14px; }
.stat:hover { border-color: var(--accent); }

.quiet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); margin-top: var(--space-4); }
.stack { display: flex; flex-direction: column; gap: var(--space-3); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 8px 18px 12px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 0 4px; }
.card-h h2, .card h2 { margin: 0; font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-h h2 svg { width: 18px; height: 18px; stroke: var(--primary); fill: none; }
.pill, .chip {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 650;
  background: #e8eeff; color: #1d4ed0;
}
.pill.muted, .chip.off { background: #eef1f7; color: var(--muted); }
.chip.ok { background: var(--good-bg); color: var(--good); }
.chip.wait { background: var(--wait-bg); color: var(--wait); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }

.approval {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 4px; border-top: 1px solid var(--line);
}
.who { display: flex; gap: 12px; align-items: center; min-width: 0; max-width: 100%; }
.who > div { min-width: 0; flex: 1 1 auto; max-width: 100%; }
.who strong, .clip {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}
.who strong { font-size: 16px; font-weight: 650; }
.who p { margin: 2px 0 0; color: var(--muted); font-size: 14px; overflow-wrap: break-word; }
a.approval { color: inherit; text-decoration: none; border-radius: 14px; min-width: 0; max-width: 100%; }
a.approval:hover { background: #f4f7ff; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 700; color: white;
}
.row-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.row-actions form { margin: 0; }

.btn {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  background: #eef2fb;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn.primary { background: var(--primary); color: #ffffff; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: #ffffff; border-color: var(--line-strong); color: var(--text); }
.btn.link { background: transparent; color: var(--primary); padding-inline: 6px; border: 0; }
.btn.link.nowrap, .amount, .when, .badge {
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}
.btn.big { min-height: 52px; height: auto; border-radius: 14px; font-size: 17px; padding-inline: 18px; }
.btn.danger { background: #ffffff; color: var(--bad); border-color: #f0c2c2; }

.brief { padding-bottom: 16px; }
.brief-body h3 { margin: 14px 0 6px; font-size: 16px; }
.brief-body p { margin: 0 0 6px; color: var(--text); font-size: 15px; }
.brief-body .bullet { padding-inline-start: 2px; }
.meta, .hint { color: var(--muted); font-size: 14px; }
.hint { margin: 4px 0 10px; }

.skill, .person, .log {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 2px; border-top: 1px solid var(--line);
}
.skill div, .person div, .log div { min-width: 0; }
.skill p, .person p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.tag, .untrusted {
  flex: none; font-size: 13px; font-weight: 700; border-radius: 999px;
  padding: 3px 8px; background: #e8eeff; color: #1d4ed0;
}
.untrusted {
  display: inline-block;
  margin-inline-end: 6px;
  color: #8a5a00;
  background: var(--wait-bg);
  border: 1px solid #f0ddb0;
  vertical-align: middle;
}
.tag.sales { background: var(--good-bg); color: var(--good); }
.tag.marketing { background: #f3eaff; color: #6d28d9; }
.tag.finance, .tag.claude { background: var(--bad-bg); color: var(--bad); }
.tag.shared { background: #e8eeff; color: #1d4ed0; }

.bars { display: flex; flex-direction: column; gap: 8px; padding: 8px 0 4px; }
.bar-row { display: grid; grid-template-columns: 88px 1fr 28px; gap: 8px; align-items: center; font-size: 13px; }
.track { height: 8px; border-radius: 99px; background: #e7ecf8; overflow: hidden; }
.track span { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.log { font-size: 14px; }
.log .when { color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.log .status { margin-inline-start: auto; font-size: 13px; font-weight: 700; }
.log .status.ok { color: var(--good); }
.log .status.denied, .log .status.error { color: var(--bad); }
.log .path { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.notice {
  background: var(--good-bg); color: var(--good);
  border: 1px solid #b7e4cc;
  border-radius: 12px; padding: 12px 14px; margin-bottom: 14px;
}
.notice.reject { background: var(--bad-bg); color: var(--bad); border-color: #f3c7c7; }
.empty { color: var(--muted); padding: 14px 2px 16px; }
.empty-state {
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  padding: 18px 4px 16px;
}
.empty-state p { margin: 0; color: var(--text); }

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card {
  width: min(440px, 100%);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px 28px;
  box-shadow: var(--shadow);
}
.login-card h1 { margin: 14px 0 6px; font-size: 32px; }
.login-card p { color: var(--muted); margin: 0 0 18px; }
.login-card label, .field { display: block; font-size: 14px; font-weight: 700; margin: 14px 0 6px; }
.login-card .btn { width: 100%; min-height: 48px; font-size: 16px; }
.error { color: var(--bad); background: var(--bad-bg); border-radius: 10px; padding: 8px 10px; margin-bottom: 12px; }
.fine { margin-top: 16px; color: var(--muted); font-size: 13px; }

.sheet-wrap { min-width: 0; }
.sheet {
  width: min(640px, 100%);
  margin: 0 auto;
  min-width: 0;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 22px 18px;
  box-shadow: var(--shadow);
}
.sheet-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; }
.kicker { color: var(--muted); font-size: 13px; }
.person-line { display: flex; gap: 12px; align-items: center; margin-top: 16px; }
.headline {
  margin: 16px 0 8px;
  font-size: 28px;
  font-weight: 700;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.long-copy {
  max-height: 9rem;
  overflow: auto;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.request-card {
  margin: 12px 0;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: #f7f9ff;
  border: 1px solid var(--line);
}
.request-card,
.request-card strong,
.request-card p,
.kv,
.kv strong,
.insight,
.brief-body,
.brief-body p,
pre,
.doc,
.headline,
.approval,
.cap-row,
.cap-row strong,
.notice,
.person-card,
.log {
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
  max-width: 100%;
}
.kv strong { white-space: normal; text-align: start; }
.request-card strong { display: block; margin-bottom: 6px; font-size: 16px; }
.wizard-pane { display: none; }
.wizard-pane.on { display: block; }
.short-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.short-form select, .short-form input { min-width: 12rem; }
.amount { margin: 8px 0 0; font-size: 40px; font-weight: 750; letter-spacing: -0.04em; }
.amount small { font-size: 15px; font-weight: 500; color: var(--muted); margin-inline-start: 6px; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.kv span { color: var(--muted); }
.kv strong { font-weight: 650; }
.insight {
  margin-top: 14px; background: #f7f9ff; border-radius: var(--radius-lg); padding: 12px 14px;
  color: var(--text); display: flex; gap: 8px; font-size: 15px; border: 1px solid var(--line);
}
.filelink { display: inline-flex; align-items: center; min-height: var(--tap); margin: 8px 0; font-weight: 700; }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.sheet-actions .btn { width: 100%; }
.sheet-actions .btn.ghost { color: var(--bad); border-color: #f0c2c2; background: #fff; }
.reason {
  width: 100%;
  margin: 8px 0;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 12px;
}
.back { color: var(--muted); font-size: 14px; font-weight: 650; display: inline-flex; align-items: center; min-height: 32px; }

.file-page { max-width: 860px; margin: 0 auto; padding: 28px 18px 48px; }
.file-page pre {
  white-space: pre-wrap; background: #ffffff; border: 1px solid var(--line);
  border-radius: 18px; padding: 18px; line-height: 1.6;
}

.manage { max-width: 880px; margin: 0 auto; }
.manage-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 8px; }
.manage-top h1 { flex: 1; }
.private-note {
  background: #f4f7ff;
  border: 1px solid #d5e0fb;
  color: var(--text);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 0 0 var(--space-4);
}
.form-card { padding: 8px 18px 22px; }
fieldset.perm {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin: 16px 0;
  padding: 12px 14px 16px;
}
fieldset.perm h3 { margin: 12px 0 8px; font-size: 15px; color: var(--primary); }
legend { padding: 0 6px; font-weight: 700; }
.preset-row, .checks { display: flex; flex-direction: column; gap: 8px; }
.radio, .check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #f7f9ff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}
.check { justify-content: space-between; align-items: center; }
.radio small, .check small { display: block; color: var(--muted); font-size: 13px; font-weight: 400; }
.write-flag {
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  flex: none;
}
.person-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px 16px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow);
}
.person-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.person-actions form, .more-actions form { margin: 0; }
.more-actions { position: relative; }
.more-actions summary {
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  color: var(--primary);
  font-weight: 700;
  list-style: none;
}
.more-actions summary::-webkit-details-marker { display: none; }
.more-actions[open] {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.remove-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.confirm { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 14px; min-height: var(--tap); }
.danger-card { margin-top: 14px; padding: 16px 18px 18px; }
.danger-card h2 { margin: 12px 0 6px; font-size: 18px; }
.token-card { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; }
.token-card textarea, .invite-card textarea, .login-card textarea {
  width: 100%;
  margin: 8px 0 12px;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 12px;
  direction: ltr;
  text-align: left;
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 14px;
}
.form-card .btn.big { width: 100%; margin-top: 8px; }
.template-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.template-card {
  display: flex; flex-direction: column; gap: 6px;
  background: #ffffff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 18px; color: var(--text); min-height: 120px;
  box-shadow: var(--shadow);
}
.template-card:hover { border-color: var(--accent); }
.template-card span { color: var(--muted); font-size: 14px; }
.cap-row {
  display: grid; gap: 10px; padding: 14px 0;
  border-top: 1px solid var(--line);
}
.cap-row small { display: block; color: var(--muted); font-weight: 400; font-size: 13px; margin-top: 2px; }
.level {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  background: #eef2fb;
  border-radius: 12px;
  padding: 4px;
}
.level-opt { position: relative; flex: 1 1 0; }
.level-opt input { position: absolute; opacity: 0; }
.level-opt span {
  display: flex; align-items: center; justify-content: center;
  width: 100%;
  min-height: var(--tap);
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  text-align: center;
}
.level-opt input:checked + span {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}
.level-opt input:focus-visible + span { outline: 3px solid var(--primary); outline-offset: 2px; }
.invite-card h2 { font-size: 18px; margin: 16px 0 4px; }
.tech {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.tech summary { cursor: pointer; color: var(--primary); font-weight: 700; min-height: var(--tap); display: flex; align-items: center; }
.steps {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 auto var(--space-5);
  padding: 0;
  list-style: none;
}
.steps li {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--muted);
  font-size: 14px;
  background: #ffffff;
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
}
.steps li.on { background: var(--primary); color: #ffffff; border-color: var(--primary); }
.wizard { max-width: 760px; }
.summary-box {
  margin-top: 8px;
  background: #f7f9ff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
}
.summary-box h2 { margin: 0 0 8px; font-size: 18px; }
.summary-box ul { margin: 4px 0 12px; padding-inline-start: 18px; }
.summary-box li { margin: 2px 0; }
.perm-group {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 4px 14px;
  margin: 10px 0;
  background: #fbfcff;
}
.perm-group summary {
  cursor: pointer;
  font-weight: 700;
  min-height: 48px;
  display: flex;
  align-items: center;
}
.perm-group h3 { margin: 8px 0; font-size: 14px; color: var(--primary); }
.steps-list { margin: 8px 0 16px; padding-inline-start: 18px; }
.steps-list li { margin: 6px 0; }

@media (max-width: 1100px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .quiet-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 6;
  }
  .mobile-logout { display: inline-flex; }
  .main { padding: 18px 16px calc(64px + 24px + env(safe-area-inset-bottom)); }
  .top, .page-head { flex-direction: column; align-items: stretch; }
  .hello, h1 { font-size: 28px; }
  .search { min-width: 0; width: 100%; }
  .stats { grid-template-columns: 1fr 1fr; }
  .approval { align-items: flex-start; }
  .person-card { grid-template-columns: 1fr; }
  .person-actions { width: 100%; justify-content: flex-start; }
  .person-actions .btn, .person-actions a.btn { min-width: 44px; }
  .sheet { width: 100%; }
  .manage-top h1 { font-size: 28px; width: 100%; }
  .manage-top .btn, .page-head .btn { width: 100%; }
  .check { grid-template-columns: 1fr; }
  .template-grid { grid-template-columns: 1fr; }
  .level { flex-direction: column; }
  .sheet-actions {
    position: sticky;
    bottom: 76px;
    z-index: 4;
    background: #ffffff;
    padding: 10px 0 4px;
  }
  .tabbar {
    display: flex;
    position: fixed;
    bottom: 0;
    inset-inline: 0;
    z-index: 8;
    background: #ffffff;
    border-top: 1px solid var(--line);
    padding: 4px 4px calc(6px + env(safe-area-inset-bottom));
    justify-content: space-around;
  }
  .tabbar a {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
    border-radius: 12px;
    position: relative;
    padding: 4px 2px;
  }
  .tabbar a.active { color: var(--primary); background: #eef3ff; }
  .tabbar a .badge {
    position: absolute;
    top: 2px;
    inset-inline-start: calc(50% + 6px);
    margin: 0;
    min-width: 18px;
    font-size: 13px;
  }
  .chat-bar, .sticky-ask { position: sticky; bottom: calc(64px + env(safe-area-inset-bottom)); }
}

.avatar { background: #d5def7 !important; color: var(--text); }
.home-col { max-width: 720px; display: flex; flex-direction: column; gap: 16px; }
.home-col h1 .dot { color: var(--primary); }
.chat-row { display: flex; gap: 8px; align-items: center; }
.chat-row input { flex: 1; }
.chat-row .btn, .chat-row .btn.primary { width: auto; min-width: 88px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips form { display: inline-flex; margin: 0 0 8px 8px; }
.chip-btn, .quiet {
  background: transparent;
  border: 0;
  color: var(--primary);
  font-weight: 600;
  font-size: 14px;
  min-height: 44px;
  cursor: pointer;
  padding: 0 8px;
}
.next-card { background: var(--primary-soft); border-color: rgba(41, 98, 236, 0.18); border-radius: var(--r-lg); }
.progress { height: 8px; background: rgba(8, 13, 23, 0.08); border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--accent); }
.demo-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #fff6e0;
  color: #8a5a00;
  font-size: 13px;
  font-weight: 600;
}
.chat-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; max-width: 1040px; }
.bubble { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; margin-bottom: 12px; }
.skill-grid, .quiet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.more-list { display: flex; flex-direction: column; gap: 8px; }
.more-list a { min-height: 44px; display: flex; align-items: center; font-weight: 600; }
.start-list li.done { color: var(--text-2); }
label.field { display: block; font-size: 13px; font-weight: 500; color: var(--text-2); margin-top: 12px; }
@media (max-width: 860px) {
  .chat-layout, .skill-grid { grid-template-columns: 1fr; }
  .hello, h1 { font-size: 26px; line-height: 34px; }
}
