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

html,
body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  background: #ededed;
  color: #333;
  font-size: 14px;
}

.app {
  min-height: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: #f5f5f5;
  display: flex;
  flex-direction: column;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 44px;
  padding: 0 8px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-back {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-title {
  font-size: 17px;
  font-weight: 600;
  color: #111;
  line-height: 1;
}

.nav-right {
  width: 40px;
}

.page {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.form {
  background: #fff;
  padding: 16px 16px 8px;
}

.section + .section {
  margin-top: 8px;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  color: #222;
  line-height: 1.4;
  margin-bottom: 14px;
}

.field {
  display: block;
  margin-bottom: 14px;
}

.label {
  display: block;
  font-size: 14px;
  color: #333;
  line-height: 1.4;
  margin-bottom: 8px;
}

.input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  background: #fff;
  font-size: 14px;
  color: #333;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.input::placeholder {
  color: #c0c0c0;
}

.input:focus {
  border-color: #cfcfcf;
}

.picker {
  display: flex;
  align-items: center;
  text-align: left;
  cursor: pointer;
}

.placeholder-text {
  color: #c0c0c0;
}

.picker.has-value .placeholder-text {
  color: #333;
}

.footer {
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
}

.agreement {
  display: flex;
  align-items: center;
  margin-bottom: 14px;
  cursor: pointer;
  user-select: none;
}

.checkbox-native {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkbox {
  width: 16px;
  height: 16px;
  margin-right: 6px;
  border: 1px solid #ccc;
  border-radius: 2px;
  background: #fff;
  flex-shrink: 0;
  position: relative;
}

.checkbox-native:checked + .checkbox {
  background: #07c160;
  border-color: #07c160;
}

.checkbox-native:checked + .checkbox::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}

.agreement-text {
  font-size: 13px;
  color: #666;
}

.agreement-link {
  font-size: 13px;
  color: #576b95;
  text-decoration: none;
}

.submit {
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 6px;
  background: #d0d0d0;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  cursor: not-allowed;
}

.submit.active {
  background: #07c160;
  cursor: pointer;
}

.toast {
  position: fixed;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  z-index: 100;
  max-width: 80%;
  padding: 12px 18px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 14px;
  text-align: center;
  pointer-events: none;
}

.modal[hidden],
.sheet[hidden],
.toast[hidden] {
  display: none !important;
}

.modal,
.sheet {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.modal-mask,
.sheet-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.modal-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(300px, calc(100% - 48px));
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  text-align: center;
}

.modal-title {
  padding: 22px 20px 10px;
  font-size: 17px;
  font-weight: 600;
  color: #111;
}

.modal-content {
  padding: 0 20px 20px;
  font-size: 14px;
  line-height: 1.6;
  color: #666;
  text-align: left;
}

.modal-btn {
  width: 100%;
  height: 48px;
  border: none;
  border-top: 1px solid #eee;
  background: #fff;
  color: #576b95;
  font-size: 16px;
  cursor: pointer;
}

.sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  border-radius: 12px 12px 0 0;
  padding-bottom: env(safe-area-inset-bottom);
}

.sheet-header {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid #f0f0f0;
}

.sheet-title {
  font-size: 15px;
  font-weight: 600;
  color: #222;
}

.sheet-cancel,
.sheet-confirm {
  border: none;
  background: transparent;
  font-size: 15px;
  cursor: pointer;
}

.sheet-cancel {
  color: #999;
}

.sheet-confirm {
  color: #07c160;
}

.sheet-cols {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  height: 220px;
}

.sheet-select {
  width: 100%;
  height: 100%;
  border: none;
  border-right: 1px solid #f0f0f0;
  outline: none;
  font-size: 14px;
  color: #333;
  padding: 8px 0;
  background: #fff;
}

.sheet-select:last-child {
  border-right: none;
}

.sheet-select option {
  padding: 10px 8px;
  text-align: center;
}
