/* 今晚看什么 (/tonight/). Loaded after product.css: same paper, ink, rules and 3px corners.
   Situations lead (a strip of posters each), lists sit below as plain links, and the pick is
   one large card with nothing competing. */
.t-serif { font-family: "Songti SC", "STSong", "Noto Serif SC", serif; }
.t-head { margin: 28px 0 0; }
.t-head h1 { font-size: 36px; line-height: 1.15; text-wrap: balance; }
.t-lead { margin-top: 8px; max-width: 38em; color: var(--soft-ink); font-size: 15px; text-wrap: pretty; }
.t-hint { color: var(--muted); font-size: 13px; }
.t-empty { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--soft-ink); }
.t-empty-actions { display: flex; flex-wrap: wrap; gap: 0 22px; margin-top: 4px; }
.t-nowrap { white-space: nowrap; }

.t-pick-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 20px; }
.t-pick { min-height: 50px; padding: 0 26px; border-radius: 3px; background: var(--action); color: var(--on-action); font-size: 16px; font-weight: 700; }
.t-pick:hover { background: var(--action-hover); }
.t-link { min-height: 44px; padding: 0 2px; color: var(--action); font-size: 14px; font-weight: 600; }
.t-link:hover { color: var(--action-hover); text-decoration: underline; text-underline-offset: 3px; }
.tonight :is(button, a):focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }

.t-block { margin-top: 40px; }
.t-block-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--rule); }
.t-block-head h2 { font-size: 21px; }

/* Situations */
.t-situations { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 18px; margin-top: 18px; }
.t-situation { display: block; min-width: 0; color: inherit; text-align: left; cursor: pointer; text-decoration: none; }
.t-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; overflow: hidden; border-radius: 3px; background: var(--poster-bg); }
.t-strip img, .t-strip span { display: block; width: 100%; aspect-ratio: 270 / 397; object-fit: cover; background: var(--poster-bg); }
.t-situation:hover .t-strip img { opacity: .88; }
.t-situation-name { margin-top: 10px; font-size: 19px; font-weight: 700; line-height: 1.3; }
.t-situation-sub { margin-top: 2px; color: var(--muted); font-size: 13px; }

.t-other { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; margin-top: 36px; padding-top: 14px; border-top: 1px solid var(--line); }
.t-other button { min-height: 44px; color: var(--soft-ink); font-size: 14px; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.t-other button:hover { color: var(--action); text-decoration-color: currentColor; }
.t-other > span[aria-hidden] { color: var(--muted); }
.t-asof { margin-left: auto; }

/* Theme page */
.t-back { min-height: 44px; color: var(--action); font-size: 14px; }
.t-refine { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.t-chip { min-height: 38px; padding: 0 13px; border: 1px solid var(--line); border-radius: 3px; background: var(--panel); color: var(--soft-ink); font-size: 14px; white-space: nowrap; }
.t-chip:hover { border-color: var(--field); color: var(--ink); }
.t-chip[aria-pressed="true"] { border-color: var(--action); background: var(--action); color: var(--on-action); font-weight: 600; }
.t-tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; margin-top: 36px; padding-bottom: 10px; border-bottom: 1px solid var(--rule); }
.t-count { font-size: 21px; }
.t-count:focus { outline: none; }

.t-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 28px 18px; margin: 22px 0 8px; padding: 0; list-style: none; }
.t-card { position: relative; display: flex; flex-direction: column; min-width: 0; }
/* The whole card is the link to the search; 划掉 sits on its last line, like 收藏 on the homepage. */
.t-card-link { display: flex; flex: 1; flex-direction: column; color: inherit; text-decoration: none; border-radius: 3px; }
.t-card-link > span { display: block; }
.t-card-link:hover .t-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.t-card-link:hover img { opacity: .9; }
.t-card-link > .t-card-go { display: flex; align-items: center; min-height: 44px; margin-top: auto; padding-top: 6px; border-bottom: 1px solid var(--line); color: var(--action); font-size: 14px; font-weight: 700; }
/* 划掉 sits on the poster's corner, away from 找来源 and from the neighbouring card. The button is a
   44px target; the visible label inside it stays small. */
.t-x { position: absolute; top: 0; right: 0; display: flex; align-items: flex-start; justify-content: flex-end; width: 64px; height: 48px; padding: 6px; }
.t-x span { padding: 3px 8px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 78%, transparent); color: var(--bg); font-size: 12px; font-weight: 600; line-height: 1.4; }
.t-x:hover span, .t-x:focus-visible span { background: var(--ink); }
.t-poster { position: relative; overflow: hidden; aspect-ratio: 270 / 397; border-radius: 3px; background: var(--poster-bg); }
.t-poster img { display: block; width: 100%; height: 100%; object-fit: cover; }
.t-rank { position: absolute; top: 0; left: 0; padding: 2px 8px; border-bottom-right-radius: 3px; background: var(--rule); color: var(--bg); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.t-title { margin-top: 10px; color: var(--ink); font-size: 16px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.t-meta { margin-top: 3px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.t-trust { margin-top: 5px; color: var(--soft-ink); font-size: 13px; line-height: 1.45; }
.t-why { margin-top: 6px; color: var(--ink); font-size: 14px; line-height: 1.55; }
.t-go { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 12px; border-radius: 3px; background: var(--action); color: var(--on-action); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.t-go:hover { background: var(--action-hover); }
.t-toast { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 20; display: flex; align-items: center; gap: 18px; max-width: calc(100vw - 32px); padding: 4px 6px 4px 18px; border-radius: 3px; background: var(--ink); color: var(--bg); font-size: 14px; transform: translateX(-50%); box-shadow: 0 6px 20px rgba(0, 0, 0, .18); }
.t-toast[hidden] { display: none; }
.t-toast span { overflow-wrap: anywhere; }
.t-toast-undo { flex-shrink: 0; min-height: 44px; padding: 0 12px; color: var(--bg); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.t-more { display: block; min-height: 44px; margin: 12px auto 0; padding: 0 18px; border: 1px solid var(--line); border-radius: 3px; background: var(--panel); color: var(--ink); font-size: 14px; }

/* The pick */
.t-spot { display: grid; grid-template-columns: 200px minmax(0, 1fr); grid-template-areas: "poster text" "poster actions"; grid-template-rows: auto 1fr; column-gap: 24px; max-width: 760px; margin-top: 20px; padding: 20px; border: 1px solid var(--rule); border-radius: 3px; background: var(--panel); }
.t-spot > .t-poster { grid-area: poster; }
.t-spot-text { grid-area: text; min-width: 0; }
.t-spot > .t-spot-actions { grid-area: actions; align-self: start; }
.t-spot > div:only-child { grid-column: 1 / -1; }
.t-spot[hidden] { display: none; }
.t-spot h2 { font-size: 34px; line-height: 1.15; text-wrap: balance; }
.t-spot .t-meta { margin-top: 8px; font-size: 14px; }
.t-spot .t-trust { font-size: 14px; }
.t-spot .t-why { max-width: 32em; font-size: 16px; }
.t-spot-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 18px; }
.t-spot-actions .t-go { min-height: 46px; padding: 0 24px; font-size: 15px; }

@media (max-width: 860px) { .t-situations { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .t-head h1 { font-size: 30px; }
  .t-pick { width: 100%; }
  .t-situations { gap: 20px 12px; }
  .t-situation-name { font-size: 16px; }
  .t-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
  .t-chip { min-height: 44px; }
  .t-asof { margin-left: 0; flex-basis: 100%; }
  .t-refine { flex-wrap: nowrap; overflow-x: auto; margin-right: -16px; padding-right: 16px; scrollbar-width: none; }
  .t-refine::-webkit-scrollbar { display: none; }
  .t-tools { margin-top: 28px; }
  .t-count { font-size: 19px; }
  .t-spot { grid-template-columns: 96px minmax(0, 1fr); grid-template-areas: "poster text" "actions actions"; gap: 14px; padding: 14px; }
  .t-spot h2 { font-size: 24px; }
  .t-spot .t-why { font-size: 15px; }
  .t-spot > .t-spot-actions { margin-top: 0; }
  .t-spot-actions .t-go { flex: 1 1 100%; }
}
