:root {
  color-scheme: dark;
  --bg: #050a11;
  --panel: #09131f;
  --panel-2: #0c1927;
  --panel-3: #102235;
  --line: #1b3950;
  --line-bright: #266a87;
  --text: #e9f5fb;
  --muted: #88a5b5;
  --cyan: #2cd4ff;
  --cyan-soft: #0a789c;
  --green: #31e6aa;
  --amber: #ffc85a;
  --red: #ff6178;
  --violet: #9c85ff;
  --shadow: 0 22px 65px rgba(0, 0, 0, .38);
  --radius: 18px;
  --glass: rgba(8, 22, 34, .76);
  --glass-strong: rgba(7, 18, 29, .9);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--cyan); }
button { color: inherit; }
.hidden { display: none !important; }
.mobile-only { display: none !important; }

.stars, .stars::before, .stars::after {
  position: fixed;
  inset: 0;
  pointer-events: none;
}
.stars {
  z-index: -2;
  background:
    radial-gradient(circle at 74% 18%, rgba(21, 144, 193, .13), transparent 28%),
    radial-gradient(circle at 20% 84%, rgba(116, 77, 190, .11), transparent 32%),
    linear-gradient(155deg, #060d16 0%, #03070c 65%, #07101a 100%);
}
.stars::before {
  content: "";
  opacity: .35;
  background-image:
    radial-gradient(circle, #bcecff 0 1px, transparent 1.5px),
    radial-gradient(circle, #fff 0 .7px, transparent 1.2px);
  background-position: 17px 23px, 71px 88px;
  background-size: 123px 117px, 177px 163px;
}
.stars::after {
  content: "";
  background: repeating-linear-gradient(90deg, transparent 0 79px, rgba(47, 126, 157, .025) 80px), repeating-linear-gradient(0deg, transparent 0 79px, rgba(47, 126, 157, .025) 80px);
}

.brand-lockup, .sidebar-brand { display: flex; align-items: center; gap: 12px; letter-spacing: .12em; }
.brand-lockup strong, .sidebar-brand strong { display: block; font-size: 16px; }
.brand-lockup small, .sidebar-brand small { display: block; margin-top: 1px; color: var(--cyan); font-size: 9px; letter-spacing: .2em; }
.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--cyan-soft);
  border-radius: 50%;
  color: var(--cyan);
  box-shadow: inset 0 0 17px rgba(44, 212, 255, .16), 0 0 22px rgba(44, 212, 255, .13);
  font-size: 25px;
}
.eyebrow, .kicker { color: var(--cyan); font-size: 11px; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr);
  align-items: center;
  gap: clamp(50px, 8vw, 140px);
  max-width: 1240px;
  margin: 0 auto;
  padding: 55px 40px;
}
.auth-story { position: relative; }
.auth-story::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 520px;
  height: 520px;
  left: -170px;
  top: 0;
  border: 1px solid rgba(44, 212, 255, .08);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(44, 212, 255, .018), 0 0 0 140px rgba(44, 212, 255, .012);
}
.auth-story .brand-lockup { margin-bottom: 80px; }
.auth-story h1 { margin: 17px 0 22px; max-width: 710px; font-size: clamp(38px, 5vw, 67px); line-height: 1.04; letter-spacing: -.045em; }
.auth-story h1 span { color: var(--cyan); text-shadow: 0 0 35px rgba(44, 212, 255, .22); }
.auth-story > p { max-width: 680px; color: #a8bdc8; font-size: 17px; }
.protocol-line { display: flex; align-items: center; gap: 12px; margin-top: 40px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .11em; }
.protocol-line i { width: 34px; height: 1px; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.protocol-line b { color: #34566a; }

.auth-card {
  padding: 27px;
  border: 1px solid var(--line);
  border-radius: 23px;
  background: linear-gradient(145deg, rgba(12, 27, 41, .94), rgba(6, 15, 24, .96));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.025);
  backdrop-filter: blur(18px);
}
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 30px; padding: 4px; border-radius: 12px; background: #050c14; }
.auth-tab { padding: 10px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 700; }
.auth-tab.active { color: var(--text); background: var(--panel-3); box-shadow: inset 0 0 0 1px var(--line); }
.auth-form { display: grid; gap: 18px; }
.auth-form h2 { margin: 4px 0 0; font-size: 25px; }
label { display: grid; gap: 7px; color: #b7cbd6; font-size: 13px; font-weight: 650; }
label small { color: var(--muted); font-weight: 400; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  background: #06101a;
  color: var(--text);
  padding: 12px 13px;
  transition: border .18s, box-shadow .18s;
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--cyan-soft); box-shadow: 0 0 0 3px rgba(44, 212, 255, .08); }
.check-line { grid-template-columns: 18px 1fr; align-items: start; gap: 10px; font-weight: 400; }
.check-line input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--cyan); }
.grant-note { display: flex; gap: 13px; padding: 12px; border: 1px solid rgba(49, 230, 170, .18); border-radius: 11px; background: rgba(49, 230, 170, .055); }
.grant-note strong { white-space: nowrap; color: var(--green); }
.grant-note span { color: var(--muted); font-size: 12px; }
.form-error { min-height: 20px; margin: 15px 0 0; color: var(--red); font-size: 13px; }
.auth-support { margin: 8px 0 0; color: var(--muted); font-size: 11px; text-align: center; }

button, .button-link { border: 0; cursor: pointer; text-decoration: none; }
.primary, .secondary, .ghost, .danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 750;
  transition: transform .16s, filter .16s, border-color .16s;
}
.primary { background: linear-gradient(135deg, #18acd2, #2479f2); color: white; box-shadow: 0 8px 24px rgba(23, 146, 210, .2); }
.primary:hover, .secondary:hover, .ghost:hover, .danger:hover { transform: translateY(-1px); filter: brightness(1.08); }
.primary:disabled, .secondary:disabled, button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.secondary { border: 1px solid var(--line-bright); background: #0b1c2b; color: #bdefff; }
.ghost { border: 1px solid var(--line); background: transparent; color: var(--muted); }
.danger { border: 1px solid rgba(255, 97, 120, .4); background: rgba(255, 97, 120, .1); color: #ff9aaa; }
.wide { width: 100%; }
.icon-btn { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: #091723; font-size: 19px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 272px minmax(0, 1fr); }
.sidebar {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  width: 272px;
  display: flex;
  flex-direction: column;
  padding: 19px 14px;
  border-right: 1px solid #142b3c;
  background: rgba(4, 11, 18, .86);
  backdrop-filter: blur(22px) saturate(125%);
  -webkit-backdrop-filter: blur(22px) saturate(125%);
  box-shadow: 12px 0 40px rgba(0,0,0,.22);
}
.sidebar-brand { padding: 0 9px 18px; border-bottom: 1px solid #102333; }
.pilot-card { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; margin: 17px 2px 12px; padding: 10px; border: 1px solid #173246; border-radius: 12px; background: #091724; }
.pilot-avatar { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 10px; background: linear-gradient(145deg, #135c74, #1ea8ca); color: white; font-weight: 850; }
.pilot-card strong, .pilot-card small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pilot-card strong { font-size: 13px; }
.pilot-card small { color: var(--muted); font-size: 10px; }
.online-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.main-nav { display: grid; gap: 4px; }
.nav-item { display: grid; grid-template-columns: 25px 1fr auto; align-items: center; width: 100%; padding: 10px 11px; border-radius: 9px; background: transparent; color: #829cac; text-align: left; }
.nav-item:hover { background: rgba(23, 54, 74, .45); color: var(--text); }
.nav-item.active { background: linear-gradient(90deg, rgba(24, 128, 166, .21), rgba(24, 128, 166, .03)); color: var(--cyan); box-shadow: inset 2px 0 var(--cyan); }
.nav-item span { font-size: 17px; }
.nav-item b { font-size: 13px; }
.nav-item em { min-width: 22px; padding: 1px 6px; border-radius: 9px; background: #112b3d; font-size: 10px; font-style: normal; text-align: center; }
.sidebar-section-head { display: flex; justify-content: space-between; align-items: center; margin: 21px 10px 8px; color: #547486; font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.sidebar-section-head button { background: transparent; color: var(--cyan); font-size: 18px; }
.side-rooms { display: grid; gap: 3px; overflow-y: auto; }
.side-rooms { flex: 1; min-height: 0; align-content: start; }
.side-room { display: grid; grid-template-columns: 24px 1fr; gap: 8px; align-items: center; width: 100%; padding: 9px 10px; border-radius: 9px; background: transparent; color: #7793a3; text-align: left; }
.side-room:hover, .side-room.active { background: #0c1e2c; color: #d8f2ff; }
.side-room span { color: var(--cyan); }
.side-room b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid #102333; }
.privacy-mini { display: grid; grid-template-columns: 28px 1fr; gap: 8px; margin-bottom: 11px; color: var(--green); }
.privacy-mini strong, .privacy-mini small { display: block; }
.privacy-mini strong { font-size: 10px; letter-spacing: .05em; }
.privacy-mini small { color: #557384; font-size: 9px; }

.workspace { grid-column: 2; min-width: 0; }
.topbar { position: sticky; z-index: 10; top: 0; height: 68px; display: flex; justify-content: space-between; align-items: center; padding: 0 28px; border-bottom: 1px solid #142d3e; background: rgba(5, 12, 20, .9); backdrop-filter: blur(17px); }
.breadcrumb { display: flex; align-items: center; gap: 9px; min-width: 0; }
.breadcrumb span { color: #466c81; font-size: 10px; font-weight: 800; letter-spacing: .15em; }
.breadcrumb b { color: #27485b; }
.breadcrumb strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.secure-pill, .balance-pill { display: flex; align-items: center; gap: 7px; min-height: 34px; padding: 7px 11px; border: 1px solid #173648; border-radius: 18px; background: #07131e; color: #87a6b6; font-size: 10px; }
.secure-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.balance-pill span, .balance-pill b { color: var(--cyan); }
.balance-pill small { color: var(--muted); }
.content { max-width: 1500px; margin: 0 auto; padding: 32px clamp(22px, 3vw, 46px) 65px; }
.page { display: none; animation: page-in .24s ease; }
.page.active { display: block; }
@keyframes page-in { from { opacity: 0; transform: translateY(5px); } }
.narrow-page { max-width: 1120px; margin: 0 auto; }
.page-heading, .room-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 27px; }
.page-heading h2, .room-heading h2 { margin: 6px 0 4px; font-size: clamp(25px, 3vw, 34px); letter-spacing: -.025em; }
.page-heading p, .room-heading p { max-width: 720px; margin: 0; color: var(--muted); }

.room-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(285px, 1fr)); gap: 16px; }
.room-card { position: relative; min-height: 215px; display: flex; flex-direction: column; overflow: hidden; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, #0b1a28, #07121c); box-shadow: 0 15px 34px rgba(0,0,0,.16); cursor: pointer; }
.room-card::after { content: ""; position: absolute; width: 160px; height: 160px; right: -75px; top: -80px; border: 1px solid rgba(44, 212, 255, .13); border-radius: 50%; box-shadow: 0 0 0 25px rgba(44, 212, 255, .018); }
.room-card:hover { border-color: #285a72; transform: translateY(-2px); }
.room-card.council-card { background: linear-gradient(145deg, #14152a, #0a1220); border-color: #352e61; }
.room-card-head { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.room-card-head span:first-child { color: var(--cyan); }
.council-card .room-card-head span:first-child { color: var(--violet); }
.room-card h3 { margin: 30px 0 7px; font-size: 21px; }
.room-card p { margin: 0; color: var(--muted); font-size: 12px; }
.room-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(45, 78, 96, .45); color: #668698; font-size: 11px; }
.room-card-foot b { color: #b9d9e7; }
.new-room-card { place-items: center; justify-content: center; border-style: dashed; background: rgba(9, 24, 36, .35); text-align: center; }
.new-room-card strong { display: grid; width: 45px; height: 45px; margin: 0 auto 10px; place-items: center; border: 1px solid var(--line-bright); border-radius: 50%; color: var(--cyan); font-size: 25px; }
.mission-card { display: grid; grid-template-columns: 120px 1fr auto; gap: 25px; align-items: center; margin-top: 25px; padding: 25px; border: 1px solid #18374a; border-radius: var(--radius); background: linear-gradient(100deg, rgba(12, 35, 50, .92), rgba(7, 17, 27, .8)); }
.mission-card h3 { margin: 5px 0; }
.mission-card p { margin: 0; color: var(--muted); }
.mission-orbit { display: grid; width: 105px; height: 105px; place-items: center; border: 1px solid #1c506a; border-radius: 50%; box-shadow: inset 0 0 30px rgba(44,212,255,.08), 0 0 0 13px rgba(44,212,255,.025); }
.mission-orbit span { color: var(--cyan); font-size: 47px; }
.mission-steps { display: flex; align-items: center; gap: 11px; }
.mission-steps span { color: var(--cyan); font-size: 9px; letter-spacing: .1em; }
.mission-steps b { display: block; margin-top: 3px; color: #a2bac6; font-size: 11px; letter-spacing: 0; white-space: nowrap; }
.mission-steps i { width: 22px; height: 1px; background: #255066; }

.room-kind { display: inline-block; padding: 4px 8px; border: 1px solid #22536c; border-radius: 5px; color: var(--cyan); font-size: 9px; font-weight: 850; letter-spacing: .13em; }
.room-kind.council { border-color: #4b3d85; color: #b4a4ff; }
.room-meta { display: flex; gap: 14px; color: var(--muted); font-size: 11px; }
.context-banner { display: flex; gap: 12px; align-items: center; margin-bottom: 15px; padding: 11px 15px; border: 1px solid rgba(49, 230, 170, .16); border-radius: 11px; background: rgba(49, 230, 170, .04); }
.context-banner > span { color: var(--green); font-size: 20px; }
.context-banner strong, .context-banner small { display: block; }
.context-banner strong { color: #aaf1d8; font-size: 11px; letter-spacing: .05em; }
.context-banner small { color: #678c80; font-size: 10px; }
.messages { min-height: 360px; max-height: calc(100vh - 420px); overflow-y: auto; padding: 16px; border: 1px solid #173245; border-radius: 14px 14px 0 0; background: rgba(4, 12, 20, .78); }
.message { max-width: min(82%, 820px); margin: 0 0 14px; padding: 13px 15px; border: 1px solid #18384d; border-radius: 4px 14px 14px; background: rgba(11, 28, 42, .88); animation: message-in .24s ease both; }
.message.user { margin-left: auto; border-color: #22607b; border-radius: 14px 4px 14px 14px; background: #0b2a3a; }
.message.system { max-width: 90%; margin-right: auto; margin-left: auto; border-color: #4b3d80; background: #15152a; }
.message-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; color: var(--cyan); font-size: 10px; }
.message.system .message-head { color: #b7a9ff; }
.message-head time { color: #577384; }
.message-body { color: #d4e7ef; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-foot { margin-top: 7px; color: #507181; font-size: 9px; }
.typing-indicator { display: flex; gap: 6px; align-items: center; min-height: 29px; }
.typing-indicator i { width: 7px; height: 7px; border-radius: 50%; background: var(--violet); animation: typing-dot 1s infinite ease-in-out; }
.typing-indicator i:nth-child(2) { animation-delay: .14s; }
.typing-indicator i:nth-child(3) { animation-delay: .28s; }
.reaction-row { display: flex; gap: 5px; margin-top: 9px; }
.reaction { min-width: 36px; min-height: 32px; padding: 3px 8px; border: 1px solid #25475b; border-radius: 14px; background: rgba(4, 14, 23, .55); color: #91acba; font-size: 12px; }
.reaction:hover { border-color: var(--cyan-soft); }
.reaction.active { border-color: var(--cyan); background: rgba(44, 212, 255, .12); color: white; animation: reaction-pop .25s ease; }
.safety-note { margin: 3px 13px 0; color: #7393a3; font-size: 9px; font-weight: 500; }
.context-banner.emergency { border-color: rgba(255, 97, 120, .4); background: rgba(255, 97, 120, .07); }
.context-banner.emergency > span, .context-banner.emergency strong { color: #ff9aaa; }
.empty-chat { display: grid; min-height: 310px; place-items: center; color: #587585; text-align: center; }
.empty-chat span { display: block; color: var(--cyan); font-size: 54px; opacity: .45; }
.composer { border: 1px solid #1b3d52; border-top: 0; border-radius: 0 0 14px 14px; background: #081621; }
.composer-head { display: flex; justify-content: space-between; gap: 15px; align-items: center; padding: 10px 13px 0; color: var(--muted); font-size: 10px; }
.target-models { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.target-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid #24516a; border-radius: 14px; color: #7f9fac; cursor: pointer; }
.target-chip input { display: none; }
.target-chip.selected { border-color: var(--cyan); background: rgba(44, 212, 255, .08); color: #cdefff; }
.target-chip i { width: 6px; height: 6px; border-radius: 50%; background: #46606d; }
.target-chip.selected i { background: var(--green); box-shadow: 0 0 7px var(--green); }
.composer textarea { min-height: 87px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.composer-foot { display: flex; justify-content: space-between; align-items: center; padding: 8px 11px 11px; }
.composer-foot small { color: #526f7f; font-size: 9px; }

.council-grid { display: grid; grid-template-columns: minmax(360px, .75fr) minmax(420px, 1.25fr); gap: 18px; }
.council-console, .council-result { min-height: 540px; padding: 19px; border: 1px solid #283559; border-radius: var(--radius); background: linear-gradient(145deg, rgba(16, 21, 40, .95), rgba(7, 15, 25, .95)); }
.console-head { display: flex; align-items: center; gap: 9px; padding-bottom: 15px; border-bottom: 1px solid #283451; color: #c3b9ff; font-size: 11px; letter-spacing: .12em; }
.console-head small { margin-left: auto; color: var(--muted); }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 10px var(--violet); }
.council-participants { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin: 17px 0; }
.council-member { display: flex; align-items: center; gap: 9px; padding: 10px; border: 1px solid #293b58; border-radius: 10px; background: rgba(15, 30, 45, .7); }
.council-member span { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 8px; background: #1a3d53; color: var(--cyan); font-weight: 850; }
.council-member strong, .council-member small { display: block; }
.council-member strong { font-size: 11px; }
.council-member small { color: var(--green); font-size: 9px; }
.council-question { margin-top: 10px; }
.council-question textarea { min-height: 155px; margin-top: 6px; }
.cost-line { display: flex; justify-content: space-between; gap: 12px; margin: 13px 0; color: #9cacc1; font-size: 10px; }
.cost-line b { color: var(--amber); }
.cost-line small { color: #617589; }
.launch { min-height: 50px; background: linear-gradient(135deg, #4b54ce, #238cc7); }
.council-result { overflow-y: auto; }
.council-result.empty { display: grid; align-content: center; justify-items: center; text-align: center; color: var(--muted); }
.empty-signal { position: relative; display: grid; width: 115px; height: 115px; place-items: center; margin-bottom: 20px; border: 1px solid #3a3765; border-radius: 50%; }
.empty-signal span { color: var(--violet); font-size: 50px; }
.empty-signal i { position: absolute; width: 145px; height: 145px; border: 1px dashed rgba(156,133,255,.2); border-radius: 50%; }
.result-status { display: inline-flex; gap: 8px; align-items: center; padding: 6px 10px; border: 1px solid; border-radius: 16px; font-size: 10px; font-weight: 850; letter-spacing: .1em; }
.result-status.AGREE { color: var(--green); border-color: rgba(49,230,170,.45); }
.result-status.PARTIAL { color: var(--amber); border-color: rgba(255,200,90,.45); }
.result-status.CONFLICT, .result-status.UNVERIFIED { color: var(--red); border-color: rgba(255,97,120,.45); }
.resolution { margin: 15px 0; padding: 16px; border-left: 2px solid var(--violet); background: rgba(156,133,255,.05); white-space: pre-wrap; }
.result-section { margin-top: 15px; }
.result-section h4 { margin: 0 0 7px; color: #9aadc0; font-size: 10px; letter-spacing: .12em; }
.result-section ul { margin: 0; padding-left: 20px; color: #b8cad4; }
.decision-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; padding-top: 15px; border-top: 1px solid #2b3651; }
.decision-row button { flex: 1; min-width: 90px; }

.wallet-hero { display: flex; justify-content: space-between; align-items: center; min-height: 180px; overflow: hidden; padding: 28px 38px; border: 1px solid #175169; border-radius: 20px; background: linear-gradient(120deg, #0a2a39, #0b1626 68%); box-shadow: inset 0 0 60px rgba(44,212,255,.045); }
.wallet-hero span, .wallet-hero strong, .wallet-hero small { display: block; }
.wallet-hero span { color: var(--cyan); font-size: 10px; font-weight: 800; letter-spacing: .15em; }
.wallet-hero strong { margin: 8px 0 -5px; font-size: 67px; line-height: 1; }
.wallet-hero small { color: var(--muted); }
.reactor { position: relative; display: grid; width: 120px; height: 120px; place-items: center; border: 1px solid #22728f; border-radius: 50%; box-shadow: 0 0 35px rgba(44,212,255,.13), inset 0 0 28px rgba(44,212,255,.09); }
.reactor b { color: var(--cyan); font-size: 46px; }
.reactor i { position: absolute; width: 90px; height: 90px; border: 1px dashed #315e72; border-radius: 50%; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0; }
.info-grid article, .explain-grid article, .ledger-card, .account-card, .data-rules, .danger-zone, .panel-form, .tickets-panel { padding: 19px; border: 1px solid var(--line); border-radius: 14px; background: rgba(9, 22, 33, .86); }
.info-grid span { color: var(--cyan); font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.info-grid h3 { margin: 7px 0; font-size: 16px; }
.info-grid p { margin: 0; color: var(--muted); font-size: 11px; }
.ledger-card h3 { margin-top: 0; }
.ledger-list { display: grid; }
.ledger-item { display: grid; grid-template-columns: 1fr auto; gap: 6px; padding: 11px 0; border-top: 1px solid #142d3e; }
.ledger-item:first-child { border-top: 0; }
.ledger-item strong { font-size: 12px; }
.ledger-item small { color: var(--muted); }
.ledger-item b.positive { color: var(--green); }
.ledger-item b.negative { color: var(--amber); }

.explain-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.explain-grid article > b { color: var(--cyan); font-size: 11px; letter-spacing: .12em; }
.explain-grid h3 { margin: 18px 0 6px; }
.explain-grid p { margin: 0; color: var(--muted); }
.privacy-explainer { margin: 17px 0; padding: 21px; border: 1px solid rgba(49,230,170,.23); border-radius: 14px; background: rgba(49,230,170,.045); }
.privacy-explainer div { display: flex; align-items: center; gap: 10px; }
.privacy-explainer span { color: var(--green); font-size: 22px; }
.privacy-explainer h3 { margin: 0; }
.privacy-explainer p { color: #9bbcaf; }
details { margin-top: 9px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 11px; background: #081722; }
summary { cursor: pointer; font-weight: 700; }
details p { color: var(--muted); }

.support-layout { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(340px, 1.2fr); gap: 16px; }
.panel-form { display: grid; gap: 14px; align-content: start; }
.panel-form h3, .tickets-panel h3 { margin-top: 0; }
.ticket-list { display: grid; gap: 10px; }
.ticket { padding: 13px; border: 1px solid #19374a; border-radius: 10px; background: #07131e; }
.ticket-head { display: flex; justify-content: space-between; gap: 10px; }
.ticket-head span { color: var(--cyan); font-size: 10px; font-weight: 800; }
.ticket-head em { color: var(--amber); font-size: 9px; font-style: normal; text-transform: uppercase; }
.ticket h4 { margin: 8px 0 4px; }
.ticket p { margin: 0; color: var(--muted); white-space: pre-wrap; }
.ticket-reply { margin-top: 11px; padding-top: 10px; border-top: 1px solid #1a3445; color: #b5d8e7; }

.account-card { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.identity { display: flex; align-items: center; gap: 15px; }
.identity > span { display: grid; width: 56px; height: 56px; place-items: center; border-radius: 14px; background: linear-gradient(145deg, #135c74, #1ea8ca); font-size: 22px; font-weight: 850; }
.identity h3, .identity p { margin: 0; }
.identity p { color: var(--muted); }
.account-actions { display: flex; gap: 9px; }
.data-rules { margin: 15px 0; }
.data-rules h3 { margin-top: 0; }
.data-rules li { margin: 8px 0; color: #9db3bf; }
.danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 18px; border-color: rgba(255,97,120,.25); }
.danger-zone h3, .danger-zone p { margin: 0; }
.danger-zone p { color: var(--muted); }
.danger-zone form { display: flex; gap: 8px; }
.inline-controls, .sensitive-controls { display: flex; gap: 8px; align-items: center; }
.inline-controls input { max-width: 330px; }
.mfa-confirm { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.mfa-confirm code { display: block; padding: 11px; border: 1px solid #285068; border-radius: 9px; background: #050e16; color: var(--cyan); font-size: 14px; letter-spacing: .12em; overflow-wrap: anywhere; user-select: all; }
.mfa-confirm p { color: var(--muted); }

.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin: 15px 0; }
#admin-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.panel-title { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.panel-title h3 { margin: 3px 0 0; }
.sensitive-controls { margin-top: 10px; }
.sensitive-controls input { min-width: 0; }
.admin-list { display: grid; gap: 7px; }
.admin-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 11px; border: 1px solid #19384b; border-radius: 10px; background: rgba(5, 16, 25, .68); }
.admin-row.compact { align-items: flex-start; }
.admin-identity { min-width: 0; }
.admin-row strong, .admin-row small { display: block; overflow-wrap: anywhere; }
.admin-row small { color: var(--muted); font-size: 10px; }
.admin-controls { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.admin-controls select { width: auto; min-width: 110px; padding: 8px; }
.admin-controls button, .admin-row > button { min-height: 36px; padding: 7px 11px; }
#vault-status { flex-wrap: wrap; align-items: center; }
.vault-chip { display: inline-flex; padding: 5px 8px; border: 1px solid #4b3d61; border-radius: 12px; color: var(--amber); }
.vault-chip.ready { border-color: rgba(49, 230, 170, .35); color: var(--green); }
.tiny-danger { padding: 4px 7px; border-radius: 8px; background: rgba(255,97,120,.12); color: #ff9aaa; font-size: 9px; }

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .room-card, .mission-card, .messages, .composer, .council-console, .council-result,
  .info-grid article, .explain-grid article, .ledger-card, .account-card, .data-rules,
  .danger-zone, .panel-form, .tickets-panel, .modal {
    backdrop-filter: blur(16px) saturate(118%);
    -webkit-backdrop-filter: blur(16px) saturate(118%);
  }
  .room-card, .ledger-card, .account-card, .data-rules, .panel-form, .tickets-panel { background: var(--glass); }
}

@keyframes message-in { from { opacity: 0; transform: translateY(7px) scale(.992); } }
@keyframes typing-dot { 0%, 65%, 100% { transform: translateY(0); opacity: .35; } 32% { transform: translateY(-5px); opacity: 1; box-shadow: 0 0 9px var(--violet); } }
@keyframes reaction-pop { 50% { transform: scale(1.13); } }

.modal { width: min(560px, calc(100% - 28px)); max-height: calc(100vh - 30px); overflow-y: auto; padding: 0; border: 1px solid #285068; border-radius: 18px; background: #091621; color: var(--text); box-shadow: var(--shadow); }
.modal::backdrop { background: rgba(1, 5, 8, .78); backdrop-filter: blur(5px); }
.modal form { display: grid; gap: 16px; padding: 22px; }
.modal-head { display: flex; justify-content: space-between; align-items: start; }
.modal-head h2 { margin: 4px 0 0; }
fieldset { display: grid; gap: 8px; padding: 0; border: 0; }
legend { margin-bottom: 7px; color: #b7cbd6; font-size: 13px; font-weight: 650; }
.choice-card { grid-template-columns: 20px 1fr; align-items: start; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: #07131d; }
.choice-card input { width: 17px; margin-top: 4px; accent-color: var(--cyan); }
.choice-card b, .choice-card small { display: block; }
.model-picker { display: grid; gap: 8px; }
.model-choice { grid-template-columns: 20px 1fr auto; align-items: center; padding: 10px; border: 1px solid #1c394d; border-radius: 10px; background: #07131e; }
.model-choice input { width: 17px; accent-color: var(--cyan); }
.model-choice strong, .model-choice small { display: block; }
.model-choice small { color: var(--muted); }
.model-choice em { color: var(--green); font-size: 9px; font-style: normal; text-transform: uppercase; }
.model-choice.planned { opacity: .55; }
.model-choice.planned em { color: var(--amber); }
.invite-block { padding-top: 15px; border-top: 1px solid var(--line); }
.invite-block h3, .invite-block p { margin: 0 0 8px; }
.invite-block p { color: var(--muted); font-size: 11px; }
.invite-block > div { display: grid; grid-template-columns: 1fr 125px auto; gap: 7px; }
.member-block { padding-top: 10px; border-top: 1px solid var(--line); }
.member-block h3 { margin: 0 0 8px; }
.member-list { display: grid; gap: 7px; }
.member-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border: 1px solid #1c394d; border-radius: 9px; background: #07131e; }
.member-row strong, .member-row small { display: block; }
.member-row small { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.member-row button { min-height: 34px; padding: 6px 10px; }

.toast { position: fixed; z-index: 90; right: 24px; bottom: 24px; max-width: 390px; padding: 12px 16px; border: 1px solid #26627c; border-radius: 11px; background: #0b2230; color: #d8f4ff; box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .22s; }
.toast.show { opacity: 1; transform: none; }
.toast.error { border-color: rgba(255,97,120,.5); background: #2b1119; color: #ffb4bf; }
.busy { position: fixed; z-index: 100; inset: 0; display: grid; align-content: center; justify-items: center; background: rgba(2, 7, 11, .83); backdrop-filter: blur(7px); }
.busy strong { margin-top: 17px; }
.busy small { color: var(--muted); }
.loader { display: flex; gap: 9px; }
.loader i { width: 10px; height: 10px; border-radius: 50%; background: var(--cyan); animation: jump .9s infinite ease-in-out; }
.loader i:nth-child(2) { animation-delay: .12s; }
.loader i:nth-child(3) { animation-delay: .24s; }
@keyframes jump { 0%, 80%, 100% { transform: scale(.55); opacity: .35; } 40% { transform: scale(1.15); opacity: 1; box-shadow: 0 0 13px var(--cyan); } }

.legal-shell { max-width: 860px; margin: 0 auto; padding: 46px 20px 80px; }
.legal-shell .brand-lockup { margin-bottom: 45px; }
.legal-shell article { padding: clamp(22px, 5vw, 46px); border: 1px solid var(--line); border-radius: 20px; background: rgba(8, 21, 32, .93); box-shadow: var(--shadow); }
.legal-shell h1 { margin: 7px 0 9px; font-size: clamp(30px, 5vw, 48px); }
.legal-shell h2 { margin-top: 30px; color: #cce9f5; font-size: 18px; }
.legal-shell p, .legal-shell li { color: #9fb6c2; }
.legal-shell footer { margin-top: 25px; color: #668392; font-size: 11px; }

@media (max-width: 1050px) {
  .mission-card { grid-template-columns: 90px 1fr; }
  .mission-steps { grid-column: 1 / -1; }
  .council-grid { grid-template-columns: 1fr; }
  .council-console, .council-result { min-height: auto; }
  .info-grid { grid-template-columns: 1fr; }
  .account-card, .danger-zone { align-items: stretch; flex-direction: column; }
  .admin-grid { grid-template-columns: 1fr; }
  #admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
  .mobile-only { display: grid !important; }
  .auth-shell { grid-template-columns: 1fr; padding: 28px 18px; }
  .auth-story .brand-lockup { margin-bottom: 40px; }
  .auth-story h1 { font-size: 39px; }
  .auth-story > p { font-size: 15px; }
  .protocol-line { flex-wrap: wrap; }
  .app-shell { display: block; }
  .sidebar { width: min(315px, 88vw); transform: translateX(-105%); transition: transform .2s ease; }
  .sidebar.open { transform: none; }
  .sidebar-brand .mobile-only { margin-left: auto; }
  .workspace { width: 100%; }
  .topbar { height: 61px; padding: 0 13px; }
  .secure-pill { display: none; }
  .breadcrumb span, .breadcrumb b { display: none; }
  .content { padding: 23px 14px 50px; }
  .page-heading, .room-heading { flex-direction: column; }
  .room-grid { grid-template-columns: 1fr; }
  .mission-card { grid-template-columns: 1fr; }
  .mission-orbit { width: 74px; height: 74px; }
  .mission-steps { overflow-x: auto; }
  .messages { max-height: none; min-height: 350px; }
  .message { max-width: 94%; }
  .composer-head { align-items: flex-start; flex-direction: column; }
  .target-models { justify-content: flex-start; }
  .council-grid { grid-template-columns: 1fr; }
  .council-participants { grid-template-columns: 1fr; }
  .wallet-hero { padding: 22px; }
  .reactor { width: 90px; height: 90px; }
  .wallet-hero strong { font-size: 52px; }
  .explain-grid, .support-layout { grid-template-columns: 1fr; }
  .account-actions, .danger-zone form { flex-direction: column; width: 100%; }
  .invite-block > div { grid-template-columns: 1fr; }
  .admin-row { align-items: stretch; flex-direction: column; }
  .admin-controls { justify-content: flex-start; }
  .sensitive-controls, .inline-controls { align-items: stretch; flex-direction: column; }
  .inline-controls input { max-width: none; }
  .reaction { min-height: 42px; }
  #admin-stats { grid-template-columns: 1fr; }
}

@media (max-width: 450px) {
  .auth-story h1 { font-size: 32px; }
  .auth-card { padding: 20px; }
  .balance-pill small { display: none; }
  .mission-steps { align-items: flex-start; flex-direction: column; }
  .mission-steps i { width: 1px; height: 10px; margin-left: 8px; }
  .wallet-hero { align-items: flex-start; }
  .reactor { width: 70px; height: 70px; }
  .reactor b { font-size: 31px; }
  .cost-line { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
