
@font-face { font-family: Vazirmatn; font-style: normal; font-weight: 400; font-display: swap;
  src: url(./fonts/vazirmatn-400.woff) format('woff') }
@font-face { font-family: Vazirmatn; font-style: normal; font-weight: 500; font-display: swap;
  src: url(./fonts/vazirmatn-500.woff) format('woff') }
@font-face { font-family: Vazirmatn; font-style: normal; font-weight: 800; font-display: swap;
  src: url(./fonts/vazirmatn-800.woff) format('woff') }
[hidden] { display: none !important }
:root {
  --topbar-h: 62px;
  --tabbar-h: 66px;
  --tabbar-space: var(--tabbar-h);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-start: env(safe-area-inset-left, 0px);
  --safe-end: env(safe-area-inset-right, 0px);
  --kb: 0px;
  --edactions-h: 0px;
  --eddock-h: 0px;
  --t-cap: 12px;
  --t-body: 14.5px;
  --t-lead: 16.5px;
  --t-h3: 15px;
  --t-h2: 18px;
  --t-display: clamp(21px, 3.4vw, 26px);
  --s1: 6px; --s2: 10px; --s3: 14px; --s4: 18px; --s5: 24px; --s6: 34px; --s7: 52px;
  --lift: 0 1px 2px rgba(40, 35, 24, .05), 0 6px 18px rgba(40, 35, 24, .05);
  --lift-in: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --lift: 0 1px 2px rgba(0, 0, 0, .34), 0 10px 26px rgba(0, 0, 0, .28);
    --lift-in: inset 0 1px 0 rgba(255, 255, 255, .045);
  }
}
:root[data-theme="dark"] {
  --lift: 0 1px 2px rgba(0, 0, 0, .34), 0 10px 26px rgba(0, 0, 0, .28);
  --lift-in: inset 0 1px 0 rgba(255, 255, 255, .045);
}
* { box-sizing: border-box }
html, body { height: 100% }
body {
  margin: 0;
  background: var(--screen-bg);
  color: var(--text-body);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important }
}
h1, h2, h3 { margin: 0; color: var(--text-high); font-weight: 800; line-height: 1.3; text-wrap: balance }
p { margin: 0 }
button { font-family: inherit }
:where(button, a, input, label, [tabindex]):focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px;
}
.shell { display: grid; min-height: 100dvh; grid-template-columns: 212px minmax(0, 1fr) 320px }
@media (max-width: 1200px) { .shell { grid-template-columns: 66px minmax(0, 1fr) } }
@media (max-width: 760px) { .shell { grid-template-columns: minmax(0, 1fr) } }
.rail {
  background: var(--menu-surface); border-inline-end: 1px solid var(--hairline);
  padding: 16px 12px; display: flex; flex-direction: column; gap: 3px;
  position: sticky; top: 0; height: 100dvh; padding-block-start: calc(16px + var(--safe-top));
}
.rail-head { display: flex; align-items: center; gap: 10px; padding: 6px 8px 16px }
.rail-head svg { width: 24px; height: 24px; color: var(--gold); flex: none }
.rail-title { font-weight: 800; color: var(--text-high); font-size: 16px }
.rail-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 11px;
  border: 0; background: none; cursor: pointer; color: var(--text-muted); font-size: 14px;
  width: 100%; text-align: start; transition: background .15s, color .15s;
}
.rail-item svg { width: 19px; height: 19px; flex: none }
.rail-item:hover { background: var(--elevated); color: var(--text-high) }
.rail-item[aria-current="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 800 }
.rail-sep { height: 1px; background: var(--hairline); margin: 11px 6px }
.rail-status { display: flex; align-items: center; gap: 7px; margin-block: auto var(--s1); padding-inline: 11px; font-size: 12px; font-weight: 600; color: var(--text-muted) }
.rail-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; flex: none; background: var(--green) }
.rail-status.attention::before { background: var(--gold) }
.rail-status.risk::before { background: var(--danger) }
.rail-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; background: var(--gold) }
.rail-dot.risk { background: var(--danger) }
.buildline {
  margin-block: var(--s4) var(--s2); text-align: center; font-size: var(--t-cap); color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.buildline bdi { user-select: all }
@media (max-width: 1200px) {
  .rail-label, .rail-title, .rail-status { display: none }
  .rail-item { justify-content: center; padding-inline: 0 }
  .rail-head { justify-content: center }
}
.main { min-width: 0; display: flex; flex-direction: column }
@media (min-width: 1201px) {
  .main.split {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    grid-template-rows: auto minmax(0, 1fr);
    align-items: start;
  }
  .main.split > .topbar { grid-column: 1 / -1 }
  .main.split > .body { overflow-y: auto; max-block-size: calc(100dvh - var(--topbar-h, 0px)) }
  .main.split > .body:first-of-type { border-inline-end: 1px solid var(--hairline) }
  .main.split > .body .searchrow { top: -20px; padding-block-start: 20px; margin-block-start: -20px }
  .main.split > .body > * + .searchrow { margin-block-start: -16px }
}
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: calc(14px + var(--safe-top)) 20px 14px;
  border-block-end: 1px solid var(--hairline); position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--screen-bg) 90%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.topbar h2 { font-size: var(--t-h2) }
.topbar .sub { font-size: var(--t-cap); color: var(--text-muted); font-variant-numeric: tabular-nums }
.topbar-title { min-inline-size: 0 }
.grow { flex: 1 }
.acct { position: relative; display: flex; flex: none }
.acctbtn {
  display: inline-flex; align-items: center; gap: 8px; min-block-size: 40px;
  max-inline-size: 230px; padding-block: 5px; padding-inline: 5px 12px;
  border: 1px solid var(--hairline); border-radius: 999px; background: var(--card-surface);
  color: var(--text-body); font: inherit; font-size: var(--t-cap); cursor: pointer;
}
.acctbtn.out { padding-inline: 14px }
.acctbtn:hover { border-color: var(--accent); color: var(--text-high) }
.acctbtn svg { inline-size: 18px; block-size: 18px; flex: none }
.acctlabel { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.acctlabel.mail, .acctmail { unicode-bidi: isolate }
.avatar {
  inline-size: 28px; block-size: 28px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 13px; font-weight: 800;
  background: var(--accent); color: var(--on-accent);
}
.avatar.big { inline-size: 40px; block-size: 40px; font-size: 17px }
.avatar.face { object-fit: cover; background: var(--elevated) }
.acctscrim { position: fixed; inset: 0; z-index: 40 }
.acctmenu {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 41;
  inline-size: 262px; padding: 10px; border-radius: 16px;
  border: 1px solid var(--hairline); background: var(--menu-surface);
  box-shadow: var(--lift); display: flex; flex-direction: column; gap: 2px;
}
.acctwho {
  display: flex; align-items: center; gap: 10px; padding: 4px 6px 12px;
  border-block-end: 1px solid var(--hairline); margin-block-end: 6px;
}
.acctident { min-inline-size: 0 }
.acctmail {
  font-size: 13px; font-weight: 700; color: var(--text-high);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.acctrow {
  display: flex; align-items: center; gap: 10px; inline-size: 100%; min-block-size: 44px;
  padding: 10px; border: 0; border-radius: 12px; background: transparent;
  color: var(--text-body); font: inherit; font-size: var(--t-body); text-align: start; cursor: pointer;
}
.acctrow:hover { background: var(--elevated); color: var(--text-high) }
.acctrow svg { inline-size: 18px; block-size: 18px; flex: none; color: var(--text-muted) }
@media (max-width: 560px) {
  .acctbtn:not(.out) { max-inline-size: none; padding-inline: 5px }
  .acctbtn:not(.out) .acctlabel { display: none }
}
.body { padding: 20px; display: flex; flex-direction: column; gap: 16px }
@media (max-width: 760px) {
  .body { padding: 16px 14px calc(var(--tabbar-space) + 24px + 56px) }
}
@media (min-width: 761px) and (max-width: 1200px) {
  .body { padding-block-end: calc(24px + var(--safe-bottom) + 56px + 20px) }
}
.ctx {
  border-inline-start: 1px solid var(--hairline); background: var(--menu-surface);
  padding: calc(18px + var(--safe-top)) 16px 18px; display: flex; flex-direction: column; gap: 14px;
  position: sticky; top: 0; height: 100dvh; overflow: auto;
}
.ctx h4 { font-size: var(--t-cap); color: var(--text-muted); font-weight: 800; margin-block-end: var(--s2) }
.tabbar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px;
  padding: 8px 8px calc(8px + var(--safe-bottom));
  padding-left: max(8px, var(--safe-start)); padding-right: max(8px, var(--safe-end));
  background: var(--menu-surface); border-block-start: 1px solid var(--hairline);
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 2px;
  border: 0; background: none; cursor: pointer; color: var(--text-muted); font-size: 10.5px;
  border-radius: 12px;
}
.tab svg { width: 20px; height: 20px }
.tab[aria-current="true"] { color: var(--accent) }
.card {
  background: var(--card-surface); border: 1px solid var(--hairline);
  border-radius: var(--r-lg); padding: var(--s4);
  box-shadow: var(--lift-in), var(--lift);
}
.card.lead {
  padding: var(--s5); border-radius: calc(var(--r-lg) + 4px);
  background: radial-gradient(120% 150% at 100% 0%, var(--gold-soft), transparent 58%), var(--card-surface);
}
.card.quiet { background: none; border: 0; border-radius: 0; padding: 0; box-shadow: none }
.card-h { display: flex; align-items: center; gap: var(--s2); margin-block-end: var(--s3) }
.card-h h3 { font-size: var(--t-h3) }
.mini { font-size: var(--t-cap); color: var(--text-muted) }
.num { font-variant-numeric: tabular-nums }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 13px; border: 1px solid var(--hairline); cursor: pointer;
  background: var(--card-surface); color: var(--text-high);
  font-size: var(--t-body); font-weight: 800; text-decoration: none;
  white-space: nowrap; flex: none;
}
.btn[disabled] { opacity: .5; cursor: not-allowed }
.btn svg { inline-size: 16px; block-size: 16px; flex: none }
.btn.small svg { inline-size: 15px; block-size: 15px }
.btn-a { background: linear-gradient(140deg, var(--accent-gradient-start), var(--accent-gradient-end)); color: var(--on-accent); border-color: transparent }
.btn-g { background: var(--card-surface); color: var(--text-high); border-color: var(--hairline) }
.btn-g:hover:not([disabled]) { border-color: var(--gold); color: var(--gold) }
.iconbtn {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px;
  border: 1px solid var(--hairline); background: var(--card-surface); color: var(--text-body); cursor: pointer;
}
.iconbtn:hover { border-color: var(--gold); color: var(--gold) }
.iconbtn svg { width: 17px; height: 17px }
.btn.small { padding: 7px 14px; font-size: 13px; border-radius: 10px }
.btn-danger { background: var(--card-surface); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent) }
.btn-danger:hover:not([disabled]) { background: color-mix(in srgb, var(--danger) 12%, transparent); border-color: var(--danger) }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: var(--t-cap); background: var(--elevated); color: var(--text-muted) }
.pill.g { background: var(--gold-soft); color: var(--gold) }
.pill.a { background: var(--accent-soft); color: var(--accent) }
.pill.ok { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green) }
button.pill { border: 1px solid transparent; cursor: pointer; font: inherit; font-size: var(--t-cap) }
button.pill:hover { border-color: currentColor }
button.pill.on { background: var(--accent); color: var(--on-accent) }
.chiprow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-block: 2px 14px }
.chip {
  padding: 7px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 700; cursor: pointer;
  background: var(--card-surface); color: var(--text-body); border: 1px solid var(--hairline);
}
.chip:hover { border-color: var(--gold); color: var(--gold) }
.chip.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent) }
.star, .entrymore {
  align-self: flex-start; flex: none;
  display: grid; place-items: center;
  inline-size: 30px; block-size: 30px; padding: 0; border: 0; border-radius: 9px;
  background: none; color: var(--text-faint); font-size: 19px; line-height: 1; cursor: pointer;
}
.entrymore:hover { color: var(--text-high) }
.star:hover { color: var(--gold) }
.star.on { color: var(--gold) }
.entry.trashed { opacity: .82 }
.entry.trashed .entry-title { text-decoration: line-through; text-decoration-color: var(--text-faint) }
.entry.checkin {
  display: flex; align-items: center; gap: 10px;
  padding-block: 8px; padding-inline: 13px 6px; background: transparent;
  --checkin-ink: var(--mood-mid);
}
.entry.checkin[data-tone="high"], .checkin-sum[data-tone="high"] { --checkin-ink: var(--mood-high) }
.entry.checkin[data-tone="low"], .checkin-sum[data-tone="low"] { --checkin-ink: var(--mood-low) }
.entry.checkin .entry-mood {
  inline-size: 30px; block-size: 30px; border-radius: 50%;
  background: color-mix(in srgb, var(--checkin-ink) 18%, transparent);
}
.entry.checkin:not([data-tone]) .entry-mood { background: transparent }
.entry.checkin .grow { min-inline-size: 0 }
.checkin-line { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; row-gap: 0 }
.checkin-mood {
  min-inline-size: 0; max-inline-size: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 13px; font-weight: 800;
  color: color-mix(in srgb, var(--checkin-ink) 75%, var(--text-high));
}
.entry.checkin:not([data-tone]) .checkin-mood { color: var(--text-muted) }
.checkin-pin { flex: none; font-size: 11px; line-height: 1; color: var(--gold) }
.checkin-time { flex: none; white-space: nowrap; font-size: 11px; font-weight: 700; color: var(--text-faint) }
.checkin-acts {
  font-size: 11px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.entry.checkin .entrymore { align-self: center }
.checkin-sum {
  --checkin-ink: var(--mood-mid);
  display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 12px; row-gap: 2px;
  margin-block: 2px 4px;
}
.checkin-sum .checkin-mood { font-size: 15px; white-space: normal }
.checkin-sum:not([data-tone]) .checkin-mood { color: var(--text-muted) }
.checkin-sum .checkin-acts { font-size: 13px; white-space: normal; overflow: visible }
.hero .date { font-size: var(--t-display); font-weight: 800; color: var(--text-high); line-height: 1.35 }
.hero .alt { font-size: var(--t-cap); color: var(--text-muted); margin-block-start: 3px }
.hero .heroocc { font-size: var(--t-cap); color: var(--gold); margin-block-start: var(--s2) }
.hero-row { display: flex; flex-wrap: wrap; gap: 9px; margin-block-start: var(--s4) }
.week {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  margin-block: var(--s5) var(--s1); padding-block: 4px;
}
.week::before {
  content: ""; position: absolute; inset-inline: 10px; inset-block-start: 12px; block-size: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--gold) 60%, transparent), transparent);
}
.wday { position: relative; z-index: 1; display: grid; justify-items: center; gap: 7px }
.wday i {
  inline-size: 11px; block-size: 11px; border-radius: 999px; display: block;
  background: var(--elevated); box-shadow: 0 0 0 4px var(--card-surface);
}
.wday.has i { background: var(--gold) }
.wday.now i { background: var(--card-surface); box-shadow: 0 0 0 2px var(--accent), 0 0 0 6px var(--card-surface) }
.wday span { font-size: 10.5px; color: var(--text-muted) }
.wday.now span { color: var(--accent); font-weight: 800 }
.stats { display: grid; gap: 2px; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)) }
.stat { background: var(--card-surface); border: 1px solid var(--hairline); border-radius: var(--r-md); padding: 14px }
.stat.quiet { background: none; border: 0; padding: 8px 4px; text-align: center }
.stat .v { font-size: 23px; font-weight: 800; color: var(--text-high); font-variant-numeric: tabular-nums; line-height: 1.25 }
.stat .k { font-size: 11.5px; color: var(--text-muted); margin-block-start: 3px }
.statline {
  text-align: center; font-size: var(--t-cap); color: var(--gold);
  margin-block-start: var(--s2); padding-block-start: var(--s2);
  border-block-start: 1px solid var(--hairline);
}
.card.reward { border-inline-start: 3px solid var(--gold) }
.card.handback { border-inline-start: 3px solid var(--accent) }
.card.pledge .rewardfacts { margin-block-start: 8px }
.card.pledge .passfield { margin-block-start: 10px }
.tl-milestone {
  text-align: center; font-size: var(--t-cap); color: var(--gold);
  padding-block: 10px; letter-spacing: .02em;
}
.insightsoon { margin-block-start: 10px; text-align: center }
.card.handback .tl-item { margin-block-start: 8px }
.rewardfacts {
  font-size: var(--t-body); color: var(--text-high);
  font-variant-numeric: tabular-nums; margin-block-start: 4px;
}
.rewardbadge { color: var(--gold); font-weight: 700; margin-block-start: 6px }
.kbdkeys { display: inline-flex; gap: 4px; align-items: center; flex: none }
.kbdor { color: var(--text-muted); padding-inline: 2px }
.ed-slash {
  position: absolute; inset-block-start: 100%; inset-inline-start: 0; z-index: 30;
  min-inline-size: 180px; max-block-size: 44vh; overflow-y: auto;
  display: flex; flex-direction: column; padding: 4px; gap: 2px;
  background: var(--menu-surface); border: 1px solid var(--hairline);
  border-radius: 12px; box-shadow: 0 10px 28px rgb(0 0 0 / .22);
}
.ed-slashrow {
  text-align: start; padding: 8px 10px; border: 0; border-radius: 8px;
  background: none; color: var(--text-body); font-family: var(--sans);
  font-size: var(--t-body); cursor: pointer;
}
.ed-slashrow:hover, .ed-slashrow.on { background: var(--elevated); color: var(--text-high) }
kbd {
  font-family: var(--sans); font-size: 11.5px; font-weight: 700; line-height: 1;
  padding: 4px 7px; border-radius: 6px; color: var(--text-high);
  background: var(--elevated); border: 1px solid var(--hairline);
  box-shadow: 0 1px 0 var(--hairline);
}
.jumphits { display: flex; flex-direction: column; gap: 2px; max-block-size: 46vh; overflow-y: auto }
.statline.grace {
  color: var(--text-muted); border-block-start: 0;
  margin-block-start: 2px; padding-block-start: 0;
}
.tl { position: relative; padding-inline-start: 34px }
.tl::before { content: ""; position: absolute; inset-block: 6px 0; inset-inline-start: 9px; width: 1px; background: linear-gradient(180deg, var(--gold), transparent) }
.tl-item { position: relative; margin-block-end: 14px }
.tl-item::before { content: ""; position: absolute; inset-block-start: 22px; inset-inline-start: -30px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px var(--screen-bg) }
.entry { background: var(--card-surface); border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: 16px }
.entry-top { display: flex; align-items: center; gap: 11px; margin-block-end: 10px }
.entry-mood { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 19px; background: var(--gold-soft); flex: none }
.entry-date { font-size: 13.5px; font-weight: 800; color: var(--text-high) }
.entry-meta { font-size: 11.5px; color: var(--text-muted) }
.entry-title { font-size: var(--t-h3); font-weight: 800; color: var(--text-high); margin-block-end: 5px }
.entry-body { font-family: var(--serif); font-size: var(--t-h3); line-height: 1.85; color: var(--text-body); white-space: pre-wrap; overflow-wrap: anywhere }
.entry-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-block-start: 11px }
.thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-block-start: 11px }
.thumbs img { width: 76px; height: 76px; object-fit: cover; border-radius: 11px; border: 1px solid var(--hairline) }
.thumbs .ph { width: 76px; height: 76px; border-radius: 11px; border: 1px solid var(--hairline); background: var(--elevated); display: grid; place-items: center; font-size: 11px; color: var(--text-faint) }
.calwrap { display: grid; gap: 16px; align-items: start; grid-template-columns: minmax(0, 380px) minmax(0, 1fr) }
@media (max-width: 900px) { .calwrap { grid-template-columns: minmax(0, 1fr) } }
.calcard { max-width: 380px }
.calcard .card-h h3 { white-space: nowrap }
@media (max-width: 900px) { .calcard { max-width: none } }
.calgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px }
.calhd { text-align: center; font-size: 11px; color: var(--text-muted); padding-block-end: 6px }
.cald {
  aspect-ratio: 1; max-height: 46px; border-radius: 10px; border: 1px solid transparent;
  background: var(--elevated); color: var(--text-body); cursor: pointer;
  display: grid; place-items: center; font-family: var(--sans); font-size: 13px;
  font-variant-numeric: tabular-nums; transition: transform .12s, border-color .12s;
  justify-self: center; inline-size: 100%; max-inline-size: 46px;
}
.cald.has:where(:not([data-m])) {
  background: color-mix(in srgb, var(--mood-mid) 32%, var(--elevated));
  border-color: color-mix(in srgb, var(--mood-mid) 60%, transparent);
}
.cald:hover { transform: translateY(-1px); border-color: var(--gold) }
.cald.pad { background: transparent; border: 0; cursor: default; pointer-events: none }
.cald.fri { color: var(--rose) }
.cald[data-m="1"] { background: var(--mood-low); color: var(--on-gold) }
.cald[data-m="2"] { background: color-mix(in srgb, var(--mood-mid) 88%, #000); color: var(--on-gold) }
.cald[data-m="3"] { background: var(--mood-high); color: var(--on-gold) }
.cald.today { border-color: var(--gold); font-weight: 800 }
.cald.sel { outline: 2px solid var(--accent); outline-offset: 1px }
.cald:disabled { opacity: .35; cursor: default; transform: none; border-color: transparent }
.daypick .cald.sel { background: var(--accent); color: var(--on-accent) }
.daypick { margin-block-start: 10px }
.callegend {
  display: flex; align-items: center; gap: 6px; margin-block-start: 12px;
  font-size: 11.5px; color: var(--text-muted);
}
.callegend i { inline-size: 13px; block-size: 13px; border-radius: 3px; display: inline-block }
.callegend i[data-m="1"] { background: var(--mood-low) }
.callegend i[data-m="2"] { background: color-mix(in srgb, var(--mood-mid) 88%, #000) }
.callegend i[data-m="3"] { background: var(--mood-high) }
.calday { min-width: 0 }
.calday .tl { padding-inline-start: 0 }
.calday .tl::before, .calday .tl-item::before { display: none }
.drop {
  border: 1.5px dashed var(--hairline); border-radius: var(--r-lg); padding: 34px 24px;
  text-align: center; background: var(--card-surface); transition: border-color .16s, background .16s;
}
.drop.over { border-color: var(--accent); background: var(--accent-soft) }
.drop h3 { font-size: 17px; margin-block-end: 8px }
.drop p { font-size: 13.5px; color: var(--text-muted); max-width: 46ch; margin-inline: auto }
.drop input { display: none }
.drop label { margin-block-start: 16px; display: inline-flex }
.plan { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-block: 4px }
.planbox { padding: 14px; border-radius: var(--r-md); background: var(--card-surface); border: 1px solid var(--hairline); text-align: center }
.planbox .v { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2 }
.planbox .k { font-size: 11.5px; color: var(--text-muted); margin-block-start: 4px }
.planbox.add .v { color: var(--green) }
.planbox.fix .v { color: var(--gold) }
.planbox.skip .v { color: var(--text-faint) }
.field { display: block; margin-block-start: 14px }
.field span { display: block; font-size: 12.5px; color: var(--text-muted); margin-block-end: 6px }
.field input { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--hairline); background: var(--elevated); color: var(--text-high); font-family: var(--sans); font-size: var(--t-body) }
.rowline {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
  gap: var(--s2) var(--s4); padding-block: var(--s3);
  border-block-end: 1px solid var(--hairline);
}
.rowline:last-child { border-block-end: 0 }
.rowline .t { font-size: 14px; color: var(--text-high); font-weight: 500 }
.rowline .s { font-size: var(--t-cap); color: var(--text-muted); line-height: 1.65; max-inline-size: 52ch }
.rowline.wide { grid-template-columns: minmax(0, 1fr) }
@media (max-width: 620px) {
  .rowline { grid-template-columns: minmax(0, 1fr) }
  .rowline > .seg, .rowline > .chipset, .rowline > .btn, .rowline > .pill { justify-self: start }
}
.rowline.lead { grid-template-columns: auto minmax(0, 1fr); align-items: start }
.rowline.lead > .promiseicon + .grow { padding-block-start: 6px }
.rowline.lead > .led { margin-block-start: 8px }
.rowline.lead.trail { grid-template-columns: auto minmax(0, 1fr) auto }
.rowline.lead.trail .s { max-inline-size: none }
.s.facts > span { display: inline-block }
.rowline.tally { grid-template-columns: minmax(0, 1fr) auto }
@media (max-width: 620px) {
  .rowline.lead.trail { grid-template-columns: auto minmax(0, 1fr) }
  .rowline.lead.trail > :nth-child(3) { grid-column: 2; justify-self: start }
}
.led { width: 9px; height: 9px; border-radius: 50%; flex: none }
.led.ok { background: var(--green) } .led.warn { background: var(--gold) } .led.off { background: var(--text-faint) }
.note { padding: 14px 16px; border-radius: var(--r-md); background: var(--elevated); border-inline-start: 3px solid var(--gold); font-size: 13px; color: var(--text-muted); line-height: 1.75 }
.note b { color: var(--text-high) }
.err { border-inline-start-color: var(--danger); color: var(--danger) }
.diag {
  unicode-bidi: isolate; text-align: left; margin-block-start: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.5px;
  color: var(--text-faint); overflow-wrap: anywhere; line-height: 1.6;
}
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--elevated); border: 1px solid var(--hairline); gap: 2px; flex-wrap: wrap }
.seg button { border: 0; background: none; cursor: pointer; padding: 7px 12px; border-radius: 9px; font-size: 13px; color: var(--text-muted) }
.seg button[aria-pressed="true"] { background: var(--card-surface); color: var(--text-high); font-weight: 800 }
.seg.paired { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) }
.empty { text-align: center; padding: 40px 20px; color: var(--text-muted); font-size: 14px; line-height: 1.9 }
.searchrow { position: sticky; top: var(--topbar-h); z-index: 4; padding-block-end: 4px; background: var(--screen-bg) }
.searchbox {
  width: 100%; padding: 12px 16px; border-radius: 14px; font-size: var(--t-h3);
  border: 1px solid var(--hairline); background: var(--card-surface);
  color: var(--text-high); font-family: var(--sans);
}
.searchbox::placeholder { color: var(--text-faint) }
.searchbox:focus { border-color: var(--accent); outline: none }
.entry[role="button"] { cursor: pointer; transition: border-color .16s, transform .16s }
.entry[role="button"]:hover { border-color: var(--gold); transform: translateY(-1px) }
.reader { display: flex; flex-direction: column; gap: 12px; max-width: 72ch }
.reader-title { font-size: clamp(20px, 2.6vw, 26px); margin-block: 4px }
.blk-body, .blk-bullet, .blk-numbered {
  font-family: var(--serif); font-size: 16.5px; line-height: 1.9; margin: 0;
  overflow-wrap: anywhere;
}
.blk-h1 { font-size: 21px; font-weight: 800; color: var(--text-high); margin-block: 8px 0 }
.blk-h2 { font-size: 17.5px; font-weight: 800; color: var(--text-high); margin-block: 6px 0 }
.blk-bullet { padding-inline-start: 20px; position: relative }
.blk-bullet::before { content: "•"; position: absolute; inset-inline-start: 4px; color: var(--gold) }
.blk-numbered { padding-inline-start: 20px; position: relative }
.blk-divider { border: 0; border-block-start: 1px solid var(--hairline); margin-block: 8px; width: 100% }
.blk-check { display: flex; align-items: center; gap: 9px; font-size: 15.5px }
.blk-check .box {
  width: 17px; height: 17px; border-radius: 5px; flex: none;
  border: 1.6px solid var(--hairline); display: grid; place-items: center; font-size: 11px;
}
.blk-check .box.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent) }
.blk-check .done { color: var(--text-muted); text-decoration: line-through }
.blk-media .ph { padding: 20px; text-align: center; color: var(--text-faint); background: var(--elevated); border-radius: 12px }
.fab {
  position: fixed; inset-block-end: calc(24px + var(--safe-bottom)); inset-inline-end: 24px; z-index: 25;
  display: inline-flex; align-items: center; gap: 9px; padding: 14px 20px;
  border: 0; border-radius: 999px; cursor: pointer; font-family: var(--sans);
  font-size: var(--t-body); font-weight: 800; color: var(--on-accent);
  background: linear-gradient(140deg, var(--accent-gradient-start), var(--accent-gradient-end));
  box-shadow: 0 10px 30px -12px var(--accent);
}
.fab svg { width: 19px; height: 19px }
@media (max-width: 760px) {
  .fab { inset-block-end: calc(var(--tabbar-space) + 14px); inset-inline-end: 16px; padding: 14px }
  .fab-label { display: none }
}
.ed-actions {
  position: sticky; bottom: calc(var(--kb) + var(--safe-bottom)); z-index: 6;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 0; margin-block-start: 4px;
  background: color-mix(in srgb, var(--screen-bg) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-block-start: 1px solid var(--hairline);
}
@media (max-width: 760px) { .ed-actions { bottom: calc(var(--tabbar-space) + var(--kb)) } }
.cardactions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-block-start: 14px }
.cardactions:first-child { margin-block-start: 0 }
.editor { display: flex; flex-direction: column; gap: 14px; max-width: 74ch }
.shell.writing .editor { max-width: none }
.ed-title {
  width: 100%; padding: 10px 0; border: 0; border-block-end: 1px solid var(--hairline);
  background: none; color: var(--text-high); font-family: var(--sans);
  font-size: clamp(20px, 2.6vw, 26px); font-weight: 800;
}
.ed-title:focus { outline: none; border-block-end-color: var(--gold) }
.ed-title::placeholder { color: var(--text-faint) }
.ed-moods { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px }
@media (max-width: 560px) { .ed-moods { grid-template-columns: repeat(5, minmax(0, 1fr)) } }
.ed-dock {
  display: flex; flex-direction: column; gap: 6px;
  position: sticky; top: var(--topbar-h); z-index: 4; background: var(--screen-bg);
}
.ed-toolbar {
  display: flex; flex-wrap: wrap; gap: 5px; padding: 8px; border-radius: 13px;
  background: var(--elevated); border: 1px solid var(--hairline);
}
.ed-fmt, .ed-add {
  border: 1px solid transparent; background: none; cursor: pointer; border-radius: 9px;
  color: var(--text-muted); font-family: var(--sans); font-size: 13px; padding: 6px 10px;
}
.ed-fmt { min-width: 32px; font-weight: 800 }
.ed-fmt-bold { font-weight: 900 }
.ed-fmt-italic { font-style: italic }
.ed-fmt-underline { text-decoration: underline }
.ed-fmt-strikeThrough { text-decoration: line-through }
.ed-fmt:hover, .ed-add:hover { background: var(--card-surface); color: var(--text-high) }
.ed-sep { width: 1px; background: var(--hairline); margin-inline: 4px }
.ed-file { display: none }
.ed-blocks { display: flex; flex-direction: column; gap: 6px }
:root { --rule: color-mix(in srgb, var(--hairline) 70%, transparent) }
.ed-blocks.ruled { border-radius: 14px; padding: 14px 12px }
.reader.ruled { background-origin: content-box }
.ed-speak.on { background: var(--danger); color: var(--screen-bg); border-color: var(--danger) }
.ed-speechnote { display: block }
.ed-speechnote:empty { display: none }
.shell.writing { display: block; height: 100dvh; overflow: auto }
.shell.writing .body { max-width: 900px; margin-inline: auto; padding-block-end: 40px }
.edbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: -20px -20px 4px; padding: calc(12px + var(--safe-top)) 20px 12px;
  border-block-end: 1px solid var(--hairline);
  background: color-mix(in srgb, var(--screen-bg) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
@media (max-width: 760px) {
  .edbar { margin: -16px -14px 4px; padding: calc(12px + var(--safe-top)) 14px 12px }
}
.edbar-title { display: flex; flex-direction: column; min-inline-size: 0; flex: 1 1 0 }
.edbar > .grow { flex: none }
.edbar-title strong { font-size: var(--t-h3) }
.edbar .iconbtn svg { inline-size: 20px; block-size: 20px }
html[dir="rtl"] svg[data-flip] { transform: scaleX(-1) }
.ed-eyes {
  position: fixed; inset: 0; z-index: 30; pointer-events: none;
  background: rgba(224, 162, 74, .13);
}
.ed-block.found { outline: 1px dashed color-mix(in srgb, var(--gold) 55%, transparent); outline-offset: 2px; border-radius: 10px }
.ed-block.current { outline: 2px solid var(--gold) }
::highlight(ed-find) { background-color: color-mix(in srgb, var(--gold) 30%, transparent) }
::highlight(ed-find-now) { background-color: color-mix(in srgb, var(--gold) 62%, transparent); color: var(--text-high) }
@supports selector(::highlight(a)) {
  .ed-block.found:not(.current) { outline-color: transparent }
}
.edfind { flex-basis: 100%; display: flex; align-items: center; gap: 6px; padding-block-start: 4px }
.edfind .passfield { flex: 1; min-inline-size: 0; padding-block: 8px }
.edfind .passfield::-webkit-search-cancel-button { appearance: none; display: none }
.edfind .findcount { flex: none; min-inline-size: 4.5em; text-align: center; font-variant-numeric: tabular-nums }
.edfind .iconbtn { flex: none }
.edfind .iconbtn[disabled] { opacity: .45; cursor: default }
.ed-flow { max-width: 68ch; margin-inline: auto; gap: 8px }
.ed-flow .ed-dock, .ed-flow .ed-moods { display: none }
.ed-flow .ed-title {
  border: 0; background: transparent; padding-inline: 0;
  font-size: var(--t-h2); opacity: .75;
}
.ed-flow .ed-title:focus { opacity: 1 }
.ed-flow .ed-blocks { padding-block-end: 45vh }
.ed-flow .ed-block { background: none; padding-block: 4px }
.ed-flow .ed-block:hover { background: none }
.ed-flow .ed-text { transition: opacity .25s ease; opacity: .55 }
.ed-flow .ed-block.lit .ed-text { opacity: 1 }
@media (prefers-reduced-motion: reduce) {
  .ed-flow .ed-text { transition: none }
}
@media (prefers-contrast: more) {
  .ed-flow .ed-text, .ed-flow .ed-block.lit .ed-text { opacity: 1 }
}
.flow-bar {
  position: sticky; inset-block-end: 0; display: flex; align-items: center; gap: 10px;
  padding-block: 8px; background: var(--screen-bg); font-size: var(--t-cap);
  color: var(--text-muted); border-block-start: 1px solid var(--hairline);
}
.flow-meter {
  flex: 1; block-size: 4px; inline-size: auto; min-inline-size: 60px;
  appearance: none; border: 0; border-radius: 2px; background: var(--track);
}
.flow-meter::-webkit-progress-bar { background: var(--track); border-radius: 2px }
.flow-meter::-webkit-progress-value { background: var(--gold); border-radius: 2px }
.flow-meter::-moz-progress-bar { background: var(--gold); border-radius: 2px }
.flow-count { white-space: nowrap; font-variant-numeric: tabular-nums }
.flow-kept { white-space: nowrap; opacity: .8 }
.flow-bar.flow-reached .flow-count { color: var(--gold); font-weight: 700 }
.scrim.sheetscrim { place-items: end center; padding: 0 }
.sheet {
  inline-size: 100%; max-inline-size: 560px; max-block-size: 86dvh; overflow: auto;
  padding: 6px 18px calc(22px + var(--safe-bottom));
  border-start-start-radius: 26px; border-start-end-radius: 26px;
  background: var(--menu-surface); border: 1px solid var(--hairline); border-block-end: 0;
  box-shadow: 0 -30px 80px -40px rgba(0, 0, 0, .8);
}
.sheet > h3 { font-size: var(--t-h2); margin-block: 6px 12px }
.sheet > h3:focus { outline: none }
.sheet .promptfilter { margin-block-end: 6px; padding-block: 10px }
.sheet.dragging { transition: none }
.sheet-grab { touch-action: none; cursor: grab }
.sheet-grab:active { cursor: grabbing }
.sheet-grab {
  inline-size: 38px; block-size: 4px; border-radius: 2px; margin: 8px auto 4px;
  background: var(--text-muted);
}
.sheet-close { display: flex; justify-content: flex-end; margin-block-start: 14px }
.menusheet { padding-inline: 10px }
.menusheet > h3 { padding-inline: 8px }
.menugroup { display: flex; flex-direction: column; gap: 2px; padding-block: 4px }
.menugroup + .menugroup { border-block-start: 1px solid var(--hairline); margin-block-start: 6px }
.menucap {
  font-size: 11px; font-weight: 800; color: var(--text-muted);
  padding: 8px 10px 4px;
}
.menucap:empty { display: none }
.menurow {
  display: flex; align-items: center; gap: 12px; inline-size: 100%; min-block-size: 46px;
  padding: 9px 10px; border: 0; border-radius: 13px; background: transparent;
  color: var(--text-body); font: inherit; font-size: var(--t-body); text-align: start; cursor: pointer;
}
.menurow:hover { background: var(--elevated); color: var(--text-high) }
.menurow.danger { color: var(--danger) }
.menurow svg { inline-size: 19px; block-size: 19px; flex: none; color: var(--text-muted) }
.menurow.danger svg { color: var(--danger) }
.menulabel { display: flex; flex-direction: column; min-inline-size: 0; flex: 1 }
.menulabel .mini { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.menutrail { flex: none; color: var(--text-muted) }
.entrymore:hover { background: var(--elevated) }
.entrymore svg { inline-size: 18px; block-size: 18px }
.ctxsky { display: flex; align-items: center; gap: 10px; margin-block-start: 8px; flex-wrap: wrap }
.ctxsky span {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--t-cap); color: var(--text-body);
}
.monthstrip {
  display: flex; flex-direction: column; gap: 7px;
  padding: 9px 12px; border-radius: 22px;
  background: var(--card-surface); border: 1px solid var(--hairline);
}
.striphead { display: flex; align-items: center; gap: 8px }
.stripmonth {
  display: inline-flex; align-items: center; gap: 5px; min-block-size: 34px;
  padding-inline: 13px; border-radius: 12px;
  background: var(--elevated); border: 1px solid var(--hairline);
  color: var(--text-high); font: inherit; font-size: var(--t-cap); font-weight: 700; cursor: pointer;
}
.stripmonth svg { inline-size: 15px; block-size: 15px; color: var(--text-muted) }
.striptoday {
  display: inline-flex; align-items: center; gap: 5px; min-block-size: 30px;
  padding-inline: 12px; border: 0; border-radius: 20px;
  background: var(--gold-soft); color: var(--gold);
  font: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer;
}
.striptoday svg { inline-size: 13px; block-size: 13px }
.stripdays {
  display: flex; gap: 4px; overflow-x: auto; scroll-behavior: smooth;
  scrollbar-width: none; padding-inline: 2px;
}
.stripdays::-webkit-scrollbar { display: none }
.stripday {
  flex: none; inline-size: 52px; min-block-size: 66px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding-block-start: 2px; border: 0; border-radius: 14px;
  background: transparent; font: inherit; cursor: pointer;
}
.stripday .sw {
  font-size: 9px; font-weight: 700; color: var(--text-muted); line-height: 1.1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-inline-size: 100%;
}
.stripday .sn {
  inline-size: 30px; block-size: 30px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 600; color: var(--text-muted);
}
.stripday .sd { inline-size: 5px; block-size: 5px; border-radius: 50%; background: transparent }
.stripday .sd.has { background: var(--gold) }
.stripday.on .sw { color: var(--gold) }
.stripday.on .sn {
  inline-size: 38px; block-size: 38px; font-size: var(--t-h3); color: var(--on-gold);
  background: linear-gradient(140deg, var(--gold-gradient-start), var(--gold-gradient-end));
}
.monthgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px }
.monthgrid .chip { justify-content: center }
.quickbody { display: flex; flex-direction: column; gap: 10px; margin-block-start: 12px }
.quickcap { margin: 0 }
.quickq { font-size: var(--t-h3); margin: 6px 0 0 }
.quickfoot { text-align: center; margin: 0 }
.quicknote { display: flex; align-items: center; gap: 10px }
.quicknote .passfield { flex: 1; min-inline-size: 0 }
.quicknote .chatmic { inline-size: 42px; block-size: 42px }
.bands { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px }
.band {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 11px 4px; border-radius: 14px; cursor: pointer;
  border: 1px solid transparent; background: var(--card-surface);
  color: var(--text-muted); font: inherit; font-size: 10.5px; text-align: center;
}
.band span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-inline-size: 100% }
.band.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent) }
.chatbody { display: flex; flex-direction: column; min-block-size: 100dvh; gap: 0 }
.chatthread { flex: 1; display: flex; flex-direction: column; gap: 10px; padding-block: 16px }
.chatempty { max-inline-size: 52ch; line-height: 1.9 }
.chatwait { display: flex; align-items: center; gap: 12px; flex-wrap: wrap }
.techfold { margin-block-start: 4px; font-size: var(--t-cap) }
.techfold summary { list-style: none; cursor: pointer; color: var(--text-muted); padding-block: 4px; inline-size: fit-content }
.techfold summary::-webkit-details-marker { display: none }
.techfold summary::after { content: ' +'; color: var(--text-faint) }
.techfold[open] summary::after { content: ' −' }
.techfold summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px }
.bubble { max-inline-size: min(46ch, 88%); display: flex; flex-direction: column; gap: 6px }
.bubble p {
  margin: 0; padding: 11px 15px; border-radius: 18px;
  font-size: var(--t-body); line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere;
}
.bubble.mine { align-self: flex-end }
.bubble.mine p {
  background: linear-gradient(140deg, var(--accent-gradient-start), var(--accent-gradient-end));
  color: var(--on-accent); border-end-end-radius: 6px;
}
.bubble.theirs { align-self: flex-start }
.bubble.theirs p {
  background: var(--card-surface); color: var(--text-body);
  border: 1px solid var(--hairline); border-end-start-radius: 6px;
}
.chatsource {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  max-inline-size: 100%; min-block-size: 36px; padding: 7px 12px;
  border-radius: 12px; border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent);
  background: var(--elevated); color: var(--text-body);
  font: inherit; font-size: var(--t-cap); cursor: pointer; text-align: start;
}
.chatsource:hover { border-color: var(--gold) }
.chatsource svg { inline-size: 15px; block-size: 15px; flex: none; color: var(--gold) }
.chatsource span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.chatkeep {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  min-block-size: 32px; padding: 4px 8px; border: 0; border-radius: 10px;
  background: transparent; color: var(--accent); font: inherit; font-size: var(--t-cap);
  font-weight: 800; cursor: pointer;
}
.chatkeep:hover { background: var(--accent-soft) }
.chatkeep svg { inline-size: 14px; block-size: 14px; flex: none }
.chatrow {
  position: sticky; bottom: calc(var(--kb) + var(--safe-bottom)); z-index: 6;
  display: flex; align-items: center; gap: 10px; padding-block: 12px;
  background: color-mix(in srgb, var(--screen-bg) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-block-start: 1px solid var(--hairline);
}
.chatfield {
  flex: 1; min-inline-size: 0; padding: 13px 18px; border-radius: 22px;
  border: 1px solid var(--hairline); background: var(--card-surface);
  color: var(--text-high); font: inherit; font-size: var(--t-body);
}
.chatfield:focus { outline: none; border-color: var(--accent) }
.chatsend, .chatmic {
  inline-size: 46px; block-size: 46px; flex: none; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; border: 1px solid var(--hairline);
  background: var(--card-surface); color: var(--accent);
}
.chatsend {
  border: 0; color: var(--on-accent);
  background: linear-gradient(140deg, var(--accent-gradient-start), var(--accent-gradient-end));
}
.chatsend:disabled { background: var(--elevated); color: var(--text-muted); cursor: default }
.chatmic.on { background: var(--danger); color: var(--screen-bg); border-color: var(--danger) }
.chatsend svg, .chatmic svg { inline-size: 20px; block-size: 20px }
html[dir="rtl"] .chatsend svg { transform: none }
.iconbtn.danger { color: var(--danger) }
.toast {
  position: fixed; inset-inline: 0;
  bottom: calc(max(var(--tabbar-space, 0px), var(--safe-bottom)) + 18px + var(--kb));
  z-index: 80; display: flex; justify-content: center; pointer-events: none; padding-inline: 16px;
}
.toastpill {
  display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center;
  max-inline-size: min(92vw, 480px); padding-block: 11px; padding-inline: 18px;
  border-radius: 999px; pointer-events: auto;
  background: var(--text-high); color: var(--screen-bg); font-size: var(--t-cap); font-weight: 700;
  box-shadow: var(--lift);
}
.toastpill:has(.toastundo) { padding-block: 5px; padding-inline: 18px 6px }
.toast[inert] { z-index: 55 }
@media (max-width: 760px) {
  body:has(.fab) .toast { bottom: calc(var(--tabbar-space) + 14px + 48px + 12px + var(--kb)) }
}
.srvoice {
  position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.ed-page { display: flex; flex-direction: column; gap: 6px }
.ed-pagerow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap }
.ed-pagelabel {
  font-size: var(--t-cap); color: var(--text-muted); font-weight: 700;
  min-inline-size: 8ch; flex: none;
}
.ed-swatch {
  inline-size: 26px; block-size: 26px; border-radius: 50%; flex: none; cursor: pointer;
  border: 1px solid var(--hairline); padding: 0;
}
.ed-swatch.on { box-shadow: 0 0 0 2px var(--screen-bg), 0 0 0 4px var(--accent) }
.ed-block {
  display: flex; align-items: flex-start; gap: 8px; border-radius: 10px; padding: 2px;
  position: relative;
}
.ed-block:hover { background: color-mix(in srgb, var(--elevated) 55%, transparent) }
.ed-block > :first-child { flex: 1; min-width: 0 }
.ed-rowtools { display: flex; gap: 2px }
@media (hover: hover) {
  .ed-rowtools { opacity: 0; transition: opacity .14s }
  .ed-block:hover .ed-rowtools, .ed-block:focus-within .ed-rowtools { opacity: 1 }
}
.ed-tool {
  width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--hairline);
  background: var(--card-surface); color: var(--text-muted); cursor: pointer; font-size: 13px;
}
.ed-tool:hover { color: var(--danger); border-color: var(--danger) }
.ed-para, .ed-check { display: flex; align-items: flex-start; gap: 8px }
.ed-style {
  flex: none; min-width: 30px; height: 26px; margin-block-start: 4px; border-radius: 8px;
  border: 1px solid var(--hairline); background: var(--card-surface); color: var(--text-faint);
  font-family: var(--sans); font-size: 11px; cursor: pointer;
}
.ed-style:hover { color: var(--gold); border-color: var(--gold) }
.ed-box {
  flex: none; width: 19px; height: 19px; margin-block-start: 6px; border-radius: 6px;
  border: 1.6px solid var(--hairline-strong, var(--hairline)); background: var(--card-surface);
  color: var(--on-accent); cursor: pointer; font-size: 11px; line-height: 1;
}
.ed-box.on { background: var(--accent); border-color: var(--accent) }
.ed-text {
  flex: 1; min-width: 0; padding: 4px 2px; outline: none; font-family: var(--serif);
  font-size: 16.5px; line-height: 1.9; color: var(--text-body); overflow-wrap: anywhere;
}
.ed-text:focus { background: color-mix(in srgb, var(--accent) 6%, transparent); border-radius: 6px }
.ed-text:empty::before {
  content: attr(data-placeholder); color: var(--text-faint); pointer-events: none;
}
:is(input, textarea)[dir=auto]:placeholder-shown, .ed-text[dir=auto]:empty { direction: inherit }
.ed-h1 { font-family: var(--sans); font-size: 21px; font-weight: 800; color: var(--text-high) }
.ed-h2 { font-family: var(--sans); font-size: 17.5px; font-weight: 800; color: var(--text-high) }
.ed-bullet, .ed-numbered { padding-inline-start: 18px; position: relative }
.ed-bullet::before { content: "•"; position: absolute; inset-inline-start: 2px; color: var(--gold) }
.reader, .ed-list { counter-reset: emrooznum }
:not(.blk-numbered) + .blk-numbered,
:not(.ed-numbered) + .ed-numbered { counter-reset: emrooznum }
.blk-numbered,
.ed-numbered { counter-increment: emrooznum }
.blk-numbered::before,
.ed-numbered::before {
  content: counter(emrooznum) ".";
  position: absolute; inset-inline-start: 0; color: var(--gold);
  font-variant-numeric: tabular-nums;
}
html[lang="fa"] .blk-numbered::before,
html[lang="fa"] .ed-numbered::before { content: counter(emrooznum, persian) "." }
html[lang="ar"] .blk-numbered::before,
html[lang="ar"] .ed-numbered::before { content: counter(emrooznum, arabic-indic) "." }
.ed-divider { border: 0; border-block-start: 1px solid var(--hairline); margin-block: 10px; width: 100% }
.blk-media img, .blk-media video,
.ed-media img, .ed-media video { max-width: 100%; border-radius: 12px; border: 1px solid var(--hairline); display: block }
.blk-media audio,
.ed-media audio { width: 100% }
.ed-media .ph { padding: 18px; text-align: center; color: var(--text-faint); background: var(--elevated); border-radius: 12px }
.stat .d { font-size: 11.5px; margin-block-start: 6px }
.up { color: var(--green) }
.down { color: var(--rose) }
.pixels { display: grid; grid-template-columns: repeat(26, minmax(0, 1fr)); gap: 3px }
@media (max-width: 560px) { .pixels { grid-template-columns: repeat(14, minmax(0, 1fr)) } }
.px { aspect-ratio: 1; border-radius: 2.5px; background: var(--track) }
.px[data-m="1"] { background: var(--mood-low) }
.px[data-m="2"] { background: var(--mood-mid) }
.px[data-m="3"] { background: var(--mood-high) }
.px.multi { display: flex; overflow: hidden; background: var(--track) }
.px .slice { flex: 1; display: block }
.px .slice[data-m="1"] { background: var(--mood-low) }
.px .slice[data-m="2"] { background: var(--mood-mid) }
.px .slice[data-m="3"] { background: var(--mood-high) }
.caldots { display: flex; gap: 2px; justify-content: center; margin-block-start: 2px }
.caldots i { display: block; inline-size: 4px; block-size: 4px; border-radius: 50%; background: var(--on-gold); opacity: .9 }
.caldots i[data-m="1"] { background: var(--mood-low); box-shadow: 0 0 0 1px var(--on-gold) }
.caldots i[data-m="2"] { background: var(--mood-mid); box-shadow: 0 0 0 1px var(--on-gold) }
.caldots i[data-m="3"] { background: var(--mood-high); box-shadow: 0 0 0 1px var(--on-gold) }
.daybars { display: flex; gap: 10px; align-items: flex-end; margin-block-start: 12px; min-block-size: 96px }
.daybar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px }
.daybar .bar { display: block; inline-size: 100%; max-inline-size: 48px; border-radius: 6px 6px 2px 2px; background: var(--mood-mid) }
.daybar .bar.high { background: var(--mood-high) }
.daybar .bar.low { background: var(--mood-low) }
.daybar .k { font-size: var(--t-cap); color: var(--text-muted) }
.daybar .c { font-size: 11px; color: var(--text-faint) }
.linkish {
  background: none; border: 0; padding: 0; cursor: pointer; font-family: var(--sans);
  font-size: 13px; font-weight: 800; color: var(--accent);
}
.linkish:hover { text-decoration: underline }
.cald.occ { box-shadow: inset 0 -3px 0 -1px var(--gold) }
.cald.obs { box-shadow: inset 0 -3px 0 -1px var(--accent) }
.dayoccs { display: flex; flex-wrap: wrap; gap: 6px; margin-block-end: 14px }
.scrim {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center;
  padding: calc(20px + var(--safe-top)) 20px calc(20px + var(--safe-bottom) + var(--kb));
  background: rgba(4, 6, 12, .62);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.modal {
  width: 100%; max-width: 400px; padding: 24px; border-radius: 20px;
  background: var(--card-surface); border: 1px solid var(--hairline);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .75);
  max-block-size: 100%; overflow: auto;
}
.passfield {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--hairline);
  background: var(--elevated); color: var(--text-high); font-family: var(--sans); font-size: var(--t-h3);
}
.passfield:focus { border-color: var(--accent); outline: none }
.gbtn-slot { display: flex; justify-content: center; min-height: 44px; margin-block-start: 6px }
.or {
  display: flex; align-items: center; gap: 12px; margin-block: 16px 4px;
  font-size: var(--t-cap); color: var(--text-muted);
}
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--hairline) }
.printable { display: none }
@media print {
  :root { --screen-bg: #fff }
  body { background: #fff; color: #111; font-size: 11pt; line-height: 1.6 }
  .shell, .fab, .scrim { display: none !important }
  .printable { display: block; padding: 0 }
  .print-cover { text-align: center; padding-block: 28vh 0; break-after: page }
  .print-cover h1 { font-size: 30pt; margin-block-end: 12pt; color: #111 }
  .print-cover p { color: #555 }
  .print-entry { break-inside: avoid-page; margin-block-end: 22pt; padding-block-end: 14pt; border-block-end: 1px solid #ddd }
  .print-entry h2 { font-size: 15pt; margin-block: 4pt 8pt; color: #111 }
  .print-date { display: flex; justify-content: space-between; gap: 12pt; font-size: 9pt; color: #666 }
  .print-meta { color: #888 }
  .print-tags { margin-block-start: 8pt; font-size: 9pt; color: #777 }
  .print-media { display: flex; flex-wrap: wrap; gap: 6pt; margin-block-start: 9pt }
  .print-media img { max-width: 46%; max-height: 8cm; object-fit: contain }
  :root, :root[data-theme="dark"], :root:not([data-theme="light"]) {
    --screen-bg: #fff;
    --card-surface: #fff;
    --elevated: #f4f4f4;
    --text-high: #111;
    --text-body: #1a1a1a;
    --text-muted: #444;
    --text-faint: #767676;
    --hairline: #ddd;
    --gold: #8a6a2f;
    --accent: #0f5f55;
  }
  .printable a { color: #111; text-decoration: none }
}
@page { margin: 18mm 16mm }
.yearsago {
  font-size: var(--t-cap); font-weight: 800; color: var(--gold);
  margin-block: var(--s2) var(--s1);
}
.promptcard { background: radial-gradient(120% 140% at 0% 0%, var(--gold-soft), transparent 58%), var(--card-surface) }
.prompt-q { font-size: 17px; font-weight: 700; color: var(--text-high); line-height: 1.6; text-wrap: balance }
.iconbtn { font-size: var(--t-h3); font-weight: 800 }
.factline { display: flex; gap: 11px; align-items: flex-start; padding-block: 9px; border-block-start: 1px solid var(--hairline) }
.factline:first-of-type { border-block-start: 0 }
.factline .t { color: var(--text-high); font-size: 14px; font-weight: 600 }
.factline .s { color: var(--text-muted); font-size: 11.5px; margin-block-start: 2px }
.factdot { width: 7px; height: 7px; border-radius: 999px; margin-block-start: 7px; flex: none; background: var(--accent) }
.factline.interpretation .factdot { background: none; border: 1.5px dashed var(--gold) }
.factline.interpretation .t { font-weight: 500; color: var(--text-body) }
.weekh { font-size: var(--t-cap); color: var(--text-muted); font-weight: 800; margin-block: var(--s4) 4px }
.weekpick {
  display: flex; gap: 11px; align-items: center; width: 100%; text-align: start;
  padding: 9px 6px; border: 0; border-radius: 11px; background: none; cursor: pointer; color: inherit;
}
.weekpick:hover { background: var(--elevated) }
.weekpick .t { display: block; color: var(--text-high); font-size: 14px; font-weight: 600 }
.weekpick .s { display: block; color: var(--text-muted); font-size: 11.5px }
.patterngroup + .patterngroup { margin-block-start: var(--s4) }
.patternh { font-size: var(--t-cap); color: var(--text-muted); font-weight: 800; margin-block-end: 2px }
.patterngroup .rowline:last-child { border-block-end: 0 }
.rowline.pickable { width: 100%; text-align: start; border: 0; background: none; cursor: pointer; color: inherit; font: inherit; border-radius: 10px }
.rowline.pickable:hover { background: var(--elevated) }
.rowline.pickable:hover .t { color: var(--gold) }
.moodarc { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-block-end: 6px }
.moodstep { font-size: 19px; line-height: 1 }
.chapters { display: flex; flex-wrap: wrap; gap: 7px; margin-block-start: 12px }
@media print {
  .print-chapter { break-before: page; font-size: 22pt; margin-block: 0 18pt; color: #111 }
  .print-chapter:first-of-type { break-before: auto }
}
.capsulebody { resize: vertical; min-height: 96px; line-height: 1.8; font-size: var(--t-h3) }
.capsule.sealed { border-style: dashed; border-color: color-mix(in srgb, var(--gold) 55%, transparent) }
.capsule.sealed .entry-date { color: var(--gold) }
@media (max-width: 760px) { .rail { display: none } }
@media (min-width: 761px) { .tabbar { display: none } }
@media (max-width: 1200px) { .ctx { display: none } }
.boot {
  position: fixed; inset: 0; display: grid; place-content: center; gap: 18px;
  justify-items: center; background: var(--screen-bg);
  opacity: 0; animation: bootin .45s ease-out .35s forwards;
}
.boot-mark {
  font-family: var(--serif); font-size: 34px; font-weight: 800; letter-spacing: .04em;
  color: var(--text-high);
}
.boot-line { inline-size: 132px; block-size: 3px; border-radius: 99px; background: var(--hairline); overflow: hidden }
.boot-line i {
  display: block; block-size: 100%; inline-size: 42%; border-radius: 99px;
  background: var(--gold); animation: bootsweep 1.15s ease-in-out infinite;
}
@keyframes bootin { to { opacity: 1 } }
@keyframes bootsweep {
  0% { transform: translateX(-115%) }
  100% { transform: translateX(255%) }
}
@media (prefers-reduced-motion: reduce) {
  .boot-line i { animation: none; inline-size: 100%; opacity: .55 }
}
@media (max-width: 760px) {
  .iconbtn { width: 44px; height: 44px }
  .btn.small { padding: 11px 16px; font-size: 14px }
  .star, .entrymore { min-inline-size: 44px; min-block-size: 44px }
  button.pill { min-height: 34px }
  .chip { min-height: 40px; display: inline-flex; align-items: center }
  .seg button { min-height: 40px }
  .ed-dock {
    position: fixed; inset-inline: 0; top: auto; z-index: 6;
    bottom: calc(var(--kb) + var(--safe-bottom) + var(--edactions-h));
    padding: 6px 14px; box-shadow: 0 -22px 34px -26px rgba(0, 0, 0, .5);
  }
  .shell.writing .body { padding-block-end: calc(var(--eddock-h) + 28px) }
  .ed-toolbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none }
  .ed-toolbar::-webkit-scrollbar { display: none }
  .ed-fmt, .ed-add { flex: none; min-block-size: 44px; min-inline-size: 44px }
  .ed-tool { width: 40px; height: 40px; font-size: var(--t-h3) }
  .ed-style { min-inline-size: 44px; block-size: 40px; font-size: var(--t-cap) }
  .ed-box { position: relative; inline-size: 22px; block-size: 22px; margin-block-start: 8px }
  .ed-box::after { content: ""; position: absolute; inset: -11px }
}
.ctxday { padding-block-end: 4px }
.ctxdate { font-size: 16px; font-weight: 800; color: var(--text-high); line-height: 1.5 }
.ctxalt { font-size: 12.5px; color: var(--text-muted); font-variant-numeric: tabular-nums }
.ctxmoods { display: flex; flex-wrap: wrap; gap: 5px; font-size: 17px; line-height: 1.4 }
.ctx .dayoccs { display: flex; flex-wrap: wrap; gap: 6px; margin-block-start: 4px }
.ctx .rowline { align-items: flex-start }
.edmeta .aiwhere { margin-block-start: 8px }
.aisuggest {
  margin-block-start: 10px; padding: 12px 14px; border-radius: var(--r-md);
  background: var(--elevated); border-inline-start: 3px solid var(--accent);
  scroll-margin-block-end: calc(var(--edactions-h) + var(--kb) + var(--safe-bottom) + 12px);
}
@media (max-width: 760px) {
  .aisuggest { scroll-margin-block-end: calc(var(--eddock-h) + var(--edactions-h) + var(--kb) + var(--safe-bottom) + 12px) }
}
.aisuggest .aicap { font-size: var(--t-cap); color: var(--text-muted); font-weight: 700 }
.aisuggest .aisaid { margin-block: 4px 0; color: var(--text-high); line-height: 1.75 }
.aisuggest .moodsaid { display: flex; align-items: center; gap: 8px }
.aisuggest .btnrow { margin-block-start: 8px }
.edmeta .field { display: block; margin-block-start: 12px }
.edmeta .field > span { display: block; font-size: var(--t-cap); color: var(--text-muted); margin-block-end: 7px }
.moodpick { display: flex; flex-wrap: wrap; gap: 6px }
.moodbtn {
  width: 42px; height: 42px; border-radius: 12px; font-size: 20px; line-height: 1; cursor: pointer;
  border: 1px solid transparent; background: var(--elevated); filter: grayscale(.7); opacity: .75;
  transition: filter .15s, opacity .15s, border-color .15s;
}
.moodbtn:hover { filter: none; opacity: 1 }
.moodbtn.on { filter: none; opacity: 1; border-color: var(--accent); background: var(--accent-soft) }
.badges { display: grid; gap: 9px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)) }
.badge {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 13px; border-radius: 13px;
  background: var(--elevated); border: 1px solid transparent;
}
.badge.on { background: var(--gold-soft); border-color: color-mix(in srgb, var(--gold) 40%, transparent) }
.badge-mark { inline-size: 34px; block-size: 34px; flex: none; color: var(--gold); opacity: .22 }
.badge.on .badge-mark { opacity: 1 }
.badge-text { flex: 1; min-inline-size: 0 }
.badge-title { font-size: 13.5px; font-weight: 800; color: var(--text-body) }
.badge.on .badge-title { color: var(--text-high) }
.badge-how { font-size: 11.5px; color: var(--text-muted); line-height: 1.6; margin-block-start: 2px }
.badge-progress { display: flex; align-items: center; gap: 8px; margin-block-start: 8px }
.badge-bar { flex: 1; height: 5px; border-radius: 999px; background: var(--hairline); overflow: hidden }
.badge-bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px }
.privlist { display: flex; flex-direction: column; gap: 0 }
.privrow { display: flex; gap: 12px; align-items: center; padding-block: 11px; border-block-start: 1px solid var(--hairline) }
.privrow:first-child { border-block-start: 0 }
.privrow .t { font-size: 14px; color: var(--text-high); font-weight: 600 }
.privrow .s { font-size: 11.5px; color: var(--text-muted); margin-block-start: 3px; line-height: 1.6 }
.privrow.off .t { color: var(--text-muted) }
.privto svg { inline-size: 12px; block-size: 12px; vertical-align: -2px; margin-inline: 5px; color: var(--text-faint) }
.privpill { flex: none; white-space: nowrap; border: 1.5px solid transparent; color: var(--text-body) }
.privpill svg { inline-size: 13px; block-size: 13px; flex: none }
.privpill.here { background: color-mix(in srgb, var(--green) 16%, var(--card-surface)); color: var(--text-high) }
.privpill.here svg { color: var(--green) }
.privpill.opens { background: transparent; border-color: var(--accent); color: var(--text-body) }
.privpill.opens svg { color: var(--accent) }
.privpill.goes { background: transparent; border-color: var(--gold); color: var(--text-body) }
.privpill.goes svg { color: var(--gold) }
.privpill.spare { background: transparent; border-style: dashed; border-color: var(--text-faint); color: var(--text-muted) }
.privpill.none { background: none; padding-inline: 0; color: var(--text-muted) }
.privlegend { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 2px 12px }
.ailist { margin-block-start: 4px }
.badge-earned { font-size: 11.5px; font-weight: 700; color: var(--text-body); margin-block-start: 6px }
.lockedline { display: flex; align-items: center; gap: 6px; margin-block-start: 6px; font-size: var(--t-cap); color: var(--text-muted) }
.lockedline svg { inline-size: 14px; block-size: 14px; flex: none }
.lockedveil { text-align: center; padding-block: 28px }
.lockedveil .lockmark { display: inline-flex; margin-block-end: 8px; color: var(--text-muted) }
.lockedveil .lockmark svg { inline-size: 30px; block-size: 30px }
.lockedveil .field, .lockedveil .note { text-align: start }
.lockedveil .cardactions { justify-content: center }
.faqlist { display: flex; flex-direction: column; gap: 0 }
.faqitem { border-block-start: 1px solid var(--hairline) }
.faqitem:first-child { border-block-start: 0 }
.faqitem summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding-block: 12px; font-size: 14px; font-weight: 600; color: var(--text-high) }
.faqitem summary::-webkit-details-marker { display: none }
.faqitem summary::after { content: '+'; margin-inline-start: auto; color: var(--text-faint); font-weight: 400; font-size: 18px; line-height: 1 }
.faqitem[open] summary::after { content: '−' }
.faqitem summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px }
.faqitem .faqa { margin: 0 0 14px; font-size: var(--t-cap); color: var(--text-muted); line-height: 1.75 }
.faqitem .faqgo { margin-block: 0 14px }
.moodmark { display: block; flex: none }
.moodmark.tone-high { color: var(--mood-high) }
.moodmark.tone-mid  { color: var(--mood-mid) }
.moodmark.tone-low  { color: var(--mood-low) }
.moodmark.none { color: var(--text-faint) }
.entry-mood:has(> .moodmark.none) { background: transparent }
.entry-mood { display: grid; place-items: center; flex: none }
.moodstep { display: inline-grid; place-items: center }
.ed-moods .mood { display: grid; place-items: center; padding: 5px; border-radius: 11px;
  height: 40px; font-size: 19px;
  border: 1px solid transparent; background: var(--elevated); cursor: pointer; opacity: .82 }
.ed-moods .mood:hover { opacity: 1 }
.ed-moods .mood[aria-pressed="true"] { opacity: 1; border-color: var(--accent); background: var(--accent-soft) }
.hubhead { display: flex; align-items: baseline; gap: var(--s2); flex-wrap: wrap;
  background: none; border: 0; box-shadow: none; padding: 0 }
.hubname { font-size: 16px; font-weight: 800; color: var(--text-high) }
.hublabel { font-size: var(--t-cap); color: var(--text-muted); font-weight: 800; margin: var(--s3) 0 calc(var(--s2) * -1) }
.hubgrid { display: grid; gap: var(--s2); grid-template-columns: repeat(3, 1fr) }
@media (max-width: 900px) { .hubgrid { grid-template-columns: repeat(2, 1fr) } }
@media (max-width: 420px) { .hubgrid { grid-template-columns: 1fr } }
.hubtile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  padding: 15px 14px; border-radius: var(--r-lg); min-height: 92px;
  background: var(--card-surface); border: 1px solid var(--hairline);
  color: var(--text-high); font-size: 13.5px; font-weight: 700; cursor: pointer; text-align: start;
  transition: border-color .16s, background .16s;
}
.hubtile:hover { border-color: var(--gold); background: var(--elevated) }
.hubtile svg { width: 20px; height: 20px; color: var(--gold) }
.tilestatus { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12px; color: var(--text-muted); margin-block-start: auto }
.tilestatus::before { content: ""; width: 6px; height: 6px; border-radius: 50%; flex: none; background: var(--green) }
.tilestatus.attention::before { background: var(--gold) }
.tilestatus.risk::before { background: var(--danger) }
.mapframe {
  position: relative; overflow: hidden; touch-action: none; cursor: grab;
  block-size: clamp(240px, 42vh, 440px); border-radius: var(--r-lg);
  background: var(--elevated); border: 1px solid var(--hairline);
}
.mapframe.dragging { cursor: grabbing }
.maptiles, .mapmarks { position: absolute; inset: 0 }
.maptile { position: absolute; top: 0; left: 0; width: 256px; height: 256px; user-select: none }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .maptile { filter: brightness(.78) saturate(.85) }
}
:root[data-theme="dark"] .maptile { filter: brightness(.78) saturate(.85) }
.mapmark {
  position: absolute; top: 0; left: 0;
  display: grid; place-items: center; padding: 0; border: 0; background: none;
  cursor: pointer; margin: -11px 0 0 -11px;
}
.mapmark:hover { filter: drop-shadow(0 0 6px var(--gold)) }
.mapctl {
  position: absolute; bottom: 10px; left: 10px; display: flex; gap: 6px; align-items: center;
}
.mapctl .iconbtn, .mapctl .btn {
  background: color-mix(in srgb, var(--card-surface) 86%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: var(--lift);
}
.mapatt {
  position: absolute; bottom: 10px; right: 12px;
  font-size: 10.5px; color: var(--text-muted); text-decoration: none;
  background: color-mix(in srgb, var(--card-surface) 72%, transparent);
  padding: 2px 7px; border-radius: 999px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.mapatt:hover { color: var(--gold) }
.prompt-q {
  display: block; inline-size: 100%; text-align: start; padding: 0;
  border: 0; background: none; cursor: pointer; font-family: inherit;
}
.prompt-q:hover { color: var(--gold) }
.prompt-q.static { cursor: default }
.prompt-q.static:hover { color: var(--text-high) }
.prompt-q.waiting { color: var(--text-muted); font-weight: 500; cursor: default }
.nobr { white-space: nowrap }
.packemoji { font-size: 24px; line-height: 1; flex: none }
.iconbtn.gold { border-color: var(--gold); color: var(--gold) }
.iconbtn.gold:disabled { opacity: .5; cursor: default }
.wsteps { display: flex; gap: 6px; flex-wrap: wrap; margin-block: 4px 2px }
.wstep {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px;
  border-radius: 999px; border: 1px solid var(--hairline); background: var(--card-surface);
  color: var(--text-muted); font: inherit; font-size: 12.5px; cursor: pointer;
}
.wstep .wnum {
  display: grid; place-items: center; inline-size: 19px; block-size: 19px;
  border-radius: 999px; background: var(--elevated); color: var(--text-faint);
  font-size: 11px; font-weight: 800; flex: none;
}
.wstep.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft) }
.wstep.on .wnum { background: var(--accent); color: var(--on-accent) }
.wstep.off { opacity: .45; cursor: default }
.thumbs .thumb { position: relative; line-height: 0 }
.thumbdrop {
  position: absolute; inset-block-start: 3px; inset-inline-end: 3px;
  inline-size: 20px; block-size: 20px; border-radius: 999px; border: 0; cursor: pointer;
  background: color-mix(in srgb, var(--screen-bg) 78%, transparent);
  color: var(--text-high); font-size: 11px; line-height: 1; display: grid; place-items: center;
}
.thumbdrop:hover { background: var(--danger); color: #fff }
.wdraft {
  inline-size: 100%; min-block-size: 190px; resize: vertical;
  padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--hairline);
  background: var(--elevated); color: var(--text-high);
  font-family: var(--sans); font-size: var(--t-body); line-height: 1.85;
  unicode-bidi: plaintext; text-align: start;
}
.wdraft:focus { border-color: var(--accent); outline: none }
.mini.waiting { color: var(--gold) }
.quotecard { background: radial-gradient(120% 140% at 100% 0%, var(--accent-soft), transparent 58%), var(--card-surface) }
.quote-t {
  font-size: 15.5px; font-style: italic; font-weight: 500;
  color: var(--text-body); line-height: 1.85; text-wrap: pretty;
}
.quote-a { margin-block-start: 8px; text-align: end; font-size: 12.5px; font-weight: 700; color: var(--gold) }
.iconbtn.rose { color: var(--rose); border-color: color-mix(in srgb, var(--rose) 45%, transparent) }
.iconbtn.rose:hover { color: var(--rose); border-color: var(--rose) }
.rowline.wrapped { grid-template-columns: minmax(0, 1fr) }
.chipset { display: flex; gap: 7px; flex-wrap: wrap }
.goalrow { padding-block: 12px; border-block-end: 1px solid color-mix(in srgb, var(--text-faint) 22%, transparent); display: flex; flex-direction: column; gap: 8px }
.goalrow:last-child { border-block-end: 0 }
.goalrow.dim .t { color: var(--text-muted) }
.goalhead, .goalfoot { display: flex; align-items: center; gap: var(--s2); justify-content: space-between }
.goalhead .t { font-size: 14.5px; font-weight: 700; color: var(--text-high) }
.goalfoot .s { font-size: 11.5px; color: var(--text-faint) }
.goalbar { display: flex; gap: 4px; inline-size: 100% }
.goalbar i { flex: 1; block-size: 4px; border-radius: 2px; background: var(--elevated) }
.goalbar i.on { background: var(--gold) }
.goalline { display: flex; align-items: center; gap: 10px; padding-block: 6px }
.goalline .t { flex: 0 0 42%; font-weight: 600; color: var(--text-high); font-size: 13px }
.goalline .goalbar { flex: 1 }
.goalstill { color: var(--gold) }
.goaldays .chip { min-inline-size: 40px; justify-content: center }
.goalnudge { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-block-start: 6px }
.goalscard.pickable { cursor: pointer }
.programemoji { font-size: 17px; line-height: 1 }
.programq { font-size: 14px; font-weight: 700; color: var(--text-high); line-height: 1.65; margin-block: 4px 8px }
.programcard { cursor: pointer }
.programcard .goalbar { margin-block-start: 6px }
.programrow { display: flex; flex-direction: column; gap: 6px; inline-size: 100%; text-align: start; padding: 12px 14px; margin-block-start: 10px; border-radius: 14px; border: 1px solid transparent; background: var(--elevated); color: inherit; font: inherit; cursor: pointer }
.programrow.on { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, transparent) }
.programrow .programhead { display: flex; align-items: center; gap: 8px }
.programrow .t { font-weight: 700; color: var(--text-high); flex: 1 }
.programrow .s { font-size: 12.5px; color: var(--text-muted) }
.programleave { color: var(--accent) }
.transfercounts .v { font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums }
.transfercounts .rowline { grid-template-columns: minmax(0, 1fr) auto }
.steps { padding-inline-start: 1.3em; margin: 0; display: grid; gap: 8px; color: var(--text-high); font-size: 14px; line-height: 1.6 }
:lang(fa) .steps { list-style-type: persian }
:lang(ar) .steps { list-style-type: arabic-indic }
.factrow .t { font-weight: 500 }
.rowline.factrow { grid-template-columns: minmax(0, 1fr) auto }
.vaultnote { display: flex; gap: 8px; align-items: center; margin-block-start: 10px }
.vaultnote .passfield { flex: 1; min-inline-size: 0 }
.calrow { margin-block: 8px 2px }
.talkq { font-size: 14.5px; font-weight: 700; color: var(--text-high); line-height: 1.6; margin-block: 6px 8px }
.talkrow { display: flex; gap: 8px; align-items: center }
.talkrow .passfield { flex: 1; min-inline-size: 0 }
.talklast { padding: 8px 10px; border-radius: 10px; background: var(--elevated); margin-block-end: 6px }
.talklast .talka { color: var(--text-high); font-size: 13.5px; margin-block-start: 2px }
.loopcard .card-h { align-items: flex-start }
.loopcard .card-h .mini { margin-block-start: 2px }
.loopquote { font-size: 15px; font-weight: 700; color: var(--text-high); line-height: 1.6; margin-block: 4px 8px }
.loopecho { color: var(--text-muted); margin-block-end: 6px }
.loopq { font-size: 14px; font-weight: 600; color: var(--text-high); line-height: 1.6 }
.intentionrow .t { font-weight: 600 }
.forgetall .t { font-weight: 700; color: var(--text-high) }
.sitq { font-size: 16px; font-weight: 700; color: var(--text-high); line-height: 1.6; margin-block: 4px 10px }
.sitanswer { inline-size: 100%; resize: vertical; font: inherit }
.peoplepick { display: flex; gap: 7px; flex-wrap: wrap; align-items: center }
.peoplepick .passfield { flex: 1; min-inline-size: 140px }
.scoperow { margin-block: 8px 2px }
.chipset.langs .chip { font-size: 13px }
.accentrow { display: flex; flex-wrap: wrap; gap: 10px; margin-block-start: 4px }
.accent {
  inline-size: 34px; block-size: 34px; border-radius: 999px; cursor: pointer;
  border: 2px solid transparent; padding: 0; flex: none;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text-high) 12%, transparent);
}
.accent.on { border-color: var(--text-high); transform: scale(1.06) }
.accent:hover { border-color: var(--text-muted) }
@media (max-width: 560px) {
  .rowline { flex-wrap: wrap }
  .rowline .seg { inline-size: 100% }
}
.moodbar { display: flex; block-size: 16px; border-radius: 999px; overflow: hidden; gap: 2px }
.moodpart.good { background: var(--mood-high) }
.moodpart.normal { background: var(--mood-mid) }
.moodpart.hard { background: var(--mood-low) }
.moodlegend { display: flex; flex-wrap: wrap; gap: 14px; margin-block-start: 12px; font-size: var(--t-cap); color: var(--text-muted) }
.moodkey { display: inline-flex; align-items: center; gap: 7px }
.moodkey i { inline-size: 10px; block-size: 10px; border-radius: 3px; flex: none }
.trend {
  display: flex; align-items: flex-end; gap: 2px;
  block-size: 92px; padding: 6px; border-radius: var(--r-md); background: var(--elevated);
  overflow-x: auto;
}
.trendday { flex: 1 0 4px; min-inline-size: 4px; block-size: 100%; display: flex; align-items: flex-end }
.trendmark { inline-size: 100%; border-radius: 2px; display: block }
.trendmark.good { background: var(--mood-high) }
.trendmark.normal { background: var(--mood-mid) }
.trendmark.hard { background: var(--mood-low) }
.trendday.none { border-block-end: 1px dashed var(--hairline) }
.edmeta .chiprow { margin-block: 4px 6px }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; margin-block-start: 10px }
.thumbs .ph.missing {
  display: grid; place-items: center; color: var(--text-faint);
  border-style: dashed; border-color: var(--hairline);
}
.thumbs .ph.missing svg { inline-size: 20px; block-size: 20px }
.blk-missing {
  display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4);
  border-radius: var(--r-md); background: var(--elevated);
  border: 1px dashed var(--hairline); color: var(--text-muted);
}
.blk-missing svg { inline-size: 22px; block-size: 22px; flex: none; color: var(--text-faint) }
.blk-missing .t { font-size: 13.5px; font-weight: 700; color: var(--text-body) }
.blk-missing .s { font-size: var(--t-cap); line-height: 1.65; margin-block-start: 2px }
.centre .bchead { display: flex; align-items: center; gap: var(--s2) }
.centre .chiprow.tabs { margin-block: 0 4px }
.centre .chiprow.tabs .chip { padding: 9px 18px; font-size: 13.5px }
.centre .tabbody { display: flex; flex-direction: column; gap: 16px }
.centre .empty { padding-block: var(--s4) }
.card.health { border-width: 1px }
.card.health .headline { display: flex; align-items: center; gap: 8px; margin-block-end: 6px }
.card.health .mark { font-weight: 900; font-size: 16px }
.card.health .linkish { margin-block-start: 8px; font-weight: 800 }
.card.health.ok { background: color-mix(in srgb, var(--green) 10%, var(--card-surface)); border-color: color-mix(in srgb, var(--green) 42%, transparent) }
.card.health.ok .mark, .card.health.ok h3 { color: var(--green) }
.card.health.warn { background: color-mix(in srgb, var(--gold) 10%, var(--card-surface)); border-color: color-mix(in srgb, var(--gold) 42%, transparent) }
.card.health.warn .mark, .card.health.warn h3 { color: var(--gold) }
.card.health.bad { background: color-mix(in srgb, var(--danger) 10%, var(--card-surface)); border-color: color-mix(in srgb, var(--danger) 42%, transparent) }
.card.health.bad .mark, .card.health.bad h3 { color: var(--danger) }
.bcprog { display: flex; flex-direction: column; gap: 6px }
.bcprog .bar { block-size: 6px; border-radius: 999px; background: var(--elevated); overflow: hidden }
.bcprog .bar i { display: block; block-size: 100%; inline-size: 0; border-radius: 999px; background: var(--accent); transition: inline-size .2s ease }
.bcprog .bar.waiting i { inline-size: 40%; animation: bcsweep 1.1s ease-in-out infinite }
@keyframes bcsweep {
  0% { margin-inline-start: -40% } 100% { margin-inline-start: 100% }
}
.note.gold { border-inline-start-color: var(--gold); color: var(--text-body) }
.rowline .t.accent { color: var(--accent); font-weight: 800 }
.modal.wide { max-inline-size: 520px }
.mediapick .rowline:first-of-type { border-block-start: 1px solid var(--hairline) }
.mediapick .total { margin-block-start: 12px; color: var(--accent); font-weight: 800; font-size: 14px }
.updatebar {
  position: fixed; z-index: 60;
  inset-block-end: calc(max(var(--tabbar-space, 16px), var(--safe-bottom)) + 12px + var(--kb));
  inset-inline: 12px;
  margin-inline: auto; max-inline-size: 520px;
  display: flex; align-items: center; gap: var(--s3);
  padding: 10px 12px 10px 16px; border-radius: var(--r-lg);
  background: var(--menu-surface); border: 1px solid var(--accent);
  box-shadow: var(--lift); font-size: 13.5px; color: var(--text-high);
}
.updatebar .grow { min-inline-size: 0 }
@media (max-width: 760px) { .updatebar { inset-block-end: calc(var(--tabbar-space) + 84px) } }
@media (max-width: 480px) { .updatebar { font-size: 12.5px; padding-inline: 12px } }
.installbar { border-color: var(--gold); align-items: flex-start; padding-block: 12px }
.installbar .t { color: var(--text-high); font-weight: 800 }
.installbar .s { color: var(--text-muted); font-size: var(--t-cap); line-height: 1.65; margin-block-start: 2px }
.installbar .btn { flex: none }
.lockpage {
  min-block-size: 100dvh; display: grid; place-items: center;
  padding: 24px; background: var(--screen-bg);
}
.lockcard {
  inline-size: min(380px, 100%); text-align: center;
  padding: var(--s5); border-radius: var(--r-lg);
  background: var(--card-surface); border: 1px solid var(--hairline); box-shadow: var(--lift);
}
.lockcard h2 { font-size: 22px; margin-block: 12px 8px }
.lockcard .mini { line-height: 1.8 }
.lockcard .field { text-align: start }
.lockcard .btn { inline-size: 100% }
.lockanswer { margin-block-start: 10px; text-align: start }
.lockmark {
  inline-size: 54px; block-size: 54px; margin-inline: auto; border-radius: 18px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.lockmark svg { inline-size: 26px; block-size: 26px }
.lockfield { text-align: center; letter-spacing: .3em; font-size: var(--t-h2) }
.driftpair { display: grid; gap: var(--s3); grid-template-columns: repeat(2, minmax(0, 1fr)) }
@media (max-width: 620px) { .driftpair { grid-template-columns: minmax(0, 1fr) } }
.driftside .s { font-size: var(--t-cap); color: var(--text-muted); margin-block-end: 6px }
.driftext {
  padding: var(--s3); border-radius: var(--r-md); background: var(--elevated);
  font-size: 13.5px; line-height: 1.9; white-space: pre-wrap; word-break: break-word;
}
.driftext.was { border-inline-start: 3px solid var(--danger) }
.timefield {
  padding: 10px 12px; border-radius: 12px; border: 1px solid var(--hairline);
  background: var(--elevated); color: var(--text-high);
  font-family: var(--sans); font-size: var(--t-h3); font-variant-numeric: tabular-nums;
}
.card.health .since { margin-block-start: 6px; font-weight: 700 }
body { overscroll-behavior-y: none }
.sheet, .scrim, .body, .ctx, .rail { overscroll-behavior: contain }
button, .tab, .pill, .fab, .rowline, .seg > *, .iconbtn, .linkish, .chip {
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
@supports (-webkit-touch-callout: none) {
  .field input, .searchbox, .passfield, .capsulebody, .timefield, .chatfield, .wdraft {
    font-size: 16px;
  }
  .lockfield { font-size: var(--t-h2) }
}
.facegrid {
  display: grid; gap: var(--s2); margin-block-start: var(--s3);
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
}
.facecell {
  display: grid; place-items: center; padding: 6px; cursor: pointer;
  border: 2px solid transparent; border-radius: var(--r-md);
  background: var(--elevated);
}
.facecell:hover { border-color: var(--hairline) }
.facecell.on { border-color: var(--accent); background: var(--accent-soft) }
.facecell .avatar { inline-size: 40px; block-size: 40px; font-size: 17px }
.avatar.empty { background: var(--track); border: 1px dashed var(--hairline) }
.card.away { opacity: .55 }
.card.away .prompt-q { text-decoration: line-through; text-decoration-color: var(--text-faint) }
.onboard {
  min-block-size: 100dvh; display: grid; place-items: center;
  padding: calc(24px + var(--safe-top)) 18px calc(24px + var(--safe-bottom));
  background: var(--screen-bg);
}
.onboardcard { inline-size: 100%; max-inline-size: 520px; padding: var(--s5) }
.onboardcard h2 { font-size: var(--t-h2); margin-block-end: var(--s2) }
.onboardcard .rowline { padding-block: 9px }
.onboardmark {
  inline-size: 54px; block-size: 54px; border-radius: 18px; display: grid; place-items: center;
  background: var(--gold-soft); color: var(--gold); margin-block-end: var(--s3);
}
.onboardmark svg { inline-size: 26px; block-size: 26px }
.promiseicon {
  inline-size: 34px; block-size: 34px; border-radius: 11px; flex: none;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
}
.promiseicon svg { inline-size: 18px; block-size: 18px }
.langpick { gap: 8px; margin-block-start: var(--s3) }
.onboardnav {
  display: flex; align-items: center; gap: var(--s3); margin-block-start: var(--s5);
  flex-wrap: wrap;
}
.onboardnav .btn-a { flex: 1; min-inline-size: 140px }
.onboarddots { display: flex; gap: 5px; align-items: center }
.onboarddots i { inline-size: 6px; block-size: 6px; border-radius: 999px; background: var(--track) }
.onboarddots i.on { inline-size: 18px; background: var(--accent) }
.card.draftback { border-inline-start: 4px solid var(--gold) }
.toastundo {
  min-block-size: 36px; padding-inline: 12px; border: 0; border-radius: 999px; cursor: pointer;
  background: color-mix(in srgb, var(--screen-bg) 12%, transparent);
  font: inherit; font-weight: 800; color: var(--screen-bg); text-decoration: underline;
  text-underline-offset: 3px;
}
.toastundo:hover { background: color-mix(in srgb, var(--screen-bg) 20%, transparent) }
.toastundo:focus-visible { outline: 2px solid var(--screen-bg); outline-offset: 2px }
.moreroom { display: grid; gap: var(--s2); justify-items: center; padding-block: var(--s4) }
