/* ===== 生活543 — Life543 ===== */
/* 風格：乾淨、生活感、實用型短影音搜尋平台 */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --orange: #FF6B3D;          /* 主色 — 行動/搜尋 */
  --orange-dark: #E85020;
  --orange-darker: #C13B0E;
  --orange-light: #FFE9DD;
  --orange-tint: #FFF4ED;     /* 極淺底 */
  --green: #2EBF7C;           /* 生活/成功 */
  --green-dark: #239E66;
  --green-light: #DCF5E8;
  --yellow: #FFB81C;          /* 提示/有幫助 */
  --yellow-dark: #C68A00;
  --yellow-light: #FFF2D0;
  --red: #E54B4B;             /* 警告/退件 */
  --red-dark: #B83838;
  --red-light: #FEE6E6;
  --blue: #1976D2;
  --blue-light: #E0F0FB;
  --purple: #7b2cbf;
  --purple-light: #EDE0F7;
  --ink: #1F2937;             /* 主字 */
  --ink-2: #4B5563;           /* 次字 */
  --ink-3: #6B7280;           /* 弱字 */
  --ink-4: #9CA3AF;           /* 極弱字 */
  --line: #ECEEF2;            /* 分隔線（更柔和） */
  --line-strong: #D9DEE6;
  --line-warm: #F0E6D6;       /* 溫色分隔 */
  --bg: #FAFBFC;              /* body 底（不刺眼純白） */
  --bg-card: #FFFFFF;         /* 卡片底 */
  --cream: #FFF8EE;           /* 溫暖底 */
  --cream-2: #FBEFDB;
  --gray-bg: #F4F6F9;
  --gray-bg-hover: #EDF0F4;
  --shadow-xs: 0 1px 2px rgba(31,41,55,.04);
  --shadow-sm: 0 2px 8px rgba(31,41,55,.06);
  --shadow-md: 0 8px 24px rgba(31,41,55,.08);
  --shadow-lg: 0 16px 40px rgba(31,41,55,.10);
  --shadow-xl: 0 24px 60px rgba(31,41,55,.14);
  --shadow-card: 0 1px 3px rgba(31,41,55,.05), 0 1px 2px rgba(31,41,55,.04);
  --shadow-card-hover: 0 8px 24px rgba(255,107,61,.12), 0 2px 6px rgba(31,41,55,.06);
  --ring: 0 0 0 4px rgba(255,107,61,.22);
  --ring-strong: 0 0 0 4px rgba(255,107,61,.35);
  --ring-green: 0 0 0 4px rgba(46,191,124,.22);
  --ring-red: 0 0 0 4px rgba(229,75,75,.22);
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;
  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --t-fast: 150ms;
  --t-base: 250ms;
  --t-slow: 400ms;
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  font-weight: 400;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; transition: color var(--t-fast) var(--ease); }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; -webkit-tap-highlight-color: transparent; }
input, select, textarea, button { font-family: inherit; }

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
  font-feature-settings: "kern" 1, "ss01" 1;
}
p { text-wrap: pretty; }

.num, .stat-card .num, .v-foot .stat, td:has(strong), tbody td strong {
  font-variant-numeric: tabular-nums;
}

::selection { background: var(--orange-light); color: var(--orange-darker); }
::-moz-selection { background: var(--orange-light); color: var(--orange-darker); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-4); background-clip: padding-box; border: 2px solid transparent; }

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: 6px;
}
button:focus-visible,
.btn:focus-visible,
a:focus-visible { box-shadow: var(--ring); }
input:focus-visible,
select:focus-visible,
textarea:focus-visible { outline: none; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid transparent;
  transition: box-shadow var(--t-base) var(--ease), border-color var(--t-base) var(--ease), background var(--t-base) var(--ease);
}
.site-header.scrolled {
  background: rgba(255,255,255,.98);
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.nav {
  max-width: 1280px; margin: 0 auto;
  padding: 14px 28px;
  display: flex; align-items: center; gap: 18px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  flex: 0 0 auto;
}
.brand-logo {
  width: 44px; height: 44px; border-radius: 12px;
  object-fit: cover; display: block;
  box-shadow: 0 4px 14px rgba(255,107,61,.30), 0 1px 3px rgba(0,0,0,.06);
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.brand:hover .brand-logo { transform: rotate(-4deg) scale(1.05); box-shadow: 0 6px 18px rgba(255,107,61,.40); }
.brand-text h1 {
  font-size: 20px; font-weight: 800; letter-spacing: 1px;
  color: var(--ink); line-height: 1.2;
}
.brand-text p {
  font-size: 11px; color: var(--ink-3); letter-spacing: 2px;
  margin-top: 2px;
}
.menu {
  display: flex; align-items: center; gap: 4px;
  margin-left: 32px;
}
.menu a {
  position: relative;
  display: inline-block; padding: 10px 14px;
  font-size: 15px; color: var(--ink-2);
  border-radius: 10px;
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.menu a:hover { background: var(--orange-tint); color: var(--orange-dark); }
.menu a.active {
  background: var(--orange-light); color: var(--orange-dark); font-weight: 600;
}
.menu a.active::after {
  content: ""; position: absolute;
  left: 14px; right: 14px; bottom: 4px; height: 2px;
  background: var(--orange); border-radius: 2px;
  transform: scaleX(0); transform-origin: center;
  animation: navIn .35s var(--ease-out) forwards;
}
@keyframes navIn { to { transform: scaleX(1); } }

.header-search {
  flex: 1; max-width: 420px; margin-left: auto;
  position: relative;
}
.header-search input {
  width: 100%; height: 42px; padding: 0 16px;
  border: 1.5px solid var(--line); border-radius: var(--radius-pill);
  font-size: 14px; background: var(--gray-bg); color: var(--ink);
  transition: all .2s;
}
.header-search input:focus {
  outline: none; background: #fff;
  border-color: var(--orange);
  box-shadow: 0 0 0 4px var(--orange-light);
}

.nav-utility {
  display: flex; align-items: center; gap: 8px;
}
.util-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 16px;
  border-radius: var(--radius-pill);
  font-size: 14px; font-weight: 500; color: var(--ink-2);
  border: 1px solid transparent;
  transition: all var(--t-fast) var(--ease);
}
.util-btn:hover { background: var(--orange-tint); color: var(--orange-dark); border-color: var(--orange-light); }
.util-btn:active { transform: translateY(1px); }
.util-btn.primary {
  background: var(--orange); color: #fff;
  box-shadow: 0 4px 12px rgba(255,107,61,.30);
}
.util-btn.primary:hover { background: var(--orange-dark); color: #fff; border-color: transparent; box-shadow: 0 6px 18px rgba(255,107,61,.42); transform: translateY(-1px); }
.util-btn.primary:active { transform: translateY(0); }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  position: relative; z-index: 110;
}
.nav-toggle span {
  display: block; position: absolute;
  left: 9px; right: 9px; height: 2px;
  background: var(--ink); border-radius: 2px;
  transition: all .3s;
}
.nav-toggle span:nth-child(1) { top: 13px; }
.nav-toggle span:nth-child(2) { top: 20px; }
.nav-toggle span:nth-child(3) { top: 27px; }
.nav-toggle.open span:nth-child(1) { top: 20px; transform: rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { top: 20px; transform: rotate(-45deg); }

/* ===== Hero Search ===== */
.hero {
  background:
    radial-gradient(ellipse at top right, rgba(255,184,28,.12) 0%, transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(46,191,124,.10) 0%, transparent 55%),
    linear-gradient(180deg, var(--cream) 0%, #fff 100%);
  padding: 92px 28px 70px;
  position: relative;
  overflow: hidden;
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: .25; z-index: 0;
  pointer-events: none;
}
.hero::before {
  width: 360px; height: 360px;
  background: var(--orange);
  top: -100px; right: -80px;
  animation: floatA 18s ease-in-out infinite alternate;
}
.hero::after {
  width: 280px; height: 280px;
  background: var(--green);
  bottom: -120px; left: -80px;
  animation: floatB 22s ease-in-out infinite alternate;
}
@keyframes floatA { to { transform: translate(-20px, 20px); } }
@keyframes floatB { to { transform: translate(30px, -10px); } }
.hero-inner {
  max-width: 800px; margin: 0 auto;
  text-align: center; position: relative; z-index: 1;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px; border-radius: var(--radius-pill);
  background: #fff; border: 1px solid var(--line-warm);
  font-size: 13px; color: var(--orange-dark);
  letter-spacing: 0.6px; margin-bottom: 22px;
  box-shadow: var(--shadow-xs);
  font-weight: 500;
}
.hero-tag .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--orange);
  box-shadow: 0 0 0 0 rgba(255,107,61,.6);
  animation: pulseDot 2s ease-out infinite;
}
@keyframes pulseDot {
  0%   { box-shadow: 0 0 0 0 rgba(255,107,61,.55); }
  70%  { box-shadow: 0 0 0 8px rgba(255,107,61,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,107,61,0); }
}
.hero h1.hero-title {
  font-size: clamp(34px, 5.4vw, 60px);
  font-weight: 900; letter-spacing: 1.2px;
  color: var(--ink); line-height: 1.18;
  margin-bottom: 16px;
}
.hero h1.hero-title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--orange) 0%, #FFA940 50%, var(--yellow) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--orange);
}
.hero .hero-sub {
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--ink-2); margin-bottom: 38px;
  letter-spacing: 0.4px;
  max-width: 560px; margin-left: auto; margin-right: auto;
}

.search-box {
  display: flex; align-items: center; gap: 8px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 6px 6px 6px 24px;
  box-shadow: var(--shadow-md);
  max-width: 660px; margin: 0 auto;
  transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.search-box:hover {
  border-color: var(--orange-light);
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}
.search-box:focus-within {
  border-color: var(--orange);
  box-shadow: 0 0 0 6px rgba(255,107,61,.16), var(--shadow-lg);
  transform: translateY(-2px);
}
.search-box .ic {
  color: var(--orange); font-size: 22px; flex-shrink: 0;
}
.search-box input {
  flex: 1; height: 54px; border: none; outline: none;
  font-size: 16px; color: var(--ink); background: transparent;
}
.search-box input::placeholder { color: var(--ink-3); }
.search-box button {
  height: 50px; padding: 0 30px;
  background: var(--orange); color: #fff;
  border-radius: var(--radius-pill);
  font-size: 15px; font-weight: 600; letter-spacing: 1px;
  transition: all var(--t-fast) var(--ease);
  box-shadow: 0 4px 14px rgba(255,107,61,.30);
}
.search-box button:hover { background: var(--orange-dark); box-shadow: 0 6px 18px rgba(255,107,61,.42); }
.search-box button:active { transform: scale(.97); }

.quick-chips {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 8px; margin-top: 24px;
}
.quick-chips .label { color: var(--ink-3); font-size: 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 7px 16px; background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 13px; color: var(--ink-2);
  transition: all var(--t-fast) var(--ease);
  cursor: pointer;
}
.chip:hover {
  border-color: var(--orange);
  color: var(--orange-dark);
  background: var(--orange-tint);
  transform: translateY(-1px);
  box-shadow: var(--shadow-xs);
}
.chip:active { transform: translateY(0) scale(.97); }

/* ===== Section ===== */
.section { padding: 80px 28px; }
.section.alt { background: var(--cream); position: relative; }
.section.alt::before, .section.alt::after {
  content: ""; position: absolute; left: 0; right: 0; height: 40px;
  background: linear-gradient(180deg, var(--bg) 0%, transparent 100%);
  pointer-events: none;
}
.section.alt::before { top: 0; }
.section.alt::after { bottom: 0; transform: rotate(180deg); }
.section-inner { max-width: 1280px; margin: 0 auto; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; margin-bottom: 36px;
}
.section-head h2 {
  font-size: 30px; font-weight: 800; letter-spacing: 0.6px;
  color: var(--ink); line-height: 1.2;
}
.section-head .sub {
  font-size: 14.5px; color: var(--ink-3); margin-top: 8px;
  letter-spacing: 0.2px;
}
.section-head .more {
  font-size: 14px; color: var(--orange-dark); font-weight: 500;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 14px; border-radius: var(--radius-pill);
  transition: all var(--t-fast) var(--ease);
}
.section-head .more:hover {
  color: var(--orange); background: var(--orange-tint);
  transform: translateX(3px);
}

/* ===== Category Grid ===== */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.cat-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 14px;
  text-align: center;
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
}
.cat-card::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--orange-tint), transparent 60%);
  opacity: 0; transition: opacity var(--t-base) var(--ease);
  z-index: -1;
}
.cat-card:hover {
  border-color: var(--orange-light);
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}
.cat-card:hover::before { opacity: 1; }
.cat-card:active { transform: translateY(-2px) scale(.99); }
img.cat-icon {
  width: 68px; height: 68px; margin: 0 auto 14px;
  border-radius: 18px;
  object-fit: cover;
  display: block;
  background: var(--cream);
  box-shadow: 0 4px 12px rgba(31,41,55,.08);
  transition: transform var(--t-base) var(--ease);
}
.cat-card:hover img.cat-icon { transform: scale(1.08) rotate(-3deg); }
.cat-row .cat-icon { margin: 0; flex-shrink: 0; }
.cat-card .name { font-size: 15.5px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.cat-card .count { font-size: 12px; color: var(--ink-3); letter-spacing: 0.3px; }
.cat-card .name {
  font-size: 15px; font-weight: 600; color: var(--ink);
  margin-bottom: 4px;
}
.cat-card .count {
  font-size: 12px; color: var(--ink-3);
}

/* ===== Video Card ===== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.v-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-card);
}
.v-card:hover {
  border-color: var(--orange-light);
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
}
.v-card:active { transform: translateY(-2px) scale(.99); }
.v-thumb {
  position: relative;
  aspect-ratio: 9 / 12;
  background: var(--cream);
  overflow: hidden;
}
.v-thumb > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform var(--t-slow) var(--ease);
}
.v-card:hover .v-thumb > img { transform: scale(1.06); }
.v-thumb::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 50%; pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.45) 100%);
}
.v-thumb .dur {
  position: absolute; bottom: 10px; right: 10px;
  background: rgba(0,0,0,.78); color: #fff;
  padding: 4px 10px; border-radius: 6px;
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.3px;
  font-variant-numeric: tabular-nums;
  backdrop-filter: blur(4px);
  z-index: 2;
}
.v-thumb .play {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(.8);
  width: 60px; height: 60px; border-radius: 50%;
  background: rgba(255,255,255,.95);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--orange);
  padding-left: 4px;
  opacity: 0;
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease);
  box-shadow: 0 6px 24px rgba(0,0,0,.30);
  border: 2px solid rgba(255,255,255,.9);
  z-index: 2;
}
.v-card:hover .v-thumb .play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.v-thumb .badge-top {
  position: absolute; top: 10px; left: 10px;
  background: var(--orange); color: #fff;
  padding: 4px 10px; border-radius: 6px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(255,107,61,.40);
  z-index: 2;
}
.v-thumb .badge-top.green { background: var(--green); box-shadow: 0 2px 8px rgba(46,191,124,.40); }
.v-thumb .badge-top.yellow { background: var(--yellow); color: #5a3d00; box-shadow: 0 2px 8px rgba(255,184,28,.45); }

.v-body { padding: 16px 16px 18px; flex: 1; display: flex; flex-direction: column; }
.v-title {
  font-size: 15px; font-weight: 600; color: var(--ink);
  line-height: 1.5; margin-bottom: 12px;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  min-height: calc(15px * 1.5 * 2);
  transition: color var(--t-fast) var(--ease);
}
.v-card:hover .v-title { color: var(--orange-dark); }
.v-meta {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 12px;
}
.v-meta .tag {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 9px; border-radius: 6px;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.2px;
  background: var(--gray-bg); color: var(--ink-2);
}
.v-meta .tag.easy { background: var(--green-light); color: var(--green-dark); }
.v-meta .tag.medium { background: var(--yellow-light); color: #8a5e00; }
.v-meta .tag.hard { background: var(--red-light); color: var(--red-dark); }
.v-foot {
  margin-top: auto;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--ink-3);
  padding-top: 10px; border-top: 1px solid var(--line);
}
.v-foot .author { display: inline-flex; align-items: center; gap: 6px; }
.v-foot .avatar,
.v-foot img.avatar {
  width: 22px; height: 22px; border-radius: 50%;
  object-fit: cover; display: inline-block;
  vertical-align: middle;
}
.v-foot .stat { display: inline-flex; align-items: center; gap: 4px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 12px 28px; min-height: 44px;
  background: var(--orange); color: #fff;
  border-radius: var(--radius-pill);
  font-size: 14.5px; font-weight: 600;
  letter-spacing: 0.3px;
  border: 1.5px solid transparent;
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), box-shadow var(--t-base) var(--ease), color var(--t-fast) var(--ease);
  box-shadow: 0 4px 12px rgba(255,107,61,.26);
  user-select: none;
  white-space: nowrap;
}
.btn:hover { background: var(--orange-dark); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(255,107,61,.36); }
.btn:active { transform: translateY(0) scale(.98); box-shadow: 0 2px 6px rgba(255,107,61,.30); }
.btn[disabled], .btn.is-disabled { opacity: .55; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-outline {
  background: #fff; color: var(--orange);
  border-color: var(--orange);
  box-shadow: none;
}
.btn-outline:hover { background: var(--orange-tint); box-shadow: 0 2px 8px rgba(255,107,61,.15); }
.btn-ghost {
  background: var(--gray-bg); color: var(--ink-2);
  box-shadow: none;
}
.btn-ghost:hover { background: var(--gray-bg-hover); color: var(--ink); }
.btn-green { background: var(--green); box-shadow: 0 4px 12px rgba(46,191,124,.26); }
.btn-green:hover { background: var(--green-dark); box-shadow: 0 6px 18px rgba(46,191,124,.36); }
.btn-danger { background: var(--red); box-shadow: 0 4px 12px rgba(229,75,75,.26); }
.btn-danger:hover { background: var(--red-dark); box-shadow: 0 6px 18px rgba(229,75,75,.36); }
.btn-sm { padding: 7px 14px; min-height: 36px; font-size: 13px; }
.btn-lg { padding: 15px 36px; min-height: 52px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-link {
  background: transparent; color: var(--orange-dark); box-shadow: none;
  padding: 6px 4px; min-height: 0;
  border-radius: 4px;
}
.btn-link:hover { background: transparent; color: var(--orange); box-shadow: none; transform: none; text-decoration: underline; text-underline-offset: 4px; }

/* ===== Search Result Page ===== */
.search-bar-page {
  background:
    radial-gradient(ellipse at top right, rgba(255,184,28,.10) 0%, transparent 60%),
    var(--cream);
  padding: 40px 28px 32px;
  border-bottom: 1px solid var(--line-warm);
}
.search-bar-page .search-box { box-shadow: var(--shadow-sm); }
.search-result-meta {
  max-width: 1280px; margin: 0 auto;
  padding: 24px 28px 10px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
}
.search-result-meta .count {
  font-size: 14.5px; color: var(--ink-2);
}
.search-result-meta .count strong { color: var(--orange); font-weight: 700; }
.sort-tabs {
  display: inline-flex; gap: 2px;
  background: var(--gray-bg); padding: 4px;
  border-radius: var(--radius-pill);
}
.sort-tabs button {
  padding: 7px 16px; font-size: 13px;
  color: var(--ink-2); border-radius: var(--radius-pill);
  font-weight: 500;
  transition: all var(--t-fast) var(--ease);
}
.sort-tabs button:hover { color: var(--ink); }
.sort-tabs button.active {
  background: #fff; color: var(--ink);
  box-shadow: 0 2px 8px rgba(31,41,55,.10);
  font-weight: 600;
}

/* horizontal video result */
.result-list { max-width: 1280px; margin: 0 auto; padding: 12px 28px 60px; display: flex; flex-direction: column; gap: 18px; }
.r-card {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: 22px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-base) var(--ease), border-color var(--t-fast) var(--ease);
  box-shadow: var(--shadow-card);
}
.r-card:hover {
  border-color: var(--orange-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.r-card .r-title { transition: color var(--t-fast) var(--ease); }
.r-card:hover .r-title { color: var(--orange-dark); }
.r-card .v-thumb { aspect-ratio: 16 / 11; border-radius: 10px; font-size: 56px; }
.r-card .v-thumb .play { width: 44px; height: 44px; font-size: 18px; }
.r-card .r-body { display: flex; flex-direction: column; }
.r-card .r-title {
  font-size: 17px; font-weight: 700; color: var(--ink);
  margin-bottom: 8px;
}
.r-card .r-desc {
  font-size: 14px; color: var(--ink-2);
  line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 10px;
}
.r-card .r-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.r-card .r-foot {
  margin-top: auto;
  display: flex; align-items: center; gap: 14px;
  font-size: 13px; color: var(--ink-3);
}
.r-card .r-action {
  display: flex; flex-direction: column; gap: 8px;
  align-items: flex-end; justify-content: center;
}

/* ===== Page Hero (non-home) ===== */
.page-hero {
  background:
    radial-gradient(ellipse at top right, rgba(255,107,61,.06) 0%, transparent 50%),
    linear-gradient(180deg, var(--cream) 0%, #fff 100%);
  padding: 64px 28px 52px;
  border-bottom: 1px solid var(--line-warm);
}
.page-hero-inner { max-width: 1280px; margin: 0 auto; }
.page-hero .kicker {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 14px; border-radius: var(--radius-pill);
  background: #fff; border: 1px solid var(--line-warm);
  font-size: 12px; color: var(--orange-dark);
  margin-bottom: 16px; font-weight: 600; letter-spacing: 0.5px;
  box-shadow: var(--shadow-xs);
}
.page-hero h1 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800; letter-spacing: 0.5px;
  margin-bottom: 12px; line-height: 1.2;
}
.page-hero p { color: var(--ink-2); font-size: 15.5px; max-width: 720px; line-height: 1.7; }

/* ===== Filters Bar ===== */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 32px;
}
.filter-bar .pill {
  padding: 9px 18px; border-radius: var(--radius-pill);
  background: #fff; border: 1px solid var(--line);
  font-size: 13.5px; color: var(--ink-2);
  font-weight: 500;
  transition: all var(--t-fast) var(--ease);
  cursor: pointer;
}
.filter-bar .pill:hover {
  border-color: var(--orange-light); color: var(--orange-dark);
  background: var(--orange-tint);
}
.filter-bar .pill.active {
  background: var(--orange); color: #fff;
  border-color: var(--orange);
  box-shadow: 0 4px 12px rgba(255,107,61,.30);
  font-weight: 600;
}
.filter-bar .pill.active:hover { background: var(--orange-dark); }

/* ===== Video Watch Page ===== */
.watch-wrap {
  max-width: 1280px; margin: 0 auto;
  padding: 32px 28px 80px;
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 36px;
}
.watch-player {
  position: sticky; top: 90px;
  align-self: start;
}
.player-frame {
  background: #000;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: 0 24px 60px rgba(31,41,55,.20), 0 4px 12px rgba(31,41,55,.08);
  isolation: isolate;
}
.player-frame::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.2) 0%, transparent 30%, transparent 70%, rgba(0,0,0,.4) 100%);
  z-index: 1; pointer-events: none;
}
.player-frame .player-bg {
  position: absolute; inset: 0;
  background: var(--cream);
}
.player-frame .player-bg img,
.player-frame img.player-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.player-frame .controls {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px 16px;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.55) 100%);
  display: flex; align-items: center; gap: 12px;
  color: #fff;
}
.player-frame .play-big {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 80px; height: 80px; border-radius: 50%;
  background: rgba(255,255,255,.95);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; color: var(--orange);
  padding-left: 5px;
  cursor: pointer;
  box-shadow: 0 10px 32px rgba(0,0,0,.40);
  border: 3px solid rgba(255,255,255,.6);
  z-index: 2;
  transition: transform var(--t-base) var(--ease);
}
.player-frame:hover .play-big { transform: translate(-50%, -50%) scale(1.08); }
.player-frame .play-big:active { transform: translate(-50%, -50%) scale(.95); }
.player-frame .progress {
  flex: 1; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,.3);
  position: relative;
}
.player-frame .progress::after {
  content: ""; position: absolute; left: 0; top: 0;
  height: 100%; width: 40%; background: var(--orange);
  border-radius: 2px;
}
.player-actions {
  display: flex; justify-content: space-around;
  margin-top: 18px;
}
.act-btn {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; padding: 8px 12px; border-radius: 14px;
  font-size: 11.5px; color: var(--ink-3);
  letter-spacing: 0.3px;
  transition: all var(--t-fast) var(--ease);
  flex: 1; min-width: 0;
}
.act-btn:hover { background: var(--orange-tint); color: var(--orange-dark); }
.act-btn:active { transform: scale(.95); }
.act-btn .ic {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--gray-bg);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: var(--ink-2);
  transition: all var(--t-fast) var(--ease);
  border: 1px solid var(--line);
}
.act-btn:hover .ic { background: #fff; border-color: var(--orange-light); transform: scale(1.06); }
.act-btn.active .ic {
  background: var(--orange); color: #fff;
  border-color: var(--orange);
  box-shadow: 0 6px 16px rgba(255,107,61,.40);
}
.act-btn.active { color: var(--orange-dark); font-weight: 600; }
.act-btn .num { font-weight: 700; color: var(--ink); font-size: 13px; font-variant-numeric: tabular-nums; }

.watch-info { }
.watch-info h1 {
  font-size: 28px; font-weight: 800; letter-spacing: 0.5px;
  line-height: 1.3; margin-bottom: 14px;
}
.watch-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 24px;
}

.info-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px; margin-bottom: 28px;
}
.info-card {
  background: var(--cream); border: 1px solid var(--line-warm);
  border-radius: var(--radius); padding: 18px 16px;
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.info-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.info-card .lbl {
  font-size: 11.5px; color: var(--ink-3); margin-bottom: 6px;
  letter-spacing: 0.5px; font-weight: 500;
}
.info-card .val { font-size: 19px; font-weight: 800; color: var(--ink); letter-spacing: 0.2px; }
.info-card .val.small { font-size: 14px; font-weight: 600; line-height: 1.5; }

.watch-block {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; margin-bottom: 18px;
}
.watch-block h3 {
  font-size: 18px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 14px;
}
.watch-block h3 .ic {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--orange-light); color: var(--orange);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.step-list { display: flex; flex-direction: column; gap: 12px; }
.step-list li {
  display: grid; grid-template-columns: 36px 1fr; gap: 14px;
  align-items: flex-start;
}
.step-list .n {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--orange) 0%, #FF9264 100%);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px;
  box-shadow: 0 4px 10px rgba(255,107,61,.30);
  flex-shrink: 0;
}
.step-list .t { padding-top: 4px; color: var(--ink-2); line-height: 1.75; font-size: 14.5px; }
.step-list li { transition: transform var(--t-fast) var(--ease); }
.step-list li:hover { transform: translateX(2px); }
.warn-list { display: flex; flex-direction: column; gap: 10px; }
.warn-list li {
  padding: 12px 16px; border-radius: 10px;
  background: var(--yellow-light); color: #6e4d00;
  font-size: 14px; line-height: 1.7;
  display: flex; gap: 10px; align-items: flex-start;
  border-left: 4px solid #d4a800;
}
.warn-list li::before {
  content: "注意"; flex-shrink: 0;
  font-size: 11px; font-weight: 700; letter-spacing: 1px;
  padding: 2px 8px; background: #d4a800; color: #fff;
  border-radius: 4px; margin-top: 2px;
}
.warn-list li.danger { background: var(--red-light); color: var(--red); border-left-color: var(--red); }
.warn-list li.danger::before { content: "禁止"; background: var(--red); }

.expert-card {
  display: grid; grid-template-columns: 64px 1fr auto;
  gap: 14px; align-items: center;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
  margin-bottom: 18px;
}
.expert-card img.avatar-lg,
.expert-card .avatar-lg {
  width: 64px; height: 64px; border-radius: 50%;
  object-fit: cover; display: block;
}
.expert-card .name { font-size: 17px; font-weight: 700; margin-bottom: 2px; }
.expert-card .role { font-size: 13px; color: var(--ink-3); }
.expert-card .badges { margin-top: 6px; display: flex; gap: 6px; }
.expert-card .badge-sm {
  font-size: 11px; padding: 2px 8px; border-radius: 6px;
  background: var(--green-light); color: var(--green-dark);
}

/* ===== Expert Profile ===== */
.expert-hero {
  background: linear-gradient(180deg, var(--cream) 0%, #fff 100%);
  padding: 56px 28px 36px;
}
.expert-hero-inner {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 140px 1fr auto;
  gap: 28px; align-items: center;
}
img.expert-avatar-xl,
.expert-avatar-xl {
  width: 140px; height: 140px; border-radius: 50%;
  object-fit: cover; display: block;
  box-shadow: var(--shadow-md);
  border: 4px solid #fff;
}
.expert-meta h1 { font-size: 32px; font-weight: 800; letter-spacing: 1px; margin-bottom: 6px; }
.expert-meta .role { font-size: 15px; color: var(--ink-2); margin-bottom: 14px; }
.expert-meta .stats { display: flex; gap: 24px; flex-wrap: wrap; }
.expert-meta .stats .item .n { font-size: 22px; font-weight: 800; color: var(--ink); }
.expert-meta .stats .item .l { font-size: 12px; color: var(--ink-3); }

/* ===== Pro Backend Layout ===== */
.app-layout {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
  background: var(--gray-bg);
}
.app-side {
  background: #fff;
  border-right: 1px solid var(--line);
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
  display: flex; flex-direction: column;
  scrollbar-width: thin;
}
.app-side .logo-row {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
}
.app-side .logo-row .brand-logo { width: 38px; height: 38px; font-size: 14px; border-radius: 10px; }
.app-side .logo-row .brand-text h1 { font-size: 17px; }
.app-side .side-section {
  padding: 14px 12px 6px;
  font-size: 11px; letter-spacing: 1.5px;
  color: var(--ink-3); text-transform: uppercase;
}
.app-side ul { padding: 0 8px; }
.app-side ul li a {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 10px;
  color: var(--ink-2); font-size: 14px;
  transition: all var(--t-fast) var(--ease);
  margin-bottom: 2px;
}
.app-side ul li a .ic { font-size: 16px; width: 22px; text-align: center; opacity: .7; }
.app-side ul li a:hover { background: var(--orange-tint); color: var(--orange-dark); }
.app-side ul li a:hover .ic { opacity: 1; }
.app-side ul li a.active {
  background: var(--orange-light);
  color: var(--orange-dark);
  font-weight: 600;
}
.app-side ul li a.active::before {
  content: ""; position: absolute;
  left: -8px; top: 8px; bottom: 8px; width: 3px;
  background: var(--orange); border-radius: 2px;
}
.app-side .side-user {
  margin-top: auto;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
}
.app-side .side-user img.avatar-md,
.app-side .side-user .avatar-md {
  width: 36px; height: 36px; border-radius: 50%;
  object-fit: cover; display: block;
}
.app-side .side-user .nm { font-size: 13px; font-weight: 600; line-height: 1.3; }
.app-side .side-user .em { font-size: 11px; color: var(--ink-3); }

.app-main {
  display: flex; flex-direction: column;
  min-width: 0;
}
.app-head {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 16px 28px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  position: sticky; top: 0; z-index: 50;
}
.app-head h1 { font-size: 20px; font-weight: 800; }
.app-head .crumb {
  font-size: 13px; color: var(--ink-3); margin-top: 2px;
}
.app-head .head-actions { display: flex; gap: 8px; align-items: center; }
.app-content { padding: 28px; flex: 1; }

/* ===== Stat Cards ===== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
  box-shadow: var(--shadow-card);
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.stat-card::after {
  content: ""; position: absolute; top: 0; right: 0;
  width: 90px; height: 90px; border-radius: 50%;
  background: var(--orange-tint);
  transform: translate(35%, -35%);
  opacity: .5;
  z-index: 0;
  pointer-events: none;
}
.stat-card[data-c="green"]::after { background: var(--green-light); }
.stat-card[data-c="yellow"]::after { background: var(--yellow-light); }
.stat-card[data-c="blue"]::after { background: var(--blue-light); }
.stat-card[data-c="purple"]::after { background: var(--purple-light); }
.stat-card > * { position: relative; z-index: 1; }
.stat-card .icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--orange-light); color: var(--orange);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 12px;
}
.stat-card[data-c="green"] .icon { background: var(--green-light); color: var(--green-dark); }
.stat-card[data-c="yellow"] .icon { background: var(--yellow-light); color: #8a5e00; }
.stat-card[data-c="blue"] .icon { background: #E0F0FB; color: #1976D2; }
.stat-card[data-c="purple"] .icon { background: #EDE0F7; color: #7b2cbf; }
.stat-card .lbl {
  font-size: 12.5px; color: var(--ink-3); margin-bottom: 8px;
  font-weight: 500; letter-spacing: 0.5px;
}
.stat-card .num {
  font-size: 30px; font-weight: 800; color: var(--ink);
  letter-spacing: 0.3px; line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.stat-card .delta {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 10px; font-size: 12px; font-weight: 600;
  padding: 3px 9px; border-radius: 6px;
}
.stat-card .delta.up { background: var(--green-light); color: var(--green-dark); }
.stat-card .delta.down { background: var(--red-light); color: var(--red-dark); }

/* ===== Panels ===== */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.panel-head {
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  background: linear-gradient(180deg, #fff 0%, var(--gray-bg) 200%);
}
.panel-head h3 { font-size: 17px; font-weight: 700; letter-spacing: 0.2px; }
.panel-head .desc { font-size: 13px; color: var(--ink-3); margin-top: 4px; letter-spacing: 0.2px; }
.panel-body { padding: 24px; }
.panel-body.flush { padding: 0; }

/* ===== Tables ===== */
.app-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.app-table thead {
  background: var(--gray-bg);
  position: sticky; top: 0; z-index: 2;
}
.app-table th, .app-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.app-table th {
  font-size: 11.5px; color: var(--ink-3);
  font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
}
.app-table tbody tr {
  transition: background var(--t-fast) var(--ease);
}
.app-table tbody tr:hover { background: var(--orange-tint); }
.app-table tbody tr:last-child td { border-bottom: none; }
.app-table tbody tr:nth-child(even) { background: rgba(244,246,249,.4); }
.app-table tbody tr:nth-child(even):hover { background: var(--orange-tint); }
.app-table td strong { color: var(--ink); font-weight: 700; }
.app-table .num-col { text-align: right; font-variant-numeric: tabular-nums; }
.app-table img.thumb,
.app-table .thumb {
  width: 80px; aspect-ratio: 9/12; border-radius: 8px;
  object-fit: cover; flex-shrink: 0;
  background: var(--cream);
}
.app-table .video-cell {
  display: flex; gap: 12px; align-items: center;
}
.app-table .video-cell .info { min-width: 0; }
.app-table .video-cell .t {
  font-weight: 600; color: var(--ink);
  margin-bottom: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 320px;
}
.app-table .video-cell .m { font-size: 12px; color: var(--ink-3); }

.row-actions {
  display: inline-flex; gap: 4px;
}
.row-actions a, .row-actions button {
  width: 34px; height: 34px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-2); font-size: 13px; font-weight: 600;
  transition: all var(--t-fast) var(--ease);
  background: var(--gray-bg);
  border: 1px solid transparent;
}
.row-actions a:hover, .row-actions button:hover {
  background: var(--orange-light); color: var(--orange-dark);
  border-color: var(--orange-light);
  transform: translateY(-1px);
}
.row-actions a:active, .row-actions button:active { transform: translateY(0); }
.row-actions .danger:hover { background: var(--red-light); color: var(--red-dark); border-color: var(--red-light); }

/* ===== Badges ===== */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.2px;
  background: var(--gray-bg); color: var(--ink-2);
  line-height: 1.4;
  transition: transform var(--t-fast) var(--ease);
}
a:hover .badge, button:hover .badge { transform: translateY(-1px); }
.badge.green   { background: var(--green-light); color: var(--green-dark); }
.badge.orange  { background: var(--orange-light); color: var(--orange-dark); }
.badge.yellow  { background: var(--yellow-light); color: #8a5e00; }
.badge.red     { background: var(--red-light); color: var(--red-dark); }
.badge.blue    { background: var(--blue-light); color: var(--blue); }
.badge.purple  { background: var(--purple-light); color: var(--purple); }
.badge.gray    { background: var(--gray-bg); color: var(--ink-3); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.pulse .dot { animation: pulseDot 1.6s ease-out infinite; }

/* ===== Forms ===== */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-grid .full { grid-column: 1 / -1; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 13px; color: var(--ink-2); font-weight: 600;
  letter-spacing: 0.3px;
  display: flex; align-items: center; gap: 6px;
}
.form-group label .req { color: var(--orange); font-size: 14px; line-height: 1; }
.form-group label .ai-hint {
  font-size: 11px; color: var(--orange-dark);
  background: var(--orange-light);
  padding: 3px 9px; border-radius: 6px;
  margin-left: auto; font-weight: 500;
  display: inline-flex; align-items: center; gap: 4px;
}
.form-group label .ai-hint::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--orange); flex-shrink: 0;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group input[type="url"],
.form-group input[type="search"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px; min-height: 44px;
  border: 1.5px solid var(--line-strong);
  border-radius: 10px;
  font-family: inherit; font-size: 14.5px;
  color: var(--ink); background: #fff;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--ink-4); }
.form-group select {
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236B7280'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 40px;
}
.form-group textarea { min-height: 96px; resize: vertical; line-height: 1.7; padding: 12px 14px; }
.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover { border-color: var(--ink-4); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none; border-color: var(--orange);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255,107,61,.15);
}
.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled {
  background: var(--gray-bg); color: var(--ink-3);
  cursor: not-allowed;
}
.form-group input[aria-invalid="true"],
.form-group .invalid input { border-color: var(--red); }
.form-group input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(229,75,75,.15); }
.form-group .hint { font-size: 12.5px; color: var(--ink-3); letter-spacing: 0.2px; }
.form-group .err { font-size: 12.5px; color: var(--red); font-weight: 500; }

.upload-drop {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: var(--gray-bg);
  padding: 50px 24px;
  text-align: center;
  transition: all .2s; cursor: pointer;
}
.upload-drop:hover { border-color: var(--orange); background: var(--orange-light); }
.upload-drop .ttl { font-size: 17px; font-weight: 700; margin-bottom: 4px; color: var(--ink); }
.upload-drop .sub { font-size: 13px; color: var(--ink-3); }

.tag-input {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 8px;
  border: 1.5px solid var(--line); border-radius: 10px;
  background: #fff; min-height: 46px;
  align-items: center;
}
.tag-input .tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: var(--radius-pill);
  background: var(--orange-light); color: var(--orange-dark);
  font-size: 13px; font-weight: 600;
  transition: all var(--t-fast) var(--ease);
  border: 1px solid transparent;
}
.tag-input .tag:hover { background: var(--orange); color: #fff; }
.tag-input .tag .x {
  font-size: 14px; line-height: 1; opacity: .7; cursor: pointer;
  width: 16px; height: 16px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all var(--t-fast) var(--ease);
}
.tag-input .tag .x:hover { opacity: 1; background: rgba(0,0,0,.15); }
.tag-input input {
  border: none; outline: none; flex: 1;
  min-width: 120px; padding: 6px 4px;
  font-size: 14px; color: var(--ink);
  background: transparent;
}

.switch {
  display: inline-flex; align-items: center; gap: 12px;
  cursor: pointer; user-select: none;
}
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track {
  width: 44px; height: 24px; border-radius: 999px;
  background: var(--line-strong); position: relative;
  transition: background var(--t-base) var(--ease);
  flex-shrink: 0;
}
.switch .track::after {
  content: ""; position: absolute;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; top: 2px; left: 2px;
  transition: left var(--t-base) var(--ease-out), transform var(--t-fast) var(--ease);
  box-shadow: 0 2px 6px rgba(0,0,0,.20);
}
.switch:hover .track::after { transform: scale(1.05); }
.switch input:checked + .track { background: var(--green); }
.switch input:checked + .track::after { left: 22px; }
.switch input:focus-visible + .track { box-shadow: var(--ring-green); }
.switch .lbl { font-size: 14px; color: var(--ink-2); line-height: 1.6; }

.wj-check {
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; user-select: none;
}
.wj-check input { position: absolute; opacity: 0; pointer-events: none; }
.wj-check .box {
  width: 20px; height: 20px;
  border: 2px solid var(--line-strong);
  border-radius: 5px; background: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all var(--t-fast) var(--ease);
}
.wj-check:hover .box { border-color: var(--orange); }
.wj-check input:checked + .box {
  background: var(--orange); border-color: var(--orange);
  box-shadow: 0 2px 6px rgba(255,107,61,.30);
}
.wj-check input:focus-visible + .box { box-shadow: var(--ring); }
.wj-check .box::after {
  content: ""; width: 10px; height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px) scale(0);
  opacity: 0;
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease-out);
}
.wj-check input:checked + .box::after { opacity: 1; transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.wj-check .txt { font-size: 14px; color: var(--ink-2); }

/* ===== Earnings / Charts (placeholder) ===== */
.bigmoney {
  background: linear-gradient(135deg, var(--orange) 0%, #FF9264 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
  overflow: hidden;
}
.bigmoney::after {
  content: ""; position: absolute;
  right: -30px; bottom: -30px;
  width: 200px; height: 200px; border-radius: 50%;
  background: rgba(255,255,255,.1);
}
.bigmoney .lbl { font-size: 13px; opacity: .85; letter-spacing: 2px; }
.bigmoney .v { font-size: 36px; font-weight: 800; margin: 8px 0 4px; }
.bigmoney .sm { font-size: 13px; opacity: .85; }
.bigmoney .actions { margin-top: 18px; display: flex; gap: 8px; }
.bigmoney .actions .btn {
  background: #fff; color: var(--orange);
}
.bigmoney .actions .btn:hover { background: var(--cream); }
.bigmoney .actions .btn-out {
  background: transparent; color: #fff;
  border: 1.5px solid rgba(255,255,255,.6);
}

.chart-box {
  height: 240px;
  background: linear-gradient(180deg, var(--orange-light) 0%, transparent 100%);
  border-radius: 10px;
  padding: 18px;
  position: relative;
  display: flex; align-items: flex-end;
  gap: 8px;
}
.chart-bar {
  flex: 1; background: var(--orange);
  border-radius: 6px 6px 0 0;
  position: relative; min-height: 8px;
  transition: all .2s;
}
.chart-bar:hover { background: var(--orange-dark); }
.chart-bar .lab {
  position: absolute; bottom: -22px; left: 0; right: 0;
  text-align: center; font-size: 11px; color: var(--ink-3);
}
.chart-bar .val {
  position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
  font-size: 11px; color: var(--ink); font-weight: 600;
  opacity: 0; transition: opacity .2s;
}
.chart-bar:hover .val { opacity: 1; }

/* ===== Modal / Toast ===== */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(31,41,55,.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 60px 20px;
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-base) var(--ease);
}
.modal-backdrop.show { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--bg-card); border-radius: var(--radius-lg);
  max-width: 640px; width: 100%;
  max-height: calc(100vh - 120px); overflow-y: auto;
  transform: translateY(20px) scale(.96);
  transition: transform var(--t-base) var(--ease-out);
  box-shadow: var(--shadow-xl);
}
.modal-backdrop.show .modal { transform: translateY(0) scale(1); }
.modal-head {
  padding: 22px 28px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-head h3 { font-size: 19px; font-weight: 700; }
.modal-head .x { font-size: 22px; color: var(--ink-3); width: 36px; height: 36px; border-radius: 8px; }
.modal-head .x:hover { background: var(--gray-bg); color: var(--ink); }
.modal-body { padding: 24px 28px; }
.modal-foot {
  padding: 18px 28px;
  border-top: 1px solid var(--line);
  display: flex; gap: 10px; justify-content: flex-end;
}
.wj-toast {
  position: fixed; left: 50%; bottom: 40px;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff;
  padding: 13px 22px; border-radius: var(--radius-pill);
  font-size: 14px; letter-spacing: 0.5px; font-weight: 500;
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease-out);
  z-index: 9999;
  box-shadow: var(--shadow-lg);
  display: inline-flex; align-items: center; gap: 8px;
}
.wj-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.wj-toast::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
}
.wj-toast.error::before { background: var(--red); }
.wj-toast.warn::before { background: var(--yellow); }

/* ===== Footer ===== */
.site-footer {
  background:
    radial-gradient(ellipse at top, rgba(255,107,61,.04) 0%, transparent 60%),
    #1c2129;
  color: #b9c1cd;
  padding: 70px 28px 28px;
  position: relative;
}
.site-footer::before {
  content: ""; position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  width: 120px; height: 3px;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
  border-radius: 2px;
}
.footer-main {
  max-width: 1280px; margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-brand h4 {
  font-size: 22px; font-weight: 800; color: #fff;
  letter-spacing: 1px; margin-bottom: 6px;
}
.footer-brand p { font-size: 13px; line-height: 1.8; color: #8b94a3; }
.footer-brand p.tag { color: var(--orange); margin-bottom: 14px; }
.footer-col h5 {
  font-size: 14px; color: #fff; font-weight: 700;
  letter-spacing: 1px; margin-bottom: 14px;
}
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a {
  font-size: 13px; color: #8b94a3;
  transition: color var(--t-fast) var(--ease), padding-left var(--t-fast) var(--ease);
  display: inline-block;
}
.footer-col ul a:hover { color: var(--orange); padding-left: 4px; }
.footer-bottom {
  max-width: 1280px; margin: 0 auto;
  padding-top: 22px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: #6b7280;
  flex-wrap: wrap; gap: 10px;
}
.footer-bottom a { color: #8b94a3; margin: 0 4px; }
.footer-bottom a:hover { color: var(--orange); }

/* generic round avatar img helper */
img.avatar-img { object-fit: cover; display: block; border-radius: 50%; }
img.avatar-22 { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; vertical-align: middle; }
img.avatar-36 { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
img.avatar-40 { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }

/* feature icon (e.g. tools / location / cert / time tiles) */
.feat-tile {
  display: flex; gap: 10px; align-items: flex-start;
}
.feat-tile .ti {
  width: 40px; height: 40px; border-radius: 10px;
  object-fit: cover; flex-shrink: 0;
}

/* hero light bg image (very subtle) */
.hero-img-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  opacity: .14;
  filter: saturate(0.9);
}

/* ===== Utility ===== */
.muted { color: var(--ink-3); }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-gap { display: flex; gap: 10px; align-items: center; }
.mt-12 { margin-top: 12px; } .mt-20 { margin-top: 20px; } .mt-32 { margin-top: 32px; }
.mb-12 { margin-bottom: 12px; } .mb-20 { margin-bottom: 20px; } .mb-32 { margin-bottom: 32px; }
.divider { height: 1px; background: var(--line); margin: 20px 0; }

/* progress small */
.pbar { height: 6px; border-radius: 3px; background: var(--gray-bg); overflow: hidden; }
.pbar > i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--orange) 0%, #FF9264 100%);
  border-radius: 3px;
  transition: width var(--t-slow) var(--ease-out);
}
.pbar.green > i { background: linear-gradient(90deg, var(--green) 0%, #5ad3a0 100%); }
.pbar.yellow > i { background: linear-gradient(90deg, var(--yellow) 0%, #FFCF5D 100%); }

/* ===== Mobile nav backdrop ===== */
.nav-backdrop {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-base) var(--ease);
}
.nav-backdrop.show { opacity: 1; pointer-events: auto; }

/* ===== Image fade-in (lazy loaded) ===== */
img[loading="lazy"] { opacity: 0; transition: opacity var(--t-slow) var(--ease); }
img[loading="lazy"].img-in,
img[loading="lazy"]:not(.img-in) { opacity: 1; } /* default fallback for no-JS */
.img-in { opacity: 1 !important; }

/* ===== Skeleton (could be used for loading states) ===== */
.skeleton {
  background: linear-gradient(90deg, var(--gray-bg) 0%, var(--gray-bg-hover) 50%, var(--gray-bg) 100%);
  background-size: 200% 100%;
  animation: skeleton 1.4s ease infinite;
  border-radius: 6px;
  color: transparent;
}
@keyframes skeleton {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== Mobile menu toggle button (admin/pro only, hidden on desktop) ===== */
.menu-toggle-mobile {
  display: none !important;
  width: 40px; height: 40px;
  background: var(--gray-bg);
  border-radius: 10px;
  color: var(--ink); font-size: 13px; font-weight: 700;
  align-items: center; justify-content: center;
  transition: all var(--t-fast) var(--ease);
}
.menu-toggle-mobile:hover { background: var(--orange-light); color: var(--orange-dark); }
@media (max-width: 900px) {
  .menu-toggle-mobile { display: inline-flex !important; }
}

/* ===== Footer brand polish ===== */
.footer-brand p.tag {
  color: var(--orange);
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.site-footer hr { display: none; }

/* ===== Auto layout helpers (gap utility) ===== */
.row { display: flex; gap: 12px; align-items: center; }
.row-tight { display: flex; gap: 6px; align-items: center; }
.col { display: flex; flex-direction: column; gap: 12px; }
.stack { display: grid; gap: 12px; }
.stack-lg { display: grid; gap: 22px; }
.center { display: flex; align-items: center; justify-content: center; }

/* ===== Watch page warn-list spacing polish ===== */
.warn-list li strong { font-weight: 700; }

/* ===== Highlight key word in chips ===== */
.chip strong { color: var(--orange); font-weight: 700; }

/* ===== Expert card avatar polish ===== */
.expert-card { transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease); box-shadow: var(--shadow-card); }
.expert-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.expert-card img.avatar-lg {
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(31,41,55,.10);
}

/* ===== Bigmoney polish ===== */
.bigmoney { box-shadow: 0 12px 40px rgba(255,107,61,.22); }
.bigmoney .actions .btn { font-weight: 700; }

/* ===== Sticky search bar shadow on scroll ===== */
.search-bar-page { position: sticky; top: var(--header-h); z-index: 5; }

/* ===== A11y skip link ===== */
.skip-link {
  position: absolute; top: -100px; left: 0;
  background: var(--orange); color: #fff;
  padding: 10px 16px;
  z-index: 999; font-size: 14px;
}
.skip-link:focus { top: 0; }

/* ===== Empty state ===== */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--ink-3);
}
.empty-state h3 { color: var(--ink); font-size: 18px; margin-bottom: 6px; }
.empty-state p { font-size: 14px; max-width: 360px; margin: 0 auto 16px; }

/* ===== Mobile bottom nav (consumer only) ===== */
.bottom-nav {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,.98);
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px rgba(31,41,55,.06);
  z-index: 90;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.bottom-nav-inner {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  max-width: 480px; margin: 0 auto;
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 4px; font-size: 11px; color: var(--ink-3);
  transition: color var(--t-fast) var(--ease);
  border-radius: 10px;
  min-height: 56px;
  justify-content: center;
}
.bottom-nav a .b {
  width: 22px; height: 22px; border-radius: 6px;
  background: var(--gray-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: var(--ink-2);
  transition: all var(--t-fast) var(--ease);
}
.bottom-nav a.active { color: var(--orange-dark); }
.bottom-nav a.active .b { background: var(--orange); color: #fff; }
.bottom-nav a:active { transform: scale(.95); }

/* ===== Mobile sticky action bar (e.g., video page bottom CTA) ===== */
.mobile-cta {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.98);
  border-top: 1px solid var(--line);
  z-index: 85;
  gap: 8px;
  align-items: center;
  box-shadow: 0 -4px 16px rgba(31,41,55,.06);
}
.mobile-cta .btn { flex: 1; }

/* ===== Responsive: TABLET landscape (1024px) ===== */
@media (max-width: 1180px) {
  .cat-grid { grid-template-columns: repeat(5, 1fr); }
  .video-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ===== Responsive: TABLET (≤1024px) ===== */
@media (max-width: 1024px) {
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .video-grid { grid-template-columns: repeat(3, 1fr); }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .watch-wrap { grid-template-columns: 320px 1fr; gap: 24px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }

  /* Tablet: collapse admin sidebar to icon-only width (still functional) */
  .app-layout { grid-template-columns: 220px 1fr; }
  .app-side .brand-text h1 { font-size: 15px; }
  .app-side .brand-text p { font-size: 10px; }

  .header-search { max-width: 260px; }
  .nav { gap: 12px; }
}

/* ===== Responsive: SMALL TABLET / LARGE MOBILE (≤900px) ===== */
@media (max-width: 900px) {
  .nav { padding: 12px 16px; gap: 10px; }
  .menu, .header-search { display: none; }
  .nav-toggle { display: inline-block; }
  .menu.open {
    display: flex; flex-direction: column; gap: 4px;
    position: fixed; top: 68px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 16px 16px 24px calc(16px + env(safe-area-inset-left)); z-index: 99;
    box-shadow: var(--shadow-md);
    margin-left: 0;
    max-height: calc(100vh - 68px);
    overflow-y: auto;
  }
  .menu.open a {
    padding: 14px 16px; border-radius: 10px; font-size: 16px;
    min-height: 48px;
  }
  .nav-utility .util-btn { padding: 0 12px; height: 40px; font-size: 13px; }

  .hero { padding: 56px 20px 50px; }
  .section { padding: 56px 20px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 24px; }
  .section-head h2 { font-size: 22px; letter-spacing: 0.3px; }
  .section-head .more { padding: 6px 12px; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  img.cat-icon { width: 56px; height: 56px; }
  .video-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }

  .r-card { grid-template-columns: 140px 1fr; gap: 14px; padding: 14px; }
  .r-card .r-title { font-size: 15.5px; }
  .r-card .r-action {
    grid-column: 1 / -1; flex-direction: row;
    align-items: stretch; justify-content: flex-start;
    gap: 8px; padding-top: 8px; border-top: 1px solid var(--line);
  }
  .r-card .r-action .btn { flex: 1; }

  .search-result-meta { padding: 20px 20px 8px; flex-direction: column; align-items: flex-start; }
  .sort-tabs { overflow-x: auto; max-width: 100%; }

  .watch-wrap { grid-template-columns: 1fr; padding: 20px 20px 120px; gap: 22px; }
  .watch-player { position: static; }
  .player-frame { max-width: 320px; margin: 0 auto; }
  .info-grid { grid-template-columns: repeat(2, 1fr); }

  .expert-hero { padding: 36px 20px 28px; }
  .expert-hero-inner { grid-template-columns: 100px 1fr; gap: 16px; }
  .expert-avatar-xl { width: 100px; height: 100px; }
  .expert-meta h1 { font-size: 22px; }
  .expert-meta .stats { gap: 16px; }
  .expert-meta .stats .item .n { font-size: 18px; }
  .expert-hero-inner > div:last-child { grid-column: 1 / -1; display: flex; gap: 8px; }
  .expert-hero-inner > div:last-child .btn { flex: 1; margin-top: 0 !important; width: auto !important; }

  /* admin / pro backend on mobile: drawer pattern */
  .app-layout { grid-template-columns: 1fr; }
  .app-side {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 280px; transform: translateX(-100%);
    transition: transform var(--t-base) var(--ease-out);
    z-index: 110;
    box-shadow: 8px 0 32px rgba(0,0,0,.25);
  }
  .app-side.open { transform: translateX(0); }
  .app-head {
    padding: 14px 18px; gap: 10px;
    position: sticky; top: 0; z-index: 50;
    backdrop-filter: blur(8px);
    background: rgba(255,255,255,.95);
  }
  .app-head h1 { font-size: 18px; }
  .app-content { padding: 16px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card { padding: 16px; }
  .stat-card .num { font-size: 24px; }

  .form-grid { grid-template-columns: 1fr; gap: 14px; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 6px; text-align: center; }

  .watch-info h1 { font-size: 22px; line-height: 1.3; }

  /* Mobile admin head toggle button */
  .app-head .menu-toggle-mobile {
    display: inline-flex; width: 40px; height: 40px;
    background: var(--gray-bg); border-radius: 10px;
    align-items: center; justify-content: center;
    color: var(--ink); font-size: 14px; font-weight: 700;
  }

  /* Mobile bottom nav visible on consumer pages */
  body.has-bottom-nav { padding-bottom: 70px; }
  body.has-bottom-nav .bottom-nav { display: block; }

  /* Mobile sticky CTA visible on video page */
  body.has-mobile-cta { padding-bottom: 80px; }
  body.has-mobile-cta .mobile-cta { display: flex; }

  /* Tablet/mobile: bigger touch targets */
  .btn-sm { min-height: 40px; padding: 8px 14px; }
  .util-btn { min-height: 40px; }
  .row-actions a, .row-actions button { width: 38px; height: 38px; }

  /* Horizontal scroll for filter pills on mobile */
  .filter-bar {
    flex-wrap: nowrap; overflow-x: auto;
    margin-left: -20px; margin-right: -20px;
    padding: 0 20px 6px; gap: 6px;
    scrollbar-width: none;
  }
  .filter-bar::-webkit-scrollbar { display: none; }
  .filter-bar .pill { white-space: nowrap; flex-shrink: 0; }
}

/* ===== Responsive: MOBILE (≤640px) ===== */
@media (max-width: 640px) {
  body { font-size: 15px; line-height: 1.7; }
  .hero { padding: 48px 16px 44px; }
  .hero h1.hero-title { letter-spacing: 0.4px; line-height: 1.18; }
  .hero .hero-sub { font-size: 14.5px; }
  .section { padding: 48px 16px; }
  .section.alt::before, .section.alt::after { display: none; }

  .search-box { padding: 5px 5px 5px 18px; }
  .search-box input { height: 48px; font-size: 15px; }
  .search-box button { height: 44px; padding: 0 22px; font-size: 14px; }

  .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .cat-card { padding: 16px 8px; }
  .cat-card .name { font-size: 13.5px; }
  .cat-card .count { font-size: 11px; }
  img.cat-icon { width: 48px; height: 48px; margin-bottom: 8px; border-radius: 14px; }

  .video-grid { grid-template-columns: 1fr 1fr; gap: 12px; }

  .r-card { grid-template-columns: 1fr; gap: 12px; }
  .r-card .v-thumb { aspect-ratio: 16/10; max-height: 180px; }
  .r-card .r-title { font-size: 16px; margin-bottom: 6px; }
  .r-card .r-desc { font-size: 13.5px; -webkit-line-clamp: 3; }
  .r-card .r-foot { font-size: 12.5px; gap: 10px; flex-wrap: wrap; }

  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-card .num { font-size: 22px; }
  .stat-card::after { width: 60px; height: 60px; }

  /* Mobile table → card view */
  .app-table { font-size: 13px; }
  .app-table th, .app-table td { padding: 10px 12px; }
  .app-table .video-cell { gap: 8px; }
  .app-table .thumb { width: 56px; }
  .info-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .info-card { padding: 14px 12px; }
  .info-card .val { font-size: 16px; }

  /* Mobile expert hero */
  .expert-hero-inner { grid-template-columns: 80px 1fr; }
  .expert-avatar-xl { width: 80px; height: 80px; border-width: 3px; }
  .expert-meta h1 { font-size: 20px; }
  .expert-meta .stats { gap: 14px; flex-wrap: wrap; }
  .expert-meta .stats .item .n { font-size: 16px; }
  .expert-meta .stats .item .l { font-size: 11px; }

  .panel-head { padding: 14px 18px; }
  .panel-body { padding: 18px; }
  .panel-body.flush { padding: 0; }

  /* Mobile typography */
  .section-head h2 { font-size: 20px; }
  .page-hero { padding: 44px 16px 36px; }
  .page-hero h1 { font-size: 26px; }
  .page-hero p { font-size: 14px; }

  /* Form mobile polish */
  .form-group input, .form-group select, .form-group textarea {
    font-size: 16px; /* prevents iOS zoom on focus */
  }

  /* Watch page mobile */
  .watch-wrap { padding: 16px 16px 100px; }
  .watch-info h1 { font-size: 20px; }
  .player-actions { gap: 4px; }
  .act-btn { padding: 6px 4px; font-size: 11px; }
  .act-btn .ic { width: 40px; height: 40px; font-size: 12px; }

  /* Hide some less critical bits on tiny screens */
  .nav-utility .util-btn:not(.primary) { display: none; }
}

/* ===== Responsive: SMALL MOBILE (≤420px) ===== */
@media (max-width: 420px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cat-card { padding: 18px 10px; }
  img.cat-icon { width: 56px; height: 56px; }
  .video-grid { gap: 10px; }
  .v-body { padding: 12px 12px 14px; }
  .v-title { font-size: 14px; }
  .v-meta .tag { font-size: 10.5px; padding: 2px 7px; }
  .stat-grid { grid-template-columns: 1fr; }
  .brand-text p { display: none; }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== Print ===== */
@media print {
  .site-header, .site-footer, .nav-utility, .nav-toggle, .bottom-nav, .mobile-cta { display: none !important; }
  body { background: #fff; }
  .panel, .stat-card, .v-card { box-shadow: none; border-color: #999; }
}
