/* nibs — design language (direction D): warm off-white, chunky type, ink pills, pastel tone cards. Loads after app.css. */
:root {
  --font: "Onest", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --round: "Gabarito", "Onest", -apple-system, sans-serif;
  --text: #1E2124; --text2: #6B6F76; --text3: #A3A6AB; --on-ink: #FFFFFF;
  --glass: #FFFFFF; --glass2: #EFEFEC; --glass-strong: #FFFFFF; --stroke: #E8E8E4; --sep: #EFEFEC; --field: #FFFFFF;
  --shadow: none; --blur: none; --r: 24px;
  --accent: #1E2124; --green: #2F8A63; --red: #C8452A; --orange: #C9731C; --purple: #6A5AE0; --teal: #1F8E9A; --yellow: #C99A12;
  --wallbase: #F6F6F4; --tone: #F27856; --tone-soft: #FDE6DE;
  --nb-bg: #F6F6F4; --nb-card: #FFFFFF; --nb-chip: #ECECE9;
}
@media (prefers-color-scheme: dark) {
  :root {
    --text: #F2F2EF; --text2: #A3A6AB; --text3: #6B6F76; --on-ink: #151618;
    --glass: #1C1D20; --glass2: #26272B; --glass-strong: #2C2D31; --stroke: #2A2B2F; --sep: #2A2B2F; --field: #1C1D20;
    --accent: #F2F2EF; --green: #5FB894; --red: #F07A5E; --orange: #E9A04F; --purple: #9C8FF5; --yellow: #E9B52E;
    --wallbase: #121314; --tone-soft: #3A2620;
    --nb-bg: #121314; --nb-card: #1C1D20; --nb-chip: #26272B;
  }
}
html, body { font-family: var(--font); letter-spacing: 0; }
body { background: var(--wallbase); }
body::before, body::after { display: none; }
.glass, .card, .list, .widget, .cal .day, .chip, .seg, .composer, nav.side, nav.tabs { backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; }

/* living nibs */
.nib.live { animation: nb-breathe 3.2s ease-in-out infinite; transform-origin: 50% 60%; }
.nib.live .eye { animation: nb-blink 4.6s infinite; transform-box: fill-box; transform-origin: center; }
@keyframes nb-breathe { 50% { transform: scale(1.04) translateY(-1px); } }
@keyframes nb-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }

/* ---------- app shell ---------- */
h1.big { font-family: var(--round); font-weight: 800; letter-spacing: -.02em; }
h2 { font-family: var(--round); font-weight: 800; letter-spacing: -.01em; }
.stat .value, .widget .big, .ring text, #lock .time { font-family: var(--round); font-weight: 800; letter-spacing: -.02em; }
nav.side { background: var(--glass); border: 1px solid var(--stroke); }
nav.side .logo { font-family: var(--round); font-size: 24px; font-weight: 800; letter-spacing: -.03em; gap: 8px; }
nav.side button { color: var(--text2); font-weight: 500; }
nav.side button:hover { background: var(--glass2); }
nav.side button.on { background: var(--accent); color: var(--on-ink); box-shadow: none; }
.ic { background: none !important; box-shadow: none; width: 26px; height: 26px; color: inherit; }
.topbar .inner { background: var(--wallbase); border-bottom: 1px solid var(--stroke); }
.card, .list, .widget { background: var(--glass); border: 1px solid var(--stroke); }
.widget.hero { background: var(--tone-soft); color: var(--text); border-color: transparent; }
.widget.hero .wh { color: var(--text2); }
.widget.hero .mini { background: var(--glass); border: 0; }
.widget .wh .dot { background: none !important; width: 22px; height: 22px; }
.btn { background: var(--accent); color: var(--on-ink); box-shadow: none; font-weight: 600; }
.btn.ghost { background: var(--glass2); color: var(--text); border: 0; }
.btn.red { background: var(--red); color: #fff; box-shadow: none; } .btn.green { background: var(--green); color: #fff; box-shadow: none; }
input.field:focus, select.field:focus, textarea.field:focus { border-color: var(--text); box-shadow: 0 0 0 3px rgba(30,33,36,.10); }
.seg { background: var(--glass2); border: 0; }
.seg button.on { background: var(--glass); box-shadow: none; }
.pill { background: var(--glass2); border: 0; }
.bar { background: var(--glass2); border: 0; } .bar > div { background: var(--tone); }
.check.done { background: var(--accent); border-color: var(--accent); color: var(--on-ink); }
.bubble.me { background: var(--accent); color: var(--on-ink); }
.bubble.ai { background: var(--glass); border: 1px solid var(--stroke); }
.chip { background: var(--glass); border: 1px solid var(--stroke); }
.status { background: var(--glass2) !important; color: var(--text); }
.askbar { background: var(--glass); border: 1px solid var(--stroke); border-radius: 26px; }
.askbar .bfly { display: flex; }
.weekstrip div.today { background: var(--accent); color: var(--on-ink); }
.cal .day.today .n { background: var(--accent); color: var(--on-ink); }
#sheet { background: var(--glass); backdrop-filter: none; -webkit-backdrop-filter: none; }
#sheet .hd button { color: var(--text); }
.toast { background: var(--accent); color: var(--on-ink); border: 0; backdrop-filter: none; }
.vorb { background: radial-gradient(circle at 35% 30%, #fff 0%, #FDE6DE 18%, var(--tone) 60%, #8A3A22 100%); box-shadow: 0 0 60px rgba(242,120,86,.45); }
@media (max-width: 860px) {
  nav.tabs { background: #1E2124; border: 0; border-radius: 34px; padding: 6px; }
  nav.tabs button { color: #9EA2A8; font-weight: 500; }
  nav.tabs button.on { background: #34373B; color: #fff; }
  nav.tabs button .e { display: flex; }
}

/* ---------- lock screen (owner) ---------- */
#lock { background: var(--nb-bg); color: var(--text); }
#lock::before { display: none; }
#lock .brand { font-family: var(--round); font-size: 22px; letter-spacing: -.02em; font-weight: 800; text-transform: lowercase; opacity: 1; }
#lock .lockicon { display: none; }
#lock .time { text-shadow: none; }
#lock .date { color: var(--text2); }
#lock input { background: var(--nb-card); border: 1px solid var(--stroke); color: var(--text); backdrop-filter: none; -webkit-backdrop-filter: none; }
#lock input::placeholder { color: var(--text3); }
#lock input:focus { background: var(--nb-card); border-color: var(--text); }
#lock button, .lock-google { background: var(--accent); color: var(--on-ink); border-radius: 999px; height: 54px; padding: 0 18px; font-weight: 600; }
#lock .msg { color: var(--red); }
#lock .hint { color: var(--text2); opacity: 1; }
.lock-google { display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--nb-card) !important; color: var(--text) !important; border: 1px solid var(--stroke); text-decoration: none; }

/* ---------- nibs full-screen layer: welcome, waitlist, code, onboarding ---------- */
#nb { position: fixed; inset: 0; z-index: 70; background: var(--nb-bg); color: var(--text); overflow-y: auto; font-family: var(--font); }
.nb-screen { min-height: 100%; display: flex; justify-content: center; position: relative; }
.nb-enter { animation: nb-in .45s cubic-bezier(.2,.8,.2,1) both; }
@keyframes nb-in { from { opacity: 0; transform: translateY(14px); } }
.nb-col { width: min(440px, 100%); box-sizing: border-box; padding: calc(28px + env(safe-area-inset-top)) 24px calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 22px; min-height: 100dvh; }
.nb-center { justify-content: center; }
.nb-word { font-family: var(--round); font-weight: 800; font-size: 24px; letter-spacing: -.03em; text-align: center; }
.nb-h { margin: 0; font-family: var(--round); font-weight: 800; font-size: 34px; line-height: 1.05; letter-spacing: -.02em; text-align: center; }
.nb-h span { color: var(--text3); }
.nb-h.sm { font-size: 28px; }
.nb-h2 { margin: 0; font-family: var(--round); font-weight: 700; font-size: 23px; text-align: center; }
.nb-p { margin: -6px 0 0; font-size: 15px; line-height: 1.45; color: var(--text2); }
.nb-p.c { text-align: center; margin-top: -12px; }
.nb-cta { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 8px; }
.nb-btn { width: 100%; height: 56px; border-radius: 28px; border: 0; background: var(--accent); color: var(--on-ink); font: 600 16px var(--font); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; transition: transform .15s cubic-bezier(.2,.9,.25,1.1); }
.nb-btn:active { transform: scale(.97); } .nb-btn:disabled { opacity: .4; cursor: default; }
.nb-google { background: var(--nb-card); color: var(--text); border: 1px solid var(--stroke); }
.nb-under { font-size: 13px; color: var(--text2); text-align: center; }
.nb-link { align-self: center; border: 0; background: none; color: var(--text2); font: 500 14px var(--font); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px; }
.nb-back { position: absolute; left: max(14px, calc(50% - 214px)); top: calc(22px + env(safe-area-inset-top)); width: 44px; height: 44px; border: 0; background: none; color: var(--text); cursor: pointer; z-index: 2; }
.nb-err { color: var(--red); font-size: 14px; text-align: center; min-height: 18px; }
.nb-steps { display: flex; gap: 6px; justify-content: center; margin-top: 10px; }
.nb-steps span { width: 22px; height: 5px; border-radius: 3px; background: var(--nb-chip); }
.nb-steps span.on { background: var(--accent); }

/* welcome */
.nb-welcome { gap: 18px; }
.nb-notes { position: relative; height: 170px; margin: 0 -8px; }
.note { position: absolute; padding: 12px 14px 14px; font: 600 15px/1.15 var(--round); transform: rotate(var(--r)); box-shadow: 0 6px 14px rgba(30,33,36,.10); color: #1E2124; animation: nb-float 6s ease-in-out infinite; }
.note.y { background: #FBEDB0; } .note.w { background: #FFFFFF; } .note.g { background: #E3F3EA; animation-delay: -2s; }
.note.stamp { background: #FDE6DE; text-align: center; font: 500 11px/1.25 var(--font); color: #6B6F76; animation-delay: -4s; }
.note.stamp b { display: block; font: 800 24px var(--round); color: #D85B3B; }
@keyframes nb-float { 50% { transform: rotate(var(--r)) translateY(-5px); } }
.nb-hero { display: flex; justify-content: center; }

/* cards */
.nb-card { background: var(--soft, var(--nb-chip)); border-radius: 32px; padding: 0 18px 20px; margin-top: 56px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
@media (prefers-color-scheme: dark) { .nb-card, .nb-tone, .nb-tile { background: var(--nb-card) !important; } }
.nb-float { margin-top: -58px; position: relative; display: flex; justify-content: center; }
.nb-bubble { position: absolute; left: calc(100% - 6px); top: 14px; background: var(--nb-card); border-radius: 14px 14px 14px 4px; padding: 7px 11px; font-size: 13px; font-weight: 600; white-space: nowrap; }

/* goal pills */
.nb-pills { display: flex; flex-direction: column; gap: 12px; }
.nb-pill { position: relative; height: 62px; border-radius: 20px; border: 0; background: var(--nb-chip); color: var(--text); display: flex; align-items: center; padding: 0 20px; font: 500 16px var(--font); cursor: pointer; text-align: left; transition: background .2s, transform .15s; }
.nb-pill.on { background: var(--c); color: #fff; }
.nb-pill:active { transform: scale(.98); }
.nb-pill i { position: absolute; right: 12px; top: 8px; display: flex; }

/* tone carousel */
.nb-carousel { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 64px 40px 6px; margin: 0 -24px; scrollbar-width: none; }
.nb-carousel::-webkit-scrollbar { display: none; }
.nb-tone { flex: none; width: 78%; scroll-snap-align: center; background: var(--soft); border-radius: 34px; padding: 0 22px 26px; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: 14px; opacity: .55; transform: scale(.94); transition: opacity .25s, transform .25s; }
.nb-tone.on { opacity: 1; transform: none; }
.nb-tone .nb-float { margin-top: -66px; }
.nb-tag { background: var(--nb-card); border-radius: 12px; padding: 7px 14px; font-size: 13px; font-weight: 600; letter-spacing: .06em; }
.nb-tone p { margin: 0; text-align: center; font: 600 20px/1.25 var(--round); }
.nb-tname { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.nb-tname b { font: 800 26px var(--round); } .nb-tname span { font-size: 14px; color: var(--text2); }
.nb-dots { display: flex; gap: 8px; justify-content: center; }
.nb-dots button { width: 8px; height: 8px; border-radius: 4px; border: 0; padding: 0; background: var(--text3); cursor: pointer; transition: width .25s; }
.nb-dots button.on { width: 24px; background: var(--c); }

/* rhythm */
.nb-dialrow { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--text); }
.nb-dial { width: min(260px, 64vw); height: auto; }
.nb-dial .d1 { font: 800 62px var(--round); fill: var(--text); } .nb-dial .d2 { font: 600 11px var(--font); letter-spacing: 1.5px; fill: var(--text2); }
.nb-round { width: 44px; height: 44px; border-radius: 22px; border: 0; background: var(--nb-chip); color: var(--text); font: 600 22px var(--font); cursor: pointer; flex: none; }
.nb-two { display: flex; gap: 10px; }
.nb-tile { flex: 1; background: var(--soft, var(--nb-chip)); border-radius: 18px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--text2); }
.nb-tile b, .nb-select { font: 800 20px var(--round); color: var(--text); }
.nb-select { border: 0; background: none; padding: 0; appearance: none; -webkit-appearance: none; cursor: pointer; }
.nb-row { background: var(--nb-card); border-radius: 18px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.nb-row span { flex: 1; display: flex; flex-direction: column; } .nb-row b { font-weight: 500; font-size: 15px; } .nb-row small { font-size: 12px; color: var(--text2); }
.nb-switch { appearance: none; -webkit-appearance: none; width: 46px; height: 28px; border-radius: 14px; background: var(--text3); position: relative; cursor: pointer; margin: 0; transition: background .2s; flex: none; }
.nb-switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 11px; background: #fff; transition: transform .25s cubic-bezier(.2,.9,.25,1.1); }
.nb-switch:checked { background: #5FB894; } .nb-switch:checked::after { transform: translateX(18px); }

/* about you */
.nb-field { width: 100%; background: var(--nb-card); border-radius: 20px; padding: 14px 16px; box-sizing: border-box; display: flex; flex-direction: column; gap: 8px; }
.nb-field > span { font-size: 11px; font-weight: 600; letter-spacing: .08em; color: var(--text2); }
.nb-field small { text-align: right; font-size: 12px; color: var(--text3); }
.nb-input { border: 0; outline: 0; background: none; font: 400 16px/1.4 var(--font); color: var(--text); resize: none; padding: 0; width: 100%; }
.nb-input.code { background: var(--nb-card); border-radius: 18px; padding: 16px; text-align: center; font-size: 24px; letter-spacing: .4em; }
.nb-form { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.nb-chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.nb-chip { height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--stroke); background: var(--nb-card); color: var(--text); font: 500 13px var(--font); cursor: pointer; }

/* stamp */
.nb-stamp { align-self: center; transform: rotate(-4deg); filter: drop-shadow(0 12px 24px rgba(216,91,59,.22)); animation: nb-stamp .7s cubic-bezier(.2,1.4,.3,1) both .15s; display: flex; }
@keyframes nb-stamp { from { opacity: 0; transform: rotate(-14deg) scale(1.3); } }
@media (prefers-reduced-motion: reduce) { .nib.live, .nib.live .eye, .note, .nb-stamp, .nb-enter { animation: none; } }

/* desktop: give the welcome some room */
@media (min-width: 900px) {
  .nb-col { width: 460px; }
  .nb-welcome .nb-h { font-size: 40px; }
}

.dock { background: var(--glass); border: 1px solid var(--stroke); }
.dock .ic { width: 54px; height: 54px; border-radius: 18px; background: var(--glass2) !important; display: grid; place-items: center; }
.widget .wh .dot { display: grid; place-items: center; color: var(--text2); }
.bell { display: inline-flex; align-items: center; }

/* ---------- tone carousel v2 (transform-based) ---------- */
.nb-car { position: relative; margin: 0 -24px; outline: none; }
.nb-car:focus-visible { box-shadow: inset 0 0 0 2px var(--text); border-radius: 24px; }
.nb-car-view { overflow: hidden; padding: 70px 0 8px; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.nb-car-view:active { cursor: grabbing; }
.nb-car-track { display: flex; gap: 14px; transition: transform .45s cubic-bezier(.2,.8,.2,1); will-change: transform; }
.nb-car-track.drag { transition: none; }
.nb-car .nb-tone { width: min(260px, 68vw); flex: none; opacity: .5; transform: scale(.92); transition: opacity .3s, transform .3s; cursor: pointer; }
.nb-car .nb-tone[aria-selected="true"] { opacity: 1; transform: none; cursor: default; }
.nb-car .nb-tone .nb-float { pointer-events: none; }
.nb-arrow { position: absolute; top: calc(50% + 30px); transform: translateY(-50%); z-index: 2; width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--stroke); background: var(--nb-card); color: var(--text); display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 16px rgba(30,33,36,.10); }
.nb-arrow.l { left: 10px; } .nb-arrow.r { right: 10px; } .nb-arrow.r svg { transform: scaleX(-1); }
@media (hover: none) { .nb-arrow { display: none; } }
@media (prefers-reduced-motion: reduce) { .nb-car-track, .nb-car .nb-tone { transition: none; } }

/* ---------- tours: ring + tip card (no full-screen overlay) ---------- */
.nb-ring { position: fixed; z-index: 80; border-radius: 18px; pointer-events: none; box-shadow: 0 0 0 3px var(--c, #F27856), 0 0 0 9px color-mix(in srgb, var(--c, #F27856) 22%, transparent); transition: all .35s cubic-bezier(.2,.8,.2,1); }
.nb-tip { position: fixed; z-index: 81; background: var(--nb-card); color: var(--text); border: 1px solid var(--stroke); border-radius: 22px; padding: 14px 16px 12px; box-shadow: 0 18px 44px rgba(30,33,36,.18); font-family: var(--font); animation: nb-in .3s cubic-bezier(.2,.8,.2,1) both; transition: top .35s cubic-bezier(.2,.8,.2,1), left .35s cubic-bezier(.2,.8,.2,1); }
.nb-tip-hd { display: flex; align-items: center; gap: 8px; } .nb-tip-hd b { font: 800 17px var(--round); letter-spacing: -.01em; }
.nb-tip p { margin: 8px 0 12px; font-size: 14px; line-height: 1.45; color: var(--text2); }
.nb-tip-ft { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text3); }
.nb-tip-ft span { margin-right: auto; }
.nb-tip-skip { border: 0; background: none; color: var(--text2); font: 500 13px var(--font); cursor: pointer; padding: 6px; }
.nb-tip-next { border: 0; height: 36px; padding: 0 16px; border-radius: 18px; background: var(--accent); color: var(--on-ink); font: 600 14px var(--font); cursor: pointer; }
.nb-help { position: fixed; z-index: 35; right: 18px; bottom: 18px; width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--stroke); background: var(--glass); color: var(--text); font: 800 18px var(--round); cursor: pointer; box-shadow: 0 8px 20px rgba(30,33,36,.10); }
@media (max-width: 860px) { .nb-help { bottom: calc(92px + env(safe-area-inset-bottom)); right: 14px; width: 40px; height: 40px; } }
#app.hidden ~ .nb-help, #nb:not(.hidden) ~ .nb-help { display: none; }

/* ---------- nibs roster + audit ---------- */
.nb-roster { display: flex; gap: 10px; overflow-x: auto; padding: 8px 2px 12px; margin: 4px 0 4px; scrollbar-width: none; }
.nb-roster::-webkit-scrollbar { display: none; }
.nb-rcard { flex: none; width: 132px; position: relative; border: 2px solid transparent; background: var(--soft, var(--glass2)); border-radius: 22px; padding: 12px 10px 12px; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; color: var(--text); font-family: var(--font); transition: transform .15s cubic-bezier(.2,.9,.25,1.1), border-color .2s; }
@media (prefers-color-scheme: dark) { .nb-rcard { background: var(--glass); } }
.nb-rcard:active { transform: scale(.97); }
.nb-rcard.on { border-color: var(--text); }
.nb-rcard b { font: 800 16px var(--round); margin-top: 4px; } .nb-rcard small { font-size: 11px; color: var(--text2); text-align: center; line-height: 1.25; }
.nb-rcard i { position: absolute; top: 8px; right: 8px; font-style: normal; font-size: 11px; font-weight: 600; background: var(--glass); border-radius: 10px; padding: 2px 8px; }
.nb-rnib { height: 56px; display: grid; place-items: center; }
.nb-new { background: transparent !important; border: 2px dashed var(--stroke); } .nb-new .nb-rnib { font: 800 30px var(--round); color: var(--text2); }
.nb-auditcard { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 4px 0 14px; background: var(--tone-soft); border-color: transparent; }
.nb-auditcard .grow { flex: 1; min-width: 220px; } .nb-auditcard b { font: 800 18px var(--round); }
.nb-areas { display: flex; flex-wrap: wrap; gap: 6px; } .nb-areas span { font-size: 11px; padding: 3px 9px; border-radius: 10px; background: var(--glass); color: var(--text2); }
.nb-areas span.mid { color: var(--text); } .nb-areas span.ok { background: var(--accent); color: var(--on-ink); }
.bubble.thinking { color: var(--text2); animation: nb-pulse 1.4s ease-in-out infinite; }
@keyframes nb-pulse { 50% { opacity: .55; } }

/* ---------- paywall ---------- */
.nb-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nb-plan { border: 2px solid var(--stroke); background: var(--nb-card); color: var(--text); border-radius: 20px; padding: 14px 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; cursor: pointer; font-family: var(--font); text-align: left; transition: border-color .2s, transform .15s; }
.nb-plan:active { transform: scale(.98); }
.nb-plan.on { border-color: var(--text); }
.nb-plan span { display: flex; align-items: center; gap: 8px; } .nb-plan b { font-weight: 600; font-size: 15px; }
.nb-plan em { font-style: normal; font-size: 11px; font-weight: 600; background: #E3F3EA; color: #2F7A58; padding: 2px 8px; border-radius: 8px; }
.nb-plan strong { font: 800 26px var(--round); letter-spacing: -.02em; } .nb-plan small { font: 500 13px var(--font); color: var(--text2); margin-left: 2px; }
.nb-perks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.nb-perks li { padding-left: 28px; position: relative; font-size: 14px; color: var(--text2); }
.nb-perks li::before { content: "✓"; position: absolute; left: 0; top: -1px; width: 20px; height: 20px; border-radius: 10px; background: #E3F3EA; color: #2F7A58; font-size: 12px; font-weight: 800; display: grid; place-items: center; }

/* ---------- notifications + activity ---------- */
.nb-reach { min-height: 0; background: var(--tone-soft); border-color: transparent; }
.nb-reach-in { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.nb-reach-in .grow { flex: 1; min-width: 220px; } .nb-reach-in b { font: 800 18px var(--round); } .nb-reach-in .s { color: var(--text2); font-size: 14px; margin-top: 2px; }
.nb-install { display: flex; flex-direction: column; align-items: center; text-align: center; }
.nb-steps-list { text-align: left; margin: 0; padding-left: 22px; line-height: 2; font-size: 15px; }
.nb-kbd { display: inline-block; border: 1px solid var(--stroke); border-radius: 6px; padding: 0 6px; font-size: 13px; }
.nb-dot { width: 10px; height: 10px; border-radius: 5px; background: var(--tone); flex: none; }

/* ---------- 3.4: share icon, quick nibs, consent ---------- */
.nb-share { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--glass2); color: #0A84FF; vertical-align: middle; margin: 0 2px; }
.nb-quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 520px) { .nb-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.nb-qcard { border: 0; background: var(--soft, var(--glass2)); border-radius: 18px; padding: 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; color: var(--text); font-family: var(--font); transition: transform .15s cubic-bezier(.2,.9,.25,1.1); }
@media (prefers-color-scheme: dark) { .nb-qcard { background: var(--glass2); } }
.nb-qcard:active { transform: scale(.96); } .nb-qcard b { font-size: 13px; text-align: center; } .nb-qcard small { font-size: 11px; color: var(--text2); }
.nb-consent { display: flex; flex-direction: column; gap: 8px; } .nb-consent > b { font: 700 15px var(--round); padding-left: 4px; }

.nb-alt { display: flex; justify-content: center; gap: 4px 14px; flex-wrap: wrap; margin-top: -6px; }

/* ---------- onboarding: set up your nibs ---------- */
.nb-helpers { display: flex; flex-direction: column; gap: 10px; }
.nb-helper { display: flex; align-items: center; gap: 12px; border: 2px solid transparent; background: var(--soft); border-radius: 20px; padding: 8px 14px 8px 10px; cursor: pointer; color: var(--text); font-family: var(--font); text-align: left; transition: border-color .2s, transform .15s; }
@media (prefers-color-scheme: dark) { .nb-helper { background: var(--nb-card); } }
.nb-helper:active { transform: scale(.98); } .nb-helper.on { border-color: var(--c); }
.nb-hnib { flex: none; display: flex; } .nb-htext { flex: 1; display: flex; flex-direction: column; } .nb-htext b { font: 800 17px var(--round); } .nb-htext small { font-size: 13px; color: var(--text2); }
.nb-hcheck { flex: none; width: 30px; height: 30px; border-radius: 15px; display: grid; place-items: center; font-style: normal; font-weight: 800; background: var(--nb-card); color: var(--text2); }
.nb-helper.on .nb-hcheck { background: var(--c); color: #fff; }

/* ===== 4.0 · Chat: texting your nib like a friend (iMessage feel, nibs identity) ===== */
:root { --im-me: #0A7CFF; --im-me-text: #fff; --im-ai: #E9E9EB; --im-ai-text: #111; --im-tap: #E9E9EB; --im-heart: #FF3B5C; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --im-me: #0A84FF; --im-ai: #26262A; --im-ai-text: #F2F2F2; --im-tap: #3A3A3E; --im-heart: #FF4D6A; } }
:root[data-theme="dark"] { --im-me: #0A84FF; --im-ai: #26262A; --im-ai-text: #F2F2F2; --im-tap: #3A3A3E; --im-heart: #FF4D6A; }
.wrap:has(> .im) { max-width: 760px; padding-bottom: 0; padding-top: 0; }
main:has(.im) .topbar { display: none; }
body:has(.im) .nb-help { top: calc(14px + env(safe-area-inset-top)); bottom: auto; }
.im { display: flex; flex-direction: column; min-height: 100dvh; }
.im-head { position: sticky; top: 0; z-index: 15; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: calc(10px + env(safe-area-inset-top)) 0 12px;
  background: var(--wallbase); }
.im-head::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 18px; background: linear-gradient(var(--wallbase), transparent); pointer-events: none; }
.im-who { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; background: none; cursor: pointer; color: var(--text); font: inherit; }
.im-av { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; background: var(--soft); animation: im-float 4s ease-in-out infinite; }
.im-av.sm { width: 38px; height: 38px; animation: none; flex: none; }
.im-av.plus { background: var(--glass2); font: 800 20px var(--round); color: var(--text2); }
.im-name { display: inline-flex; align-items: center; gap: 2px; padding: 4px 8px 4px 12px; border-radius: 99px; background: var(--glass); border: 1px solid var(--stroke); font: 700 14px var(--round); }
.im-name svg { color: var(--text3); }
.im-status { min-height: 18px; font-size: 12.5px; color: var(--text2); display: flex; align-items: center; gap: 6px; opacity: 0; transition: opacity .25s; }
.im-status.on { opacity: 1; }
.im-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--tone); animation: nb-pulse 1.2s ease-in-out infinite; }
.im-thread { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 6px 2px 12px; }
.im-when { align-self: center; font-size: 11.5px; font-weight: 600; color: var(--text3); margin: 14px 0 6px; }
.im-row { display: flex; }
.im-row.me { justify-content: flex-end; }
.im-row.end { margin-bottom: 8px; }
.im-b { position: relative; max-width: min(78%, 520px); padding: 8px 13px; border-radius: 19px; font-size: 16px; line-height: 1.34; white-space: pre-wrap; overflow-wrap: anywhere; animation: im-in .28s var(--ease, ease-out); }
.im-b.me { background: var(--im-me); color: var(--im-me-text); }
.im-b.ai { background: var(--im-ai); color: var(--im-ai-text); -webkit-user-select: text; user-select: text; }
.im-row.end .im-b.me { border-bottom-right-radius: 5px; }
.im-row.end .im-b.ai { border-bottom-left-radius: 5px; }
.im-b.err { background: transparent; border: 1px solid var(--stroke); color: var(--text2); font-size: 14px; }
.im-b a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.im-b.me a { color: #fff; }
.im-photo { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; margin-right: 6px; border-radius: 99px; background: rgba(255,255,255,.22); }
.im-tap { position: absolute; top: -14px; left: -14px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--im-tap); border: 2px solid var(--wallbase); color: var(--im-me); }
.im-tap.heart { color: var(--im-heart); }
.im-b.ai .im-tap { left: auto; right: -14px; }
.im-tap.pop { animation: im-pop .45s cubic-bezier(.3,1.6,.5,1); }
.im-row.me .im-b:has(.im-tap) { margin-top: 12px; }
.im-row.ai .im-b:has(.im-tap) { margin-top: 12px; }
.im-typing { display: inline-flex; gap: 4px; padding: 13px 14px; }
.im-typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--text3); animation: im-dot 1.2s infinite; }
.im-typing i:nth-child(2) { animation-delay: .15s; } .im-typing i:nth-child(3) { animation-delay: .3s; }
.im-cards { display: flex; flex-direction: column; gap: 6px; max-width: min(78%, 420px); margin: 2px 0 8px; }
.im-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: var(--glass); border: 1px solid var(--stroke); color: var(--text); text-decoration: none; }
.im-card b { display: block; font-size: 14px; }
.im-card small { display: block; font-size: 12px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.im-card-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--glass2); color: var(--text2); flex: none; }
.im-card svg:last-child { color: var(--text3); flex: none; }
.im-hello { align-self: center; text-align: center; max-width: 340px; margin: 6vh auto 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.im-hello-nib { display: grid; place-items: center; width: 120px; height: 120px; border-radius: 36px; background: var(--soft); margin-bottom: 6px; }
.im-hello b { font: 800 22px var(--round); }
.im-hello p { margin: 0 0 8px; color: var(--text2); line-height: 1.45; }
.im-draft { margin: 8px 0; }
.im-dock { position: sticky; bottom: 0; z-index: 14; padding: 8px 0 calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(color-mix(in srgb, var(--wallbase) 0%, transparent), var(--wallbase) 26%); }
.im-ideas { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.im-ideas::-webkit-scrollbar { display: none; }
.im-idea { flex: none; border: 1px solid var(--stroke); background: var(--glass); color: var(--text); border-radius: 18px; padding: 9px 14px; font: 600 14px var(--font); cursor: pointer; }
.im-compose { display: flex; align-items: flex-end; gap: 8px; }
.im-plus { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--glass2); color: var(--text2); display: grid; place-items: center; cursor: pointer; }
.im-att { flex: none; align-self: center; border: 0; border-radius: 99px; padding: 6px 10px; background: var(--im-me); color: #fff; font: 700 12px var(--font); }
.im-field { flex: 1; display: flex; align-items: flex-end; min-height: 38px; border: 1px solid var(--stroke); background: var(--field); border-radius: 20px; padding: 3px 4px 3px 14px; }
.im-field textarea { flex: 1; border: 0; outline: 0; background: none; color: var(--text); font: 16px/1.35 var(--font); resize: none; padding: 6px 0; max-height: 140px; }
.im-mic, .im-send { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; }
.im-mic { background: none; color: var(--text2); }
.im-send { background: var(--im-me); color: #fff; display: none; }
.im-field.typed .im-send { display: grid; }
.im-field.typed .im-mic { display: none; }
.im-field:focus-within { border-color: var(--text3); }
@media (max-width: 860px) { .im-dock { padding-bottom: calc(88px + env(safe-area-inset-bottom)); } .im { min-height: calc(100dvh - 10px); } }
@keyframes im-in { from { opacity: 0; transform: translateY(6px) scale(.98); } }
@keyframes im-pop { 0% { transform: scale(0); } 70% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes im-dot { 0%, 60%, 100% { opacity: .35; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
@keyframes im-float { 50% { transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .im-av, .im-b, .im-tap.pop, .im-typing i { animation: none; } }

/* ===== Feed ===== */
.fd-prompt { margin: 6px 0 14px; padding: 16px 18px; }
.fd-prompt .fd-ph { display: flex; justify-content: space-between; align-items: center; }
.fd-prompt p { margin: 6px 0 12px; color: var(--text2); line-height: 1.45; }
.fd-prompt.folded p { margin-bottom: 0; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.fd-prompt .btns { justify-content: flex-end; }
.fd-status { justify-content: center; margin-bottom: 8px; }
.fd-list { display: flex; flex-direction: column; gap: 12px; }
.fd-post { padding: 16px 18px; }
.fd-by { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.fd-by .im-av.sm { width: 30px; height: 30px; }
.fd-post h3 { font: 800 18px/1.25 var(--round); margin: 12px 0 6px; color: var(--text); text-transform: none; letter-spacing: 0; }
.fd-emo { margin-right: 6px; }
.fd-post p { margin: 0; line-height: 1.5; color: var(--text); white-space: pre-wrap; }
.fd-post p a { color: inherit; }
.fd-acts { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.fd-like { border: 0; background: none; color: var(--text2); width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.fd-like.on { color: var(--im-heart); }
.fd-like svg { width: 20px; height: 20px; }
.fd-like.pop svg { animation: im-pop .45s cubic-bezier(.3,1.6,.5,1); }

/* ===== Ideas ===== */
.id-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 6px 0 8px; }
.id-card { text-align: left; border: 0; border-radius: var(--r); padding: 18px; background: var(--soft); color: #1E2124; display: flex; flex-direction: column; gap: 6px; cursor: pointer; font: inherit; transition: transform .2s; }
.id-card:active { transform: scale(.98); }
.id-card b { font: 800 17px/1.25 var(--round); }
.id-card small { font-size: 13.5px; line-height: 1.4; color: #4A4E54; }
.id-emo { font-size: 26px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .id-card { background: var(--glass); color: var(--text); border: 1px solid var(--stroke); } :root:not([data-theme="light"]) .id-card small { color: var(--text2); } }
.more-ic { display: grid; place-items: center; width: 32px; color: var(--text2); }
.fd-status:not(.on) { display: none; }

/* request access */
.nb-or { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 360px; color: var(--text3); font-size: 13px; margin: 6px 0; }
.nb-or::before, .nb-or::after { content: ""; flex: 1; height: 1px; background: var(--stroke); }
#nbReq { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 360px; }
#nbReq textarea.nb-input { resize: none; font: 16px/1.4 var(--font); letter-spacing: 0; text-align: left; }
#nbReq .nb-input { text-align: left; letter-spacing: 0; font: 400 17px/1.35 var(--font); width: 100%; box-sizing: border-box; padding: 14px 16px; background: var(--field); border: 1px solid var(--stroke); border-radius: 16px; color: var(--text); outline: none; }
#nbReq .nb-input:focus { border-color: var(--text2); }
.nb-next { list-style: none; counter-reset: s; padding: 0; margin: 4px 0 8px; width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 10px; }
.nb-next li { counter-increment: s; display: flex; flex-direction: column; padding: 12px 14px 12px 50px; position: relative; background: var(--glass); border: 1px solid var(--stroke); border-radius: 18px; font-size: 13px; color: var(--text2); text-align: left; }
.nb-next li b { color: var(--text); font-size: 15px; }
.nb-next li::before { content: counter(s); position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--on-ink); display: grid; place-items: center; font: 700 13px var(--round); }

/* unread counts (iMessage-style) */
nav.tabs button, nav.side button { position: relative; }
.nb-count { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #FF3B30; color: #fff; font: 700 11px/18px var(--font); font-style: normal; text-align: center; box-shadow: 0 0 0 2px var(--wallbase); animation: im-pop .4s cubic-bezier(.3,1.6,.5,1); }
nav.side .nb-count { position: static; margin-left: auto; box-shadow: none; }
nav.tabs .nb-count { box-shadow: 0 0 0 2px #1E2124; }
.im-new { color: #FF3B30; font-weight: 700; }

/* things your nib made */
.im-art { text-align: left; font: inherit; cursor: pointer; width: 100%; }
.im-img { margin: 2px 0 8px; max-width: min(78%, 360px); }
.im-img img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 18px; background: var(--glass2); display: block; cursor: zoom-in; }
.im-img figcaption { font-size: 11px; color: var(--text3); margin-top: 4px; }
.im-img.fail img { display: none; } .im-img.fail::before { content: "The image couldn't load — ask again in a moment."; display: block; padding: 12px 14px; border-radius: 16px; background: var(--glass2); color: var(--text2); font-size: 14px; }
.made-list { max-width: none; margin-bottom: 8px; }
body.art-open { overflow: hidden; }
.art-view { position: fixed; inset: 0; z-index: 90; background: var(--wallbase); display: flex; flex-direction: column; animation: im-in .2s ease-out; }
.art-view header { display: flex; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; border-bottom: 1px solid var(--stroke); }
.art-view header b { flex: 1; font: 700 16px var(--round); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.art-x { border: 0; background: var(--glass2); color: var(--text); width: 34px; height: 34px; border-radius: 50%; font-size: 15px; cursor: pointer; }
.art-view iframe { flex: 1; width: 100%; border: 0; background: #fff; }
.art-imgwrap { flex: 1; display: grid; place-items: center; padding: 16px; overflow: auto; } .art-imgwrap img { max-width: 100%; max-height: 100%; border-radius: 18px; }

/* will I make it? */
.fc-card { margin: 12px 0; cursor: pointer; }
.fc-card.warn { background: #FDE6DE; border-color: #F5C4B3; } .fc-card.warn b { color: #712B13; }
.fc-card.ok { background: #E3F3EA; border-color: #C0DD97; } .fc-card.ok b { color: #27500A; }
@media (prefers-color-scheme: dark) { .fc-card.warn { background: #3A2620; border-color: #712B13; } .fc-card.warn b { color: #F5C4B3; } .fc-card.ok { background: #1E2E24; border-color: #27500A; } .fc-card.ok b { color: #C0DD97; } }
.fc-h { display: flex; align-items: center; gap: 8px; } .fc-ic { display: grid; place-items: center; }
.fc-bar { display: flex; gap: 4px; } .fc-bar span { flex: 1; height: 6px; border-radius: 3px; background: var(--text3); } .fc-bar .in { background: var(--green); } .fc-bar .neg { background: var(--red); }
.life { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px; border-radius: 16px; background: var(--glass); border: 1px solid var(--stroke); max-width: min(78%, 420px); margin: 2px 0 8px; }
.life small { flex-basis: 100%; color: var(--text2); font-size: 12px; }
.fn { display: flex; flex-direction: column; gap: 8px; } .fn-step { position: relative; display: flex; gap: 10px; align-items: baseline; padding: 6px 10px; border-radius: 10px; overflow: hidden; }
.fn-step b { font: 800 16px var(--round); min-width: 32px; z-index: 1; } .fn-step span { z-index: 1; font-size: 14px; } .fn-step i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--glass2); z-index: 0; }
