/* Creative Network — web MVP UI. System fonts only. */
:root {
  --ink:#0b0b0c; --paper:#f6f6f2; --paper2:#efefe9; --line:#c9c9c1; --mid:#5a5a54;
  --accent:#a6401f; --accent2:#e3a07f; --accent-bg:#fbf1ea;
  --ok:#2f6b3a; --ok-bg:#e4efe6; --warn:#8a5a00; --warn-bg:#f3ecd8; --bad:#a6401f; --bad-bg:#f3e3da; --on-accent:#fff;
  --res-fg:#5b3a00; --res-bg:#efe7d0; --ai-fg:#174a7c; --ai-bg:#e3edf6;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --radius: 10px; --maxw: 720px; --focus: #1f5c99;
  --rhythm:#b97a0c; --range:#1f7a4d; --reso:#3a56b8; --art:#161514; --art-ink:#f1f1ec;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink:#f1f1ec; --paper:#111110; --paper2:#1b1b19; --line:#3c3c38; --mid:#a6a69c;
    --accent:#e3a07f; --accent2:#a6401f; --accent-bg:#2a1f19;
    --ok:#7fbf8e; --ok-bg:#122016; --warn:#e0b355; --warn-bg:#241d10; --bad:#e3a07f; --bad-bg:#2a1a16; --on-accent:#111110;
    --res-fg:#e6c98a; --res-bg:#2a2211; --ai-fg:#9cc3ec; --ai-bg:#101d2a; --focus:#8fc3ff;
    --rhythm:#e2b04a; --range:#5cc28d; --reso:#8ea6f0;
  }
}
:root[data-theme="dark"] {
  --ink:#f1f1ec; --paper:#111110; --paper2:#1b1b19; --line:#3c3c38; --mid:#a6a69c;
  --accent:#e3a07f; --accent2:#a6401f; --accent-bg:#2a1f19;
  --ok:#7fbf8e; --ok-bg:#122016; --warn:#e0b355; --warn-bg:#241d10; --bad:#e3a07f; --bad-bg:#2a1a16; --on-accent:#111110;
  --res-fg:#e6c98a; --res-bg:#2a2211; --ai-fg:#9cc3ec; --ai-bg:#101d2a; --focus:#8fc3ff;
    --rhythm:#e2b04a; --range:#5cc28d; --reso:#8ea6f0;
}
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); line-height: 1.45; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3 { font-family: var(--font); font-weight: 700; line-height: 1.15; margin: 0 0 10px; }
h1 { font-size: 28px; } h2 { font-size: 20px; margin-top: 26px; } h3 { font-size: 16px; margin-top: 18px; }
p { margin: 0 0 12px; } a { color: inherit; }
.lead { font-size: 17px; color: var(--mid); }
.muted { color: var(--mid); } .small { font-size: 13px; } .tiny { font-size: 11.5px; }
.mono { font-family: var(--mono); }
.kicker { font-family: var(--mono); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--mid); margin-bottom: 6px; }
.lab { font-family: var(--mono); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--mid); margin: 18px 0 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.center { text-align: center; }
button, input, select, textarea { font: inherit; color: inherit; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }

/* ---------- app shell ---------- */
#app { min-height: 100%; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-bottom: 2px solid var(--ink); background: var(--paper); position: sticky; top: 0; z-index: 10; }
.brand { font-weight: 800; font-size: 16px; text-decoration: none; white-space: nowrap; }
.rail { display: none; }
.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.iconbtn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; text-decoration: none; font-size: 17px; }
.iconbtn:hover, .rail-i:hover { background: var(--paper2); }
.dot { position: absolute; top: 0; right: 0; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px; background: var(--accent); color: var(--on-accent); font-size: 10px; line-height: 15px; text-align: center; font-family: var(--mono); }
.me-chip { display: inline-flex; background: none; border: 0; padding: 0; cursor: pointer; border-radius: 50%; }
#main { flex: 1; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 14px 14px 90px; }
.page { animation: page-in .15s ease-out; }
@keyframes page-in { from { transform: translateY(6px); } to { transform: none; } }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; border-top: 2px solid var(--ink); background: var(--paper); z-index: 10; }
.tab-i { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0 9px; text-decoration: none; font-size: 11px; color: var(--mid); }
.tab-i.on { color: var(--ink); font-weight: 700; } .tab-ic { font-size: 19px; }

@media (min-width: 900px) {
  :root { --maxw: 880px; }
  .tabbar { display: none; }
  .rail { display: flex; gap: 4px; }
  .rail-i { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 20px; text-decoration: none; font-size: 14px; color: var(--mid); }
  .rail-i.on { background: var(--ink); color: var(--paper); }
  #main { padding-bottom: 40px; }
}

/* ---------- spinner / loading ---------- */
.spinner { display: flex; justify-content: center; padding: 32px 0; }
.spinner::after { content: ''; width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- buttons / chips / badges ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--ink); color: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); padding: 11px 18px; font-weight: 700; font-size: 14px; cursor: pointer; min-height: 44px; text-decoration: none; }
.btn:hover { opacity: .88; } .btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.sec { background: transparent; color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); border-color: transparent; padding: 8px 10px; min-height: 36px; }
.btn.ghost:hover { background: var(--paper2); opacity: 1; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: var(--on-accent); }
.btn.sm { padding: 7px 12px; font-size: 13px; min-height: 36px; }
.btn.big { width: 100%; padding: 14px; font-size: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.tight { gap: 6px; margin-top: 6px; }
.row.center { justify-content: center; }
.row.between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.chip { display: inline-flex; align-items: center; gap: 4px; border: 1.5px solid var(--ink); border-radius: 999px; padding: 6px 13px; font-size: 13px; background: transparent; cursor: pointer; text-decoration: none; color: inherit; min-height: 34px; }
.chip.on { background: var(--ink); color: var(--paper); }
.chip.ac { border-color: var(--accent); color: var(--accent); }
.chip.dash { border-style: dashed; color: var(--mid); }
.chip.static { cursor: default; }
.badge { display: inline-flex; align-items: center; font-family: var(--mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border: 1.5px solid var(--ink); border-radius: 5px; background: transparent; }
.badge.res { background: var(--res-bg); border-color: var(--res-fg); color: var(--res-fg); }
.badge.ai { background: var(--ai-bg); border-color: var(--ai-fg); color: var(--ai-fg); }
.badge.pend { border-style: dashed; color: var(--mid); }
.badge.late { background: var(--paper2); color: var(--mid); }
.badge.ok { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.badge.bad { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
.card { border: 2px solid var(--ink); border-radius: var(--radius); padding: 16px; margin: 14px 0; }
.card.link { display: block; text-decoration: none; color: inherit; }
.note { border-left: 4px solid var(--accent); background: var(--accent-bg); padding: 10px 14px; border-radius: 0 8px 8px 0; margin: 14px 0; font-size: 14px; }
.note.bad { border-color: var(--bad); background: var(--bad-bg); }
.seg { display: flex; border-bottom: 2px solid var(--ink); margin: 10px 0 16px; gap: 4px; }
.seg-i { padding: 9px 4px; text-decoration: none; color: var(--mid); font-weight: 600; font-size: 14px; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.seg-i.on { color: var(--ink); border-color: var(--accent); }

/* ---------- forms ---------- */
label, .lbl-like { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 4px; }
.field { width: 100%; border: 2px solid var(--mid); background: var(--paper); color: var(--ink); border-radius: 8px; padding: 10px 12px; font-size: 15px; }
.field:focus { border-color: var(--ink); }
.field.short { max-width: 160px; display: inline-block; width: auto; }
textarea.field { resize: vertical; }
.check { display: flex; align-items: flex-start; gap: 9px; font-weight: 400; font-size: 14px; margin: 10px 0; }
.declare { border: 2px solid var(--accent); background: var(--accent-bg); border-radius: var(--radius); padding: 13px 15px; margin: 16px 0; }
.declare.on { border-color: var(--ok); background: var(--ok-bg); }
.declare-label { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; cursor: pointer; }
.declare-label input { width: 20px; height: 20px; margin-top: 1px; flex: none; }
.declare .req { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); }
.declare.on .req { color: var(--ok); }
.declare small { display: block; color: var(--mid); font-weight: 400; margin-top: 2px; }
.check.big input { width: 20px; height: 20px; margin-top: 2px; }
.check.inline { display: inline-flex; margin: 0; }
.field-msg { color: var(--bad); font-size: 13px; min-height: 1em; }
.plain { list-style: disc; padding-left: 22px; margin: 0 0 12px; } .plain li { margin: 6px 0; }
.radios { border: 0; padding: 0; margin: 10px 0; } .radio { display: flex; gap: 8px; padding: 6px 0; font-size: 14px; }
.form h1 { margin-top: 8px; }

/* pickers */
.picker { margin: 8px 0 4px; }
.picker.small { max-width: 200px; }
.picker-empty { border: 2px dashed var(--line); border-radius: var(--radius); padding: 22px 12px; text-align: center; }
.picker-mode { display: flex; gap: 8px; margin-bottom: 8px; }
.picker-model-prev { border: 2px solid var(--ink); border-radius: var(--radius); padding: 14px; display: flex; align-items: center; gap: 12px; background: var(--paper2); margin-bottom: 8px; }
.model-view { margin: 10px 0; }
.model-fallback { border: 2px dashed var(--line); border-radius: var(--radius); padding: 26px 16px; text-align: center; }
.model-fallback p { margin: 6px 0; }
.picker-prev img { width: 100%; border-radius: var(--radius); display: block; margin-bottom: 8px; border: 2px solid var(--ink); }
.sketches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 6px 0; }
.voice { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.voice audio { max-width: 220px; }

/* term picker sheet */
.termlist { max-height: 42vh; overflow: auto; border: 2px solid var(--line); border-radius: var(--radius); margin: 8px 0; }
.termopt { display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 11px 14px; cursor: pointer; font-size: 14px; }
.termopt:last-child { border-bottom: 0; }
.termopt.on { background: var(--accent-bg); font-weight: 700; }
.termopt:disabled { opacity: .4; cursor: not-allowed; }
.termopt small { color: var(--mid); font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; }
.sticky-foot { position: sticky; bottom: -1px; background: var(--paper); padding-top: 8px; }

/* providers (sign-in) */
.providers { display: flex; flex-direction: column; gap: 10px; }
.provider { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; border: 2px solid var(--ink); border-radius: var(--radius); background: transparent; padding: 13px 16px; cursor: pointer; text-align: left; }
.provider:disabled { opacity: .4; cursor: not-allowed; }
.provider small { color: var(--mid); font-weight: 400; }
.siwe { white-space: pre-wrap; word-break: break-word; background: var(--paper2); border: 1.5px solid var(--line); border-radius: 8px; padding: 12px; font-size: 12.5px; max-height: 220px; overflow: auto; }

/* ---------- sheets / toasts ---------- */
.veil { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; z-index: 50; }
@media (min-width: 640px) { .veil { align-items: center; } }
.sheet { background: var(--paper); color: var(--ink); width: 100%; max-width: 480px; max-height: 92vh; overflow: auto; border-radius: 16px 16px 0 0; border: 2px solid var(--ink); border-bottom: 0; }
@media (min-width: 640px) { .sheet { border-radius: 14px; border-bottom: 2px solid var(--ink); } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 2px solid var(--ink); position: sticky; top: 0; background: var(--paper); }
.sheet-head h2 { margin: 0; font-size: 17px; }
.sheet-body { padding: 14px 16px 22px; }
#toasts { position: fixed; left: 0; right: 0; bottom: 76px; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 60; pointer-events: none; }
@media (min-width: 900px) { #toasts { bottom: 24px; } }
.toast { background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 8px; font-size: 13.5px; max-width: 90vw; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.toast.error { background: var(--bad); }
.toast.out { opacity: 0; transition: opacity .3s; }
#crash { position: fixed; left: 0; right: 0; top: 0; background: #a6401f; color: #fff; padding: 8px 14px; font-size: 12.5px; z-index: 100; font-family: var(--mono); }

/* ---------- feeds / grids / tiles ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0 14px; }
.catsel select { min-width: 150px; }
.day-h { display: flex; align-items: baseline; gap: 4px; margin-top: 22px; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.tile { position: relative; display: block; aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden; border: 2px solid var(--ink); text-decoration: none; background: var(--paper2); }
.tile-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.model-thumb { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: var(--paper2); color: var(--mid); }
.model-thumb-ic { font-size: 34px; line-height: 1; }
.model-thumb-fmt { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.tile-label { position: absolute; left: 6px; bottom: 6px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; padding: 2px 7px; border-radius: 10px; }
.tile-flags { position: absolute; right: 5px; top: 5px; display: flex; gap: 4px; }
.tile-flags .badge { font-size: 9px; padding: 2px 5px; background: var(--paper); }
.endcap { text-align: center; margin: 26px 0; }
.empty { text-align: center; padding: 40px 14px; color: var(--mid); }
.empty h3 { color: var(--ink); }
.cell { display: flex; flex-direction: column; gap: 4px; }
.tasklist { display: flex; flex-direction: column; gap: 10px; }
.taskrow { display: grid; grid-template-columns: 66px 1fr; gap: 12px; text-decoration: none; color: inherit; border: 1.5px solid var(--line); border-radius: 10px; padding: 8px; }
.taskrow img { width: 66px; height: 66px; object-fit: cover; border-radius: 6px; }

/* ---------- task / item detail ---------- */
.task { border: 2px solid var(--ink); border-radius: 14px; padding: 16px; margin: 12px 0 24px; }
.task-fig { margin: 0 0 12px; } .task-fig img { width: 100%; border-radius: 8px; display: block; }
.task-h { font-size: 26px; margin-bottom: 2px; } .task-sub { color: var(--mid); margin-top: 0; }
.steps { padding-left: 22px; } .steps li { margin: 10px 0; }
.steps li.diverge { background: var(--accent-bg); border: 1.5px solid var(--accent); border-radius: 8px; padding: 10px 12px 10px 8px; margin-left: -8px; list-style-position: inside; }
.cta { margin-top: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hero { width: 100%; border-radius: 12px; border: 2px solid var(--ink); display: block; margin: 10px 0; }
.author { display: flex; align-items: center; gap: 9px; }
.author .who { font-weight: 700; text-decoration: none; }
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-weight: 800; flex: none; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.statement { font-size: 18px; font-style: italic; }
.item .comments { margin-top: 26px; border-top: 2px solid var(--line); padding-top: 16px; }
.composer { margin: 10px 0 20px; }
.comment { padding: 10px 0; border-bottom: 1px solid var(--line); }
.comment.nested { margin-left: 30px; padding-left: 12px; border-left: 2px solid var(--line); }
.ctext { white-space: pre-wrap; margin: 6px 0 0; }
.thumb .tile { width: 90px; height: 90px; }

/* ---------- profile / portfolio ---------- */
.phead { display: flex; gap: 14px; align-items: center; margin-bottom: 6px; }
.psec { margin-top: 22px; }
.heat-row { display: grid; grid-template-columns: 150px 1fr; gap: 10px; align-items: center; margin: 8px 0; }
@media (min-width: 560px) { .heat-row { grid-template-columns: 190px 1fr; } }
.heat-l { font-size: 12.5px; }
.heat { display: flex; flex-wrap: wrap; gap: 3px; }
.radar { max-width: 620px; margin: 10px auto; }
.alt summary { cursor: pointer; font-size: 13px; color: var(--mid); margin: 10px 0; }
.table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 13.5px; }
.table th, .table td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); }
.table th { font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--mid); }

/* settings */
.meter { height: 8px; background: var(--paper2); border: 1px solid var(--line); border-radius: 5px; overflow: hidden; margin: 6px 0 12px; }
.meter i { display: block; height: 100%; background: var(--accent); }

/* alerts */
.alert { display: block; padding: 12px 8px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.alert.unread { background: var(--accent-bg); }
.alert .who { font-weight: 700; }

/* menu sheet */
.menu { display: flex; flex-direction: column; }
.menuitem { text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 13px 4px; font-size: 15px; cursor: pointer; color: inherit; text-decoration: none; }
.menuitem.danger { color: var(--bad); font-weight: 700; }
.menulab { padding: 10px 0; font-weight: 400; }

/* moderation / editorial */
.report { margin: 10px 0; }

/* For today checklist */
.todo-count{font-family:var(--mono); font-size:11px; opacity:.8;}
.todos{display:flex; flex-direction:column; gap:10px;}
.todo{display:flex; align-items:center; gap:14px; padding:13px 14px; border:2px solid var(--ink); border-radius:var(--radius); text-decoration:none; color:var(--ink);}
.todo:hover,.todo:focus-visible{background:var(--paper2);}
.todo-body{display:flex; flex-direction:column; gap:2px; min-width:0;}
.todo-body small{color:var(--mid);}
.todo-box{flex:none; width:24px; height:24px; border:2px solid var(--ink); border-radius:5px; display:inline-flex; align-items:center; justify-content:center; font-weight:700; font-size:15px; line-height:1;}
.todo.done{border-color:var(--ok);}
.todo.done .todo-box,.todo-box.on{background:var(--ok); border-color:var(--ok); color:var(--paper);}
.done-card{border-color:var(--ok);}
.done-card .todo-box{width:20px; height:20px; font-size:13px; vertical-align:-4px;}
/* which daily task a key answers */
.answer-to{display:flex; align-items:center; gap:12px; margin:10px 0 14px; padding:8px; border:1.5px solid var(--line); border-left:4px solid var(--accent); border-radius:8px; text-decoration:none; color:var(--ink); background:var(--paper);}
.answer-to:hover,.answer-to:focus-visible{border-color:var(--ink); border-left-color:var(--accent);}
.answer-thumb{flex:none; width:72px; height:72px; border-radius:6px; overflow:hidden; background:var(--paper2);}
.answer-thumb img{width:100%; height:100%; object-fit:cover; display:block;}
.answer-body{display:flex; flex-direction:column; gap:2px; min-width:0;}
.answer-body small{color:var(--accent); font-family:var(--mono); font-size:11px; letter-spacing:.04em; text-transform:uppercase;}
/* inline replies */
.reply-box{margin:6px 0 12px 28px; padding:10px; border:1.5px solid var(--line); border-radius:8px; display:flex; flex-direction:column; gap:8px;}
.reply-box.nested{margin-left:48px;}
.sr-only{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap;}
/* key composer: time spent, four choices */
.minseg{display:inline-flex; flex-wrap:wrap; gap:6px;}
.minseg button{min-width:52px; min-height:40px; padding:0 12px; border:1.5px solid var(--line); border-radius:999px; background:transparent; font-weight:600; cursor:pointer;}
.minseg button.on{background:var(--ink); color:var(--paper); border-color:var(--ink);}
/* comments: actions under the text, @mentions */
.c-actions{display:flex; flex-wrap:wrap; gap:2px; margin:4px 0 0 -8px;}
a.mention{color:var(--accent); font-weight:600; text-decoration:none;}
a.mention:hover{text-decoration:underline;}
.mention-wrap{position:relative;}
.mention-list{position:absolute; left:0; right:0; top:100%; z-index:30; list-style:none; margin:4px 0 0; padding:4px; background:var(--paper); border:1.5px solid var(--ink); border-radius:10px; box-shadow:0 8px 24px rgba(0,0,0,.18); max-height:260px; overflow-y:auto;}
.mention-list li{display:flex; align-items:center; gap:8px; padding:8px; border-radius:8px; cursor:pointer;}
.mention-list li.on, .mention-list li:hover{background:var(--accent-bg);}
.mention-card{border-left:4px solid var(--accent);}
.mention-card .alert{display:block; padding:6px 0;}
/* edit profile: photo + location */
.av-row{align-items:center; gap:14px; margin:4px 0 8px;}
.av-prev{display:inline-flex;}
.loc-row{gap:8px; flex-wrap:wrap;}
.loc-row .field{flex:1 1 180px; min-width:0;}
.geo-map{display:block; width:100%; height:200px; border:1px solid var(--line); border-radius:10px; margin:6px 0 4px;}
/* replies: hidden until asked for; newest 3, then earlier on click */
.btn.thread-toggle{margin:2px 0 2px 30px; color:var(--accent);}
.btn.more-replies{margin:0 0 2px 42px; color:var(--mid);}
/* the comment a notification pointed to */
.comment.flash{animation:cflash 2.4s ease-out;}
@keyframes cflash{0%,40%{background:var(--accent-bg);}100%{background:transparent;}}

/* ---------- Home (#/home, opened from the logo) ---------- */
#main.wide { max-width: 1120px; }
.brand.on { background: var(--accent-bg); border-radius: 8px; padding: 2px 8px; margin-left: -8px; }
.hm section + section { margin-top: 32px; }
.hm-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.hm-head h2 { margin: 0; font-size: 22px; }
.hm-head > a { font-size: 13px; color: var(--mid); }
.hm-hero { display: grid; gap: 16px; }
@media (min-width: 960px) { .hm-hero { grid-template-columns: 1.25fr 1fr; align-items: stretch; } }
.hm-greet { min-width: 0; }
.hm-greet h1 { font-size: clamp(24px, 3.6vw, 36px); letter-spacing: -.01em; margin: 0 0 6px; text-wrap: balance; }
.hm-year { font-family: var(--mono); font-size: 12.5px; color: var(--mid); margin: 0 0 14px; }
.hm-values { display: grid; gap: 10px; }
@media (min-width: 560px) { .hm-values { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.hm-val { border: 1px solid var(--line); border-top: 5px solid var(--c); border-radius: 12px; background: var(--paper); padding: 12px 14px; display: grid; gap: 4px; text-align: left; align-content: start; }
button.hm-val { cursor: pointer; font: inherit; color: inherit; }
.hm-val[aria-pressed="true"] { border-color: var(--ink); border-top-color: var(--c); box-shadow: 0 0 0 1px var(--ink); }
.hm-val-name { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; font-weight: 700; gap: 2px 6px; }
.hm-val-name .q { font: 11px var(--mono); color: var(--mid); font-weight: 400; }
.hm-val-num { font-weight: 700; font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.hm-val-num small { font-size: 14px; color: var(--mid); font-weight: 600; }
.hm-val svg { width: 100%; height: 34px; display: block; }
.hm-val-tip { font-size: 12.5px; color: var(--mid); }
.hm-chip { font: 600 11px var(--mono); padding: 2px 8px; border-radius: 10px; justify-self: start; max-width: 100%; }
.hm-chip.up { background: var(--ok-bg); color: var(--ok); }
.hm-chip.flat { background: var(--paper2); color: var(--mid); }
.hm-chip.down { background: var(--warn-bg); color: var(--warn); }
.hm-explain { margin-top: 10px; font-size: 13.5px; background: var(--paper2); border-radius: 12px; padding: 12px 14px; }
.hm-explain b { display: block; font: 600 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 2px; }
.hm-shape { background: var(--art); color: var(--art-ink); border-radius: 20px; padding: 14px; display: grid; grid-template-rows: auto 1fr auto; min-height: 300px; overflow: hidden; }
.hm-shape .kicker { color: var(--art-ink); opacity: .7; }
.hm-shape-cv { width: 100%; height: 100%; min-height: 210px; display: block; }
.hm-legend { display: flex; gap: 14px; flex-wrap: wrap; font: 11px var(--mono); opacity: .8; }
.hm-legend i { display: inline-block; width: 18px; height: 2px; vertical-align: middle; margin-right: 6px; }
.hm-card { border: 1px solid var(--line); border-radius: 12px; background: var(--paper); padding: 14px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.hm-card h3 { margin: 0; font-size: 17px; }
.hm-card h3 a { text-decoration: none; }
.hm-today { display: grid; gap: 12px; }
@media (min-width: 760px) { .hm-today { grid-template-columns: 1.3fr 1fr 1fr; } }
.hm-task { border: 2px solid var(--ink); }
.hm-task-img img { display: block; width: 100%; max-height: 180px; object-fit: cover; border-radius: 8px; background: var(--paper2); }
.hm-todo { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.hm-todo li { display: flex; gap: 8px; }
.hm-todo .ok { color: var(--ok); font-weight: 700; } .hm-todo .no { color: var(--mid); }
.hm-count { font-size: 26px; font-weight: 700; margin: 0; font-variant-numeric: tabular-nums; }
.hm-count span { font-weight: 400; }
.hm-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.hm-thumb, .hm-mini-img { display: block; border-radius: 6px; overflow: hidden; background: var(--paper2); aspect-ratio: 1; }
.hm-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hm-mini { display: flex; gap: 10px; align-items: center; }
.hm-mini-img { width: 64px; flex: none; }
.hm-reads { display: grid; gap: 12px; }
@media (min-width: 640px) { .hm-reads { grid-template-columns: repeat(3, 1fr); } }
.hm-read { text-decoration: none; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: grid; grid-template-rows: 120px auto; background: var(--paper); }
.hm-read:hover { border-color: var(--ink); }
.hm-read canvas { width: 100%; height: 120px; display: block; background: var(--art); }
.hm-read > div { padding: 12px 14px; display: grid; gap: 4px; }
.hm-read h3 { margin: 0; font-size: 16px; }
.hm-read .kicker { margin: 0; }
.hm-clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hm-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.hm-filters button { border: 1.5px solid var(--line); background: transparent; border-radius: 999px; padding: 4px 12px; cursor: pointer; font-size: 13px; color: inherit; }
.hm-filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.hm-feed { columns: 1; column-gap: 12px; }
@media (min-width: 680px) { .hm-feed { columns: 2; } }
@media (min-width: 1040px) { .hm-feed { columns: 3; } }
.hm-item { break-inside: avoid; margin-bottom: 12px; }
.hm-type { font: 600 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.hm-news a { text-decoration: none; } .hm-news a:hover h3 { text-decoration: underline; }
.hm-src { font: 11px var(--mono); color: var(--mid); }
.hm-insight { background: var(--accent-bg); border-color: transparent; }
.hm-relax { background: var(--art); color: var(--art-ink); border: 0; padding: 0; overflow: hidden; gap: 0; }
.hm-relax canvas { width: 100%; height: 190px; display: block; }
.hm-relax-body { padding: 12px 14px 14px; display: grid; gap: 6px; }
.hm-relax .hm-type { color: #f0a3b6; }
.hm-relax .small { opacity: .85; }
.hm-relax .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.hm-relax .btn { background: var(--art-ink); color: var(--art); border-color: var(--art-ink); }
.hm-relax input[type=range] { accent-color: #f0a3b6; width: 110px; vertical-align: middle; }

/* ---------- iPhone guidelines (Apple HIG) — keep for every new screen ----------
   viewport-fit=cover is set on every page, so content must stay clear of the notch, the Dynamic Island and the
   home indicator; touch targets are at least 44 × 44 pt on touch screens; form text is 16 px so iOS does not
   zoom the page when a field gets focus. */
.topbar { padding-top: max(10px, env(safe-area-inset-top)); padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
.tabbar { padding-bottom: env(safe-area-inset-bottom); padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
#main { padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
#toasts { bottom: calc(76px + env(safe-area-inset-bottom)); }
.sheet-body { padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { #main { padding-bottom: calc(40px + env(safe-area-inset-bottom)); } }
@media (pointer: coarse) {
  .btn.sm, .chip, .hm-filters button { min-height: 44px; }
  .iconbtn { width: 44px; height: 44px; }
  input[type=range] { min-height: 44px; }
  .field, input, select, textarea { font-size: 16px; }
}

/* ---------- Long text never widens the page (owner report 2026-10-04: a long Figma link in a comment made the
   key page wider than the screen in iOS Safari). Anything members type — comments, statements, bios, names, alt
   text, links — may break inside a word when it can't fit. "anywhere" also shrinks the min-content width, so flex
   and grid items can't be pushed wider than their column; break-word is the fallback for iOS before 15.4. ---------- */
#main, .sheet, #toasts { overflow-wrap: anywhere; word-break: break-word; }
.comment, .comments, .ctext, .statement, .author, .author > *, .alert { min-width: 0; max-width: 100%; }
