/* ============================================================
   潭门船只预约 H5 - style.css
   视觉关键词：潭门 / 海洋 / 更路簿 / 千年渔港 / 智慧文旅
   ============================================================ */

:root {
  --deep: #0b3d63;        /* 深海蓝 */
  --sea: #17708f;         /* 海蓝 */
  --teal: #2fa3a8;        /* 海水青蓝 */
  --teal-soft: #e4f2f2;
  --cream: #f7f4ec;       /* 米白 */
  --card: #ffffff;
  --gold: #c2a06b;        /* 暖金 */
  --gold-deep: #a8823f;
  --ink: #17324a;
  --muted: #75909f;
  --line: #e8e6dc;
  --danger: #d95f4e;
  --radius: 20px;
  --shadow: 0 6px 24px rgba(11, 61, 99, .08);
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

html, body { overflow-x: hidden; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; }

/* ---------- 手机壳（电脑端居中 430px） ---------- */
.phone-shell {
  position: relative;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--cream);
  display: flex;
  flex-direction: column;
}

@media (min-width: 560px) {
  body {
    background:
      radial-gradient(circle at 18% 12%, rgba(47, 163, 168, .12), transparent 45%),
      radial-gradient(circle at 85% 85%, rgba(11, 61, 99, .10), transparent 50%),
      #dde7ea;
  }
  .phone-shell {
    min-height: calc(100vh - 48px);
    min-height: calc(100dvh - 48px);
    margin: 24px auto;
    border-radius: 28px;
    box-shadow: 0 24px 80px rgba(11, 61, 99, .22), 0 0 0 1px rgba(11, 61, 99, .06);
    overflow: hidden;
  }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  background: linear-gradient(160deg, #0b3d63 0%, #11557a 55%, #1a7d92 100%);
  color: #fff;
  padding: 40px 24px 74px;
  text-align: center;
  overflow: hidden;
}

.hero-content { position: relative; z-index: 2; }

.hero-badge {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 3px;
  color: #f2e3c4;
  border: 1px solid rgba(194, 160, 107, .7);
  border-radius: 999px;
  padding: 3px 14px 2px;
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 6px;
  text-indent: 6px;
  margin-bottom: 8px;
}

.hero-slogan {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 5px;
  text-indent: 5px;
  color: rgba(255, 255, 255, .85);
  margin-bottom: 14px;
}

.hero-slogan::before,
.hero-slogan::after {
  content: "";
  display: inline-block;
  vertical-align: middle;
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(194, 160, 107, .9));
  margin: 0 10px;
}
.hero-slogan::after { background: linear-gradient(90deg, rgba(194, 160, 107, .9), transparent); }

.hero-desc {
  font-size: 12.5px;
  color: rgba(255, 255, 255, .72);
  letter-spacing: 1px;
}

/* 罗盘装饰 */
.hero-deco.compass {
  position: absolute;
  right: -34px;
  top: -30px;
  width: 150px;
  height: 150px;
  color: rgba(255, 255, 255, .14);
  z-index: 1;
}
.hero-deco.compass svg { width: 100%; height: 100%; animation: slowspin 80s linear infinite; }
@keyframes slowspin { to { transform: rotate(360deg); } }

/* 印章装饰 */
.hero-seal {
  position: absolute;
  left: 18px;
  top: 20px;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.1;
  white-space: nowrap;
  letter-spacing: 1px;
  color: #e8c98f;
  border: 1.5px solid rgba(194, 160, 107, .8);
  border-radius: 6px;
  background: rgba(140, 60, 40, .35);
}

/* 海浪动画 */
.hero-waves { position: absolute; left: 0; right: 0; bottom: -1px; height: 46px; z-index: 3; }
.wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 100%;
}
.wave-1 { animation: waveMove 9s linear infinite; }
.wave-2 { animation: waveMove 6.5s linear infinite reverse; opacity: .9; }
@keyframes waveMove {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============================================================
   步骤进度
   ============================================================ */
.progress {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(247, 244, 236, .92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  padding: 16px 26px 10px;
}

.progress-steps {
  list-style: none;
  position: relative;
  display: flex;
  justify-content: space-between;
}

.p-line {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 7px;
  height: 2px;
  background: #e3e0d4;
  border-radius: 2px;
}
.p-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--teal), var(--sea));
  border-radius: 2px;
  transition: width .45s cubic-bezier(.4, 0, .2, 1);
}

.p-step { display: flex; flex-direction: column; align-items: center; gap: 5px; position: relative; z-index: 2; }
.p-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #cdd7db;
  transition: all .3s;
}
.p-step span {
  font-size: 11px;
  color: var(--muted);
  transition: color .3s;
}
.p-step.done .p-dot { background: var(--teal); border-color: var(--teal); }
.p-step.active .p-dot {
  background: var(--deep);
  border-color: var(--deep);
  box-shadow: 0 0 0 4px rgba(11, 61, 99, .15);
}
.p-step.active span { color: var(--deep); font-weight: 600; }
.p-step.done span { color: var(--sea); }

/* ============================================================
   主体流程
   ============================================================ */
.flow { flex: 1; padding: 20px 18px 28px; }

.step-panel { display: none; }
.step-panel.active { display: block; animation: fadeUp .38s cubic-bezier(.3, .7, .3, 1); }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-head { margin-bottom: 16px; }
.step-title {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  color: var(--deep);
  letter-spacing: 2px;
}
.step-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 17px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--teal), var(--sea));
  margin-right: 9px;
  vertical-align: -2px;
}
.step-tip { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

/* 通用卡片 */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  border: 1px solid rgba(11, 61, 99, .04);
}

/* ============================================================
   日历
   ============================================================ */
.calendar-card { padding: 16px 14px 18px; }

.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--deep);
  letter-spacing: 2px;
}
.cal-btn {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  border: none;
  background: #f0f4f5;
  color: var(--sea);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, transform .15s;
}
.cal-btn svg { width: 17px; height: 17px; }
.cal-btn:active { transform: scale(.9); }
.cal-btn:disabled { opacity: .3; }

.cal-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}
.cal-week span { text-align: center; font-size: 11.5px; color: var(--muted); padding: 6px 0; }
.cal-week span:first-child, .cal-week span:last-child { color: var(--gold-deep); }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }

.day {
  position: relative;
  aspect-ratio: 1;
  border: none;
  background: transparent;
  border-radius: 12px;
  font-size: 14.5px;
  color: var(--ink);
  transition: background .2s, color .2s, transform .12s;
}
.day:active { transform: scale(.88); }
.day.empty { pointer-events: none; }

.day.disabled { color: #cfd6d9; pointer-events: none; }

.day.today::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
}

.day.selected {
  background: linear-gradient(135deg, var(--deep), var(--sea));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(11, 61, 99, .35);
  animation: pop .28s cubic-bezier(.3, 1.6, .5, 1);
}
@keyframes pop {
  0% { transform: scale(.7); }
  60% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* 已选择日期条 */
.selected-date {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  animation: fadeUp .3s ease;
  border-left: 3px solid var(--teal);
}
.sd-icon { display: flex; color: var(--teal); }
.sd-icon svg { width: 18px; height: 18px; }
.sd-label { font-size: 12px; color: var(--muted); }
.sd-value { font-family: var(--serif); font-size: 16.5px; font-weight: 700; color: var(--deep); letter-spacing: 1px; }

/* ============================================================
   出海方式卡片
   ============================================================ */
.mode-list { display: flex; flex-direction: column; gap: 14px; }

.mode-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  text-align: left;
  background: var(--card);
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 16px;
  position: relative;
  transition: border-color .25s, background .25s, transform .18s, box-shadow .25s;
}
.mode-card:active { transform: scale(.98); }

.mode-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--teal-soft);
  color: var(--sea);
  transition: all .25s;
}
.mode-icon svg { width: 30px; height: 30px; }

.mode-info { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.mode-title { font-size: 16.5px; font-weight: 700; color: var(--deep); letter-spacing: 1px; }
.mode-desc { font-size: 12px; color: var(--muted); line-height: 1.65; }
.mode-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.mode-tags i {
  font-style: normal;
  font-size: 10.5px;
  color: var(--gold-deep);
  background: rgba(194, 160, 107, .13);
  border-radius: 999px;
  padding: 1.5px 9px;
  letter-spacing: .5px;
}

.mode-check {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--sea));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(.4);
  transition: all .25s cubic-bezier(.3, 1.5, .5, 1);
}
.mode-check svg { width: 12px; height: 12px; }

.mode-card.selected {
  border-color: var(--teal);
  background: linear-gradient(180deg, #f2faf9, #ffffff);
  box-shadow: 0 8px 26px rgba(47, 163, 168, .22);
}
.mode-card.selected .mode-icon { background: linear-gradient(135deg, var(--deep), var(--sea)); color: #fff; }
.mode-card.selected .mode-check { opacity: 1; transform: scale(1); }

/* ============================================================
   表单
   ============================================================ */
.form-card { display: flex; flex-direction: column; gap: 16px; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--ink); letter-spacing: 1px; }
.field-label em { font-style: normal; font-weight: 400; color: var(--muted); font-size: 11px; margin-left: 4px; }

.field-input {
  border: 1.5px solid #e3e7e9;
  border-radius: 13px;
  padding: 12px 14px;
  font-size: 15px;
  color: var(--ink);
  background: #fbfcfc;
  outline: none;
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.field-input::placeholder { color: #b7c3ca; }
.field-input:focus {
  border-color: var(--teal);
  background: #fff;
  box-shadow: 0 0 0 3.5px rgba(47, 163, 168, .14);
}

.field.invalid .field-input {
  border-color: var(--danger);
  background: #fef7f6;
  animation: shake .35s;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.field-err { font-size: 12px; color: var(--danger); }
.step-error {
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
  color: var(--danger);
  background: #fdf1ef;
  border: 1px solid rgba(217, 95, 78, .25);
  border-radius: 12px;
  padding: 9px 12px;
  animation: fadeUp .25s ease;
}

.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 -4px;
  color: var(--gold-deep);
  font-size: 12px;
  letter-spacing: 2px;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

/* 数字加减器 */
.counter-row { display: flex; align-items: center; justify-content: space-between; }
.counter-label { font-size: 13.5px; font-weight: 600; }
.counter { display: flex; align-items: center; gap: 16px; }
.counter-btn {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  border: none;
  background: var(--teal-soft);
  color: var(--sea);
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .12s, background .2s, opacity .2s;
}
.counter-btn:active { transform: scale(.85); }
.counter-btn:disabled { opacity: .35; }
.counter-num {
  min-width: 52px;
  text-align: center;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--deep);
}

/* 选项块 & 芯片 */
.q-block { display: flex; flex-direction: column; gap: 10px; }
.q-title { font-size: 13.5px; font-weight: 600; letter-spacing: .5px; }
.q-title .req { color: var(--danger); margin-left: 2px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  border: 1.5px solid #e3e7e9;
  background: #fbfcfc;
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 17px;
  font-size: 13.5px;
  transition: all .22s;
}
.chip:active { transform: scale(.93); }
.chip.selected {
  background: linear-gradient(135deg, var(--deep), var(--sea));
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(11, 61, 99, .25);
  animation: pop .25s cubic-bezier(.3, 1.6, .5, 1);
}

.q-block.has-error .chip-row { animation: shake .35s; }
.q-block .field-err { display: none; }
.q-block.has-error .field-err { display: block; }

/* 折叠动画 */
.collapse { overflow: hidden; max-height: 0; opacity: 0; margin: 0; transition: max-height .35s ease, opacity .3s ease; }
.collapse.open { max-height: 300px; opacity: 1; margin-top: 0; }

/* 第四步容器 */
#prefsWrap { display: flex; flex-direction: column; gap: 14px; }
.prefs-card { display: flex; flex-direction: column; gap: 20px; }

.notice-card {
  background: linear-gradient(180deg, #fbf7ec, #faf5e8);
  border: 1px solid rgba(194, 160, 107, .28);
  box-shadow: none;
}
.notice-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  color: var(--gold-deep);
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}
.notice-title svg { width: 16px; height: 16px; }
.notice-list { padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.notice-list li { font-size: 12px; color: #98865e; line-height: 1.7; }

/* 多行文本 */
.field-textarea {
  border: 1.5px solid #e3e7e9;
  border-radius: 13px;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--ink);
  background: #fbfcfc;
  outline: none;
  resize: none;
  min-height: 96px;
  line-height: 1.7;
  transition: border-color .25s, box-shadow .25s;
}
.field-textarea::placeholder { color: #b7c3ca; font-size: 13px; }
.field-textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3.5px rgba(47, 163, 168, .14); }

/* ============================================================
   确认页
   ============================================================ */
.confirm-card { padding: 6px 18px; }

.c-section {
  padding: 14px 0;
  border-bottom: 1px dashed var(--line);
}
.c-section:last-child { border-bottom: none; }
.c-section-title {
  font-size: 11.5px;
  color: var(--gold-deep);
  letter-spacing: 2.5px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.c-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(194, 160, 107, .35), transparent);
}

.c-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 4.5px 0;
}
.c-label { flex-shrink: 0; font-size: 13px; color: var(--muted); }
.c-value { font-size: 13.5px; font-weight: 600; color: var(--ink); text-align: right; line-height: 1.6; }

.confirm-note {
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.8;
  text-align: center;
  padding: 0 6px;
}

/* ============================================================
   成功页
   ============================================================ */
.success-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 34px 4px 10px;
  animation: fadeUp .45s ease;
}

.success-icon { position: relative; width: 84px; height: 84px; margin-bottom: 18px; }
.success-icon svg { width: 100%; height: 100%; }
.scircle {
  stroke-dasharray: 170;
  stroke-dashoffset: 170;
  animation: draw .7s .1s ease forwards;
}
.scheck {
  stroke-dasharray: 42;
  stroke-dashoffset: 42;
  animation: draw .45s .65s ease forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.ripple {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid rgba(47, 163, 168, .55);
  opacity: 0;
  animation: ripple 2s ease-out infinite;
}
.ripple.r2 { animation-delay: 1s; }
@keyframes ripple {
  0% { transform: scale(.75); opacity: .8; }
  100% { transform: scale(1.45); opacity: 0; }
}

.success-title {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  color: var(--deep);
  letter-spacing: 3px;
  margin-bottom: 20px;
}

.booking-no-card {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  margin-bottom: 14px;
  border-left: 3px solid var(--gold);
  background: linear-gradient(180deg, #fdfaf3, #fff);
}
.bn-label { font-size: 12.5px; color: var(--gold-deep); letter-spacing: 2px; }
.bn-value { font-family: var(--serif); font-size: 19px; font-weight: 700; letter-spacing: 1.5px; color: var(--deep); }

.success-summary { width: 100%; padding: 8px 18px; margin-bottom: 18px; }
.success-summary .c-section { border-bottom: none; padding-bottom: 6px; }

.success-tip {
  text-align: center;
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.9;
  font-weight: 500;
  margin-bottom: 10px;
}
.success-note {
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 26px;
}

.success-actions {
  display: flex;
  gap: 12px;
  width: 100%;
  flex-direction: column;
  padding-bottom: 12px;
}

/* ============================================================
   底部操作栏
   ============================================================ */
.flow-footer {
  position: sticky;
  bottom: 0;
  z-index: 30;
  display: flex;
  gap: 12px;
  padding: 12px 18px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  background: rgba(247, 244, 236, .92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(11, 61, 99, .06);
}

.btn {
  flex: 1;
  height: 48px;
  border-radius: 999px;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 3px;
  text-indent: 3px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .15s, box-shadow .25s, opacity .2s;
}
.btn:active { transform: scale(.965); }
.btn:disabled { opacity: .65; pointer-events: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--deep) 20%, var(--sea));
  color: #fff;
  box-shadow: 0 6px 18px rgba(11, 61, 99, .3);
}
.btn-ghost {
  background: #fff;
  color: var(--sea);
  border: 1.5px solid #cfdae0;
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 成功页隐藏顶部与底部 */
body.on-success .hero,
body.on-success .progress,
body.on-success .flow-footer { display: none; }
body.on-success .success-actions .btn-primary { box-shadow: 0 6px 18px rgba(11, 61, 99, .3); }

/* 小屏微调 */
@media (max-width: 360px) {
  .hero-title { font-size: 26px; letter-spacing: 4px; }
  .chip { padding: 7px 14px; font-size: 12.5px; }
  .flow { padding: 16px 14px 24px; }
}
