  :root {
    /* Point11 palette: white ground, black ink, slate greys, one blue accent with a light wash,
       a dark navy primary button, green and red only for status */
    --ground: #FFFFFF; --header: #FFFFFF; --card: #F8FAFC; --panel: #FFFFFF; --line: #E2E8F0; --line2: #CAD5E2;
    --ink: #000000; --ink2: #0F172B; --mute: #62748E; --mute2: #90A1B9;
    --accent: #155DFC; --accent-ink: #1447E6; --accent-wash: #155DFC14; --accent-edge: #155DFC40;
    --navy: #0F172B; --navy-hover: #1D293D;
    --private: #1447E6; --private-bg: #155DFC14;
    --warn: #A65F00; --bad: #E7000B; --ok: #00A63E; --user-bubble: #F1F5F9; --focus: #155DFC;
    --violet: var(--accent); --violet2: var(--accent-ink);
  }
  * { box-sizing: border-box; }
  [hidden] { display: none !important; }
  html, body { height: 100%; }
  body { margin: 0; background: var(--ground); color: var(--ink); font: 15px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
  a { color: var(--accent-ink); }
  .app { display: grid; grid-template-columns: 290px 1fr; height: 100%; }
  .side { background: var(--card); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
  .brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; border-bottom: 1px solid var(--line); }
  .brand svg { width: 34px; height: 34px; }
  /* the wordmark: vector letters drawn from a hand-lettering face, identical on every machine */
  .brand svg.wordmark { display: block; height: 40px; width: auto; max-width: 100%; }
  .wordmark path { transition: transform .25s ease; }
  .legal { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 11px; color: var(--mute2); line-height: 1.45; }
  .brand .by { font-size: 11px; font-weight: 600; color: var(--mute2); margin-left: 6px; }
  .brand .name { font-weight: 700; font-size: 16px; letter-spacing: -0.01em; color: var(--ink); }
  .brand .tag { font-size: 12px; color: var(--mute); }
  .section { padding: 14px 18px; border-bottom: 1px solid var(--line); }
  .cap { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); font-weight: 600; margin-bottom: 8px; }
  .cap-row { display: flex; align-items: center; justify-content: space-between; }
  .fold { width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--mute); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; margin: -6px -6px 0 0; }
  .fold:hover { background: var(--card2, rgba(0,0,0,.05)); color: var(--ink); }
  .fold svg { width: 16px; height: 16px; transition: transform .18s; }
  .section.folded .fold svg { transform: rotate(-90deg); }
  .section.folded .foldable { display: none; }
  .section.folded .cap { margin-bottom: 0; }
  .notice { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: #FFF4DE; border: 1px solid #F3D9A0; color: #7A4E0F; font-size: 13px; line-height: 1.5; }
  .notice b { display: block; margin-bottom: 4px; }
  .notice .mono { display: block; margin: 8px 0; padding: 8px 10px; border-radius: 8px; background: #fff; border: 1px solid #F3D9A0; color: #0F172B; font-size: 12px; word-break: break-all; }
  .notice label { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-weight: 600; cursor: pointer; }
  .meter { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .tile { background: var(--panel); border: 1px solid var(--line2); border-radius: 10px; padding: 9px 11px; }
  .tile .k { font-size: 11px; color: var(--mute); text-transform: uppercase; letter-spacing: .06em; }
  .tile .n { font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; color: var(--ink); }
  .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line2); background: var(--panel); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
  .btn:hover { border-color: var(--mute2); background: var(--card); }
  .btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
  .btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
  .btn.primary:hover { background: var(--navy-hover); }
  .btn.private { border-color: var(--accent-edge); color: var(--accent-ink); background: var(--accent-wash); }
  .btn.private:hover { background: #155DFC24; }
  .btn.full { width: 100%; }
  .btn.sm { height: 32px; padding: 0 10px; font-size: 13px; }
  .btn:disabled { opacity: .5; cursor: default; }
  .tiny { font-size: 12.5px; color: var(--mute); line-height: 1.5; }
  .mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; color: var(--ink2); word-break: break-all; }
  .convs { flex: 1; overflow: auto; padding: 8px; }
  .conv { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 8px; color: var(--ink2); cursor: pointer; font-size: 14px; }
  .conv:hover { background: var(--user-bubble); }
  .conv.on { background: var(--panel); color: var(--ink); border: 1px solid var(--line2); }
  .conv .t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .conv .x { color: var(--mute2); font-size: 18px; line-height: 1; padding: 0 2px; }
  .conv .x:hover { color: var(--bad); }
  .main { display: flex; flex-direction: column; min-height: 0; }
  .top { display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-bottom: 1px solid var(--line); background: var(--header); }
  select, textarea, input { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line2); border-radius: 9px; }
  select:focus, textarea:focus, input:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
  select { height: 38px; padding: 0 10px; font-weight: 600; }
  .privacy { font-size: 13px; color: var(--mute); }
  .privacy b { color: var(--ink2); font-weight: 600; }
  .thread { flex: 1; overflow: auto; padding: 28px 22px; }
  .msgs { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
  .msg { display: grid; grid-template-columns: 30px 1fr; gap: 12px; }
  .msg .who { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
  .msg.user .who { background: var(--user-bubble); color: var(--ink2); }
  .msg.assistant .who { background: var(--accent-wash); color: var(--accent-ink); }
  .msg .body { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }
  .msg.user .body { background: var(--user-bubble); border-radius: 10px; padding: 10px 12px; }
  .msg .meta { font-size: 12px; color: var(--mute); margin-top: 5px; font-variant-numeric: tabular-nums; }
  .msg.err .body { color: var(--bad); }
  /* ---- segmented controls (model types, aspect, size) ---- */
  .seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--card); border: 1px solid var(--line); border-radius: 11px; flex-wrap: wrap; }
  .seg button { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--mute); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
  .seg button:hover { color: var(--ink); background: rgba(15, 23, 43, .05); }
  .seg button:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
  .seg button.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(15, 23, 43, .10), 0 0 0 1px var(--line); }
  .seg button svg { width: 15px; height: 15px; flex: none; }
  .seg button .n { font-size: 11px; font-weight: 600; color: var(--mute2); font-variant-numeric: tabular-nums; }
  .seg button.on .n { color: var(--accent-ink); }
  .seg.small { border-radius: 9px; padding: 2px; }
  .seg.small button { height: 28px; padding: 0 9px; font-size: 12px; gap: 6px; }
  .ratio { display: inline-block; border: 1.6px solid currentColor; border-radius: 2px; flex: none; }
  .sitenav { display: inline-flex; gap: 2px; }
  .sitenav a { display: inline-flex; align-items: center; height: 38px; padding: 0 12px; border-radius: 11px; color: var(--mute); text-decoration: none; font-size: 13px; font-weight: 700; transition: background .15s, color .15s; }
  .sitenav a:hover { background: var(--card); color: var(--ink); }
  .points { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; background: linear-gradient(135deg, #FFF4DE, #FFFFFF); border: 1px solid #F3D9A0; }
  .points .k { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #A66A14; font-weight: 700; }
  .points .n { font-size: 20px; font-weight: 800; color: #7A4E0F; font-variant-numeric: tabular-nums; line-height: 1.1; }
  .points a { font-size: 12px; color: #A66A14; }
  .explore-btn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px; border: 1px solid var(--line2); border-radius: 11px; background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: background .15s, border-color .15s; }
  .explore-btn:hover { background: var(--card); }
  .explore-btn.on { background: var(--navy); border-color: var(--navy); color: #fff; }
  /* ---- header wallet button ---- */
  .wallet { position: relative; }
  .wbtn { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--line2); border-radius: 10px; background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
  .wbtn:hover { border-color: var(--mute2); box-shadow: 0 1px 3px rgba(15, 23, 43, .08); }
  .wbtn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
  .wbtn.cta { background: var(--navy); border-color: var(--navy); color: #fff; }
  .wbtn.cta:hover { background: var(--navy-hover); }
  .wdot { width: 8px; height: 8px; border-radius: 50%; background: var(--mute2); }
  .wbtn.cta .wdot { background: rgba(255,255,255,.55); }
  .wbtn.on .wdot { background: var(--ok); box-shadow: 0 0 0 3px #00A63E22; }
  .wmenu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 260px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(15, 23, 43, .16); padding: 6px; animation: pop .12s ease-out; }
  .wm-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
  .wm-item { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 9px 10px; border-radius: 8px; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; }
  .wm-item:hover { background: var(--card); }
  .wm-item.danger { color: var(--bad); }
  .zec { margin-top: 12px; padding: 12px 14px; background: linear-gradient(135deg, #FFF7E6, #FFFFFF); border: 1px solid #F5D08A; border-radius: 12px; }
  .zec-head { display: flex; gap: 10px; align-items: center; }
  .zec-mark { width: 34px; height: 34px; border-radius: 10px; background: #F4B728; color: #1a1a1a; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; font-size: 16px; flex: none; }
  .zec-body { display: flex; gap: 14px; margin-top: 10px; align-items: flex-start; flex-wrap: wrap; }
  .zec-qr { width: 150px; height: 150px; flex: none; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
  .zec-qr svg { width: 100%; height: 100%; display: block; }
  .zec-side { flex: 1; min-width: 200px; }
  .zec-amounts { display: flex; gap: 6px; flex-wrap: wrap; }
  .zec-amounts .chip { padding: 6px 10px; font-size: 12.5px; }
  .zec-amounts .chip b { display: block; font-size: 13px; }
  .how { margin-top: 12px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
  .how .steps { margin-top: 8px; }
  .trial { display: inline-block; margin-top: 8px; font-size: 12px; color: var(--accent-ink); background: var(--accent-wash); border-radius: 999px; padding: 2px 9px; }
  /* ---- model picker ---- */
  .pickrow { padding-top: 10px; padding-bottom: 12px; }
  .picker { position: relative; }
  .pick { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px 0 10px; min-width: 300px; max-width: 460px; border: 1px solid var(--line2); border-radius: 12px; background: var(--panel); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; }
  .pick:hover { border-color: var(--mute2); box-shadow: 0 1px 3px rgba(15, 23, 43, .08); }
  .pick:focus-visible, .pick[aria-expanded="true"] { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px var(--accent-wash); }
  .pick-mark, .item-mark { width: 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; letter-spacing: .02em; color: #fff; flex: none; }
  .pick-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.2; }
  .pick-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pick-sub { font-size: 12px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .chev { color: var(--mute); transition: transform .15s; flex: none; }
  .pick[aria-expanded="true"] .chev { transform: rotate(180deg); }
  .pop { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: min(560px, calc(100vw - 40px)); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 50px rgba(15, 23, 43, .18), 0 2px 8px rgba(15, 23, 43, .06); overflow: hidden; animation: pop .12s ease-out; }
  @keyframes pop { from { opacity: 0; transform: translateY(-4px) } to { opacity: 1; transform: none } }
  .pop-search { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--mute); }
  .pop-search input { flex: 1; border: 0; background: transparent; padding: 4px 0; font-size: 14px; }
  .pop-search input:focus { outline: none; }
  .pop-search kbd { font: 11px ui-monospace, Menlo, monospace; color: var(--mute); border: 1px solid var(--line2); border-radius: 5px; padding: 1px 5px; background: var(--card); }
  .pop-list { max-height: 420px; overflow: auto; padding: 6px; }
  .pop-group { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); font-weight: 600; padding: 10px 10px 4px; }
  .item { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; cursor: pointer; color: var(--ink); }
  .item:hover, .item.hl { background: var(--card); }
  .item.on { background: var(--accent-wash); }
  .item .nm { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .item .nm .pill { font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent-wash); border-radius: 5px; padding: 1px 5px; margin-left: 6px; vertical-align: middle; }
  .item .nm .pill.free { color: #166534; background: #DCFCE7; }
  .trial a { color: inherit; font-weight: 700; }
  .item .sb { font-size: 12px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .item .cost { font-size: 12px; color: var(--ink2); font-variant-numeric: tabular-nums; text-align: right; }
  .item .cost small { display: block; color: var(--mute); font-size: 11px; }
  .item.off { opacity: .45; cursor: default; }
  .pop-empty { padding: 26px; text-align: center; color: var(--mute); font-size: 14px; }
  .privacy { flex: 1; min-width: 200px; }
  /* ---- studio tools ---- */
  .studio-tools { max-width: 760px; margin: 0 auto 10px; display: flex; gap: 18px; align-items: flex-end; flex-wrap: wrap; }
  .tool { display: flex; flex-direction: column; gap: 5px; }
  .tool.grow { flex: 1; min-width: 220px; }
  .tool-k { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); font-weight: 600; }
  .refrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
  .refstrip { display: flex; gap: 6px; }
  .ref { position: relative; width: 36px; height: 36px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line2); box-shadow: 0 1px 2px rgba(15, 23, 43, .08); }
  .ref img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .ref button { position: absolute; inset: 0; border: 0; background: rgba(15, 23, 43, .55); color: #fff; font-size: 14px; opacity: 0; cursor: pointer; transition: opacity .12s; }
  .ref:hover button { opacity: 1; }
  .drop { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: 1.5px dashed var(--line2); border-radius: 9px; color: var(--mute); font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
  .drop:hover, .drop.over { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-wash); }
  /* ---- composer ---- */
  .compose .box { max-width: 760px; margin: 0 auto; display: flex; gap: 8px; align-items: flex-end; padding: 8px 8px 8px 14px; background: var(--panel); border: 1px solid var(--line2); border-radius: 16px; box-shadow: 0 1px 2px rgba(15, 23, 43, .06); transition: border-color .15s, box-shadow .15s; }
  .compose .box:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px var(--accent-wash); }
  .compose .box textarea { border: 0; background: transparent; padding: 8px 0; min-height: 30px; }
  .compose .box textarea:focus { outline: none; }
  .webtog { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border: 1px solid var(--line2); border-radius: 11px; background: var(--panel); color: var(--mute); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
  .webtog:hover { color: var(--ink); }
  .webtog.on { background: var(--accent-wash); border-color: var(--accent-edge); color: var(--accent-ink); }
  .sources { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
  .sources a { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink2); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px 3px 4px; text-decoration: none; max-width: 240px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .sources a:hover { border-color: var(--accent); color: var(--accent-ink); }
  .sources .n { width: 16px; height: 16px; border-radius: 50%; background: var(--accent-wash); color: var(--accent-ink); font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
  .send { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 16px; border: 0; border-radius: 11px; background: var(--navy); color: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .15s, transform .05s; }
  .send:hover { background: var(--navy-hover); }
  .send:active { transform: translateY(1px); }
  .send:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
  .send:disabled { opacity: .5; cursor: default; transform: none; }
  .send.gen { background: var(--accent); }
  .send.gen:hover { background: var(--accent-ink); }
  .studio { max-width: 1100px; margin: 0 auto; padding: 8px 0 24px; }
  .studio-head h2 { margin: 0 0 4px; font-size: 20px; }
  .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 16px; }
  .gen-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 1px 2px rgba(15, 23, 43, .05); transition: box-shadow .15s, transform .15s; }
  .gen-card:hover { box-shadow: 0 8px 24px rgba(15, 23, 43, .12); transform: translateY(-1px); }
  .gen-card img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--card); }
  .gen-card audio { display: block; width: 100%; padding: 12px 10px 0; }
  .gen-wait { padding: 40px 12px; text-align: center; color: var(--mute); background: var(--card); }
  .gen-card.err .gen-wait { color: var(--bad); }
  .gen-prompt { padding: 10px 12px 4px; font-size: 13px; color: var(--ink); overflow-wrap: anywhere; }
  .gen-card .meta { padding: 0 12px 10px; font-size: 11px; color: var(--mute); }
  .msg img.gen { display: block; max-width: min(100%, 520px); border-radius: 10px; margin-top: 8px; border: 1px solid var(--line); }
  .msg audio.gen { display: block; margin-top: 8px; width: min(100%, 420px); }
  .compose { border-top: 1px solid var(--line); background: var(--header); padding: 14px 22px 18px; }
  textarea { flex: 1; min-height: 46px; max-height: 200px; padding: 11px 12px; resize: none; }
  .hint { max-width: 760px; margin: 8px auto 0; }
  .empty { max-width: 560px; margin: 70px auto; text-align: center; color: var(--mute); }
  .empty.small { margin: 40px auto; }
  /* ---- explore ---- */
  .explore { max-width: 1080px; margin: 0 auto; padding-bottom: 20px; }
  .hero { text-align: center; padding: 26px 0 22px; }
  .hero h1 { font-size: 34px; letter-spacing: -0.02em; margin: 0 0 8px; color: var(--ink); }
  .hero p { margin: 0; color: var(--mute); font-size: 15px; }
  .grad { background: linear-gradient(90deg, #155DFC, #7C3AED, #155DFC); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: slide 6s linear infinite; }
  @keyframes slide { to { background-position: 200% 0 } }
  .pills { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
  .pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--ink2); }
  .pill svg { width: 14px; height: 14px; }
  .chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
  .chip { max-width: 100%; text-align: left; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line2); background: var(--panel); color: var(--ink2); font: inherit; font-size: 13px; cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s; }
  .chip:hover { border-color: var(--accent); color: var(--accent-ink); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(21, 93, 252, .12); }
  .chip.on { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-wash); }
  .chip.again { font-size: 12px; padding: 5px 9px; }
  .ex-sec { margin-top: 26px; }
  .ex-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
  .ex-head h2 { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; margin: 0; color: var(--ink); }
  .ex-head h2 svg { width: 16px; height: 16px; color: var(--accent-ink); }
  .ex-head h2 .n { font-size: 12px; color: var(--mute); font-weight: 600; }
  .link { border: 0; background: transparent; color: var(--accent-ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
  .link:hover { text-decoration: underline; }
  .mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
  .mcard { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); font: inherit; color: var(--ink); cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; }
  .mcard:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(15, 23, 43, .12); border-color: var(--line2); }
  .mcard:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
  .mcard.off { opacity: .45; cursor: default; }
  .mcard .item-mark { width: 34px; height: 34px; border-radius: 10px; font-size: 12px; }
  .mgrid.tiles { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
  .mcard.tile { display: block; padding: 0; overflow: hidden; }
  .mcard.tile img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--card); transition: transform .35s ease; }
  .mcard.tile:hover img { transform: scale(1.04); }
  .tile-body { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; }
  .tile-body .item-mark { width: 30px; height: 30px; border-radius: 9px; font-size: 11px; }
  .mc-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mc-sub { font-size: 12px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mc-tags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; max-width: 96px; }
  .mtag { font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; }
  .mtag.top { background: #FEE2E2; color: #B91C1C; }
  .mtag.new { background: #DCFCE7; color: #15803D; }
  .mtag.cheap { background: var(--accent-wash); color: var(--accent-ink); }
  .mtag.free { background: #FEF3C7; color: #B45309; }
  /* ---- motion ---- */
  .caret { display: inline-block; width: 7px; height: 15px; margin-left: 2px; vertical-align: -2px; background: var(--accent); border-radius: 2px; animation: blink 1s steps(2) infinite; }
  @keyframes blink { 50% { opacity: 0 } }
  .shimmer { position: relative; overflow: hidden; }
  .shimmer::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.7) 50%, transparent 80%); transform: translateX(-100%); animation: shine 1.4s infinite; }
  @keyframes shine { to { transform: translateX(100%) } }
  .pulse { display: block; width: 28px; height: 28px; margin: 0 auto 10px; border-radius: 50%; background: var(--accent); opacity: .35; animation: pulse 1.2s ease-in-out infinite; }
  @keyframes pulse { 50% { transform: scale(1.35); opacity: .15 } }
  .gen-card img { animation: reveal .5s ease-out; }
  @keyframes reveal { from { opacity: 0; transform: scale(.98) } to { opacity: 1; transform: none } }
  .gen-actions { padding: 0 12px 10px; }
  .send.ready { box-shadow: 0 0 0 4px var(--accent-wash); }
  @media (prefers-reduced-motion: reduce) { .grad, .caret, .shimmer::after, .pulse, .gen-card img { animation: none } }
  .empty h1 { font-size: 24px; letter-spacing: -0.01em; color: var(--ink); margin: 0 0 8px; }
  .empty p { margin: 0 0 6px; font-size: 15px; }
  .modal { position: fixed; inset: 0; background: rgba(15, 23, 43, .45); display: none; align-items: center; justify-content: center; padding: 20px; }
  .modal.on { display: flex; }
  .sheet { width: 100%; max-width: 540px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px 20px 18px; box-shadow: 0 16px 48px rgba(15, 23, 43, .16); }
  .sheet h2 { margin: 0 0 6px; font-size: 18px; color: var(--ink); }
  .sheet textarea { width: 100%; min-height: 110px; margin-top: 8px; font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
  .sheet .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
  .addr { background: var(--card); border: 1px solid var(--line2); border-radius: 8px; padding: 8px 10px; display: flex; gap: 8px; align-items: center; margin-top: 6px; }
  .addr .mono { flex: 1; }
  .badge { font-size: 11px; padding: 2px 6px; border-radius: 6px; background: var(--accent-wash); color: var(--accent-ink); }
  .badge.off { background: #FFF4D6; color: var(--warn); }
  .steps { display: grid; grid-template-columns: 24px 1fr; gap: 8px 10px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--ink2); }
  .steps .n { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line2); background: var(--card); display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--mute); font-weight: 600; }
  /* ---- phones: the sidebar is a drawer, the top bar wraps, everything else goes single column ---- */
  .menu-btn { display: none; }
  .side-backdrop { display: none; }
  .main { min-width: 0; }
  @media (max-width: 760px) {
    body { overflow-x: hidden; }
    .app { grid-template-columns: 1fr; }
    .side { position: fixed; inset: 0 auto 0 0; width: min(320px, 88vw); z-index: 60; transform: translateX(-104%); transition: transform .22s ease; box-shadow: 0 0 0 rgba(0,0,0,0); overflow-y: auto; }
    .side.open { transform: none; box-shadow: 0 24px 60px rgba(15, 23, 43, .28); }
    .side-backdrop { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(15, 23, 43, .35); opacity: 0; pointer-events: none; transition: opacity .2s; }
    .side-backdrop.on { opacity: 1; pointer-events: auto; }
    .menu-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid var(--line2); border-radius: 11px; background: var(--panel); color: var(--ink); cursor: pointer; flex: none; }
    .menu-btn svg { width: 18px; height: 18px; }
    .top { flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
    .top .explore-btn span { display: none; }
    .top .explore-btn { padding: 0 10px; }
    #modelTabs { order: 10; flex-basis: 100%; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    #modelTabs::-webkit-scrollbar { display: none; }
    #modelTabs button { flex: none; }
    .sitenav a { padding: 0 9px; font-size: 12.5px; }
    .pickrow { padding: 8px 12px 10px; }
    .pick { min-width: 0; width: 100%; max-width: none; }
    .thread { padding: 16px 12px; }
    .hero { padding: 14px 0 12px; }
    .hero h1 { font-size: clamp(24px, 7.2vw, 34px); }
    .hero p { font-size: 14px; }
    .mgrid, .mgrid.tiles { grid-template-columns: 1fr; }
    .compose { padding: 10px 12px 12px; }
    .msg { grid-template-columns: 26px 1fr; gap: 10px; }
    .modal { padding: 10px; align-items: flex-end; }
    .sheet { max-height: 92vh; overflow: auto; padding: 16px 14px 14px; }
    .zec-qr { width: 132px; height: 132px; }
    .wmenu { right: -8px; }
    textarea { min-height: 44px; }
  }
