:root {
  --bg: #0b0b0d;
  --panel: #15171b;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f3f4f6;
  --muted: #a1a1aa;
  --accent: #ef4444;
  --accent-2: #b91c1c;
  --gold: #f5c542;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(239, 68, 68, 0.18), transparent 30%),
    linear-gradient(180deg, #0a0a0b 0%, #101114 50%, #09090b 100%);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 32px 16px 56px;
}

.app {
  width: 100%;
  max-width: 1080px;
}

.hero {
  text-align: center;
  margin-bottom: 24px;
  padding: 20px 16px 8px;
}

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

.eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.25em;
  color: var(--gold);
  padding: 8px 12px;
  border: 1px solid rgba(245, 197, 66, 0.2);
  border-radius: 999px;
  background: rgba(245, 197, 66, 0.06);
}

.lang-toggle {
  display: inline-flex;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
}

.lang-toggle button,
.toggle button {
  border: none;
  cursor: pointer;
  transition: 0.2s ease;
}

.lang-toggle button {
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.lang-toggle button.active,
.toggle button.active {
  color: white;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-2) 100%);
  box-shadow: 0 8px 22px rgba(239, 68, 68, 0.28);
}

h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 0.95;
  letter-spacing: 0.05em;
  font-weight: 900;
  text-transform: uppercase;
  text-shadow: 0 4px 24px rgba(239, 68, 68, 0.18);
}

.hero p {
  margin: 14px auto 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.card {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01)),
    linear-gradient(180deg, #17191d 0%, #111317 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.03), transparent 35%),
    repeating-linear-gradient(
      135deg,
      rgba(255,255,255,0.02) 0px,
      rgba(255,255,255,0.02) 2px,
      transparent 2px,
      transparent 10px
    );
  pointer-events: none;
  opacity: 0.35;
}

.section {
  position: relative;
  z-index: 1;
  padding: 24px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  font-size: 14px;
  color: #ffffff;
}

.section-subtitle {
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

.page-nav-wrap,
.seo-copy-wrap,
.guide-copy-wrap,
.faq-wrap,
.site-footer {
  margin-bottom: 20px;
}

.page-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.page-link {
  display: block;
  text-decoration: none;
  color: var(--text);
  padding: 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  transition: 0.2s ease;
}

.page-link:hover,
.page-link.active {
  transform: translateY(-1px);
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.08);
}

.page-link strong {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
}

.page-link span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.result-shell {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

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

.field {
  text-align: left;
  margin-bottom: 14px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #e5e7eb;
}

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

input,
select {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: white;
  font-size: 15px;
  outline: none;
  transition: 0.2s ease;
}

input::placeholder {
  color: #71717a;
}

input:focus,
select:focus {
  border-color: rgba(239, 68, 68, 0.55);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
  background: rgba(255,255,255,0.06);
}

.toggle {
  display: inline-flex;
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 4px;
  gap: 4px;
}

.toggle button {
  flex: 1;
  border-radius: 10px;
  padding: 11px 12px;
  font-weight: 800;
  background: transparent;
  color: var(--muted);
}

.main-btn,
.share-btn {
  width: 100%;
  border: none;
  border-radius: 16px;
  padding: 16px 18px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: 0.2s ease;
}

.main-btn {
  margin-top: 8px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-2) 100%);
  color: white;
  box-shadow: 0 14px 30px rgba(239, 68, 68, 0.28);
}

.main-btn:hover,
.share-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.placeholder {
  color: var(--muted);
  text-align: center;
  border: 1px dashed rgba(255,255,255,0.12);
  border-radius: 18px;
  padding: 30px 18px;
  background: rgba(255,255,255,0.025);
}

.result-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 18px;
  padding: 20px;
  text-align: left;
}

.result-topline {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 12px;
}

.result-label {
  color: #f2eee6;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.big-number {
  font-size: clamp(38px, 5vw, 54px);
  font-weight: 900;
  line-height: 1;
  margin: 4px 0 10px;
}

.result-number-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.result-top-percent {
  color: #f5c542;
}

.percentile-mode-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.result-meta-compact {
  margin-top: 0;
}

.mode-toggle-btn {
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: #f3f4f6;
  border-radius: 999px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: 0.2s ease;
}

.mode-toggle-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(245, 197, 66, 0.35);
  background: rgba(245, 197, 66, 0.1);
}

.result-support {
  color: #f4f0e8;
  line-height: 1.55;
}

.result-support-main {
  margin-top: 12px;
  font-size: 19px;
  font-weight: 900;
}

.result-support-detail {
  font-size: 17px;
  font-weight: 800;
}

.result-meta {
  margin-top: 10px;
  color: #ddd6ca;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
}

.muted {
  color: var(--muted);
  font-size: 14px;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.mini-stat {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 14px;
  text-align: center;
}

.mini-stat .label {
  color: #ddd6ca;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.mini-stat .value {
  font-size: 24px;
  font-weight: 900;
}

.rank-badge {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
}

.progress-wrap {
  margin-top: 18px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  color: #e5dfd3;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 8px;
}

.progress {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
}

.progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ef4444, #f59e0b);
  transition: width 0.4s ease;
}

.share-btn {
  margin-top: 14px;
  background: rgba(255,255,255,0.06);
  color: white;
  border: 1px solid rgba(255,255,255,0.08);
}

.share-fallback-wrap {
  margin-top: 16px;
}

.share-fallback-title {
  margin-bottom: 10px;
}

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

.share-fallback-btn {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
  color: #f3f4f6;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease;
}

.share-fallback-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(245, 197, 66, 0.3);
  background: rgba(255,255,255,0.08);
}

.share-fallback-btn-kakao {
  background: #fee500;
  color: #181600;
  border-color: rgba(254, 229, 0, 0.4);
}

.footer-note,
.seo-copy p,
.guide-copy p,
.faq-answer {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.seo-copy h2,
.guide-copy h2,
.faq-title {
  margin: 0 0 12px;
  font-size: 24px;
}

.seo-copy p + p,
.guide-copy p + p {
  margin-top: 10px;
}

.site-footer {
  overflow: hidden;
}

.footer-content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.footer-brand {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-summary {
  max-width: 560px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.footer-links a {
  color: #f4e7c1;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
}

.footer-links a:hover {
  text-decoration: underline;
}

.info-page {
  width: 100%;
  max-width: 840px;
}

.policy-hero {
  margin-bottom: 20px;
}

.policy-eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.policy-card + .policy-card {
  margin-top: 20px;
}

.policy-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.policy-card h3 {
  margin: 18px 0 8px;
  font-size: 16px;
}

.policy-card p,
.policy-card li {
  color: #d5d8df;
  font-size: 15px;
  line-height: 1.75;
}

.policy-card a {
  color: #f4e7c1;
}

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

.policy-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.policy-nav a {
  color: #f4e7c1;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
}

.policy-nav a:hover {
  text-decoration: underline;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  padding: 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

.faq-question {
  font-weight: 800;
  margin-bottom: 8px;
}

@media (max-width: 920px) {
  .page-nav {
    grid-template-columns: 1fr 1fr;
  }

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

  .footer-content {
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .share-fallback-grid {
    grid-template-columns: 1fr;
  }

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

  .section {
    padding: 18px;
  }

  .grid,
  .result-grid,
  .page-nav {
    grid-template-columns: 1fr;
  }

  h1 {
    letter-spacing: 0.03em;
  }
}

.tier-card {
  overflow: hidden;
}

.tier-card::after {
  content: "";
  position: absolute;
  inset: auto -60px -70px auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.18), transparent 68%);
  opacity: 0.45;
  pointer-events: none;
}

.tier-showcase {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 18px 0 18px;
}

.tier-emblem {
  position: relative;
  width: 88px;
  height: 88px;
  flex: 0 0 88px;
  display: grid;
  place-items: center;
  clip-path: polygon(50% 0%, 84% 18%, 100% 50%, 84% 82%, 50% 100%, 16% 82%, 0% 50%, 16% 18%);
  border: 1px solid rgba(255,255,255,0.28);
  box-shadow: inset 0 0 28px rgba(255,255,255,0.14), 0 16px 30px rgba(0,0,0,0.28);
}

.tier-emblem::before {
  content: "";
  position: absolute;
  inset: 8px;
  clip-path: inherit;
  border: 1px solid rgba(255,255,255,0.2);
}

.tier-emblem span {
  position: relative;
  z-index: 1;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #f8fafc;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.tier-name {
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 6px;
}

.tier-iron { border-color: rgba(112, 118, 127, 0.45); }
.tier-bronze { border-color: rgba(157, 107, 74, 0.5); }
.tier-silver { border-color: rgba(180, 192, 208, 0.5); }
.tier-gold { border-color: rgba(246, 216, 106, 0.45); }
.tier-platinum { border-color: rgba(119, 217, 210, 0.45); }
.tier-emerald { border-color: rgba(76, 224, 154, 0.45); }
.tier-diamond { border-color: rgba(121, 198, 255, 0.45); }
.tier-master { border-color: rgba(192, 132, 252, 0.45); }
.tier-grandmaster { border-color: rgba(251, 113, 133, 0.45); }

.tier-emblem-iron { background: linear-gradient(160deg, #70767f, #3a4048); }
.tier-emblem-bronze { background: linear-gradient(160deg, #9d6b4a, #5c341f); }
.tier-emblem-silver { background: linear-gradient(160deg, #d7dce3, #7a8594); }
.tier-emblem-gold { background: linear-gradient(160deg, #f6d86a, #9d6912); }
.tier-emblem-platinum { background: linear-gradient(160deg, #77d9d2, #1d7d78); }
.tier-emblem-emerald { background: linear-gradient(160deg, #4ce09a, #0d6a49); }
.tier-emblem-diamond { background: linear-gradient(160deg, #79c6ff, #2f53c6); }
.tier-emblem-master { background: linear-gradient(160deg, #c084fc, #6b21a8); }
.tier-emblem-grandmaster { background: linear-gradient(160deg, #fb7185, #b91c1c); }

@media (max-width: 520px) {
  .tier-showcase {
    flex-direction: column;
    align-items: flex-start;
  }

  .tier-emblem {
    width: 76px;
    height: 76px;
    flex-basis: 76px;
  }

  .tier-name {
    font-size: 28px;
  }
}
