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

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans", "Helvetica Neue", Arial, sans-serif;
  color: #1F2329;
  background: linear-gradient(135deg, #E8F1FE 0%, #F0E8FE 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* ===== Phone Frame ===== */
.phone-frame {
  width: 375px;
  height: 760px;
  background: #F5F7FA;
  border-radius: 44px;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 0 0 12px #1F2329,
    0 0 0 14px #383E47,
    0 30px 60px rgba(31, 35, 41, 0.3),
    0 20px 40px rgba(31, 35, 41, 0.15);
  display: flex;
  flex-direction: column;
}

.phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 124px;
  height: 28px;
  background: #1F2329;
  border-radius: 0 0 18px 18px;
  z-index: 100;
}

.nav-bar {
  height: 64px;
  background: #1A73E8;
  color: #FFFFFF;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 12px;
  font-size: 16px;
  font-weight: 600;
  flex-shrink: 0;
}

.nav-title {
  letter-spacing: 0.02em;
}

.phone-screen {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  background: #F5F7FA;
  position: relative;
  -webkit-overflow-scrolling: touch;
}

.home-indicator {
  height: 24px;
  background: #F5F7FA;
  position: relative;
  flex-shrink: 0;
}
.home-indicator::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 134px;
  height: 5px;
  border-radius: 3px;
  background: #1F2329;
}

/* ===== Page transitions ===== */
.page {
  display: none;
  min-height: 100%;
  animation: slideIn 0.25s ease-out;
}
.page.active {
  display: block;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}

.container {
  padding: 24px 20px;
}

/* ===== Common UI ===== */
.btn-primary {
  display: block;
  width: 100%;
  background: #1A73E8;
  color: #FFFFFF;
  border: none;
  border-radius: 12px;
  height: 50px;
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  font-family: inherit;
}
.btn-primary:hover:not(:disabled) {
  opacity: 0.92;
}
.btn-primary:active:not(:disabled) {
  transform: scale(0.98);
}
.btn-primary:disabled {
  background: #BCC1CC;
  cursor: not-allowed;
}

.card {
  background: #FFFFFF;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(31, 35, 41, 0.06);
  margin-bottom: 20px;
}

.label {
  font-size: 13px;
  color: #646A73;
  margin-bottom: 8px;
  margin-top: 4px;
  font-weight: 500;
}
.label:first-child {
  margin-top: 0;
}

.input {
  display: block;
  width: 100%;
  background: #F5F6F7;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 15px;
  color: #1F2329;
  margin-bottom: 16px;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s;
  outline: none;
}
.input:focus {
  border-color: #1A73E8;
  background: #FFFFFF;
}
.input::placeholder {
  color: #BCC1CC;
}
.textarea {
  min-height: 80px;
  resize: vertical;
}
.required {
  color: #F54A45;
  margin-left: 2px;
}

select.input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23646A73' d='M6 8L1.5 3.5h9z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* ===== Home Page ===== */
.hero {
  padding: 24px 0 20px;
  text-align: center;
}
.hero .title {
  font-size: 28px;
  font-weight: 600;
  color: #1F2329;
  margin-bottom: 6px;
}
.hero .subtitle {
  font-size: 14px;
  color: #8F959E;
}

.guide-row {
  display: flex;
  align-items: center;
  padding: 8px 0;
}
.step-num {
  width: 24px;
  height: 24px;
  line-height: 24px;
  border-radius: 50%;
  background: #E8F1FE;
  color: #1A73E8;
  text-align: center;
  font-weight: 600;
  margin-right: 12px;
  font-size: 13px;
  flex-shrink: 0;
}
.step-text {
  font-size: 14px;
  color: #1F2329;
  line-height: 1.5;
}

/* ===== Checkin submit spacing ===== */
.submit {
  margin-top: 8px;
}

/* ===== Confirm Page ===== */
.confirm {
  text-align: center;
  padding-top: 40px;
}
.confirm .icon-wrap {
  margin-bottom: 24px;
}
.icon-check {
  display: inline-block;
  width: 72px;
  height: 72px;
  line-height: 72px;
  border-radius: 50%;
  background: #34C759;
  color: #FFFFFF;
  font-size: 40px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(52, 199, 89, 0.35);
}
.confirm .title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #1F2329;
}
.confirm .subtitle {
  font-size: 14px;
  color: #646A73;
  margin-bottom: 24px;
  line-height: 1.6;
}

.detail {
  text-align: left;
  margin-bottom: 24px;
}
.detail-row {
  display: flex;
  padding: 10px 0;
  border-bottom: 1px solid #EFF0F1;
}
.detail-row:last-child {
  border-bottom: none;
}
.detail-key {
  width: 88px;
  font-size: 13px;
  color: #8F959E;
}
.detail-val {
  flex: 1;
  font-size: 14px;
  color: #1F2329;
}

.back {
  margin-top: 20px;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 80px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(31, 35, 41, 0.92);
  color: #FFFFFF;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  z-index: 200;
  max-width: 300px;
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== Dev note (outside phone frame) ===== */
.dev-note {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  text-align: center;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  color: #646A73;
  box-shadow: 0 4px 12px rgba(31, 35, 41, 0.08);
  max-width: 600px;
  margin: 0 auto;
}
.dev-note strong {
  color: #1A73E8;
  margin-right: 6px;
}
.dev-note code {
  font-family: "SF Mono", Menlo, Monaco, "Courier New", monospace;
  font-size: 12px;
  background: #F5F6F7;
  padding: 1px 6px;
  border-radius: 4px;
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
  body { padding: 0; align-items: stretch; }
  .phone-frame {
    width: 100%;
    height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }
  .phone-notch { display: none; }
  .home-indicator { display: none; }
  .dev-note { display: none; }
}
