/* ============================================================
   杭红理疗馆 · 样式
   ------------------------------------------------------------
   依据本地知识库（04-资源/审美与UI）逐条落地：

   配色出处（content-guidelines L111-117「不凭空发明颜色」）：
     从本项目四张服务实拍图里采样 —— 宣纸米（桌面/底）、艾草墨绿（器具/艾烟）、
     朱砂（印章）、药柜棕（木器）。不是"安全默认"的奶油+陶土组合。

   排印（typography.md 4.2 / 4.4 / 4.5 / 4.6）：
     · fallback 链西文在前、中文在后，数字被西文字体接住
     · font-synthesis:none 断掉中文假斜体/假加粗
     · line-break:strict 避头尾；中文正文行高 1.8
     · 中文标题字距 0（不用西文那套负字距）；数字一律 tabular-nums

   反 slop（content-guidelines L10-20 / L32-41 / L46）：
     · 不用圆角卡片套件，不用 border-left 强调色卡片
     · 不用 emoji 装饰，不用箭头尾巴
     · 界栏（宋刻本竖线）承载"时间轴分栏"这个信息，不是装饰

   场景侧重（critique-guide L110-122）：App UI → 功能性、细节执行优先。
   响应式：<860px 单列（手机）；>=860px 双栏（平板/电脑）。
   ============================================================ */

:root {
  /* —— 色板：取自项目实拍图 —— */
  --paper:      #F2EAE0;  /* 宣纸米底 */
  --paper-up:   #FAF5EC;  /* 浮起面（纸更亮） */
  --paper-down: #E8DECE;  /* 下沉面 */
  --ink:        #221C16;  /* 墨（正文） */
  --ink-2:      #574E42;  /* 次墨 */
  --ink-3:      #6E6454;  /* 三墨（仍过 4.5:1） */
  --rule:       #D3C5AE;  /* 界栏细线 */
  --rule-2:     #B7A587;  /* 界栏重线 */
  --cinnabar:   #8E251C;  /* 朱砂（印章） */
  --cinnabar-a: #6F1A13;  /* 朱砂按 */
  --moss:       #3F5338;  /* 艾草墨绿 */
  --moss-a:     #2E4029;

  /* —— 字体 —— */
  --f-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
            "Source Han Sans SC", "Noto Sans SC", system-ui, sans-serif;
  --f-serif: "Songti SC", "Source Han Serif SC", "Noto Serif SC",
             "SimSun", Georgia, serif;

  --shell: 540px;
  --shell-wide: 1200px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.8;                 /* 中文正文基准行高 */
  font-synthesis: none;             /* 断掉假斜体/假加粗 */
  line-break: strict;               /* 避头尾 */
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

/* 电脑端：给纸面一点环境光，避免大屏纯色发闷（不做渐变装饰） */
@media (min-width: 860px) {
  body {
    background: #E3D8C6;
    background-image:
      radial-gradient(120% 90% at 50% 0%, rgba(255,255,255,0.55), transparent 62%);
    background-attachment: fixed;
  }
}

a { color: var(--cinnabar); text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* ============================================================
   壳
   ============================================================ */

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--paper);
  padding-bottom: 76px;
  position: relative;
}

@media (min-width: 860px) {
  .shell {
    max-width: var(--shell-wide);
    padding-bottom: 0;
    box-shadow: 0 0 0 1px var(--rule-2), 0 20px 64px rgba(34,28,22,0.14);
  }
}

/* ============================================================
   顶栏
   ============================================================ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  background: rgba(242, 234, 224, 0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule-2);
}

.brand {
  font-family: var(--f-serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 3px;
  line-height: 1.4;
  margin: 0;
}

.shop-state {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  color: var(--ink-2);
  white-space: nowrap;
}
.shop-state::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--rule-2);
}
.shop-state.open::before { background: var(--moss); }

@media (min-width: 860px) {
  .topbar { padding: 0 48px; height: 64px; }
  .brand { font-size: 22px; }
}

/* 顶栏内导航：只在电脑端出现，占住顶栏中段，避免右侧一片空 */
.topnav { display: none; }

@media (min-width: 860px) {
  .topnav {
    display: flex;
    align-self: stretch;
    margin-left: 40px;
    gap: 4px;
  }
  .topnav a {
    display: flex;
    align-items: center;
    padding: 0 22px;
    font-size: 16px;
    color: var(--ink-2);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color .14s, border-color .14s;
  }
  .topnav a:hover { color: var(--ink); }
  .topnav a[aria-current="page"] {
    color: var(--cinnabar);
    border-bottom-color: var(--cinnabar);
    font-weight: 600;
  }
  .topnav a:focus-visible { outline: 2px solid var(--ink); outline-offset: -4px; }
}

/* 营业时间：电脑端首屏右侧用它填实，不靠留白撑 */
.hours {
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 0;
}
.hours div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px dotted var(--rule);
  font-size: 15px;
  line-height: 1.7;
}
.hours dt { color: var(--ink-2); }
.hours dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  letter-spacing: 0.5px;
}
.hours div:last-child { border-bottom: 0; }

@media (min-width: 860px) {
  .hours { margin-top: 26px; max-width: 300px; }
  .hours div { font-size: 15.5px; padding: 10px 0; }
}

/* ============================================================
   首屏：满幅实景 + 竖排题签落在纸面
   ------------------------------------------------------------
   版式取自本地参考（白骨温泉 / 萬象閣敷島 / 山龢）：
   · 图占满，字极少
   · 竖排（writing-mode: vertical-rl）——汉字才有的排版语法
   · 字落在纸色底板上，不在图片上叠字（对比度可控，也不是俗套）
   ============================================================ */

.cover {
  position: relative;
  background: var(--paper);
  border-bottom: 1px solid var(--rule-2);
}

.cover-media {
  position: relative;
  height: 34vh;
  min-height: 210px;
  max-height: 300px;
  overflow: hidden;
}

.cover-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
}

/* 纸面题签区：竖排标题 + 营业时间 */
.cover-band {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px 20px;
  background: var(--paper);
}

.cover-vertical {
  writing-mode: vertical-rl;
  text-orientation: upright;
  margin: 0;
  font-family: var(--f-serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 4px;
  line-height: 1.8;
  color: var(--ink);
  max-height: 140px;
  flex: none;
}

.cover-meta {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 4px;
  padding-bottom: 2px;
  min-width: 0;
  flex: 1;
}

.cover-lead {
  margin: 0 0 4px;
  font-family: var(--f-serif);
  font-size: 15px;
  letter-spacing: 1.5px;
  color: var(--ink-2);
  line-height: 1.7;
}

/* 营业时间：手机端竖排两行短句，避免宽度溢出 */
.cover-hours {
  margin: 0;
  font-size: 13.5px;
  letter-spacing: 0.3px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  line-height: 1.75;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.cover-hours span { white-space: nowrap; }

/* 电脑端：图与题签并排，题签在右，像立轴 */
@media (min-width: 860px) {
  .cover {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 264px;
    /* 首屏高度固定在视口内，服务列表紧接着出现，不把首屏撑成一整页 */
    height: calc(100vh - 64px);
    min-height: 520px;
    max-height: 700px;
  }

  .cover-media {
    height: 100%;
    min-height: 0;
    max-height: none;
    order: 1;
    overflow: hidden;
  }

  .cover-band {
    order: 2;
    height: 100%;
    box-sizing: border-box;
    /* 竖排标题与营业时间靠同一侧上下排布，中间不留断口 */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    padding: 40px 26px;
    border-left: 1px solid var(--rule-2);
    overflow: hidden;
  }

  .cover-vertical {
    font-size: 24px;
    letter-spacing: 9px;
    line-height: 1.9;
    max-height: 60%;
    flex: 0 1 auto;
  }

  .cover-meta {
    flex: 0 0 auto;
    text-align: center;
    align-self: center;
    padding-bottom: 0;
  }

  .cover-lead {
    font-size: 14px;
    letter-spacing: 2px;
    margin-bottom: 10px;
    line-height: 1.7;
  }

  .cover-hours {
    font-size: 13px;
    letter-spacing: 0.5px;
    line-height: 1.9;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .cover-hours span { white-space: nowrap; }
}

/* ============================================================
   区块：标题 + 界栏
   ============================================================ */

.block { padding: 30px 20px 10px; }

.block-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule-2);
}

.block-head h2 {
  font-family: var(--f-serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 2px;
  line-height: 1.45;
  margin: 0;
}

.block-head .count {
  margin-left: auto;
  font-size: 14px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

@media (min-width: 860px) {
  .block { padding: 44px 48px 14px; }
  .block-head h2 { font-size: 24px; }
}

/* ============================================================
   服务项目：药柜抽屉式列表（不是卡片网格）
   ============================================================ */

.svc-list { display: grid; grid-template-columns: 1fr; }

@media (min-width: 660px) {
  .svc-list { grid-template-columns: 1fr 1fr; column-gap: 40px; }
}
@media (min-width: 1080px) {
  .svc-list { grid-template-columns: repeat(3, 1fr); column-gap: 48px; }
}

.svc {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 15px 0;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  font-family: inherit;
  color: inherit;
  cursor: pointer;
  transition: background .16s ease;
}
.svc:hover { background: var(--paper-up); }
.svc:active { background: var(--paper-down); }
.svc:focus-visible { outline: 2px solid var(--cinnabar); outline-offset: -2px; }

.svc-thumb {
  width: 72px; height: 72px;
  object-fit: cover;
  border-radius: 2px;
  display: block;
  background: var(--paper-down);
}

.svc-text { min-width: 0; }

/* 名称与时长同一行，描述独占整行，避免描述被挤成两行 */
.svc-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.svc-name {
  font-family: var(--f-serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 1px;
  line-height: 1.45;
}

.svc-dur {
  font-size: 14px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex: none;
}

@media (min-width: 660px) {
  .svc { grid-template-columns: 60px minmax(0, 1fr); padding: 15px 10px; }
  .svc-thumb { width: 60px; height: 60px; }
  .svc-name { font-size: 17px; }
}

/* ============================================================
   日期条（上海摩登式日期格，连排不断开）
   ============================================================ */

.days {
  display: flex;
  overflow-x: auto;
  margin-top: 14px;
  scrollbar-width: none;
}
.days::-webkit-scrollbar { display: none; }

.day {
  flex: 0 0 auto;
  width: 60px;
  padding: 9px 0 8px;
  text-align: center;
  background: var(--paper-up);
  border: 1px solid var(--rule);
  border-right-width: 0;
  font-family: inherit;
  color: var(--ink-2);
  cursor: pointer;
  transition: background .14s, color .14s, border-color .14s;
}
.day:last-child { border-right-width: 1px; }

.day .w {
  display: block;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-3);
}
.day .n {
  display: block;
  font-family: var(--f-serif);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.day[aria-pressed="true"] {
  background: var(--cinnabar);
  border-color: var(--cinnabar);
}
.day[aria-pressed="true"] .w,
.day[aria-pressed="true"] .n { color: #FCF8EF; }

.day[data-closed="1"] { color: var(--ink-3); opacity: 0.5; }
.day:focus-visible { outline: 2px solid var(--ink); outline-offset: -3px; }

/* ============================================================
   时段
   ============================================================ */

.slot-group { margin-top: 20px; }

.slot-group h3 {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 2px;
  color: var(--ink-2);
  margin: 0 0 9px;
}

.slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
@media (min-width: 520px) { .slots { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 860px) { .slots { grid-template-columns: repeat(5, 1fr); } }

.slot {
  padding: 10px 4px 9px;
  text-align: center;
  background: var(--paper-up);
  border: 1px solid var(--rule-2);
  border-radius: 2px;
  font-family: inherit;
  color: var(--ink);
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  transition: background .14s, border-color .14s, color .14s;
}
.slot .t { display: block; font-size: 16.5px; line-height: 1.4; }
.slot .left { display: block; font-size: 13px; color: var(--ink-3); line-height: 1.5; }

.slot:hover:not([disabled]) { border-color: var(--ink-2); }
.slot:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.slot[aria-pressed="true"] {
  background: var(--moss);
  border-color: var(--moss);
}
.slot[aria-pressed="true"] .t,
.slot[aria-pressed="true"] .left { color: #FCF8EF; }

/* 已满：保持可读，不用删除线（删除线让数字难认） */
.slot[disabled] {
  cursor: not-allowed;
  background: transparent;
  border-color: var(--rule);
  border-style: dashed;
}
.slot[disabled] .t { color: var(--ink-3); }
.slot[disabled] .left { color: var(--ink-3); }

.slot-empty {
  font-size: 15px;
  color: var(--ink-2);
  padding: 24px 0;
  margin: 0;
  border-bottom: 1px solid var(--rule);
}

/* ============================================================
   表单
   ============================================================ */

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 20px;
}
@media (min-width: 660px) { .form-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 860px) { .form-grid { grid-template-columns: 1fr 1fr; } }

.field { display: flex; flex-direction: column; }
.field.wide { grid-column: 1 / -1; }

.field label {
  font-size: 14.5px;
  color: var(--ink-2);
  margin-bottom: 7px;
  line-height: 1.6;
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--rule-2);
  border-radius: 2px;
  background: var(--paper-up);
  font-family: inherit;
  font-size: 17px;
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus,
.field textarea:focus {
  border-color: var(--moss);
  box-shadow: 0 0 0 3px rgba(63,83,56,0.16);
}
.field textarea { resize: vertical; min-height: 66px; line-height: 1.75; }

/* ============================================================
   按钮（无箭头尾巴、无 emoji）
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;               /* 可点区域 >=44px */
  padding: 11px 26px;
  border: 1px solid var(--cinnabar);
  border-radius: 2px;
  background: var(--cinnabar);
  color: #FCF8EF;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  line-height: 1.5;
  cursor: pointer;
  transition: background .14s, border-color .14s;
}
.btn:hover:not(:disabled) { background: var(--cinnabar-a); border-color: var(--cinnabar-a); }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.btn:disabled { opacity: 0.42; cursor: not-allowed; }

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-2);
}
.btn.ghost:hover:not(:disabled) { background: var(--paper-down); border-color: var(--ink-2); }

.btn.moss { background: var(--moss); border-color: var(--moss); }
.btn.moss:hover:not(:disabled) { background: var(--moss-a); border-color: var(--moss-a); }

.btn.sm {
  min-height: 34px;
  padding: 5px 13px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
}

/* ============================================================
   提交条：必须压在底部导航之上，否则按钮被导航挡住点不到
   ============================================================ */

.actionbar {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  z-index: 60;                 /* 高于 tabbar(50)，保证按钮可点 */
  max-width: var(--shell);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  background: rgba(250,245,236,0.99);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--rule-2);
}

/* 提交条在底部时，导航让位到它下面会互相压；改为提交条出现时导航收起 */
body.has-actionbar .tabbar { transform: translateY(110%); transition: transform .2s ease; }
body.has-actionbar .shell { padding-bottom: 88px; }

.actionbar .sum { flex: 1; min-width: 0; }
.actionbar .sum b {
  display: block;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.actionbar .sum span {
  display: block;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.5;
}

@media (min-width: 860px) {
  .actionbar {
    position: static;
    max-width: none;
    margin: 0;
    padding: 26px 0 0;
    background: none;
    backdrop-filter: none;
    border-top: 1px solid var(--rule);
    justify-content: flex-end;
  }
  body.has-actionbar .tabbar { transform: none; }
  .actionbar .sum { flex: 0 1 auto; text-align: right; padding-right: 10px; }
}

/* ============================================================
   导航
   ============================================================ */

.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  max-width: var(--shell);
  margin: 0 auto;
  display: flex;
  background: rgba(250,245,236,0.99);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--rule-2);
  padding-bottom: env(safe-area-inset-bottom);
}

.tabbar a {
  flex: 1;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  letter-spacing: 1px;
  color: var(--ink-2);
  text-decoration: none;
  border-top: 2px solid transparent;
  margin-top: -1px;
}
.tabbar a[aria-current="page"] {
  color: var(--cinnabar);
  border-top-color: var(--cinnabar);
  font-weight: 600;
}
.tabbar a:focus-visible { outline: 2px solid var(--ink); outline-offset: -4px; }

@media (min-width: 860px) {
  /* 电脑端导航已在顶栏，底部 tabbar 整条隐藏 */
  .tabbar { display: none; }
  .shell { padding-bottom: 0; }
}

/* ============================================================
   预约页：手机端整页左右留边；电脑端左信息 / 右操作
   ============================================================ */

.book-main { padding: 20px 20px 0; }

.book-block { padding-top: 26px; }
.book-block:first-child { padding-top: 6px; }

.book-aside-inner { padding: 0 20px; margin-top: 18px; }

@media (min-width: 860px) {
  .book-layout {
    display: grid;
    grid-template-columns: minmax(0, 330px) minmax(0, 1fr);
    align-items: start;
  }
  .book-aside {
    position: sticky;
    top: 64px;
    padding: 44px 32px 44px 48px;
    border-right: 1px solid var(--rule-2);
    min-height: calc(100vh - 64px);
  }
  .book-main { padding: 44px 48px 56px 40px; }
  .book-block { padding-top: 30px; }
  .book-aside-inner { padding: 0; margin-top: 0; }
}

.picked-svc {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule);
}
.picked-svc img {
  width: 84px; height: 84px;
  object-fit: cover;
  border-radius: 2px;
  display: block;
}
.picked-svc h2 {
  font-family: var(--f-serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 1.5px;
  line-height: 1.45;
  margin: 0;
}
.picked-svc .pick-dur {
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.7;
  margin: 6px 0 0;
}

@media (min-width: 860px) {
  .picked-svc { grid-template-columns: 1fr; gap: 0; }
  .picked-svc img { width: 100%; height: 168px; margin-bottom: 14px; }
  .picked-svc h2 { font-size: 24px; }
}

/* ============================================================
   预约记录
   ============================================================ */

.records { display: grid; grid-template-columns: 1fr; }
@media (min-width: 860px) {
  .records { grid-template-columns: 1fr 1fr; column-gap: 44px; }
}

.rec {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 14px;
  padding: 16px 0 16px 14px;
  border-bottom: 1px solid var(--rule);
  border-left: 3px solid var(--moss);
}
.rec[data-status="pending"] { border-left-color: var(--cinnabar); }
.rec[data-status="cancelled"],
.rec[data-status="no-show"] { border-left-color: var(--rule-2); }

.rec-when {
  font-family: var(--f-serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.5px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.rec-svc { font-size: 14.5px; color: var(--ink-2); line-height: 1.6; }
.rec-act { grid-column: 1 / -1; margin-top: 8px; }

.rec[data-status="cancelled"] .rec-when,
.rec[data-status="no-show"] .rec-when { color: var(--ink-2); }

.tag {
  font-size: 13.5px;
  line-height: 1.6;
  padding: 2px 9px;
  border-radius: 2px;
  white-space: nowrap;
  align-self: start;
}
.tag[data-s="pending"]   { background: #EBD9C4; color: #6A2A20; }
.tag[data-s="confirmed"] { background: #D6E0CF; color: #2F4229; }
.tag[data-s="done"]      { background: #E0D8C6; color: #4E4637; }
.tag[data-s="cancelled"],
.tag[data-s="no-show"]   { background: #E0D8C6; color: #4E4637; }

/* ============================================================
   空态
   ============================================================ */

.empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.9;
}
.empty .mark {
  display: block;
  font-family: var(--f-serif);
  font-size: 24px;
  letter-spacing: 8px;
  color: var(--rule-2);
  margin-bottom: 12px;
}

/* ============================================================
   店主端
   ============================================================ */

.admin-panel { padding: 22px 20px 40px; }

@media (min-width: 860px) {
  .admin-layout {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    align-items: start;
  }
  .admin-side {
    position: sticky;
    top: 63px;
    padding: 34px 30px;
    border-right: 1px solid var(--rule-2);
    min-height: calc(100vh - 63px);
  }
  .admin-panel { padding: 34px 44px 70px; }
}

.date-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule-2);
  flex-wrap: wrap;
}
.date-nav .cur {
  flex: 1 1 100%;
  order: -1;
  font-family: var(--f-serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 1px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding-bottom: 6px;
}
.date-nav .cur small {
  display: block;
  font-family: var(--f-sans);
  font-size: 13.5px;
  font-weight: 400;
  color: var(--ink-2);
  letter-spacing: 0;
}
.date-nav .btn { flex: 1; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 18px 0 8px;
  border-bottom: 1px solid var(--rule);
}
.stat { text-align: center; }
.stat .n {
  display: block;
  font-family: var(--f-serif);
  font-size: 25px;
  font-weight: 600;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}
.stat .k { display: block; font-size: 13.5px; color: var(--ink-2); }

@media (min-width: 860px) {
  .stats { grid-template-columns: 1fr; }
  .stat {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    text-align: left;
    padding: 10px 0;
    border-bottom: 1px dotted var(--rule);
  }
  .stat .k { order: -1; }
}

/* 时间轴：界栏分列 */
.tl { margin-top: 6px; }

.tl-row {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  grid-template-areas:
    "time who"
    "time svc"
    "time act";
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 720px) {
  .tl-row {
    grid-template-columns: 74px minmax(0, 150px) minmax(0, 1fr) auto;
    grid-template-areas: "time who svc act";
  }
}

.tl-time {
  grid-area: time;
  padding: 15px 10px 15px 0;
  border-right: 1px solid var(--rule);
  font-family: var(--f-serif);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.tl-time small {
  display: block;
  font-family: var(--f-sans);
  font-size: 12.5px;
  font-weight: 400;
  color: var(--ink-2);
}

.tl-who { grid-area: who; padding: 15px 12px 2px; min-width: 0; }
.tl-who .name {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  margin-right: 8px;
}
@media (min-width: 720px) {
  .tl-who { padding: 15px 12px; border-right: 1px solid var(--rule); }
}

.tl-svc { grid-area: svc; padding: 0 12px; min-width: 0; }
@media (min-width: 720px) { .tl-svc { padding: 15px 12px; } }

.tl-svc .svc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  white-space: nowrap;          /* 「项目 · 时长」不许断行 */
  overflow: hidden;
  text-overflow: ellipsis;
}

.tl-svc .tel {
  display: block;
  margin-top: 2px;
}
.tl-svc .tel a {
  font-size: 15.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;          /* 手机号绝不断行，否则会拨错 */
  letter-spacing: 0.5px;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.tl-svc .note {
  font-size: 14.5px;
  color: #7A3A12;              /* 备注是内容，压暗仍过对比度 */
  line-height: 1.6;
  margin-top: 4px;
}

.tl-act {
  grid-area: act;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 0 15px 12px;
}
@media (min-width: 720px) {
  .tl-act {
    padding: 15px 0 15px 16px;
    justify-content: flex-end;
    align-content: flex-start;
    /* 四个按钮等宽两行排，杜绝 3+1 错位 */
    display: grid;
    grid-template-columns: repeat(2, 84px);
    gap: 6px;
    width: auto;
    max-width: none;
  }
  .tl-act .btn {
    width: 84px;
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
  }
}

/* ============================================================
   登录
   ============================================================ */

.login {
  max-width: 380px;
  margin: 0 auto;
  padding: 76px 24px;
  text-align: center;
}
.login .stamp {
  width: 70px; height: 70px;
  margin: 0 auto 26px;
  border: 2px solid var(--cinnabar);
  border-radius: 3px;
  color: var(--cinnabar);
  font-family: var(--f-serif);
  font-size: 38px;
  line-height: 66px;
}
.login h1 {
  font-family: var(--f-serif);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 5px;
  margin: 0 0 12px;
}
.login .tip {
  font-size: 15px;
  color: var(--ink-2);
  margin: 0 0 30px;
  line-height: 1.8;
}
.login .err {
  font-size: 14.5px;
  color: var(--cinnabar);
  min-height: 26px;
  margin: 16px 0 0;
  line-height: 1.6;
}

/* ============================================================
   提示 / 弹层
   ============================================================ */

.toast {
  position: fixed;
  left: 50%;
  bottom: 104px;
  transform: translateX(-50%) translateY(10px);
  z-index: 300;
  max-width: 82vw;
  padding: 12px 22px;
  border-radius: 3px;
  background: #2B241C;
  color: #FCF8EF;
  font-size: 15.5px;
  line-height: 1.6;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (min-width: 860px) { .toast { bottom: 44px; } }

.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
  background: rgba(34,28,22,0.44);
}
.sheet-mask.show { display: flex; }
@media (min-width: 860px) { .sheet-mask { align-items: center; } }

.sheet {
  width: 100%;
  max-width: 470px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 28px 24px calc(24px + env(safe-area-inset-bottom));
  background: var(--paper-up);
  border: 1px solid var(--rule-2);
  border-radius: 3px 3px 0 0;
  animation: rise .22s ease;
}
@media (min-width: 860px) { .sheet { border-radius: 3px; padding-bottom: 28px; } }
@keyframes rise {
  from { transform: translateY(20px); opacity: 0.7; }
  to { transform: translateY(0); opacity: 1; }
}

.sheet h2 {
  font-family: var(--f-serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 2px;
  line-height: 1.45;
  margin: 0 0 18px;
  color: var(--moss);
}

.detail-box {
  padding: 16px 18px;
  margin-bottom: 22px;
  background: var(--paper);
  border: 1px solid var(--rule);
  font-size: 16px;
  line-height: 2;
}
.detail-box b {
  font-family: var(--f-serif);
  font-size: 18px;
  letter-spacing: 0.5px;
  font-variant-numeric: tabular-nums;
}

.sheet .btn { width: 100%; }

/* ============================================================
   工具
   ============================================================ */

.hidden { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.pad-bottom { height: 30px; }
@media (min-width: 860px) { .pad-bottom { height: 60px; } }
