/* ============================================================
   小榆校园 · 首页与 IP 互动线 · home-ip.css
   ------------------------------------------------------------
   只做版式补充：不新增色值、字号与圆角，全部引用 yu-base.css 的 --yu-*。
   不重写按钮 / 卡片 / 输入框 / 标签，页面组合 .yu-* 原子件即可。
   ============================================================ */

[hidden] { display: none !important; }

/* ---------- 页面纵向节奏 ---------- */
.hi-stack { display: flex; flex-direction: column; gap: var(--yu-section-gap); padding-top: var(--yu-space-4); }
.hi-stack--tight { gap: var(--yu-card-gap); }
.hi-page--top { padding-top: var(--yu-space-4); }

/* ---------- 品牌头 ---------- */
.hi-hero-date { font-size: var(--yu-fs-micro); color: rgba(255, 255, 255, .78); }
.hi-brand { display: flex; align-items: center; gap: 8px; }
.hi-brand__leaf {
  width: 9px; height: 9px; flex-shrink: 0;
  border-radius: 50% 0 50% 50%;
  background: var(--yu-leaf);
  transform: rotate(-18deg);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .18);
}
.hi-hero-login {
  display: inline-flex; align-items: center; justify-content: center;
  height: 32px; padding: 0 14px; flex-shrink: 0;
  border-radius: var(--yu-radius-pill);
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .3);
  color: var(--yu-white);
  font-size: var(--yu-fs-caption); font-weight: 600;
}
.hi-hero-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.hi-hero-chip {
  display: inline-flex; align-items: center; gap: 4px;
  height: 20px; padding: 0 8px;
  border-radius: var(--yu-radius-pill);
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .2);
  font-size: var(--yu-fs-micro); font-weight: 600;
}

/* IP 形象：可点进互动页 */
.hi-mascot { text-decoration: none; }
.hi-mascot img { width: 100%; height: auto; }
.hi-mascot__tap {
  position: absolute; right: auto; left: -26px; bottom: 2px;
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 9px;
  border-radius: var(--yu-radius-pill);
  background: var(--yu-white);
  color: var(--yu-orange-700);
  font-size: var(--yu-fs-micro); font-weight: 700;
  white-space: nowrap;
  box-shadow: var(--yu-shadow-sm);
}

/* ---------- 公告 / 广播 ---------- */
.hi-bulletin {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: var(--yu-radius-md);
  background: var(--yu-surface);
  border: 1px solid var(--yu-border);
  box-shadow: var(--yu-shadow-xs);
}
.hi-bulletin__ic {
  display: grid; place-items: center; flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--yu-orange-soft);
  color: var(--yu-orange-700);
}
.hi-bulletin__tx { flex: 1; min-width: 0; font-size: var(--yu-fs-caption); line-height: 1.5; }
.hi-bulletin__more { flex-shrink: 0; font-size: var(--yu-fs-micro); color: var(--yu-text-3); }

/* 紧急广播条：置顶、可折叠 */
.hi-alert {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: flex-start; gap: 10px;
  padding: calc(11px + var(--yu-safe-top)) var(--yu-gutter) 11px;
  background: var(--yu-danger-soft);
  border-bottom: 1px solid var(--yu-line);
  color: var(--yu-danger);
}
.hi-alert__tag {
  display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0;
  height: 22px; padding: 0 8px;
  border-radius: var(--yu-radius-xs);
  background: var(--yu-danger); color: var(--yu-white);
  font-size: var(--yu-fs-micro); font-weight: 700;
}
.hi-alert__body { flex: 1; min-width: 0; }
.hi-alert__title { font-size: var(--yu-fs-sm); font-weight: 700; line-height: 1.4; }
.hi-alert__desc { margin-top: 2px; font-size: var(--yu-fs-micro); line-height: 1.5; color: var(--yu-text-2); }
.hi-alert__close {
  display: grid; place-items: center; flex-shrink: 0;
  width: 26px; height: 26px; border-radius: 50%;
  color: var(--yu-danger);
}
/* 折叠后的小条：保留「紧急通知 N 条」 */
.hi-alert--mini {
  align-items: center;
  padding-top: calc(8px + var(--yu-safe-top)); padding-bottom: 8px;
  cursor: pointer;
}
.hi-alert--mini .hi-alert__body { display: none; }
.hi-alert--mini .hi-alert__tag { height: 20px; }
.hi-alert__mini { flex: 1; min-width: 0; font-size: var(--yu-fs-caption); font-weight: 600; }
.hi-pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--yu-white);
  box-shadow: 0 0 0 0 rgba(255, 255, 255, .55);
  animation: hi-pulse 1.8s var(--yu-ease) infinite;
}
@keyframes hi-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .55); }
  70% { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}
.hi-pulse--ink { background: var(--yu-primary); animation: none; }
.hi-loader {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .28);
  border-top-color: var(--yu-orange);
  animation: yu-spin .8s linear infinite;
}

/* ---------- 加载细条 ---------- */
.hi-loadbar {
  height: 3px; width: 100%;
  border-radius: 0;
  background: linear-gradient(90deg, var(--yu-green-200), var(--yu-orange-soft), var(--yu-green-200));
  background-size: 200% 100%;
  animation: hi-loadbar 1.1s linear infinite;
}
@keyframes hi-loadbar { to { background-position: -200% 0; } }

/* ---------- 宫格标记 ---------- */
.yu-entry__ic img { width: 100%; height: 100%; object-fit: contain; }
.hi-entry-ic { position: relative; }
.hi-lock {
  position: absolute; top: -5px; right: -7px;
  display: grid; place-items: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--yu-bg-sub);
  color: var(--yu-text-3);
  box-shadow: 0 0 0 2px var(--yu-surface);
}
.hi-lock .yu-ico { width: 11px; height: 11px; }

/* ---------- 待办列表 ---------- */
.hi-row-ic {
  display: grid; place-items: center; flex-shrink: 0;
  width: 42px; height: 42px;
  border-radius: var(--yu-radius-md);
}
.hi-row-ic .yu-ico { width: 21px; height: 21px; }

/* ---------- IP 轻量卡 ---------- */
.hi-ipcard { position: relative; overflow: hidden; }
.hi-ipcard__art {
  position: absolute; right: -4px; bottom: -10px;
  width: 96px; height: auto;
  pointer-events: none;
}
.hi-ipcard__body { position: relative; z-index: 1; padding-right: 92px; }
.hi-progress {
  height: 8px; border-radius: var(--yu-radius-pill);
  background: var(--yu-cream-deep);
  overflow: hidden;
}
.hi-progress__bar { display: block; height: 100%; border-radius: var(--yu-radius-pill); background: var(--yu-gradient-primary); }
.hi-progress--accent .hi-progress__bar { background: var(--yu-gradient-accent); }

/* ---------- 轮播 Banner ---------- */
.hi-banner { position: relative; border-radius: var(--yu-radius-lg); overflow: hidden; box-shadow: var(--yu-shadow-sm); }
.hi-banner__track { display: flex; transition: transform .45s var(--yu-ease); }
.hi-banner__slide {
  position: relative; flex: 0 0 100%; min-width: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 14px; color: var(--yu-white); overflow: hidden;
}
.hi-banner__emoji {
  display: grid; place-items: center; flex-shrink: 0;
  width: 46px; height: 46px; border-radius: var(--yu-radius-md);
  background: rgba(255, 255, 255, .2); font-size: 22px;
}
.hi-banner__body { flex: 1; min-width: 0; }
.hi-banner__title { display: flex; align-items: center; gap: 6px; font-size: var(--yu-fs-sm); font-weight: 700; }
.hi-banner__sub { margin-top: 2px; font-size: var(--yu-fs-micro); opacity: .92; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hi-banner__badge { padding: 2px 6px; border-radius: var(--yu-radius-xs); background: rgba(255, 255, 255, .26); font-size: 10px; font-weight: 700; }
.hi-banner__dots { position: absolute; left: 0; right: 0; bottom: 7px; display: flex; justify-content: center; gap: 5px; }
.hi-banner__dot { width: 6px; height: 6px; border-radius: var(--yu-radius-pill); background: rgba(255, 255, 255, .55); transition: width .2s, background .2s; }
.hi-banner__dot.is-active { width: 14px; background: #fff; }

/* ---------- 店铺小卡 ---------- */
.hi-guide-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.hi-guide-row::-webkit-scrollbar { display: none; }
.hi-shop-card { flex: 0 0 156px; min-width: 0; padding: 8px; border-radius: var(--yu-radius-md); }
.hi-shop-card__cover {
  position: relative; width: 100%; height: 92px;
  border-radius: var(--yu-radius-sm); overflow: hidden;
  background: var(--yu-primary-soft);
}
.hi-shop-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.hi-shop-card__cover .hi-emoji { display: grid; place-items: center; width: 100%; height: 100%; font-size: 30px; }
.hi-shop-card__score {
  position: absolute; top: 5px; left: 5px; padding: 1px 6px;
  border-radius: var(--yu-radius-xs); background: rgba(0, 0, 0, .45);
  color: #fff; font-size: 10px; font-weight: 600;
}
.hi-shop-card__name { display: flex; align-items: center; gap: 4px; margin-top: 7px; font-size: var(--yu-fs-caption); font-weight: 600; }
.hi-shop-card__desc { margin-top: 2px; font-size: var(--yu-fs-micro); color: var(--yu-text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hi-shop-card__meta { display: flex; align-items: center; justify-content: space-between; margin-top: 5px; font-size: 10px; color: var(--yu-orange-700); }

.hi-shop-list__thumb {
  width: 54px; height: 54px; flex-shrink: 0;
  border-radius: var(--yu-radius-md); overflow: hidden;
  background: var(--yu-primary-soft);
}
.hi-shop-list__thumb img { width: 100%; height: 100%; object-fit: cover; }
.hi-shop-list__thumb .hi-emoji { display: grid; place-items: center; width: 100%; height: 100%; font-size: 24px; }

.hi-tile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hi-tile {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 9px 6px; border-radius: var(--yu-radius-md);
  background: var(--yu-surface-alt); border: 1px solid var(--yu-border);
}
.hi-tile__thumb { position: relative; width: 46px; height: 46px; border-radius: var(--yu-radius-md); overflow: hidden; background: var(--yu-primary-soft); }
.hi-tile__thumb img { width: 100%; height: 100%; object-fit: cover; }
.hi-tile__thumb .hi-emoji { display: grid; place-items: center; width: 100%; height: 100%; font-size: 22px; }
.hi-tile__dot { position: absolute; top: 3px; right: 3px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--yu-surface); background: var(--yu-success); }
.hi-tile__dot.is-off { background: var(--yu-ink-3); }
.hi-tile__name { width: 100%; margin-top: 6px; font-size: var(--yu-fs-micro); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hi-tile__desc { width: 100%; font-size: 10px; color: var(--yu-text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hi-tile__cta { margin-top: 2px; font-size: 10px; color: var(--yu-primary-strong); }

/* ---------- 骨架 ---------- */
.hi-skel--thumb { width: 42px; height: 42px; flex-shrink: 0; border-radius: var(--yu-radius-md); }
.hi-skel-row { display: flex; align-items: center; gap: 12px; padding: 13px 14px; }
.hi-skel-row + .hi-skel-row { border-top: 1px solid var(--yu-border); }
.hi-skel-group { background: var(--yu-surface); border: 1px solid var(--yu-border); border-radius: var(--yu-radius-lg); overflow: hidden; box-shadow: var(--yu-shadow-sm); }
.hi-skel-tile { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.hi-skel-tile .yu-skeleton:first-child { width: 50px; height: 50px; }
.hi-skel-tile .yu-skeleton:last-child { width: 30px; height: 9px; }
.hi-skel-card { flex: 0 0 156px; height: 150px; border-radius: var(--yu-radius-md); }

/* ---------- 新手引导 ---------- */
.hi-tour-dim {
  position: fixed; inset: 0; z-index: 110;
  background: rgba(35, 30, 24, .58);
  pointer-events: none;
}
.hi-tour-focus {
  position: relative !important; z-index: 120 !important;
  border-radius: var(--yu-radius-lg);
  outline: 2px solid var(--yu-white);
  outline-offset: 4px;
}
.hi-tour-pin {
  position: absolute; z-index: 121;
  display: grid; place-items: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--yu-orange); color: var(--yu-orange-700);
  font-size: var(--yu-fs-micro); font-weight: 800;
  box-shadow: 0 0 0 3px var(--yu-white);
  font-variant-numeric: tabular-nums;
}
.hi-tour-pin--tl { top: -14px; left: -10px; }
.hi-tour-pin--tr { top: -14px; right: -10px; }
.hi-tour-sheet { z-index: 140; }
.hi-tour-step { display: flex; align-items: flex-start; gap: 12px; padding: 11px 0; }
.hi-tour-step + .hi-tour-step { border-top: 1px solid var(--yu-border); }
.hi-tour-step__no {
  display: grid; place-items: center; flex-shrink: 0;
  width: 24px; height: 24px; margin-top: 1px;
  border-radius: 50%;
  background: var(--yu-orange-soft); color: var(--yu-orange-700);
  font-size: var(--yu-fs-micro); font-weight: 800;
}
.hi-tour-step__body { flex: 1; min-width: 0; }
.hi-tour-step__title { display: flex; align-items: center; gap: 6px; font-size: var(--yu-fs-sm); font-weight: 700; }
.hi-tour-step__desc { margin-top: 3px; font-size: var(--yu-fs-caption); line-height: 1.6; color: var(--yu-text-2); }

/* ---------- 未登录 ---------- */
.hi-page--actionbar { padding-bottom: calc(var(--yu-tabbar-h) + 80px + var(--yu-safe-bottom)); }
.hi-guest-card { display: flex; align-items: center; gap: var(--yu-space-3); }
.hi-guest-card__art { width: 66px; flex-shrink: 0; }
.hi-guest-note { display: flex; align-items: flex-start; gap: 8px; }
.hi-loginbar {
  position: fixed; z-index: var(--yu-z-tabbar);
  left: 0; right: 0; bottom: calc(var(--yu-tabbar-h) + var(--yu-safe-bottom));
  padding: 9px var(--yu-gutter);
  background: rgba(255, 253, 249, .96);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--yu-border);
}
.hi-loginbar__inner { display: flex; align-items: center; gap: 10px; width: 100%; max-width: var(--yu-shell); margin: 0 auto; }
@media (min-width: 560px) {
  .hi-loginbar {
    left: 50%; right: auto; width: var(--yu-shell);
    transform: translateX(-50%);
  }
}


/* ---------- 轻提示（复用 YU.toast 的旧类名，走本页 token） ---------- */
.toast-wrap { position: fixed; z-index: 999; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none; }
.toast-item {
  background: rgba(31, 107, 74, .92); color: #fff; padding: 10px 16px; border-radius: 12px;
  font-size: 14px; line-height: 1.4; text-align: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  animation: toastIn .2s ease, toastOut .2s ease 1.5s forwards; max-width: 260px;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(6px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-4px) scale(.98); } }

/* ---------- 小屏 ---------- */
@media (max-width: 380px) {
  .hi-hero-tags { gap: 4px; }
  .hi-hero-chip { padding: 0 6px; }
  .hi-shop-card { flex-basis: 142px; }
  .hi-skel-card { flex-basis: 142px; }
}

@media (prefers-reduced-motion: reduce) {
  .hi-mascot, .hi-pulse { animation: none !important; }
}
