:root {
  color-scheme: light;
  --bg: #eef4ff;
  --surface: #ffffff;
  --surface-soft: #f7faff;
  --text: #14213d;
  --muted: #61708a;
  --line: #d8e3f4;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --teal: #0f9f9a;
  --success: #12823b;
  --danger: #c81e32;
  --shadow: 0 24px 70px rgba(32, 77, 143, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 10%, rgba(37, 99, 235, 0.16), transparent 30%),
    radial-gradient(circle at 86% 12%, rgba(15, 159, 154, 0.14), transparent 30%),
    radial-gradient(circle at 28% 92%, rgba(124, 58, 237, 0.1), transparent 32%),
    linear-gradient(135deg, #fbfdff 0%, var(--bg) 100%);
}

.page-shell {
  width: min(860px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 0;
  display: grid;
  grid-template-columns: minmax(260px, 315px) minmax(430px, 500px);
  gap: 24px;
  align-items: center;
  justify-content: center;
}

.info-column {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 24px;
  align-self: center;
}

.register-column {
  min-width: 0;
  width: 100%;
  max-width: 500px;
  justify-self: center;
  align-self: center;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 0 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  padding: 8px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(216, 227, 244, 0.95);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.16);
}

.brand-mark span {
  border-radius: 6px;
}

.brand-mark span:nth-child(1) {
  background: #f25022;
}

.brand-mark span:nth-child(2) {
  background: #7fba00;
}

.brand-mark span:nth-child(3) {
  background: #00a4ef;
}

.brand-mark span:nth-child(4) {
  background: #ffb900;
}

h1,
h2,
p {
  margin: 0;
}

.brand h1 {
  font-size: clamp(22px, 3vw, 27px);
  letter-spacing: -0.05em;
}

.brand p,
.form-header p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.6;
  white-space: pre-wrap;
}

.panel,
.form-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(219, 230, 245, 0.95);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.guide-panel {
  min-height: 0;
}

.form-card {
  min-height: 0;
  max-width: 500px;
}

.account-panel {
  min-height: 0;
}

.panel {
  padding: 20px;
  border-radius: 22px;
}

.form-card {
  padding: 20px 22px 18px;
  border-radius: 22px;
  background: var(--surface);
}

.panel h2,
.form-header h2 {
  font-size: 22px;
  letter-spacing: -0.04em;
}

.panel h2 {
  font-size: 18px;
}

.rich-list {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.content-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}

.content-item:hover {
  border-color: #b8c9e6;
  background: #ffffff;
  transform: translateY(-1px);
}

.content-item strong {
  display: block;
  margin-bottom: 4px;
}

.content-item p {
  color: var(--muted);
  line-height: 1.5;
  font-size: 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.content-item a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 800;
}

.brand-info {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.form-header {
  margin-bottom: 14px;
  text-align: center;
}

form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 7px;
  color: #26364d;
  font-size: 15px;
  font-weight: 800;
}

input,
select {
  width: 100%;
  border: 1px solid #cbd9ed;
  border-radius: 13px;
  padding: 10px 12px;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  background: #fbfdff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

input:focus,
select:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 4px rgba(21, 87, 214, 0.12);
}

.username-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content max-content;
  gap: 10px;
  align-items: center;
}

.account-line {
  grid-template-columns: minmax(260px, 1fr) minmax(165px, max-content) max-content;
}

.account-line #username::placeholder {
  font-size: 15px;
}

#domainSuffix,
.domain-select {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  white-space: nowrap;
  color: var(--primary);
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #edf5ff;
}

.domain-select {
  width: auto;
  min-width: 165px;
  font-weight: 800;
}

.selected-plan {
  padding: 11px 12px;
  border: 1px dashed #a7bad7;
  border-radius: 15px;
  color: var(--muted);
  background: #f7fbff;
  line-height: 1.6;
  font-size: 15px;
}

.selected-plan span {
  display: block;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.usage-line {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--primary);
  background: #eaf2ff;
  font-size: 14px;
  font-weight: 900;
}

.usage-line.full {
  color: var(--danger);
  background: #fff1f2;
}

.limit-hint {
  margin-top: 8px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.limit-hint.danger {
  color: var(--danger);
}

.field-hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 700;
}

.turnstile-box {
  min-height: 0;
}

.primary-btn,
.login-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: none;
  border-radius: 16px;
  padding: 0 20px;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  font-size: 17px;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 16px 30px rgba(21, 87, 214, 0.2);
  transition: transform 0.18s, box-shadow 0.18s, opacity 0.18s;
}

.primary-btn {
  min-height: 48px;
  font-size: 18px;
}

.primary-btn:not(:disabled):hover,
.login-btn:not(:disabled):hover,
.secondary-btn:not(:disabled):hover {
  transform: translateY(-1px);
}

.primary-btn:not(:disabled):hover {
  box-shadow: 0 18px 36px rgba(21, 87, 214, 0.25);
}

.primary-btn.login-ready {
  background: linear-gradient(135deg, var(--success), var(--primary));
}

.secondary-btn {
  min-width: 120px;
  padding-inline: 14px;
  color: var(--primary);
  background: #eaf2ff;
  box-shadow: none;
  font-size: 15px;
}

.primary-btn:disabled,
.secondary-btn:disabled {
  opacity: 0.62;
  cursor: wait;
}

.message {
  margin-top: 12px;
  min-height: 24px;
  font-weight: 800;
  text-align: center;
}

.message:empty {
  min-height: 0;
  margin-top: 0;
}

.message.success {
  color: var(--success);
}

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

.login-btn {
  width: 100%;
  margin-top: 14px;
  background: linear-gradient(135deg, var(--success), var(--primary));
}

.hidden {
  display: none !important;
}

.email-verify {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #f7fbff;
}

.hint {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.limit-notice {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid #bfd0ea;
  border-radius: 15px;
  color: #31527a;
  background: #f2f7ff;
}

.limit-notice p {
  color: #31527a;
  font-size: 14px;
  line-height: 1.45;
}

.limit-notice strong {
  color: #183b6b;
}

.loading {
  color: var(--muted);
}

@media (max-width: 1080px) {
  .page-shell {
    width: min(920px, calc(100% - 28px));
    grid-template-columns: 1fr;
  }

  .info-column {
    position: static;
  }

  .register-column {
    align-self: center;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 24px, 560px);
    grid-template-columns: 1fr;
    padding: 22px 0;
  }

  .brand {
    align-items: flex-start;
  }

  .form-card,
  .panel {
    border-radius: 22px;
    padding: 18px;
    min-height: auto;
  }

  .username-line {
    grid-template-columns: 1fr;
  }

  #domainSuffix,
  .domain-select,
  .secondary-btn {
    width: 100%;
  }
}
