:root {
  --master-bg-dark: #071e21;
  --master-bg: #0a2527;
  --master-bg-mid: #154a4f;
  --master-panel: rgba(9, 31, 34, 0.78);
  --master-panel-border: rgba(255, 255, 255, 0.14);
  --master-text: #f2f7f6;
  --master-muted: rgba(214, 230, 226, 0.78);
  --master-accent: #d9bd76;
  --master-accent-soft: #ecd7a7;
  --master-danger: #ff8f8f;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.master-body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--master-text);
  background:
    radial-gradient(1100px 500px at 20% -10%, rgba(29, 99, 105, 0.28), transparent 60%),
    radial-gradient(900px 480px at 100% 0%, rgba(217, 189, 118, 0.12), transparent 55%),
    linear-gradient(160deg, var(--master-bg-dark) 0%, var(--master-bg) 48%, var(--master-bg-mid) 100%);
}

.master-shell {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 24px 18px 28px;
}

.master-lang-notch {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scale(0.74);
  transform-origin: left center;
  z-index: 220;
  padding: 10px 8px 10px 4px;
  border-radius: 0 22px 22px 0;
  background: rgba(7, 30, 33, 0.92);
  border: 1px solid rgba(10, 37, 39, 0.75);
  border-left: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 8px 24px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
}

.master-lang-notch-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.master-lang-notch-btn {
  width: 3rem;
  min-height: 2.65rem;
  border: none;
  border-radius: 999px;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: rgba(236, 245, 243, 0.78);
  background: rgba(7, 30, 33, 0.9);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.master-lang-notch-btn.is-active {
  color: #e8d4a0;
  box-shadow: inset 0 0 0 1px rgba(217, 189, 118, 0.45);
}

.master-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.master-head-brand {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.master-head-logo {
  width: 44px;
  height: 44px;
  margin-top: 2px;
  border-radius: 0;
  object-fit: contain;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

.master-head h1 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 4.4vw, 2.9rem);
  letter-spacing: -0.02em;
  line-height: 1;
}

.master-head h1 + .master-muted {
  margin-top: 8px;
  max-width: 62ch;
}

.master-muted {
  color: var(--master-muted);
  margin: 6px 0 0;
}

.master-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 999px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
  color: #f4f8f7;
  background: linear-gradient(145deg, #0a0a0a, #141414);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

.master-close {
  position: fixed;
  top: clamp(16px, 3vw, 24px);
  right: clamp(16px, 3vw, 24px);
  z-index: 300;
}

.master-close:hover {
  filter: brightness(1.08);
}

.master-page-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  text-align: center;
}

.master-page-brand-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.master-page-brand-name {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--master-accent-soft);
}

.wizard-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.wizard-step-chip {
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--master-muted);
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}

.wizard-step-chip.is-active {
  color: #041314;
  font-weight: 700;
  border-color: rgba(0, 0, 0, 0.22);
  background: linear-gradient(145deg, #86d8b1, #4cbc87);
}

.wizard-card,
.master-auth-card {
  background: var(--master-panel);
  border: 1px solid var(--master-panel-border);
  border-radius: 20px;
  padding: 20px;
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}

.wizard-step {
  display: none;
}

.wizard-step.is-active {
  display: block;
}

.wizard-step h2,
.master-auth-card h1 {
  margin: 0 0 18px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
}

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

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

.master-form-grid .full {
  grid-column: 1 / -1;
}

label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
}

input,
select,
textarea,
button {
  width: 100%;
  font: inherit;
}

input,
select,
textarea {
  margin-top: 7px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--master-text);
  background: rgba(255, 255, 255, 0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

select option {
  color: #0b1f22;
}

input::placeholder,
textarea::placeholder {
  color: rgba(218, 233, 230, 0.55);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(217, 189, 118, 0.55);
  box-shadow: 0 0 0 3px rgba(217, 189, 118, 0.2);
  background: rgba(255, 255, 255, 0.1);
}

textarea {
  min-height: 138px;
  resize: vertical;
}

button {
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
}

.btn-primary {
  color: #061213;
  background: linear-gradient(145deg, var(--master-accent-soft), var(--master-accent));
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.btn-soft {
  color: var(--master-text);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.btn-primary:hover,
.btn-soft:hover {
  filter: brightness(1.05);
}

.wizard-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}

.wizard-step[data-step="1"] .wizard-actions {
  margin-top: 24px;
}

.master-login-hint {
  margin: 40px 4px 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--master-muted);
}

.master-login-hint a {
  color: var(--master-accent-soft);
  text-underline-offset: 3px;
}

.master-login-hint a:hover {
  color: var(--master-accent);
}

.stack-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.stack-list li {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(5, 19, 21, 0.58);
}

.counter {
  margin-top: 4px;
  text-align: right;
  font-size: 0.82rem;
  color: var(--master-muted);
}

.master-status,
.master-error {
  margin-top: 10px;
  font-size: 0.92rem;
}

.master-status {
  color: #9ce3bb;
}

.master-error {
  color: var(--master-danger);
}

.master-auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
}

.master-splash-body,
.master-auth-page {
  display: block;
  padding: clamp(24px, 4vw, 32px) 18px;
}

.master-splash-shell,
.master-auth-shell {
  width: min(420px, 100%);
  margin: 0 auto;
}

.master-help {
  margin: 14px 0 0;
  font-size: 0.85rem;
  color: var(--master-muted);
}

.master-help code {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f4f7f7;
  border-radius: 8px;
  padding: 2px 6px;
}

.master-splash-shell {
  width: min(520px, 100%);
}

.master-splash-card {
  padding: clamp(22px, 3vw, 32px);
}

.master-splash-card h1 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.65rem, 4vw, 2rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.master-splash-lead {
  margin-top: 8px;
  margin-bottom: 0;
}

.master-splash-benefits {
  margin-top: 18px;
  display: grid;
  gap: 8px;
}

.master-splash-benefit {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 24, 27, 0.32);
  padding: 10px 12px;
}

.master-splash-benefit h2 {
  margin: 0 0 3px;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(236, 215, 167, 0.72);
}

.master-splash-benefit p {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: rgba(214, 230, 226, 0.52);
}

.master-splash-actions {
  margin-top: 18px;
}

.master-splash-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-decoration: none;
  min-height: 48px;
  border-radius: 12px;
  font-weight: 800;
}

.master-login-hint--splash {
  margin-top: 22px;
}

@media (max-width: 760px) {
  .master-shell {
    padding: 24px 14px 54px;
  }

  .master-head {
    flex-direction: column;
    align-items: stretch;
  }

  .master-head-brand {
    gap: 10px;
  }

  .master-head-logo {
    width: 40px;
    height: 40px;
  }

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

  .master-form-grid--step1 {
    grid-template-columns: 1fr;
  }

  .master-lang-notch {
    left: 8px;
    transform: translateY(-50%) scale(0.66);
  }

  .master-splash-card {
    padding: 20px 16px;
  }
}
