/* 首页：工具目录 + 今日信息，移动端自然回流。 */
.home-header { background: var(--ui-surface); border-bottom: 1px solid var(--ui-border); }
.home-header-inner { width: min(1200px, calc(100% - 64px)); min-height: 80px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.home-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ui-heading); }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; background: var(--ui-primary-soft); color: var(--ui-primary); border: 1px solid var(--ui-primary-line); border-radius: 12px; font: 600 24px/1 var(--ui-serif); }
.brand-name { font-size: 18px; font-weight: 650; letter-spacing: .04em; }
.brand-caption { display: block; margin-top: 1px; color: var(--ui-muted); font-size: 12px; letter-spacing: .06em; }
.home-nav { display: flex; align-items: center; gap: 28px; }
.home-nav a { color: var(--ui-muted); text-decoration: none; padding: 10px 0; font-size: 14px; }
.home-nav a[aria-current], .home-nav a:hover { color: var(--ui-primary); }
.home-nav a[aria-current] { box-shadow: 0 2px 0 var(--ui-primary); }
.home-main { max-width: 1264px; margin: auto; padding: 48px 32px 24px; }
.home-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.home-kicker { margin: 0 0 10px; font-size: 12px; letter-spacing: .14em; color: var(--ui-primary); }
.home-intro h1 { margin: 0; font: 600 clamp(28px, 3vw, 38px)/1.4 var(--ui-serif); letter-spacing: .04em; color: var(--ui-heading); }
.home-intro p:last-child { color: var(--ui-muted); margin: 10px 0 0; font-size: 15px; }
.home-date { color: var(--ui-muted); font-size: 14px; white-space: nowrap; padding-bottom: 4px; }
.home-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; align-items: start; }
.directory { min-width: 0; }
.directory-toolbar { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 20px; }
.directory-title { display: flex; gap: 10px; align-items: baseline; flex-shrink: 0; }
.directory-title h2 { margin: 0; font-size: 18px; font-weight: 650; }
.tool-count { color: var(--ui-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.home-search { position: relative; width: min(320px, 55%); }
.home-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ui-muted); width: 18px; height: 18px; pointer-events: none; }
.home-search input { width: 100%; height: 44px; padding: 8px 12px 8px 42px; border: 1px solid var(--ui-border); border-radius: var(--ui-radius-sm); color: var(--ui-text); background: white; font-size: 14px; transition: border-color .18s; }
.home-search input:focus { border-color: var(--ui-primary); outline: 3px solid var(--ui-primary-soft); }
.category-nav { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 20px; }
.category-nav button { min-height: 36px; padding: 5px 13px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--ui-muted); font-size: 14px; }
.category-nav button:hover { color: var(--ui-primary); background: var(--ui-primary-soft); }
.category-nav button[aria-pressed="true"] { color: var(--ui-primary-hover); background: var(--ui-primary-soft); border-color: var(--ui-primary-line); font-weight: 600; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tool-card { min-width: 0; min-height: 170px; padding: 20px; position: relative; display: flex; flex-direction: column; align-items: flex-start; background: var(--ui-surface); color: inherit; text-decoration: none; border: 1px solid var(--ui-border); border-radius: var(--ui-radius); transition: transform .18s, border-color .18s, box-shadow .18s; }
.tool-card:hover { border-color: var(--ui-primary-line); transform: translateY(-3px); box-shadow: var(--ui-shadow-raised); }
.tool-mark { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; background: var(--ui-primary-soft); color: var(--ui-primary); font: 600 22px/1 var(--ui-serif); margin-bottom: 15px; }
.tool-card[data-category="divination"] .tool-mark { background: #edf3fa; color: #4d7397; }
.tool-card[data-category="life"] .tool-mark { background: #f6f1e6; color: #927445; }
.tool-card[data-category="western"] .tool-mark { background: #f2eff8; color: #7a68a1; }
.tool-card h3 { margin: 0 0 6px; font-size: 17px; line-height: 1.5; font-weight: 650; color: var(--ui-heading); }
.tool-card p { margin: 0; color: var(--ui-muted); font-size: 13px; line-height: 1.75; }
.tool-arrow { position: absolute; top: 24px; right: 20px; color: #85979c; width: 16px; height: 16px; transition: color .18s, transform .18s; }
.tool-card:hover .tool-arrow { color: var(--ui-primary); transform: translate(2px, -2px); }
.no-result { grid-column: 1/-1; padding: 64px 24px; text-align: center; border: 1px dashed var(--ui-border-strong); border-radius: var(--ui-radius); background: white; }
.no-result p { margin: 0 0 8px; font-size: 17px; }
.no-result span { color: var(--ui-muted); font-size: 14px; }
.home-aside { display: grid; gap: 18px; }
.today-card, .community-card { border: 1px solid var(--ui-border); border-radius: var(--ui-radius); background: white; overflow: hidden; }
.today-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 18px 20px; border-bottom: 1px solid var(--ui-border); }
.today-head h2 { font-size: 15px; font-weight: 600; margin: 0; }
.today-head span { font-size: 12px; color: var(--ui-muted); }
.today-symbol { padding: 22px 20px 14px; display: flex; align-items: center; gap: 16px; }
.today-glyph { width: 60px; height: 66px; border-radius: 12px; background: var(--ui-primary-soft); color: var(--ui-primary); display: grid; place-items: center; font: 48px/1 var(--ui-serif); }
.today-name { display: block; font: 600 25px/1.4 var(--ui-serif); color: var(--ui-heading); }
.today-symbol small { font-size: 12px; color: var(--ui-muted); }
.today-text { padding: 0 20px; margin: 0 0 20px; font: 17px/1.9 var(--ui-serif); color: var(--ui-text); }
.today-yj { margin: 0 20px; padding: 16px 0; border-top: 1px solid var(--ui-border); display: grid; gap: 12px; }
.yj-row { display: flex; align-items: baseline; gap: 10px; font-size: 13px; color: var(--ui-muted); }
.yj-tag { flex: 0 0 24px; text-align: center; line-height: 24px; border-radius: 6px; background: #edf6f0; color: var(--ui-success); font-size: 13px; }
.yj-tag.avoid { color: var(--ui-danger); background: #fbefef; }
.today-link { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; border-top: 1px solid var(--ui-border); color: var(--ui-primary); font-size: 14px; text-decoration: none; }
.today-link:hover { background: var(--ui-primary-soft); }
.today-footnote { margin: 0; padding: 0 20px 16px; font-size: 12px; color: var(--ui-muted); }
.community-card { padding: 20px; }
.community-card h2 { margin: 0 0 8px; font-size: 15px; font-weight: 600; }
.community-card p { color: var(--ui-muted); font-size: 13px; line-height: 1.8; margin: 0 0 16px; }
.community-code { display: block; color: var(--ui-heading); font-size: 20px; letter-spacing: .03em; font-variant-numeric: tabular-nums; margin-bottom: 16px; }
.community-link { display: block; padding: 9px 12px; border: 1px solid var(--ui-border-strong); border-radius: 9px; color: var(--ui-primary); text-align: center; font-size: 14px; text-decoration: none; }
.community-link:hover { border-color: var(--ui-primary); background: var(--ui-primary-soft); }
.home-footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 36px; padding: 24px 0 8px; border-top: 1px solid var(--ui-border); color: var(--ui-muted); font-size: 12px; }
.home-footer p { margin: 0; }
@media (min-width: 1500px) { .home-main { padding-top: 56px; } .tool-grid { gap: 16px; } }
@media (max-width: 1080px) { .home-layout { grid-template-columns: minmax(0, 1fr) 260px; gap: 22px; } .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .home-header-inner { min-height: 72px; width: calc(100% - 40px); gap: 16px; }
  .home-nav { gap: 18px; } .home-nav a:last-child { display: none; }
  .brand-name { font-size: 16px; } .brand-caption { font-size: 12px; }
  .home-main { padding: 32px 20px 20px; }
  .home-intro { margin-bottom: 24px; } .home-date { display: none; }
  .home-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .home-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .tool-card { min-height: 158px; }
}
@media (max-width: 480px) {
  .home-header-inner { width: calc(100% - 32px); } .home-nav a:not([aria-current]) { display: none; }
  .home-main { padding: 28px 16px 16px; } .home-intro h1 { font-size: 29px; }
  .home-intro p:last-child { font-size: 14px; } .home-kicker { font-size: 12px; }
  .directory-toolbar { align-items: stretch; flex-direction: column; gap: 16px; margin-bottom: 14px; }
  .home-search { width: 100%; } .home-search input { height: 46px; font-size: 16px; }
  .category-nav { gap: 4px; padding-bottom: 16px; } .category-nav button { padding: 5px 9px; font-size: 13px; }
  .tool-grid { gap: 10px; } .tool-card { padding: 16px; min-height: 166px; }
  .tool-card h3 { font-size: 16px; } .tool-card p { font-size: 13px; } .tool-arrow { right: 14px; top: 18px; }
  .home-aside { grid-template-columns: minmax(0, 1fr); }
  .home-footer { margin-top: 24px; gap: 8px; }
}
@media (max-width: 340px) { .tool-grid { grid-template-columns: 1fr; } }

/* 2026-09 第二轮：首页每日一盘改为真正紧凑的信息条。 */
.home-today-card {
  display: grid;
  grid-template-columns: 132px 176px minmax(220px, 1.2fr) minmax(280px, 1.35fr) 154px;
  align-items: stretch;
  margin: 0 0 22px;
  overflow: hidden;
  min-height: 88px;
  border-color: color-mix(in srgb, var(--ui-primary-line) 58%, var(--ui-border));
  box-shadow: 0 8px 30px rgb(27 58 66 / 5%);
}
.home-today-card .today-head {
  grid-column: 1; padding: 14px 15px; border: 0; border-right: 1px solid var(--ui-border);
  flex-direction: column; justify-content: center; align-items: flex-start; gap: 3px;
  background: linear-gradient(145deg, var(--ui-primary-soft), #fff 82%);
}
.home-today-card .today-head h2 { font: 650 15px/1.35 var(--ui-serif); color: var(--ui-heading); }
.home-today-card .today-head span { font-size: 11px; }
.home-today-card .today-symbol { grid-column: 2; padding: 12px 14px; min-width: 0; gap: 11px; }
.home-today-card .today-glyph { width: 46px; height: 50px; font-size: 37px; border-radius: 11px; flex: 0 0 auto; }
.home-today-card .today-name { font-size: 20px; line-height: 1.25; }
.home-today-card .today-symbol small { display: block; margin-top: 2px; font-size: 10.5px; line-height: 1.35; }
.home-today-card .today-text {
  grid-column: 3; min-width: 0; margin: 0; padding: 13px 16px; display: flex; align-items: center;
  border-left: 1px solid var(--ui-border); font-size: 14px; line-height: 1.7;
}
.home-today-card .today-yj {
  grid-column: 4; min-width: 0; margin: 0; padding: 11px 16px; border: 0; border-left: 1px solid var(--ui-border);
  align-content: center; gap: 7px;
}
.home-today-card .yj-row { gap: 8px; font-size: 12px; line-height: 1.45; }
.home-today-card .yj-tag { flex-basis: 22px; line-height: 22px; font-size: 12px; }
.home-today-card .today-link {
  grid-column: 5; min-width: 0; padding: 12px 14px; border: 0; border-left: 1px solid var(--ui-border);
  justify-content: center; gap: 8px; text-align: center; font-size: 13px; font-weight: 600;
  background: #fbfdfd;
}
.home-today-card .today-footnote { display: none; }

@media (max-width: 1080px) {
  .home-today-card { grid-template-columns: 118px 158px minmax(190px, 1.05fr) minmax(240px, 1.2fr) 132px; }
  .home-today-card .today-text { padding-left: 13px; padding-right: 13px; }
  .home-today-card .today-yj { padding-left: 13px; padding-right: 13px; }
}

@media (max-width: 860px) {
  .home-today-card { grid-template-columns: 112px minmax(150px, .72fr) minmax(0, 1.28fr) 126px; min-height: 0; }
  .home-today-card .today-head { grid-column: 1; grid-row: 1; }
  .home-today-card .today-symbol { grid-column: 2; grid-row: 1; }
  .home-today-card .today-text { grid-column: 3; grid-row: 1; }
  .home-today-card .today-link { grid-column: 4; grid-row: 1; }
  .home-today-card .today-yj {
    grid-column: 1 / -1; grid-row: 2; border-left: 0; border-top: 1px solid var(--ui-border);
    grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 8px 13px;
  }
}

@media (max-width: 520px) {
  .home-header-inner { min-height: 58px; }
  .brand-mark { width: 34px; height: 34px; font-size: 20px; border-radius: 10px; }
  .brand-caption { display: none; }
  .home-main { padding-top: 14px; }
  .home-intro { margin-bottom: 13px; }
  .home-intro h1 { font-size: 24px; line-height: 1.3; }
  .home-intro p:last-child { margin-top: 5px; font-size: 13px; }
  .home-kicker { margin-bottom: 6px; font-size: 10px; }
  .home-today-card {
    position: relative; margin-bottom: 14px; border-radius: 13px;
    grid-template-columns: 82px minmax(0, 1fr) 82px; min-height: 0;
  }
  .home-today-card .today-head {
    grid-column: 1 / 3; grid-row: 1; min-height: 36px; padding: 7px 10px;
    flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; border-right: 0; border-bottom: 1px solid var(--ui-border);
  }
  .home-today-card .today-head h2 { font-size: 14px; }
  .home-today-card .today-head span { font-size: 10px; }
  .home-today-card .today-link {
    grid-column: 3; grid-row: 1; min-height: 36px; padding: 6px 8px; border-left: 1px solid var(--ui-border); border-bottom: 1px solid var(--ui-border);
    justify-content: space-between; font-size: 11px;
  }
  .home-today-card .today-link span:first-child { font-size: 0; }
  .home-today-card .today-link span:first-child::after { content: "黄历"; font-size: 11px; }
  .home-today-card .today-symbol { grid-column: 1; grid-row: 2; padding: 9px 8px; gap: 6px; flex-direction: column; justify-content: center; text-align: center; }
  .home-today-card .today-glyph { width: 38px; height: 40px; font-size: 30px; border-radius: 9px; }
  .home-today-card .today-name { font-size: 16px; }
  .home-today-card .today-symbol small { display: none; }
  .home-today-card .today-text {
    grid-column: 2 / 4; grid-row: 2; padding: 9px 10px; font-size: 13px; line-height: 1.55; border-left: 1px solid var(--ui-border);
  }
  .home-today-card .today-yj {
    grid-column: 1 / -1; grid-row: 3; padding: 7px 9px; gap: 6px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .home-today-card .yj-row { min-width: 0; gap: 6px; font-size: 11px; align-items: center; }
  .home-today-card .yj-row > span:last-child { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
  .home-today-card .yj-tag { flex-basis: 20px; line-height: 20px; font-size: 11px; }
  .directory-toolbar { gap: 9px; }
  .category-nav { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; margin: 0 -2px; padding-bottom: 11px; }
  .category-nav::-webkit-scrollbar { display: none; }
  .category-nav button { flex: 0 0 auto; min-height: 33px; }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tool-card { min-height: 132px; padding: 13px; border-radius: 13px; }
  .tool-mark { width: 34px; height: 34px; margin-bottom: 10px; font-size: 18px; border-radius: 9px; }
  .tool-card h3 { font-size: 15px; margin-bottom: 3px; }
  .tool-card p { font-size: 11.5px; line-height: 1.5; }
}
@media (max-width: 760px) { .home-aside { grid-template-columns: minmax(0, 1fr); } }

/* ======================================================================
   2026-09 Round 6 · 首页工具目录精修
   ====================================================================== */
.home-page {
  background:
    radial-gradient(circle at 12% 0%, rgb(22 124 128 / 5%), transparent 340px),
    var(--ui-bg);
}
.home-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgb(255 255 255 / 90%);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  backdrop-filter: blur(18px) saturate(1.08);
}
.home-header-inner { min-height: 72px; }
.home-main { max-width: 1280px; padding-top: 38px; }
.directory-toolbar { margin-bottom: 16px; }
.home-search input {
  background: rgb(255 255 255 / 94%);
  border-color: #d4e0e2;
  box-shadow: 0 4px 14px rgb(27 58 66 / 3%);
}
.category-nav { gap: 8px; padding-bottom: 18px; }
.category-nav button {
  min-height: 38px;
  padding: 6px 14px;
  border-radius: 10px;
  transition: color .16s ease, background .16s ease, border-color .16s ease, transform .16s ease;
}
.category-nav button:active { transform: translateY(1px); }
.tool-grid { gap: 16px; }
.tool-card {
  min-height: 156px;
  padding: 20px;
  overflow: hidden;
  border-color: #dbe5e7;
  box-shadow: 0 4px 16px rgb(27 58 66 / 3%);
}
.tool-card::after {
  content: "";
  position: absolute;
  inset: auto -30px -50px auto;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(22 124 128 / 6%), transparent 70%);
  pointer-events: none;
}
.tool-card:hover {
  border-color: var(--ui-primary-line);
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgb(27 58 66 / 9%);
}
.tool-mark {
  box-shadow: inset 0 0 0 1px rgb(22 124 128 / 5%);
  transition: transform .18s ease;
}
.tool-card:hover .tool-mark { transform: translateY(-1px) scale(1.03); }
.tool-card h3 { font-weight: 720; }
.tool-card p { color: #647a82; }
.tool-arrow { top: 20px; right: 18px; }
.today-card,
.community-card { box-shadow: 0 6px 24px rgb(27 58 66 / 4%); }

@media (min-width: 1180px) {
  .tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .home-header-inner { min-height: 62px; }
  .home-main { padding-top: 22px; }
  .tool-grid { gap: 10px; }
  .tool-card { min-height: 146px; }
}
@media (max-width: 520px) {
  .home-main { padding-top: 12px; }
  .directory-toolbar { gap: 10px; }
  .home-search input { height: 44px; }
  .category-nav { gap: 5px; }
  .category-nav button { min-height: 34px; padding: 5px 10px; }
  .tool-card {
    min-height: 128px;
    padding: 13px;
    box-shadow: 0 3px 12px rgb(27 58 66 / 3%);
  }
  .tool-card:hover { transform: none; }
}
