:root {
  --bg: #050713;
  --bg-2: #0a1130;
  --panel: rgba(13, 18, 36, 0.74);
  --panel-strong: rgba(17, 24, 49, 0.94);
  --panel-soft: rgba(255, 255, 255, 0.05);
  --text: #f7f9ff;
  --muted: #aeb8dc;
  --faint: rgba(255, 255, 255, 0.08);
  --line: rgba(184, 194, 230, 0.16);
  --accent: #7df2bf;
  --accent-2: #7ba7ff;
  --accent-3: #ff86b3;
  --accent-4: #ffd27d;
  --shadow: 0 34px 100px rgba(0, 0, 0, 0.48);
  --font-sans: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
  --font-strong: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --page-max: 1320px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  min-height: 100%;
  background:
    radial-gradient(circle at 14% 8%, rgba(123, 167, 255, 0.26), transparent 24%),
    radial-gradient(circle at 83% 10%, rgba(125, 242, 191, 0.22), transparent 22%),
    radial-gradient(circle at 73% 82%, rgba(255, 134, 179, 0.16), transparent 20%),
    radial-gradient(circle at 50% 100%, rgba(255, 210, 125, 0.08), transparent 18%),
    linear-gradient(180deg, #040611 0%, #070d1f 40%, #060916 100%);
}

body {
  margin: 0;
  min-height: 100vh;
  min-width: 100%;
  color: var(--text);
  font-family: var(--font-sans);
  background:
    radial-gradient(circle at 14% 8%, rgba(123, 167, 255, 0.26), transparent 24%),
    radial-gradient(circle at 83% 10%, rgba(125, 242, 191, 0.22), transparent 22%),
    radial-gradient(circle at 73% 82%, rgba(255, 134, 179, 0.16), transparent 20%),
    radial-gradient(circle at 50% 100%, rgba(255, 210, 125, 0.08), transparent 18%),
    linear-gradient(180deg, #040611 0%, #070d1f 40%, #060916 100%);
  overflow-x: hidden;
}

.site-header,
.site-footer {
  width: min(var(--page-max), calc(100vw - 28px));
  margin: 6px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.site-header {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(15, 20, 37, 0.92), rgba(9, 13, 26, 0.78)),
    rgba(10, 14, 29, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 20;
  overflow: hidden;
}

.site-header::before,
.site-header::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.site-header::before {
  background: linear-gradient(90deg, rgba(125, 242, 191, 0.12), transparent 30%, transparent 70%, rgba(123, 167, 255, 0.1));
  opacity: 0.75;
}

.site-header::after {
  height: 1px;
  top: 0;
  left: 18px;
  right: 18px;
  background: linear-gradient(90deg, transparent, rgba(125, 242, 191, 0.56), rgba(123, 167, 255, 0.42), transparent);
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: var(--font-strong);
  font-weight: 700;
  color: #08101a;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 24px rgba(123, 167, 255, 0.18);
}

.site-brand strong,
.site-footer strong {
  display: block;
  font-family: var(--font-strong);
  letter-spacing: -0.04em;
}

.site-brand span,
.site-footer p {
  display: block;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.site-nav,
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.site-nav a,
.footer-nav a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  border: 1px solid transparent;
  transition: all 160ms ease;
}

.site-nav a:hover,
.footer-nav a:hover {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.site-nav a.is-active,
.site-nav a[aria-current="page"] {
  color: var(--text);
  border-color: rgba(125, 242, 191, 0.26);
  background: rgba(125, 242, 191, 0.09);
}

.lang-switch {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(12px);
  flex-shrink: 0;
}

.lang-switch__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lang-switch__group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-switch button {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0;
  min-width: 30px;
  min-height: 30px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: all 160ms ease;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: grid;
  place-items: center;
  font-size: 0.98rem;
}

.lang-switch button:hover,
.lang-switch button:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.lang-switch button.is-active {
  color: #061115;
  background: linear-gradient(135deg, #8af6cb 0%, #d5ffea 48%, #a8d6ff 100%);
  box-shadow: 0 10px 22px rgba(125, 242, 191, 0.18);
}

.lang-switch--icon .lang-switch__group {
  gap: 8px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.legal-dock {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 35;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 32px);
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(13, 18, 35, 0.94), rgba(9, 12, 25, 0.86)),
    rgba(10, 14, 29, 0.78);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
}

.legal-dock__label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.legal-dock__links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.legal-dock__links a {
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1;
  transition: all 160ms ease;
}

.legal-dock__links a:hover,
.legal-dock__links a:focus-visible {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.mode-tabs--page {
  width: min(var(--page-max), calc(100vw - 28px));
  margin: 12px auto 0;
  justify-content: flex-start;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(13, 18, 35, 0.88), rgba(9, 12, 25, 0.74)),
    rgba(10, 14, 29, 0.72);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 80%);
}

body::after {
  content: "";
  position: fixed;
  inset: auto -12vw -22vh auto;
  width: 52vw;
  height: 52vw;
  pointer-events: none;
  background: radial-gradient(circle, rgba(123, 167, 255, 0.14), transparent 62%);
  filter: blur(30px);
  opacity: 0.55;
  animation: ambient-float 16s ease-in-out infinite alternate;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

::selection {
  color: #061115;
  background: rgba(125, 242, 191, 0.82);
}

.page-shell {
  width: min(var(--page-max), calc(100vw - 28px));
  margin: 0 auto;
  padding: 16px 0 40px;
}

.app-panel[hidden] {
  display: none !important;
}

.hero,
.battle,
.grid-two {
  margin-top: 18px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  gap: 18px;
  align-items: stretch;
}

.hero-copy,
.hero-card,
.profile-card,
.versus,
.info-card,
.result-panel {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 32%),
    linear-gradient(180deg, rgba(17, 24, 49, 0.88), rgba(11, 15, 30, 0.82)),
    var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-copy,
.hero-card,
.profile-card,
.versus,
.info-card,
.result-panel {
  border-radius: var(--radius-xl);
}

.hero-copy {
  padding: clamp(20px, 2.4vw, 30px);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero-copy::before,
.hero-copy::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(0);
  pointer-events: none;
}

.hero-copy::before {
  width: 320px;
  height: 320px;
  right: -120px;
  top: -120px;
  background: radial-gradient(circle, rgba(123, 167, 255, 0.22), transparent 62%);
}

.hero-copy::after {
  width: 240px;
  height: 240px;
  left: -80px;
  bottom: -100px;
  background: radial-gradient(circle, rgba(125, 242, 191, 0.18), transparent 65%);
}

.hero-copy h1 {
  text-wrap: balance;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.hero-copy .lead {
  font-size: 1rem;
}

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

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: -0.04em;
  font-weight: 800;
}

h1 {
  font-size: clamp(2.1rem, 4.8vw, 4.2rem);
  line-height: 0.98;
  margin-bottom: 12px;
  max-width: 11ch;
}

h2 {
  font-size: clamp(1.5rem, 2.2vw, 2.2rem);
  line-height: 1.02;
  margin-bottom: 10px;
}

h3 {
  font-size: clamp(1.05rem, 1.35vw, 1.25rem);
  margin-bottom: 8px;
}

.lead {
  max-width: 60ch;
  font-size: 0.98rem;
  line-height: 1.62;
  color: var(--muted);
  margin-bottom: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.button {
  border: 1px solid transparent;
  padding: 12px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  font-weight: 800;
  letter-spacing: -0.02em;
  position: relative;
}

.button.is-loading {
  padding-right: 44px;
}

.button.is-loading::after {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(8, 16, 26, 0.25);
  border-top-color: rgba(8, 16, 26, 0.95);
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  animation: button-spin 0.8s linear infinite;
}

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

.button:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.button:focus-visible,
.upload-zone:focus-within,
.feature-list a:focus-visible {
  outline: 2px solid rgba(125, 242, 191, 0.9);
  outline-offset: 3px;
}

.primary {
  color: #061115;
  background: linear-gradient(135deg, #8af6cb 0%, #d5ffea 48%, #a8d6ff 100%);
  box-shadow:
    0 14px 34px rgba(125, 242, 191, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.feature-list,
.check-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.feature-list li,
.pill {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.035);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  backdrop-filter: blur(10px);
}

.hero-card {
  padding: 18px;
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: space-between;
  min-height: 100%;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  background:
    radial-gradient(circle at 20% 15%, rgba(123, 167, 255, 0.18), transparent 28%),
    radial-gradient(circle at 78% 25%, rgba(255, 134, 179, 0.16), transparent 24%),
    radial-gradient(circle at 55% 76%, rgba(125, 242, 191, 0.12), transparent 28%);
  pointer-events: none;
}

.hero-card > * {
  position: relative;
}

.hero-card__glow {
  position: absolute;
  inset: -20% -10% auto;
  height: 55%;
  background:
    radial-gradient(circle at 25% 25%, rgba(125, 242, 191, 0.28), transparent 30%),
    radial-gradient(circle at 72% 28%, rgba(123, 167, 255, 0.26), transparent 28%),
    radial-gradient(circle at 50% 60%, rgba(255, 134, 179, 0.16), transparent 34%);
  filter: blur(10px);
  opacity: 0.95;
  animation: float-orb 12s ease-in-out infinite alternate;
}

.card-kicker {
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.score-ring {
  width: min(100%, 300px);
  aspect-ratio: 1;
  border-radius: 50%;
  margin: 6px auto;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.07) 0 52%, transparent 53%),
    conic-gradient(from 180deg, var(--accent), var(--accent-2), var(--accent-3), var(--accent-4), var(--accent));
  box-shadow:
    inset 0 0 40px rgba(0, 0, 0, 0.25),
    0 18px 44px rgba(0, 0, 0, 0.22);
}

.score-ring > div {
  width: 72%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.08), transparent 58%),
    linear-gradient(180deg, #12182d, #0b1020 92%);
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.22);
}

.score-ring strong {
  font-size: clamp(2.3rem, 5vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.08em;
  font-family: var(--font-strong);
}

.score-ring span {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.card-note {
  color: var(--muted);
  line-height: 1.62;
}

.section-head {
  margin-bottom: 14px;
  max-width: 72ch;
  padding-left: 16px;
  border-left: 2px solid rgba(125, 242, 191, 0.5);
}

.section-head p:last-child {
  color: var(--muted);
  line-height: 1.65;
}

.section-note {
  margin-top: -6px;
  color: var(--muted);
  line-height: 1.65;
}

.section-head.compact {
  margin-bottom: 10px;
}

.battle-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 240px) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.profile-card,
.versus,
.info-card {
  padding: 18px;
}

.profile-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.profile-card::before {
  content: "";
  position: absolute;
  inset: auto -100px -120px auto;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(123, 167, 255, 0.12), transparent 64%);
  pointer-events: none;
}

.profile-card > * {
  position: relative;
}

.profile-header,
.score-row,
.result-panel,
.result-stats {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.profile-header p,
.score-row span,
.result-stats span {
  color: var(--muted);
}

.upload-zone {
  margin-top: 12px;
  display: block;
  position: relative;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  overflow: hidden;
  min-height: 260px;
  aspect-ratio: 4 / 5;
  cursor: pointer;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.02);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.upload-zone[hidden],
.upload-zone img[hidden],
.upload-placeholder[hidden] {
  display: none !important;
}

.upload-zone.has-preview {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 10;
  cursor: pointer;
  display: block;
}

.upload-zone:hover {
  transform: translateY(-2px);
  border-color: rgba(125, 242, 191, 0.35);
  background:
    linear-gradient(180deg, rgba(125, 242, 191, 0.05), rgba(123, 167, 255, 0.04)),
    rgba(255, 255, 255, 0.02);
}

.upload-zone:focus-within {
  border-color: rgba(125, 242, 191, 0.5);
}

.upload-zone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
  position: relative;
}

.upload-placeholder {
  min-height: 260px;
  height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 18px;
  color: var(--muted);
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.06), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
  position: relative;
  z-index: 2;
}

.upload-placeholder strong {
  color: var(--text);
  display: block;
  margin-bottom: 8px;
  font-size: 1.06rem;
}

.upload-trigger {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 5;
  width: calc(100% - 32px);
  justify-content: center;
  pointer-events: none;
}

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

.score-row strong {
  font-size: 1.7rem;
  letter-spacing: -0.06em;
}

.rating-stack {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.rating-block {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.rating-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.rating-head strong {
  font-size: 1.45rem;
  letter-spacing: -0.06em;
  line-height: 1;
}

.rating-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.rating-subtitle {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.bars {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.bars-row {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.03);
}

.bars-row__label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--muted);
}

.bar-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
}

.analysis-text {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.upload-error {
  margin: 10px 0 0;
  min-height: 1.4em;
  color: #ffd27d;
  font-size: 0.92rem;
  line-height: 1.4;
}

.hero-check-btn {
  width: 100%;
  margin-top: 10px;
}

.hero-status {
  margin-top: 10px;
  min-height: 1.4em;
}

.upload-file-name {
  margin: 8px 0 0;
  min-height: 1.3em;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
  word-break: break-word;
}

.upload-actions {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.upload-actions .button {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 0.9rem;
}

.analysis-summary,
.analysis-tip {
  margin: 0;
  line-height: 1.55;
  color: var(--muted);
}

.analysis-summary {
  color: var(--text);
  font-weight: 700;
}

.analysis-tip {
  font-size: 0.95rem;
}

.versus {
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.versus::before {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 210, 125, 0.1), transparent 66%);
  top: -70px;
  left: 50%;
  transform: translateX(-50%);
}

.versus > * {
  position: relative;
}

.versus-badge {
  width: 106px;
  height: 106px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-family: var(--font-strong);
  letter-spacing: -0.08em;
  font-weight: 700;
  color: #08101a;
  background: linear-gradient(135deg, rgba(125, 242, 191, 0.98), rgba(123, 167, 255, 0.98));
  box-shadow:
    0 18px 34px rgba(123, 167, 255, 0.16),
    0 0 0 10px rgba(123, 167, 255, 0.06);
}

.versus p {
  color: var(--muted);
  margin-bottom: 6px;
}

#battle-status {
  order: 4;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.03);
  color: var(--text);
  line-height: 1.5;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.versus .button {
  width: min(100%, 190px);
}

.versus .button.primary {
  order: 2;
}

.versus .button.secondary {
  order: 3;
}

.result-panel {
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    var(--panel-strong);
}

.world-battle {
  margin-top: 18px;
}

.world-battle-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
  align-items: stretch;
}

.world-card {
  display: flex;
  flex-direction: column;
}

.world-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.world-actions .button {
  flex: 1 1 220px;
  justify-content: center;
}

.world-credit {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid rgba(125, 242, 191, 0.16);
  background:
    linear-gradient(180deg, rgba(125, 242, 191, 0.06), rgba(123, 167, 255, 0.04)),
    rgba(255, 255, 255, 0.03);
  color: var(--text);
  line-height: 1.5;
}

.world-credit[data-state="empty"] {
  border-color: rgba(255, 196, 120, 0.28);
}

.world-status {
  margin: 10px 0 0;
  min-height: 1.5em;
  color: var(--muted);
  line-height: 1.5;
}

.world-result {
  display: grid;
  gap: 14px;
  min-height: 100%;
}

.world-result__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.world-result__title {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: -0.04em;
  font-size: clamp(1.2rem, 1.8vw, 1.8rem);
  line-height: 1;
}

.world-result__copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.world-result__summary {
  margin: 8px 0 0;
  color: var(--text);
  font-weight: 700;
  line-height: 1.45;
}

.world-result__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.world-result__stats div {
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.03);
}

.world-result__stats strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.05rem;
  font-family: var(--font-strong);
}

.world-result__stats span {
  color: var(--muted);
}

.world-result__battle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.world-result__battle-wrap {
  display: grid;
  gap: 12px;
}

.world-result__eyebrow {
  margin-bottom: 0;
}

.world-side-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.03);
}

.world-side-card--me {
  border-color: rgba(125, 242, 191, 0.18);
}

.world-side-card--opponent {
  border-color: rgba(123, 167, 255, 0.18);
}

.world-side-card__head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.world-side-card__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.world-side-card__badge {
  display: inline-flex;
  margin-top: 5px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.8rem;
}

.world-side-card__scores {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.world-side-card__switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    rgba(255, 255, 255, 0.025);
}

.world-side-card__switch-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.world-side-card__switch-btn:hover {
  color: var(--text);
}

.world-side-card__switch-btn.is-active {
  color: #0c1322;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  box-shadow: 0 12px 24px rgba(125, 242, 191, 0.18);
}

.world-side-card__score {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.03);
}

.world-side-card__score span {
  color: var(--muted);
  font-size: 0.85rem;
}

.world-side-card__score strong {
  font-size: 1.45rem;
  line-height: 1;
  letter-spacing: -0.05em;
}

.world-side-card .rating-stack {
  margin-top: 0;
}

.world-side-card [data-world-view-panel] {
  display: none;
}

.world-side-card [data-world-view-panel].is-active {
  display: block;
}

.world-side-card .rating-title {
  font-size: 0.88rem;
}

.world-side-card .rating-subtitle {
  font-size: 0.8rem;
}

.world-side-card .bars {
  grid-template-columns: 1fr;
}

.world-side-card .analysis-summary,
.world-side-card .analysis-tip {
  font-size: 0.88rem;
}

.result-stats {
  min-width: 250px;
}

.result-stats strong {
  display: block;
  margin-top: 4px;
  font-size: 1.05rem;
  font-family: var(--font-strong);
}

.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.info-card {
  position: relative;
  overflow: hidden;
}

.info-card::before {
  content: "";
  position: absolute;
  inset: auto -80px -90px auto;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(255, 134, 179, 0.08), transparent 65%);
  pointer-events: none;
}

.info-card > * {
  position: relative;
}

.check-list {
  display: grid;
  gap: 12px;
  color: var(--muted);
}

.check-list li {
  position: relative;
  padding-left: 26px;
  line-height: 1.55;
}

.check-list li::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  position: absolute;
  left: 0;
  top: 0.55em;
  transform: translateY(-50%);
  box-shadow: 0 0 0 4px rgba(125, 242, 191, 0.08);
}

#result-copy {
  color: var(--muted);
  line-height: 1.6;
}

.result-summary {
  margin-bottom: 0;
  margin-top: 10px;
  color: rgba(244, 247, 255, 0.92);
  line-height: 1.55;
}

.faq {
  margin-top: 18px;
}

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

.faq-card {
  padding: 18px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.035);
  box-shadow: var(--shadow);
}

.faq-card p {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0;
}

.site-footer {
  padding: 16px 8px 26px;
  align-items: flex-end;
}

.site-footer p {
  margin-bottom: 0;
}

.legal-page .page-shell {
  padding-top: 34px;
}

.legal-hero {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 90% 10%, rgba(123, 167, 255, 0.16), transparent 24%),
    radial-gradient(circle at 16% 24%, rgba(125, 242, 191, 0.12), transparent 20%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    var(--panel);
  box-shadow: var(--shadow);
}

.legal-hero p,
.legal-content p,
.legal-content li {
  color: var(--muted);
  line-height: 1.7;
}

.legal-content {
  margin-top: 18px;
  display: grid;
  gap: 18px;
}

.legal-card {
  padding: 24px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.035);
  box-shadow: var(--shadow);
}

.legal-card h2,
.legal-card h3 {
  margin-bottom: 10px;
}

.legal-card ul {
  margin: 0;
  padding-left: 20px;
}

.legal-card li + li {
  margin-top: 8px;
}

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

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

.pill {
  font-size: 0.84rem;
}

@keyframes button-spin {
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

@media (max-width: 980px) {
  .site-header,
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .lang-switch {
    margin-left: 0;
  }

  .legal-dock {
    left: 14px;
    right: 14px;
    bottom: 14px;
    justify-content: center;
  }

  .hero,
  .battle-grid,
  .world-battle-grid,
  .grid-two,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .world-result__header,
  .world-result__battle {
    grid-template-columns: 1fr;
  }

  .versus {
    order: 2;
    min-height: 220px;
  }

  #battle-status {
    padding: 11px 12px;
    border-radius: 16px;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: calc(100vw - 16px);
    max-width: var(--page-max);
    padding: 12px 0 28px;
  }

  .site-header {
    width: calc(100vw - 16px);
    max-width: var(--page-max);
    top: 0;
    margin-top: 0;
    padding: 8px 10px;
    border-radius: 18px;
  }

  .site-brand {
    gap: 10px;
  }

  .site-nav,
  .footer-nav {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar,
  .footer-nav::-webkit-scrollbar {
    display: none;
  }

  .site-nav a,
  .footer-nav a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .lang-switch {
    width: 100%;
    justify-content: space-between;
  }

  .legal-dock {
    padding: 10px;
  }

  .legal-dock__label {
    display: none;
  }

  .mode-tabs--page {
    width: calc(100vw - 16px);
    max-width: var(--page-max);
    padding: 0 12px;
  }

  .legal-page .legal-hero {
    gap: 10px;
  }

  .legal-page .legal-hero h1 {
    max-width: 100%;
    font-size: clamp(1.8rem, 6vw, 2.4rem);
    line-height: 1;
  }

  .legal-page .legal-hero p,
  .legal-page .legal-content p,
  .legal-page .legal-content li {
    font-size: 0.98rem;
    line-height: 1.58;
  }

  .legal-page .legal-content {
    gap: 12px;
  }

  .hero-copy,
  .hero-card,
  .profile-card,
  .versus,
  .info-card,
  .result-panel {
    border-radius: 22px;
    padding: 18px;
  }

  .hero-copy {
    padding-bottom: 26px;
  }

  h1 {
    font-size: clamp(2.35rem, 14vw, 3.5rem);
    line-height: 0.94;
    max-width: 100%;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .button {
    width: 100%;
    justify-content: center;
  }

  .feature-list {
    gap: 8px;
  }

  .feature-list li {
    width: 100%;
  }

  .hero-card {
    gap: 14px;
    padding-block: 22px;
  }

  .score-ring {
    width: 100%;
    max-width: 240px;
  }

  .upload-zone,
  .upload-placeholder,
  .upload-zone img {
    min-height: 240px;
    height: 240px;
  }

  .score-ring {
    width: 100%;
  }

  .result-panel,
  .profile-header,
  .score-row,
  .result-stats {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .result-panel {
    gap: 18px;
  }

  .result-stats {
    width: 100%;
  }

  .world-result__stats,
  .world-side-card__scores {
    grid-template-columns: 1fr;
  }

  .world-result__stats {
    grid-template-columns: 1fr;
  }

  .faq-card,
  .legal-hero,
  .legal-card {
    padding: 18px;
  }

  .legal-hero h1 {
    font-size: clamp(1.85rem, 8vw, 2.45rem);
  }

  .site-footer {
    gap: 14px;
  }
}

@media (min-width: 1280px) {
  .hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  }

  .hero-copy,
  .hero-card {
    min-height: 440px;
  }

  .battle-grid {
    grid-template-columns: minmax(0, 1fr) 260px minmax(0, 1fr);
  }

  .world-battle-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }
}

@media (min-width: 1280px) and (max-height: 920px) {
  .page-shell {
    padding-bottom: 28px;
  }

  .hero,
  .battle,
  .grid-two,
  .world-battle,
  .faq {
    margin-top: 14px;
  }

  .hero-copy,
  .hero-card {
    min-height: 400px;
  }

  .upload-zone,
  .upload-placeholder,
  .upload-zone img {
    min-height: 220px;
    height: 220px;
  }

  .profile-card,
  .versus,
  .info-card {
    padding: 16px;
  }

  .score-row {
    padding-top: 10px;
    margin-top: 10px;
  }

  .rating-stack {
    margin-top: 10px;
    gap: 8px;
  }

  .result-panel {
    margin-top: 12px;
    padding: 14px 16px;
  }

  .world-credit,
  .world-status {
    margin-top: 8px;
  }
}
