/* 六合图库（a6tk 采集）：WAP + PC 共用，白底红主色 */
.tk-page {
  --tk-red: #d14124;
  --tk-grad: linear-gradient(309deg, #d14124 24%, #f59c08 88%);
  --tk-line: #f0e6e3;
  --tk-text: #222;
  --tk-sub: #8a8a8a;
  margin: 0;
  background: #f6f6f8;
  color: var(--tk-text);
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  -webkit-tap-highlight-color: transparent;
}
.tk-page *, .tk-page *::before, .tk-page *::after { box-sizing: border-box; }
.tk-page a { color: inherit; text-decoration: none; }
.tk-page button { font-family: inherit; }

/* ---------- 顶栏（WAP） ---------- */
.tk-top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; height: 46px; padding: 0 12px;
  background: var(--tk-grad); color: #fff;
}
.tk-top h1 { flex: 1; margin: 0; text-align: center; font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-top-back, .tk-top-side { width: 56px; font-size: 14px; color: #fff; }
.tk-top-side { text-align: right; }

/* ---------- 彩种 Tab / 筛选 ---------- */
.tk-bar { background: #fff; border-bottom: 1px solid var(--tk-line); }
.tk-lots { display: flex; gap: 8px; padding: 10px 12px 6px; overflow-x: auto; scrollbar-width: none; }
.tk-lots::-webkit-scrollbar { display: none; }
.tk-lot {
  flex: 0 0 auto; padding: 7px 16px; border-radius: 18px; border: 1px solid #eadad6;
  background: #fff; color: #555; font-size: 14px; cursor: pointer;
}
.tk-lot.is-active { background: var(--tk-grad); border-color: transparent; color: #fff; font-weight: 600; }
.tk-tools { display: flex; align-items: center; gap: 8px; padding: 6px 12px 10px; }
.tk-colors { display: inline-flex; flex: 0 0 auto; border: 1px solid #eadad6; border-radius: 16px; overflow: hidden; }
.tk-color { padding: 5px 12px; border: 0; background: #fff; color: #666; font-size: 13px; cursor: pointer; }
.tk-color.is-active { background: #fdeeea; color: var(--tk-red); font-weight: 600; }
.tk-search { position: relative; flex: 1; min-width: 0; }
.tk-search input {
  width: 100%; height: 30px; padding: 0 30px 0 12px; border: 1px solid #eee; border-radius: 15px;
  background: #f6f6f8; font-size: 13px; outline: none;
}
.tk-search input:focus { border-color: #f0b7aa; background: #fff; }
.tk-search-clear {
  position: absolute; right: 6px; top: 5px; width: 20px; height: 20px; border: 0; border-radius: 50%;
  background: #ddd; color: #fff; font-size: 13px; line-height: 20px; padding: 0; cursor: pointer;
}
.tk-meta { padding: 8px 12px 0; font-size: 12px; color: var(--tk-sub); }
.tk-meta b { color: var(--tk-red); font-weight: 600; }

/* ---------- 图纸网格 ---------- */
.tk-main { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0)); }
.tk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 10px 12px; }
.tk-card {
  display: block; overflow: hidden; border-radius: 8px; background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .05); cursor: pointer;
}
.tk-card-img { position: relative; aspect-ratio: 3 / 4; background: #f1eeee; overflow: hidden; }
.tk-card-img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.tk-card-badge {
  position: absolute; left: 6px; top: 6px; padding: 1px 6px; border-radius: 3px;
  background: rgba(209, 65, 36, .92); color: #fff; font-size: 11px; line-height: 17px;
}
.tk-card-name { padding: 7px 8px 8px; font-size: 13px; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-status { padding: 14px 0 20px; text-align: center; font-size: 13px; color: var(--tk-sub); }
.tk-status button {
  margin-top: 8px; padding: 6px 18px; border: 1px solid var(--tk-red); border-radius: 16px;
  background: #fff; color: var(--tk-red); cursor: pointer;
}

/* ---------- 详情 ---------- */
.tk-paper-head { padding: 12px 12px 4px; background: #fff; }
.tk-paper-title { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.4; }
.tk-paper-sub { margin-top: 4px; font-size: 12px; color: var(--tk-sub); }
.tk-paper-sub b { color: var(--tk-red); }
.tk-periods { display: flex; gap: 8px; padding: 10px 12px; background: #fff; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--tk-line); }
.tk-periods::-webkit-scrollbar { display: none; }
.tk-period {
  flex: 0 0 auto; padding: 5px 12px; border: 1px solid #eadad6; border-radius: 14px;
  background: #fff; color: #555; font-size: 13px; cursor: pointer;
}
.tk-period.is-active { background: var(--tk-red); border-color: var(--tk-red); color: #fff; }
.tk-viewer { position: relative; padding: 10px 12px 0; }
.tk-viewer img { display: block; width: 100%; height: auto; min-height: 240px; border-radius: 6px; background: #eee; }
.tk-viewer-loading { position: absolute; left: 0; right: 0; top: 40%; text-align: center; color: var(--tk-sub); font-size: 13px; }
.tk-actions {
  position: sticky; bottom: 0; z-index: 20; display: flex; gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0)); background: #fff; border-top: 1px solid var(--tk-line);
}
.tk-btn {
  flex: 1; height: 38px; border: 1px solid #eadad6; border-radius: 19px; background: #fff;
  color: #444; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.tk-btn[disabled], .tk-btn.is-disabled { opacity: .45; pointer-events: none; }
.tk-btn-primary { border: 0; background: var(--tk-grad); color: #fff !important; font-weight: 600; }

/* ---------- PC ---------- */
.tk-pc { min-height: 100vh; }
.tk-pc .tk-wrap { width: 1200px; max-width: calc(100% - 32px); margin: 0 auto; padding: 18px 0 40px; }
.tk-pc .tk-bar { border: 1px solid var(--tk-line); border-radius: 10px; }
.tk-pc .tk-lots { padding: 14px 16px 8px; }
.tk-pc .tk-tools { padding: 6px 16px 14px; }
.tk-pc .tk-search { flex: 0 1 320px; margin-left: auto; }
.tk-pc .tk-meta { padding: 12px 2px 0; font-size: 13px; }
.tk-pc .tk-main { padding-bottom: 0; }
.tk-pc .tk-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; padding: 12px 0; }
.tk-pc .tk-card { transition: transform .15s, box-shadow .15s; }
.tk-pc .tk-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(209, 65, 36, .16); }
.tk-pc .tk-card-name { font-size: 14px; }
.tk-pc-crumb { margin-bottom: 12px; font-size: 13px; color: var(--tk-sub); }
.tk-pc-crumb a:hover { color: var(--tk-red); }
.tk-pc-paper { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.tk-pc-paper .tk-viewer { padding: 14px; background: #fff; border: 1px solid var(--tk-line); border-radius: 10px; }
.tk-pc-paper .tk-viewer img { max-width: 860px; margin: 0 auto; }
.tk-pc-side { position: sticky; top: 80px; background: #fff; border: 1px solid var(--tk-line); border-radius: 10px; overflow: hidden; }
.tk-pc-side .tk-paper-head { padding: 16px 16px 8px; }
.tk-pc-side .tk-periods { flex-wrap: wrap; max-height: 300px; overflow-y: auto; border-bottom: 0; padding: 8px 16px; }
.tk-pc-side .tk-actions { position: static; flex-wrap: wrap; padding: 12px 16px 16px; }
.tk-pc-side .tk-actions .tk-btn { flex: 1 1 40%; }
.tk-pc-side .tk-actions .tk-btn-primary { flex-basis: 100%; }
.tk-pc-hint { padding: 0 16px 14px; font-size: 12px; color: var(--tk-sub); }
