/* Gestor Social (working name) — rev 2 mockup styles. Paper theme, soft elevation, mobile-first.
   Fonts: Inter (SIL OFL) stands in for the system UI font. */
@font-face { font-family: "InterMock"; src: url("fonts/InterVariable.woff2") format("woff2"); font-weight: 100 900; }
:root {
  --paper: #f5f3ef; --surface: #ffffff; --sunken: #efece6; --ink: #1d1b18; --ink-2: #514c46; --ink-3: #857e75;
  --line: #e6e1d9; --line-2: #d6d0c6;
  --ok: #2f7d4f; --ok-bg: #e5f2ea; --warn: #9a6212; --warn-bg: #fbefd9; --danger: #b42318; --danger-bg: #fbe7e5;
  --info: #2b5fab; --info-bg: #e6eefa; --ai: #6b46c1; --ai-bg: #efe9fb; --story: #b83280;
  --sh-1: 0 1px 2px rgba(29,27,24,.06), 0 2px 8px rgba(29,27,24,.05);
  --sh-2: 0 1px 2px rgba(29,27,24,.06), 0 8px 24px rgba(29,27,24,.08);
  --r: 14px; --r-s: 10px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--paper); }
body { font-family: "InterMock", system-ui, sans-serif; color: var(--ink); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
svg { display: block; }
.mut { color: var(--ink-3); } .ink2 { color: var(--ink-2); }
.xs { font-size: 12px; } .sm { font-size: 13px; } .b { font-weight: 600; } .bb { font-weight: 700; }
.row { display: flex; align-items: center; gap: 8px; } .col { display: flex; flex-direction: column; gap: 8px; }
.grow { flex: 1; min-width: 0; } .wrap { flex-wrap: wrap; } .between { justify-content: space-between; }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* buttons, chips, badges */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 999px;
  font: 600 14px/1 "InterMock", sans-serif; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); white-space: nowrap; }
.btn.pri { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.dan { color: var(--danger); border-color: #efc2bd; }
.btn.danfill { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.full { width: 100%; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--line-2); font-size: 13px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--sunken); color: var(--ink-2); font-size: 12px; font-weight: 500; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); } .badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.dan { background: var(--danger-bg); color: var(--danger); } .badge.info { background: var(--info-bg); color: var(--info); }
.badge.ai { background: var(--ai-bg); color: var(--ai); } .badge.off { background: var(--sunken); color: var(--ink-3); }
.badge.story { background: #fbe6f1; color: var(--story); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; flex: none; }
.dot.warn { background: #d69e2e; } .dot.off { background: var(--ink-3); }
.av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.av.shop { background: #2b2925; color: #fff; } .av.shop2 { background: #6d7a63; color: #fff; }
.av.asst { background: var(--sunken); color: var(--ink-2); border: 1px solid var(--line-2); font-size: 12px; }
.av.cust { background: #e9e1d6; color: #6a5a48; width: 28px; height: 28px; font-size: 12px; }
.sep { text-align: center; font-size: 12px; color: var(--ink-3); margin: 6px 0; }
.note { font-size: 12.5px; color: var(--ink-3); }
.hr { height: 1px; background: var(--line); margin: 4px 0; }

/* mobile shell */
.m { width: 390px; min-height: 844px; display: flex; flex-direction: column; background: var(--paper); }
.topbar { display: flex; align-items: center; gap: 10px; padding: 14px 16px 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar .t { font-weight: 700; font-size: 16px; line-height: 1.15; }
.topbar .s { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.pend { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); font-weight: 700; font-size: 12.5px; white-space: nowrap; }
.thread { padding: 14px 14px 6px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.msg { display: flex; gap: 8px; align-items: flex-start; }
.msg.user { justify-content: flex-end; }
.bub { max-width: 300px; padding: 10px 13px; border-radius: 16px; font-size: 14.5px; }
.msg.user .bub { background: var(--ink); color: #fff; border-bottom-right-radius: 6px; }
.msg.agent .bub { background: var(--surface); box-shadow: var(--sh-1); border-bottom-left-radius: 6px; }
.who { font-size: 11.5px; color: var(--ink-3); margin-bottom: 3px; font-weight: 600; }
.time { font-size: 11px; color: var(--ink-3); margin-top: 4px; text-align: right; }
.msg.user .time { color: rgba(255,255,255,.6); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-bottom: 8px; }
.tile { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 1; background: var(--sunken); }
.tile svg { width: 100%; height: 100%; }
.tile .ovl { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(20,18,16,.45); color: #fff; font-weight: 700; font-size: 12px; }
.tile .dur { position: absolute; left: 5px; top: 5px; background: rgba(0,0,0,.6); color: #fff; font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 6px; }
.tile .err { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(180,35,24,.72); color: #fff; font-size: 11px; font-weight: 700; text-align: center; padding: 4px; }
.ring { width: 38px; height: 38px; }

/* cards */
.card { background: var(--surface); border-radius: var(--r); box-shadow: var(--sh-2); overflow: hidden; }
.card-h { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.card-h .ttl { font-weight: 700; font-size: 14.5px; }
.card-b { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.card-f { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 14px 14px; border-top: 1px solid var(--line); }
.card-f.three { grid-template-columns: 1.3fr 1fr 1fr; }
.card-f .btn { width: 100%; }
.kv { display: grid; grid-template-columns: 92px 1fr; gap: 6px 10px; font-size: 13.5px; }
.kv dt { color: var(--ink-3); } .kv dd { color: var(--ink); font-weight: 500; }
.preview { position: relative; border-radius: 10px; overflow: hidden; background: var(--sunken); }
.preview svg { width: 100%; height: auto; }
.dots { display: flex; gap: 5px; justify-content: center; margin-top: 2px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); } .dots i.on { background: var(--ink); }
.strip { display: flex; gap: 6px; } .strip .th { width: 48px; height: 60px; border-radius: 7px; overflow: hidden; flex: none; position: relative; }
.strip .th svg { width: 100%; height: 100%; } .strip .th .n { position: absolute; left: 3px; top: 3px; background: rgba(0,0,0,.55); color: #fff; font-size: 10px; font-weight: 700; padding: 0 5px; border-radius: 5px; }
.caption { font-size: 14px; white-space: pre-line; }
.counter { font-size: 11.5px; color: var(--ink-3); }
.hashes { display: flex; flex-wrap: wrap; gap: 6px; }
.result { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface); border-radius: 12px; box-shadow: var(--sh-1); border-left: 4px solid var(--ok); }
.result .th { width: 44px; height: 44px; border-radius: 8px; overflow: hidden; flex: none; } .result .th svg { width: 100%; height: 100%; }
.link { color: var(--info); font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.prog { background: var(--surface); border-radius: 12px; box-shadow: var(--sh-1); padding: 11px 13px; font-size: 13.5px; }
.prog .st { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.ck { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; flex: none; }
.ck.ok { background: var(--ok-bg); color: var(--ok); } .ck.run { border: 2px solid var(--info); border-right-color: transparent; }
.ck.wait { border: 2px solid var(--line-2); }
.bar { height: 6px; border-radius: 6px; background: var(--sunken); overflow: hidden; } .bar i { display: block; height: 100%; background: var(--ink); border-radius: 6px; }
.quote { background: var(--sunken); border-radius: 10px; padding: 9px 11px; font-size: 13.5px; }
.sugg { border: 1.5px dashed var(--line-2); border-radius: 10px; padding: 9px 11px; font-size: 13.5px; background: #fdfcfa; }
.item { padding: 12px 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.item:first-child { border-top: none; }
.acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* composer + nav (mobile) */
.quick { display: flex; gap: 6px; padding: 4px 14px 8px; flex-wrap: wrap; }
.composer { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; background: var(--surface); border-top: 1px solid var(--line); }
.plus { width: 40px; height: 40px; border-radius: 50%; background: var(--sunken); display: grid; place-items: center; font-size: 22px; font-weight: 400; color: var(--ink); flex: none; }
.send { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; flex: none; }
.field { flex: 1; min-height: 40px; border-radius: 20px; background: var(--paper); border: 1px solid var(--line-2); padding: 9px 14px; font-size: 14.5px; color: var(--ink-3); }
.tray { display: flex; gap: 6px; padding: 8px 12px 0; background: var(--surface); border-top: 1px solid var(--line); overflow: hidden; }
.tray .tile { width: 54px; height: 54px; flex: none; aspect-ratio: auto; }
.nav { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding: 8px 0 18px; }
.nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.nav a.on { color: var(--ink); }
.nav .ic { width: 22px; height: 22px; }
.sheet { background: var(--surface); border-radius: 18px 18px 0 0; box-shadow: 0 -8px 24px rgba(29,27,24,.08); padding: 10px 16px 16px; }
.sheet .grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line-2); margin: 0 auto 10px; }

/* settings */
.page { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.h1 { font-size: 22px; font-weight: 750; letter-spacing: -.01em; }
.h2 { font-size: 15.5px; font-weight: 700; }
.panel { background: var(--surface); border-radius: var(--r); box-shadow: var(--sh-1); }
.panel .ph { padding: 13px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.panel .pb { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--sunken); border-radius: 10px; padding: 3px; gap: 2px; }
.seg span { height: 30px; display: grid; place-items: center; padding: 0 10px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.seg span.on-off { background: #fff; color: var(--ink-2); box-shadow: var(--sh-1); }
.seg span.on-conf { background: #fff; color: var(--warn); box-shadow: var(--sh-1); }
.seg span.on-auto { background: #fff; color: var(--ok); box-shadow: var(--sh-1); }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 13.5px; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tg { width: 40px; height: 24px; border-radius: 999px; background: var(--line-2); position: relative; flex: none; }
.tg::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--sh-1); }
.tg.on { background: var(--ok); } .tg.on::after { left: 19px; }
.inp { height: 40px; border-radius: var(--r-s); border: 1px solid var(--line-2); background: #fff; padding: 0 12px; display: flex; align-items: center; font-size: 14px; }
.ta { border-radius: var(--r-s); border: 1px solid var(--line-2); background: #fff; padding: 10px 12px; font-size: 14px; }
.lbl { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: #fff; }
.stepper b { width: 34px; height: 36px; display: grid; place-items: center; color: var(--ink-2); font-weight: 600; }
.stepper span { width: 76px; text-align: center; font-weight: 700; border-left: 1px solid var(--line); border-right: 1px solid var(--line); height: 36px; display: grid; place-items: center; }
.hours { display: grid; grid-template-columns: 36px repeat(24, 1fr); gap: 2px; align-items: center; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.hours i { height: 18px; border-radius: 3px; background: var(--sunken); } .hours i.on { background: #6fae86; }
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 13.5px; }
.banner.info { background: var(--info-bg); color: #1e3f73; } .banner.warn { background: var(--warn-bg); color: #6b4309; } .banner.dan { background: var(--danger-bg); color: #7a1a12; }
.banner.ok { background: var(--ok-bg); color: #1d5234; }
.check { display: flex; gap: 9px; align-items: center; font-size: 14px; }
.cb { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line-2); display: grid; place-items: center; flex: none; background: #fff; }
.cb.on { background: var(--ink); border-color: var(--ink); }
.cb.on::after { content: ""; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px,-1px); }
.meter { height: 8px; background: var(--sunken); border-radius: 8px; overflow: hidden; } .meter i { display: block; height: 100%; background: var(--ink-2); }

/* library */
.lib { display: grid; gap: 8px; }
.asset { background: var(--surface); border-radius: 12px; overflow: hidden; box-shadow: var(--sh-1); position: relative; }
.asset .im { aspect-ratio: 1; } .asset .im svg { width: 100%; height: 100%; }
.asset .bd { position: absolute; left: 6px; top: 6px; display: flex; gap: 4px; }
.asset .cap { padding: 7px 9px; font-size: 12px; color: var(--ink-2); display: flex; justify-content: space-between; gap: 6px; }
.asset.sel { outline: 3px solid var(--ink); outline-offset: -3px; }

/* desktop shell */
.d { width: 1440px; min-height: 900px; display: grid; grid-template-columns: 236px minmax(0,1fr) 340px; background: var(--paper); }
.d.two { grid-template-columns: 236px minmax(0,1fr); }
.rail { background: var(--surface); border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; }
.word { font-weight: 800; font-size: 17px; letter-spacing: -.01em; padding: 2px 10px 14px; }
.word small { display: block; font-weight: 500; font-size: 11.5px; color: var(--ink-3); letter-spacing: 0; }
.shopsw { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; }
.ri { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; font-size: 14px; font-weight: 550; color: var(--ink-2); }
.ri.on { background: var(--sunken); color: var(--ink); font-weight: 650; }
.ri .n { margin-left: auto; background: var(--warn-bg); color: var(--warn); font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.ri svg { width: 18px; height: 18px; flex: none; }
.me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-top: 1px solid var(--line); }
.main { display: flex; flex-direction: column; min-width: 0; }
.mainh { display: flex; align-items: center; gap: 12px; padding: 16px 28px; border-bottom: 1px solid var(--line); background: var(--surface); }
.chatcol { width: 100%; max-width: 760px; margin: 0 auto; padding: 20px 28px 12px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.chatcol .bub { max-width: 520px; }
.dcomp { max-width: 760px; width: 100%; margin: 0 auto; padding: 0 28px 24px; }
.dcomp .box { background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: var(--sh-1); }
.side { background: var(--surface); border-left: 1px solid var(--line); padding: 18px 16px; display: flex; flex-direction: column; gap: 16px; }
.side .sh { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 700; }
.mini { display: flex; gap: 10px; align-items: center; padding: 9px; border: 1px solid var(--line); border-radius: 12px; }
.mini .th { width: 44px; height: 44px; border-radius: 8px; overflow: hidden; flex: none; } .mini .th svg { width: 100%; height: 100%; }
.stat { display: flex; justify-content: space-between; font-size: 13.5px; padding: 4px 0; }
.content { padding: 24px 28px 36px; display: flex; flex-direction: column; gap: 16px; max-width: 1180px; }
.drop { border: 2px dashed #b9b2a6; border-radius: 14px; background: rgba(255,255,255,.6); padding: 14px; display: flex; align-items: center; gap: 12px; color: var(--ink-2); font-size: 13.5px; }

/* public pages */
.pub { background: var(--paper); min-height: 100%; }
.pubh { display: flex; align-items: center; gap: 18px; padding: 18px 40px; background: var(--surface); border-bottom: 1px solid var(--line); }
.pubh a { font-size: 14px; color: var(--ink-2); font-weight: 550; } .pubh a.on { color: var(--ink); font-weight: 700; }
.doc { max-width: 860px; margin: 0 auto; padding: 32px 40px 48px; display: flex; flex-direction: column; gap: 18px; }
.doc h1 { font-size: 30px; letter-spacing: -.015em; } .doc h2 { font-size: 18px; margin-top: 4px; }
.doc p, .doc li { font-size: 15px; color: var(--ink-2); } .doc ul { padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.foot { padding: 20px 40px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); }

.bi { width: 20px; height: 20px; border-radius: 50%; border: 1.6px solid currentColor; display: inline-grid; place-items: center; font-size: 11px; font-weight: 800; flex: none; line-height: 1; margin-top: 1px; }

/* Responsive application: keep the mockup primitives, and size them to the viewport. */
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled, input:disabled { cursor: not-allowed; opacity: .58; }
:focus-visible { outline: 2px solid var(--info); outline-offset: 3px; }
a { color: inherit; text-decoration: none; }
a.link:hover, .pubh a:hover { text-decoration: underline; }
svg { flex: none; }
.app-shell.m.d { width: 100%; min-height: 100dvh; display: flex; flex-direction: column; }
.app-shell > .rail, .app-shell > .side, .desktop-action, .desktop-subtitle, .desktop-storage { display: none; }
.app-shell .main { flex: 1; min-height: 0; }
.app-shell .mainh { padding: 14px 16px 12px; gap: 10px; }
.app-shell .topbar .s { margin-top: 3px; }
.topbar .pend { border: 0; }
.topbar.not-chat .pend { display: none; }
.mobile-shop .shopsw { border: 0; margin: 0; padding: 0; }
.mobile-shop + .grow { min-width: 45px; }
.chat-shell .mobile-shop + .grow .t { display: none; }
.mobile-shop .xs { display: none; }
.shop-select { max-width: 100%; width: 100%; padding: 0; font-size: 15px; font-weight: 650; background: transparent; border: 0; }
.mobile-settings { border-bottom: 1px solid var(--line); background: var(--surface); padding: 6px 12px; }
.mobile-settings .row { overflow-x: auto; scrollbar-width: thin; }
.mobile-settings .chip { font-size: 11.5px; height: 28px; }
.rail-links { display: flex; flex-direction: column; gap: 4px; }
.app-shell .nav { position: sticky; bottom: 0; z-index: 4; flex: none; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
.app-shell .view { min-width: 0; }
.app-shell .content { padding: 14px 16px 20px; }
.app-shell.chat-shell { height: 100dvh; overflow: hidden; }
.chat-view { flex: 1; overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
.chat-view .thread { min-height: 0; min-width: 0; overflow-y: auto; padding: 14px 14px 6px; gap: 12px; }
.thread > *, .message-wrap, .bub, .card, .result { min-width: 0; }
.thread .bub { max-width: min(300px, calc(100vw - 72px)); overflow-wrap: anywhere; }
.thread .bub:has(.tiles) { width: 262px; }
.thread .message-body, .chat-error { white-space: pre-wrap; overflow-wrap: anywhere; }
.time-left { text-align: left; }
.thread .card { flex: none; }
.thread .result { flex-wrap: wrap; }
.result.failed { border-left-color: var(--danger); }
.card-b, .mini-copy { overflow-wrap: anywhere; }
.card-f.acts { grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); }
.card-edit { border-top: 1px solid var(--line); }
.card-edit input, .card-edit textarea { width: 100%; }
.card-edit input[type=checkbox] { width: 20px; }
.strip { overflow-x: auto; padding-bottom: 2px; }
.strip .th { background: var(--sunken); border: 0; }
.post-preview { aspect-ratio: 5 / 4; max-height: 250px; }
.story-preview { aspect-ratio: 9 / 16; max-height: 320px; border: 7px solid var(--ink); margin-inline: auto; }
.chat-progress, progress.meter { display: block; width: 100%; height: 6px; border: 0; border-radius: 6px; appearance: none; background: var(--sunken); }
progress::-webkit-progress-bar { background: var(--sunken); border-radius: 6px; }
progress::-webkit-progress-value { background: var(--ink); border-radius: 6px; }
progress::-moz-progress-bar { background: var(--ink); border-radius: 6px; }
.chat-progress { margin-top: 8px; }
.chat-composer { padding: 0; position: relative; flex: none; }
.chat-composer .box { border: 0; border-radius: 0; box-shadow: none; }
.chat-composer .quick { column-gap: 6px; row-gap: 4px; }
.chat-composer .chip { height: 27px; padding-inline: 9px; font-size: 11.5px; }
.chat-composer .composer { align-items: flex-end; }
.chat-composer .field { font: inherit; font-size: 14px; color: var(--ink); resize: none; min-width: 0; }
.composer button { border: 0; }
.composer .send { color: white; }
.chat-drop { display: none; }
.chat-drop.drag { border-color: var(--info); background: var(--info-bg); }
.chat-error { margin: 0 12px 6px; }
.attach-menu { position: absolute; z-index: 2; bottom: 100%; left: 0; max-width: 100%; width: 270px; }
.attach-menu .btn { margin-bottom: 6px; }
.tray { overflow-x: auto; padding-right: 18px; }
.tray .tile { width: 64px; height: 64px; }
.tray .tile > svg, .tile .ovl > svg { width: 24px; height: 24px; margin: auto; }
.file-tile { position: relative; flex: none; padding: 6px 2px 6px 0; }
.file-tile .remove-file { position: absolute; top: 0; right: 0; width: 19px; height: 19px; font-size: 13px; padding: 0; }
.tile .ovl, .tile .err { align-content: center; gap: 2px; }
.tile .ovl > .ring { width: 38px; height: 38px; }
.tile .upload-retry { font-size: 9px; height: 19px; padding: 0 4px; }
.mini { width: 100%; text-align: left; background: var(--surface); }
.mini .th { background: var(--sunken); }
.mini-icon { display: grid; place-items: center; color: var(--ink-2); }
.mini-copy { overflow-wrap: anywhere; }
.me .btn { padding-inline: 3px; }
.global-error { margin: 6px 12px; }
.mode-option { border: 0; background: transparent; border-radius: 8px; }
.automation-panel { background: transparent; box-shadow: none; }
.automation-table { display: block; }
.automation-table thead, .automation-table .auto-meta { display: none; }
.automation-table tbody { display: grid; gap: 9px; }
.automation-table tr { display: grid; background: var(--surface); border-radius: var(--r); box-shadow: var(--sh-1); }
.automation-table td { display: block; border: 0; }
.automation-table .auto-label { padding: 10px 12px 5px; }
.automation-table .auto-mode { padding: 4px 12px 10px; }
.automation-table .seg { width: 100%; }
.automation-note { display: none; }
.confirm-dialog { position: fixed; inset: 0; margin: auto; width: min(430px, calc(100% - 32px)); border: 0; }
.confirm-dialog .pb { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.confirm-dialog::backdrop { background: #1d1b1866; }
.guard-form, .guard-layout { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.guard-layout > section { min-width: 0; }
.guard-form fieldset { border: 0; }
.guard-form .check { font-size: 13px; }
.guard-form .cb { appearance: none; cursor: pointer; }
.guard-form .cb:checked { background: var(--ink); border-color: var(--ink); }
.guard-form .cb:checked::after { content: ''; width: 9px; height: 5px; border-left: 2px solid white; border-bottom: 2px solid white; transform: rotate(-45deg) translate(1px,-1px); }
.guard-form .cb[type=radio] { border-radius: 50%; }
.guard-form .tg { border: 0; appearance: none; cursor: pointer; }
.guard-form .tg:checked { background: var(--ok); }
.guard-form .tg:checked::after { left: 19px; }
.guard-form textarea, .guard-form .inp { width: 100%; min-width: 0; }
.hour-tick { text-align: center; }
.time-edit summary { cursor: pointer; }
.time-row { margin-top: 6px; }
.time-row .check { min-width: 60px; }
.time-row .inp, .connection-layout .inp { font-size: 13px; padding-inline: 6px; }
.stepper .step { width: 31px; height: 34px; background: transparent; border: 0; }
.stepper .step-inner { display: flex; align-items: center; border-inline: 1px solid var(--line); padding-inline: 3px; }
.stepper .step-value { width: 52px; max-width: 100%; padding: 0; text-align: center; appearance: textfield; border: 0; font-weight: 650; }
.step-value::-webkit-inner-spin-button, .step-value::-webkit-outer-spin-button { appearance: none; margin: 0; }
.stepper .step-suffix { display: inline; border: 0; width: auto; height: auto; font-size: 12px; padding-right: 2px; }
.block { display: block; }
.tag-remove { border: 0; }
.connection-layout { gap: 16px; }
.connection-stat { min-height: 29px; gap: 10px; border-bottom: 1px solid var(--line); }
.connection-stat .dot { width: 6px; height: 6px; margin-right: 5px; }
.scope-line { gap: 10px; align-items: flex-start; }
.scope-line .ck { width: 18px; height: 18px; }
.scope-line code { overflow-wrap: anywhere; }
.connection-footer { border-top: 1px solid var(--line); }
.connection-buttons { justify-content: flex-start; }
.disconnect-confirm ul { padding-left: 20px; }

/* Team and audit summaries stay readable at narrow widths. */
.staff-view { gap: 16px; }
.staff-list { list-style: none; }
.staff-row { padding: 12px 16px; gap: 12px; }
.staff-row + .staff-row { border-top: 1px solid var(--line); }
.staff-copy { overflow-wrap: anywhere; }

/* Monthly usage */
.app-shell > .nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.usage-view { min-width: 0; gap: 16px; }
.usage-controls { align-items: end; gap: 12px; }
.usage-controls .lbl { display: grid; gap: 4px; margin: 0; }
.usage-disclosure { display: grid; gap: 4px; }
.usage-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr)); gap: 12px 16px; margin: 0; }
.usage-totals dd { margin: 4px 0 0; overflow-wrap: anywhere; }
.usage-scroll { max-width: 100%; overflow-x: auto; }
.usage-table { min-width: max-content; }
.usage-table td { text-align: right; white-space: nowrap; }
.usage-table thead th:not(:first-child) { text-align: right; }
.usage-group th { background: var(--sunken); text-transform: none; font-size: 13.5px; }
.usage-table .usage-action { text-transform: none; letter-spacing: normal; font-size: 13.5px; }
.usage-scroll:focus-visible { outline-offset: -2px; }

.library-tools { display: flex; flex-direction: column; align-items: stretch; }
.library-filters { order: 2; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
.library-search { min-width: 0; position: relative; display: flex; align-items: center; }
.library-search .ic { position: absolute; left: 10px; color: var(--ink-3); }
.library-search input { padding-left: 32px; }
.library-storage .meter { margin-top: 4px; }
.lib { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.asset { padding: 0; border: 0; text-align: left; }
.asset .bd { flex-wrap: wrap; }
.asset .im { background: var(--sunken); }
.asset .cap { overflow-wrap: anywhere; }
.media-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.video-label { position: absolute; right: 6px; bottom: 34px; }
.app-shell.has-detail > .side { display: block; position: fixed; z-index: 5; inset: auto 0 0; max-height: 85dvh; overflow-y: auto; border-radius: 18px 18px 0 0; box-shadow: 0 0 0 100vmax #1d1b1855; }
.asset-detail { gap: 12px; }
.asset-preview { width: min(170px, 80%); aspect-ratio: 4 / 5; margin: 0 auto; }
.asset-preview video { object-fit: contain; }
.variant-child { margin-left: 18px; width: calc(100% - 18px); }
.login { max-width: 520px; }
.login .word { padding: 0; }
.pubh { padding: 12px 16px; gap: 10px; flex-wrap: wrap; }
.pubh .word { padding: 0; }
.pubh a { font-size: 12.5px; }
.pubh .btn { font-size: 12px; }
.doc { padding: 24px 18px 32px; gap: 14px; }
.doc h1 { font-size: 25px; }
.doc section { display: flex; flex-direction: column; gap: 6px; }
.doc p, .doc li { overflow-wrap: anywhere; }
.doc input { min-width: 0; }
.foot { padding: 16px 18px; }
@media (min-width: 800px) {
  .app-shell.m.d { display: grid; grid-template-columns: 196px minmax(0, 1fr); }
  .app-shell.chat-shell { grid-template-columns: 196px minmax(0, 1fr); }
  .app-shell > .rail { display: flex; }
  .app-shell > .nav, .mobile-settings, .mobile-action, .mobile-shop, .topbar > .av, .library-tip, .app-shell .content > .library-storage { display: none; }
  .app-shell .mainh { padding: 14px 22px; }
  .topbar.not-chat .pend { display: inline-flex; }
  .topbar .t { font-size: 18px; }
  .topbar .grow { position: relative; }
  .topbar.not-chat .grow .s { display: inline-flex; margin-left: 9px; }
  .topbar.not-chat .grow .t { display: inline-block; }
  .topbar .desktop-subtitle, .desktop-storage { display: block; }
  .topbar .desktop-storage { min-width: 126px; width: 17vw; max-width: 220px; }
  .app-shell .content { padding: 24px 28px 36px; }
  .app-shell .thread { padding: 20px 28px 12px; gap: 14px; }
  .app-shell .thread .bub { max-width: 520px; }
  .thread .bub:has(.tiles) { width: 370px; }
  .chat-composer { padding: 0 28px 24px; }
  .chat-composer .box { border: 1px solid var(--line-2); border-radius: 16px; box-shadow: var(--sh-1); }
  .chat-composer .composer { border: 0; border-radius: 16px; }
  .chat-composer .tray { border-radius: 16px 16px 0 0; border: 0; }
  .chat-composer .quick { padding: 4px 0 10px; }
  .chat-composer .chip { height: 32px; padding-inline: 12px; font-size: 13px; }
  .chat-drop { display: flex; margin-bottom: 10px; }
  .attach-menu { left: 28px; }
  .desktop-action { display: inline-flex; }
  .banner.desktop-action { display: flex; }
  .automation-panel { background: var(--surface); box-shadow: var(--sh-1); }
  .automation-table { display: table; }
  .automation-table thead { display: table-header-group; }
  .automation-table tbody { display: table-row-group; }
  .automation-table tr { display: table-row; box-shadow: none; }
  .automation-table td, .automation-table .auto-meta { display: table-cell; }
  .automation-table td { border-bottom: 1px solid var(--line); }
  .automation-table .auto-label { padding: 11px 14px; min-width: 120px; }
  .automation-table .auto-mode { padding: 8px; }
  .automation-table th:first-child { width: 36%; }
  .automation-table .seg { width: auto; }
  .auto-mobile-meta { display: none; }
  .automation-note { display: flex; }
  .library-tools { flex-direction: row; }
  .library-filters { order: 0; flex-wrap: wrap; }
  .library-search { min-width: 180px; }
  .lib { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .connection-layout { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pubh { padding: 18px 40px; gap: 18px; }
  .pubh a { font-size: 14px; }
  .doc { padding: 32px 40px 48px; gap: 18px; }
  .doc h1 { font-size: 30px; }
  .foot { padding: 20px 40px; }
}
@media (min-width: 1060px) {
  .app-shell.m.d { grid-template-columns: 236px minmax(0, 1fr); }
  .app-shell.m.d.chat-shell, .app-shell.m.d.has-detail { grid-template-columns: 236px minmax(0, 1fr) clamp(255px, 23.61vw, 340px); }
  .app-shell.chat-shell > .side, .app-shell.has-detail > .side { display: flex; position: static; max-height: none; overflow-y: auto; border-radius: 0; box-shadow: none; }
  .app-shell .mainh { padding: 16px 28px; }
  .guard-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
}

.pubnav { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
@media (max-width: 799px) { .pubnav { order: 2; width: 100%; } .pubh .word { margin-right: auto; } }

.chat-desktop-title { display: none; }
.guard-column { display: contents; }
.guard-order-0 { order: 0; } .guard-order-1 { order: 1; } .guard-order-2 { order: 2; } .guard-order-3 { order: 3; }
.guard-order-4 { order: 4; } .guard-order-5 { order: 5; } .guard-order-6 { order: 6; } .guard-order-7 { order: 7; }
.disconnect-confirm { outline: 1px solid #efc2bd; }
.pause-link-desktop { display: none; }
@media (max-width: 799px) {
  .library-filters { flex-wrap: wrap; }
  .lib .asset .bd { gap: 3px; }
  .pubnav { gap: 5px; }
  .pubnav a { display: inline-flex; align-items: center; padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
  .pubnav a.on { color: white; background: var(--ink); border-color: var(--ink); }
}
@media (min-width: 800px) {
  .chat-desktop-title { display: inline; }
  .chat-mobile-title { display: none; }
}
@media (min-width: 1060px) {
  .guard-column { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
  .pause-link-desktop { display: inline; }
  .pause-link-narrow { display: none; }
}

.connection-footer { border-top: 1px solid var(--line); }
.connection-layout .banner { margin-top: 4px; }
.disconnect-confirm .ph { color: var(--danger); }
.disconnect-confirm ul { display: flex; flex-direction: column; gap: 6px; }
@media (min-width: 800px) { .automation-table .auto-mode { padding-block: 10px; } }
