/* Dr Neon — the new dr-neon.com (neon-fast 1.10): ChatGPT's shape, Dr Neon's name and colours. */
:root {
  color-scheme: light;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Noto Sans Arabic", "Noto Naskh Arabic", Tahoma, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --bg: #ffffff; --side: #f9f9f9; --ink: #0d0d0d; --ink2: #5d5d5d; --ink3: #8f8f8f;
  --line: #e5e5e5; --line2: #efefef; --hover: #ececec; --active: #e3e3e3;
  --bubble: #f2f2f2; --composer: #ffffff; --composer-line: #e2e2e2;
  --composer-shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 22px rgba(0,0,0,.06);
  --btn: #0d0d0d; --btn-ink: #ffffff; --btn-off: #d9d9d9; --btn-off-ink: #ffffff;
  --code-bg: #f7f7f8; --code-head: #ececf1; --code-inline: #ececec;
  --link: #6d28d9; --accent: #7c3aed; --accent-soft: #f1eafe; --danger: #d92d20; --ok: #138a52;
  --menu: #ffffff; --menu-line: #e8e8e8; --menu-shadow: 0 10px 34px rgba(0,0,0,.14), 0 0 0 1px rgba(0,0,0,.04);
  --scrim: rgba(0,0,0,.42); --chip: #ffffff;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #212121; --side: #181818; --ink: #ececec; --ink2: #b4b4b4; --ink3: #8a8a8a;
  --line: #3a3a3a; --line2: #2c2c2c; --hover: #2a2a2a; --active: #323232;
  --bubble: #303030; --composer: #303030; --composer-line: #303030;
  --composer-shadow: 0 1px 2px rgba(0,0,0,.2), 0 8px 26px rgba(0,0,0,.28);
  --btn: #ececec; --btn-ink: #0d0d0d; --btn-off: #4a4a4a; --btn-off-ink: #2a2a2a;
  --code-bg: #171717; --code-head: #2a2a2a; --code-inline: #353535;
  --link: #b9a2ff; --accent: #a78bfa; --accent-soft: #2d2445; --danger: #ff6b5f; --ok: #3fbf7f;
  --menu: #2f2f2f; --menu-line: #3d3d3d; --menu-shadow: 0 12px 38px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.06);
  --scrim: rgba(0,0,0,.58); --chip: #262626;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.75 var(--font); overflow: hidden; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg .f { fill: currentColor; stroke: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
kbd { font: 11px/1 var(--font); color: var(--ink3); }

#app { display: flex; height: 100vh; height: 100dvh; }

/* ------------------------------------------------------------------ the side bar */
#side { width: 260px; flex: none; background: var(--side); display: flex; flex-direction: column; padding: 8px 8px 10px; transition: margin .22s ease, transform .25s ease; z-index: 40; }
.side-off #side { margin-inline-start: -260px; }
.side-top { display: flex; align-items: center; justify-content: space-between; height: 46px; padding: 0 4px 0 2px; flex: none; }
.logo { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; }
.logo:hover { background: var(--hover); }
.logo img { display: block; width: 28px; height: 28px; border-radius: 8px; }
.ibtn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: var(--ink2); }
.ibtn:hover { background: var(--hover); color: var(--ink); }
.side-nav { display: flex; flex-direction: column; gap: 1px; margin-top: 4px; flex: none; }
.nav { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; font-size: 14.5px; text-align: start; width: 100%; color: var(--ink); }
.nav:hover { background: var(--hover); }
.nav.on { background: var(--active); }
.nav kbd { margin-inline-start: auto; opacity: 0; transition: opacity .12s; }
.nav:hover kbd { opacity: 1; }
.chats { flex: 1; overflow-y: auto; margin: 14px -4px 0; padding: 0 4px; scrollbar-width: thin; }
.group { font-size: 12.5px; color: var(--ink3); padding: 14px 10px 4px; font-weight: 600; }
.group:first-child { padding-top: 2px; }
.chat { position: relative; display: flex; align-items: center; border-radius: 10px; }
.chat:hover { background: var(--hover); }
.chat.on { background: var(--active); }
.chat > a { flex: 1; min-width: 0; padding: 7px 10px; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat .more { position: absolute; inset-inline-end: 4px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: var(--ink2); opacity: 0; background: inherit; }
.chat .more:hover { color: var(--ink); }
.chat:hover .more, .chat.on .more, .chat .more[aria-expanded="true"] { opacity: 1; }
.chat:hover > a, .chat.on > a { padding-inline-end: 36px; }
.chat.live > a::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-inline-end: 7px; vertical-align: middle; animation: pulse 1.2s ease-in-out infinite; }
.chat input { flex: 1; min-width: 0; margin: 3px 4px; padding: 4px 8px; border: 1px solid var(--accent); border-radius: 8px; background: var(--bg); outline: none; font-size: 14.5px; }
.side-empty { color: var(--ink3); font-size: 13.5px; padding: 10px; line-height: 1.6; }
.account { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; margin-top: 6px; text-align: start; width: 100%; flex: none; }
.account:hover { background: var(--hover); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #a855f7, #22c5e8); flex: none; }
.avatar svg { width: 18px; height: 18px; }
.acc-text { display: flex; flex-direction: column; line-height: 1.35; flex: 1; min-width: 0; }
.acc-text b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-text small { color: var(--ink2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-gear { color: var(--ink3); width: 18px; height: 18px; }
.scrim { display: none; }

/* ------------------------------------------------------------------ the main column */
#main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }
#top { height: 56px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; gap: 6px; }
.top-start, .top-end { display: flex; align-items: center; gap: 2px; }
#sideOpen, #topNew { display: none; }
.side-off #sideOpen, .side-off #topNew { display: inline-grid; }
.only-narrow { display: none !important; }
.brand { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 10px; border-radius: 10px; font-size: 18px; font-weight: 600; color: var(--ink); }
.brand:hover, .brand[aria-expanded="true"] { background: var(--hover); }
.brand svg { width: 16px; height: 16px; color: var(--ink2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink3); display: inline-block; }
.dot.on { background: #22b573; box-shadow: 0 0 0 3px rgba(34,181,115,.16); }
.dot.wait { background: #f2a516; box-shadow: 0 0 0 3px rgba(242,165,22,.18); }
.dot.off { background: var(--danger); box-shadow: 0 0 0 3px rgba(217,45,32,.16); }

.view { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.scroller { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scroll-behavior: auto; }
.thread { max-width: 48rem; margin: 0 auto; padding: 6px 24px 28px; }
.hero { display: none; }
.view.empty .hero { display: block; text-align: center; padding: 0 24px; }
.hero h1 { font-size: 28px; font-weight: 600; line-height: 1.35; margin: 0 0 26px; letter-spacing: -.01em; }
@media (min-width: 768px) {
  .view.empty { justify-content: center; padding-bottom: 8vh; }
  .view.empty .scroller { flex: none; overflow: visible; }
  .view.empty .thread { display: none; }
}

/* the conversation */
.turn { margin: 0 0 30px; }
.turn.user { display: flex; flex-direction: column; align-items: flex-end; }
.bubble { background: var(--bubble); border-radius: 22px; padding: 9px 18px; max-width: min(78%, 34rem); white-space: pre-wrap; overflow-wrap: anywhere; }
.u-att { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; margin-bottom: 8px; max-width: 78%; }
.u-att img { width: 132px; height: 132px; object-fit: cover; border-radius: 16px; display: block; border: 1px solid var(--line2); }
.u-att .pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; font-size: 13.5px; background: var(--bg); max-width: 260px; }
.u-att .pill i { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: #ff5b7f; color: #fff; font-style: normal; font-size: 15px; flex: none; }
.u-att .pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.edit-box { width: min(100%, 40rem); background: var(--bubble); border-radius: 22px; padding: 10px 14px; }
.edit-box textarea { width: 100%; min-height: 60px; max-height: 50vh; border: 0; outline: none; resize: none; background: transparent; line-height: 1.7; }
.edit-box .row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; }
.pbtn { border-radius: 999px; padding: 6px 16px; font-size: 14px; font-weight: 600; background: var(--btn); color: var(--btn-ink); }
.pbtn.ghost { background: var(--bg); color: var(--ink); border: 1px solid var(--line); }
.pbtn.danger { background: var(--danger); color: #fff; }
.pbtn:disabled { opacity: .5; cursor: default; }

.turn.bot .md { overflow-wrap: anywhere; }
.status { display: flex; align-items: center; gap: 10px; color: var(--ink2); font-size: 15px; min-height: 28px; }
.pulse { width: 12px; height: 12px; border-radius: 50%; background: var(--ink); animation: pulse 1.1s ease-in-out infinite; flex: none; }
@keyframes pulse { 0%, 100% { transform: scale(.72); opacity: .55; } 50% { transform: scale(1); opacity: 1; } }
.turn.bot.err .md { color: var(--danger); }
.err-row { display: flex; gap: 8px; margin-top: 8px; }
.typing .md > :last-child::after { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); margin-inline-start: 4px; vertical-align: baseline; animation: pulse 1s ease-in-out infinite; }
.typing .md > .md-code:last-child::after, .typing .md > .md-table:last-child::after, .typing .md > ul:last-child::after, .typing .md > ol:last-child::after { display: none; }

.acts { display: flex; gap: 2px; margin-top: 6px; min-height: 32px; }
.turn.user .acts { opacity: 0; transition: opacity .12s; }
.turn.user:hover .acts, .turn.user:focus-within .acts { opacity: 1; }
.abtn { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: var(--ink2); }
.abtn:hover { background: var(--hover); color: var(--ink); }
.abtn.on { color: var(--accent); }
.abtn svg { width: 18px; height: 18px; }

/* the answer's extras: sources, pictures, a button for the phone */
.media { margin-top: 14px; }
.mrest { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.mrest:first-child { margin-top: 0; }
.mrest figure { margin: 0; }
.mrest figure.wide { grid-column: 1 / -1; }
.mrest img, .mrest video { width: 100%; border-radius: 12px; display: block; background: var(--code-bg); }
.mrest img { aspect-ratio: 4 / 3; object-fit: cover; }
.mrest figcaption { font-size: 12px; color: var(--ink3); margin-top: 4px; line-height: 1.5; }
/* 1.12.0: the place's pictures — a gallery under the answer */
.mhead { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink2); margin-bottom: 8px; }
.mhead svg { width: 16px; height: 16px; }
.mgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; border-radius: 16px; overflow: hidden; max-width: 600px; }
.mgrid.n1 { grid-template-columns: 1fr; }
.mpic { position: relative; display: block; padding: 0; margin: 0; border: 0; cursor: zoom-in; overflow: hidden; background: var(--code-bg); aspect-ratio: 4 / 3; }
.mgrid.n1 .mpic, .mgrid.n3 .mpic:first-child { aspect-ratio: 16 / 9; }
.mgrid.n3 .mpic:first-child { grid-column: 1 / -1; }
.mpic img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.mpic:hover img { transform: scale(1.04); }
.mpic:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; border-radius: 0; }
.mpic.broken img { visibility: hidden; }
.mcap { position: absolute; inset: auto 0 0 0; padding: 26px 10px 7px; display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  background: linear-gradient(to top, rgba(0,0,0,.72), rgba(0,0,0,.34) 62%, transparent); color: #fff; pointer-events: none; }
.mcap b, .mcap small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; unicode-bidi: plaintext; }
.mcap b { font-size: 12.5px; font-weight: 600; line-height: 1.35; }
.mcap small { font-size: 10.5px; opacity: .82; }
/* 1.13.0: a YouTube video under the answer */
.vcard { display: flex; align-items: stretch; gap: 12px; width: 100%; max-width: 600px; margin-top: 10px; padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--chip); color: var(--ink); cursor: pointer; overflow: hidden; text-align: start; font: inherit; }
.vcard:hover { border-color: var(--ink3); }
.vthumb { position: relative; flex: none; width: 44%; max-width: 240px; aspect-ratio: 16 / 9; background: #000; }
.vthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vplay { position: absolute; inset: 0; margin: auto; width: 48px; height: 48px; border-radius: 50%; background: rgba(0,0,0,.62); color: #fff; display: grid; place-items: center; transition: transform .2s; }
.vcard:hover .vplay { transform: scale(1.08); background: #e62117; }
.vplay svg { width: 24px; height: 24px; margin-left: 3px; } /* ▶ points right in every language */
.vtxt { flex: 1; min-width: 0; padding: 10px 4px 10px 12px; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.vtxt small { font-size: 12px; color: var(--ink3); }
.vtxt b { font-size: 14px; font-weight: 600; line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; unicode-bidi: plaintext; }
.vch { font-size: 12px; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 1.13.0: the program's exercises, one card each */
.wk { margin-top: 14px; max-width: 640px; }
.wk-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.wk-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-top: 1px solid var(--line2); background: var(--chip); }
.wk-card:first-child { border-top: 0; }
.wk-n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px; display: grid; place-items: center; }
.wk-pic { position: relative; flex: none; width: 96px; height: 72px; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: #fff; cursor: zoom-in; display: grid; place-items: center; color: #999; }
.wk-pic.drawn { box-shadow: inset 0 0 0 1px var(--line2); }
.wk-pic.thumb { background: #000; cursor: pointer; }
.wk-pic:disabled { cursor: default; background: var(--code-bg); }
.wk-pic svg { width: 28px; height: 28px; }
.wk-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.wk-pic.thumb img { object-fit: cover; padding: 0; }
.wk-pic img.f2 { animation: wkflip 2.4s steps(1, end) infinite; }
@keyframes wkflip { 0% { opacity: 0; } 50% { opacity: 1; } 100% { opacity: 0; } }
.wk-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wk-name { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.wk-name b { font-size: 15px; font-weight: 650; }
.wk-name small { font-size: 12px; color: var(--ink3); direction: ltr; unicode-bidi: isolate; }
.wk-d { font-size: 13.5px; color: var(--ink); font-variant-numeric: tabular-nums; }
.wk-m { font-size: 12px; color: var(--ink3); }
.wk-play { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #e62117; color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 8px rgba(230,33,23,.3); }
.wk-play:hover { transform: scale(1.06); }
.wk-play svg { width: 20px; height: 20px; margin-left: 2px; }
.wk-credit { font-size: 11px; color: var(--ink3); margin-top: 6px; }
@media (prefers-reduced-motion: reduce) { .wk-pic img.f2 { animation: none; opacity: 0; } }
/* 1.15.0: the coach's program — the days, the cards that open, the warm-up row, and the guided session */
.coach .ck-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.coach .ck-tabs::-webkit-scrollbar { display: none; }
.ck-tab { flex: none; border: 1px solid var(--line); background: var(--chip); color: var(--ink2); border-radius: 999px; padding: 5px 14px; font: 600 13.5px/1.4 var(--font); cursor: pointer; }
.ck-tab.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.ck-dtitle { font-weight: 650; font-size: 14.5px; margin: 2px 2px 8px; }
.ck-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--chip); }
.ck-card { border-top: 1px solid var(--line2); }
.ck-card:first-child { border-top: 0; }
.ck-top { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; background: none; color: var(--ink); font: inherit; text-align: start; cursor: pointer; }
.ck-top:hover { background: var(--hover); }
.ck-move { position: relative; flex: none; width: 92px; height: 92px; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: inset 0 0 0 1px var(--line2); display: grid; place-items: center; color: #999; }
.ck-move img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.ck-move img.f2 { animation: wkflip 2.4s steps(1, end) infinite; }
.ck-move.thumb img { object-fit: cover; }
.ck-move.none { background: var(--code-bg); }
.ck-move.none svg { width: 28px; height: 28px; }
.ck-move.sm { width: 64px; height: 64px; border-radius: 12px; }
.ck-move.lg { width: min(100%, 360px); height: auto; aspect-ratio: 1 / 1; margin: 0 auto; }
.ck-move.run { width: min(78vw, 46vh, 420px); height: auto; aspect-ratio: 1 / 1; margin: 0 auto; border-radius: 20px; }
.ck-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ck-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.ck-chip { font-size: 12.5px; line-height: 1.4; padding: 2px 9px; border-radius: 999px; background: var(--code-bg); color: var(--ink2); font-variant-numeric: tabular-nums; }
.ck-chip.main { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.ck-chip.tech { background: transparent; border: 1px dashed var(--accent); color: var(--accent); }
.ck-chev { flex: none; width: 18px; height: 18px; color: var(--ink3); transition: transform .2s ease; }
.ck-card.open .ck-chev { transform: rotate(180deg); }
.ck-body { padding: 4px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.ck-big { position: relative; padding: 0; border: 0; background: none; cursor: zoom-in; display: block; width: 100%; }
.ck-caps { display: flex; justify-content: space-between; max-width: 360px; margin: 6px auto 0; font-size: 12px; color: var(--ink3); }
.ck-how { display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; line-height: 1.7; }
.ck-mus { display: flex; align-items: center; gap: 8px; color: var(--ink2); font-size: 13.5px; }
.ck-mimg { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; background: #fff; box-shadow: inset 0 0 0 1px var(--line2); }
.ck-note { font-size: 13px; color: var(--ink2); background: var(--code-bg); border-radius: 10px; padding: 6px 10px; }
.ck-h { font-size: 13px; color: var(--ink2); margin-top: 4px; }
.ck-steps { margin: 0; padding-inline-start: 22px; display: flex; flex-direction: column; gap: 4px; }
.ck-steps li::marker { color: var(--accent); font-weight: 700; }
.ck-tips { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ck-tips li { display: flex; gap: 6px; align-items: flex-start; }
.ck-tips svg { flex: none; width: 16px; height: 16px; margin-top: 5px; color: #d99a00; }
.ck-vid { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 7px 14px; background: #e62117; color: #fff; font: 600 13.5px/1.4 var(--font); cursor: pointer; }
.ck-vid svg { width: 16px; height: 16px; }
.ck-go { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 10px; border: 0; border-radius: 14px; padding: 12px 16px; background: var(--btn); color: var(--btn-ink); font: 700 15px/1.4 var(--font); cursor: pointer; }
.ck-go svg { width: 18px; height: 18px; }
.ck-phase { margin: 4px 0 12px; }
.ck-ptitle { display: block; font-size: 13px; color: var(--ink2); margin-bottom: 6px; }
.ck-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.ck-mini { flex: none; display: flex; align-items: center; gap: 8px; max-width: 260px; padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--chip); color: var(--ink); font: inherit; text-align: start; cursor: pointer; }
.ck-mtxt { display: flex; flex-direction: column; min-width: 0; }
.ck-mtxt b { font-size: 13.5px; font-weight: 600; }
.ck-mtxt small { font-size: 12px; color: var(--ink3); }
.coach .wk-credit a { color: inherit; }
/* one exercise big */
.lb.ck-sheetback { background: var(--scrim); align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.ck-sheet { width: min(560px, 100%); max-height: calc(100% - 20px); overflow-y: auto; background: var(--bg); color: var(--ink); border-radius: 20px; padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.ck-shtop { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ck-sheet .lb-x { color: var(--ink2); }
/* the guided session */
.lb.ck-run { background: var(--bg); color: var(--ink); }
.ck-run .lb-top { color: var(--ink2); }
.ck-run .lb-x { color: var(--ink2); }
.ck-bar { height: 4px; margin: 0 12px; background: var(--line2); border-radius: 4px; overflow: hidden; }
.ck-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s ease; }
.ck-stage { flex: 1; overflow-y: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px)); text-align: center; }
.ck-rname { justify-content: center; }
.ck-rname b { font-size: 20px; }
.ck-set { font-size: 14px; color: var(--ink2); }
.ck-reps { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.3; }
.ck-rtech { font-size: 13.5px; color: var(--accent); max-width: 34rem; }
.ck-trow { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 6px; }
.ck-trow .pbtn { padding: 10px 22px; font-size: 15.5px; }
.ck-rhow { width: min(560px, 100%); text-align: start; border: 1px solid var(--line); border-radius: 14px; padding: 8px 14px; }
.ck-rhow summary { cursor: pointer; color: var(--ink2); font-size: 14px; }
.ck-timer { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 8vh; }
.ck-tlabel { font-size: 16px; color: var(--ink2); }
.ck-tbig { font-size: clamp(64px, 18vw, 120px); font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; color: var(--accent); }
.ck-timer.work .ck-tbig { color: var(--ok); }
.ck-tnext { font-size: 14px; color: var(--ink2); }
.ck-done { margin-top: 10vh; display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 30rem; }
.ck-dbig { font-size: 64px; line-height: 1; }
.ck-done b { font-size: 20px; }
.ck-done p { color: var(--ink2); margin: 0; }
@media (max-width: 480px) { .ck-move { width: 76px; height: 76px; } .ck-top { gap: 10px; padding: 9px 10px; } }
@media (prefers-reduced-motion: reduce) { .ck-move img.f2 { animation: none; opacity: 0; } }

/* a video big (YouTube's player) */
.lbv-mid { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 0 12px 16px; }
.lbv-frame { width: min(960px, 100%, calc((100vh - 170px) * 16 / 9)); aspect-ratio: 16 / 9; background: #000; border-radius: 10px; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.lbv-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.lbv .lb-count { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: calc(100% - 60px); unicode-bidi: plaintext; }
/* a picture big */
.lb { position: fixed; inset: 0; z-index: 90; background: rgba(8,8,8,.94); display: flex; flex-direction: column; animation: fade .14s ease; }
.lb-top { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; color: #ddd; font-size: 13px; }
.lb-x { width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lb-x:hover { background: rgba(255,255,255,.2); }
.lb-x svg { width: 20px; height: 20px; }
.lb-fig { flex: 1; min-height: 0; margin: 0; padding: 0 12px 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.lb-fig img { max-width: 100%; max-height: calc(100vh - 170px); max-height: calc(100dvh - 170px); object-fit: contain; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.lb-cap { color: #eee; text-align: center; font-size: 13.5px; line-height: 1.5; max-width: 760px; display: flex; flex-direction: column; gap: 2px; }
.lb-cap span { color: #b9b9b9; font-size: 12px; }
.lb-cap a { color: #9ecbff; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lb-nav:hover { background: rgba(255,255,255,.24); }
.lb-nav svg { width: 22px; height: 22px; }
.lb-prev { right: 12px; } .lb-prev svg { transform: rotate(-90deg); }
.lb-next { left: 12px; } .lb-next svg { transform: rotate(90deg); }
.act { margin-top: 12px; }
.actbtn { display: inline-block; padding: 10px 20px; border-radius: 999px; background: var(--btn); color: var(--btn-ink); font-weight: 600; }

/* Markdown */
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 14px; }
.md h1, .md h2, .md h3, .md h4, .md h5, .md h6 { font-weight: 700; line-height: 1.45; margin: 24px 0 10px; }
.md h1 { font-size: 1.55em; } .md h2 { font-size: 1.32em; } .md h3 { font-size: 1.15em; } .md h4, .md h5, .md h6 { font-size: 1em; }
.md ul, .md ol { margin: 0 0 14px; padding-inline-start: 26px; }
.md li { margin: 4px 0; padding-inline-start: 2px; }
.md li > ul, .md li > ol { margin: 4px 0 0; }
.md li::marker { color: var(--ink2); }
.md blockquote { margin: 0 0 14px; padding: 2px 16px; border-inline-start: 3px solid var(--line); color: var(--ink2); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
.md a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.md strong { font-weight: 700; }
.md code { font-family: var(--mono); font-size: .86em; background: var(--code-inline); padding: .12em .42em; border-radius: 6px; direction: ltr; unicode-bidi: isolate; }
.md-code { margin: 0 0 16px; border-radius: 14px; overflow: hidden; background: var(--code-bg); border: 1px solid var(--line2); }
.md-code-head { display: flex; align-items: center; justify-content: space-between; direction: ltr; padding: 6px 12px; font-size: 12px; color: var(--ink2); background: var(--code-head); }
.md-copy { font-size: 12px; color: var(--ink2); padding: 2px 8px; border-radius: 6px; direction: rtl; }
.md-copy:hover { color: var(--ink); background: var(--hover); }
.md-code pre { margin: 0; padding: 14px 16px; overflow-x: auto; direction: ltr; text-align: left; }
.md-code pre code { background: none; padding: 0; font-size: 13.5px; line-height: 1.65; white-space: pre; }
.md-table { overflow-x: auto; margin: 0 0 16px; border: 1px solid var(--line2); border-radius: 12px; }
.md table { border-collapse: collapse; width: 100%; font-size: 15px; }
.md th, .md td { padding: 8px 14px; text-align: start; border-bottom: 1px solid var(--line2); vertical-align: top; }
.md tr:last-child td { border-bottom: 0; }
.md th { font-weight: 600; background: var(--code-bg); }
.md-task { color: var(--ink2); }

/* ------------------------------------------------------------------ the message box */
.dock { flex: none; padding: 0 16px 8px; padding-bottom: max(8px, env(safe-area-inset-bottom)); position: relative; }
.composer { width: 100%; max-width: 48rem; margin: 0 auto; background: var(--composer); border: 1px solid var(--composer-line); border-radius: 28px; box-shadow: var(--composer-shadow); padding: 10px 10px 8px; cursor: text; }
.composer textarea { display: block; width: 100%; border: 0; outline: none; background: transparent; resize: none; line-height: 1.6; padding: 4px 10px 6px; max-height: 38vh; min-height: 32px; overflow-y: auto; font-size: 16px; }
.composer textarea::placeholder { color: var(--ink3); }
.c-row { display: flex; align-items: center; gap: 6px; }
.cbtn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--ink); border: 1px solid var(--line); }
.cbtn:hover { background: var(--hover); }
.cbtn.on { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
#mic { border: 0; color: var(--ink2); }
#mic.on { color: #fff; background: var(--danger); border: 0; animation: pulse 1.3s ease-in-out infinite; }
.hint { flex: 1; min-width: 0; font-size: 13px; color: var(--ink2); line-height: 1.4; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hint.bad { color: var(--danger); }
.send { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--btn); color: var(--btn-ink); flex: none; }
.send svg { width: 20px; height: 20px; stroke-width: 2.3; }
.send:disabled { background: var(--btn-off); color: var(--btn-off-ink); cursor: default; }
.send .s-stop { display: none; }
.send.stop .s-up { display: none; }
.send.stop .s-stop { display: block; }
.foot { text-align: center; font-size: 12px; color: var(--ink3); margin: 8px 0 0; line-height: 1.5; }
.banner { width: 100%; max-width: 48rem; margin: 0 auto 8px; padding: 8px 14px; border-radius: 12px; font-size: 13.5px; background: var(--accent-soft); color: var(--ink); text-align: center; }
.banner.bad { background: rgba(217,45,32,.1); color: var(--danger); }
.chips { display: none; }
.view.empty .chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 48rem; margin: 16px auto 0; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; color: var(--ink2); background: var(--bg); }
.chip:hover { background: var(--hover); color: var(--ink); }
.view.empty .foot { display: none; }
.to-bottom { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(100% + 10px); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--line); box-shadow: 0 2px 10px rgba(0,0,0,.08); color: var(--ink); z-index: 5; }
.to-bottom svg { width: 18px; height: 18px; }

/* attachments in the box */
.tray { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 4px 10px; }
.att { position: relative; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 16px; padding: 6px; padding-inline-end: 12px; max-width: min(260px, 100%); background: var(--bg); }
.att.pic { padding: 0; border: 0; }
.att.pic img { width: 58px; height: 58px; border-radius: 14px; object-fit: cover; display: block; border: 1px solid var(--line2); }
.att .ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: #ff5b7f; color: #fff; font-size: 18px; flex: none; }
.att .ic.vid { background: #4f7cff; }
.att .tx { min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.att .nm { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att .sub { font-size: 12px; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att .x { position: absolute; top: -7px; inset-inline-end: -7px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--bg); border: 2px solid var(--composer); }
.att .x svg { width: 12px; height: 12px; stroke-width: 3; }
.att.busy img, .att.busy .ic { opacity: .45; }
.att.busy::after { content: ""; position: absolute; top: 50%; inset-inline-start: 20px; width: 18px; height: 18px; margin: -9px; border-radius: 50%; border: 2px solid var(--ink3); border-top-color: transparent; animation: spin .8s linear infinite; }
.att.pic.busy::after { inset-inline-start: 29px; }
.att.err { border-color: var(--danger); }
.att.err .sub { color: var(--danger); }
@keyframes spin { to { transform: rotate(360deg); } }
body.dropping::after { content: "افلت الصور والملفات هون"; position: fixed; inset: 12px; border: 2px dashed var(--accent); border-radius: 20px; background: color-mix(in srgb, var(--bg) 88%, transparent); display: grid; place-items: center; font-size: 22px; font-weight: 600; z-index: 100; }
.nr-off { position: fixed; width: 2px; height: 2px; opacity: 0; pointer-events: none; inset-inline-start: -10px; top: -10px; }

/* ------------------------------------------------------------------ menus, dialogs, toasts */
#layer { position: relative; z-index: 60; }
.menu { position: fixed; z-index: 70; min-width: 210px; max-width: min(320px, calc(100vw - 16px)); background: var(--menu); border-radius: 16px; box-shadow: var(--menu-shadow); padding: 6px; }
.mi { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 10px; font-size: 14.5px; text-align: start; color: var(--ink); }
.mi:hover, .mi:focus-visible { background: var(--hover); outline: none; }
.mi.danger { color: var(--danger); }
.mi small { margin-inline-start: auto; color: var(--ink3); font-size: 12px; }
.m-info { padding: 8px 10px 10px; font-size: 13px; color: var(--ink2); line-height: 1.55; border-bottom: 1px solid var(--menu-line); margin-bottom: 4px; }
.m-info b { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 14.5px; margin-bottom: 2px; }
.m-sep { height: 1px; background: var(--menu-line); margin: 4px 6px; }
.back { position: fixed; inset: 0; z-index: 80; background: var(--scrim); display: grid; place-items: center; padding: 16px; animation: fade .14s ease; }
@keyframes fade { from { opacity: 0; } }
.dialog { width: min(440px, 100%); max-height: 86vh; overflow: auto; background: var(--menu); border-radius: 18px; box-shadow: var(--menu-shadow); padding: 20px; }
.dialog h2 { font-size: 18px; margin: 0 0 8px; }
.dialog p { margin: 0 0 18px; color: var(--ink2); font-size: 15px; }
.dialog .row { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.search-box { width: min(640px, 100%); max-height: 72vh; display: flex; flex-direction: column; background: var(--menu); border-radius: 18px; box-shadow: var(--menu-shadow); overflow: hidden; align-self: start; margin-top: 10vh; }
.search-box .sb-top { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--menu-line); }
.search-box input { flex: 1; border: 0; outline: none; background: transparent; font-size: 16px; }
.search-box .sb-list { overflow-y: auto; padding: 6px; }
.sb-item { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: start; padding: 10px 12px; border-radius: 12px; }
.sb-item:hover, .sb-item.sel { background: var(--hover); }
.sb-item svg { margin-top: 3px; color: var(--ink2); }
.sb-item span { display: flex; flex-direction: column; min-width: 0; line-height: 1.45; }
.sb-item b { font-weight: 500; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-item small { color: var(--ink2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-empty { padding: 18px; color: var(--ink3); text-align: center; font-size: 14px; }
.settings { width: min(720px, 100%); height: min(560px, 86vh); display: flex; flex-direction: column; background: var(--menu); border-radius: 18px; box-shadow: var(--menu-shadow); overflow: hidden; }
.st-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 12px 20px; border-bottom: 1px solid var(--menu-line); }
.st-head h2 { margin: 0; font-size: 18px; }
.st-body { flex: 1; min-height: 0; display: flex; }
.st-nav { width: 190px; flex: none; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.st-nav button { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; text-align: start; font-size: 14.5px; }
.st-nav button:hover { background: var(--hover); }
.st-nav button.on { background: var(--active); }
.st-pane { flex: 1; overflow-y: auto; padding: 8px 20px 20px; }
.st-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--menu-line); }
.st-row:last-child { border-bottom: 0; }
.st-row > div { min-width: 0; }
.st-row b { display: block; font-weight: 500; font-size: 15px; }
.st-row small { display: block; color: var(--ink2); font-size: 13px; line-height: 1.55; }
.st-row select, .st-row input { border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 7px 10px; font-size: 14px; }
.st-row input { width: 100%; }
.st-col { flex-direction: column; align-items: stretch; }
.st-col .row { display: flex; gap: 8px; }
.mem { white-space: pre-wrap; background: var(--code-bg); border-radius: 12px; padding: 12px 14px; font-size: 14px; color: var(--ink2); max-height: 220px; overflow-y: auto; }
.toast { position: fixed; z-index: 90; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 9px 16px; border-radius: 12px; font-size: 14px; box-shadow: 0 8px 26px rgba(0,0,0,.2); animation: fade .15s ease; max-width: calc(100vw - 32px); }

/* ------------------------------------------------------------------ the food calculator */
.food { overflow-y: auto; }
.food-in { max-width: 40rem; margin: 0 auto; padding: 8px 20px 40px; display: flex; flex-direction: column; gap: 12px; }
.food-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 4px; }
.food-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #a855f7, #22c5e8); flex: none; }
.food-ic svg { width: 24px; height: 24px; }
.food-head h1 { margin: 0; font-size: 24px; line-height: 1.3; }
.food-head p { margin: 2px 0 0; color: var(--ink2); font-size: 15px; }
.f-tip { border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; background: var(--side); }
.f-tip p { margin: 0 0 8px; font-size: 14.5px; }
.f-tip small { color: var(--ink3); font-size: 12.5px; }
.f-ref { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--ink2); margin-bottom: 4px; }
.f-ref select, .f-ref input { border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 6px 10px; font-size: 14px; }
.f-ref input { width: 120px; }
.f-picks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.f-pick { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; border-radius: 16px; border: 1px dashed var(--ink3); font-weight: 600; }
.f-pick:hover { background: var(--hover); }
.f-prev { width: 100%; max-height: 360px; object-fit: contain; border-radius: 16px; background: var(--code-bg); }
.f-in { width: 100%; border: 1px solid var(--line); background: var(--bg); border-radius: 14px; padding: 11px 14px; outline: none; }
.f-in:focus { border-color: var(--ink3); }
.primary { width: 100%; padding: 12px; border-radius: 999px; background: var(--btn); color: var(--btn-ink); font-weight: 600; font-size: 16px; }
.primary:disabled { opacity: .5; cursor: default; }
.f-out:empty { display: none; }
.f-msg { color: var(--ink2); text-align: center; padding: 8px; }
.f-msg.bad { color: var(--danger); }
.fcard { border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; }
.fcard .kcal { font-size: 30px; font-weight: 700; line-height: 1.3; }
.fcard .range { font-size: 14px; font-weight: 400; color: var(--ink2); }
.fcard .macros { color: var(--ink2); font-size: 15px; margin-top: 2px; }
.fcard .line { font-size: 13.5px; color: var(--ink2); margin-top: 8px; }
.fcard ul { list-style: none; margin: 12px 0 4px; padding: 0; }
.fcard li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line2); }
.fcard li .l { min-width: 0; }
.fcard li .l b { font-weight: 600; }
.fcard li .meta { font-size: 12.5px; color: var(--ink2); }
.fcard li .r { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink2); white-space: nowrap; }
.fcard .pen { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--ink2); }
.fcard .pen:hover { background: var(--hover); color: var(--ink); }
.fcard .pen svg { width: 16px; height: 16px; }
.fcard li.fix { display: block; }
.fcard li.fix .row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.fcard li.fix input { flex: 1; min-width: 90px; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 7px 10px; }
.fcard li.fix input[type=number] { flex: 0 1 110px; }
.fcard .q { margin-top: 10px; padding: 12px; border-radius: 14px; background: var(--accent-soft); }
.fcard .q p { margin: 0 0 8px; }
.fcard .q .opts { display: flex; flex-wrap: wrap; gap: 6px; }
.fcard .q .opts button { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); font-size: 14px; }
.fcard .q .opts button.on { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }
.fcard p { margin: 10px 0 0; }
.fcard .muted { color: var(--ink2); font-size: 13.5px; }
.f-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.f-acts .pbtn { padding: 8px 16px; }

/* ------------------------------------------------------------------ 1.11: food in the chat, his day, his profile */
.flog { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--side); max-width: 34rem; }
.fl-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.fl-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); font-size: 17px; flex: none; }
.fl-tx { min-width: 0; display: flex; flex-direction: column; line-height: 1.45; }
.fl-tx b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-tx small { font-size: 12.5px; color: var(--ink2); }
.fl-btn { flex: none; padding: 6px 14px; font-size: 13.5px; white-space: nowrap; }
.fl-btn.ok, .fl-btn.ok:disabled { background: var(--accent-soft); color: var(--accent); opacity: 1; }

.fday { border: 1px solid var(--line); border-radius: 18px; padding: 14px 18px 16px; }
.fd-head { display: flex; align-items: center; gap: 10px; }
.fd-head h2 { margin: 0; font-size: 18px; line-height: 1.3; }
.fd-date { color: var(--ink2); font-size: 13.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-edit { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; font-size: 13.5px; }
.fd-edit svg { width: 16px; height: 16px; }
.fd-big { display: flex; align-items: baseline; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.fd-big b { font-size: 30px; font-weight: 700; line-height: 1.2; }
.fd-big span { color: var(--ink2); }
.fd-big .fd-left { margin-inline-start: auto; font-size: 14px; font-weight: 600; color: var(--ink); }
.fd-big .fd-left.over { color: var(--danger); }
.bar { height: 6px; border-radius: 999px; background: var(--line2); overflow: hidden; margin-top: 6px; }
.bar.big { height: 10px; margin-top: 8px; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .3s ease; }
.bar.over > i { background: var(--danger); }
.fd-macros { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.fd-m small { display: block; font-size: 12.5px; color: var(--ink2); line-height: 1.4; }
.fd-m b { font-size: 14px; font-weight: 600; white-space: nowrap; }
.fd-warn { margin: 12px 0 0; font-size: 13.5px; color: var(--danger); }
.fd-muted { color: var(--ink2); font-size: 14px; margin: 12px 0 0; }
.fd-meals { list-style: none; margin: 14px 0 0; padding: 0; }
.fd-meals li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line2); }
.fd-meals .l { flex: 1; min-width: 0; line-height: 1.45; }
.fd-meals .l b { font-weight: 600; font-size: 14.5px; }
.fd-meals .l small { display: block; color: var(--ink2); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-meals .r { font-size: 13.5px; color: var(--ink2); white-space: nowrap; }
.fd-x { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--ink3); flex: none; }
.fd-x:hover { background: var(--hover); color: var(--danger); }
.fd-x svg { width: 15px; height: 15px; }
.fd-week { margin-top: 16px; }
.fd-wt { display: block; font-size: 12.5px; color: var(--ink2); margin-bottom: 6px; }
.fd-plot { position: relative; height: 64px; display: flex; align-items: flex-end; gap: 8px; border-bottom: 1px solid var(--line); }
.fd-plot .col { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.fd-plot .col i { display: block; width: 100%; max-width: 28px; border-radius: 4px 4px 0 0; background: var(--accent); opacity: .55; }
.fd-plot .col.today i { opacity: 1; }
.fd-plot .col.over i { background: var(--danger); }
.fd-plot .goal { position: absolute; inset-inline: 0; border-top: 1.5px dashed var(--ink3); pointer-events: none; }
.fd-days { display: flex; gap: 8px; margin-top: 4px; }
.fd-days span { flex: 1; text-align: center; font-size: 11.5px; color: var(--ink3); }

.prof { width: min(460px, 100%); }
.prof .grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; margin: 2px 0 12px; }
.prof label, .prof .lbl { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink2); min-width: 0; }
.prof .full { grid-column: 1 / -1; }
.prof input, .prof select { width: 100%; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 8px 10px; font-size: 15px; color: var(--ink); }
.prof input:focus, .prof select:focus { outline: none; border-color: var(--accent); }
.seg { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { flex: 1; padding: 8px; font-size: 14.5px; color: var(--ink); }
.seg button + button { border-inline-start: 1px solid var(--line); }
.seg button.on { background: var(--btn); color: var(--btn-ink); }
.prof .msg { color: var(--danger); font-size: 13.5px; min-height: 1.3em; margin: -4px 0 8px; }
.prof .row .spacer { flex: 1; }

/* ------------------------------------------------------------------ phones */
@media (max-width: 767px) {
  #side { position: fixed; inset-block: 0; inset-inline-start: 0; width: min(300px, 86vw); transform: translateX(100%); margin: 0 !important; visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s; }
  body.drawer #side { transform: none; visibility: visible; box-shadow: 0 0 40px rgba(0,0,0,.25); transition: transform .25s ease, visibility 0s; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.drawer .scrim { opacity: 1; pointer-events: auto; }
  #sideOpen { display: inline-grid !important; }
  #topNew { display: none !important; }
  .only-wide { display: none !important; }
  .only-narrow { display: inline-grid !important; }
  #sideOpen svg.only-narrow { display: block !important; }
  #top { padding: 0 6px; }
  .brand { font-size: 17px; }
  .thread { padding: 4px 16px 24px; }
  .bubble { max-width: 86%; }
  .u-att { max-width: 86%; }
  .dock { padding: 0 10px 8px; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .view.empty .scroller { display: flex; flex-direction: column; justify-content: center; }
  .view.empty .thread { display: none; }
  .hero h1 { font-size: 23px; margin: 0; }
  .view.empty .chips { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; margin: 0 -10px 8px; padding: 0 10px; order: -1; scrollbar-width: none; }
  .view.empty .dock { display: flex; flex-direction: column; }
  .view.empty .chips .chip { flex: none; }
  .view.empty .composer { order: 1; }
  .view.empty .banner { order: 0; }
  .settings { height: 92vh; }
  .st-body { flex-direction: column; }
  .st-nav { width: auto; flex-direction: row; overflow-x: auto; padding: 8px 10px 0; }
  .st-nav button { white-space: nowrap; }
  .search-box { margin-top: 4vh; max-height: 84vh; }
  .toast { bottom: 110px; }
  .flog { flex-wrap: wrap; }
  .flog .fl-btn { margin-inline-start: auto; }
  .fday { padding: 12px 14px 14px; }
  .prof .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prof .grid label:nth-of-type(3) { grid-column: 1 / -1; }
  .turn.user .acts { opacity: 1; }
}
@media (hover: none) {
  .chat .more { opacity: 1; }
  .chat > a { padding-inline-end: 36px; }
  .turn.user .acts { opacity: 1; }
  .nav kbd { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
