/* ══ settings page — same evergreen identity, Claude-style cards ══ */
:root {
  --paper: #f1f0ec;
  --card: #faf9f6;
  --ink: #191919;
  --muted: #75716c;
  --line: #dddbd4;
  --accent: #1e6b52;
  --red: #b3402e;
  --serif: Georgia, 'Times New Roman', Times, serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 15px/1.6 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
.set-page { max-width: 720px; margin: 0 auto; padding: 10px 14px 30px; }

/* head: nav left, serif title centre */
.set-head { display: flex; align-items: center; gap: 10px; padding: 12px 2px; }
.set-icon {
  width: 38px; height: 38px; border-radius: 10px; color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
}
.set-icon:hover { background: #e7e5df; }
.set-icon .icon { width: 19px; height: 19px; }
.set-title { flex: 1; text-align: center; font-family: var(--serif); font-size: 19px; font-weight: 600; margin: 0; }
.set-pad { width: 38px; flex: none; }

/* cards */
.set-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin: 12px 0; overflow: hidden; }
.acct { display: flex; align-items: center; gap: 10px; padding: 15px 16px; }
.acct-mail { flex: 1; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge {
  background: var(--ink); color: #fff; font-size: 12px; font-weight: 700;
  border-radius: 999px; padding: 4px 12px; flex: none;
}

/* rows */
.rows { display: flex; flex-direction: column; }
.set-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: none; border: 0; border-top: 1px solid var(--line);
  padding: 14px 16px; cursor: pointer; font: inherit; color: var(--ink); text-align: left;
}
.set-row:first-child { border-top: 0; }
.set-row:hover { background: #f1efe9; }
.row-ic { color: var(--ink); display: inline-flex; }
.row-ic .icon { width: 19px; height: 19px; }
.row-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.row-label { font-size: 14.5px; font-weight: 500; }
.row-sub { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-chev { color: var(--muted); display: inline-flex; }
.row-chev .icon { width: 16px; height: 16px; }
.set-row.danger, .set-row.danger .row-ic { color: var(--red); }

.set-foot { color: var(--muted); font-size: 12px; text-align: center; margin: 18px 0 0; }

/* bottom sheets (effort + export pickers) */
.sheet-back {
  position: fixed; inset: 0; background: rgba(20, 22, 26, .4); z-index: 80;
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet-back[hidden] { display: none; }
.sheet {
  width: 100%; max-width: 560px; background: var(--paper);
  border-radius: 20px 20px 0 0; padding: 8px 14px 22px;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, .18);
}
.sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: #d4d4cf; margin: 6px auto 10px; }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 2px 2px 10px; }
.sheet-title { flex: 1; text-align: center; font-weight: 600; font-size: 14px; }
.sheet-pad { width: 30px; flex: none; }
.opt-list { display: flex; flex-direction: column; background: var(--card); border-radius: 14px; overflow: hidden; }
.opt-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: 0; border-top: 1px solid var(--line); background: none;
  padding: 12px 14px; cursor: pointer; font: inherit; color: var(--ink); text-align: left;
}
.opt-row:first-child { border-top: 0; }
.opt-row:hover { background: #f1efe9; }
.opt-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.opt-label { font-weight: 600; font-size: 14px; }
.opt-sub { color: var(--muted); font-size: 12px; }
.opt-check { color: var(--accent); opacity: 0; font-weight: 700; }
.opt-row.on .opt-check { opacity: 1; }
.opt-row.on .opt-label { color: var(--accent); }

/* switches, toast, static rows (2026-09-07 completion) */
a.set-row { text-decoration: none; color: var(--ink); display: flex; }
.set-row.still { cursor: default; }
.set-row.still:hover { background: none; }
.switch {
  width: 46px; height: 28px; border-radius: 999px; border: 0; cursor: pointer;
  background: #cfceca; position: relative; flex: none; padding: 0;
}
.switch .knob {
  position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; transition: left .18s ease; box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.switch.on { background: var(--accent); }
.switch.on .knob { left: 21px; }
.opt-row.still { cursor: default; }
.opt-row.still:hover { background: none; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: #17181a; color: #fff; font-size: 13px; border-radius: 999px;
  padding: 9px 16px; z-index: 120; box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
  max-width: 86vw; text-align: center;
}
.toast[hidden] { display: none; }
body.font-system { --serif: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
