:root {
  color-scheme: light;
  --bg: #dff5ff;
  --card: #f7fcff;
  --field: rgba(255, 255, 255, 0.72);
  --line: rgba(32, 92, 124, 0.12);
  --line-strong: rgba(32, 92, 124, 0.2);
  --text: #102a3a;
  --muted: #527084;
  --disabled: #b7d7e8;
  --control: rgba(214, 242, 255, 0.82);
  --control-ink: #214b61;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

body {
  overscroll-behavior: none;
}

button,
input {
  font: inherit;
  outline: none;
  box-shadow: none;
}

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible {
  box-shadow: none;
}

.screen {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100dvh;
  padding: 0 18px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(223, 245, 255, 0.48), rgba(197, 232, 249, 0.66)),
    url("./background.jpg") center / cover no-repeat,
    #dff5ff;
}

.profile-register,
.done-card {
  width: min(430px, 100%);
  background: transparent;
}

.profile-register {
  display: grid;
  gap: 14px;
  max-height: calc(100dvh - 28px);
  overflow: visible;
}

.intro {
  display: grid;
  gap: 6px;
  text-align: left;
}

.intro p {
  margin: 0;
  color: rgba(16, 42, 58, 0.62);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
}

.intro h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(26px, 7vw, 34px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.profile-shell {
  position: relative;
  min-height: 226px;
  padding: 0;
}

.banner {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 158px;
  border: 0;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(88, 174, 225, 0.72), rgba(215, 246, 255, 0.78));
  overflow: hidden;
  transition: border-color 140ms ease, background 140ms ease;
}

.banner::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(24, 91, 128, 0.18));
  content: "";
  pointer-events: none;
}

.banner:hover,
.avatar:hover {
  border-color: transparent;
}

.picked-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 160ms ease;
}

.has-image .picked-image {
  opacity: 1;
}

.banner-action {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--control);
  transition: background 140ms ease;
}

.banner-action img {
  width: 17px;
  height: 17px;
  object-fit: contain;
  filter: invert(25%) sepia(22%) saturate(1190%) hue-rotate(156deg) brightness(91%) contrast(90%);
}

.has-image .banner-action {
  background: var(--control);
}

.avatar {
  position: absolute;
  left: 50%;
  top: 112px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border: 8px solid rgba(214, 242, 255, 0.9);
  border-radius: 50%;
  background: rgba(244, 251, 255, 0.82);
  overflow: visible;
  transform: translateX(-50%);
  transition: border-color 140ms ease;
}

.avatar::after {
  position: absolute;
  inset: 0;
  border: 0;
  border-radius: 50%;
  pointer-events: none;
  content: "";
}

.avatar .picked-image {
  border-radius: 50%;
}

.avatar-placeholder {
  display: none;
}

.has-image .avatar-placeholder {
  opacity: 0;
}

.avatar-action {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 5px solid rgba(214, 242, 255, 0.9);
  border-radius: 50%;
  background: var(--control);
}

.avatar-action img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  filter: invert(25%) sepia(22%) saturate(1190%) hue-rotate(156deg) brightness(91%) contrast(90%);
}

.form-area {
  display: grid;
  gap: 10px;
  padding: 0;
}

.name-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.name-field {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  border: 0;
  border-radius: 15px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(12px);
  transition: border-color 180ms ease, background 180ms ease;
}

.name-field:focus-within {
  background: rgba(255, 255, 255, 0.92);
}

input[type="text"] {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
}

input::placeholder {
  color: rgba(16, 42, 58, 0.42);
}

.submit {
  min-height: 52px;
  margin-top: 6px;
  border-radius: 15px;
  background: var(--disabled);
  color: #5b8498;
  font-size: 15px;
  font-weight: 700;
  cursor: not-allowed;
  transition: background 140ms ease, color 140ms ease;
}

.submit.ready {
  background: #102a3a;
  color: #ffffff;
  cursor: pointer;
}

.done {
  display: none;
  width: min(430px, 100%);
}

.done.active {
  display: block;
}

.done-card {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 36px 0;
  text-align: center;
}

.done-avatar {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border: 8px solid var(--bg);
  border-radius: 50%;
  overflow: hidden;
  background: rgba(244, 251, 255, 0.82);
}

.done-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.done-card h1 {
  margin: 0;
  font-size: clamp(30px, 7vw, 48px);
  line-height: 1;
  font-weight: 800;
}

.done-card p {
  max-width: 330px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.42;
}

.file-input {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 520px) {
  .screen {
    place-items: center;
    padding: 14px;
  }

  .profile-register,
  .done-card {
    border-radius: 0;
  }

  .banner {
    height: 148px;
    border-radius: 22px;
  }

  .profile-shell {
    min-height: 214px;
  }

  .avatar {
    top: 104px;
    width: 92px;
    height: 92px;
  }

  .form-area {
    padding: 0;
  }
}
