:root {
  --bg: #030711;
  --panel: rgba(8, 18, 33, .78);
  --panel-solid: #081221;
  --panel-soft: rgba(25, 31, 54, .82);
  --text: #f4faff;
  --muted: #8fa9c4;
  --line: rgba(88, 180, 255, .22);
  --blue: #3d7cff;
  --cyan: #19e6ff;
  --green: #31f7b6;
  --violet: #8d63ff;
  --yellow: #ffd166;
  --red: #ff4f7b;
  --shadow: 0 28px 90px rgba(0, 0, 0, .48);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Microsoft JhengHei", "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 50% 0%, rgba(25, 230, 255, .12), transparent 28%),
    radial-gradient(circle at 80% 10%, rgba(141, 99, 255, .12), transparent 24%),
    linear-gradient(135deg, #030711 0%, #07111f 46%, #06091b 100%);
  overflow-x: hidden;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(25,230,255,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25,230,255,.055) 1px, transparent 1px),
    linear-gradient(115deg, transparent 0%, rgba(25,230,255,.075) 48%, transparent 54%);
  background-size: 42px 42px, 42px 42px, 260px 100%;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), transparent 88%);
  opacity: .48;
  animation: gridDrift 24s linear infinite;
}

.bg-grid::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle, rgba(25, 230, 255, .5) 0 1px, transparent 2px) 12% 18%/170px 170px,
    radial-gradient(circle, rgba(141, 99, 255, .46) 0 1px, transparent 2px) 70% 22%/210px 210px,
    radial-gradient(circle, rgba(49, 247, 182, .36) 0 1px, transparent 2px) 46% 72%/190px 190px;
  opacity: .2;
}

@keyframes gridDrift {
  from { background-position: 0 0, 0 0, -260px 0; }
  to { background-position: 42px 42px, 42px 42px, 260px 0; }
}

button, input, select { font: inherit; }
button {
  border: 0;
  border-radius: 999px;
  min-height: 44px;
  padding: 0 18px;
  color: #020b13;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(25, 230, 255, .18);
}
button:disabled { opacity: .45; cursor: not-allowed; }
input, select {
  width: 100%;
  min-height: 54px;
  padding: 0 20px;
  color: var(--text);
  background: rgba(3, 10, 20, .72);
  border: 1px solid rgba(88, 180, 255, .25);
  border-radius: 999px;
  outline: none;
  box-shadow: inset 0 0 22px rgba(0, 0, 0, .28);
}
input:focus, select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(53, 216, 255, .12);
}

.app-shell {
  position: relative;
  width: min(520px, calc(100% - 28px));
  margin: 0 auto;
  padding: 22px 0 46px;
}
.top-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  margin-bottom: 18px;
  font-size: 12px;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 18, 33, .58);
  box-shadow: 0 0 26px rgba(25, 230, 255, .09);
}
.status-pill span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 16px var(--green);
}
.workspace { display: grid; gap: 16px; }
.hidden { display: none !important; }
.brand-block {
  padding: 10px 0 16px;
  text-align: center;
  position: relative;
}
.brand-block::before {
  content: "DATA MATRIX";
  position: absolute;
  left: 50%;
  top: -4px;
  transform: translateX(-50%);
  color: rgba(244, 250, 255, .045);
  font-size: clamp(42px, 18vw, 88px);
  font-weight: 1000;
  letter-spacing: 8px;
  white-space: nowrap;
  pointer-events: none;
}
.logo-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(25,230,255,.95), rgba(141,99,255,.95)),
    radial-gradient(circle at top left, white, transparent 34%);
  color: white;
  font-size: 22px;
  font-weight: 1000;
  box-shadow: 0 0 34px rgba(25, 230, 255, .32), 0 18px 54px rgba(0, 0, 0, .35);
  position: relative;
}
.logo-mark::before, .logo-mark::after {
  content: "";
  position: absolute;
  inset: -10px;
  border: 1px solid rgba(25, 230, 255, .22);
  border-radius: 12px;
}
.logo-mark::after {
  inset: -18px;
  border-color: rgba(141, 99, 255, .18);
}
.eyebrow {
  margin: 0 0 6px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 2px;
}
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(32px, 6vw, 58px); }
h1 { font-size: clamp(34px, 11vw, 48px); }
.brand-block h1 {
  position: relative;
  display: inline-block;
  color: #f8fdff;
  background: linear-gradient(105deg, #f8fdff 0%, #f8fdff 22%, #23f1ff 36%, #ffffff 46%, #8d63ff 58%, #35ffd0 72%, #f8fdff 100%);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 18px rgba(25, 230, 255, .24), 0 0 34px rgba(141, 99, 255, .20);
  filter: drop-shadow(0 0 14px rgba(25, 230, 255, .18));
  animation: titleLightRun 4.8s linear infinite, titleGlowBreath 2.8s ease-in-out infinite;
}

.brand-block h1::after {
  content: "";
  position: absolute;
  inset: -8px -14px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, rgba(25, 230, 255, .08) 34%, rgba(255, 255, 255, .36) 48%, rgba(141, 99, 255, .12) 62%, transparent 100%);
  transform: translateX(-130%) skewX(-16deg);
  mix-blend-mode: screen;
  animation: titleScanBeam 3.6s ease-in-out infinite;
}

@keyframes titleLightRun {
  0% { background-position: 0% 50%; }
  100% { background-position: 260% 50%; }
}

@keyframes titleGlowBreath {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(25, 230, 255, .16)); }
  50% { filter: drop-shadow(0 0 24px rgba(25, 230, 255, .38)); }
}

@keyframes titleScanBeam {
  0%, 18% { transform: translateX(-130%) skewX(-16deg); opacity: 0; }
  36% { opacity: .85; }
  58%, 100% { transform: translateX(130%) skewX(-16deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .brand-block h1,
  .brand-block h1::after {
    animation: none;
  }
}
h2 { margin-bottom: 0; font-size: 20px; }
h3 { margin-bottom: 12px; font-size: 20px; }
.subtitle, .message { color: var(--muted); line-height: 1.7; }
.brand-block .subtitle {
  max-width: 620px;
  display: grid;
  gap: 4px;
  margin: 0 auto;
  padding: 0 18px;
  font-size: 14px;
  line-height: 1.65;
  letter-spacing: .2px;
}
.brand-block .subtitle span {
  display: block;
  white-space: nowrap;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 16px 50px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.045);
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}
.panel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--violet), transparent);
}
.panel::after {
  content: none;
}
.panel > * { position: relative; z-index: 1; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.form-grid .panel-head {
  justify-content: center;
  text-align: center;
  padding-top: 4px;
  margin: 4px 0 2px;
}
.form-grid .panel-head::before,
.form-grid .panel-head::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, rgba(143,169,196,.18));
}
.form-grid .panel-head::after {
  background: linear-gradient(90deg, rgba(143,169,196,.18), transparent);
}
.form-grid .panel-head .eyebrow { display: none; }
.form-grid .panel-head h2 {
  min-width: 120px;
  color: var(--muted);
  font-size: 15px;
  letter-spacing: 1px;
}
.state-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--yellow);
  background: rgba(255, 209, 102, .12);
  border: 1px solid rgba(255,209,102,.22);
  font-weight: 900;
  font-size: 13px;
}
.state-badge.success { color: var(--green); background: rgba(51, 224, 161, .12); }
.field-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}
.license-row input {
  min-width: 0;
}
.license-row button {
  min-width: 112px;
  min-height: 58px;
}
.field-row label {
  grid-column: 1 / -1;
}
label { color: var(--muted); font-weight: 800; font-size: 13px; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.field { display: grid; gap: 9px; }
.field label,
.field-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.field label::before,
.field-row label::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}
.wide { grid-column: 1 / -1; }
.submit-btn { width: 100%; min-height: 64px; font-size: 18px; border-radius: 999px; margin-top: 10px; }
.submit-btn:disabled {
  background: linear-gradient(135deg, rgba(45, 61, 92, .88), rgba(28, 38, 58, .92));
  color: #9fb0c5;
  box-shadow: inset 0 0 0 1px rgba(143,169,196,.16);
}
.ghost-btn {
  color: var(--text);
  background: rgba(8, 18, 33, .55);
  border: 1px solid var(--line);
  box-shadow: none;
}
#resetConfigBtn {
  display: none;
}
.analysis-core {
  min-height: 78vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 22px 0 10px;
}
.analysis-core::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 0%, rgba(25,230,255,.055) 50%, transparent 100%),
    repeating-linear-gradient(180deg, rgba(255,255,255,.025) 0 1px, transparent 1px 7px);
  mix-blend-mode: screen;
  animation: scanSweep 2.8s linear infinite;
}
.analysis-core::after {
  content: "";
  position: absolute;
  width: min(86vw, 520px);
  height: min(86vw, 520px);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(25,230,255,.18), transparent 18%),
    radial-gradient(circle, rgba(141,99,255,.12), transparent 48%);
  filter: blur(22px);
  opacity: .72;
  z-index: -1;
}
@keyframes scanSweep {
  from { transform: translateY(-18%); }
  to { transform: translateY(18%); }
}
.neural-core {
  position: relative;
  width: 236px;
  height: 236px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  isolation: isolate;
  filter: drop-shadow(0 0 30px rgba(25,230,255,.2));
}
.neural-core::before,
.neural-core::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.neural-core::before {
  width: 194px;
  height: 194px;
  background:
    radial-gradient(circle, rgba(25,230,255,.18), transparent 40%),
    conic-gradient(from 120deg, transparent 0 9%, rgba(25,230,255,.78) 10% 20%, transparent 21% 39%, rgba(141,99,255,.78) 40% 50%, transparent 51% 74%, rgba(49,247,182,.72) 75% 84%, transparent 85%);
  mask: radial-gradient(circle, transparent 58%, #000 59%);
  animation: coreOrbit 6s linear infinite;
  opacity: .95;
}
.neural-core::after {
  width: 116px;
  height: 116px;
  background:
    radial-gradient(circle at center, rgba(25,230,255,.1), transparent 55%),
    conic-gradient(from 180deg, rgba(49,247,182,.62), transparent 24%, rgba(25,230,255,.34), transparent 58%, rgba(141,99,255,.44), transparent 84%);
  mask: radial-gradient(circle, transparent 62%, #000 63%);
  box-shadow: 0 0 30px rgba(49,247,182,.12);
  animation: coreOrbitReverse 4.8s linear infinite;
}
.core-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  border: 2px solid transparent;
  transform: translate(-50%, -50%);
  transform-origin: center;
  pointer-events: none;
}
.ring-a {
  width: 220px;
  height: 220px;
  border-top-color: rgba(25,230,255,.9);
  border-right-color: rgba(25,230,255,.22);
  border-bottom-color: rgba(49,247,182,.12);
  box-shadow: inset 0 0 28px rgba(25,230,255,.08);
  filter: drop-shadow(0 0 10px rgba(25,230,255,.58));
  animation: ringOrbitA 4.2s linear infinite;
}
.ring-b {
  width: 168px;
  height: 168px;
  border-left-color: rgba(141,99,255,.82);
  border-bottom-color: rgba(141,99,255,.42);
  border-top-color: rgba(25,230,255,.18);
  filter: drop-shadow(0 0 10px rgba(141,99,255,.52));
  animation: ringOrbitB 3.3s linear infinite;
}
.ring-c {
  width: 120px;
  height: 120px;
  border-right-color: rgba(49,247,182,.72);
  border-bottom-color: rgba(49,247,182,.36);
  filter: drop-shadow(0 0 9px rgba(49,247,182,.46));
  animation: ringOrbitC 5.2s linear infinite;
}
.core-pulse {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 20px;
  background:
    radial-gradient(circle at 28% 18%, rgba(255,255,255,.38), transparent 28%),
    linear-gradient(135deg, var(--cyan), var(--blue), var(--violet));
  box-shadow:
    0 0 44px rgba(25,230,255,.36),
    0 0 80px rgba(141,99,255,.18),
    inset 0 1px 0 rgba(255,255,255,.22);
  font-size: 29px;
  font-weight: 1000;
  transform: translate(-50%, -50%);
  animation: pulseCore 1.9s ease-in-out infinite alternate;
  z-index: 3;
}
.core-nodes i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 14px var(--cyan);
  z-index: 2;
}
.core-nodes i:nth-child(1) { transform: translate(-50%, -50%) rotate(18deg) translateX(96px); }
.core-nodes i:nth-child(2) { transform: translate(-50%, -50%) rotate(74deg) translateX(94px); background: var(--violet); box-shadow: 0 0 14px var(--violet); }
.core-nodes i:nth-child(3) { transform: translate(-50%, -50%) rotate(138deg) translateX(92px); background: var(--green); box-shadow: 0 0 14px var(--green); }
.core-nodes i:nth-child(4) { transform: translate(-50%, -50%) rotate(218deg) translateX(95px); }
.core-nodes i:nth-child(5) { transform: translate(-50%, -50%) rotate(286deg) translateX(96px); background: var(--violet); box-shadow: 0 0 14px var(--violet); }
.core-nodes i:nth-child(6) { transform: translate(-50%, -50%) rotate(326deg) translateX(80px); background: var(--green); box-shadow: 0 0 14px var(--green); }
@keyframes ringOrbitA {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}
@keyframes ringOrbitB {
  to { transform: translate(-50%, -50%) rotate(-360deg); }
}
@keyframes ringOrbitC {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}
@keyframes coreOrbit {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}
@keyframes coreOrbitReverse {
  to { transform: translate(-50%, -50%) rotate(-360deg); }
}
@keyframes coreBreath {
  0%, 100% { transform: scale(.96); opacity: .7; }
  50% { transform: scale(1.08); opacity: 1; }
}
@keyframes pulseCore {
  from { transform: translate(-50%, -50%) scale(.96); filter: brightness(.95); }
  to { transform: translate(-50%, -50%) scale(1.05); filter: brightness(1.18); }
}
.analysis-core h2 {
  margin: 2px 0 0;
  color: #9a8cff;
  font-size: 32px;
  text-shadow: 0 0 20px rgba(141,99,255,.28);
}
.analysis-core p {
  color: var(--muted);
  font-weight: 700;
}
.progress {
  width: min(430px, 82vw);
  height: 18px;
  position: relative;
  border-radius: 999px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.04)),
    rgba(3, 7, 17, .82);
  border: 1px solid rgba(88,180,255,.24);
  box-shadow: inset 0 0 18px rgba(0,0,0,.46), 0 0 22px rgba(25,230,255,.08);
}
.progress::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: inherit;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.12) 0 1px, transparent 1px 42px);
  opacity: .35;
  pointer-events: none;
}
.progress::after {
  content: "";
  position: absolute;
  top: -45%;
  bottom: -45%;
  left: -30%;
  width: 32%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.34), transparent);
  transform: skewX(-18deg);
  animation: progressScan 2.8s linear infinite;
  pointer-events: none;
}
.progress div {
  width: 0%;
  height: 100%;
  position: relative;
  border-radius: inherit;
  background:
    linear-gradient(90deg, #7f75ff 0%, #8d63ff 24%, #2f8cff 46%, var(--cyan) 68%, var(--green) 100%),
    repeating-linear-gradient(115deg, rgba(255,255,255,.18) 0 8px, transparent 8px 18px);
  background-blend-mode: screen;
  background-size: 220% 100%, 42px 42px;
  transition: width .62s cubic-bezier(.33, 1, .68, 1);
  box-shadow:
    0 0 28px rgba(25,230,255,.5),
    0 0 46px rgba(141,99,255,.24),
    inset 0 0 12px rgba(255,255,255,.18);
  animation: progressFlow 3.2s linear infinite, progressPulse 3.8s ease-in-out infinite;
}
.progress div::after {
  content: "";
  position: absolute;
  right: -7px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, white 0 16%, var(--cyan) 17% 45%, transparent 48%);
  box-shadow: 0 0 18px var(--cyan), 0 0 30px rgba(49,247,182,.45);
}
#progressText {
  color: var(--cyan);
  font-size: 26px;
  text-shadow: 0 0 16px rgba(25,230,255,.32);
}
@keyframes progressFlow {
  from { background-position: 0 0, 0 0; }
  to { background-position: 220% 0, 42px 0; }
}
@keyframes progressScan {
  to { left: 110%; }
}
@keyframes progressPulse {
  0%, 100% { filter: saturate(1) brightness(1); }
  50% { filter: saturate(1.28) brightness(1.12); }
}
.terminal-log {
  width: min(430px, 88vw);
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(3, 7, 17, .74);
  border: 1px solid rgba(143,169,196,.18);
  color: var(--cyan);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 12px;
  text-align: left;
  box-shadow: inset 0 0 26px rgba(25,230,255,.04);
}
.result-hero {
  text-align: center;
  padding: 10px 0 4px;
}
.success-mark {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 50%;
  color: white;
  font-size: 38px;
  font-weight: 1000;
  background: linear-gradient(135deg, var(--cyan), #27d3cb);
  box-shadow: 0 0 34px rgba(25,230,255,.28);
}
.result-hero h2 {
  font-size: 28px;
  margin-bottom: 8px;
}
.result-hero p {
  color: var(--muted);
  font-size: 13px;
}
.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: stretch;
}
.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(143,169,196,.16);
  color: var(--text);
  font-size: 15px;
}
.card-title::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
}
.panel-subtitle {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.info-list { display: grid; gap: 10px; }
.info-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 7px 0;
  border-radius: 8px;
  background: transparent;
  border: 0;
  font-size: 12px;
}
.info-row span:first-child { color: var(--muted); }
.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.metric {
  min-height: 88px;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 12px;
  border-radius: 8px;
  background: rgba(31, 38, 64, .72);
  border: 1px solid var(--line);
  text-align: center;
}
.metric span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.metric strong { font-size: 22px; color: var(--cyan); }
#recommendationMeta {
  display: none;
}
.table-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.table-card {
  --room: var(--green);
  --room-rgb: 49, 247, 182;
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr;
  grid-template-areas:
    "rank main"
    "rank score"
    "rank reason";
  align-items: center;
  gap: 6px 12px;
  min-height: 78px;
  padding: 10px 46px 10px 12px;
  border-radius: 8px;
  background: rgba(31, 38, 64, .72);
  border: 1px solid rgba(var(--room-rgb), .2);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.table-card.room-gold {
  --room: #ffd400;
  --room-rgb: 255, 212, 0;
}
.table-card.room-green {
  --room: var(--green);
  --room-rgb: 49, 247, 182;
}
.table-card.room-cyan {
  --room: var(--cyan);
  --room-rgb: 25, 230, 255;
}
.table-card.room-blue {
  --room: #91a7ff;
  --room-rgb: 145, 167, 255;
}
.table-card:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--room-rgb), .58);
  box-shadow: 0 18px 50px rgba(var(--room-rgb), .12);
}
.room-no {
  grid-area: rank;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7768d8, #5d78ff);
  border: 0;
}
.room-no span { display: none; }
.room-no strong {
  font-size: 13px;
  line-height: 1;
}
.table-card .tier {
  grid-area: main;
  color: var(--text);
  font-weight: 900;
  font-size: 14px;
  line-height: 1.35;
  min-width: 0;
  overflow-wrap: anywhere;
}
.table-card meter { display: none; }
.score-box {
  grid-area: score;
  display: inline-flex;
  width: auto;
  height: auto;
  place-items: initial;
  align-content: initial;
  justify-content: flex-start;
  gap: 5px;
  border: 0;
  background: transparent;
}
.score-box span { display: none; }
.score-box strong {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  color: var(--room);
  background: rgba(var(--room-rgb), .12);
  border: 1px solid rgba(var(--room-rgb), .42);
  white-space: nowrap;
}
.table-card .reason {
  grid-area: reason;
  display: block;
  padding-left: 0;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  min-width: 0;
  overflow-wrap: anywhere;
}
.table-card::after {
  content: "›";
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: rgba(226, 241, 255, .9);
  background:
    radial-gradient(circle at 35% 28%, rgba(255,255,255,.2), transparent 34%),
    rgba(var(--room-rgb), .12);
  border: 1px solid rgba(var(--room-rgb), .18);
  box-shadow: 0 0 0 rgba(var(--room-rgb), 0);
  font-size: 20px;
  line-height: 1;
  animation: arrowPulse 1.7s ease-in-out infinite;
}
.recommendation-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.mini-action {
  min-height: 32px;
  padding: 0 12px;
  color: var(--cyan);
  background: rgba(25, 230, 255, .09);
  border: 1px solid rgba(25,230,255,.32);
  box-shadow: 0 0 18px rgba(25,230,255,.08);
  font-size: 12px;
  white-space: nowrap;
}
.mini-action:hover {
  color: #03121b;
  background: linear-gradient(135deg, var(--cyan), var(--green));
}
.mini-action:disabled {
  cursor: not-allowed;
  color: var(--muted);
  background: rgba(31, 38, 64, .58);
  border-color: rgba(143,169,196,.18);
  box-shadow: none;
  opacity: .72;
}
.composite-evaluation {
  --room: #ffd400;
  --room-rgb: 255, 212, 0;
  margin-top: 6px;
}
.composite-evaluation.theme-green {
  --room: var(--green);
  --room-rgb: 49, 247, 182;
}
.composite-evaluation.theme-cyan {
  --room: var(--cyan);
  --room-rgb: 25, 230, 255;
}
.composite-evaluation.theme-blue {
  --room: #91a7ff;
  --room-rgb: 145, 167, 255;
}
.composite-card {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 26px 18px 20px;
  position: relative;
  border-radius: 18px;
  border: 1px solid rgba(var(--room-rgb), .58);
  background:
    radial-gradient(circle at 50% 16%, rgba(var(--room-rgb), .25), transparent 32%),
    radial-gradient(circle at 8% 30%, rgba(var(--room-rgb), .09), transparent 24%),
    repeating-linear-gradient(180deg, rgba(255,255,255,.018) 0 1px, transparent 1px 9px),
    linear-gradient(180deg, rgba(45, 43, 54, .92), rgba(37, 38, 52, .96));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 34px rgba(var(--room-rgb), .14);
  overflow: hidden;
}
.composite-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(var(--room-rgb), .08), transparent),
    radial-gradient(circle at 92% 10%, rgba(25,230,255,.12), transparent 26%);
  mix-blend-mode: screen;
  animation: compositePanelSweep 4.5s ease-in-out infinite;
}
.composite-score-ring {
  width: 124px;
  height: 124px;
  display: grid;
  place-items: center;
  align-content: center;
  position: relative;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(31, 32, 47, .96) 54%, transparent 55%),
    conic-gradient(from 215deg, var(--room) var(--score-deg, 330deg), rgba(255,255,255,.1) 0);
  box-shadow:
    0 0 34px rgba(var(--room-rgb), .36),
    0 0 74px rgba(var(--room-rgb), .14),
    inset 0 0 22px rgba(0,0,0,.4);
  isolation: isolate;
  animation: compositeRingBreath 2.4s ease-in-out infinite;
}
.composite-score-ring::before,
.composite-score-ring::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.composite-score-ring::before {
  inset: -10px;
  background:
    conic-gradient(from 0deg, transparent 0 13%, rgba(var(--room-rgb), .88) 14% 22%, transparent 23% 50%, rgba(25,230,255,.42) 51% 58%, transparent 59%);
  mask: radial-gradient(circle, transparent 61%, #000 62%);
  filter: drop-shadow(0 0 12px rgba(var(--room-rgb), .72));
  animation: compositeRingScan 3.2s linear infinite;
  z-index: -1;
}
.composite-score-ring::after {
  inset: 14px;
  background:
    radial-gradient(circle, rgba(var(--room-rgb), .16), transparent 58%),
    conic-gradient(from 180deg, rgba(25,230,255,.44), transparent 24%, rgba(var(--room-rgb), .48), transparent 70%);
  mask: radial-gradient(circle, transparent 70%, #000 71%);
  opacity: .82;
  animation: compositeInnerScan 2.2s linear infinite reverse;
  z-index: 0;
}
.composite-score-ring strong {
  position: relative;
  z-index: 1;
  color: var(--room);
  font-size: 42px;
  line-height: 1;
  text-shadow:
    0 0 12px rgba(var(--room-rgb), .7),
    0 0 30px rgba(var(--room-rgb), .34);
  animation: compositeScorePulse 1.8s ease-in-out infinite;
}
.composite-score-ring span {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.composite-mode {
  width: min(420px, 100%);
  display: grid;
  justify-items: center;
  gap: 7px;
  text-align: center;
}
.composite-mode i {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  position: relative;
  border-radius: 50%;
  color: var(--room);
  background: rgba(var(--room-rgb), .14);
  border: 1px solid rgba(var(--room-rgb), .36);
  font-style: normal;
  font-weight: 1000;
  box-shadow: 0 0 22px rgba(var(--room-rgb), .22);
  animation: compositeNodePulse 2s ease-in-out infinite;
}
.composite-mode i::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: inherit;
  border: 1px solid rgba(var(--room-rgb), .25);
  opacity: .75;
  animation: compositeNodeHalo 2s ease-in-out infinite;
}
.composite-mode span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}
.composite-mode strong {
  color: var(--room);
  font-size: 15px;
}
.composite-mode p {
  margin: 6px 0 0;
  color: #c8d5e1;
  font-size: 13px;
  line-height: 1.75;
  text-align: left;
  text-wrap: pretty;
  word-break: normal;
  overflow-wrap: break-word;
}
.composite-card-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}
.composite-mini {
  min-width: 0;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(31, 38, 64, .68);
  border: 1px solid rgba(143,169,196,.18);
}
.composite-mini h4 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  border-bottom: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  white-space: nowrap;
}
.composite-mini h4 i {
  color: var(--room);
  font-style: normal;
}
.composite-mini ul {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 9px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #c8d5e1;
  font-size: 12px;
  line-height: 1.45;
}
.composite-mini li {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 1 1 150px;
  word-break: normal;
  overflow-wrap: break-word;
  text-align: left;
}
.composite-mini li::before {
  content: "›";
  color: var(--room);
  font-weight: 1000;
  line-height: 1;
}
@keyframes compositeRingBreath {
  0%, 100% {
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.045);
    filter: brightness(1.18) saturate(1.18);
  }
}
@keyframes compositeRingScan {
  to { transform: rotate(360deg); }
}
@keyframes compositeInnerScan {
  to { transform: rotate(360deg); }
}
@keyframes compositeScorePulse {
  0%, 100% {
    transform: translateY(0);
    opacity: .92;
  }
  50% {
    transform: translateY(-1px);
    opacity: 1;
  }
}
@keyframes compositeNodePulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 18px rgba(var(--room-rgb), .2);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 28px rgba(var(--room-rgb), .45);
  }
}
@keyframes compositeNodeHalo {
  0%, 100% {
    transform: scale(.86);
    opacity: .25;
  }
  50% {
    transform: scale(1.22);
    opacity: .82;
  }
}
@keyframes compositePanelSweep {
  0%, 100% { opacity: .42; transform: translateX(-14%); }
  50% { opacity: .9; transform: translateX(14%); }
}
@keyframes arrowPulse {
  0%, 100% {
    opacity: .62;
    box-shadow: 0 0 0 rgba(var(--room-rgb), 0);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 18px rgba(var(--room-rgb), .34);
  }
}
.warning-strip {
  display: grid;
  gap: 4px;
  padding: 15px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 164, 27, .42);
  background: rgba(42, 28, 25, .72);
}
.warning-strip strong {
  color: var(--yellow);
  font-size: 13px;
}
.warning-strip span {
  color: var(--muted);
  font-size: 12px;
}
.bottom-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.bottom-pills span {
  min-height: 46px;
  display: grid;
  place-items: center;
  padding: 0 14px;
  border-radius: 999px;
  color: #c6d1e0;
  background: rgba(31, 38, 64, .86);
  border: 1px solid rgba(143,169,196,.24);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.reset-wide {
  width: 100%;
  min-height: 44px;
}
.version-info {
  color: rgba(143,169,196,.68);
  text-align: center;
  font-size: 10px;
  padding: 8px 0 0;
}
.room-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 10px;
  background: rgba(1, 6, 14, .72);
  backdrop-filter: blur(10px);
}
.room-detail {
  --room: var(--green);
  --room-rgb: 49, 247, 182;
  --room-panel: rgba(14, 42, 48, .94);
  --room-panel-2: rgba(18, 45, 61, .88);
  position: relative;
  width: min(500px, calc(100vw - 20px));
  max-height: calc(100dvh - 20px);
  overflow: hidden;
  overflow-x: hidden;
  padding: 22px 18px 16px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 5%, rgba(var(--room-rgb), .2), transparent 32%),
    radial-gradient(circle at 10% 30%, rgba(var(--room-rgb), .1), transparent 28%),
    linear-gradient(180deg, rgba(11,34,48,.96), rgba(13,28,45,.98));
  border: 1px solid rgba(var(--room-rgb), .62);
  box-shadow: 0 30px 90px rgba(0,0,0,.55), 0 0 34px rgba(var(--room-rgb), .18);
  scrollbar-color: rgba(var(--room-rgb), .68) rgba(255,255,255,.06);
}
.room-detail.theme-gold {
  --room: #ffd400;
  --room-rgb: 255, 212, 0;
  --room-panel: rgba(45, 39, 35, .94);
  --room-panel-2: rgba(49, 45, 58, .9);
}
.room-detail.theme-green {
  --room: var(--green);
  --room-rgb: 49, 247, 182;
}
.room-detail.theme-cyan {
  --room: var(--cyan);
  --room-rgb: 25, 230, 255;
}
.room-detail.theme-blue {
  --room: #91a7ff;
  --room-rgb: 145, 167, 255;
}
.close-room {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  color: var(--muted);
  background: rgba(255,255,255,.06);
  box-shadow: none;
}
.hot-badge {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  display: inline-flex;
  align-items: center;
  justify-self: center;
  min-height: 28px;
  max-width: 100%;
  margin: 0 auto 8px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--room);
  background:
    linear-gradient(135deg, rgba(var(--room-rgb), .18), rgba(var(--room-rgb), .08)),
    rgba(5, 12, 24, .72);
  border: 1px solid rgba(var(--room-rgb), .55);
  font-weight: 1000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 0 22px rgba(var(--room-rgb), .16);
}
.hot-badge::before {
  content: "";
  display: none;
}
.room-modal-head {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin: 0 auto 12px;
  text-align: center;
}
.room-modal-head span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 12px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, rgba(104,120,245,.95), rgba(141,99,255,.9));
  font-size: 12px;
  font-weight: 1000;
}
.room-modal-head h2 {
  max-width: 100%;
  margin: 0;
  color: var(--text);
  font-size: 22px;
  line-height: 1.25;
  word-break: break-word;
}
.score-ring {
  position: relative;
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  align-content: center;
  margin: 0 auto 12px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(8, 18, 33, .98) 48%, transparent 49%),
    conic-gradient(from 210deg, var(--room) var(--score-deg, 320deg), rgba(255,255,255,.1) 0);
  box-shadow:
    0 0 42px rgba(var(--room-rgb), .38),
    inset 0 0 28px rgba(var(--room-rgb), .08);
  animation: ringBreath 2.2s ease-in-out infinite;
}
.score-ring::before,
.score-ring::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.score-ring::before {
  inset: -5px;
  border: 1px solid rgba(var(--room-rgb), .38);
  background:
    conic-gradient(from 0deg, transparent, rgba(var(--room-rgb), .5), transparent 30%, rgba(255,255,255,.18), transparent 62%);
  mask: radial-gradient(circle, transparent 66%, #000 67%);
  animation: ringSpin 4s linear infinite;
}
.score-ring::after {
  inset: 12px;
  border: 1px solid rgba(var(--room-rgb), .22);
  background: radial-gradient(circle, rgba(var(--room-rgb), .16), transparent 62%);
}
.score-ring strong {
  color: var(--room);
  font-size: 32px;
  line-height: 1;
  position: relative;
  z-index: 1;
  text-shadow: 0 0 18px rgba(var(--room-rgb), .55);
}
.score-ring span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  position: relative;
  z-index: 1;
}
.detail-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 8px;
}
.detail-metric {
  min-width: 0;
  min-height: 44px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  border-radius: 10px;
  background: var(--room-panel-2);
  border: 1px solid rgba(143,169,196,.18);
}
.detail-metric i {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--room);
  background: rgba(var(--room-rgb), .15);
  font-style: normal;
  font-weight: 1000;
}
.detail-metric strong {
  display: block;
  min-width: 0;
  font-size: 14px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.detail-metric span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 1px;
}
.detail-block {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--room-panel);
  border: 1px solid rgba(143,169,196,.16);
}
.detail-block h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px dashed rgba(143,169,196,.22);
  font-size: 14px;
}
.detail-block h3::before {
  content: "●";
  color: var(--room);
  text-shadow: 0 0 12px var(--room);
}
.detail-block p {
  color: #c8d5e1;
  line-height: 1.5;
  font-size: 13px;
  margin: 0;
  overflow-wrap: anywhere;
}
.detail-block ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #c8d5e1;
  font-size: 13px;
}
.detail-block li::before {
  content: "›";
  color: var(--room);
  margin-right: 8px;
  font-weight: 1000;
}
@keyframes ringBreath {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.045); filter: brightness(1.18); }
}
@keyframes ringSpin {
  to { rotate: 360deg; }
}

@media (max-width: 860px) {
  .field-row, .form-grid, .result-grid, .table-list {
    grid-template-columns: 1fr;
  }
  .top-status { flex-direction: column; }
  .recommendation-actions {
    width: 100%;
    justify-content: space-between;
  }
  .composite-card-grid {
    grid-template-columns: 1fr;
  }
  .composite-mini {
    grid-template-columns: 96px minmax(0, 1fr);
    padding: 12px;
  }
}

@media (max-width: 440px) {
  .brand-block .subtitle {
    max-width: 340px;
    font-size: 13px;
    line-height: 1.7;
  }
  .brand-block .subtitle span {
    white-space: normal;
  }
  .analysis-core {
    min-height: 76vh;
    gap: 14px;
    padding-top: 10px;
  }
  .neural-core {
    width: 184px;
    height: 184px;
    margin-bottom: 6px;
  }
  .neural-core::before {
    width: 154px;
    height: 154px;
  }
  .neural-core::after {
    width: 94px;
    height: 94px;
  }
  .core-pulse {
    width: 66px;
    height: 66px;
    border-radius: 17px;
    font-size: 24px;
  }
  .ring-a {
    width: 172px;
    height: 172px;
  }
  .ring-b {
    width: 132px;
    height: 132px;
  }
  .ring-c {
    width: 96px;
    height: 96px;
  }
  .core-nodes i:nth-child(1) { transform: translate(-50%, -50%) rotate(18deg) translateX(76px); }
  .core-nodes i:nth-child(2) { transform: translate(-50%, -50%) rotate(74deg) translateX(74px); }
  .core-nodes i:nth-child(3) { transform: translate(-50%, -50%) rotate(138deg) translateX(73px); }
  .core-nodes i:nth-child(4) { transform: translate(-50%, -50%) rotate(218deg) translateX(75px); }
  .core-nodes i:nth-child(5) { transform: translate(-50%, -50%) rotate(286deg) translateX(76px); }
  .core-nodes i:nth-child(6) { transform: translate(-50%, -50%) rotate(326deg) translateX(63px); }
  .analysis-core h2 { font-size: 28px; }
  .progress {
    width: min(390px, 84vw);
    height: 15px;
  }
  .room-modal { padding: 8px; align-items: center; }
  .room-detail {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    padding: 14px 10px 10px;
    border-radius: 16px;
  }
  .hot-badge {
    min-height: 24px;
    margin-bottom: 5px;
    padding: 0 12px;
    font-size: 12px;
  }
  .room-modal-head { gap: 4px; margin-bottom: 7px; }
  .room-modal-head span {
    min-height: 20px;
    padding: 0 10px;
    font-size: 11px;
  }
  .room-modal-head h2 { font-size: 19px; }
  .score-ring {
    width: 88px;
    height: 88px;
    margin-bottom: 7px;
  }
  .score-ring::after { inset: 10px; }
  .score-ring strong { font-size: 28px; }
  .score-ring span { font-size: 9px; }
  .detail-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 7px;
  }
  .detail-metric {
    min-height: 42px;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 6px;
    padding: 6px 7px;
    border-radius: 9px;
  }
  .detail-metric i { width: 23px; height: 23px; font-size: 11px; }
  .detail-metric strong { font-size: 14px; }
  .detail-metric span { font-size: 10px; }
  .detail-block {
    margin-top: 6px;
    padding: 8px 9px;
  }
  .detail-block h3 {
    padding-bottom: 6px;
    margin-bottom: 6px;
    font-size: 13px;
  }
  .detail-block p,
  .detail-block ul {
    font-size: 12px;
    line-height: 1.45;
  }
  .detail-block ul { gap: 4px; }
  .table-card {
    grid-template-columns: 34px 1fr;
    align-items: start;
    gap: 7px 10px;
    padding: 12px 44px 12px 10px;
    min-height: 96px;
  }
  .room-no { margin-top: 4px; }
  .table-card::after { right: 12px; }
  .table-card .tier { font-size: 14px; }
  .score-box strong {
    min-height: 20px;
    padding: 0 8px;
    font-size: 10px;
  }
  .table-card .reason {
    padding-left: 0;
    display: block;
    margin-top: 0;
    font-size: 10px;
    line-height: 1.5;
  }
  .composite-card {
    padding: 22px 12px 14px;
    gap: 16px;
  }
  .composite-score-ring {
    width: 108px;
    height: 108px;
  }
  .composite-score-ring strong { font-size: 34px; }
  .composite-card-grid { grid-template-columns: 1fr; }
  .composite-mini {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 11px;
  }
  .composite-mini h4 {
    padding-bottom: 7px;
    border-bottom: 1px dashed rgba(143,169,196,.2);
  }
  .composite-mini li {
    flex-basis: 100%;
  }
  .composite-mode p {
    font-size: 11px;
    line-height: 1.65;
  }
  .bottom-pills { grid-template-columns: 1fr; }
}
