:root {
  --bg: #111822;
  --panel: #182433;
  --panel-2: #202d3b;
  --panel-3: #0d141d;
  --ink: #edf4fb;
  --muted: #8da2b5;
  --line: #2f4050;
  --steam-blue: #66c0f4;
  --cyan: #8fdbff;
  --lime: #b8e45c;
  --gold: #ffd166;
  --rose: #ff6f8f;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(27, 40, 56, 0.92) 0, rgba(27, 40, 56, 0.18) 270px, transparent 520px),
    radial-gradient(circle at 50% -80px, rgba(102, 192, 244, 0.2), transparent 360px),
    #1b2838;
  color: var(--ink);
  font-family: "Trebuchet MS", "Noto Sans SC", sans-serif;
}

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

button {
  cursor: pointer;
}

.steam-bar {
  background: #171a21;
  border-bottom: 1px solid #000;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

.steam-inner {
  width: min(1040px, calc(100vw - 28px));
  min-height: 0;
  margin: 0 auto;
  padding: 18px 0;
  display: flex;
  align-items: center;
  gap: 28px;
}

.steam-logo {
  color: #dcdedf;
  font-size: clamp(15px, 2.4vw, 24px);
  font-weight: 900;
  letter-spacing: 1px;
  line-height: 1.15;
  text-decoration: none;
}

.steam-page {
  width: min(1040px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 28px 0 70px;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.game-header {
  position: relative;
  display: grid;
  grid-template-columns: clamp(300px, 34%, 430px) minmax(0, 1fr);
  gap: 18px;
  min-height: 162px;
  padding: 16px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.42), rgba(26, 43, 58, 0.76)),
    linear-gradient(135deg, #29445d, #121b25);
  box-shadow: 0 0 0 1px rgba(103, 193, 245, 0.12), 0 18px 42px rgba(0, 0, 0, 0.34);
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: 0;
}

.capsule-art {
  --class-size: clamp(46px, 17cqw, 72px);
  container-type: inline-size;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 4cqw, 18px);
  min-height: 0;
  aspect-ratio: 16 / 9;
  padding: clamp(10px, 4cqw, 18px);
  overflow: hidden;
  background:
    linear-gradient(140deg, rgba(102, 192, 244, 0.18), transparent 46%),
    linear-gradient(180deg, #2b475f, #101720);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-stage {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 1 auto;
  max-width: 45%;
  height: calc(var(--class-size) * 1.55);
}

.logo-stage::before,
.preview-logo-stage::before {
  content: "";
  position: absolute;
  inset: 18% 4% 8%;
  border-radius: 999px;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(102, 192, 244, 0.2), rgba(102, 192, 244, 0.04) 52%, transparent 72%),
    radial-gradient(ellipse at 50% 86%, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.25) 48%, transparent 74%);
  filter: blur(13px);
  transform: translateY(8%);
  opacity: 0.95;
}

.logo-stage img {
  position: relative;
  width: auto;
  height: calc(var(--class-size) * 1.55);
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.52)) drop-shadow(0 0 12px rgba(229, 168, 35, 0.2));
}

.logo-stage img.logo-white {
  filter: brightness(0) invert(1) drop-shadow(0 8px 16px rgba(0, 0, 0, 0.52)) drop-shadow(0 0 12px rgba(102, 192, 244, 0.18));
}

.class-lockup {
  display: grid;
  width: max-content;
  gap: 0;
}

.class-word,
.year-word {
  display: block;
  color: #dfe3e6;
  font-size: var(--class-size);
  font-weight: 900;
  line-height: 0.86;
  text-shadow: 0 5px 18px rgba(0, 0, 0, 0.75), 0 0 18px rgba(102, 192, 244, 0.16);
}

.year-word {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.steam-breadcrumb {
  margin-bottom: 8px;
  color: #8f98a0;
  font-size: 12px;
}

.hero-text {
  max-width: 560px;
  margin-bottom: 0;
  color: #c7d5e0;
  font-size: 14px;
  line-height: 1.55;
}

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

.summary-meta {
  display: grid;
  gap: 9px;
  margin-top: 24px;
}

.global-stat span {
  color: #8f98a0;
  font-size: 12px;
}

.unlock-summary {
  margin: 0;
  color: #8f98a0;
  font-size: 14px;
}

.unlock-summary strong {
  color: #c7d5e0;
  font-size: 15px;
  font-weight: 700;
}

.summary-progress {
  display: grid;
}

.progress-track {
  display: block;
  height: 13px;
  overflow: hidden;
  background: #000;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--steam-blue), var(--lime));
  transition: width 320ms ease;
}

.content-layout {
  margin-top: 24px;
}

.profile-panel,
.survey-panel {
  padding: 18px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(13, 24, 34, 0.7));
  box-shadow: 0 0 0 1px rgba(103, 193, 245, 0.1), 0 18px 42px rgba(0, 0, 0, 0.24);
}

.register-card {
  display: grid;
  gap: 18px;
}

.register-top {
  padding: 2px 0 8px;
  border-bottom: 1px solid rgba(143, 219, 255, 0.12);
}

.register-top h2 {
  margin-bottom: 0;
  color: #c7d5e0;
  font-size: 28px;
  font-weight: 400;
}

.register-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 18px;
}

.register-fields {
  display: grid;
  gap: 13px;
  padding: 16px;
  background: linear-gradient(90deg, rgba(38, 55, 71, 0.95), rgba(22, 32, 43, 0.95));
}

.logo-tone-field {
  display: grid;
  gap: 7px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.logo-tone-field legend {
  color: #c9d8e5;
  font-size: 14px;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(320px, 100%);
  min-height: 42px;
  overflow: hidden;
  border: 1px solid rgba(143, 219, 255, 0.17);
  background: rgba(7, 13, 20, 0.72);
}

.segmented-control label {
  display: grid;
  place-items: center;
  min-width: 0;
  color: #8f98a0;
}

.segmented-control label + label {
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.segmented-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-control span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 0 12px;
}

.segmented-control input:checked + span {
  color: #fff;
  background: linear-gradient(180deg, #316282, #1a3d57);
}

.register-preview {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 9px;
  min-height: 282px;
  padding: 24px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 62% 44% at 50% 36%, rgba(102, 192, 244, 0.18) 0%, rgba(102, 192, 244, 0.08) 42%, rgba(102, 192, 244, 0) 78%),
    linear-gradient(160deg, #2a465e, #111a24 70%);
  border: 1px solid rgba(103, 193, 245, 0.16);
}

.register-preview::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.preview-logo-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: min(230px, 76%);
  height: 122px;
}

.preview-logo-stage::before {
  inset: 10% 4% 0;
  background: radial-gradient(ellipse at 50% 58%, rgba(102, 192, 244, 0.18) 0%, rgba(102, 192, 244, 0.08) 42%, rgba(102, 192, 244, 0) 76%);
  filter: blur(18px);
  opacity: 0.72;
}

.preview-logo-stage img {
  position: relative;
  width: auto;
  height: 122px;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.52)) drop-shadow(0 0 12px rgba(229, 168, 35, 0.18));
}

.preview-logo-stage img.logo-white {
  filter: brightness(0) invert(1) drop-shadow(0 12px 20px rgba(0, 0, 0, 0.52)) drop-shadow(0 0 12px rgba(102, 192, 244, 0.18));
}

.register-preview span {
  position: relative;
  color: #dfe3e6;
  font-size: 30px;
  font-weight: 900;
  line-height: 0.9;
  text-shadow: 0 5px 18px rgba(0, 0, 0, 0.72);
}

.register-preview strong {
  position: relative;
  max-width: 100%;
  color: #c7d5e0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  overflow-wrap: anywhere;
}

.register-preview small {
  position: relative;
  color: #8f98a0;
  font-size: 13px;
}

.survey-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.survey-head h2 {
  margin-bottom: 0;
  color: #c7d5e0;
  font-size: 24px;
  font-weight: 400;
}

.survey-head span {
  color: #8f98a0;
}

.survey-head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.compact-button {
  min-height: 34px;
}

#survey-form {
  display: grid;
  gap: 18px;
}

.school-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: linear-gradient(90deg, rgba(38, 55, 71, 0.95), rgba(22, 32, 43, 0.95));
  color: #c7d5e0;
}

.school-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.school-panel-head h3 {
  margin-bottom: 0;
  font-size: 18px;
  font-weight: 400;
}

.school-panel-head span {
  color: #8f98a0;
  font-size: 13px;
}

.school-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) 1fr 1fr;
  gap: 12px;
}

.survey-list {
  display: grid;
  gap: 8px;
}

.survey-item {
  position: relative;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 12px 14px;
  background: linear-gradient(90deg, rgba(38, 55, 71, 0.95), rgba(22, 32, 43, 0.95));
  color: #c7d5e0;
}

.survey-item > input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.survey-check {
  display: grid;
  place-items: center;
  width: 22px;
  aspect-ratio: 1;
  border: 1px solid rgba(103, 193, 245, 0.38);
  background: #0d151f;
}

.survey-check::after {
  content: "";
  width: 10px;
  aspect-ratio: 1;
  background: #66c0f4;
  transform: scale(0);
  transition: transform 140ms ease;
}

.survey-item:has(input[type="checkbox"]:checked) {
  background: linear-gradient(90deg, rgba(49, 98, 130, 0.9), rgba(23, 45, 61, 0.95));
}

.survey-item > input[type="checkbox"]:checked + .survey-check::after {
  transform: scale(1);
}

.survey-copy {
  display: grid;
  gap: 5px;
}

.survey-copy strong {
  font-size: 16px;
  font-weight: 400;
}

.survey-copy small {
  color: #8f98a0;
  font-size: 13px;
  line-height: 1.45;
}

.survey-date-field {
  display: none;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  color: #8f98a0;
  font-size: 13px;
}

.survey-date-field input {
  width: 170px;
  padding: 8px 10px;
}

.survey-item:has(input[type="checkbox"]:checked) .survey-date-field {
  display: flex;
}

.identity-panel {
  display: grid;
  gap: 8px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(103, 193, 245, 0.14);
  color: #c7d5e0;
}

.identity-panel input {
  max-width: 360px;
}

.filter,
.ghost-button,
.danger-button,
.primary-button {
  min-height: 42px;
  border: 1px solid transparent;
  color: var(--ink);
}

.tab-strip {
  display: flex;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0.02));
}

.filter {
  min-height: 38px;
  padding: 0 17px;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  background: transparent;
  color: #8f98a0;
}

.filter.active {
  color: #fff;
  background: linear-gradient(180deg, #316282, #1a3d57);
}

.primary-button {
  background: linear-gradient(180deg, #67c1f5 0%, #417a9b 100%);
  border-color: rgba(255, 255, 255, 0.18);
  color: #e5f4ff;
}

.primary-button:hover {
  background: linear-gradient(180deg, #7fd3ff 0%, #4f91b8 100%);
}

.achievement-board {
  padding-bottom: 20px;
  animation: result-pop 220ms ease-out;
}

.section-heading,
.form-title,
.achievement-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.achievement-board .section-heading {
  justify-content: flex-end;
  margin-top: 10px;
}

.section-heading h2,
.form-title h2 {
  margin-bottom: 0;
  color: #c7d5e0;
  font-size: 20px;
  font-weight: 400;
}

.section-heading span {
  color: var(--muted);
}

.achievement-grid {
  display: grid;
  gap: 7px;
  margin-top: 16px;
}

.achievement-card {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 112px;
  gap: 14px;
  min-height: 92px;
  padding: 12px;
  border: 0;
  background: linear-gradient(90deg, rgba(38, 55, 71, 0.95), rgba(22, 32, 43, 0.95));
  overflow: hidden;
}

.achievement-card.locked {
  opacity: 0.62;
}

.achievement-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(102, 192, 244, 0.12), transparent);
  transform: translateX(-100%);
  transition: transform 620ms ease;
}

.achievement-card:hover::before {
  transform: translateX(100%);
}

.achievement-card:hover {
  background: linear-gradient(90deg, rgba(56, 79, 99, 0.98), rgba(30, 46, 61, 0.98));
}

.badge {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  aspect-ratio: 1;
  border-radius: 0;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), transparent 45%),
    linear-gradient(145deg, #67c1f5, #1b3f58);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
  font-weight: 900;
  color: #08131c;
}

.badge[data-rarity="rare"] {
  background: linear-gradient(145deg, #ffd166, #8c6114);
}

.badge[data-rarity="legendary"] {
  background: linear-gradient(145deg, #ff6f8f, #6632b0);
}

.badge[data-rarity="uncommon"] {
  background: linear-gradient(145deg, #b8e45c, #2d673d);
}

.achievement-copy {
  position: relative;
  min-width: 0;
  align-self: center;
}

.achievement-copy h3 {
  margin-bottom: 3px;
  color: #c7d5e0;
  font-size: 17px;
  font-weight: 400;
}

.achievement-copy p {
  margin-bottom: 8px;
  color: #8f98a0;
  font-size: 13px;
  line-height: 1.45;
}

.rarity {
  flex: 0 0 auto;
  border: 0;
  padding: 0;
  color: #66c0f4;
  font-size: 12px;
}

time {
  color: var(--muted);
  font-size: 12px;
}

.global-stat {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: end;
  gap: 4px;
  padding-right: 6px;
  text-align: right;
}

.global-stat strong {
  color: #c7d5e0;
  font-size: 22px;
  font-weight: 400;
}

.result-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}

.share-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
}

.share-dialog {
  width: min(460px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 18px;
  background: #16202b;
  box-shadow: 0 0 0 1px rgba(103, 193, 245, 0.18), 0 30px 90px rgba(0, 0, 0, 0.55);
}

.share-dialog img {
  display: block;
  width: 100%;
  margin-top: 16px;
  background: #0b1118;
}

.share-download {
  display: grid;
  place-items: center;
  margin-top: 14px;
  text-decoration: none;
}

@keyframes result-pop {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hidden {
  display: none;
}

label {
  display: grid;
  gap: 7px;
  color: #c9d8e5;
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(143, 219, 255, 0.17);
  border-radius: 6px;
  background: rgba(7, 13, 20, 0.72);
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--steam-blue);
  box-shadow: 0 0 0 3px rgba(102, 192, 244, 0.13);
}

.primary-button {
  padding: 0 18px;
  font-weight: 800;
}

.ghost-button,
.danger-button {
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(143, 219, 255, 0.18);
}

@media (max-width: 860px) {
  .steam-inner {
    padding: 14px 0;
    justify-content: space-between;
  }

  .game-header {
    grid-template-columns: 1fr;
  }

  .game-header {
    padding: 12px;
  }

  .capsule-art {
    aspect-ratio: 16 / 8;
  }

  .register-body {
    grid-template-columns: 1fr;
  }

  .register-preview {
    min-height: 220px;
  }

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

}

@media (max-width: 540px) {
  .steam-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
    padding: 12px 0;
  }

  .capsule-art {
    --class-size: clamp(34px, 13cqw, 48px);
    gap: 8px;
    padding: 10px;
  }

  .tab-strip {
    overflow-x: auto;
  }

  .achievement-card {
    grid-template-columns: 58px minmax(0, 1fr);
    min-height: 96px;
    padding: 12px;
  }

  .badge {
    width: 58px;
  }

  .global-stat {
    display: none;
  }

  .rarity {
    display: none;
  }

  .achievement-copy p {
    margin-bottom: 8px;
  }

  .achievement-topline,
  .survey-head,
  .survey-head-actions,
  .result-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .register-top h2 {
    font-size: 24px;
  }

  .register-fields {
    padding: 14px;
  }
}
