:root {
  color-scheme: light;
  --ink: #153139;
  --ink-soft: #5b7177;
  --ink-faint: #789096;
  --primary: #0b7285;
  --primary-strong: #075b6a;
  --primary-soft: #d9f1f4;
  --surface: #ffffff;
  --surface-soft: #f4fafb;
  --surface-tint: #eaf7f8;
  --canvas: #edf8fa;
  --border: #c9e1e5;
  --border-soft: #deecef;
  --success: #18794e;
  --warning: #9a6700;
  --danger: #b42318;
  --danger-soft: #fff0ee;
  --shadow-sm: 0 8px 24px rgba(32, 83, 94, 0.08);
  --shadow-md: 0 22px 64px rgba(32, 83, 94, 0.14);
  --radius-panel: 22px;
  --radius-card: 18px;
  --radius-control: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
}

body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, .96) 0 8%, transparent 26%),
    radial-gradient(circle at 88% 16%, rgba(176, 226, 233, .42), transparent 25%),
    var(--canvas);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(11, 114, 133, .36);
  outline-offset: 3px;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.is-hidden {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  color: #fff;
  background: var(--primary-strong);
  transform: translateY(-160%);
  transition: transform 180ms var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

.auth-screen {
  position: relative;
  display: grid;
  min-height: 100dvh;
  place-items: center;
  overflow: hidden;
  padding: 88px 20px 36px;
}

.auth-screen::before,
.auth-screen::after {
  position: absolute;
  content: "";
  pointer-events: none;
  border: 1px solid rgba(11, 114, 133, .13);
  border-radius: 50%;
}

.auth-screen::before {
  width: 660px;
  height: 660px;
  top: -360px;
  right: -220px;
  box-shadow: 0 0 0 46px rgba(11, 114, 133, .025), 0 0 0 92px rgba(11, 114, 133, .018);
}

.auth-screen::after {
  width: 420px;
  height: 420px;
  bottom: -280px;
  left: -140px;
  box-shadow: 0 0 0 38px rgba(11, 114, 133, .025), 0 0 0 76px rgba(11, 114, 133, .018);
}

.ambient-rings {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(11, 114, 133, .026) 1px, transparent 1px), linear-gradient(90deg, rgba(11, 114, 133, .026) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, #000 0, transparent 68%);
}

.auth-card {
  position: relative;
  z-index: 1;
  width: min(100%, 500px);
  padding: 78px 38px 28px;
  border: 1px solid rgba(177, 213, 219, .9);
  border-radius: 28px;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, .9);
}

.mascot-frame {
  position: absolute;
  top: -64px;
  left: 50%;
  width: 128px;
  height: 128px;
  padding: 5px;
  border: 1px solid #b9dce1;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 14px 36px rgba(32, 83, 94, .18);
  transform: translateX(-50%);
}

.mascot-frame::after {
  position: absolute;
  right: 1px;
  bottom: 10px;
  width: 18px;
  height: 18px;
  content: "";
  border: 4px solid #fff;
  border-radius: 50%;
  background: var(--success);
}

.mascot-frame img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.brand-lockup {
  text-align: center;
}

.brand-kicker,
.section-kicker {
  display: block;
  margin-bottom: 6px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
}

.brand-lockup h1 {
  margin: 0;
  font-size: clamp(25px, 5vw, 32px);
  line-height: 1.25;
  letter-spacing: -.035em;
}

.brand-lockup p {
  max-width: 360px;
  margin: 10px auto 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin: 26px 0 22px;
  padding: 4px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: var(--surface-soft);
}

.auth-tab {
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  color: var(--ink-soft);
  background: transparent;
  font-weight: 700;
  transition: color 180ms var(--ease), background 180ms var(--ease), box-shadow 180ms var(--ease);
}

.auth-tab:hover {
  color: var(--primary-strong);
}

.auth-tab.is-active {
  color: var(--primary-strong);
  background: #fff;
  box-shadow: 0 4px 14px rgba(32, 83, 94, .09);
}

.auth-form,
#qq-login-form {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.input-shell {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 50px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  color: var(--ink-faint);
  background: #fff;
  transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease), background 180ms var(--ease);
}

.input-shell:focus-within {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(11, 114, 133, .10);
}

.input-shell > svg {
  flex: 0 0 auto;
  margin-left: 14px;
}

.input-shell input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 13px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 16px;
}

.input-shell input::placeholder {
  color: #899da2;
}

.password-toggle {
  display: grid;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  color: var(--ink-soft);
  background: transparent;
  place-items: center;
}

.password-toggle:hover {
  color: var(--primary);
}

.form-error {
  min-height: 0;
  margin: -4px 0 0;
  color: var(--danger);
  font-size: 13px;
  font-weight: 650;
}

.form-error:empty {
  display: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  gap: 9px;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  font-weight: 750;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform 160ms var(--ease), background 180ms var(--ease), border-color 180ms var(--ease), color 180ms var(--ease), box-shadow 180ms var(--ease);
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: scale(.98);
}

.button:disabled {
  cursor: not-allowed;
  opacity: .48;
  transform: none;
}

.button-primary {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 9px 22px rgba(11, 114, 133, .22);
}

.button-primary:hover {
  background: var(--primary-strong);
  box-shadow: 0 12px 26px rgba(11, 114, 133, .26);
}

.button-secondary {
  border-color: var(--border);
  color: var(--primary-strong);
  background: #fff;
}

.button-secondary:hover,
.button-quiet:hover {
  border-color: #9bcbd2;
  background: var(--surface-tint);
}

.button-quiet {
  border-color: var(--border-soft);
  color: var(--ink-soft);
  background: rgba(255, 255, 255, .7);
}

.button-danger {
  border-color: #e7a9a4;
  color: #fff;
  background: var(--danger);
}

.button-wide {
  width: 100%;
}

.button .spinner,
.icon-button .spinner {
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.admin-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid #bedde2;
  border-radius: var(--radius-control);
  color: var(--primary-strong);
  background: var(--surface-tint);
}

.admin-note > svg {
  flex: 0 0 auto;
  margin-top: 3px;
}

.admin-note p,
.admin-note strong,
.admin-note span {
  display: block;
  margin: 0;
}

.admin-note span {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
}

.auth-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 20px;
  color: var(--ink-faint);
  font-size: 12px;
  text-align: center;
}

.auth-foot svg {
  width: 16px;
  height: 16px;
}

.app-shell {
  min-height: 100dvh;
}

.topbar {
  position: sticky;
  z-index: 40;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 24px;
  padding: 10px max(24px, calc((100vw - 1440px) / 2));
  border-bottom: 1px solid rgba(183, 214, 219, .72);
  background: rgba(245, 251, 252, .92);
  backdrop-filter: blur(18px);
}

.mini-brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.mini-brand img {
  width: 48px;
  height: 48px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  object-fit: cover;
}

.mini-brand span,
.mini-brand strong,
.mini-brand small {
  display: block;
}

.mini-brand strong {
  font-size: 16px;
  line-height: 1.3;
}

.mini-brand small {
  color: var(--ink-faint);
  font-size: 11px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.identity {
  margin-right: 4px;
  text-align: right;
}

.identity span,
.identity strong {
  display: block;
  line-height: 1.35;
}

.identity span {
  color: var(--ink-faint);
  font-size: 11px;
}

.identity strong {
  max-width: 160px;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button {
  display: grid;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-control);
  color: var(--ink-soft);
  background: rgba(255, 255, 255, .76);
  place-items: center;
  transition: transform 160ms var(--ease), color 180ms var(--ease), border-color 180ms var(--ease), background 180ms var(--ease);
}

.icon-button:hover {
  border-color: #9bcbd2;
  color: var(--primary);
  background: #fff;
  transform: translateY(-1px);
}

.workspace {
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: 34px 24px 52px;
}

.welcome-panel {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-height: 178px;
  gap: 30px;
  overflow: hidden;
  padding: 32px 34px;
  border: 1px solid #b9dde2;
  border-radius: var(--radius-panel);
  background:
    linear-gradient(108deg, rgba(255, 255, 255, .96), rgba(229, 246, 248, .94)),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.welcome-panel::after {
  position: absolute;
  width: 280px;
  height: 280px;
  right: 18%;
  bottom: -230px;
  content: "";
  border: 1px solid rgba(11, 114, 133, .16);
  border-radius: 50%;
  box-shadow: 0 0 0 32px rgba(11, 114, 133, .035), 0 0 0 64px rgba(11, 114, 133, .025);
}

.welcome-panel > * {
  position: relative;
  z-index: 1;
}

.welcome-panel h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 45px);
  line-height: 1.15;
  letter-spacing: -.045em;
}

.welcome-panel p {
  max-width: 620px;
  margin: 10px 0 0;
  color: var(--ink-soft);
}

.system-chip {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  min-width: 210px;
  gap: 11px;
  padding: 12px 15px;
  border: 1px solid #c7dfe3;
  border-radius: 15px;
  background: rgba(255, 255, 255, .82);
  box-shadow: var(--shadow-sm);
}

.status-light {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--warning);
  box-shadow: 0 0 0 5px rgba(154, 103, 0, .10);
}

.system-chip.is-ready .status-light {
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(24, 121, 78, .10);
}

.system-chip span,
.system-chip strong,
.system-chip small {
  display: block;
}

.system-chip strong {
  font-size: 13px;
}

.system-chip small {
  color: var(--ink-faint);
  font-size: 11px;
}

.workspace-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  align-items: start;
  gap: 28px;
  margin-top: 28px;
}

.control-column {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 18px;
}

.panel {
  padding: 23px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow-sm);
}

.panel-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.panel-heading h2,
.panel-heading p {
  margin: 0;
}

.panel-heading h2 {
  font-size: 18px;
  line-height: 1.35;
}

.panel-heading p {
  color: var(--ink-faint);
  font-size: 12px;
}

.panel-icon {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: var(--primary);
  background: var(--primary-soft);
  place-items: center;
}

.provider-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}

.provider-picker legend {
  width: 100%;
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 750;
}

.provider-option {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 72px;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 13px;
  color: var(--ink-soft);
  background: #fff;
  cursor: pointer;
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease), box-shadow 160ms var(--ease);
}

.provider-option:hover {
  border-color: #9fcbd2;
  background: var(--surface-tint);
}

.provider-option:has(input:focus-visible) {
  outline: 3px solid rgba(11, 114, 133, .22);
  outline-offset: 2px;
}

.provider-option.is-selected {
  border-color: var(--primary);
  color: var(--primary-strong);
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 1px rgba(11, 114, 133, .08);
}

.provider-option.is-disabled {
  opacity: .52;
  cursor: not-allowed;
}

.provider-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.provider-option-icon {
  display: grid;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: var(--primary);
  background: rgba(11, 114, 133, .09);
  place-items: center;
}

.provider-option-icon svg {
  width: 18px;
  height: 18px;
}

.provider-option span,
.provider-option strong,
.provider-option small {
  display: block;
  min-width: 0;
}

.provider-option strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.3;
}

.provider-option small {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 10px;
}

.provider-option-check {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 15px;
  height: 15px;
  color: var(--success);
  opacity: 0;
}

.provider-option.is-selected .provider-option-check {
  opacity: 1;
}

.protocol-lock {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 60px;
  gap: 12px;
  padding: 10px 13px;
  border: 1px solid #c6e1e5;
  border-radius: var(--radius-control);
  color: var(--primary-strong);
  background: var(--surface-tint);
}

.protocol-lock > svg:first-child {
  width: 23px;
  height: 23px;
}

.protocol-lock span,
.protocol-lock small,
.protocol-lock strong {
  display: block;
}

.protocol-lock small {
  color: var(--ink-faint);
  font-size: 11px;
}

.protocol-lock strong {
  font-size: 14px;
}

.protocol-check {
  color: var(--success);
}

.official-connect {
  display: grid;
  gap: 14px;
}

.official-connect.is-hidden {
  display: none;
}

.official-steps {
  display: grid;
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-control);
  color: var(--ink-soft);
  background: var(--surface-tint);
  font-size: 12px;
}

.official-steps span {
  display: flex;
  align-items: center;
  gap: 9px;
}

.official-steps b {
  display: grid;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fff;
  background: var(--primary);
  font-size: 11px;
  place-items: center;
}

.provider-privacy {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.55;
}

.provider-privacy svg {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  color: var(--success);
}

.connection-guide p {
  margin: -4px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.content-column,
.accounts-section,
.connections-section {
  min-width: 0;
}

.accounts-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 2px 2px 18px;
}

.accounts-heading h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -.03em;
}

.account-count {
  padding: 6px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, .72);
  font-size: 12px;
  font-weight: 700;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 255px), 1fr));
  align-items: start;
  gap: 18px;
}

.account-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 20px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow-sm);
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), border-color 220ms var(--ease);
}

.account-card:hover {
  border-color: #b7d7dc;
  box-shadow: 0 16px 36px rgba(32, 83, 94, .12);
  transform: translateY(-2px);
}

.account-card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  content: "";
  background: #b8c8cc;
}

.account-card[data-state="online"]::before {
  background: var(--success);
}

.account-card[data-state="working"]::before {
  background: var(--warning);
}

.account-top {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.account-avatar {
  display: grid;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--primary);
  background: var(--surface-tint);
  place-items: center;
}

.account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-avatar svg {
  width: 24px;
  height: 24px;
}

.account-title {
  min-width: 0;
}

.account-title h3,
.account-title p {
  margin: 0;
}

.account-title h3 {
  overflow: hidden;
  font-size: 18px;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-title p {
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.state-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 17px 0 13px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 800;
}

.state-badge svg {
  width: 17px;
  height: 17px;
}

.state-badge.is-online {
  color: var(--success);
}

.state-badge.is-working {
  color: var(--warning);
}

.account-facts {
  display: grid;
  gap: 8px;
  margin: 0 0 15px;
}

.account-fact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-faint);
  font-size: 12px;
}

.account-fact strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-qr {
  display: grid;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 15px;
  background: #fff;
  place-items: center;
}

.account-qr img {
  display: block;
  width: 164px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
}

.account-qr p {
  margin: 9px 0 0;
  color: var(--ink-faint);
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}

.verify-form {
  display: grid;
  gap: 11px;
  margin: 13px 0;
  padding: 13px;
  border: 1px solid #b8dce2;
  border-radius: 15px;
  background: var(--surface-tint);
}

.verify-heading {
  display: grid;
  gap: 3px;
}

.verify-heading strong {
  color: var(--ink);
  font-size: 13px;
}

.verify-heading span {
  color: var(--ink-faint);
  font-size: 12px;
  line-height: 1.5;
}

.verify-commands {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 8px;
}

.verify-command {
  min-height: 44px;
  padding: 8px 10px;
  border-color: var(--border);
  color: var(--ink-soft);
  background: #fff;
  font-size: 12px;
}

.verify-command:hover {
  border-color: #8fc4cc;
  color: var(--primary-strong);
  background: #f8fdfe;
}

.verify-command.is-emphasis {
  border-color: #88c3cc;
  color: var(--primary-strong);
  background: #e8f7f9;
}

.verify-form .input-shell {
  min-height: 46px;
}

.verify-form .input-shell input {
  height: 44px;
}

.account-message-list {
  display: grid;
  max-height: 250px;
  gap: 8px;
  margin: 12px 0;
  padding-right: 3px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: #a8cfd5 transparent;
  scrollbar-width: thin;
}

.account-message {
  margin: 0;
  padding: 10px 11px;
  border-left: 3px solid var(--primary);
  border-radius: 4px 10px 10px 4px;
  color: var(--ink-soft);
  background: var(--surface-soft);
  font-size: 12px;
}

.account-message p {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.message-link {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(11, 114, 133, .14);
}

.message-link a,
.message-link-value {
  min-width: 0;
  flex: 1 1 150px;
  color: var(--primary-strong);
  font-weight: 650;
  overflow-wrap: anywhere;
  white-space: normal;
}

.message-link a:hover {
  text-decoration-thickness: 2px;
}

.message-link.is-qq-only .message-link-value {
  color: var(--ink-soft);
}

.account-copy-button {
  min-height: 44px;
  padding: 8px 12px;
  border-color: #b9dce1;
  color: var(--primary-strong);
  background: #fff;
  font-size: 12px;
}

.account-copy-button:hover {
  border-color: #8fc4cc;
  background: var(--surface-tint);
}

.account-copy-button.is-copied {
  border-color: #a5d3bc;
  color: var(--success);
  background: #edf8f2;
}

.account-copy-button svg {
  width: 16px;
  height: 16px;
}

.account-message.is-error {
  border-left-color: var(--danger);
  color: var(--danger);
  background: var(--danger-soft);
}

.account-message.is-warning {
  border-left-color: var(--warning);
  color: #76520b;
  background: #fff8e8;
}

.account-message.is-waiting {
  border-left-color: #5b78b6;
  color: #304e86;
  background: #f0f4fd;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 15px;
}

.account-actions .button {
  min-width: 0;
  flex: 1 1 130px;
  min-height: 44px;
  padding-inline: 12px;
  font-size: 13px;
}

.account-actions .button svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
}

.account-actions .icon-button {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  color: var(--danger);
  background: var(--danger-soft);
}

.connections-section {
  margin-top: 42px;
  padding-top: 32px;
  border-top: 1px solid rgba(177, 211, 217, .74);
}

.connections-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 0 2px 18px;
}

.connections-heading h2,
.connections-heading p {
  margin: 0;
}

.connections-heading h2 {
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -.03em;
}

.connections-heading p {
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 13px;
}

.heading-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.heading-actions .button {
  min-height: 44px;
  padding: 8px 13px;
  font-size: 13px;
}

.connection-alert {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #c5dfe3;
  border-radius: var(--radius-control);
  color: var(--primary-strong);
  background: var(--surface-tint);
  font-size: 13px;
}

.connection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  align-items: start;
  gap: 18px;
}

.connection-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 20px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow-sm);
}

.connection-card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  content: "";
  background: #b8c8cc;
}

.connection-card[data-state="online"]::before {
  background: var(--success);
}

.connection-card[data-state="working"]::before {
  background: var(--warning);
}

.connection-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
}

.connection-icon {
  display: grid;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: var(--primary);
  background: var(--primary-soft);
  place-items: center;
}

.connection-top h3,
.connection-top p {
  overflow: hidden;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connection-top h3 {
  font-size: 16px;
  line-height: 1.35;
}

.connection-top p {
  color: var(--ink-faint);
  font-size: 11px;
}

.connection-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--surface-soft);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.connection-state svg {
  width: 14px;
  height: 14px;
}

.connection-state.is-online {
  color: var(--success);
  background: #eaf7f0;
}

.connection-state.is-working {
  color: var(--warning);
  background: #fff7df;
}

.connection-address {
  min-height: 42px;
  margin: 15px 0;
  overflow-wrap: anywhere;
  color: var(--ink-soft);
  font-size: 12px;
}

.connection-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.connection-facts span,
.connection-facts small,
.connection-facts strong {
  display: block;
  min-width: 0;
}

.connection-facts span {
  padding: 9px;
  border-radius: 10px;
  background: var(--surface-soft);
}

.connection-facts small {
  color: var(--ink-faint);
  font-size: 10px;
}

.connection-facts strong {
  overflow: hidden;
  margin-top: 2px;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connection-actions {
  display: grid;
  grid-template-columns: 1fr repeat(3, auto);
  gap: 8px;
  margin-top: 16px;
}

.connection-actions .button,
.connection-actions .icon-button {
  min-height: 44px;
}

.connection-actions .button {
  min-width: 0;
  padding-inline: 12px;
  font-size: 13px;
}

.connection-actions .icon-button {
  width: 44px;
  height: 44px;
}

.icon-button.is-danger {
  color: var(--danger);
  background: var(--danger-soft);
}

.connection-empty {
  min-height: 220px;
}

.empty-state {
  grid-column: 1 / -1;
  display: grid;
  min-height: 280px;
  padding: 34px;
  border: 1px dashed #adced4;
  border-radius: var(--radius-card);
  color: var(--ink-soft);
  background: rgba(255, 255, 255, .54);
  text-align: center;
  place-items: center;
}

.empty-state > div {
  max-width: 360px;
}

.empty-state svg {
  width: 38px;
  height: 38px;
  color: var(--primary);
}

.empty-state h3 {
  margin: 12px 0 4px;
  color: var(--ink);
  font-size: 20px;
}

.empty-state p {
  margin: 0;
  font-size: 14px;
}

.skeleton-card {
  min-height: 286px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  background: linear-gradient(100deg, #f3f8f9 25%, #fff 42%, #f3f8f9 60%);
  background-size: 300% 100%;
  animation: skeleton 1.4s ease infinite;
}

.confirm-dialog,
.connection-dialog,
.official-dialog {
  width: min(calc(100% - 32px), 420px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  color: var(--ink);
  background: #fff;
  box-shadow: var(--shadow-md);
}

.confirm-dialog::backdrop,
.connection-dialog::backdrop,
.official-dialog::backdrop {
  background: rgba(15, 45, 52, .34);
  backdrop-filter: blur(4px);
}

.confirm-dialog form {
  padding: 28px;
  text-align: center;
}

.dialog-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 0 auto;
  border-radius: 16px;
  color: var(--danger);
  background: var(--danger-soft);
  place-items: center;
}

.dialog-icon svg {
  width: 25px;
  height: 25px;
}

.confirm-dialog h2 {
  margin: 16px 0 6px;
  font-size: 22px;
}

.confirm-dialog p {
  margin: 0;
  color: var(--ink-soft);
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 24px;
}

.connection-dialog {
  width: min(calc(100% - 32px), 760px);
  max-height: min(880px, calc(100dvh - 32px));
  overflow: auto;
}

.connection-dialog form {
  padding: 26px;
}

.dialog-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.dialog-heading h2 {
  margin: 0;
  font-size: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-wide {
  grid-column: 1 / -1;
}

.select-shell {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 50px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  color: var(--ink-faint);
  background: #fff;
}

.select-shell:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(11, 114, 133, .10);
}

.select-shell > svg {
  margin-left: 14px;
}

.select-shell select {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 36px 0 13px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 18px;
}

.check-row label {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 9px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
}

.check-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.connection-dialog .form-error {
  margin-top: 10px;
}

.connection-dialog .dialog-actions {
  max-width: 360px;
  margin-left: auto;
}

.official-dialog {
  width: min(calc(100% - 32px), 440px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
}

.official-dialog-shell {
  padding: 26px;
}

.official-qr-stage {
  display: grid;
  min-height: 292px;
  border: 1px solid #cfe4e7;
  border-radius: 16px;
  background:
    linear-gradient(rgba(255, 255, 255, .88), rgba(255, 255, 255, .88)),
    repeating-linear-gradient(45deg, var(--primary-soft) 0 9px, transparent 9px 18px);
  place-items: center;
}

.official-qr-stage img {
  width: min(256px, calc(100vw - 104px));
  height: auto;
  padding: 8px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(20, 76, 87, .10);
}

.official-qr-loading {
  display: grid;
  justify-items: center;
  gap: 13px;
  color: var(--ink-soft);
  font-size: 13px;
}

.official-qr-loading .spinner {
  width: 27px;
  height: 27px;
  border-width: 3px;
}

.official-task-state {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 15px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-tint);
}

.official-task-state.is-success .status-light {
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(24, 121, 78, .10);
}

.official-task-state.is-error .status-light {
  background: var(--danger);
  box-shadow: 0 0 0 5px rgba(184, 59, 70, .10);
}

.official-task-state p,
.official-task-state strong,
.official-task-state small {
  display: block;
  margin: 0;
}

.official-task-state strong {
  font-size: 13px;
}

.official-task-state small {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 11px;
}

.official-dialog-help {
  margin: 13px 2px 0;
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.55;
}

.official-dialog-actions {
  margin-top: 16px;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 22px;
  bottom: 22px;
  max-width: min(380px, calc(100vw - 44px));
  padding: 13px 16px;
  border: 1px solid #b9d8dd;
  border-radius: var(--radius-control);
  color: #fff;
  background: #194a55;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity 180ms var(--ease), transform 220ms var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.is-error {
  background: #8f241b;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes skeleton {
  to { background-position-x: -300%; }
}

@media (max-width: 980px) {
  .workspace-layout {
    grid-template-columns: 1fr;
  }

  .control-column {
    position: static;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  }

  .connect-panel {
    grid-row: span 2;
  }

}

@media (max-width: 720px) {
  .topbar {
    min-height: 68px;
    padding: 9px 16px;
  }

  .mini-brand small,
  .identity {
    display: none;
  }

  .mini-brand strong {
    font-size: 14px;
  }

  .mini-brand img {
    width: 44px;
    height: 44px;
  }

  .workspace {
    padding: 22px 16px 42px;
  }

  .welcome-panel {
    align-items: flex-start;
    min-height: 0;
    padding: 25px;
    flex-direction: column;
  }

  .system-chip {
    width: 100%;
    min-width: 0;
  }

  .welcome-panel h1 {
    font-size: 31px;
  }

  .workspace-layout {
    gap: 24px;
    margin-top: 22px;
  }

  .account-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  }

  .connections-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .heading-actions {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 520px) {
  .auth-screen {
    align-items: start;
    padding: 76px 12px 24px;
  }

  .auth-card {
    padding: 68px 20px 24px;
    border-radius: 23px;
  }

  .mascot-frame {
    top: -54px;
    width: 108px;
    height: 108px;
  }

  .auth-tabs {
    margin-top: 22px;
  }

  .auth-tab {
    padding-inline: 5px;
    font-size: 14px;
  }

  .auth-foot {
    align-items: flex-start;
  }

  .welcome-panel {
    padding: 22px 20px;
  }

  .welcome-panel h1 {
    font-size: 23px;
    letter-spacing: -.035em;
  }

  .panel {
    padding: 20px;
  }

  .accounts-heading h2 {
    font-size: 24px;
  }

  .connections-heading h2 {
    font-size: 24px;
  }

  .account-grid {
    grid-template-columns: 1fr;
  }

  .connection-facts {
    grid-template-columns: 1fr;
  }

  .connection-facts strong {
    white-space: normal;
  }

  .connection-actions {
    grid-template-columns: 1fr repeat(3, 44px);
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-wide {
    grid-column: auto;
  }

  .connection-dialog form {
    padding: 20px;
  }

  .toast {
    right: 14px;
    bottom: 14px;
    max-width: calc(100vw - 28px);
  }
}

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