body.home {
  --bg: #f5f6f7;
  --card: #ffffff;
  --fg: #202124;
  --mut: #5f6368;
  --line: #d6d9dc;
  --soft: #eceef0;
  --acc: #b4232e;
  --thumbbg: #eceef0;
  --focus: #1769aa;
  background: var(--bg);
  color: var(--fg);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
}
html.dark body.home {
  --bg: #151617;
  --card: #202224;
  --fg: #f1f3f4;
  --mut: #b4b9be;
  --line: #45494d;
  --soft: #2d3033;
  --acc: #ff9299;
  --thumbbg: #2d3033;
  --focus: #8ac7ff;
}
body.home *, body.home *::before, body.home *::after { letter-spacing: 0; }
body.home :is(button, input, select, a):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
body.home .home-skip {
  position: fixed;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 8px 16px;
  background: var(--card);
  color: var(--fg);
}
body.home .home-skip:focus { top: 8px; }
body.home .site-header {
  padding: 0;
  background: var(--card);
  color: var(--fg);
  border-bottom: 1px solid var(--line);
}
body.home .site-header .in {
  max-width: 1200px;
  min-height: 76px;
  padding: 12px 24px;
  gap: 24px;
  flex-wrap: nowrap;
}
body.home .logo { min-width: 0; flex-shrink: 0; }
body.home .logo img { display: block; width: auto; height: 40px; max-width: 100%; }
body.home .nav { gap: 4px; align-items: center; min-width: 0; }
body.home .nav button {
  min-height: 36px;
  padding: 6px 16px;
  color: var(--mut);
  font-size: 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 500;
  white-space: nowrap;
}
body.home .nav button:hover { color: var(--fg); background: var(--soft); }
body.home .nav button.on {
  background: var(--soft);
  border-color: var(--line);
  color: var(--fg);
  font-weight: 700;
  box-shadow: inset 0 -2px var(--acc);
}
body.home .nav #themeBtn {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  padding: 0;
  margin-left: 12px;
  border-color: var(--line);
}
body.home .home-icon { width: 18px; height: 18px; flex-shrink: 0; }
body.home .wrap { max-width: 1200px; padding: 24px; }
body.home .home-title { font-size: 22px; line-height: 1.4; font-weight: 700; margin: 0 0 16px; }
body.home .toolbar {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  margin: 0 0 24px;
  padding: 0 0 24px;
  border-bottom: 1px solid var(--line);
}
body.home .home-field { display: grid; min-width: 0; gap: 8px; }
body.home .home-field label { font-size: 12px; color: var(--mut); }
body.home .toolbar :is(select, input) {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card);
  color: var(--fg);
  font: inherit;
}
body.home .toolbar input::placeholder { color: var(--mut); opacity: 1; }
body.home .home-search { position: relative; min-width: 0; }
body.home .home-search > svg { position: absolute; left: 12px; top: 9px; color: var(--mut); pointer-events: none; }
body.home #search { padding-left: 40px; min-width: 0; }
body.home .count {
  min-width: 100px;
  margin: 0;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: end;
  color: var(--mut);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
body.home .section-title { font-size: 16px; gap: 8px; margin: 24px 0 16px; }
body.home .section-title::before { height: 16px; width: 3px; border-radius: 0; flex-shrink: 0; }
body.home .section-title small { display: none; }
body.home .tagbar { gap: 8px; margin-bottom: 16px; }
body.home .tagbar button {
  min-height: 36px;
  padding: 6px 12px;
  background: var(--card);
  color: var(--mut);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  overflow-wrap: anywhere;
  max-width: 100%;
}
body.home .tagbar button:hover { background: var(--soft); color: var(--fg); }
body.home .tagbar button.on {
  background: var(--soft);
  color: var(--fg);
  border-color: var(--acc);
  text-decoration: underline;
  text-underline-offset: 4px;
}
body.home .grid { grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 16px; }
body.home .card { min-width: 0; border-radius: 6px; animation: none; transition: border-color .12s; }
body.home .card:hover { box-shadow: none; border-color: var(--mut); }
body.home .thumb { background: var(--thumbbg); animation: none; }
body.home .meta { padding: 12px; }
body.home .meta .name {
  font-size: 14px;
  line-height: 1.6;
  min-height: 45px;
  display: block;
  overflow: visible;
  overflow-wrap: anywhere;
}
body.home .meta .sub { font-size: 12px; margin-top: 8px; word-break: normal; overflow-wrap: anywhere; }
body.home .none { grid-column: 1 / -1; padding: 48px 16px; background: var(--card); border-block: 1px solid var(--line); }
body.home footer { border-top: 1px solid var(--line); margin-top: 32px; padding: 24px 0; text-align: left; }
@media (max-width: 720px) {
  body.home { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  body.home .site-header .in { min-height: 68px; padding: 12px 16px; gap: 12px; }
  body.home .logo img { height: 36px; }
  body.home .nav button[data-t] { display: none; }
  body.home .nav #themeBtn { min-height: 44px; width: 44px; flex-basis: 44px; margin-left: 0; }
  body.home .wrap { padding: 24px 16px 16px; }
  body.home .toolbar { grid-template-columns: minmax(0, 1fr) 96px; gap: 12px; padding-bottom: 16px; }
  body.home .home-field:first-child { grid-column: 1; grid-row: 2; }
  body.home .home-field:nth-child(2) { grid-column: 1 / -1; grid-row: 1; }
  body.home .count { min-width: 0; min-height: 44px; grid-column: 2; grid-row: 2; }
  body.home .toolbar :is(select, input) { height: 44px; font-size: 16px; }
  body.home .home-search > svg { top: 13px; }
  body.home .tagbar button { min-height: 44px; }
  body.home .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  body.home .meta { padding: 12px 8px; }
  body.home .mnav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    background: var(--card);
    padding: 4px 8px calc(4px + env(safe-area-inset-bottom));
  }
  body.home .mnav a {
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    padding: 4px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--mut);
  }
  body.home .mnav a[aria-current="page"] { background: var(--soft); color: var(--fg); box-shadow: inset 0 2px var(--acc); font-weight: 700; }
}
@media (max-width: 340px) { body.home .grid { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) {
  body.home *, body.home *::before, body.home *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
