/* ============================================================
   重阳 & 晓轩 · 亳州婚礼
   视觉方向：胶片杂志。暖奶油纸 + 墨色 + 草坪墨绿，一点柿色。
   分层靠：发丝线 / 留白 / 衬线大字 / 编号眉标，不靠卡片堆叠。
   ============================================================ */

:root {
  /* 纸与墨 */
  --paper: #f2ece1;
  --paper-2: #fffdf8;
  --ink: #1f1c18;
  --ink-2: #574f45;
  --line: #dcd1bf;
  --line-2: #eae0d0;

  /* 草坪墨绿：主行动色 */
  --olive: #3d5741;
  --olive-2: #2f4433;
  --olive-tint: #e7ece4;

  /* 柿色：只用于公告和强调，不铺面 */
  --warm: #b0532c;
  --warm-tint: #f7ece2;

  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
    "Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
  --serif: "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif CJK SC",
    "Times New Roman", serif;

  --w: 33rem;
  --pad: 1.35rem;
  --tabh: 3.5rem;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: rgba(61, 87, 65, 0.12);
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17.5px;
  line-height: 1.72;
  /* 纸纹：极轻的斜向织理，不抢内容 */
  background-image: repeating-linear-gradient(
    62deg,
    rgba(120, 100, 70, 0.022) 0 2px,
    rgba(255, 255, 255, 0) 2px 5px
  );
}

img {
  display: block;
  max-width: 100%;
}

p {
  margin: 0 0 0.55em;
}

p:last-child {
  margin-bottom: 0;
}

b,
strong {
  font-weight: 600;
}

a {
  color: var(--olive-2);
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 0.5rem;
  top: 0.5rem;
  z-index: 99;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 0.8rem;
  border-radius: 3px;
}

.wrap {
  max-width: var(--w);
  margin: 0 auto;
  background: var(--paper);
  padding-bottom: calc(2rem + env(safe-area-inset-bottom));
  overflow-x: clip;
}

/* 宽屏时给「纸」一点边 */
@media (min-width: 40rem) {
  body {
    background: #e6ddcd;
  }
  .wrap {
    box-shadow: 0 0 0 1px var(--line), 0 18px 60px rgba(60, 45, 25, 0.13);
  }
}

/* ---------- 眉标：小号、宽字距、大写感 ---------- */
.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  color: var(--ink-2);
  text-transform: uppercase;
}

/* ============ 封面：字不压在花上 ============
   照片满幅在上，名字落在下方的奶油纸台上，靠负边距咬住照片。 */
.hero {
  position: relative;
}

.hero-fig {
  margin: 0;
  position: relative;
  background: #cfc6b6;
}

.hero-fig img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 22%;
}

/* 照片下缘化进纸色，避免硬切 */
.hero-scrim {
  position: absolute;
  inset: auto 0 -1px 0;
  height: 42%;
  background: linear-gradient(180deg, rgba(242, 236, 225, 0) 0%, rgba(242, 236, 225, 0.55) 62%, var(--paper) 100%);
  pointer-events: none;
}

.masthead {
  position: relative;
  z-index: 2;
  margin: -3.6rem var(--pad) 0;
  padding: 1.6rem 1.2rem 1.5rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: 0 12px 34px rgba(60, 45, 25, 0.1);
  text-align: center;
}

.orn {
  display: block;
  width: 2.6rem;
  height: 1px;
  margin: 0 auto 0.9rem;
  background: var(--warm);
  opacity: 0.75;
}

.masthead h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 500;
  line-height: 1.24;
  letter-spacing: 0.07em;
  text-indent: 0.07em;
}

.masthead-date {
  margin: 0.55rem 0 0;
  font-size: 1rem;
  color: var(--ink-2);
}

/* ---------- 倒计时：四格，靠竖发丝线分隔 ---------- */
.cd {
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line-2);
}

.cd-cap {
  margin: 0 0 0.6rem;
  font-size: 0.8rem;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  color: var(--ink-2);
}

.cd-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.cd-cell {
  border-left: 1px solid var(--line-2);
}

.cd-cell:first-child {
  border-left: 0;
}

.cd-cell b {
  display: block;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  color: var(--olive-2);
}

.cd-cell span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: var(--ink-2);
}

/* 非主页：封面收成窄条，正事立刻可见 */
body:not([data-tab="hunli"]) .hero-fig,
body:not([data-tab="hunli"]) .cd {
  display: none;
}

body:not([data-tab="hunli"]) .masthead {
  margin: 0;
  padding: 1.15rem 1.2rem 1rem;
  border-width: 0 0 1px;
  box-shadow: none;
  background: var(--paper);
}

body:not([data-tab="hunli"]) .masthead h1 {
  font-size: 1.5rem;
}

body:not([data-tab="hunli"]) .eyebrow {
  margin-bottom: 0.35rem;
}

body:not([data-tab="hunli"]) .orn {
  display: none;
}

/* ============ Tab：不是胶囊按钮，是杂志目录条 ============ */
.tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  margin-top: 1.6rem;
  background: rgba(242, 236, 225, 0.93);
  -webkit-backdrop-filter: saturate(1.5) blur(12px);
  backdrop-filter: saturate(1.5) blur(12px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

body:not([data-tab="hunli"]) .tabs {
  margin-top: 0;
  border-top: 0;
}

.tabs-inner {
  max-width: var(--w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.tabs button {
  appearance: none;
  border: 0;
  border-left: 1px solid var(--line-2);
  background: transparent;
  font-family: var(--serif);
  font-size: 1.06rem;
  color: var(--ink-2);
  min-height: var(--tabh);
  padding: 0.2rem 0.1rem;
  letter-spacing: 0.06em;
  position: relative;
  cursor: pointer;
}

.tabs button:first-child {
  border-left: 0;
}

.tabs button.is-on {
  color: var(--ink);
  font-weight: 600;
}

/* 当前项：底部一段墨绿短线 */
.tabs button.is-on::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0.5rem;
  width: 1.6rem;
  height: 2px;
  background: var(--olive);
}

.panel {
  display: none;
}

.panel.is-on {
  display: block;
}

/* ============ 章节：编号 + 发丝线，不做卡片 ============ */
.panel {
  counter-reset: sec;
}

.sec {
  padding: 1.9rem var(--pad) 0;
  scroll-margin-top: calc(var(--tabh) + 0.6rem);
}

.sec-head {
  position: relative;
  padding: 0 0 0.9rem 2.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.sec-head::before {
  counter-increment: sec;
  content: counter(sec, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.28rem;
  font-family: var(--serif);
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: var(--warm);
  font-variant-numeric: tabular-nums;
}

.sec-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.42rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.04em;
}

.sec-sub {
  margin: 0.1rem 0 0;
  font-size: 0.92rem;
  color: var(--ink-2);
}

/* ---------- 通用行与列表 ---------- */
.stack > p {
  margin: 0;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line-2);
}

.stack > p:first-child {
  border-top: 0;
  padding-top: 0;
}

.stack b {
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--ink-2);
  font-size: 0.95rem;
}

.empty {
  margin: 0;
  padding: 0.9rem 1rem;
  background: var(--olive-tint);
  border-left: 2px solid var(--olive);
  color: var(--ink-2);
  font-size: 0.96rem;
}

.tip {
  margin: 0.7rem 0 0;
  font-size: 0.88rem;
  color: var(--ink-2);
}

/* ---------- 按钮：方角、印刷感、够大好点 ---------- */
.acts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.1rem;
}

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--olive);
  border-radius: 3px;
  background: var(--olive);
  color: #fdfbf6;
  font-family: var(--sans);
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
}

.btn.ghost {
  background: transparent;
  color: var(--olive-2);
  border-color: var(--line);
}

.btn.sm {
  min-height: 2.6rem;
  padding: 0.35rem 0.95rem;
  font-size: 0.95rem;
}

.btn:active {
  transform: translateY(1px);
}

/* ============ 公告：柿色左栏，醒目但不报警 ============ */
.notice-zone {
  padding: 1.6rem var(--pad) 0;
}

.notice {
  padding: 0.95rem 1.1rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--warm);
  border-radius: 2px;
}

.notice + .notice {
  margin-top: 0.7rem;
}

.notice-tag {
  display: block;
  margin: 0 0 0.3rem;
  font-size: 0.74rem;
  letter-spacing: 0.26em;
  text-indent: 0.26em;
  color: var(--warm);
}

.notice h3 {
  margin: 0 0 0.3rem;
  font-family: var(--serif);
  font-size: 1.14rem;
  font-weight: 600;
}

.notice p {
  margin: 0;
  font-size: 0.98rem;
  color: var(--ink-2);
}

.notice.urgent {
  background: var(--warm-tint);
  border-left-color: #94371a;
}

.notice.urgent .notice-tag {
  color: #94371a;
  font-weight: 600;
}

/* ============ 去这里 ============ */
/* 一键导航：两列索引条，不是四宫格瓷砖 */
.qnav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 1.1rem;
  margin-bottom: 1.6rem;
}

.qnav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  min-height: 3.05rem;
  padding: 0.2rem 0;
  border-bottom: 1px solid var(--line-2);
  color: var(--ink);
  text-decoration: none;
  font-size: 1.02rem;
}

.qnav a::after {
  content: "→";
  color: var(--olive);
  font-size: 1.05rem;
}

/* 地点条目：编号 + 名字 + 地址 + 两个动作 */
.places {
  counter-reset: pl;
}

.place {
  position: relative;
  padding: 1.15rem 0 1.15rem 2.5rem;
  border-top: 1px solid var(--line-2);
}

.place:first-child {
  border-top: 0;
}

.place::before {
  counter-increment: pl;
  content: counter(pl);
  position: absolute;
  left: 0;
  top: 1.35rem;
  width: 1.6rem;
  font-family: var(--serif);
  font-size: 0.85rem;
  text-align: center;
  line-height: 1.6rem;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 50%;
}

.place h3 {
  margin: 0 0 0.25rem;
  font-family: var(--serif);
  font-size: 1.16rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.place-addr {
  margin: 0;
  font-size: 1rem;
}

.place-note {
  margin: 0.25rem 0 0;
  font-size: 0.93rem;
  color: var(--ink-2);
}

.place .acts {
  margin-top: 0.85rem;
}

/* ============ 从哪到哪：像票根，不像表单 ============ */
.route {
  position: relative;
  padding-left: 1.5rem;
}

/* 左侧竖线，把两个字段串成一条路 */
.route::before {
  content: "";
  position: absolute;
  left: 0.31rem;
  top: 1.5rem;
  bottom: 1.5rem;
  width: 1px;
  background: var(--line);
}

.route-field {
  position: relative;
  display: block;
  padding: 0.55rem 0;
}

.route-field + .route-field {
  border-top: 1px solid var(--line-2);
}

/* 起点空心圈、终点实心点 */
.route-field::before {
  content: "";
  position: absolute;
  left: -1.5rem;
  top: 1.55rem;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  border: 1px solid var(--olive);
  background: var(--paper);
}

.route-field:last-child::before {
  background: var(--olive);
}

.route-cap {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  color: var(--ink-2);
}

.route select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 2.7rem;
  border: 0;
  border-radius: 0;
  padding: 0 1.6rem 0 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.16rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  /* 自绘小三角，避免各端原生控件长得像后台 */
  background-image: linear-gradient(45deg, transparent 50%, var(--olive) 50%),
    linear-gradient(135deg, var(--olive) 50%, transparent 50%);
  background-position: right 0.55rem center, right 0.2rem center;
  background-size: 0.36rem 0.36rem, 0.36rem 0.36rem;
  background-repeat: no-repeat;
}

/* ============ 入住 / 高铁 / 联系人 / 大巴 的行 ============ */
.kv {
  margin: 0;
}

.kv-name {
  margin: 0 0 0.3rem;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
}

.kv-row {
  display: flex;
  gap: 0.9rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line-2);
  font-size: 1rem;
}

.kv-row:first-of-type {
  border-top: 0;
}

.kv-k {
  flex: 0 0 4.2rem;
  color: var(--ink-2);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  padding-top: 0.15rem;
}

.kv-v {
  flex: 1;
  min-width: 0;
}

.lede {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: var(--ink-2);
}

.lede b {
  color: var(--ink);
}

/* 高铁线路 */
.ticket {
  padding: 0.85rem 0;
  border-top: 1px solid var(--line-2);
}

.ticket:first-child {
  border-top: 0;
  padding-top: 0;
}

.ticket-from {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
}

.ticket-from b {
  font-family: var(--serif);
  font-size: 1.14rem;
  font-weight: 600;
}

.ticket-hours {
  flex: 0 0 auto;
  font-size: 0.92rem;
  color: var(--olive-2);
  font-variant-numeric: tabular-nums;
}

.ticket p {
  margin: 0.15rem 0 0;
  font-size: 0.95rem;
  color: var(--ink-2);
}

/* 高铁开售日 */
.sales {
  margin-top: 1.3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.sales-cap {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  color: var(--ink-2);
}

.sale {
  display: flex;
  justify-content: space-between;
  gap: 0.9rem;
  align-items: baseline;
  padding: 0.55rem 0;
  border-top: 1px solid var(--line-2);
}

.sale:first-of-type {
  border-top: 0;
}

.sale span {
  flex: 1;
  font-size: 0.97rem;
}

.sale b {
  flex: 0 0 auto;
  font-family: var(--serif);
  font-size: 1.02rem;
  font-variant-numeric: tabular-nums;
  color: var(--olive-2);
  white-space: nowrap;
}

/* 联系人 */
.rows .phone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--line-2);
}

.rows .phone:first-child {
  border-top: 0;
}

.phone-who {
  min-width: 0;
}

.phone-who b {
  display: block;
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 600;
}

.phone-who span {
  display: block;
  font-size: 0.9rem;
  color: var(--ink-2);
}

.phone .btn {
  flex: 0 0 auto;
}

/* 号码露出后：等宽数字，够大能看清 */
.phone a.btn {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* 须知 */
.notes {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: nt;
}

.notes li {
  position: relative;
  padding: 0.7rem 0 0.7rem 2rem;
  border-top: 1px solid var(--line-2);
}

.notes li:first-child {
  border-top: 0;
  padding-top: 0;
}

.notes li::before {
  counter-increment: nt;
  content: counter(nt);
  position: absolute;
  left: 0.2rem;
  top: 0.72rem;
  font-family: var(--serif);
  color: var(--warm);
  font-size: 0.95rem;
}

.notes li:first-child::before {
  top: 0.02rem;
}

/* ============ 在亳州 ============ */
.play-hero {
  position: relative;
  background: #2a2620;
}

.play-hero img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 40%;
}

/* 够厚的遮罩：白字任何图上都清楚 */
.play-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(24, 20, 15, 0.34) 0%,
    rgba(24, 20, 15, 0.12) 32%,
    rgba(24, 20, 15, 0.68) 74%,
    rgba(24, 20, 15, 0.9) 100%
  );
}

.play-copy {
  position: absolute;
  left: var(--pad);
  right: var(--pad);
  bottom: 1.5rem;
  color: #fbf7ef;
}

.play-copy .eyebrow {
  color: rgba(251, 247, 239, 0.82);
  margin-bottom: 0.35rem;
}

.play-copy h2 {
  margin: 0 0 0.35rem;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-indent: 0.1em;
}

.play-copy p {
  margin: 0;
  font-size: 0.98rem;
  color: rgba(251, 247, 239, 0.88);
}

/* 照片墙：瀑布流，按原比例排，不裁脸 */
.gallery {
  columns: 2;
  column-gap: 0.5rem;
}

.gallery figure {
  margin: 0 0 0.5rem;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
}

.gallery img {
  width: 100%;
  height: auto;
  border-radius: 2px;
  background: var(--line-2);
}

/* 第一张通栏当特写 */
.gallery figure:first-child {
  column-span: all;
}

/* 小吃 */
.food {
  padding: 0.75rem 0;
  border-top: 1px solid var(--line-2);
}

.food:first-child {
  border-top: 0;
  padding-top: 0;
}

.food b {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
}

.food span {
  display: block;
  font-size: 0.95rem;
  color: var(--ink-2);
}

/* ============ 页脚 ============ */
.foot {
  margin-top: 2.6rem;
  padding: 1.4rem var(--pad) 0;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.foot p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-2);
  max-width: 20rem;
}

.foot-top {
  flex: 0 0 auto;
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0.2rem 0;
  color: var(--olive-2);
  font-family: var(--sans);
  font-size: 0.9rem;
  cursor: pointer;
}

/* ============ Toast ============ */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(2.4rem + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: 84vw;
  background: var(--ink);
  color: #fdfbf6;
  padding: 0.6rem 1.1rem;
  border-radius: 3px;
  font-size: 0.95rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 60;
}

.toast.show {
  opacity: 1;
}

/* ============ 小屏与偏好 ============ */
@media (max-width: 22.5rem) {
  body {
    font-size: 17px;
  }
  :root {
    --pad: 1.1rem;
  }
  .masthead h1 {
    font-size: 2.05rem;
  }
  .cd-cell b {
    font-size: 1.72rem;
  }
  .qnav {
    column-gap: 0.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 2px;
}
