:root {
  --bg: #f5f5f5;
  --page: #ffffff;
  --text: #222222;
  --muted: #666666;
  --label: #333333;
  --red: #e53935;
  --green: #22a947;
  --green-dark: #1a8f3a;
  --field: #ececec;
  --border: #e8e8e8;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
  background: #dcdcdc;
  font-family: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}

body {
  display: flex;
  justify-content: center;
}

.page {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  padding-bottom: calc(24px + var(--safe-bottom));
}

.header {
  background: #fff;
  padding: 14px 16px 12px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.header h1 {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: #1a1a1a;
}

.promo {
  background: #fff;
  padding: 20px 14px 16px;
}

.promo-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}

.promo-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.promo-list li {
  color: var(--red);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
}

.promo-list--left {
  text-align: right;
  padding-right: 2px;
}

.promo-list--right {
  text-align: left;
  padding-left: 2px;
}

.logo {
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 10px rgba(34, 169, 71, 0.25));
  animation: logoIn 0.55s ease-out both;
}

.logo svg {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 18px;
}

@keyframes logoIn {
  from {
    opacity: 0;
    transform: scale(0.86);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.promo-note {
  margin-top: 16px;
  text-align: center;
  color: var(--red);
  font-size: 12px;
  line-height: 1.55;
  font-weight: 500;
  animation: fadeUp 0.5s ease-out 0.15s both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-section {
  background: #fff;
  margin-top: 10px;
  padding: 18px 18px 28px;
  flex: 1;
}

.form-title {
  text-align: center;
  margin-bottom: 22px;
  font-size: 16px;
  font-weight: 500;
  color: #222;
  letter-spacing: 1px;
}

.form-title span {
  position: relative;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 14px;
  color: var(--label);
  margin-bottom: 8px;
  font-weight: 500;
}

.req {
  color: var(--red);
  font-weight: 700;
}

.field input[type="text"],
.field input[type="tel"],
.region-trigger {
  width: 100%;
  height: 44px;
  border: none;
  outline: none;
  background: var(--field);
  border-radius: 4px;
  padding: 0 12px;
  font-size: 15px;
  color: var(--text);
  font-family: inherit;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.region-trigger:focus-visible {
  background: #e4e4e4;
  box-shadow: inset 0 0 0 1.5px rgba(34, 169, 71, 0.45);
}

.region-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  cursor: pointer;
}

.region-placeholder {
  color: #999;
}

.region-trigger.is-filled .region-placeholder {
  color: var(--text);
}

.chevron {
  width: 18px;
  height: 18px;
  color: #999;
  flex-shrink: 0;
}

.submit-btn {
  width: 100%;
  height: 46px;
  margin-top: 8px;
  border: none;
  border-radius: 4px;
  background: linear-gradient(180deg, #2db84d 0%, var(--green) 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(34, 169, 71, 0.28);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.submit-btn:active {
  transform: scale(0.985);
  filter: brightness(0.96);
}

.footer {
  margin-top: auto;
  padding: 28px 16px 8px;
  text-align: center;
  color: #777;
}

.home-icon {
  width: 22px;
  height: 22px;
  margin: 0 auto 6px;
  display: block;
  color: #888;
}

.footer p {
  font-size: 12px;
  letter-spacing: 0.3px;
}

/* Region picker */
[hidden] {
  display: none !important;
}

.picker-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 40;
  animation: maskIn 0.2s ease;
}

@keyframes maskIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.picker {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 55vh;
  max-height: 420px;
  background: #fff;
  border-radius: 14px 14px 0 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  padding-bottom: var(--safe-bottom);
  animation: sheetUp 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes sheetUp {
  from { transform: translate(-50%, 100%); }
  to { transform: translate(-50%, 0); }
}

.picker-header {
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  align-items: center;
  padding: 12px 8px;
  border-bottom: 1px solid var(--border);
}

.picker-header h3 {
  text-align: center;
  font-size: 15px;
  font-weight: 600;
}

.picker-action {
  border: none;
  background: none;
  font-size: 14px;
  color: #888;
  padding: 8px;
  font-family: inherit;
  cursor: pointer;
}

.picker-action--ok {
  color: var(--green);
  font-weight: 600;
}

.picker-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 16px 0;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.picker-tab {
  border: none;
  background: none;
  font-size: 14px;
  color: #666;
  padding: 8px 10px 10px;
  font-family: inherit;
  white-space: nowrap;
  position: relative;
  cursor: pointer;
}

.picker-tab.is-active {
  color: var(--green);
  font-weight: 600;
}

.picker-tab.is-active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;
  height: 2px;
  background: var(--green);
  border-radius: 2px;
}

.picker-list {
  list-style: none;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

.picker-list li {
  padding: 13px 18px;
  font-size: 14px;
  border-bottom: 1px solid #f3f3f3;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.picker-list li.is-selected {
  color: var(--green);
  font-weight: 600;
}

.picker-list li.is-selected::after {
  content: "✓";
  font-size: 14px;
}

.toast {
  position: fixed;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 100;
  max-width: 80%;
  text-align: center;
  line-height: 1.4;
  animation: toastIn 0.2s ease;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translate(-50%, -40%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

@media (min-width: 481px) {
  .page {
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.12);
  }
}
