/* ============================================================
 * 合膳养 · 看播 H5 —— 基础样式（设计变量 + reset + toast）
 * ============================================================ */

:root {
  --c-primary: #1f7a5c;
  --c-primary-d: #155d46;
  --c-primary-l: #e6f2ec;
  --c-accent: #e8a33d;
  --c-danger: #d94f43;
  --c-text: #1d2429;
  --c-text-2: #5b6771;
  --c-text-3: #8d99a3;
  --c-line: #e4e9ed;
  --c-bg: #f4f6f8;
  --c-card: #ffffff;
  --r-s: 8px;
  --r-m: 12px;
  --r-l: 18px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue",
          "Microsoft YaHei", sans-serif;
}

* { -webkit-box-sizing: border-box; box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* display:flex 会盖掉 hidden 属性，这里统一兜底 */
[hidden] { display: none !important; }

/* 微信里长按会弹出菜单，输入区禁掉更干净 */
input, button, textarea {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  outline: none;
  background: none;
  color: inherit;
}

/* iOS 输入字号 < 16px 会触发自动放大，这里强制 16px */
input[type="text"], input[type="tel"], input[type="number"], textarea {
  font-size: 16px;
}

/* ---------- 通用按钮 ---------- */
.btn {
  display: block;
  width: 100%;
  height: 48px;
  line-height: 48px;
  text-align: center;
  border-radius: var(--r-m);
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: var(--c-primary);
  cursor: pointer;
  transition: opacity .15s ease, transform .1s ease;
}
.btn:active { opacity: .82; transform: scale(.99); }
.btn[disabled] { background: #c6d0d6; color: #fff; cursor: not-allowed; }

/* ---------- Toast ---------- */
.hsy-toast {
  position: fixed;
  left: 50%;
  bottom: 15%;
  transform: translateX(-50%) translateY(8px);
  max-width: 78vw;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(28, 33, 37, .92);
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity .2s ease, transform .2s ease;
  word-break: break-all;
}
.hsy-toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }
.hsy-toast.is-info { background: rgba(31, 122, 92, .95); }
.hsy-toast.is-warn { background: rgba(232, 163, 61, .96); color: #3a2a08; }
.hsy-toast.is-error { background: rgba(217, 79, 67, .96); }

/* ---------- 通用小元素 ---------- */
.tag-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: var(--c-danger);
  border-radius: 999px;
  padding: 2px 8px;
  line-height: 1.6;
}
.tag-live::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: hsy-blink 1.1s steps(2, start) infinite;
}
@keyframes hsy-blink { to { visibility: hidden; } }

@-webkit-keyframes hsy-blink { to { visibility: hidden; } }
