/* 知否知否 · "艺"板块五页的样式（松烟墨黑 + 柿红）
   由 wuzhi.css 的卡片、表格部件换色而来；页面底、页头是深色（和"字·语"同一类做法），卡片是宣纸色，柿橙只做点缀。
   只在 body.theme-yi 的页面生效，不影响其他板块和首页。请先加载 ziyu.css，再加载本文件。 */
body.theme-yi {
  --zy-bg: #2a2725;
  --zy-bg-2: #211f1d;
  --zy-paper: #f1ece0;
  --zy-paper-2: #f8f5ec;
  --zy-ink: #2b2724;
  --zy-ink-2: #3d3630;
  --zy-muted: #6a5f54;
  --zy-line: #d5ccb8;
  --zy-green: #9c4318;
  --zy-green-2: #b5531f;
  --zy-gold: #f0a06a;
  --zy-gold-d: #7a3512;
  --zy-seal: #c04a1e;
  --zy-cream: #f1e9db;
  --zy-soft: #d3c8b6;
  background: var(--zy-bg);
  background-image: linear-gradient(180deg, #302c29 0%, #211f1d 100%);
  color: var(--zy-cream);
}
.theme-yi a { color: var(--zy-gold); }
.theme-yi [hidden] { display: none !important; }
.theme-yi a:hover { color: #ffd2b0; }
.theme-yi a:focus-visible, .theme-yi button:focus-visible, .theme-yi summary:focus-visible, .theme-yi input:focus-visible {
  outline: 2px solid var(--zy-gold); outline-offset: 3px;
}
/* 纸面卡片、表格里的链接，用深柿红，才看得清 */
.theme-yi .zy-paper a, .theme-yi .zy-card a, .theme-yi .ls-links a { color: #9c4318; }
.theme-yi .zy-paper a:hover, .theme-yi .zy-card a:hover, .theme-yi .ls-links a:hover { color: #7a3512; }

/* 页头页脚：和页面同为松烟墨黑（页头不另设底色，透出页面的底） */
.theme-yi .site-header { border-bottom-color: rgba(240, 160, 106, 0.3); }
.theme-yi .brand, .theme-yi .brand:hover { color: #f3ece0; }
.theme-yi .brand-tagline { color: #b9ad9b; border-left-color: #6b5f52; }
.theme-yi .site-nav a { color: #cfc4b1; }
.theme-yi .site-nav a:hover, .theme-yi .site-nav a[aria-current="page"] { color: #fff6e6; }
.theme-yi .site-nav a[aria-current="page"] { box-shadow: inset 0 -1px 0 var(--zy-gold); }
.theme-yi .sub-nav { border-bottom-color: rgba(240, 160, 106, 0.3); background: rgba(0, 0, 0, 0.28); }
.theme-yi .sub-nav-mark { color: var(--zy-gold); border-right-color: #6b5f52; }
.theme-yi .sub-nav a { color: #cfc4b1; }
.theme-yi .sub-nav a:hover, .theme-yi .sub-nav a[aria-current="page"] { color: #fff6e6; }
.theme-yi .sub-nav a[aria-current="page"] { box-shadow: inset 0 -1px 0 var(--zy-gold); }
.theme-yi .footer-inner { border-top-color: rgba(240, 160, 106, 0.3); color: #b9ad9b; }
.theme-yi .empty-note { color: #b9ad9b; }

/* 页面骨架、标签页里，把 ziyu.css 里偏黄绿的点缀色换成柿橙 */
.theme-yi .zy-answer { color: #ece3d3; }
.theme-yi .zy-sec-title::after { background: rgba(240, 160, 106, 0.35); }
.theme-yi .zy-remind { color: #f3c9a8; }
.theme-yi .zy-callout { border-color: rgba(240, 160, 106, 0.6); color: #f3e9d6; }
.theme-yi .zy-tab { color: #e9dfce; border-color: rgba(240, 160, 106, 0.55); }
.theme-yi .zy-tab:hover { background: rgba(240, 160, 106, 0.15); }
.theme-yi .zy-tab[aria-selected="true"] { background: var(--zy-gold); border-color: var(--zy-gold); color: #2b2724; }
.theme-yi .zy-see a { border-color: rgba(240, 160, 106, 0.5); }
.theme-yi .zy-see a:hover { background: rgba(240, 160, 106, 0.15); }
.theme-yi .zy-tip { border-color: rgba(240, 160, 106, 0.6); }
.theme-yi .zy-notes { border-left-color: var(--zy-gold); }
.theme-yi .zy-route-title { color: #7a3512; }
.theme-yi .zy-btn { color: var(--zy-green); border-color: var(--zy-green-2); }
.theme-yi .zy-btn:hover { background: var(--zy-green); color: var(--zy-paper); }

/* 卡片 */
.theme-yi .zy-card { border-color: var(--zy-line); }
.theme-yi .zy-card-name { color: #7a3512; }
.theme-yi .zy-card.has-sub > summary { min-height: 144px; }   /* 折叠卡收起时高度一致：名字一行 + 一句话最多三行 */
.theme-yi .zy-card.has-sub .zy-card-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.theme-yi .zy-card.has-sub[open] .zy-card-name { -webkit-line-clamp: unset; }
.theme-yi .zy-card-sub { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.theme-yi .zy-card[open] .zy-card-sub { display: block; -webkit-line-clamp: unset; overflow: visible; }
.theme-yi .zy-grid.has-fold.has-open { align-items: start; }
@media (min-width: 640px) { .theme-yi .zy-grid.is-even { grid-auto-rows: 1fr; } }
.theme-yi .zy-card.is-hit { box-shadow: 0 0 0 3px #c04a1e; }
.theme-yi .zy-kv .is-remind dd { background: #e9dcc8; }
.theme-yi .zy-kv .is-quote dd { color: #7a3512; font-size: 16px; line-height: 1.85; }
.theme-yi .zy-detail h3, .theme-yi .zy-oneline { color: #7a3512; }
.theme-yi .ls-plain { margin: 0; font-size: 14.5px; line-height: 1.9; color: var(--zy-ink-2); }
.theme-yi .ls-links a { margin-right: 1em; }

/* ---------- 表格 ---------- */
.ls-tablewrap { overflow-x: auto; padding: 4px 8px; }
.ls-table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.8; color: var(--zy-ink-2); }
.ls-table th { text-align: left; font-weight: 400; font-size: 12px; letter-spacing: 0.2em; color: var(--zy-gold-d); padding: 10px 12px; border-bottom: 1px solid var(--zy-line); white-space: nowrap; }
.ls-table td { padding: 9px 12px; border-bottom: 1px dashed var(--zy-line); vertical-align: top; }
.ls-table td.is-name { font-family: var(--display); font-size: 19px; line-height: 1.5; color: #7a3512; white-space: nowrap; }
.ls-table.is-narrow td.is-name, .ls-table.is-narrow th:first-child { width: 1%; padding-right: 28px; }
.ls-table tr:last-child td { border-bottom: 0; }
.ls-table tr.is-hit td { background: #e9dcc8; }
.ls-check {
  display: inline-block; margin-left: 0.4em; padding: 0 6px; font-style: normal; font-size: 11.5px; line-height: 18px;
  letter-spacing: 0.1em; color: #8a2f14; border: 1px solid #c04a1e; border-radius: 2px; vertical-align: 1px; white-space: nowrap;
}

/* ---------- 平板与手机 ---------- */
@media (max-width: 899px) {
}
@media (max-width: 639px) {
  .ls-tablewrap { padding: 2px 4px; }
  .ls-table thead { display: none; }
  .ls-table, .ls-table tbody, .ls-table tr, .ls-table td { display: block; width: 100%; }
  .ls-table tr { padding: 8px 4px; border-bottom: 1px solid var(--zy-line); }
  .ls-table tr:last-child { border-bottom: 0; }
  .ls-table td { border: 0; padding: 2px 8px; white-space: normal; }
  .ls-table td.is-name { white-space: normal; font-size: 21px; }
  .ls-table.is-narrow td.is-name { width: 100%; padding-right: 8px; }
  .ls-table td[data-label]:not(.is-name)::before { content: attr(data-label) "　"; font-size: 12px; letter-spacing: 0.15em; color: var(--zy-gold-d); }
}

/* ---------- 入口页：四卷卷轴 ---------- */
.theme-yi .zy-shelf { grid-template-columns: repeat(4, minmax(0, 1fr)); background: rgba(0, 0, 0, 0.28); border-bottom-color: #14110f; }
.theme-yi .zy-book { color: #f3ece0; }
.theme-yi .zy-book:hover { color: #ffffff; }
.theme-yi .zy-book::before { background: rgba(240, 160, 106, 0.75); box-shadow: 0 6px 0 rgba(240, 160, 106, 0.35); }
.theme-yi .zy-book::after { content: ''; position: absolute; left: -2px; right: -2px; bottom: -6px; height: 8px; border-radius: 4px; background: #14110f; }
.theme-yi .zy-book-char { color: #f0a06a; }
.theme-yi .zy-book-line { color: #eadfcb; }
.theme-yi .zy-book-tags { color: #d6c9b1; }
.theme-yi .zy-book:nth-child(1) { background: #4b4038; }
.theme-yi .zy-book:nth-child(2) { background: #5c4636; }
.theme-yi .zy-book:nth-child(3) { background: #8a3d16; }
.theme-yi .zy-book:nth-child(4) { background: #6b5646; }
.theme-yi .zy-route-links a { color: var(--zy-green); border-color: var(--zy-green-2); }
.theme-yi .zy-route-links a:hover { background: var(--zy-green); color: var(--zy-paper); }
@media (max-width: 899px) { .theme-yi .zy-shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); } }


/* ---------- 卡片顶部的真实图片（js/zycommon.js 里的 figure） ----------
   相框固定高度；里面两层：底层同一张图放大虚化，上层完整显示，横竖图片都不会被裁掉。
   图注一行、授权/出处链接一行，放在卡片最下面。 */
.theme-yi .zy-card.has-fig > summary { padding-top: 0; }
.theme-yi .zy-card.has-fig > summary::after { top: 204px; }
.theme-yi .zy-fig { display: block; position: relative; height: 190px; margin: 0 -40px 8px -16px; overflow: hidden; border-radius: 3px 3px 0 0; background: #e3d8c4; }
.theme-yi .zy-fig-bg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(16px) saturate(0.9); transform: scale(1.15); opacity: 0.85; }
.theme-yi .zy-fig-img { position: relative; display: block; width: 100%; height: 100%; object-fit: contain; }
.theme-yi .zy-fig-cap { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.theme-yi .zy-fig-txt { font-size: 12px; line-height: 1.6; color: var(--zy-muted); }
.theme-yi .zy-fig-src { font-size: 11px; line-height: 1.5; color: var(--zy-muted); opacity: 0.9; text-decoration: underline dotted; text-underline-offset: 2px; }
.theme-yi a.zy-fig-src:hover { color: #9c4318; }
@media (max-width: 640px) {
  .theme-yi .zy-fig { height: 170px; }
  .theme-yi .zy-card.has-fig > summary::after { top: 184px; }
}


/* ---------- 游戏“演示”标签与弹窗（js/yanshi.js） ---------- */
.theme-yi .ys-tag { display: inline-block; margin: 6px 0 2px; padding: 3px 12px; font: inherit; font-size: 13px; line-height: 1.6; color: #fff6e6; background: #9c4318; border: 0; border-radius: 999px; cursor: pointer; letter-spacing: 0.08em; }
.theme-yi .ys-tag:hover { background: #7a3512; }
.theme-yi .ys-tag:focus-visible { outline: 2px solid var(--zy-gold); outline-offset: 2px; }
body.ys-lock { overflow: hidden; }
.ys-overlay { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(20, 16, 13, 0.72); }
.ys-box { width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; background: #f5efe2; color: #2b2724; border-radius: 8px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5); }
.ys-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #d8ccb4; }
.ys-title { font-size: 18px; color: #7a3512; letter-spacing: 0.1em; }
.ys-close { width: 34px; height: 34px; font-size: 24px; line-height: 1; color: #7a3512; background: transparent; border: 0; border-radius: 50%; cursor: pointer; }
.ys-close:hover { background: #e9dcc8; }
.ys-body { padding: 14px 16px 4px; }
.ys-canvas { display: block; width: 100%; height: auto; touch-action: none; border-radius: 6px; border: 1px solid #d8ccb4; background: #efe6d3; cursor: grab; }
.ys-msg { min-height: 3em; margin: 10px 0 6px; font-size: 15px; line-height: 1.7; color: #3b2a1a; }
.ys-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0; }
.ys-count { font-size: 14px; color: #6a5f54; margin-right: auto; }
.ys-note { margin: 8px 0 4px; font-size: 13px; line-height: 1.8; color: #6a5f54; }
.ys-foot { margin: 0; padding: 8px 16px 14px; font-size: 12px; line-height: 1.7; color: #8a7b62; }
.ys-btn { padding: 6px 18px; font: inherit; font-size: 15px; color: #fff6e6; background: #9c4318; border: 0; border-radius: 4px; cursor: pointer; }
.ys-btn:hover { background: #7a3512; }
.ys-btn:disabled { opacity: 0.45; cursor: default; }
.ys-btn.is-ghost { color: #7a3512; background: transparent; border: 1px solid #b58a68; }
.ys-btn.is-ghost:hover { background: #e9dcc8; }
.ys-dice { width: 48px; height: 48px; font-size: 34px; line-height: 1; color: #7a3512; background: #fff; border: 1px solid #d8ccb4; border-radius: 8px; cursor: pointer; }
.ys-board { display: grid; gap: 6px; }
.ys-cell { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 64px; padding: 6px 2px; text-align: center; background: #efe6d3; border: 1px solid #d8ccb4; border-radius: 6px; }
.ys-cell.is-up { background: #e6ecd2; border-color: #a7b57a; }
.ys-cell.is-down { background: #efd9cf; border-color: #c9917a; }
.ys-cell.is-start, .ys-cell.is-end { background: #f0dfae; border-color: #c9a655; }
.ys-cell.is-here { box-shadow: 0 0 0 2px #9c4318; }
.ys-idx { position: absolute; left: 4px; top: 2px; font-size: 10px; color: #8a7b62; }
.ys-name { font-size: 13px; line-height: 1.4; color: #3b2a1a; }
.ys-token { position: absolute; right: 4px; bottom: 4px; width: 14px; height: 14px; background: #c9302c; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); }
@media (max-width: 480px) { .ys-name { font-size: 12px; } .ys-cell { min-height: 58px; } }

/* 华容道、七巧板 */
.ys-hr-wrap { max-width: 320px; margin: 0 auto; }
.ys-hr { position: relative; width: 100%; aspect-ratio: 4 / 5; background: #d8c9a8; border: 4px solid #7a4b24; border-radius: 6px; touch-action: none; }
.ys-hr-p { position: absolute; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid #f5efe2; border-radius: 6px; color: #fff6e6; font-size: 18px; letter-spacing: 0.1em; cursor: grab; user-select: none; transition: left 0.12s, top 0.12s; }
.ys-hr-p.is-cao { background: #b5432f; font-size: 26px; }
.ys-hr-p.is-guan { background: #3f7f6a; }
.ys-hr-p.is-jiang { background: #4c6fa5; }
.ys-hr-p.is-bing { background: #a58a4c; font-size: 15px; }
.ys-hr-exit { width: 50%; margin: 4px auto 0; padding: 2px 0; text-align: center; font-size: 12px; color: #8a7b62; border: 2px dashed #b58a68; border-top: 0; border-radius: 0 0 8px 8px; }
.ys-qq { cursor: default; background: #efe6d3; }

.ys-xq, .ys-go { max-width: 420px; margin: 0 auto; cursor: default; }
