/* jiami theme fixes — 2026-10-31 (mobile overflow + WCAG AA contrast). Loaded after style.css; remove this file + its enqueue in functions.php to roll back. */

/* A02: grid items default to min-width:auto, so a wide table/nowrap chip stretched the whole column to 1022px on a 390px phone. */
.layout { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr) var(--toc-w); }
}
.layout.no-toc { grid-template-columns: minmax(0, 1fr); }
.main-col { min-width: 0; }
.chip-muted { white-space: normal; }
.table-wrap { max-width: 100%; overflow-x: auto; }

/* H01: TOC title is no longer a heading element (was an h2 before the page h1, twice per page). */
.toc .toc-title {
  display: block;
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
}

/* A01: contrast. Opacity on muted text pushed it under 4.5:1; disabled CTA was dark text on 45%-opacity orange (2.5:1). */
.placeholder { opacity: 1; }
.meta-row .label { opacity: 1; }
.footer-copy { opacity: 1; }
.btn.is-disabled {
  opacity: 1;
  background: var(--bg-card);
  color: #aebbc8;
  border: 1px dashed #6b7a8a;
  cursor: not-allowed;
}

/* H01: casino page uses h3 (not h4) for 优点/缺点 so the outline is h2 > h3; keep the same look as the old h4 rule. */
.pros h3 { margin: 0 0 0.5rem; color: var(--ok); font-size: 0.85rem; }
.cons h3 { margin: 0 0 0.5rem; color: var(--danger); font-size: 0.85rem; }

/* ===== 2026-11-01 首页「本期推荐亮点（Top 3）」卡片重做 (.top3-*) =====
   Layout: logo tile -> name -> stars -> 3-line blurb -> 阅读更多 -> 访问网站 -> 阅读我们的 X 评测.
   Old .highlight-* rules in style.css/mobile.css are no longer used by the homepage. Rollback: restore front-page.php + this file from backup. */
.screen-reader-text { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.top3-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.top3-card {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px;
  padding: 1.25rem; box-shadow: var(--shadow);
}
.t3-logo {
  display: flex; align-items: center; justify-content: center; box-sizing: border-box;
  width: 180px; max-width: 100%; height: 50px; margin: 0 auto; padding: 6px 12px;
  background: #fff; border-radius: 10px; overflow: hidden; text-decoration: none;
}
.t3-logo-img { display: block; width: 100%; height: 100%; max-width: 100%; object-fit: contain; border: 0; border-radius: 0; background: transparent; }
.t3-logo-text { display: block; max-width: 100%; color: #111827; font-weight: 800; font-size: 1.05rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t3-name { margin: .6rem 0 0; font-size: 1.15rem; line-height: 1.3; font-weight: 800; text-align: center; overflow-wrap: anywhere; }
.t3-name a { color: var(--text); display: inline-block; padding: .2rem 0; }
.t3-name a:hover { color: var(--accent); text-decoration: none; }
.t3-rating { margin: .35rem 0 0; display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 1.6rem; line-height: 1; }
.t3-stars { position: relative; display: inline-block; font-size: 1.2rem; letter-spacing: 1px; color: #5b4630; white-space: nowrap; }
.t3-stars::before { content: "★★★★★"; }
.t3-stars-fill { position: absolute; top: 0; bottom: 0; left: 0; overflow: hidden; color: var(--accent); white-space: nowrap; }
.t3-stars-fill::before { content: "★★★★★"; }
.t3-score { color: var(--text-muted); font-size: .95rem; }
.t3-rating-none { color: var(--text-muted); font-size: .875rem; }
.t3-desc {
  margin: .9rem 0 0; color: var(--text-muted); font-size: .9375rem; line-height: 1.6; text-align: left;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; overflow-wrap: anywhere;
}
.t3-desc-empty, .t3-more-empty { display: block; }
.t3-more { display: inline-flex; align-items: center; align-self: flex-start; justify-self: start; min-height: 32px; margin-top: .25rem; color: var(--accent); font-weight: 800; font-size: .95rem; }
.t3-more:hover { color: var(--accent-dim); text-decoration: underline; }
.t3-btn {
  display: flex; align-items: center; justify-content: center; box-sizing: border-box; width: 100%; min-height: 44px;
  padding: .5rem .75rem; border-radius: 999px; border: 1px solid transparent; font-size: .9rem; font-weight: 600; line-height: 1.35; text-align: center; text-decoration: none;
  transition: background .15s, border-color .15s;
}
.t3-btn-primary { margin-top: .9rem; background: #3f66e0; color: #fff; }
.t3-btn-primary:hover { background: #3558c8; color: #fff; text-decoration: none; }
.t3-btn-ghost { margin-top: .55rem; background: #161b22; border-color: #3a4554; color: var(--text); }
.t3-btn-ghost:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.t3-btn:focus-visible, .t3-more:focus-visible, .t3-name a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* no subgrid: equal-height cards, buttons stay under the text (spare room at the bottom) */
.t3-desc { min-height: 4.8em; }
.t3-btn-ghost { margin-bottom: 0; }

@media (min-width: 760px) {
  .top3-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .top3-card { padding: 1.1rem; }
}
/* subgrid: logo/name/stars/text/buttons line up across the 3 cards */
@supports (grid-template-rows: subgrid) {
  @media (min-width: 760px) {
    .top3-grid { row-gap: 0; }
    .top3-card { display: grid; grid-row: span 7; grid-template-rows: subgrid; row-gap: 0; align-content: start; }
    .t3-desc { min-height: 0; }
  }
}
@media (max-width: 759.98px) {
  .top3-card { padding: 1.1rem; }
  .t3-name a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .25rem; }
  .t3-desc { font-size: 1rem; min-height: 0; }
  .t3-more { min-height: 44px; }
  .t3-btn { min-height: 48px; font-size: 1rem; }
  .t3-logo { width: 200px; height: 56px; }
}

/* 2026-11-01: casino logo tiles (.logo / .logo-lg) show the WHOLE logo.
   Markup now requests the uncropped "medium" (300x150) image instead of the 160x160 hard-crop; contain + white tile + padding. */
img.logo.wp-post-image { object-fit: contain; object-position: center; background: #fff; padding: 3px; box-sizing: border-box; }
img.logo-lg.wp-post-image { padding: 4px; }
