:root {
  color-scheme: dark;
  --bg: #0c1117;
  --surface: #151b23;
  --surface-soft: #10161e;
  --line: #273241;
  --line-strong: #3a4657;
  --text: #e7edf4;
  --muted: #9ba8b7;
  --accent: #30c29b;
  --accent-strong: #72e0bd;
  --amber: #e2ad54;
  --rose: #ed7f9b;
}

* { box-sizing: border-box; }

html { min-width: 320px; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(48, 194, 155, 0.05), transparent 260px),
    linear-gradient(rgba(8, 11, 16, 0.78), rgba(8, 11, 16, 0.86)),
    url("./assets/lumio-result-20260619-184856-01.png") top center / cover no-repeat,
    var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
textarea,
input,
select {
  font: inherit;
}

button { cursor: pointer; }

.app-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 20px;
}

.topbar,
.query-panel,
.answer-panel,
.evidence-panel,
.answer-card,
.evidence-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 16px;
  background: #111820;
}

.brand,
.panel-head,
.tag-row,
.query-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand { min-width: 0; }

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  color: var(--accent-strong);
  font-size: 26px;
  font-weight: 900;
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

h2 {
  margin-bottom: 0;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 1.35;
}

.status-pill,
.tag,
.panel-head span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border: 1px solid rgba(48, 194, 155, 0.32);
  border-radius: 999px;
  padding: 3px 10px;
  color: var(--accent-strong);
  background: rgba(48, 194, 155, 0.12);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

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

.usage-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  border: 1px solid rgba(114, 224, 189, 0.5);
  border-radius: 8px;
  padding: 6px 12px;
  background: linear-gradient(135deg, rgba(114, 224, 189, 0.22), rgba(48, 194, 155, 0.12));
  color: #dffdf4;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.usage-stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  line-height: 1;
}

.usage-stat strong {
  color: #ffffff;
  font-size: 14px;
}

.usage-divider {
  width: 1px;
  height: 15px;
  background: rgba(114, 224, 189, 0.34);
}

.qq-group-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid rgba(48, 194, 155, 0.42);
  border-radius: 8px;
  padding: 0 12px;
  color: #07110e;
  background: var(--accent-strong);
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.qq-group-link:hover {
  border-color: var(--accent-strong);
  background: #8ef0d1;
}

.qq-group-link:focus-visible {
  outline: 3px solid rgba(114, 224, 189, 0.35);
  outline-offset: 2px;
}

.answer-vote {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.answer-vote[hidden] {
  display: none;
}

.answer-vote-text {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.like-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid rgba(114, 224, 189, 0.46);
  border-radius: 8px;
  padding: 6px 14px;
  color: var(--accent-strong);
  background: rgba(48, 194, 155, 0.1);
  font-size: 13px;
  font-weight: 850;
  transition: filter 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.like-button .like-icon {
  font-size: 15px;
  line-height: 1;
}

.like-button:hover:not(:disabled) {
  border-color: rgba(114, 224, 189, 0.7);
  filter: brightness(1.08);
}

.like-button.is-liked {
  color: #07110e;
  background: var(--accent);
  border-color: var(--accent);
}

.like-button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.advisor-view {
  display: grid;
  gap: 14px;
}
.advisor-command-row {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
  gap: 14px;
  align-items: stretch;
}

.advisor-command-row > .query-panel,
.advisor-command-row > .progress-panel {
  min-width: 0;
}

.advisor-command-row > .progress-panel {
  padding: 16px;
  background: var(--surface);
  max-height: 322px;
}

.view-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.tab-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--muted);
  background: var(--surface);
  font-weight: 800;
}

.tab-button.active {
  border-color: var(--accent);
  color: #07110e;
  background: var(--accent);
}

.view-panel[hidden] {
  display: none;
}

.wiki-view {
  display: grid;
  gap: 14px;
  grid-template-rows: auto minmax(0, 1fr);
  height: calc(100vh - 210px);
}

.wiki-toolbar,
.wiki-detail {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.wiki-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
}

.compact-field {
  min-width: 150px;
}

.wiki-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: 14px;
  align-items: stretch;
  min-height: 0;
}

.wiki-list {
  display: grid;
  height: 100%;
  min-height: 0;
  overflow: auto;
  gap: 8px;
  padding-right: 2px;
}

.augment-library {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
  height: 100%;
  min-height: 0;
  overflow: auto;
  align-content: start;
}

.query-panel,
.answer-panel,
.evidence-panel {
  padding: 16px;
}

.query-panel {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.wide-field { width: 100%; }

textarea {
  width: 100%;
  min-height: 164px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  resize: vertical;
  color: var(--text);
  background: var(--surface-soft);
  outline: none;
  line-height: 1.65;
}

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 11px;
  color: var(--text);
  background: var(--surface-soft);
  outline: none;
}

input::placeholder {
  color: #697688;
}

input:focus,
select:focus {
  border-color: var(--accent);
  background: #121a23;
  box-shadow: 0 0 0 3px rgba(48, 194, 155, 0.16);
}

textarea::placeholder {
  color: #697688;
}

textarea:focus {
  border-color: var(--accent);
  background: #121a23;
  box-shadow: 0 0 0 3px rgba(48, 194, 155, 0.16);
}

.query-actions {
  justify-content: flex-end;
}

.primary-button {
  min-width: 112px;
  height: 42px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 0 18px;
  color: #07110e;
  background: var(--accent);
  font-weight: 850;
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.panel-head {
  justify-content: space-between;
  margin-bottom: 14px;
}

.stream-output {
  min-height: 188px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #0d131a;
  color: #c4ceda;
  line-height: 1.75;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.progress-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #0d131a;
}

.compact-head {
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 0;
}

.compact-head h3 {
  margin: 0;
}

.compact-head span {
  max-width: 62%;
  overflow: hidden;
  justify-content: flex-end;
  text-overflow: ellipsis;
}

.progress-list {
  display: grid;
  align-content: start;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.progress-empty {
  display: grid;
  place-items: center;
  min-height: 100%;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.progress-step {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
  border: 0;
  border-radius: 0;
  padding: 9px 0;
  background: transparent;
  transition: transform 180ms ease, background-color 180ms ease;
  isolation: isolate;
}

button.progress-step {
  width: 100%;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.progress-step.has-output:hover::after,
.progress-step.has-output:focus-visible::after,
.progress-step.expanded::after {
  content: "";
  position: absolute;
  inset: 3px 0;
  z-index: 0;
  border-radius: 8px;
  background: rgba(114, 224, 189, 0.06);
  pointer-events: none;
}

button.progress-step:focus-visible {
  outline: 2px solid rgba(114, 224, 189, 0.7);
  outline-offset: 2px;
}

.progress-step.latest {
  animation: progressStepLift 240ms ease-out;
}

.progress-step.latest::after {
  content: "";
  position: absolute;
  inset: 3px 0;
  z-index: 0;
  border-radius: 8px;
  background: rgba(114, 224, 189, 0.08);
  animation: progressItemFlash 920ms ease-out both;
  pointer-events: none;
}

.progress-step::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 10px;
  width: 1px;
  background: rgba(58, 70, 87, 0.76);
}

.progress-step:first-child::before {
  top: 14px;
}

.progress-step:last-child::before {
  bottom: calc(100% - 14px);
}

.progress-step + .progress-step {
  border-top: 1px solid rgba(58, 70, 87, 0.62);
}

.progress-dot {
  position: relative;
  z-index: 1;
  width: 10px;
  height: 10px;
  margin: 7px auto 0;
  border: 2px solid var(--line-strong);
  border-radius: 999px;
  background: #10161e;
}

.progress-step-body {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.progress-step-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.progress-step-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.progress-expand-indicator {
  min-height: 22px;
  border: 1px solid rgba(114, 224, 189, 0.24);
  border-radius: 999px;
  padding: 2px 8px;
  color: var(--accent-strong);
  background: rgba(48, 194, 155, 0.08);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  white-space: nowrap;
}

.progress-step strong,
.progress-step small,
.progress-status {
  display: block;
  overflow-wrap: anywhere;
}

.progress-step strong {
  font-size: 13px;
  line-height: 1.35;
}

.progress-step small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.progress-output {
  width: 100%;
  max-height: 172px;
  margin: 8px 0 0;
  border: 1px solid rgba(58, 70, 87, 0.86);
  border-radius: 8px;
  padding: 9px 10px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: #d7e3ee;
  background: rgba(16, 22, 30, 0.82);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.55;
}

.progress-status {
  position: relative;
  min-height: 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  color: var(--muted);
  background: #10161e;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  transition: border-color 180ms ease, color 180ms ease, background-color 180ms ease;
}

.progress-status::after {
  content: "";
  position: absolute;
  inset: -30% auto -30% -70%;
  width: 48%;
  opacity: 0;
  transform: skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.24), transparent);
  pointer-events: none;
}

.progress-step.started .progress-dot {
  border-color: #536273;
  background: #273241;
}

.progress-step.started .progress-status {
  border-color: rgba(155, 168, 183, 0.34);
  color: #c4ceda;
  background: rgba(155, 168, 183, 0.1);
}

.progress-step.running .progress-dot {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(48, 194, 155, 0.16);
  animation: progressDotPulse 1.25s ease-in-out infinite;
}

.progress-step.running .progress-status {
  border-color: rgba(48, 194, 155, 0.38);
  color: var(--accent-strong);
  background: rgba(48, 194, 155, 0.12);
}

.progress-step.running .progress-status::after {
  opacity: 1;
  animation: progressStatusSweep 1.65s linear infinite;
}

.progress-step.done .progress-dot {
  border-color: var(--accent-strong);
  background: rgba(114, 224, 189, 0.85);
}

.progress-step.done .progress-status {
  color: #b9e8d7;
}

.progress-step.done.latest .progress-dot {
  animation: progressDonePop 460ms ease-out;
}

.progress-step.warn .progress-dot {
  border-color: var(--amber);
  background: var(--amber);
}

.progress-step.warn .progress-status {
  border-color: rgba(226, 173, 84, 0.42);
  color: #f0c77e;
  background: rgba(226, 173, 84, 0.12);
}

.progress-step.error .progress-dot {
  border-color: var(--rose);
  background: var(--rose);
}

.progress-step.error .progress-status {
  border-color: rgba(237, 127, 155, 0.5);
  color: #ffb4c5;
  background: rgba(237, 127, 155, 0.12);
}

.progress-step.error.latest {
  animation: progressErrorShake 360ms ease-out;
}

.progress-step.error.latest::after {
  background: rgba(237, 127, 155, 0.1);
}

@keyframes progressStepLift {
  from { transform: translateY(3px); }
  to { transform: translateY(0); }
}

@keyframes progressItemFlash {
  0% { opacity: 0; transform: scaleX(0.98); }
  24% { opacity: 1; transform: scaleX(1); }
  100% { opacity: 0; transform: scaleX(1); }
}

@keyframes progressDotPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(48, 194, 155, 0.14); transform: scale(1); }
  50% { box-shadow: 0 0 0 8px rgba(48, 194, 155, 0); transform: scale(1.12); }
}

@keyframes progressStatusSweep {
  from { left: -70%; }
  to { left: 125%; }
}

@keyframes progressDonePop {
  0% { transform: scale(0.78); box-shadow: 0 0 0 0 rgba(114, 224, 189, 0.28); }
  55% { transform: scale(1.18); box-shadow: 0 0 0 8px rgba(114, 224, 189, 0); }
  100% { transform: scale(1); box-shadow: none; }
}

@keyframes progressErrorShake {
  0%, 100% { transform: translateX(0); }
  22% { transform: translateX(-3px); }
  44% { transform: translateX(3px); }
  66% { transform: translateX(-2px); }
  82% { transform: translateX(1px); }
}

@media (prefers-reduced-motion: reduce) {
  .progress-step,
  .progress-step.latest,
  .progress-step.running .progress-dot,
  .progress-step.running .progress-status::after,
  .progress-step.done.latest .progress-dot,
  .progress-step.error.latest,
  .progress-step.latest::after {
    animation: none;
  }
}

.stream-output h2,
.stream-output h3,
.stream-output h4 {
  margin: 14px 0 8px;
  line-height: 1.35;
}

.stream-output h2 { font-size: 20px; }
.stream-output h3,
.stream-output h4 { font-size: 16px; }
.stream-output p { margin: 0 0 10px; }
.stream-output ul { margin: 0 0 12px; padding-left: 20px; }
.stream-output li { margin: 4px 0; }
.stream-output a { color: var(--accent-strong); }

.structured-answer,
.evidence-grid,
.augment-plan,
.augment-candidates {
  display: grid;
  gap: 10px;
}

.structured-answer:not(:empty) {
  margin-bottom: 12px;
}

.answer-card,
.evidence-card,
.wiki-card {
  min-width: 0;
  padding: 12px;
  background: var(--surface-soft);
}

.wiki-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  text-align: left;
}

.champion-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
}

.champion-card.active {
  border-color: var(--accent);
  background: rgba(48, 194, 155, 0.09);
}

.champion-card strong,
.champion-card small,
.augment-wiki-card strong,
.augment-wiki-card small {
  display: block;
  overflow-wrap: anywhere;
}

.champion-card small {
  margin: 2px 0 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.wiki-detail {
  display: grid;
  gap: 12px;
  padding: 14px;
  height: 100%;
  min-height: 0;
  overflow: auto;
  align-content: start;
}

.detail-hero,
.ability-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.detail-avatar {
  width: 72px;
  height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d131a;
  object-fit: cover;
}

.detail-hero h2 span,
.ability-card h3 span,
.augment-wiki-card h3 span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.detail-blurb {
  margin: 0;
  color: #c4ceda;
  line-height: 1.7;
}

.stat-strip,
.ability-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px 8px;
  color: #c7d1dd;
  background: #10161e;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.stat-chip strong {
  color: var(--muted);
}

.ability-grid {
  display: grid;
  gap: 10px;
}

.ability-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
}

.ability-card p,
.augment-wiki-card p {
  margin: 8px 0;
  color: #c4ceda;
  line-height: 1.65;
}

.ability-card ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: #c4ceda;
  line-height: 1.6;
}

.ability-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d131a;
  color: var(--accent-strong);
  object-fit: cover;
  font-weight: 900;
}

.compact-list {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  color: #c4ceda;
  font-size: 12px;
  line-height: 1.5;
}

.compact-list strong {
  color: var(--accent-strong);
}

.scaling-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.scaling-list strong {
  width: 100%;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.scaling-note {
  margin-left: 6px;
  font-size: 10px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
}

.ratio-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 2px 8px;
  color: var(--accent-strong);
  background: rgba(46, 126, 255, 0.08);
  font-size: 12px;
  font-weight: 600;
}

.champion-scaling {
  margin: 8px 0 4px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #10161e;
}

.answer-card ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: #c4ceda;
  line-height: 1.65;
}

.answer-summary p {
  margin: 8px 0 0;
  color: #d7e0ea;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.answer-summary-body > :first-child {
  margin-top: 0;
}

.answer-summary-body p {
  margin: 0 0 10px;
  color: #d7e0ea;
  line-height: 1.78;
  overflow-wrap: anywhere;
}

.answer-summary-body p:last-child {
  margin-bottom: 0;
}

.answer-summary-body ul {
  margin: 8px 0;
  padding-left: 20px;
  color: #d7e0ea;
  line-height: 1.7;
}

.answer-summary-body li {
  margin: 4px 0;
}

.answer-summary-body strong {
  color: var(--accent-strong);
  font-weight: 800;
}

.answer-summary-body h3,
.answer-summary-body h4 {
  margin: 12px 0 6px;
  font-size: 15px;
}

.recommendation-row {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 10px;
}

.recommendation-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.recommendation-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.recommendation-head h4 {
  margin: 0;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.augment-plan-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(260px, 1.3fr);
  gap: 10px;
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.augment-plan-row h4 {
  margin: 7px 0 4px;
  font-size: 14px;
}

.augment-plan-row p,
.evidence-card p,
.muted {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.augment-candidate {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
}

button.augment-candidate {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 4px;
  color: inherit;
  background: rgba(16, 22, 30, 0.22);
  font: inherit;
  text-align: left;
  cursor: help;
}

button.augment-candidate:hover,
button.augment-candidate:focus-visible {
  background: rgba(114, 224, 189, 0.08);
  outline: 2px solid rgba(114, 224, 189, 0.55);
  outline-offset: 1px;
}

.augment-candidate strong,
.augment-candidate small {
  display: block;
  overflow-wrap: anywhere;
}

.augment-candidate small {
  margin: 2px 0 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.avatar,
.augment-icon {
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d131a;
  object-fit: cover;
}

.augment-candidate .augment-icon {
  width: 40px;
  height: 40px;
}

.inline-augment {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 2px 4px;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: help;
  vertical-align: middle;
}

button.inline-augment:hover,
button.inline-augment:focus-visible {
  background: rgba(114, 224, 189, 0.08);
  outline: 2px solid rgba(114, 224, 189, 0.55);
  outline-offset: 1px;
}

.inline-augment .augment-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.tag-row {
  flex-wrap: wrap;
  gap: 7px;
}

.tag {
  min-height: 24px;
  border-color: var(--line);
  color: #c7d1dd;
  background: #10161e;
}

.source-tag {
  color: var(--accent-strong);
  background: rgba(48, 194, 155, 0.1);
}

.evidence-card h3,
.answer-card h3 {
  overflow-wrap: anywhere;
}

.evidence-card a {
  color: var(--accent-strong);
  overflow-wrap: anywhere;
  word-break: break-all;
}

.hover-detail {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  width: min(360px, calc(100vw - 32px));
  max-height: min(560px, calc(100vh - 32px));
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 14px;
  background: #111820;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.46);
  pointer-events: none;
}

.hover-detail[hidden] {
  display: none;
}

/* 详情浮层内部复用 .augment-detail-* 结构样式。 */
.augment-detail-head {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.augment-detail-head h3 {
  margin: 6px 0 3px;
  font-size: 18px;
}

.augment-detail-head small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.augment-detail-icon {
  width: 56px;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d131a;
  object-fit: cover;
}

.hover-detail p {
  margin: 10px 0 0;
  color: #c4ceda;
  line-height: 1.65;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.augment-detail-reason {
  color: var(--accent-strong);
}

.item-plaintext {
  color: var(--muted);
  font-size: 13px;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(114, 224, 189, 0.54) rgba(16, 22, 30, 0.42);
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  border-radius: 8px;
  background: rgba(16, 22, 30, 0.42);
}

*::-webkit-scrollbar-thumb {
  min-height: 40px;
  border: 2px solid rgba(16, 22, 30, 0.42);
  border-radius: 8px;
  background: rgba(114, 224, 189, 0.46);
  background-clip: padding-box;
}

@media (max-width: 720px) {
  .app-shell { padding: 14px; }

  .topbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .brand { align-items: flex-start; }
  .brand-mark { width: 44px; height: 44px; }
  h1 { font-size: 24px; }
  .advisor-command-row { grid-template-columns: 1fr; }
  .query-actions { justify-content: stretch; }
  .primary-button { width: 100%; }
  .augment-plan-row { grid-template-columns: 1fr; }
  .wiki-toolbar { grid-template-columns: 1fr; }
  .wiki-layout { grid-template-columns: 1fr; }
  .wiki-view { height: auto; grid-template-rows: none; }
  .wiki-list,
  .wiki-detail,
  .augment-library { height: auto; max-height: none; overflow: visible; }
  .augment-library { grid-template-columns: 1fr; }
}

/* ── 卡片炫光效果（鼠标跟随）──────────────────────────────────────────
   移植自 kesmj。通过 JS 写入 --shine-x/--shine-y 等自定义属性，::after 渲染
   彩虹 + 径向高光层，::before 渲染柔光层，鼠标离开时 --shine-opacity 归零淡出。 */
.answer-card,
.evidence-card,
.wiki-card,
.ability-card {
  --shine-opacity: 0;
  --shine-x: 50%;
  --shine-y: 50%;
  --shine-background-x: 50%;
  --shine-background-y: 50%;
  --shine-from-center: 0;
  --shine-layer-opacity: 0.3;
  --shine-glare-opacity: 0.24;
  --shine-space: 5%;
  --shine-angle: 133deg;
  --shine-imgsize: 20%;
  --shine-sunpillar-1: hsl(2deg, 100%, 73%);
  --shine-sunpillar-2: hsl(53deg, 100%, 69%);
  --shine-sunpillar-3: hsl(93deg, 100%, 69%);
  --shine-sunpillar-4: hsl(176deg, 100%, 76%);
  --shine-sunpillar-5: hsl(228deg, 100%, 74%);
  --shine-sunpillar-6: hsl(283deg, 100%, 73%);
  position: relative;
  isolation: isolate;
}

.answer-card::after,
.evidence-card::after,
.wiki-card::after,
.ability-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  pointer-events: none;
  opacity: calc(var(--shine-opacity) * var(--shine-layer-opacity));
  background-image:
    repeating-linear-gradient(
      0deg,
      var(--shine-sunpillar-1) calc(var(--shine-space) * 1),
      var(--shine-sunpillar-2) calc(var(--shine-space) * 2),
      var(--shine-sunpillar-3) calc(var(--shine-space) * 3),
      var(--shine-sunpillar-4) calc(var(--shine-space) * 4),
      var(--shine-sunpillar-5) calc(var(--shine-space) * 5),
      var(--shine-sunpillar-6) calc(var(--shine-space) * 6),
      var(--shine-sunpillar-1) calc(var(--shine-space) * 7)
    ),
    repeating-linear-gradient(
      var(--shine-angle),
      #0e152e 0%,
      hsl(180deg 10% 60%) 3.8%,
      hsl(180deg 29% 66%) 4.5%,
      hsl(180deg 10% 60%) 5.2%,
      #0e152e 10%,
      #0e152e 12%
    ),
    radial-gradient(
      farthest-corner circle at var(--shine-x) var(--shine-y),
      rgba(255, 255, 255, 0.34) 0%,
      rgba(255, 255, 255, 0.14) 16%,
      rgba(0, 0, 0, 0.08) 52%,
      rgba(0, 0, 0, 0.28) 120%
    );
  background-position:
    center center,
    0% var(--shine-background-y),
    calc(var(--shine-background-x) + (var(--shine-background-y) * 0.2)) var(--shine-background-y),
    var(--shine-x) var(--shine-y);
  background-size:
    var(--shine-imgsize),
    200% 700%,
    300% 100%,
    200% 100%;
  background-blend-mode: color-burn, hue, hard-light, screen;
  filter: brightness(calc((var(--shine-from-center) * 0.06) + 0.7)) contrast(1.55) saturate(1.24);
  mix-blend-mode: color-dodge;
  transition:
    opacity 0.28s ease,
    background-position 0.36s ease,
    filter 0.28s ease;
}

.answer-card::before,
.evidence-card::before,
.wiki-card::before,
.ability-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  pointer-events: none;
  opacity: calc(var(--shine-opacity) * var(--shine-glare-opacity));
  background-image: radial-gradient(
    farthest-corner circle at var(--shine-x) var(--shine-y),
    hsl(0deg, 0%, 75%) 5%,
    hsl(200deg, 5%, 35%) 60%,
    hsl(320deg, 40%, 10%) 150%
  );
  background-position: center center;
  background-size: 170% 170%;
  filter: brightness(1.5) contrast(1.4) saturate(1);
  mix-blend-mode: multiply;
  transition:
    opacity 0.28s ease,
    background-position 0.36s ease;
}

.answer-card > *,
.evidence-card > *,
.wiki-card > *,
.ability-card > * {
  position: relative;
  z-index: 2;
}

.wiki-card:hover,
.ability-card:hover {
  border-color: color-mix(in srgb, var(--accent-strong) 54%, var(--line));
}

@media (prefers-reduced-motion: reduce) {
  .answer-card::after,
  .evidence-card::after,
  .wiki-card::after,
  .ability-card::after,
  .answer-card::before,
  .evidence-card::before,
  .wiki-card::before,
  .ability-card::before {
    display: none;
  }
}
