:root {
  --bg: #071018;
  --panel: rgba(11, 24, 33, .86);
  --panel-strong: rgba(14, 32, 42, .94);
  --line: rgba(112, 220, 240, .22);
  --line-strong: rgba(112, 220, 240, .38);
  --text: #e7fbff;
  --muted: #98b8c3;
  --accent: #24d8ff;
  --green: #76f7b1;
  --warn: #ffe08a;
  --danger: #ff7b8a;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 18% 0%, rgba(36, 216, 255, .16), transparent 34%),
    radial-gradient(circle at 88% 12%, rgba(118, 247, 177, .10), transparent 30%),
    var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  overflow-x: hidden;
}

a {
  color: inherit;
}

.noscript {
  padding: 12px;
  background: #5b1520;
  color: #fff;
  text-align: center;
}

.site-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 28px 18px 40px;
}

.hero {
  padding: 42px 0 24px;
}

.series-label,
.section-kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
}

h1,
h2 {
  margin: 0;
  line-height: 1.2;
}

h1 {
  font-size: clamp(34px, 8vw, 72px);
}

h2 {
  font-size: clamp(22px, 4vw, 32px);
}

.subtitle {
  margin: 8px 0 0;
  color: var(--green);
  font-weight: 800;
}

.lead {
  max-width: 760px;
  margin: 18px 0 0;
  color: #d8f8ff;
  font-size: clamp(17px, 2.4vw, 22px);
  line-height: 1.8;
}

.note,
.result-message,
.guide-section p,
.about-diagnosis p {
  color: var(--muted);
  line-height: 1.8;
}

.status-grid,
.meter-grid,
.tool-links {
  display: grid;
  gap: 12px;
}

.status-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 10px 0 18px;
}

.status-card,
.test-panel,
.guide-section,
.main-lab-tools,
.about-diagnosis,
.app-comment-section,
.mothership-link {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .24);
}

.status-card {
  padding: 16px;
}

.status-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}

.status-card strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: 20px;
}

.test-panel,
.guide-section,
.main-lab-tools,
.about-diagnosis {
  margin-top: 18px;
  padding: 22px;
}

.panel-copy {
  max-width: 760px;
}

.button-grid,
.memo-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.memo-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

button {
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(4, 13, 18, .88);
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
}

button:hover,
button:focus-visible {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(36, 216, 255, .14);
}

.test-button {
  background: linear-gradient(135deg, rgba(8, 145, 178, .92), rgba(29, 78, 216, .78));
}

.stop-button {
  border-color: rgba(255, 123, 138, .5);
  background: rgba(91, 21, 32, .82);
}

.memo-button.positive {
  color: #062114;
  background: var(--green);
}

.memo-button.muted {
  color: #2a1600;
  background: var(--warn);
}

.result-message {
  min-height: 34px;
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(2, 8, 12, .52);
}

.ad-row {
  margin: 22px 0;
  padding: 12px;
  border: 1px dashed rgba(152, 184, 195, .24);
  border-radius: 16px;
  background: rgba(255, 255, 255, .03);
}

.ad-label {
  margin-bottom: 8px;
  color: rgba(231, 251, 255, .46);
  font-size: 10px;
  letter-spacing: .16em;
}

.guide-section ol {
  margin: 16px 0 0 1.4em;
  padding: 0;
  color: #d8f8ff;
  line-height: 1.8;
}

.tool-links {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.tool-links a {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(112, 220, 240, .18);
  border-radius: 14px;
  background: rgba(2, 8, 12, .44);
  text-decoration: none;
}

.tool-links strong,
.tool-links span {
  display: block;
}

.tool-links span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.app-comment-section {
  margin-top: 22px;
  padding: 18px;
}

.app-comment-section :where(.app-comments, .app-comment-form-section) {
  background: rgba(8, 18, 24, .92);
  border-color: rgba(112, 220, 240, .22);
  color: var(--text);
}

.app-comment-section :where(input, textarea, select) {
  background: rgba(2, 8, 12, .88);
  color: var(--text);
  border-color: rgba(112, 220, 240, .28);
}

.mothership-link {
  margin-top: 18px;
  padding: 14px 18px;
  color: var(--muted);
  text-align: center;
}

.mothership-link span {
  display: block;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
}

.mothership-link a {
  display: inline-block;
  margin-top: 4px;
  color: var(--text);
  font-weight: 900;
  text-decoration: none;
}

.mothership-link p {
  margin: 4px 0 0;
  font-size: 12px;
}

.site-footer {
  padding: 26px 0 0;
  color: rgba(231, 251, 255, .52);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 760px) {
  .site-shell {
    padding: 20px 14px 32px;
  }

  .hero {
    padding-top: 28px;
  }

  .status-grid,
  .button-grid,
  .memo-actions,
  .tool-links {
    grid-template-columns: 1fr;
  }

  .test-panel,
  .guide-section,
  .main-lab-tools,
  .about-diagnosis {
    padding: 18px;
  }
}
