/* Reset radar panels (radar-ui): 重置次数 monthly counts, the English play card and the
   frame around the Chinese theatre (tibo-reset-game-20260926.js keeps its own artwork
   from tibo-reset-game-20260925.css, which is shared with /tibo-game/).
   site_patch.tibo_radar_month_chart_html draws the month columns from
   data/tibo-reset-monthly.json; the accessible table stays in the markup. */
.desktop-tibo-radar {
  --tc-direct: var(--accent); --tc-card: var(--ok); --tc-hot: var(--warn);
  --tc-well: var(--surface-2); --tc-mono: var(--font-mono);
  --tc-go: linear-gradient(135deg, #ffcf6b, #ff8a5c);
}
.desktop-tibo-radar :is(.trm, .trp, #tibo-reset-game) { border: 1px solid var(--tr-line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1); }

/* 重置次数 */
.desktop-tibo-radar .trm { display: grid; gap: var(--s-4); padding: var(--s-4) var(--s-5); container: trm / inline-size; }
.desktop-tibo-radar .trm .tibo-radar-monthly-heading { flex-wrap: wrap; align-items: flex-end; gap: var(--s-2) var(--s-3); }
.desktop-tibo-radar .trm .tibo-radar-monthly-heading > div { flex: 1 1 240px; }
.desktop-tibo-radar .trm .tibo-radar-monthly-heading h3 { margin-top: var(--s-1); font-size: var(--fs-xl); font-weight: var(--w-bold); }
.desktop-tibo-radar .trm .tibo-radar-monthly-updated { padding: 3px 10px; border: 1px solid var(--tr-line-strong); border-radius: var(--r-pill); color: var(--tr-soft); font: var(--w-medium) var(--fs-2xs)/1.3 var(--tc-mono); font-variant-numeric: tabular-nums; }
.trm-now-tiles { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-3); }
.trm-now-label { display: grid; align-content: center; justify-items: start; gap: 6px; margin: 0; padding: 0 var(--s-2) 0 2px; color: var(--tr-ink); font: var(--w-bold) 20px/1 var(--font-sans); white-space: nowrap; }
.trm-now-label em { padding: 2px 8px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent); font-size: var(--fs-2xs); font-style: normal; font-weight: var(--w-semibold); line-height: 1.4; }
.trm-tile { --k: var(--tc-direct); position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 5px; margin: 0; padding: var(--s-3) var(--s-4); overflow: hidden; border: 1px solid var(--tr-line); border-radius: var(--r-md); background: var(--surface-2); }
.trm-tile::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--k); }
.trm-tile-card { --k: var(--tc-card); }
.trm-tile span { flex: 1 0 100%; display: flex; align-items: center; gap: 6px; color: var(--tr-muted); font-size: var(--fs-xs); font-weight: var(--w-semibold); }
.trm-tile strong { color: var(--tr-ink); font: var(--w-bold) 30px/1.05 var(--font-sans); font-variant-numeric: tabular-nums; }
.trm-tile small { color: var(--tr-soft); font-size: var(--fs-xs); }
.trm-chart { display: grid; gap: var(--s-3); margin: 0; padding: var(--s-3) var(--s-3) var(--s-2); border: 1px solid var(--tr-line); border-radius: var(--r-md); background: var(--surface-sunken); }
.trm-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--s-4); color: var(--tr-muted); font-size: var(--fs-xs); font-weight: var(--w-semibold); }
.trm-key { display: inline-flex; align-items: center; gap: 6px; }
.trm-key::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--tc-direct); }
.trm-key-card::before { background: var(--tc-card); }
.trm-caption { margin-left: auto; color: var(--tr-soft); font-size: var(--fs-2xs); font-weight: var(--w-medium); }
.trm-canvas { --plot: 168px; --foot: 38px; position: relative; height: calc(var(--plot) + var(--foot)); }
.trm-plot { position: absolute; inset: 0 0 auto; width: 100%; height: var(--plot); overflow: visible; }
.trm-grid { stroke: var(--chart-grid); stroke-width: 1; stroke-dasharray: 3 5; vector-effect: non-scaling-stroke; }
.trm-base { stroke: var(--tr-line-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }
.trm-now { fill: var(--accent-soft); stroke: var(--accent-line); stroke-width: 1; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.trm-bar { opacity: .6; }
.trm-bar-direct { fill: var(--tc-direct); }
.trm-bar-card { fill: var(--tc-card); }
.trm-now ~ .trm-bar { opacity: 1; }
.trm-zero { stroke-width: 3; vector-effect: non-scaling-stroke; }
.trm-zero-direct { stroke: var(--tc-direct); }
.trm-zero-card { stroke: var(--tc-card); }
.trm-cols { position: absolute; inset: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.trm-col { position: relative; min-width: 0; }
.trm-val { position: absolute; bottom: calc(var(--foot) + var(--plot) * var(--v) / 100 + 4px); transform: translateX(-50%); font: var(--w-bold) 12px/1 var(--font-sans); font-variant-numeric: tabular-nums; white-space: nowrap; }
.trm-val-direct { --v: var(--d); left: 33%; color: var(--tc-direct); }
.trm-val-card { --v: var(--c); left: 67%; color: var(--tc-card); }
.trm-val.is-zero { color: var(--tr-soft); }
.trm-month { position: absolute; inset: auto 0 0; height: var(--foot); display: grid; justify-items: center; align-content: start; gap: 3px; padding-top: var(--s-2); color: var(--tr-muted); font: var(--w-medium) 11px/1.1 var(--font-sans); white-space: nowrap; }
.trm-month em { padding: 1px 6px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent); font-size: 9.5px; font-style: normal; font-weight: var(--w-semibold); line-height: 1.3; }
.trm-col.is-current .trm-month { color: var(--tr-ink); font-weight: var(--w-semibold); }
/* The chart pictures the table; the table stays for assistive tech. */
.desktop-tibo-radar .trm .tibo-radar-monthly-table { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; clip-path: inset(50%); border: 0; white-space: nowrap; }
.desktop-tibo-radar .trm .tibo-radar-monthly-summary { margin: 0; color: var(--tr-muted); font-size: var(--fs-xs); }
.desktop-tibo-radar .trm .tibo-radar-monthly-method { margin: 0; padding-top: var(--s-2); border-top: 1px solid var(--tr-line); }
.desktop-tibo-radar .trm .tibo-radar-monthly-method summary { display: flex; align-items: center; gap: var(--s-2); width: fit-content; min-height: 36px; color: var(--accent); font-size: var(--fs-sm); font-weight: var(--w-semibold); }
.desktop-tibo-radar .trm .tibo-radar-monthly-method summary::before { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.6px 1.6px 0; transform: rotate(-45deg); transition: transform var(--dur-2) var(--ease); }
.desktop-tibo-radar .trm .tibo-radar-monthly-method[open] summary::before { transform: rotate(45deg); }
.desktop-tibo-radar .trm .tibo-radar-monthly-note { margin: var(--s-1) 0 var(--s-2); color: var(--tr-muted); font-size: var(--fs-xs); line-height: 1.75; }
@container trm (min-width: 620px) { .trm-canvas { --plot: 188px; } }
@container trm (max-width: 430px) {
  .trm-now-tiles { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .trm-now-label { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--s-2); padding: 0; font-size: 17px; }
  .trm-tile strong { font-size: 26px; }
  .trm-caption { flex-basis: 100%; margin-left: 0; }
  .trm-canvas { --plot: 136px; --foot: 36px; }
  .trm-val { font-size: 11px; }
  .trm-month { font-size: 10.5px; }
  .desktop-tibo-radar .trm .tibo-radar-monthly-method summary { min-height: 44px; }
}
@container trm (max-width: 280px) { .trm-val, .trm-month { font-size: 10px; } .trm-month em { padding: 1px 4px; font-size: 9px; } }

/* English play card (a toy; it never reads or changes real usage). */
.tibo-radar-side-stack { display: grid; gap: var(--s-4); min-width: 0; }
.desktop-tibo-radar .trp { display: grid; gap: var(--s-3); padding: var(--s-4); container: trp / inline-size; }
.trp .tibo-reset-play-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); }
.trp-title { display: grid; justify-items: start; gap: 6px; min-width: 0; }
.trp-fun { padding: 2px 8px; border: 1px dashed color-mix(in srgb, var(--tc-hot) 55%, transparent); border-radius: var(--r-pill); color: var(--tc-hot); font-size: var(--fs-2xs); font-weight: var(--w-semibold); line-height: 1.4; }
.desktop-tibo-radar .trp .tibo-reset-play-clock { display: grid; justify-items: end; gap: 1px; padding: 6px 10px; border: 1px solid var(--tr-line); border-radius: var(--r-md); background: var(--tc-well); color: var(--tr-soft); font-size: var(--fs-2xs); }
.desktop-tibo-radar .trp .tibo-reset-play-clock strong { color: var(--tr-ink); font: var(--w-bold) 20px/1.1 var(--tc-mono); font-variant-numeric: tabular-nums; }
.desktop-tibo-radar .trp .tibo-reset-play-stage { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--s-4); padding: var(--s-3) var(--s-4); border: 1px solid var(--tr-line); border-radius: var(--r-md); background: radial-gradient(circle at 70px 50%, var(--accent-soft), transparent 120px), var(--tc-well); }
.trp-orbit { position: relative; flex: none; width: 116px; height: 116px; }
.trp-ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.trp-ring-track { fill: none; stroke: var(--tr-line-strong); stroke-width: 1; stroke-dasharray: 1.5 3.5; }
.trp-cell { fill: none; stroke: var(--surface-3); stroke-width: 6; stroke-linecap: round; transition: stroke .25s; }
.trp-cell[data-filled="true"] { stroke: var(--tc-direct); }
.trp:has(.trp-cell:nth-of-type(3)[data-filled="true"]) .trp-cell { stroke: var(--tc-hot); }
.desktop-tibo-radar .trp .tibo-reset-play-avatar { position: absolute; top: 15px; left: 15px; display: block; width: 86px; height: 86px; padding: 0; overflow: visible; border: 2px solid var(--tr-line-strong); border-radius: 50%; background: var(--tc-well); cursor: pointer; }
.desktop-tibo-radar .trp .tibo-reset-play-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.desktop-tibo-radar .trp .tibo-reset-play-expression { position: absolute; right: -10px; bottom: 2px; display: grid; place-items: center; width: 28px; height: 28px; border: 2px solid var(--surface); border-radius: 50%; background: var(--tc-direct); color: var(--text-inverse); font-size: 14px; }
.desktop-tibo-radar .trp .tibo-reset-play-side { display: grid; gap: var(--s-2); min-width: 0; }
.desktop-tibo-radar .trp .tibo-reset-play-hint { color: var(--tr-muted); font-size: var(--fs-xs); }
.desktop-tibo-radar .trp .tibo-reset-play-avatars { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; width: 100%; max-width: 220px; padding: 3px; border: 1px solid var(--tr-line); border-radius: var(--r-md); background: var(--surface); }
.desktop-tibo-radar .trp .tibo-reset-play-avatars button { min-height: 40px; padding: 4px var(--s-2); border: 0; border-radius: 7px; background: transparent; color: var(--tr-muted); font-size: var(--fs-xs); font-weight: var(--w-semibold); }
.desktop-tibo-radar .trp .tibo-reset-play-avatars button[aria-pressed="true"] { background: var(--surface-3); color: var(--tr-ink); box-shadow: inset 0 0 0 1px var(--tr-line-strong); }
.desktop-tibo-radar .trp .tibo-reset-play-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.desktop-tibo-radar .trp .tibo-reset-play-actions button { min-height: 44px; padding: 6px var(--s-4); border: 1px solid var(--accent-line); border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent); font-size: var(--fs-sm); font-weight: var(--w-semibold); }
.desktop-tibo-radar .trp .tibo-reset-play-actions [data-tibo-play-reset]:not(:disabled) { border-color: transparent; background: var(--tc-go); color: #1b0f04; }
.desktop-tibo-radar .trp .tibo-reset-play-actions button:disabled { border: 1px dashed var(--tr-line-strong); background: transparent; color: var(--tr-soft); cursor: default; }
.desktop-tibo-radar .trp .tibo-reset-play-status { margin: 0; color: var(--tc-direct); font: var(--w-semibold) var(--fs-xs)/1.45 var(--font-sans); }
.desktop-tibo-radar .trp .tibo-reset-play-foot { display: flex; flex-wrap: wrap; gap: 6px var(--s-3); padding-top: var(--s-2); border-top: 1px solid var(--tr-line); color: var(--tr-soft); font-size: var(--fs-2xs); }
.trp.is-resetting .trp-ring { animation: trp-spin .65s ease-out; }
@keyframes trp-spin { to { transform: rotate(360deg); } }
.trp[data-play-visible="false"] .trp-ring { animation: none; }
@container trp (max-width: 300px) {
  .desktop-tibo-radar .trp .tibo-reset-play-head { flex-direction: column; align-items: stretch; }
  .desktop-tibo-radar .trp .tibo-reset-play-clock { justify-items: start; }
  .desktop-tibo-radar .trp .tibo-reset-play-stage { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .desktop-tibo-radar .trp .tibo-reset-play-side { justify-items: center; }
}

/* Chinese theatre: only the frame and chrome follow the page; the stage art is the game's. */
.desktop-tibo-radar #tibo-reset-game { gap: var(--s-3); padding: var(--s-4); container: tg / inline-size; }
#tibo-reset-game .tg-loading { min-height: 0; aspect-ratio: 640 / 400; border-radius: var(--r-md); }
html:not(.tr-js) #tibo-reset-game .tg-loading { display: none; }
#tibo-reset-game noscript p { margin: 0; padding: var(--s-3); border: 1px dashed var(--tr-line-strong); border-radius: var(--r-md); color: var(--tr-muted); font-size: var(--fs-sm); line-height: 1.6; }
#tibo-reset-game .tg-head { align-items: center; padding-bottom: var(--s-3); border-bottom: 1px solid var(--tr-line); }
#tibo-reset-game .tg-title h3 { margin-top: 3px; color: var(--tr-ink); font-size: var(--fs-xl); font-weight: var(--w-bold); }
#tibo-reset-game .tg-chip { min-height: 36px; padding: 5px var(--s-3); border-color: var(--tr-line-strong); border-radius: var(--r-md); background: var(--surface-3); color: var(--tr-muted); }
#tibo-reset-game .tg-chip b { font-family: var(--font-sans); font-variant-numeric: tabular-nums; }
#tibo-reset-game :is(.tg-collection, .tg-featured-bar) { border-color: var(--tr-line); border-radius: var(--r-md); background: var(--tc-well); }
#tibo-reset-game .tg-stage { border-radius: var(--r-md); box-shadow: 0 0 0 1px var(--tr-line); }
#tibo-reset-game .tg-disclaimer { display: flex; align-items: flex-start; gap: var(--s-2); margin: 0; padding: var(--s-2) var(--s-3); border: 1px dashed color-mix(in srgb, var(--tc-hot) 50%, transparent); border-radius: var(--r-md); background: var(--warn-soft); color: var(--tr-muted); font-size: var(--fs-xs); line-height: 1.55; }
#tibo-reset-game .tg-disclaimer::before { content: "虚构"; flex: none; margin-top: 1px; padding: 0 7px; border-radius: 6px; background: var(--tc-hot); color: #1b0c05; font-size: var(--fs-2xs); font-weight: var(--w-bold); line-height: 1.7; }
:lang(en) #tibo-reset-game .tg-disclaimer::before { content: "Fiction"; }
#tibo-reset-game:has(.tg-stage[data-guest]) .tg-disclaimer { display: none; }
#tibo-reset-game :is(.tg-quote, .tg-forecast) { gap: var(--s-2); padding: var(--s-3) var(--s-4); border-color: var(--tr-line); border-radius: var(--r-md); background: var(--tc-well); }
#tibo-reset-game .tg-quote-zh { padding: 2px 0; color: var(--tr-ink); font-size: var(--fs-md); line-height: 1.6; }
#tibo-reset-game .tg-fc-head strong { color: var(--tr-ink); font-size: var(--fs-md); }
#tibo-reset-game .tg-fc-actions button { min-height: 44px; border-color: var(--tr-line-strong); border-radius: var(--r-md); background: var(--surface-3); font-size: var(--fs-md); }
#tibo-reset-game .tg-fc-actions button:hover:not(:disabled) { border-color: var(--accent-line); }
#tibo-reset-game .tg-fc-actions button[data-choice="yes"][aria-pressed="true"] { border-color: color-mix(in srgb, var(--ok) 55%, transparent); background: var(--ok-soft); color: var(--ok); }
#tibo-reset-game .tg-fc-actions button[data-choice="no"][aria-pressed="true"] { border-color: var(--tr-line-strong); background: var(--surface-2); color: var(--tr-ink); }
#tibo-reset-game .tg-fc-num { font-family: var(--font-sans); font-variant-numeric: tabular-nums; font-size: var(--fs-xs); }
#tibo-reset-game .tg-fc-summary { color: var(--tr-soft); font-size: var(--fs-xs); font-weight: var(--w-semibold); }
#tibo-reset-game :is(.tg-quote-more, .tg-fc-rules) summary { display: flex; align-items: center; gap: var(--s-2); min-height: 32px; }
#tibo-reset-game :is(.tg-quote-more, .tg-fc-rules) summary::before { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.6px 1.6px 0; transform: rotate(-45deg); transition: transform var(--dur-2) var(--ease); }
#tibo-reset-game :is(.tg-quote-more, .tg-fc-rules)[open] summary::before { transform: rotate(45deg); }
#tibo-reset-game .tg-link-button { display: inline-flex; align-items: center; min-height: 32px; padding: 3px var(--s-3); border: 1px solid var(--accent-line); border-radius: var(--r-pill); }
#tibo-reset-game .tg-link-button:hover { background: var(--accent-soft); text-decoration: none; }
#tibo-reset-game .tg-foot { padding-top: var(--s-3); border-top: 1px solid var(--tr-line); color: var(--tr-soft); font-size: var(--fs-xs); }
#tibo-reset-game .tg-foot > span { display: inline-flex; align-items: center; gap: 7px; }
#tibo-reset-game .tg-foot > span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.tg-dialog .tg-dialog-close { width: 44px; height: 44px; }
@container tg (min-width: 680px) { #tibo-reset-game .tg-lower { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } }
@container tg (max-width: 430px) {
  #tibo-reset-game .tg-head { flex-direction: column; align-items: stretch; }
  #tibo-reset-game .tg-tools { display: grid; grid-template-columns: 1fr 1fr; justify-content: stretch; }
  #tibo-reset-game .tg-chip { justify-content: center; min-height: 44px; }
  #tibo-reset-game :is(.tg-quote, .tg-forecast) { padding: var(--s-3); }
  #tibo-reset-game .tg-link-button, #tibo-reset-game :is(.tg-quote-more, .tg-fc-rules) summary { min-height: 44px; }
  #tibo-reset-game .tg-foot .tg-link-button { flex: 1 1 100%; justify-content: center; }
}
@media (pointer: coarse) {
  #tibo-reset-game .tg-chip, #tibo-reset-game .tg-link-button { min-height: 44px; }
  .desktop-tibo-radar .trm .tibo-radar-monthly-method summary, #tibo-reset-game :is(.tg-quote-more, .tg-fc-rules) summary { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .trp .trp-ring, .trp .trp-cell { animation: none !important; transition: none !important; } }
