/* Amilma Network — elegant light interface */
:root {
  --page: #f3f6fc;
  --page-deep: #edf2fa;
  --card: #ffffff;
  --card-soft: #f5f7fc;
  --ink: #0c2b4d;
  --ink-strong: #071f3a;
  --muted: #60728b;
  --muted-soft: #8d9aab;
  --line: #dfe5ee;
  --line-soft: #e9edf4;
  --blue: #1769ff;
  --blue-2: #5a91ff;
  --cyan: #0eafdf;
  --green: #10b981;
  --amber: #f59e0b;
  --red: #f04464;
  --violet: #7857ff;
  --phase: var(--blue);
  --phase-rgb: 23, 105, 255;
  --shadow: 0 18px 46px rgba(29, 54, 91, 0.075);
  --shadow-soft: 0 10px 30px rgba(29, 54, 91, 0.055);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --pill: 999px;
  --ease: 220ms cubic-bezier(.2, .8, .2, 1);
  --content: min(1120px, calc(100% - 40px));
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  background: var(--page);
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  position: relative;
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% -15%, rgba(72, 129, 255, 0.12), transparent 35rem),
    linear-gradient(180deg, #f7f9fe 0%, var(--page) 36%, var(--page-deep) 100%);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-feature-settings: "tnum" 1, "ss01" 1;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(24, 73, 132, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 73, 132, 0.025) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 55%);
}

body.phase-ping {
  --phase: var(--amber);
  --phase-rgb: 245, 158, 11;
}

body.phase-dl {
  --phase: var(--blue);
  --phase-rgb: 23, 105, 255;
}

body.phase-ul {
  --phase: #ec4b7a;
  --phase-rgb: 236, 75, 122;
}

::selection {
  color: white;
  background: var(--blue);
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(23, 105, 255, 0.24);
  outline-offset: 3px;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  color: #084fc7;
}

img,
svg {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 11px 15px;
  color: white;
  background: var(--blue);
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 800;
  transform: translateY(-160%);
  transition: transform var(--ease);
}

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

.lang-switcher {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 30;
  display: flex;
  gap: 3px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--pill);
  box-shadow: 0 10px 30px rgba(31, 57, 96, 0.08);
  backdrop-filter: blur(18px) saturate(140%);
}

.lang-btn {
  min-width: 36px;
  padding: 8px 9px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: var(--pill);
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  transition: color var(--ease), background var(--ease), transform var(--ease);
}

.lang-btn:hover {
  color: var(--blue);
}

.lang-btn.active {
  color: white;
  background: var(--blue);
  box-shadow: 0 7px 17px rgba(23, 105, 255, 0.22);
}

.page {
  width: var(--content);
  margin: 0 auto;
  padding: 34px 0 46px;
}

.speedtest-zone {
  display: grid;
  gap: 14px;
}

.hero-section {
  padding: 20px 0 12px;
}

.hero {
  display: flex;
  justify-content: center;
  text-align: center;
}

.console-title {
  display: grid;
  justify-items: center;
}

.brand-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.brand-mark {
  position: relative;
  width: 28px;
  height: 28px;
  border: 2px solid rgba(23, 105, 255, 0.26);
  border-radius: 50%;
}

.brand-mark::before,
.brand-mark::after,
.brand-mark span {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
}

.brand-mark::before {
  width: 7px;
  height: 7px;
  background: var(--blue);
  border-radius: 50%;
  box-shadow: 0 0 13px rgba(23, 105, 255, 0.4);
}

.brand-mark::after {
  width: 15px;
  height: 15px;
  border: 1px solid rgba(23, 105, 255, 0.35);
  border-radius: 50%;
}

.brand-mark span {
  width: 36px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue), transparent);
  animation: orbit 6s linear infinite;
}

.brand-name {
  margin: 0;
  color: var(--ink-strong);
  font-size: clamp(1.7rem, 3.6vw, 2.7rem);
  font-weight: 850;
  letter-spacing: -0.055em;
  line-height: 1;
}

.brand-name em {
  color: var(--blue);
  font-style: normal;
}

.console-tag {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.console-tag::before {
  content: "›_ ";
  color: var(--blue);
  font-weight: 900;
}

.main-card {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.main-card-inner {
  display: grid;
  gap: 20px;
  padding: 26px;
}

.gauge-shell {
  position: relative;
  padding: 22px 24px 10px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 70%, rgba(var(--phase-rgb), 0.055), transparent 42%),
    linear-gradient(180deg, #f7f9fe 0%, #f1f5fc 100%);
  border: 1px solid #dce3ef;
  border-radius: 22px;
  transition: background var(--ease);
}

.gauge-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.62), transparent 28%);
}

.gauge-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-caption {
  color: #557096;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.phase-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 260px;
  padding: 8px 11px;
  overflow: hidden;
  color: var(--ink);
  background: rgba(228, 234, 245, 0.88);
  border: 1px solid rgba(var(--phase-rgb), 0.08);
  border-radius: var(--pill);
  font-size: 0.72rem;
  font-weight: 650;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.phase-chip .dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  background: var(--phase);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(var(--phase-rgb), 0.35);
}

.gauge-container {
  position: relative;
  width: min(100%, 930px);
  aspect-ratio: 620 / 360;
  margin: 2px auto 0;
}

#gauge-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: saturate(0.92);
}

#gauge-svg #hud-ticks {
  opacity: 0.82;
}

#gauge-svg #scale-labels {
  opacity: 0.95;
}

.gauge-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10% 20px 0;
  pointer-events: none;
  text-align: center;
}

#main-number {
  color: var(--ink-strong);
  font-size: clamp(3.2rem, 8vw, 6.3rem);
  font-weight: 850;
  letter-spacing: -0.065em;
  line-height: 0.86;
  text-shadow: 0 6px 24px rgba(26, 69, 123, 0.07);
}

#main-unit-label {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.18em;
}

#phase-label {
  min-height: 1.5em;
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.gauge-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-top: 15px;
}

.g-chip {
  padding: 7px 10px;
  color: var(--muted);
  background: rgba(222, 228, 239, 0.74);
  border: 1px solid rgba(130, 149, 178, 0.08);
  border-radius: var(--pill);
  font-size: 0.61rem;
  letter-spacing: 0.015em;
}

.g-chip strong {
  color: var(--ink);
  font-weight: 850;
}

.btn-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.btn-start {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 220px;
  padding: 15px 26px;
  overflow: hidden;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  border: 0;
  border-radius: var(--pill);
  box-shadow: 0 13px 30px rgba(23, 105, 255, 0.25);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 850;
  transition: transform var(--ease), box-shadow var(--ease), filter var(--ease);
}

.btn-start::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.36), transparent 70%);
  transform: translateX(-120%);
  transition: transform 650ms ease;
}

.btn-start:hover {
  box-shadow: 0 16px 36px rgba(23, 105, 255, 0.31);
  filter: saturate(1.08);
  transform: translateY(-2px);
}

.btn-start:hover::after {
  transform: translateX(120%);
}

.btn-start:active {
  transform: translateY(0) scale(0.985);
}

.btn-start:disabled {
  cursor: wait;
  filter: saturate(0.7);
  opacity: 0.76;
  transform: none;
}

.btn-dot {
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.18);
}

.btn-dot.animating {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: white;
  box-shadow: none;
  animation: spin 700ms linear infinite;
}

.test-assurance {
  color: var(--muted-soft);
  font-size: 0.65rem;
  line-height: 1.45;
  text-align: center;
}

.progress-area {
  display: grid;
  gap: 13px;
  opacity: 0.72;
  transition: opacity var(--ease);
}

.progress-area.show,
.progress-area.scanning {
  opacity: 1;
}

.progress-bar-track {
  width: 100%;
  height: 5px;
  overflow: hidden;
  background: #e6ebf2;
  border-radius: var(--pill);
}

.progress-bar-fill {
  width: 0;
  min-height: 100%;
  background: linear-gradient(90deg, var(--phase), #82b1ff);
  border-radius: inherit;
  box-shadow: 0 0 10px rgba(var(--phase-rgb), 0.22);
  transition: width 220ms ease, background var(--ease);
}

.progress-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.ps {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  transition: color var(--ease);
}

.ps-dot {
  width: 7px;
  height: 7px;
  background: #d8dee7;
  border-radius: 50%;
  transition: background var(--ease), box-shadow var(--ease), transform var(--ease);
}

.ps.active {
  color: var(--ink);
}

.ps.active .ps-dot {
  background: var(--phase);
  box-shadow: 0 0 9px rgba(var(--phase-rgb), 0.4);
  transform: scale(1.15);
  animation: breathe 1.1s ease-in-out infinite;
}

.ps.done {
  color: var(--ink);
}

.ps.done .ps-dot {
  background: var(--green);
}

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

.stat-tile {
  --tile: var(--blue);
  --tile-rgb: 23, 105, 255;
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "header header"
    "value unit";
  align-items: end;
  min-height: 148px;
  padding: 20px 22px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}

.stat-tile[data-key="ul"] {
  --tile: #ec4b7a;
  --tile-rgb: 236, 75, 122;
}

.stat-tile[data-key="ping"] {
  --tile: var(--amber);
  --tile-rgb: 245, 158, 11;
}

.stat-tile[data-key="jitter"] {
  --tile: var(--violet);
  --tile-rgb: 120, 87, 255;
}

.stat-tile::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -46px;
  width: 110px;
  height: 110px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(var(--tile-rgb), 0.10), transparent 68%);
  opacity: 0;
  transition: opacity var(--ease);
}

.stat-tile:hover,
.stat-tile.lit {
  border-color: rgba(var(--tile-rgb), 0.22);
  box-shadow: 0 18px 42px rgba(29, 54, 91, 0.10);
  transform: translateY(-2px);
}

.stat-tile:hover::after,
.stat-tile.lit::after {
  opacity: 1;
}

.tile-header {
  grid-area: header;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tile-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.tile-icon {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  color: var(--tile);
  background: rgba(var(--tile-rgb), 0.065);
  border: 1px solid rgba(var(--tile-rgb), 0.08);
  border-radius: 50%;
  font-size: 0.76rem;
}

.tile-value {
  grid-area: value;
  min-width: 0;
  margin-top: 18px;
  color: var(--ink-strong);
  font-size: clamp(2.1rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.9;
}

.tile-value.dl-lit,
.tile-value.ul-lit,
.tile-value.ping-lit,
.tile-value.jitter-lit {
  color: var(--tile);
}

.tile-unit {
  grid-area: unit;
  padding-left: 7px;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1;
}

.result-row {
  display: none;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.result-row.show {
  display: flex;
}

.result-grade-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.grade-label {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.grade-pill {
  display: grid;
  place-items: center;
  min-width: 46px;
  min-height: 46px;
  padding: 9px;
  color: white;
  background: linear-gradient(135deg, var(--blue-2), var(--blue));
  border-radius: 50%;
  font-weight: 850;
  box-shadow: 0 8px 18px rgba(23, 105, 255, 0.18);
}

.result-desc {
  flex: 1;
  min-width: 180px;
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.5;
}

.btn-share,
.btn-clear-history,
.tool-btn {
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
  transition: color var(--ease), background var(--ease), border-color var(--ease), transform var(--ease), box-shadow var(--ease);
}

.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  border-radius: var(--pill);
}

.btn-share:hover,
.btn-clear-history:hover,
.tool-btn:hover {
  color: var(--blue);
  background: #f8faff;
  border-color: rgba(23, 105, 255, 0.24);
  box-shadow: 0 7px 18px rgba(29, 54, 91, 0.065);
  transform: translateY(-1px);
}

.lower-section {
  display: grid;
  gap: 42px;
  margin-top: 22px;
}

.lower-section > *,
.info-strip,
.quality-grid,
.toolkit-grid,
.elite-grid,
.seo-about-grid,
.mdetail-grid,
.history-table {
  width: 100%;
  min-width: 0;
}

.info-strip,
.quality-grid,
.toolkit-grid,
.elite-grid,
.seo-about-grid,
.mdetail-grid {
  display: grid;
  gap: 14px;
}

.info-strip {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.info-item {
  position: relative;
  min-height: 118px;
  padding: 18px 20px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.info-item:first-child::after {
  content: "";
  position: absolute;
  top: -20px;
  right: -20px;
  width: 90px;
  height: 90px;
  background: radial-gradient(circle, rgba(23, 105, 255, 0.09), transparent 67%);
}

.info-label {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 650;
}

.info-val {
  overflow: hidden;
  color: var(--ink-strong);
  font-size: 0.95rem;
  font-weight: 780;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.info-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.7rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  background: var(--blue);
  border-radius: 50%;
  box-shadow: 0 0 7px rgba(23, 105, 255, 0.28);
}

.section-heading {
  margin: 0 0 16px;
  color: var(--ink-strong);
  font-size: clamp(1.4rem, 2.7vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.section-heading::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 8px;
  background: var(--blue);
  border-radius: 50%;
  vertical-align: 0.16em;
}

.quality-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quality-item {
  display: grid;
  gap: 11px;
  min-height: 176px;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.quality-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--blue);
  background: #f2f5fa;
  border: 1px solid var(--line-soft);
  border-radius: 50%;
  font-size: 0.76rem;
}

.quality-label {
  color: var(--ink-strong);
  font-size: 0.82rem;
  font-weight: 760;
}

.quality-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  color: var(--ink);
  background: #f2f4f8;
  border-radius: var(--pill);
  font-size: 0.68rem;
  font-weight: 720;
}

.quality-badge.good {
  color: #087653;
  background: rgba(16, 185, 129, 0.09);
}

.quality-badge.average {
  color: #a46400;
  background: rgba(245, 158, 11, 0.11);
}

.quality-badge.poor {
  color: #bd2447;
  background: rgba(240, 68, 100, 0.09);
}

.quality-sub {
  align-self: end;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.45;
}

.toolkit-grid,
.elite-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tool-card,
.elite-card {
  position: relative;
  min-width: 0;
  padding: 20px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.toolkit-grid > :last-child,
.elite-grid > :last-child,
.seo-about-grid > :last-child {
  grid-column: 1 / 2;
}

.card-has-ribbon {
  padding-top: 25px;
}

.card-ribbon {
  position: absolute;
  top: 0;
  left: 18px;
  display: inline-flex;
  padding: 5px 11px;
  color: white;
  background: var(--blue);
  border-radius: 0 0 9px 9px;
  font-size: 0.56rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.card-ribbon.ribbon-blue {
  background: var(--blue);
}

.tool-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.card-has-ribbon .tool-card-head {
  padding-top: 5px;
}

.tool-card-kicker {
  color: var(--muted);
  font-size: 0.61rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tool-card-title {
  margin-top: 6px;
  color: var(--ink-strong);
  font-size: 0.96rem;
  font-weight: 780;
  letter-spacing: -0.015em;
}

.tool-badge {
  display: inline-flex;
  padding: 6px 9px;
  color: var(--muted);
  background: #f1f3f7;
  border-radius: var(--pill);
  font-size: 0.56rem;
  font-weight: 750;
  letter-spacing: 0.05em;
}

.tool-kv {
  display: grid;
}

.kv-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 0;
  color: var(--muted);
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.72rem;
  line-height: 1.45;
}

.kv-row:last-child {
  border-bottom: 0;
}

.kv-key {
  flex: 0 0 auto;
  color: var(--ink);
  font-weight: 650;
}

.kv-val {
  min-width: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
  text-align: right;
}

.intel-good {
  color: #087653;
}

.intel-warn {
  color: #a46400;
}

.intel-bad {
  color: #bd2447;
}

.intel-neutral {
  color: var(--muted);
}

.tool-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 14px;
}

.tool-btn {
  min-height: 43px;
  padding: 10px 12px;
}

.tool-btn-ghost {
  min-height: 0;
  padding: 8px 10px;
}

.cmd-hint {
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.55;
}

.profile-list {
  display: grid;
}

.profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line-soft);
}

.profile-row:last-child {
  border-bottom: 0;
}

.profile-name {
  color: var(--ink-strong);
  font-size: 0.76rem;
  font-weight: 740;
}

.profile-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.45;
}

.tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.tag-chip {
  display: inline-flex;
  padding: 5px 8px;
  background: #f3f5f8;
  border-radius: var(--pill);
  font-size: 0.58rem;
}

.tc-blue {
  color: var(--blue);
}

.tc-violet {
  color: var(--violet);
}

.tc-teal {
  color: #0789a5;
}

.tc-orange {
  color: #d56820;
}

.profile-badge {
  flex: 0 0 auto;
  padding: 7px 10px;
  color: var(--ink);
  background: #f1f3f6;
  border-radius: var(--pill);
  font-size: 0.62rem;
  font-weight: 760;
}

.profile-badge.ok {
  color: #087653;
  background: rgba(16, 185, 129, 0.09);
}

.profile-badge.warn {
  color: #a46400;
  background: rgba(245, 158, 11, 0.10);
}

.profile-badge.bad {
  color: #bd2447;
  background: rgba(240, 68, 100, 0.09);
}

.elite-rec-list {
  display: grid;
  gap: 11px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.elite-rec-list li {
  position: relative;
  padding-left: 17px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.6;
}

.elite-rec-list li::before {
  content: "";
  position: absolute;
  top: 0.67em;
  left: 0;
  width: 5px;
  height: 5px;
  background: var(--blue);
  border-radius: 50%;
}

.history-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.history-heading .section-heading {
  margin: 0;
}

.btn-clear-history {
  padding: 10px 14px;
  border-radius: var(--pill);
}

.mdetail-section {
  padding: 22px;
  background: rgba(247, 249, 253, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

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

.mdetail-col {
  display: grid;
  gap: 13px;
}

.mdetail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-strong);
  font-size: 0.78rem;
  font-weight: 760;
}

.mdetail-avg {
  color: var(--blue);
  font-size: 0.72rem;
}

#mdetail-dl-rows,
#mdetail-ul-rows {
  display: grid;
  gap: 10px;
}

.mdetail-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 80px;
  gap: 9px;
  align-items: center;
  color: var(--muted);
  font-size: 0.64rem;
}

.mdetail-bar-wrap {
  height: 5px;
  overflow: hidden;
  background: #e5eaf1;
  border-radius: var(--pill);
}

.mdetail-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), #6ba1ff);
  border-radius: inherit;
  transform-origin: left;
  animation: grow 700ms cubic-bezier(.2, .8, .2, 1) both;
}

.mdetail-bar-fill.ul {
  background: linear-gradient(90deg, #ec4b7a, #ff8aac);
}

.mdetail-val {
  color: var(--ink);
  text-align: right;
}

.mdetail-empty {
  color: var(--muted);
  font-size: 0.72rem;
}

.seo-about-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.seo-card {
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.seo-card-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 17px;
  color: white;
  background: var(--blue);
  border-radius: 13px;
  font-size: 0.82rem;
  box-shadow: 0 9px 18px rgba(23, 105, 255, 0.16);
}

.sci-teal {
  background: #1195a9;
  box-shadow: 0 9px 18px rgba(17, 149, 169, 0.16);
}

.sci-violet {
  background: var(--violet);
  box-shadow: 0 9px 18px rgba(120, 87, 255, 0.16);
}

.seo-card h3 {
  margin: 0 0 11px;
  color: var(--ink-strong);
  font-size: 0.9rem;
  font-weight: 780;
}

.seo-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.75;
}

.seo-card strong {
  color: var(--ink);
  font-weight: 730;
}

.history-table {
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.h-header,
.h-row {
  display: grid;
  grid-template-columns: 0.75fr 1fr 1fr 0.8fr 0.8fr 1.4fr;
  gap: 12px;
  align-items: center;
  min-width: 760px;
}

.h-header {
  padding: 13px 17px;
  background: #f5f7fb;
}

.h-col-label {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
}

#history-list {
  display: grid;
}

.h-row {
  padding: 14px 17px;
  color: var(--ink);
  border-top: 1px solid var(--line-soft);
  font-size: 0.68rem;
}

.h-time {
  color: var(--muted);
}

.h-dl {
  color: var(--blue);
}

.h-ul {
  color: #d93668;
}

.h-grade-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.h-grade,
.h-score,
.h-trend,
.h-anom {
  display: inline-flex;
  padding: 4px 7px;
  background: #f1f3f7;
  border-radius: 7px;
  font-size: 0.58rem;
  font-weight: 760;
}

.h-grade {
  color: white;
  background: var(--blue);
}

.h-trend.good {
  color: #087653;
  background: rgba(16, 185, 129, 0.09);
}

.h-trend.bad,
.h-anom {
  color: #bd2447;
  background: rgba(240, 68, 100, 0.08);
}

footer {
  display: grid;
  gap: 20px;
  margin-top: 4px;
  padding: 28px 0 0;
  border-top: 1px solid rgba(132, 149, 174, 0.22);
}

.footer-top,
.footer-mid,
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-logo {
  display: inline-flex;
  color: var(--ink-strong);
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.footer-logo span {
  color: var(--blue);
}

.footer-brand-text {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.68rem;
}

.footer-tagline {
  color: var(--ink);
  font-weight: 700;
}

.footer-sites {
  display: grid;
  gap: 7px;
}

.footer-sites-label {
  color: var(--muted);
  font-size: 0.67rem;
}

.footer-sites-links,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 11px;
  font-size: 0.68rem;
}

.footer-copy,
.footer-note,
.footer-credit,
.footer-powered {
  margin: 0;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.6;
}

.footer-note {
  max-width: 750px;
}

.footer-sep {
  color: #aeb8c7;
}

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

@keyframes breathe {
  0%, 100% { opacity: 0.58; }
  50% { opacity: 1; }
}

@keyframes orbit {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@media (max-width: 760px) {
  :root {
    --content: min(100% - 24px, 680px);
  }

  .page {
    padding-top: 14px;
  }

  .lang-switcher {
    position: static;
    width: fit-content;
    margin: 12px 12px 0 auto;
  }

  .hero-section {
    padding-top: 2px;
  }

  .main-card-inner {
    padding: 14px;
  }

  .gauge-shell {
    padding: 15px 12px 6px;
  }

  .panel-caption {
    font-size: 0.6rem;
  }

  .phase-chip {
    max-width: 150px;
    padding: 7px 9px;
    font-size: 0.64rem;
  }

  .gauge-center {
    padding-top: 9%;
  }

  #main-number {
    font-size: clamp(2.8rem, 14vw, 4.6rem);
  }

  .gauge-meta {
    margin-top: 11px;
  }

  .g-chip {
    padding: 5px 7px;
    font-size: 0.52rem;
  }

  .test-assurance {
    max-width: 330px;
  }

  .toolkit-grid,
  .elite-grid,
  .seo-about-grid,
  .mdetail-grid {
    grid-template-columns: 1fr;
  }

  .toolkit-grid > :last-child,
  .elite-grid > :last-child,
  .seo-about-grid > :last-child {
    grid-column: auto;
  }

  .result-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .result-desc {
    flex-basis: calc(100% - 100px);
  }

  .btn-share {
    margin-left: auto;
  }
}

@media (max-width: 520px) {
  :root {
    --content: calc(100% - 18px);
  }

  .brand-mark {
    width: 23px;
    height: 23px;
  }

  .brand-name {
    font-size: 1.55rem;
  }

  .console-tag {
    margin-top: 8px;
    font-size: 0.65rem;
  }

  .main-card,
  .gauge-shell {
    border-radius: 19px;
  }

  .main-card-inner {
    gap: 14px;
    padding: 9px;
  }

  .gauge-shell {
    padding: 13px 9px 4px;
  }

  .gauge-head {
    gap: 8px;
  }

  .panel-caption {
    letter-spacing: 0.12em;
  }

  .phase-chip {
    max-width: 125px;
  }

  .gauge-center {
    padding: 12% 8px 0;
  }

  #main-number {
    font-size: clamp(2.35rem, 13vw, 3.8rem);
  }

  #main-unit-label {
    margin-top: 6px;
    font-size: 0.58rem;
  }

  #phase-label {
    margin-top: 5px;
    font-size: 0.63rem;
  }

  .gauge-meta {
    display: none;
  }

  .btn-start {
    width: min(100%, 280px);
  }

  .progress-steps {
    gap: 6px;
  }

  .ps {
    gap: 5px;
    font-size: 0.59rem;
  }

  .stats-grid,
  .info-strip,
  .quality-grid {
    gap: 9px;
  }

  .stat-tile {
    min-height: 116px;
    padding: 15px;
    border-radius: 16px;
  }

  .tile-value {
    margin-top: 13px;
    font-size: clamp(1.65rem, 9vw, 2.35rem);
  }

  .tile-icon {
    width: 27px;
    height: 27px;
  }

  .info-item {
    min-height: 105px;
    padding: 15px;
    border-radius: 16px;
  }

  .info-val {
    font-size: 0.82rem;
  }

  .section-heading {
    font-size: 1.35rem;
  }

  .quality-item {
    min-height: 156px;
    padding: 15px;
    border-radius: 16px;
  }

  .tool-card,
  .elite-card,
  .seo-card,
  .mdetail-section {
    padding: 17px;
    border-radius: 17px;
  }

  .result-row {
    padding: 14px;
  }

  .result-grade-badge {
    gap: 8px;
  }

  .grade-pill {
    min-width: 40px;
    min-height: 40px;
  }

  .result-desc {
    flex-basis: calc(100% - 84px);
    font-size: 0.74rem;
  }

  .btn-share {
    width: 100%;
    justify-content: center;
    margin: 0;
  }

  .profile-row {
    align-items: flex-start;
  }

  .history-heading {
    align-items: center;
  }

  .footer-top,
  .footer-mid,
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
