.maw-backdrop {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.maw-backdrop.show { opacity: 1; visibility: visible; }

.maw-modal {
  --maw-blue: #4285f4;
  --maw-blue-hover: #3367d6;
  --maw-text: #1c1e21;
  --maw-muted: #8a96a3;
  --maw-field: #f6f7f8;
  --maw-line: #dcdfe3;
  --maw-error: #e0245e;

  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  margin: 0;
  background: #ffffff;
  color: var(--maw-text);
  padding: 28px;
  border-radius: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--maw-line);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.2, 1), opacity 0.3s, visibility 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 90%;
  max-width: 340px;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.maw-modal.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.maw-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 4px;
}
.maw-brand-logo { width: 44px; height: 44px; display: block; }
.maw-brand-word { width: 58px; height: 18px; color: var(--maw-text); }

.maw-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: center;
}

.maw-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  width: 100%;
  color: var(--maw-text);
}

.maw-row {
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 14px;
  gap: 6px;
  width: 100%;
  background: var(--maw-field);
  border-radius: 10px;
  border: 1px solid var(--maw-line);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.maw-row:focus-within {
  border-color: var(--maw-blue);
  box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.15);
}

.maw-input, .maw-select {
  font: inherit;
  font-size: 16px;
  color: var(--maw-text);
  border: 0;
  outline: 0;
  background: transparent;
}
.maw-input { flex: 1; min-width: 0; height: 100%; }
.maw-input::placeholder { color: #a7adb8; }

.maw-select {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  padding: 0 18px 0 0;
  cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%238a96a3' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E") no-repeat right center;
}
.maw-select option { background: #ffffff; color: var(--maw-text); }

.maw-hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--maw-muted);
  text-align: left;
  width: 100%;
}
.maw-hint.maw-center { text-align: center; }

.maw-btn {
  width: 100%;
  height: 48px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  background: var(--maw-blue);
  box-shadow: none;
  transition: background-color 0.15s, transform 0.1s;
}
.maw-btn:hover:not(:disabled) { background: var(--maw-blue-hover); }
.maw-btn:active:not(:disabled) { transform: scale(0.985); }
.maw-btn:disabled { opacity: 0.4; cursor: default; box-shadow: none; }
.maw-btn.loading { opacity: 0.7; cursor: progress; }

.maw-error {
  width: 100%;
  margin: 0;
  font-size: 13px;
  color: var(--maw-error);
  text-align: center;
}

.maw-check {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--maw-blue);
  box-shadow: none;
}
.maw-check svg { width: 28px; height: 28px; }

[data-maw-hidden] { display: none !important; }
