:root {
  --tzg-green: #2f9e44;
  --tzg-green-deep: #237a34;
  --tzg-red: #c0392b;
  --tzg-teal: #0d9488;
  --tzg-blue: #2563eb;
  --tzg-bg: #f7f3e8;
  --tzg-paper: #fffdf8;
  --tzg-card: #ffffff;
  --tzg-text: #2b2b2b;
  --tzg-muted: #6b7280;
  --tzg-border: #e8e0d0;
  --tzg-chip: #f3ead8;
  --tzg-max: 1180px;
  --tzg-radius: 8px;
  --tzg-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --tzg-serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "SimSun", serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--tzg-sans);
  color: var(--tzg-text);
  background:
    linear-gradient(180deg, #faf6ec 0%, var(--tzg-bg) 40%, #f3eee0 100%);
  line-height: 1.7;
}
a { color: var(--tzg-text); text-decoration: none; }
a:hover { color: var(--tzg-red); }
img { max-width: 100%; height: auto; display: block; }
.tzg-skip { position: absolute; left: -9999px; }
.tzg-skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--tzg-red); color: #fff; padding: 8px 12px; }
.tzg-container { width: 100%; max-width: var(--tzg-max); margin: 0 auto; padding: 0 16px; }
.tzg-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* Header — light bar like c321 */
.tzg-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,253,248,.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--tzg-border);
  box-shadow: 0 2px 12px rgba(43,43,43,.04);
}
.tzg-header__bar {
  display: flex; align-items: center; gap: 14px; min-height: 60px; flex-wrap: wrap;
}
.tzg-brand {
  display: flex; align-items: center; gap: 10px; margin-right: 6px;
}
.tzg-brand__mark {
  width: 36px; height: 36px; border-radius: 6px;
  background: linear-gradient(145deg, var(--tzg-red), #8e241a);
  color: #fff; font-family: var(--tzg-serif); font-size: 20px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.tzg-brand__name {
  font-family: var(--tzg-serif); font-size: 18px; font-weight: 700; letter-spacing: .04em;
  color: #1f1f1f;
}
.tzg-brand__tag { display: block; font-size: 11px; color: var(--tzg-muted); margin-top: 1px; }
.tzg-nav { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.tzg-nav__link {
  padding: 7px 12px; border-radius: 999px; font-size: 14px;
  background: transparent; color: #374151; border: 1px solid transparent;
}
.tzg-nav__link:hover, .tzg-nav__link.is-active {
  background: #eef8f0; color: var(--tzg-green-deep); border-color: #c6e9cc;
}
.tzg-nav-toggle {
  display: none; width: 40px; height: 40px; border: 0; background: transparent; cursor: pointer;
}
.tzg-nav-toggle span {
  display: block; width: 20px; height: 2px; background: #333; margin: 4px auto;
}

main#tzg-main { padding: 20px 0 48px; min-height: 60vh; }

/* Hero search */
.tzg-hero {
  text-align: center; padding: 28px 12px 18px;
}
.tzg-hero h1, .tzg-hero__title {
  margin: 0 0 18px; font-family: var(--tzg-serif); font-size: clamp(26px, 4vw, 36px);
  font-weight: 700; color: #1a1a1a; letter-spacing: .06em;
}
.tzg-search {
  display: flex; max-width: 640px; margin: 0 auto; border-radius: 8px;
  overflow: hidden; border: 1px solid #d9d0be; background: #fff;
  box-shadow: 0 8px 24px rgba(43,43,43,.06);
}
.tzg-search input {
  flex: 1; border: 0; padding: 14px 16px; font-size: 15px; outline: none; min-width: 0;
}
.tzg-search button {
  border: 0; background: var(--tzg-green); color: #fff; padding: 0 22px;
  font-size: 15px; cursor: pointer; font-weight: 600;
}
.tzg-search button:hover { background: var(--tzg-green-deep); }
.tzg-hero__hint {
  margin: 12px auto 0; max-width: 640px; font-size: 13px; color: var(--tzg-red); text-align: left;
}
.tzg-quick {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  margin: 22px auto 8px; max-width: 860px;
}
.tzg-quick a {
  min-width: 108px; padding: 12px 14px; border-radius: 8px; color: #fff;
  font-size: 14px; font-weight: 600; text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.tzg-quick a:hover { filter: brightness(1.05); color: #fff; }
.tzg-quick a.q-teal { background: var(--tzg-teal); }
.tzg-quick a.q-green { background: var(--tzg-green); }
.tzg-quick a.q-red { background: var(--tzg-red); }
.tzg-quick a.q-blue { background: var(--tzg-blue); }

.tzg-seo-blurb {
  max-width: 920px; margin: 14px auto 22px; font-size: 13px; color: var(--tzg-muted);
  line-height: 1.85; text-align: left;
}

/* Layout */
.tzg-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: start;
}
.tzg-layout--flush { margin-top: 8px; }
@media (max-width: 900px) {
  .tzg-layout { grid-template-columns: 1fr; }
  .tzg-nav-toggle { display: block; }
  .tzg-nav {
    display: none; width: 100%; order: 10;
    flex-direction: column; background: var(--tzg-paper); padding: 8px;
    border: 1px solid var(--tzg-border); border-radius: 8px;
  }
  .tzg-nav.is-open { display: flex; }
}

.tzg-panel {
  background: var(--tzg-card);
  border: 1px solid var(--tzg-border);
  border-radius: var(--tzg-radius);
  padding: 16px 18px; margin-bottom: 16px;
  box-shadow: 0 4px 14px rgba(43,43,43,.03);
}
.tzg-panel__title {
  margin: 0 0 14px; font-size: 18px; font-weight: 700; color: #1f1f1f;
  padding-left: 10px; border-left: 4px solid var(--tzg-red);
  font-family: var(--tzg-serif);
}
.tzg-lead { color: var(--tzg-muted); font-size: 14px; margin: 0 0 12px; }

/* Character grid like c321 */
.tzg-char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
}
.tzg-char {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 72px; padding: 8px 4px;
  background: var(--tzg-chip); border: 1px solid #e6dcc8; border-radius: 6px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.tzg-char:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(43,43,43,.08);
  color: var(--tzg-red);
}
.tzg-char__py { font-size: 11px; color: var(--tzg-muted); line-height: 1.2; }
.tzg-char__zi {
  font-family: var(--tzg-serif); font-size: 26px; font-weight: 700; line-height: 1.2; margin-top: 2px;
}
.tzg-char__word {
  font-family: var(--tzg-serif); font-size: 15px; font-weight: 700; line-height: 1.25; margin-top: 2px;
  text-align: center;
}

.tzg-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tzg-chip {
  display: inline-flex; flex-direction: column; align-items: center;
  min-width: 64px; padding: 8px 10px; background: var(--tzg-chip);
  border: 1px solid #e6dcc8; border-radius: 6px; font-size: 13px;
}
.tzg-chip__py { font-size: 11px; color: var(--tzg-muted); }
.tzg-chip__zi, .tzg-chip__word { font-family: var(--tzg-serif); font-weight: 700; }

.tzg-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px;
}
.tzg-card {
  display: block; padding: 12px 14px; background: var(--tzg-paper);
  border: 1px solid var(--tzg-border); border-radius: 6px;
}
.tzg-card:hover { border-color: #d4b48c; }
.tzg-card__title { font-family: var(--tzg-serif); font-size: 20px; font-weight: 700; }
.tzg-card__meta { font-size: 12px; color: var(--tzg-muted); margin: 4px 0; }
.tzg-card__brief {
  font-size: 13px; color: #4b5563;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Sidebar with red corner brackets */
.tzg-aside .tzg-panel {
  position: relative;
}
.tzg-aside .tzg-panel::before,
.tzg-aside .tzg-panel::after {
  content: ""; position: absolute; width: 14px; height: 14px;
  border: 2px solid var(--tzg-red);
}
.tzg-aside .tzg-panel::before { left: 6px; top: 6px; border-right: 0; border-bottom: 0; }
.tzg-aside .tzg-panel::after { right: 6px; top: 6px; border-left: 0; border-bottom: 0; }
.tzg-aside-list { list-style: none; margin: 0; padding: 0; }
.tzg-aside-list li { margin: 0 0 8px; }
.tzg-aside-list a {
  display: block; padding: 8px 10px; background: var(--tzg-chip);
  border-radius: 4px; font-size: 13px; text-align: center;
}
.tzg-aside-list a:hover { background: #ebe0c8; }
.tzg-alpha {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px;
}
.tzg-alpha a {
  text-align: center; padding: 6px 0; background: #f0f7f2; border-radius: 4px;
  font-size: 13px; font-weight: 600; color: var(--tzg-green-deep);
}

/* Detail */
.tzg-entry { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.tzg-glyph {
  width: 110px; height: 110px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--tzg-serif); font-size: 64px; font-weight: 700;
  background: var(--tzg-chip); border: 1px solid var(--tzg-border); border-radius: 8px;
}
.tzg-meta-list { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.tzg-meta-list li { margin: 0 0 6px; }
.tzg-meta-list strong { display: inline-block; min-width: 4em; color: var(--tzg-muted); font-weight: 600; }
.tzg-py { color: var(--tzg-red); font-weight: 700; margin-right: 6px; }
.tzg-py-plain { color: var(--tzg-muted); font-size: 13px; }
.tzg-speak {
  border: 1px solid var(--tzg-border); background: #fff; border-radius: 4px;
  padding: 2px 8px; cursor: pointer; font-size: 12px; margin-left: 6px;
}
.tzg-content { font-size: 15px; line-height: 1.85; }
.tzg-content h3 { font-size: 16px; margin: 12px 0 8px; }

/* Daily / looking */
.tzg-home-widgets {
  display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 16px; margin-bottom: 16px;
}
@media (max-width: 700px) {
  .tzg-home-widgets { grid-template-columns: 1fr; }
}
.tzg-looking__grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px;
}
.tzg-looking__item {
  display: flex; flex-direction: column; align-items: center; padding: 8px 4px;
  background: var(--tzg-chip); border-radius: 6px; border: 1px solid #e6dcc8;
}
.tzg-looking__py { font-size: 11px; color: var(--tzg-muted); }
.tzg-looking__word { font-family: var(--tzg-serif); font-size: 22px; font-weight: 700; }
.tzg-daily { text-align: center; }
.tzg-mizige {
  width: 160px; height: 160px; margin: 0 auto; position: relative;
  background:
    linear-gradient(#e8dcc4, #e8dcc4) center/1px 100% no-repeat,
    linear-gradient(#e8dcc4, #e8dcc4) center/100% 1px no-repeat,
    var(--tzg-paper);
  border: 1px solid var(--tzg-border); border-radius: 8px;
}
.tzg-mizige__fallback {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--tzg-serif); font-size: 72px; font-weight: 700; color: #333;
}
.tzg-daily__py { margin: 8px 0 0; color: var(--tzg-muted); font-size: 14px; }

/* Pager */
.tzg-pager, .hyc-pager {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; align-items: center;
}
.tzg-pager a, .hyc-pager a,
.tzg-pager span, .hyc-pager span {
  display: inline-block; min-width: 34px; text-align: center; padding: 6px 10px;
  border: 1px solid var(--tzg-border); border-radius: 4px; font-size: 13px; background: #fff;
}
.tzg-pager .is-current, .hyc-pager .is-current {
  background: var(--tzg-green); color: #fff; border-color: var(--tzg-green);
}
.tzg-pager .is-disabled, .hyc-pager .is-disabled { color: #bbb; }

/* Articles */
.tzg-article-card img { border-radius: 6px; margin-bottom: 8px; }
.tzg-article-card__meta { font-size: 12px; color: var(--tzg-muted); }

/* Footer */
.tzg-footer {
  background: #2c2c2c; color: #cfcfcf; padding: 28px 0 36px; margin-top: 24px; font-size: 13px;
}
.tzg-footer a { color: #e8e8e8; }
.tzg-footer a:hover { color: #fff; }
.tzg-flink__title { margin: 0 0 8px; color: #fff; font-size: 14px; }
.tzg-flink__list { display: flex; flex-wrap: wrap; gap: 10px 14px; margin: 0 0 18px; }
.tzg-footer__copy { margin: 0 0 8px; }
.tzg-footer__note { margin: 0 0 6px; color: #9ca3af; }
.tzg-gotop {
  position: fixed; right: 18px; bottom: 24px; width: 42px; height: 42px;
  border: 0; border-radius: 50%; background: var(--tzg-red); color: #fff;
  cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .2s;
  box-shadow: 0 4px 14px rgba(192,57,43,.35);
}
.tzg-gotop.is-show { opacity: 1; pointer-events: auto; }

/* 工具直出页（组词/近反义/接龙）补充 */
main#tzg-main { padding: 20px 0 48px; min-height: 60vh; }
.tzg-main { min-width: 0; }
.tzg-lead--center { text-align: center; }
.tzg-muted { color: var(--tzg-muted); }
.tzg-card__word { font-family: var(--tzg-serif); font-size: 18px; font-weight: 700; }
.tzg-rel-list { display: flex; flex-direction: column; gap: 0; }
.tzg-rel-row {
  display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: start;
  padding: 14px 4px; border-bottom: 1px solid var(--tzg-border);
}
.tzg-rel-row:last-child { border-bottom: 0; }
.tzg-rel-head {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 56px; padding: 8px 6px; background: var(--tzg-chip);
  border-radius: 6px; border: 1px solid var(--tzg-border); text-align: center;
}
.tzg-rel-head__py { font-size: 12px; color: var(--tzg-muted); line-height: 1.2; }
.tzg-rel-head__word { font-size: 18px; font-weight: 700; margin-top: 2px; }
.tzg-rel-body { min-width: 0; padding-top: 2px; }
.tzg-rel-tag {
  display: inline-block; font-size: 12px; color: var(--tzg-muted);
  background: var(--tzg-chip); border: 1px solid var(--tzg-border);
  border-radius: 999px; padding: 2px 10px; margin-bottom: 8px;
}
.tzg-rel-items { font-size: 15px; line-height: 1.9; }
.tzg-rel-items a { color: var(--tzg-green-deep); text-decoration: underline; text-underline-offset: 3px; }
.tzg-rel-items a:hover { color: var(--tzg-red); }
.tzg-rel-sep { color: var(--tzg-muted); margin: 0 2px; }
.tzg-aside__sticky { position: sticky; top: 72px; display: flex; flex-direction: column; gap: 12px; }
.tzg-aside-def {
  background: var(--tzg-card); border: 1px solid var(--tzg-border); border-radius: var(--tzg-radius);
  padding: 16px 14px; text-align: center;
}
.tzg-aside-def__title { margin: 0 0 8px; font-family: var(--tzg-serif); font-size: 18px; font-weight: 700; }
.tzg-aside-def__text { margin: 0; font-size: 13px; color: var(--tzg-muted); line-height: 1.7; text-align: left; }
@media (max-width: 860px) {
  .tzg-rel-row { grid-template-columns: 96px 1fr; gap: 10px; }
  .tzg-rel-head__word { font-size: 16px; }
}
