/* the dashboard: a quiet sidebar and glass cards; violet only where something is active */
[hidden] { display: none !important; }
.app { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 28px; padding: 24px 18px;
        border-right: 1px solid var(--line); background: rgba(18, 16, 21, .6); }
.side .brand { padding: 0 8px; }
.tabs { display: flex; flex-direction: column; gap: 4px; }
.tabs a { color: var(--mute); text-decoration: none; font-weight: 600; padding: 10px 12px; border-radius: 10px; transition: background .15s, color .15s; }
.tabs a:hover { color: var(--text); background: rgba(255, 255, 255, .03); }
.tabs a[aria-current="page"] { color: var(--text); background: rgb(var(--v-rgb) / .12); box-shadow: inset 2px 0 0 var(--violet); }
.me { margin-top: auto; display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; background: var(--char); border: 1px solid var(--line); }
.me img { width: 38px; height: 38px; border-radius: 50%; object-fit: contain; background: var(--char-2); image-rendering: pixelated; }
.me b { display: block; font-size: 15px; }
.me span { font-size: 13px; color: var(--mute); }

.main { padding: 40px 44px 80px; max-width: 1180px; width: 100%; position: relative; }
.pane-head h1 { font-size: 36px; letter-spacing: -.015em; margin: 0 0 4px; }
.pane-head p { color: var(--mute); margin: 0 0 28px; }
.pane { animation: in .25s ease-out; }
@keyframes in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.card { padding: 24px; }
.card h2 { font-size: 18px; margin: 0 0 14px; letter-spacing: -.005em; }
.card h2.gap { margin-top: 26px; }
.muted { color: var(--mute); }
.small { font-size: 13px; margin: 0 0 8px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 0; }
.facts dt { color: var(--mute); }
.facts dd { margin: 0; font-weight: 600; word-break: break-all; }
.status { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 18px; margin: 0 0 6px; }
.status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--mute); }
.status.active { color: var(--gold); } .status.active::before { background: var(--gold); box-shadow: 0 0 12px var(--gold); }
.status.expired { color: var(--danger); } .status.expired::before { background: var(--danger); }
.status.big { font-size: 26px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.discord { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.discord img { width: 42px; height: 42px; border-radius: 50%; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.row input { flex: 1; min-width: 180px; }

/* biolink editor */
.editor { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); gap: 22px; align-items: start; }
.link-row { display: grid; grid-template-columns: 1fr 1.6fr auto; gap: 8px; margin-bottom: 8px; }
.link-row button { background: none; border: 1px solid var(--line-2); color: var(--mute); border-radius: 10px; padding: 0 12px; cursor: pointer; font-size: 18px; }
.link-row button:hover { color: var(--danger); border-color: var(--danger); }
.lk-clicks { grid-column: 1 / -1; margin: -2px 0 2px 2px; font-size: 12.5px; color: var(--mute); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.swatch[aria-pressed="true"] { border-color: var(--text); box-shadow: 0 0 0 3px rgba(255, 255, 255, .08); }
input[type="color"] { width: 56px; height: 38px; padding: 3px; vertical-align: middle; }
label.inline { display: inline-block; margin-right: 10px; }
.checks .check { display: flex; gap: 10px; align-items: center; font-weight: 500; margin-bottom: 10px; }
.checks input { width: auto; }
.prem-only.off { opacity: .45; pointer-events: none; }
.locked { padding: 12px 14px; border-radius: 10px; background: rgba(230, 180, 80, .07); border: 1px solid rgba(230, 180, 80, .3); color: #f1d08a; font-size: 14px; }
.locked a { color: #f1d08a; }
option:disabled { color: #5c5568; }

.preview-wrap { position: sticky; top: 24px; }
.preview { --accent: var(--violet); border-radius: 22px; padding: 34px 22px 28px; text-align: center; background: var(--void);
           border: 1px solid var(--line); min-height: 420px; position: relative; overflow: hidden; background-size: cover; background-position: center; }
.preview::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 18%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 60%); pointer-events: none; }
.preview > * { position: relative; }
.pv-avatar { width: 92px; height: 92px; border-radius: 50%; margin: 0 auto 12px; object-fit: cover; border: 2px solid var(--accent);
             box-shadow: 0 0 28px color-mix(in srgb, var(--accent) 45%, transparent); background: var(--char-2); }
.preview h3 { margin: 0; font-size: 24px; }
.pv-handle { color: var(--mute); font-size: 14px; margin: 2px 0 10px; }
.pv-tags { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.pv-tags span { font-size: 12px; padding: 4px 9px; border-radius: 999px; background: rgba(255, 255, 255, .06); color: var(--mute); }
.pv-tags .gold { color: #f1d08a; background: rgba(230, 180, 80, .12); }
.pv-bio { color: var(--text); white-space: pre-wrap; margin: 0 0 16px; }
.pv-links span { display: block; padding: 12px; margin-top: 8px; border-radius: 12px; font-weight: 600;
                 background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }

/* premium */
.redeem { display: flex; gap: 10px; }
.redeem input { font-family: "Silkscreen", monospace; letter-spacing: .04em; }
.perks { list-style: none; padding: 0; margin: 0 0 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.perks li { padding: 11px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; }
.perks span { color: var(--mute); font-size: 15px; }
.danger-zone { border-color: rgba(240, 97, 122, .3); }

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 50; padding: 12px 16px; border-radius: 12px; background: var(--char-2);
         border: 1px solid var(--line-2); font-weight: 600; opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: none; }
.loading { position: fixed; inset: 0; display: grid; place-items: center; background: var(--void); }
.loading img { height: 48px; width: auto; image-rendering: pixelated; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; filter: drop-shadow(0 0 16px rgb(var(--v-rgb) / .7)); } }

@media (max-width: 980px) {
  .editor { grid-template-columns: 1fr; }
  .preview-wrap { position: static; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .side { position: sticky; z-index: 10; height: auto; flex-direction: row; align-items: center; gap: 12px; padding: 12px 16px; overflow-x: auto;
          border-right: 0; border-bottom: 1px solid var(--line); background: rgba(9, 8, 11, .9); backdrop-filter: blur(10px); }
  .tabs { flex-direction: row; gap: 2px; }
  .tabs a { padding: 8px 10px; white-space: nowrap; font-size: 15px; }
  .tabs a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--violet); }
  .side .brand span, .me { display: none; }
  .main { padding: 24px 16px 70px; }
  .grid-2, .perks { grid-template-columns: 1fr; }
  .link-row { grid-template-columns: 1fr auto; }
  .link-row input:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .redeem { flex-direction: column; }
}

/* owner panel */
.search { display: flex; gap: 10px; padding: 14px; margin-bottom: 12px; }
.table-wrap { padding: 6px 0; overflow-x: auto; }
.admin { width: 100%; border-collapse: collapse; font-size: 15px; }
.admin th { text-align: left; color: var(--mute); font-weight: 600; font-size: 13px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.admin td { padding: 8px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.admin tr:last-child td { border-bottom: 0; }
.admin input { padding: 8px 10px; font-size: 15px; }
.admin .in-uid { width: 90px; }
.admin .in-name { min-width: 160px; }
.admin .err { color: var(--danger); font-size: 13px; white-space: normal; }
.uid-pill, .chip-tier { display: inline-block; font-size: 12px; padding: 3px 9px; border-radius: 999px; font-weight: 600; }
.chip-tier { color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); margin: 0 6px 6px 0; }
.potion-profile { margin: 4px 0 6px; }
.badge-row { display: flex; gap: 6px; flex-wrap: wrap; justify-content: inherit; margin: 6px 0; }
.pv-tags .badge-row { flex-basis: 100%; justify-content: center; margin: 0 0 4px; }
.pv-avatar.def, .discord img.def { object-fit: contain; padding: 12px 28px; image-rendering: pixelated; }
.discord img.def { padding: 6px 13px; background: var(--char-2); }

/* unrestricted AI */
.lock-ico { width: 13px; height: 13px; fill: #e6b450; vertical-align: -1px; margin-left: 4px; }
.ai-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.chat { position: relative; display: flex; flex-direction: column; height: min(72vh, 760px); min-height: 460px; overflow: hidden; padding: 0; }
.msgs { flex: 1; overflow-y: auto; padding: 26px 26px 10px; display: flex; flex-direction: column; gap: 18px; scroll-behavior: smooth; }
.empty { margin: auto; text-align: center; }
.empty h2 { margin: 18px 0 18px; font-size: 24px; }
.orb { width: 84px; height: 84px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle, rgb(var(--v-rgb) / .28), transparent 70%); animation: orb 4s ease-in-out infinite; }
.orb img { width: 20px; image-rendering: pixelated; filter: drop-shadow(0 0 12px rgb(var(--v-rgb) / .8)); }
@keyframes orb { 50% { transform: translateY(-5px); } }
.starters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 520px; }
.starters button { font: 600 14px "Bricolage Grotesque", sans-serif; color: var(--text); padding: 10px 14px; border-radius: 12px; cursor: pointer;
  background: rgba(255, 255, 255, .03); border: 1px solid var(--line-2); transition: border-color .15s, background .15s; }
.starters button:hover { border-color: var(--violet); background: rgb(var(--v-rgb) / .08); }
.msg { display: flex; gap: 12px; max-width: 100%; }
.msg.mine { justify-content: flex-end; }
.msg .avatar { width: 32px; height: 32px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--char-2); border: 1px solid var(--line-2); }
.msg .avatar img { width: 9px; image-rendering: pixelated; }
.msg .body { min-width: 0; max-width: min(720px, 86%); }
.msg.mine .body { background: rgb(var(--v-rgb) / .14); border: 1px solid rgb(var(--v-rgb) / .3); padding: 10px 14px; border-radius: 16px 16px 4px 16px; }
.msg.bot .text { padding-top: 5px; line-height: 1.62; overflow-wrap: anywhere; }
.text code { font: 14px ui-monospace, Menlo, Consolas, monospace; background: rgba(255, 255, 255, .07); padding: 1px 5px; border-radius: 5px; }
.text .h { display: block; font-size: 17px; margin-top: 4px; }
.text .li { display: block; padding-left: 16px; position: relative; } .text .li::before { content: "•"; position: absolute; left: 3px; color: var(--violet); }
.code { margin: 10px 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line-2); background: #0c0b0f; }
.code-bar { display: flex; justify-content: space-between; align-items: center; padding: 6px 12px; font: 12px ui-monospace, Menlo, monospace; color: var(--mute); background: rgba(255, 255, 255, .03); }
.code-bar button { background: none; border: 0; color: var(--mute); cursor: pointer; font: 600 12px "Bricolage Grotesque", sans-serif; }
.code-bar button:hover { color: var(--text); }
.code pre { margin: 0; padding: 12px 14px; overflow-x: auto; }
.code pre code { background: none; padding: 0; font-size: 13.5px; line-height: 1.55; }
.pics { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.pics img { width: 120px; height: 120px; object-fit: cover; border-radius: 10px; }
.files { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.file { font: 600 12px ui-monospace, Menlo, monospace; padding: 4px 8px; border-radius: 7px; background: rgba(255, 255, 255, .06); color: #ddd5ea; }
.made { margin: 0; display: grid; gap: 8px; justify-items: start; }
.made img { max-width: min(460px, 100%); border-radius: 14px; border: 1px solid var(--line-2); }
.msg .err { color: var(--danger); margin: 5px 0 0; }
.dots { display: inline-flex; gap: 5px; padding-top: 12px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--violet); animation: dot 1.1s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
.composer { padding: 12px 16px 14px; border-top: 1px solid var(--line); background: rgba(9, 8, 11, .55); }
.attached { display: flex; gap: 8px; flex-wrap: wrap; }
.attached:not(:empty) { margin-bottom: 10px; }
.att { position: relative; display: inline-flex; align-items: center; }
.att img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line-2); }
.att.file { font: 600 12px ui-monospace, Menlo, monospace; padding: 8px 28px 8px 10px; border-radius: 10px; background: var(--char-2); border: 1px solid var(--line-2); }
.att button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 0; cursor: pointer; background: #2a2533; color: var(--text); font-size: 13px; line-height: 1; }
.att.file button { top: 50%; right: 5px; transform: translateY(-50%); background: none; }
.compose-row { display: flex; align-items: flex-end; gap: 8px; }
.compose-row textarea { flex: 1; min-height: 46px; max-height: 200px; resize: none; padding: 12px 14px; line-height: 1.45; border-radius: 14px; }
.tool { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 14px; cursor: pointer; color: var(--mute);
  background: rgba(255, 255, 255, .03); border: 1px solid var(--line-2); transition: color .15s, border-color .15s, background .15s; }
.tool:hover { color: var(--text); border-color: var(--mute); }
.tool[aria-pressed="true"] { color: var(--text); border-color: var(--violet); background: rgb(var(--v-rgb) / .16); }
.tool svg { width: 20px; height: 20px; fill: currentColor; }
.send { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 14px; border: 0; cursor: pointer;
  background: linear-gradient(135deg, var(--violet), var(--violet-deep)); box-shadow: 0 6px 20px -6px rgb(var(--v-rgb) / .8); }
.send svg { width: 19px; height: 19px; fill: #fff; }
.send:disabled, .tool:disabled, .compose-row textarea:disabled { opacity: .5; cursor: not-allowed; }
.mode-note { margin: 8px 0 0; font-size: 13px; color: var(--mute); display: flex; align-items: center; gap: 8px; }
.mode-note select { width: auto; padding: 4px 8px; font-size: 13px; }

/* locked: the chat sits blurred behind a clean Potion Premium banner */
.chat.is-locked .msgs, .chat.is-locked .composer { filter: blur(3px); opacity: .45; pointer-events: none; user-select: none; }
.ai-lock { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; background: radial-gradient(ellipse at center, rgba(9, 8, 11, .35), rgba(9, 8, 11, .8)); z-index: 5; }
.prem-banner { position: relative; overflow: hidden; display: flex; align-items: center; gap: 22px; padding: 26px 34px 26px 28px; border-radius: 22px;
  text-decoration: none; color: var(--text); border: 1px solid transparent;
  background: linear-gradient(160deg, #1b1610, #0f0c0a) padding-box, linear-gradient(135deg, #f6d68a, rgba(230, 180, 80, .15) 45%, #b8862f) border-box;
  box-shadow: 0 30px 80px -30px rgba(230, 180, 80, .45); transition: transform .25s ease, box-shadow .25s ease; }
.prem-banner:hover { transform: translateY(-2px); color: var(--text); box-shadow: 0 34px 90px -28px rgba(230, 180, 80, .6); }
.prem-banner img { width: 64px; height: 64px; image-rendering: pixelated; filter: drop-shadow(0 0 18px rgba(230, 180, 80, .55)); animation: orb 4s ease-in-out infinite; }
.pb-text { display: flex; flex-direction: column; }
.pb-kicker { display: inline-flex; align-items: center; gap: 6px; font: 600 11px ui-monospace, Menlo, monospace; letter-spacing: .16em; text-transform: uppercase; color: #c9a45c; }
.pb-kicker svg { width: 12px; height: 12px; fill: currentColor; }
.prem-banner b { font-size: 30px; letter-spacing: -.015em; line-height: 1.15; margin: 2px 0 4px;
  background: linear-gradient(180deg, #fff1cc, #e6b450); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pb-note { color: #b7a98d; font-size: 14px; }
.prem-banner .shine { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 236, 190, .12) 50%, transparent 65%) 0 0 / 250% 100%; animation: pb-shine 4.5s ease-in-out infinite; }
@keyframes pb-shine { 0%, 50% { background-position: 120% 0; } 100% { background-position: -20% 0; } }
@media (max-width: 760px) {
  .chat { height: calc(100vh - 210px); min-height: 420px; }
  .msgs { padding: 18px 14px 8px; }
  .msg .body { max-width: 92%; }
  .prem-banner { padding: 20px; gap: 14px; } .prem-banner b { font-size: 24px; } .prem-banner img { width: 48px; height: 48px; }
}
@media (prefers-reduced-motion: reduce) { .orb, .prem-banner img, .prem-banner .shine, .dots i { animation: none; } }

.ai-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.agent { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mute); font-weight: 600; }
.agent select { width: auto; max-width: 260px; padding: 9px 12px; font-size: 14px; }
@media (max-width: 760px) { .ai-head { flex-direction: column; } .ai-tools { justify-content: flex-start; } .agent select { max-width: 200px; } }

/* owner panel: sub-tabs, AI settings, database */
.subtabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.subtabs button { font: 600 15px "Bricolage Grotesque", sans-serif; color: var(--mute); padding: 9px 16px; border-radius: 10px; cursor: pointer;
  background: rgba(255, 255, 255, .02); border: 1px solid var(--line); }
.subtabs button[aria-pressed="true"] { color: var(--text); background: rgb(var(--v-rgb) / .12); border-color: rgb(var(--v-rgb) / .45); }
#model-in { flex: 1; min-width: 200px; }
.db-tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-bottom: 16px; }
.db-table { text-align: left; padding: 14px 16px; border-radius: 12px; cursor: pointer; color: var(--text);
  background: rgba(255, 255, 255, .02); border: 1px solid var(--line); font: inherit; }
.db-table b { display: block; font: 600 14px ui-monospace, Menlo, Consolas, monospace; }
.db-table span { color: var(--mute); font-size: 13px; }
.db-table:hover, .db-table[aria-pressed="true"] { border-color: rgb(var(--v-rgb) / .5); background: rgb(var(--v-rgb) / .08); }
.db-view { padding: 18px 0 6px; margin-bottom: 10px; }
.db-head { display: flex; align-items: center; gap: 12px; padding: 0 18px 12px; flex-wrap: wrap; }
.db-head h2 { margin: 0; font: 600 17px ui-monospace, Menlo, Consolas, monospace; }
.db-pager { margin-left: auto; display: flex; gap: 6px; }
.db-grid td { font: 13px ui-monospace, Menlo, Consolas, monospace; max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.db-grid th { font-family: ui-monospace, Menlo, Consolas, monospace; }

/* page editor: live preview frame and the colour picker */
.preview-wrap { position: sticky; top: 24px; border-radius: 20px; overflow: hidden; border: 1px solid var(--line-2); background: #0c0b0f;
  box-shadow: 0 30px 80px -40px rgb(var(--vd-rgb) / .6); }
.pv-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.pv-dot { width: 9px; height: 9px; border-radius: 50%; background: #2c2734; }
.pv-url { margin-left: 8px; flex: 1; font: 500 12px ui-monospace, Menlo, Consolas, monospace; color: var(--mute); padding: 4px 10px; border-radius: 7px; background: rgba(255, 255, 255, .04); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-live { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ichor); display: inline-flex; align-items: center; gap: 6px; }
.pv-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ichor); box-shadow: 0 0 8px var(--ichor); }
.pv-frame { display: block; width: 100%; height: min(78vh, 760px); border: 0; background: #09080b; }
.hint.bad { color: var(--danger); }
.swatches { align-items: center; }
.swatch.custom { background: conic-gradient(#f43f5e, #f59e0b, #84cc16, #06b6d4, #6366f1, #d946ef, #f43f5e); position: relative; }
.swatch.custom[aria-pressed="true"]::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--pick); border: 2px solid #09080b; }
.swatch.custom.locked { opacity: .45; }
.cpick { margin-top: 12px; padding: 14px; border-radius: 16px; background: var(--char-2); border: 1px solid var(--line-2); max-width: 340px; }
.sv { --hue: hsl(270 100% 50%); position: relative; height: 150px; border-radius: 12px; cursor: crosshair; touch-action: none;
  background: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, var(--hue)); }
.sv-dot { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.4), 0 2px 6px rgba(0,0,0,.5); pointer-events: none; }
.hue { -webkit-appearance: none; appearance: none; width: 100%; height: 14px; margin: 14px 0; padding: 0; border-radius: 999px; border: 0; cursor: pointer;
  background: linear-gradient(90deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); }
.hue::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.4), 0 2px 6px rgba(0,0,0,.5); }
.hue::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.4); }
.hue:focus { box-shadow: none; }
.cp-row { display: flex; gap: 8px; align-items: center; }
.cp-chip { width: 38px; height: 38px; flex: none; border-radius: 10px; border: 1px solid var(--line-2); }
.cp-row input { flex: 1; font: 600 15px ui-monospace, Menlo, Consolas, monospace; text-transform: lowercase; padding: 9px 12px; }

.badge-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.bp { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 8px; border-radius: 12px; cursor: pointer;
  font: 600 14px "Bricolage Grotesque", sans-serif; color: var(--mute); background: rgba(255, 255, 255, .03); border: 1px solid var(--line-2); transition: border-color .15s, color .15s, background .15s; }
.bp img { image-rendering: pixelated; opacity: .55; transition: opacity .15s; }
.bp:hover { color: var(--text); border-color: var(--mute); }
.bp.on { color: var(--text); border-color: rgb(var(--v-rgb) / .6); background: rgb(var(--v-rgb) / .12); }
.bp.on img { opacity: 1; }
.bp i { position: absolute; top: -7px; right: -7px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  font: 700 10px "Bricolage Grotesque", sans-serif; font-style: normal; color: #fff; background: var(--violet); }
.linkish { background: none; border: 0; padding: 0; color: var(--violet); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* owner panel: activity and AI logs */
.kinds { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.kinds button { font: 600 13px "Bricolage Grotesque", sans-serif; color: var(--mute); padding: 7px 11px; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, .02); border: 1px solid var(--line); }
.kinds button span { opacity: .6; margin-left: 3px; }
.kinds button[aria-pressed="true"] { color: var(--text); border-color: rgb(var(--v-rgb) / .5); background: rgb(var(--v-rgb) / .12); }
.log-list { padding: 6px 0; }
.log-row { display: grid; grid-template-columns: 170px 150px 1fr 90px; gap: 14px; align-items: center; padding: 11px 18px; border-bottom: 1px solid var(--line); font-size: 14px; }
.log-row:last-child { border-bottom: 0; }
.lg-kind { justify-self: start; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: rgba(255, 255, 255, .06); color: #d6d0e2; }
.lg-kind.g { color: var(--ichor); background: rgb(var(--g-rgb) / .12); } .lg-kind.r { color: #f59aab; background: rgba(229, 84, 107, .14); }
.lg-kind.y { color: #f1d08a; background: rgba(230, 180, 80, .12); } .lg-kind.v { color: var(--violet-2); background: rgb(var(--v-rgb) / .14); }
.lg-who { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-detail { color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-row time, .ail time { color: var(--mute); font-size: 13px; text-align: right; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 12px 0 0; }
.empty-note { padding: 18px; margin: 0; }
.ai-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 12px; }
.stat { padding: 18px; } .stat b { display: block; font-size: 28px; letter-spacing: -.01em; } .stat span { color: var(--mute); font-size: 13px; }
.ail-list { display: grid; gap: 10px; }
.ail { padding: 16px 18px; }
.ail header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.ail header time { margin-left: auto; }
.ail-tag { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: rgba(255, 255, 255, .06); color: #d6d0e2; }
.ail-tag.r { color: #f59aab; background: rgba(229, 84, 107, .14); }
.ail-model { font-family: ui-monospace, Menlo, Consolas, monospace; }
.ail-q { margin: 0 0 6px; font-weight: 600; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 4.8em; overflow: hidden; }
.ail-a { margin: 0 0 6px; color: var(--mute); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 4.8em; overflow: hidden; font-size: 15px; }
.ail.open .ail-q, .ail.open .ail-a { max-height: none; }
.ail.failed { border-color: rgba(229, 84, 107, .3); }
@media (max-width: 760px) {
  .log-row { grid-template-columns: 1fr auto; } .lg-detail { grid-column: 1 / -1; white-space: normal; } .lg-who { grid-row: 2; }
  .ai-stats { grid-template-columns: 1fr; }
}

/* Unrestricted AI: an open, centred conversation with a floating message box */
.ai-pane .chat { background: none; border: 0; box-shadow: none; backdrop-filter: none; height: calc(100vh - 190px); min-height: 480px; border-radius: 0; }
.ai-pane .msgs { padding: 8px 4px 24px; }
.ai-pane .msgs > * { width: 100%; max-width: 780px; margin-left: auto; margin-right: auto; }
.ai-pane .empty { max-width: 560px; }
.ai-pane .composer { width: 100%; max-width: 780px; margin: 0 auto; padding: 0; border: 0; background: none; }
.ai-pane .compose-row { align-items: flex-end; gap: 6px; padding: 8px; border-radius: 20px; background: linear-gradient(180deg, #17141c, #121016);
  border: 1px solid var(--line-2); box-shadow: 0 20px 50px -24px rgba(0, 0, 0, .8), 0 0 0 1px rgb(var(--v-rgb) / 0); transition: border-color .15s, box-shadow .15s; }
.ai-pane .compose-row:focus-within { border-color: rgb(var(--v-rgb) / .55); box-shadow: 0 20px 50px -24px rgba(0, 0, 0, .8), 0 0 0 4px rgb(var(--v-rgb) / .12); }
.ai-pane .compose-row textarea { border: 0; background: transparent; box-shadow: none; padding: 11px 8px; min-height: 44px; }
.ai-pane .compose-row textarea:focus { box-shadow: none; }
.ai-pane .tool { width: 40px; height: 40px; border-radius: 12px; border: 0; background: transparent; }
.ai-pane .tool:hover { background: rgba(255, 255, 255, .05); }
.ai-pane .tool[aria-pressed="true"] { background: rgb(var(--v-rgb) / .18); }
.ai-pane .send { width: 40px; height: 40px; border-radius: 12px; }
.ai-pane .attached:not(:empty) { margin: 0 0 8px; padding: 0 4px; }
.ai-note { margin: 8px 0 0; text-align: center; font-size: 12px; color: #6f6880; }
.ai-pane .mode-note { justify-content: center; }
.ai-pane .msg.bot .avatar { width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle, rgb(var(--v-rgb) / .3), rgb(var(--v-rgb) / .08)); border: 0; }
.ai-pane .msg.mine .body { border-radius: 18px 18px 6px 18px; padding: 10px 15px; }
.ai-pane .chat.is-locked .msgs, .ai-pane .chat.is-locked .composer { filter: blur(4px); }
.ai-pane .ai-lock { background: radial-gradient(ellipse at center, rgba(9, 8, 11, .2), rgba(9, 8, 11, .85) 70%); }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .02); transition: border-color .15s, background .15s; }
.seg b { font-size: 14px; } .seg small { color: var(--mute); font-size: 12.5px; }
.seg input:checked + span { border-color: rgb(var(--v-rgb) / .6); background: rgb(var(--v-rgb) / .1); }
.seg input:focus-visible + span { outline: 2px solid var(--violet); outline-offset: 2px; }
.seg-3 { grid-template-columns: repeat(3, 1fr); }
.seg .locked-opt { cursor: not-allowed; opacity: .55; }
.prem-tag { font-style: normal; font-size: 10.5px; font-weight: 700; color: #e6b450; margin-left: 4px; letter-spacing: .02em; }
#look .field > .field { margin: 10px 0 0; }
@media (max-width: 520px) { .seg, .seg-3 { grid-template-columns: 1fr 1fr; } }

.timing { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; margin-top: 10px; }
.timing label > span { display: block; font-size: 12.5px; color: var(--mute); margin-bottom: 4px; font-weight: 600; }
.timing input:not([type]) , .timing input[inputmode] { font: 600 15px ui-monospace, Menlo, Consolas, monospace; }
.timing input.bad { border-color: var(--danger); }
.timing .loop { margin: 0 0 12px; white-space: nowrap; }
@media (max-width: 520px) { .timing { grid-template-columns: 1fr 1fr; } .timing .loop { grid-column: 1 / -1; margin: 0; } }
.timing .check { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; } .timing .check input { width: auto; }

/* Premium plans (Stripe) */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 8px; }
.plan { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 16px; border-radius: 14px; cursor: pointer;
  background: rgba(255, 255, 255, .02); border: 1px solid var(--line-2); color: var(--text); font: inherit; transition: border-color .15s, box-shadow .15s; }
.plan:hover { border-color: var(--violet); box-shadow: 0 8px 32px -10px var(--violet-glow); }
.plan .price { font-size: 28px; font-weight: 800; color: var(--violet); }
.plan .muted { font-size: 14px; }
.plan.life { border-color: rgba(230, 180, 80, .5); }
.plan.life .price { color: var(--gold); }
.plan.life:hover { border-color: var(--gold); box-shadow: 0 8px 32px -10px rgba(230, 180, 80, .4); }
.plan:disabled { opacity: .5; cursor: default; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr 1fr; } }
#buy-card { margin-bottom: 20px; }

/* My page editor tabs */
.ed-tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 18px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line-2); overflow-x: auto; }
.ed-tabs button { flex: 1; padding: 9px 12px; border: 0; border-radius: 9px; background: none; color: var(--mute); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; }
.ed-tabs button:hover { color: var(--text); }
.ed-tabs button[aria-selected="true"] { color: var(--text); background: rgb(var(--v-rgb) / .16); box-shadow: inset 0 0 0 1px rgb(var(--v-rgb) / .45); }
#fx-pick span { padding: 9px 12px; }

/* ---- polish pass: tab icons, overview numbers, Premium time left, phone tab bar */
.tabs a { display: flex; align-items: center; gap: 11px; }
.t-ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }
.tabs a[aria-current="page"] .t-ico { color: var(--violet-2); opacity: 1; }
.tabs .lock-ico { margin-left: auto; }
.t-short { display: none; }
.side { background: linear-gradient(180deg, rgb(var(--vd-rgb) / .07), transparent 40%), rgba(18, 16, 21, .6); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-tile { padding: 18px 20px; border-radius: 14px; display: flex; flex-direction: column; gap: 2px; position: relative; overflow: hidden; }
.stat-tile::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px; background: linear-gradient(90deg, transparent, rgb(var(--v-rgb) / .5), transparent); }
.stat-tile b { font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat-tile b i { font-style: normal; font-size: 18px; color: var(--mute); font-weight: 600; }
.stat-tile span { color: var(--mute); font-size: 14px; font-weight: 600; }
.stat-tile small { color: #6f6880; font-size: 12px; }

.meter { height: 8px; border-radius: 99px; background: var(--char-2); border: 1px solid var(--line); overflow: hidden; margin: 10px 0 4px; }
.meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #c99a3c, var(--gold)); box-shadow: 0 0 12px rgba(230, 180, 80, .5); }
#pr-get { margin-top: 12px; }

.plan img { width: 36px; height: 36px; image-rendering: pixelated; margin-bottom: 6px; }
.plan:not(:disabled):active { transform: translateY(1px); }
.btn:focus-visible, .plan:focus-visible, .tabs a:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
#set-discord .btn { margin-top: 12px; }
.loading p { text-align: center; }

@media (max-width: 1100px) { .stats { grid-template-columns: 1fr 1fr; } }
/* phones: the tabs become a bar along the bottom, so all of them fit without sideways scrolling */
@media (max-width: 760px) {
  .side { padding: 12px 16px; overflow: visible; backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(9, 8, 11, .96); }
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0;
          padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: rgba(12, 11, 15, .94); border-top: 1px solid var(--line);
          backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  .tabs a { flex-direction: column; gap: 3px; padding: 6px 2px; font-size: 11px; font-weight: 600; border-radius: 10px; text-align: center; white-space: nowrap; position: relative; }
  .tabs a[aria-current="page"] { box-shadow: none; background: rgb(var(--v-rgb) / .14); }
  .t-ico { width: 21px; height: 21px; }
  .t-long { display: none; } .t-short { display: inline; }
  .tabs .lock-ico { position: absolute; top: 3px; right: calc(50% - 20px); margin: 0; width: 10px; height: 10px; }
  .main { padding-bottom: 110px; }
  .toast { bottom: 84px; right: 16px; left: 16px; text-align: center; }
  .stats { gap: 10px; }
  .stat-tile { padding: 14px 16px; }
  .stat-tile b { font-size: 24px; }
}
@media (max-width: 760px) { .ai-pane .chat { height: calc(100dvh - 250px); min-height: 400px; } }

/* ---- owner panel: Stats */
.os-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.os-head .small { margin: 0; }
.os-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.stat-tile.gold b { color: var(--gold); }
.stat-tile.warn b { color: var(--danger); }
.stat-tile.ok b { color: var(--ichor); }
.os-charts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.os-chart header { display: flex; justify-content: space-between; align-items: baseline; }
.os-chart h2 { margin: 0; font-size: 15px; color: var(--mute); }
.os-chart header b { font-size: 22px; }
.os-bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; height: 110px; align-items: end; margin: 14px 0 8px; }
.os-bars span { height: 100%; display: flex; align-items: flex-end; }
.os-bars i { display: block; width: 100%; height: max(3px, var(--h)); border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, var(--violet-2), var(--violet)); opacity: .9; transition: opacity .15s; }
.os-bars.b i { background: linear-gradient(180deg, #93c5fd, #3b82f6); }
.os-bars.g i { background: linear-gradient(180deg, var(--violet-2), var(--ichor)); }
.os-bars span:hover i { opacity: 1; box-shadow: 0 0 14px rgb(var(--v-rgb) / .5); }
.os-chart footer { display: flex; justify-content: space-between; color: #6f6880; font-size: 12px; }
.os-list { list-style: none; margin: 0; padding: 0; counter-reset: os; }
.os-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.os-list li:last-child { border-bottom: 0; }
.os-list li span { color: var(--mute); font-size: 13px; text-align: right; }
.os-list a { font-weight: 600; text-decoration: none; }

/* ---- owner panel: Site theme */
.th-layout { display: grid; gap: 18px; }
.th-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.th-card { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 14px; cursor: pointer; margin: 0; font-weight: 400;
  background: var(--char); border: 1px solid var(--line); transition: border-color .15s, background .15s; }
.th-card:hover { border-color: var(--line-2); }
.th-card.on { border-color: var(--a); background: color-mix(in srgb, var(--a) 9%, var(--char)); box-shadow: 0 0 0 1px var(--a) inset; }
.th-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.th-card:has(input:focus-visible) { outline: 2px solid var(--a); outline-offset: 2px; }
.th-card img { width: 40px; height: 40px; image-rendering: pixelated; flex: none; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--a) 60%, transparent)); }
.th-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.th-text b { font-size: 15px; display: flex; gap: 8px; align-items: center; }
.th-text small { color: var(--mute); font-size: 13px; }
.th-live { font-style: normal; font-size: 11px; padding: 2px 7px; border-radius: 999px; color: var(--ichor); background: rgb(var(--g-rgb) / .14); }
.th-dots { display: flex; gap: 4px; margin-top: 4px; }
.th-dots i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .12); }
.th-save { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 14px 0 4px; }
.th-preview { min-width: 0; }
.th-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.th-pages { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--char); border: 1px solid var(--line); }
.th-pages button { font: 600 13px "Bricolage Grotesque", sans-serif; color: var(--mute); padding: 7px 12px; border-radius: 9px; border: 0; background: none; cursor: pointer; }
.th-pages button[aria-pressed="true"] { color: var(--text); background: rgb(var(--v-rgb) / .16); }
/* the real page at full size, shrunk to fit: 1280 wide on desktop, 390 on a phone */
.th-stage { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--line-2); background: #000; }
.th-stage.desk { aspect-ratio: 1280 / 800; }
.th-stage.desk iframe { position: absolute; top: 0; left: 0; width: 1280px; height: 800px; border: 0; transform-origin: 0 0; transform: scale(var(--s, .6)); }
.th-stage.phone { width: 300px; height: 650px; margin: 0 auto; border-radius: 30px; border-width: 6px; border-color: #26222e; }
.th-stage.phone iframe { width: 390px; height: 845px; border: 0; transform-origin: 0 0; transform: scale(.7486); }

@media (max-width: 1100px) { .os-tiles { grid-template-columns: repeat(2, 1fr); } .os-charts { grid-template-columns: 1fr; } .th-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .os-list li { flex-direction: column; gap: 2px; } .os-list li span { text-align: left; } }
@media (max-width: 620px) { .th-grid { grid-template-columns: 1fr; } }

/* ---- Unrestricted AI, polished: a slim header, a big potion to start, named answers with Copy, Chat / Picture switch */
.code pre { font-size: 13.5px; line-height: 1.55; }
.ai-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: -8px 0 6px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.ai-id { display: flex; align-items: center; gap: 14px; }
.ai-mark { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none;
  background: radial-gradient(circle at 50% 40%, rgb(var(--v-rgb) / .35), rgb(var(--v-rgb) / .06)); border: 1px solid rgb(var(--v-rgb) / .35); }
.ai-mark img { height: 30px; width: auto; image-rendering: pixelated; filter: drop-shadow(0 0 8px rgb(var(--v-rgb) / .7)); }
.ai-top h1 { margin: 0; font-size: 22px; letter-spacing: -.01em; }
.ai-top p { margin: 1px 0 0; color: var(--mute); font-size: 14px; display: flex; align-items: center; gap: 7px; }
.ai-live { width: 7px; height: 7px; border-radius: 50%; background: var(--ichor); box-shadow: 0 0 8px var(--ichor); }
#ai-new svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.ai-pane .chat { height: calc(100vh - 150px); }
.ai-pane .empty { max-width: 640px; }
.ai-pane .orb { width: 150px; height: 150px; background: radial-gradient(circle, rgb(var(--v-rgb) / .3), rgb(var(--vd-rgb) / .08) 55%, transparent 70%); }
.ai-pane .orb img { width: auto; height: 96px; filter: drop-shadow(0 0 22px rgb(var(--v-rgb) / .7)); }
.ai-pane .empty h2 { margin: 10px 0 6px; font-size: 30px; letter-spacing: -.015em; }
.empty-sub { color: var(--mute); margin: 0 0 24px; }
.ai-pane .starters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 600px; margin: 0 auto; }
.ai-pane .starters button { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 12px; text-align: left; align-items: center;
  padding: 14px 16px; border-radius: 16px; background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .015)); border: 1px solid var(--line-2); }
.ai-pane .starters button:hover { transform: translateY(-1px); }
.starters svg { grid-row: 1 / 3; width: 34px; height: 34px; padding: 7px; border-radius: 10px; fill: none; stroke: var(--violet-2); stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round; background: rgb(var(--v-rgb) / .12); }
.starters b { font-size: 15px; } .starters small { color: var(--mute); font-weight: 500; font-size: 13px; }
.ai-pane .msg.bot .avatar { width: 34px; height: 34px; border: 1px solid rgb(var(--v-rgb) / .3); }
.ai-pane .msg.bot .avatar img { width: auto; height: 20px; }
.msg .who { margin: 4px 0 2px; font-size: 13px; font-weight: 700; color: var(--violet-2); }
.ai-pane .msg.mine .body { background: linear-gradient(135deg, rgb(var(--v-rgb) / .28), rgb(var(--vd-rgb) / .2)); border-color: rgb(var(--v-rgb) / .4); }
.msg.bot .text { padding-top: 0; }
.acts { display: flex; gap: 6px; margin-top: 8px; opacity: .65; transition: opacity .15s; }
.msg:hover .acts, .acts:focus-within { opacity: 1; }
.acts button { display: inline-flex; align-items: center; gap: 6px; font: 600 12.5px "Bricolage Grotesque", sans-serif; color: var(--mute); cursor: pointer;
  padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: none; }
.acts button:hover { color: var(--text); border-color: var(--mute); }
.acts svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.brewing { margin-left: 10px; color: var(--mute); font-size: 14px; }
.code { background: #08070a; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03); }
.code-bar span { color: var(--violet-2); }
.ai-modes { display: flex; align-items: center; gap: 4px; margin: 0 0 8px; }
.ai-modes > button { display: inline-flex; align-items: center; gap: 6px; font: 600 13px "Bricolage Grotesque", sans-serif; color: var(--mute); padding: 6px 12px;
  border-radius: 999px; border: 1px solid transparent; background: none; cursor: pointer; }
.ai-modes > button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.ai-modes > button[aria-pressed="true"] { color: var(--text); background: rgb(var(--v-rgb) / .15); border-color: rgb(var(--v-rgb) / .4); }
.ai-modes .mode-note { margin: 0 0 0 6px; }
.ai-pane .compose-row { background: linear-gradient(180deg, color-mix(in srgb, var(--char-2) 92%, #fff 3%), var(--char)); }
.ai-note { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 760px) {
  .ai-pane .chat { height: calc(100dvh - 230px); }
  .ai-pane .starters { grid-template-columns: 1fr; }
  .ai-pane .orb { width: 110px; height: 110px; } .ai-pane .orb img { height: 70px; }
  .ai-pane .empty h2 { font-size: 24px; }
  .ai-note { justify-content: center; } .ai-note span:first-child { display: none; }
  .ai-top { margin-top: -4px; }
}
/* long code or links in a chat can't push the page wider than the screen */
.app { grid-template-columns: 250px minmax(0, 1fr); }
.main { min-width: 0; }
#ai-new { white-space: nowrap; }
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .ai-top h1 { font-size: 19px; } .ai-top p { font-size: 12.5px; } .ai-mark { width: 40px; height: 40px; }
  .ai-pane .msg .body { max-width: calc(100% - 46px); }
}
.ai-note .ai-saved { color: #57505f; font-size: 11.5px; }
@media (max-width: 760px) { .ai-note .ai-saved { display: inline; } }
