/* ============================================================
   老人端 H5 · 适老化设计(大字体/高对比/呼叫器大按钮)
   未来打包APP与硬件软件呼叫器共用同一套接口与视觉
   ============================================================ */
:root {
  --e-bg: #f6f4ef;
  --e-card: #ffffff;
  --e-red: #e5484d;
  --e-red-dark: #c62f34;
  --e-orange: #f08c00;
  --e-green: #2f9e44;
  --e-blue: #1971c2;
  --e-text: #2b2825;
  --e-sub: #8a837b;
  --e-border: #eae4da;
  --e-shadow: 0 4px 18px rgba(80, 60, 30, .10);
  /* 系统风格主题变量(由视图注入 site_theme(), 未注入时用下面兜底) */
  --e-accent: #e5484d;
  --e-accent2: #d9730d;
  --e-glow: rgba(229, 72, 77, .30);
  --e-accent-soft: rgba(229, 72, 77, .10);
  --e-accent-soft2: rgba(217, 115, 13, .06);
}

/* ---------- SVG 图标(全站统一 icons.svg, 不使用 emoji) ---------- */
svg.ic { width: 1.2em; height: 1.2em; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.24em; flex: none; }
.cir .ico svg.ic, .e-nav .ico svg.ic, .mico svg.ic, .e-empty .big svg.ic, .svc .ico svg.ic { width: 1.5em; height: 1.5em; }
.sos-btn svg.ic { width: 2rem; height: 2rem; stroke-width: 2; }
.stars .star svg.ic { width: 1em; height: 1em; fill: currentColor; stroke: none; }
.stars-static svg.ic { width: .95em; height: .95em; fill: currentColor; stroke: none; }
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 17px; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, var(--e-accent-soft2), var(--e-bg) 380px); color: var(--e-text);
  padding-bottom: calc(78px + env(safe-area-inset-bottom));
}
button { font-family: inherit; }

/* ---------- 顶部 ---------- */
.e-top {
  background: linear-gradient(150deg, var(--e-accent2), var(--e-accent) 70%);
  color: #fff; padding: 18px 18px 22px; border-radius: 0 0 26px 26px;
  position: relative; overflow: hidden;
}
.e-top::after { content: ''; position: absolute; right: -30px; top: -30px; width: 130px; height: 130px; border-radius: 50%; background: rgba(255,255,255,.08); }
.e-top .hi { font-size: 1.3rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.e-top .sub { margin-top: 6px; font-size: .85rem; opacity: .92; display: flex; gap: 14px; flex-wrap: wrap; }
.e-top .lvl { background: rgba(255,255,255,.22); border-radius: 99px; padding: 2px 12px; font-size: .78rem; }
.e-top .logout { position: absolute; right: 14px; top: 14px; color: #fff; opacity: .9; font-size: .82rem; text-decoration: none; padding: 6px 10px; border: 1px solid rgba(255,255,255,.4); border-radius: 99px; }
.e-top .logout:active { background: rgba(255,255,255,.15); }

/* ---------- 页面容器 ---------- */
.e-page { padding: 16px 14px 20px; max-width: 560px; margin: 0 auto; }
.e-title { font-size: 1.15rem; font-weight: 700; margin: 4px 0 14px; display: flex; align-items: center; gap: 8px; }
.e-title .back { color: var(--e-sub); font-size: .85rem; text-decoration: none; font-weight: 400; margin-left: auto; }
.e-card { background: var(--e-card); border-radius: 18px; box-shadow: var(--e-shadow); padding: 18px 16px; margin-bottom: 14px; border: 1px solid var(--e-border); }
.e-card h3 { font-size: 1rem; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }

/* ---------- SOS 呼叫器大按钮 ---------- */
.sos-wrap { display: flex; flex-direction: column; align-items: center; padding: 10px 0 4px; }
.sos-btn {
  width: 208px; height: 208px; border-radius: 50%; border: none; cursor: pointer;
  background: radial-gradient(circle at 32% 28%, #ff6b6e, #e5484d 55%, #c62f34);
  color: #fff; font-size: 2rem; font-weight: 800; letter-spacing: 2px;
  box-shadow: 0 14px 34px rgba(198, 47, 52, .42), inset 0 -8px 18px rgba(0,0,0,.18), inset 0 6px 12px rgba(255,255,255,.22);
  position: relative; transition: transform .15s;
  outline: 10px solid rgba(229, 72, 77, .14);
}
.sos-btn small { display: block; font-size: .85rem; font-weight: 500; letter-spacing: 6px; margin-top: 6px; opacity: .92; }
.sos-btn:active { transform: scale(.94); }
.sos-btn.pulsing::before {
  content: ''; position: absolute; inset: -14px; border-radius: 50%;
  border: 4px solid rgba(229, 72, 77, .5); animation: sosPulse 1.4s infinite;
}
@keyframes sosPulse { 0% { transform: scale(.92); opacity: 1; } 100% { transform: scale(1.25); opacity: 0; } }
.sos-tip { margin-top: 16px; font-size: .85rem; color: var(--e-sub); text-align: center; line-height: 1.7; }
.sos-state { margin-top: 10px; font-size: .95rem; font-weight: 700; color: var(--e-red); display: none; }
.sos-state.on { display: block; animation: blink 1.1s infinite; }
@keyframes blink { 50% { opacity: .35; } }

/* ---------- 功能宫格 ---------- */
.e-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.e-tile {
  background: var(--e-card); border-radius: 18px; padding: 16px 4px 13px; text-align: center;
  text-decoration: none; color: var(--e-text); box-shadow: var(--e-shadow); border: 1px solid var(--e-border);
  position: relative; transition: transform .12s;
}
.e-tile:active { transform: scale(.93); }
.e-tile .ico { width: 46px; height: 46px; margin: 0 auto 8px; border-radius: 15px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.e-tile b { font-size: .86rem; display: block; }
.e-tile .badge {
  position: absolute; top: 8px; right: 10px; min-width: 20px; height: 20px; border-radius: 99px;
  background: var(--e-red); color: #fff; font-size: .72rem; line-height: 20px; padding: 0 5px; font-weight: 700;
}
.t-red { background: #fdecec; color: #c62f34; }
.t-orange { background: #fff3e0; color: #d9730d; }
.t-green { background: #e6f6ea; color: #2f9e44; }
.t-blue { background: #e7f0fb; color: #1971c2; }
.t-purple { background: #f3edfb; color: #7048c8; }
.t-brown { background: #f7efe6; color: #a0662c; }

/* ---------- 底部导航 ---------- */
.e-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: calc(64px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255,255,255,.97); backdrop-filter: blur(10px);
  border-top: 1px solid var(--e-border); display: flex; z-index: 60;
}
.e-tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; text-decoration: none; color: var(--e-sub); font-size: .72rem; position: relative;
}
.e-tabbar a .ico { font-size: 1.25rem; }
.e-tabbar a.on { color: var(--e-red); font-weight: 700; }
.e-tabbar a .badge { position: absolute; top: 6px; right: 22%; min-width: 17px; height: 17px; background: var(--e-red); color: #fff; border-radius: 99px; font-size: .68rem; line-height: 17px; text-align: center; padding: 0 4px; font-weight: 700; }

/* ---------- 通用组件 ---------- */
.e-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px dashed var(--e-border); font-size: .92rem; }
.e-row:last-child { border-bottom: none; }
.e-row .gr { margin-left: auto; color: var(--e-sub); font-size: .8rem; text-align: right; }
.e-empty { text-align: center; padding: 34px 0; color: var(--e-sub); font-size: .9rem; }
.e-empty .big { font-size: 2.2rem; margin-bottom: 8px; }

.tag { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .76rem; font-weight: 600; }
.tag.red { background: #fdecec; color: #c62f34; }
.tag.green { background: #e6f6ea; color: #2f9e44; }
.tag.blue { background: #e7f0fb; color: #1971c2; }
.tag.orange { background: #fff3e0; color: #d9730d; }
.tag.gray { background: #efece6; color: #8a837b; }
.tag.purple { background: #f3edfb; color: #7048c8; }

.btn-e {
  display: block; width: 100%; border: none; border-radius: 15px; padding: 15px;
  font-size: 1.02rem; font-weight: 700; cursor: pointer;
  background: linear-gradient(140deg, var(--e-accent), var(--e-accent2)); color: #fff;
  box-shadow: 0 6px 18px var(--e-glow);
}
.btn-e:active { transform: scale(.97); }
.btn-e.plain { background: #fff; color: var(--e-text); border: 1.5px solid var(--e-border); box-shadow: none; }
.btn-e.green { background: linear-gradient(140deg, #2f9e44, #51cf66); box-shadow: 0 6px 18px rgba(47, 158, 68, .28); }
.btn-e:disabled { opacity: .55; }

/* ---------- 登录页 ---------- */
.login-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 26px; background: linear-gradient(160deg, #b02a30 0%, #e5484d 45%, var(--e-bg) 46%); }
.login-card { background: #fff; border-radius: 24px; box-shadow: 0 18px 50px rgba(90, 30, 30, .3); padding: 30px 24px; width: 100%; max-width: 400px; }
.login-card h1 { text-align: center; font-size: 1.3rem; margin-bottom: 6px; }
.login-card .s { text-align: center; color: var(--e-sub); font-size: .85rem; margin-bottom: 22px; }
.login-card input { width: 100%; border: 1.5px solid var(--e-border); border-radius: 14px; padding: 14px 16px; font-size: 1.05rem; margin-bottom: 14px; outline: none; background: var(--e-bg); }
.login-card input:focus { border-color: var(--e-red); background: #fff; }
.login-card .hint { font-size: .78rem; color: var(--e-sub); line-height: 1.8; margin-top: 14px; background: var(--e-bg); border-radius: 12px; padding: 10px 14px; }

/* ---------- 点餐 ---------- */
.meal-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.meal-tabs button { flex: 1; border: none; border-radius: 13px; padding: 12px 0; font-size: .95rem; font-weight: 700; background: #fff; color: var(--e-sub); border: 1.5px solid var(--e-border); cursor: pointer; }
.meal-tabs button.on { background: linear-gradient(140deg, #e5484d, #f0654d); color: #fff; border-color: transparent; box-shadow: 0 5px 14px rgba(229, 72, 77, .3); }
.dish { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px dashed var(--e-border); }
.dish:last-child { border-bottom: none; }
.dish .info { flex: 1; }
.dish .info b { font-size: .98rem; display: block; }
.dish .info .tg { font-size: .72rem; color: var(--e-orange); margin-top: 3px; }
.dish .price { color: var(--e-red); font-weight: 800; font-size: 1rem; }
.dish .pick { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--e-border); background: #fff; font-size: 1.15rem; color: var(--e-sub); cursor: pointer; flex: none; }
.dish .pick.on { background: var(--e-red); border-color: var(--e-red); color: #fff; }
.meal-bar { position: fixed; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--e-border); padding: 12px 16px; display: flex; align-items: center; gap: 14px; z-index: 50; box-shadow: 0 -4px 18px rgba(80,60,30,.08); }
.meal-bar .amt { font-size: 1.1rem; font-weight: 800; color: var(--e-red); }
.meal-bar .amt small { font-size: .75rem; color: var(--e-sub); font-weight: 400; }
.meal-bar .btn-e { flex: 1; padding: 12px; }
.pickup-code { text-align: center; padding: 6px 0 2px; }
.pickup-code b { font-size: 2.2rem; letter-spacing: 10px; color: var(--e-red); font-weight: 800; }

/* ---------- 健康卡片 ---------- */
.health-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.h-card { background: var(--e-card); border-radius: 18px; padding: 16px; box-shadow: var(--e-shadow); border: 1px solid var(--e-border); }
.h-card .lb { font-size: .82rem; color: var(--e-sub); }
.h-card .vl { font-size: 1.9rem; font-weight: 800; margin: 6px 0 2px; }
.h-card .vl small { font-size: .85rem; font-weight: 500; color: var(--e-sub); margin-left: 3px; }
.h-card .tm { font-size: .74rem; color: var(--e-sub); }
.h-card.warn .vl { color: var(--e-red); }
.h-card .spark { display: flex; align-items: flex-end; gap: 3px; height: 44px; margin-top: 10px; }
.h-card .spark i { flex: 1; background: linear-gradient(to top, #f8b4b6, #e5484d); border-radius: 3px 3px 0 0; min-height: 3px; }

/* ---------- 弹窗/toast ---------- */
.e-mask { position: fixed; inset: 0; background: rgba(40, 20, 15, .5); z-index: 90; display: none; align-items: center; justify-content: center; padding: 26px; }
.e-mask.on { display: flex; }
.e-modal { background: #fff; border-radius: 22px; padding: 26px 22px; width: 100%; max-width: 380px; text-align: center; }
.e-modal .mico { font-size: 2.4rem; }
.e-modal h2 { font-size: 1.15rem; margin: 12px 0 8px; }
.e-modal p { color: var(--e-sub); font-size: .9rem; line-height: 1.8; margin-bottom: 18px; }
.e-modal .acts { display: flex; gap: 10px; }
.e-modal .acts .btn-e { padding: 13px; }
.e-toast { position: fixed; top: 16%; left: 50%; transform: translateX(-50%); background: rgba(30, 25, 20, .92); color: #fff; padding: 13px 26px; border-radius: 99px; font-size: .95rem; z-index: 120; max-width: 86vw; text-align: center; }
textarea.e-input, select.e-input, input.e-input { width: 100%; border: 1.5px solid var(--e-border); border-radius: 13px; padding: 13px 15px; font-size: .98rem; outline: none; background: var(--e-bg); font-family: inherit; }
textarea.e-input:focus, select.e-input:focus, input.e-input:focus { border-color: var(--e-red); background: #fff; }

/* ---------- 医生卡 ---------- */
.doc-card { background: linear-gradient(140deg, #e7f0fb, #ffffff); border: 1px solid #d3e4f7; }
.doc-avatar { width: 62px; height: 62px; border-radius: 50%; background: linear-gradient(140deg, #1971c2, #4dabf7); color: #fff; font-size: 1.5rem; display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.doc-acts { display: flex; gap: 10px; margin-top: 14px; }

/* ---------- 值班呼叫选项 ---------- */
.duty-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.duty-grid button { border: 1.5px solid var(--e-border); background: #fff; border-radius: 14px; padding: 14px 8px; font-size: .92rem; font-weight: 600; color: var(--e-text); cursor: pointer; }
.duty-grid button.on { border-color: var(--e-orange); background: #fff3e0; color: #d9730d; }

/* ---------- 圆形按钮呼叫器(首页全服务) ---------- */
.cir-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 4px; }
.cir-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 6px; }
.cir {
  position: relative; border: none; background: transparent; cursor: pointer; text-decoration: none;
  display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 0;
  -webkit-tap-highlight-color: transparent; transition: transform .14s;
}
.cir:active { transform: scale(.9); }
.cir .ico {
  width: 62px; height: 62px; border-radius: 50%; font-size: 1.65rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px var(--c-sh, rgba(80,60,30,.15)), inset 0 -4px 8px rgba(0,0,0,.06), inset 0 4px 8px rgba(255,255,255,.35);
  border: 3px solid #fff; outline: 1px solid rgba(0,0,0,.04);
}
.cir b { font-size: .82rem; font-weight: 600; color: var(--e-text); white-space: nowrap; }
.cir .badge {
  position: absolute; top: -4px; right: 8%; min-width: 20px; height: 20px; border-radius: 99px;
  background: var(--e-red); color: #fff; font-size: .72rem; line-height: 20px; padding: 0 5px; font-weight: 700;
  box-shadow: 0 2px 6px rgba(198,47,52,.4);
}
/* 呼叫类大圆钮 */
.cir-row .cir .ico { width: 74px; height: 74px; font-size: 2rem; }
.cir-row .cir b { font-size: .9rem; font-weight: 700; }
.c-orange { --c-sh: rgba(240,140,0,.35); } .c-orange .ico { background: linear-gradient(140deg,#ffc078,#f08c00); }
.c-green  { --c-sh: rgba(47,158,68,.32); } .c-green  .ico { background: linear-gradient(140deg,#8ce99a,#2f9e44); }
.c-teal   { --c-sh: rgba(12,150,141,.32); } .c-teal   .ico { background: linear-gradient(140deg,#66d9e8,#0c968d); }
/* 服务宫格圆钮 */
.c-red    { --c-sh: rgba(229,72,77,.3); } .c-red    .ico { background: linear-gradient(140deg,#ffc2c4,#e5484d); }
.c-blue   { --c-sh: rgba(25,113,194,.3); } .c-blue  .ico { background: linear-gradient(140deg,#a5d8ff,#1971c2); }
.c-pink   { --c-sh: rgba(214,51,108,.28); } .c-pink .ico { background: linear-gradient(140deg,#fcc2d7,#d6336c); }
.c-purple { --c-sh: rgba(112,72,200,.28); } .c-purple .ico { background: linear-gradient(140deg,#d0bfff,#7048c8); }
.c-indigo { --c-sh: rgba(59,76,202,.28); } .c-indigo .ico { background: linear-gradient(140deg,#bac8ff,#3b4cca); }
.c-cyan   { --c-sh: rgba(0,149,168,.28); } .c-cyan  .ico { background: linear-gradient(140deg,#99e9f2,#0095a8); }
.c-violet { --c-sh: rgba(103,65,217,.26); } .c-violet .ico { background: linear-gradient(140deg,#e5dbff,#6741d9); }
.c-gold   { --c-sh: rgba(245,159,0,.3); } .c-gold  .ico { background: linear-gradient(140deg,#ffe066,#f59f00); }
.c-green2 { --c-sh: rgba(64,142,82,.3); } .c-green2 .ico { background: linear-gradient(140deg,#b2f2bb,#408e52); }
.c-brown  { --c-sh: rgba(160,102,44,.28); } .c-brown .ico { background: linear-gradient(140deg,#ffd8a8,#a0662c); }
.c-slate  { --c-sh: rgba(73,87,101,.28); } .c-slate .ico { background: linear-gradient(140deg,#dee2e6,#495765); }

/* ---------- 上门服务页 ---------- */
.care-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.care-tabs button { border: 1.5px solid var(--e-border); background: #fff; border-radius: 99px; padding: 8px 14px; font-size: .85rem; font-weight: 600; color: var(--e-sub); cursor: pointer; }
.care-tabs button.on { background: linear-gradient(140deg,#1971c2,#4dabf7); color: #fff; border-color: transparent; }
.svc { display: flex; align-items: center; gap: 10px; padding: 13px 0; border-bottom: 1px dashed var(--e-border); }
.svc:last-child { border-bottom: none; }
.svc .info { flex: 1; min-width: 0; }
.svc .info b { font-size: .95rem; display: block; }
.svc .info .tg { font-size: .72rem; color: var(--e-blue); margin-top: 2px; display: block; }
.svc .info .ds { font-size: .74rem; color: var(--e-sub); margin-top: 3px; display: block; line-height: 1.5; }
.svc .right { text-align: center; flex: none; }
.svc .price { color: var(--e-red); font-weight: 800; font-size: .92rem; display: block; margin-bottom: 6px; }
.btn-order { border: none; background: linear-gradient(140deg,#1971c2,#4dabf7); color: #fff; border-radius: 99px; padding: 7px 16px; font-size: .85rem; font-weight: 700; cursor: pointer; }
.btn-order:active { transform: scale(.94); }
.flb { display: block; font-size: .82rem; color: var(--e-sub); margin: 12px 0 6px; font-weight: 600; }

/* ---------- 评价页 ---------- */
.btn-mini { border: none; background: linear-gradient(140deg,#408e52,#69db7c); color: #fff; border-radius: 99px; padding: 6px 14px; font-size: .8rem; font-weight: 700; cursor: pointer; margin-top: 4px; }
.stars { font-size: 2.1rem; letter-spacing: 6px; margin: 4px 0 10px; user-select: none; }
.stars .star { color: #d9d2c7; cursor: pointer; transition: transform .1s; }
.stars .star.on { color: #f59f00; text-shadow: 0 2px 8px rgba(245,159,0,.35); }
.stars .star:active { transform: scale(1.25); }
.stars-static { color: #f59f00; letter-spacing: 2px; }
.tagpick { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; justify-content: center; }
.tagpick .tp { border: 1.5px solid var(--e-border); background: #fff; border-radius: 99px; padding: 7px 13px; font-size: .8rem; font-weight: 600; color: var(--e-sub); cursor: pointer; }
.tagpick .tp.on { background: #fff3e0; border-color: var(--e-orange); color: #d9730d; }

/* ---------- 问题建议页 ---------- */
.prob-cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.prob-cats .pc { border: 1.5px solid var(--e-border); background: #fff; border-radius: 99px; padding: 9px 16px; font-size: .88rem; font-weight: 600; color: var(--e-sub); cursor: pointer; }
.prob-cats .pc.on { background: linear-gradient(140deg,#408e52,#69db7c); color: #fff; border-color: transparent; }

/* ---------- 资讯页 ---------- */
.news { display: flex; align-items: center; gap: 10px; padding: 14px 0; border-bottom: 1px dashed var(--e-border); cursor: pointer; }
.news:last-child { border-bottom: none; }
.news .info { flex: 1; min-width: 0; }
.news .info b { font-size: .95rem; display: block; line-height: 1.5; }
.news .meta { font-size: .72rem; color: var(--e-sub); margin-top: 4px; display: block; }
.news .ds { font-size: .78rem; color: var(--e-sub); margin-top: 3px; display: block; }
.news .arrow { font-size: 1.4rem; color: var(--e-sub); flex: none; }
.e-modal h2 { line-height: 1.5; }
.e-modal .nm { font-size: .78rem; color: var(--e-sub); }
.nbody { font-size: .92rem; line-height: 1.9; color: var(--e-text); }
.nbody img { max-width: 100%; border-radius: 12px; }
.stars-static svg.ic + svg.ic { margin-left: 3px; }
svg.ic.lg { width: 2.4rem; height: 2.4rem; stroke-width: 1.6; }
