/* The Thumbnails tab (js/pages/thumbnails.js; docs/thumbnails.md §2): the bar, the homepage set
   with its numbers big, its locks and Tested or Untested, impressions and QPTR by hour, the details
   page, the icon, proposals with Accept and Decline, the bank, icon requests and the declined, and
   the Thumbnail agent's chat beside the page from 1360 px (a sheet below that). Only tokens.css's custom
   properties, so both themes come for free; series colours are stats.css's `.sc-N`. Pictures sit
   in the shared `.media` frame (its 1px outline); nested corners are concentric (card 10 px, its
   picture 6 px inside a 4 px inset). */

/* ---------------------------------------------------------------- frame: the page and the chat beside it */
.th-layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}
.th-layout.has-rail {
  grid-template-columns: minmax(0, 1fr) var(--rail-w, 380px);
}
.th-page {
  min-width: 0;
}
/* the chart's series colours (stats.css's, which it scopes to its own pages): a card's key matches its line */
.th-page {
  --stats-series-1: oklch(0.6 0.15 var(--hue-blue, 248));
  --stats-series-2: oklch(0.6 0.15 var(--hue-orange, 52));
  --stats-series-3: oklch(0.6 0.15 var(--hue-teal, 192));
  --stats-series-4: oklch(0.6 0.15 var(--hue-violet, 308));
  --stats-series-5: oklch(0.6 0.15 var(--hue-yellow, 102));
  --stats-series-other: var(--ink-4);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .th-page {
    --stats-series-1: oklch(0.64 0.15 var(--hue-blue, 248));
    --stats-series-2: oklch(0.64 0.15 var(--hue-orange, 52));
    --stats-series-3: oklch(0.64 0.15 var(--hue-teal, 192));
    --stats-series-4: oklch(0.64 0.15 var(--hue-violet, 308));
    --stats-series-5: oklch(0.64 0.15 var(--hue-yellow, 102));
  }
}
:root[data-theme='dark'] .th-page {
  --stats-series-1: oklch(0.64 0.15 var(--hue-blue, 248));
  --stats-series-2: oklch(0.64 0.15 var(--hue-orange, 52));
  --stats-series-3: oklch(0.64 0.15 var(--hue-teal, 192));
  --stats-series-4: oklch(0.64 0.15 var(--hue-violet, 308));
  --stats-series-5: oklch(0.64 0.15 var(--hue-yellow, 102));
}
.th-rail {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.th-layout.has-rail > .th-rail {
  position: sticky;
  top: 113px; /* under the game header, as the chat page's panel */
  align-self: start;
  height: calc(100dvh - 113px);
  box-shadow: inset 1px 0 0 var(--line);
  background: var(--bg);
}
.th-chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 12px 10px 16px;
  box-shadow: inset 0 -1px 0 var(--line);
}
.th-chat-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-15);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.th-chat-title .i {
  width: 17px;
  height: 17px;
  color: var(--ink-3);
}
.th-chat-close {
  margin-left: auto;
}
/* the chat scrolls inside the rail; the composer stays at its foot */
.th-rail .chat-col.is-contained {
  flex: 1;
  min-height: 0;
}
.chat-col.is-contained {
  min-height: 0;
}
.chat-col.is-contained .chat-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 14px 16px;
  scrollbar-width: thin;
}
.chat-col.is-contained .composer-dock {
  position: relative;
  padding: 0 12px 12px;
  background: none;
}
.chat-col.is-contained .chat-empty {
  padding-top: 12px;
}
/* below 1360 px the chat is a sheet: the whole height on a tablet, most of it on a phone */
.sheet.th-chat-sheet {
  width: min(440px, 100%);
}
.sheet.th-chat-sheet .th-rail {
  flex: 1;
  min-height: 0;
}
@media (max-width: 720px) {
  .sheet.th-chat-sheet {
    height: 88dvh;
  }
  .sheet.th-chat-sheet .composer-dock {
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }
}
/* the drawer's handle: a pill at the bottom right while the chat isn't beside the page */
.th-fab {
  position: fixed;
  right: calc(16px + var(--safe-r));
  bottom: calc(16px + var(--safe-b));
  z-index: 18;
  height: 40px;
  padding: 0 14px 0 12px;
  border-radius: 999px;
  background: var(--overlay);
  box-shadow: var(--shadow-pop);
}
.th-fab:hover {
  background: var(--surface-3);
}
.th-fab-dot:empty {
  display: none;
}
.th-layout.has-rail > .th-fab {
  display: none;
}
.th-layout:not(.has-rail) .th-page {
  padding-bottom: 96px; /* room above the pill */
}

/* ---------------------------------------------------------------- 1. the bar */
.th-head {
  align-items: flex-end;
}
.th-head-l {
  min-width: 0;
}
.th-sub {
  max-width: 44rem;
  text-wrap: pretty;
}
.th-live {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--link);
  font-weight: 500;
  white-space: nowrap;
}
.th-live:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.th-live .i {
  width: 13px;
  height: 13px;
}
.th-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.th-bar.is-loading .th-days {
  opacity: 0.7;
}

/* notices under the bar: a change running, one that half-worked, what Roblox didn't let us read */
.th-notices {
  display: grid;
  gap: 8px;
}
.th-notices:not(:empty) {
  margin: -8px 0 24px;
}
.th-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 10px 8px 14px;
  border-radius: var(--r-4);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  font-size: var(--fs-13);
  color: var(--ink-2);
  text-wrap: pretty;
}
.th-notice > span:not(.dot) {
  flex: 1;
  min-width: 0;
}
.th-notice .dot {
  flex: none;
}
.th-notice .btn {
  flex: none;
  margin-left: auto;
}
.th-notice.is-bad {
  align-items: flex-start;
  --h: var(--hue-red);
  background: oklch(var(--tone-dot-l) var(--tone-dot-c) var(--h) / calc(var(--tone-fill-a) * 0.6));
  box-shadow: inset 0 0 0 1px oklch(var(--tone-dot-l) var(--tone-dot-c) var(--h) / 0.3);
}
.th-notice.is-bad .dot {
  margin-top: 6px;
}
.th-notice-body {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 4px;
  color: var(--ink);
}
.th-notice-body ul {
  padding-left: 18px;
  color: var(--ink-2);
}
.th-notice.is-review {
  --h: var(--hue-violet);
  box-shadow: inset 0 0 0 1px oklch(var(--tone-dot-l) var(--tone-dot-c) var(--h) / 0.35);
}

/* ---------------------------------------------------------------- sections */
.th-sec + .th-sec {
  margin-top: 40px;
}
.th-sec:empty,
.th-sec[hidden] {
  display: none;
}
.th-h-n {
  margin-left: 8px;
  font-size: var(--fs-13);
  font-weight: 500;
  color: var(--ink-3);
}
.th-sec .section-head .t-h2 {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
}
.th-sec .section-head .count {
  margin-left: 8px;
  align-self: center;
}
.th-h-big {
  font-size: var(--fs-20);
  letter-spacing: -0.02em;
}
.th-lead {
  margin: -4px 0 14px;
  max-width: 48rem;
  text-wrap: pretty;
}
.th-lead.is-warn {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
}
.th-warn {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: -4px 0 14px;
  font-size: var(--fs-13);
  color: oklch(var(--tone-ink-l) var(--tone-ink-c) var(--hue-amber));
  text-wrap: pretty;
}
.th-warn .i {
  margin-top: 2px;
}
.th-none {
  padding: 16px 0;
}

/* pictures: the shared 16:9 `.media` frame; icons square or contained */
.th-pic {
  background: var(--surface-2);
}
.th-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: opacity var(--t-med) var(--ease);
}
.th-pic.is-loading img {
  opacity: 0;
}
.th-pic.is-contain img {
  object-fit: contain;
  padding: 8%;
}
.th-pic.is-square {
  aspect-ratio: 1;
}
.th-pic.is-blank,
.th-pic.is-missing {
  display: grid;
  place-items: center;
}
.th-pic.is-missing img {
  display: none;
}
.th-pic-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  font-size: var(--fs-12);
  font-weight: 500;
  color: var(--ink-3);
  text-align: center;
}
.th-pic.is-importing {
  background: repeating-linear-gradient(135deg, var(--surface-2) 0 10px, var(--surface-3) 10px 20px);
}
.th-pic.is-importing .th-pic-note {
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--overlay);
  box-shadow: var(--shadow-1);
  color: var(--ink-2);
}

/* ---------------------------------------------------------------- 2. the homepage set */
.th-home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 196px), 1fr));
  gap: 14px;
}
.th-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: var(--r-4);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  transition: box-shadow var(--t-fast) var(--ease);
}
.th-card:hover {
  box-shadow: var(--shadow-2);
}
.th-card-media {
  position: relative;
  margin: 4px 4px 0;
}
.th-card-media > .media {
  border-radius: 6px; /* 10 card - 4 inset */
}
.th-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  gap: 4px;
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: var(--fs-11);
  font-weight: 650;
  letter-spacing: 0.01em;
  color: var(--on-stage);
  background: var(--stage-glass);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.th-badge.is-lock {
  left: auto;
  right: 8px;
}
.th-badge .i {
  width: 12px;
  height: 12px;
}
.th-card.is-locked {
  box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line-2);
}
/* the lock toggle: quiet when off, plain ink when on */
.th-lock:not(.is-on) {
  color: var(--ink-3);
  background: none;
  box-shadow: none;
}
.th-lock:not(.is-on):hover {
  color: var(--ink);
  background: var(--hover);
}
.th-lock.is-on {
  color: var(--ink);
}
.th-lock .i {
  width: 14px;
  height: 14px;
}
.th-card-body {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px 12px 12px;
  min-width: 0;
}
.th-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: var(--fs-14);
}
.th-card-top b {
  font-weight: 600;
}
/* the card's colour: its line in the chart */
.th-key {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--c);
}
.th-qptr {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 2px;
}
.th-qptr-v {
  font-size: var(--fs-30);
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.th-qptr-l {
  font-size: var(--fs-12);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-3);
}
.th-nums {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-top: 8px;
  box-shadow: inset 0 1px 0 var(--line);
}
.th-nums > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.th-nums dt {
  min-width: 0;
  font-size: var(--fs-12);
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.th-nums dd {
  flex: none;
  margin: 0;
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.th-wins {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: var(--fs-12);
  color: var(--ink-2);
  text-wrap: pretty;
}
.th-wins .i {
  margin-top: 2px;
  color: var(--ink-3);
}
.th-low {
  font-size: var(--fs-12);
  color: oklch(var(--tone-ink-l) var(--tone-ink-c) var(--hue-amber));
  text-wrap: pretty;
}
.th-card-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.th-card-top .th-lock {
  flex: none;
  height: 24px;
  margin-left: auto;
  padding: 0 7px;
  gap: 4px;
  font-size: var(--fs-12);
}
.th-card-top .th-lock::after {
  inset: -8px -2px; /* a 40 px target without growing the row */
}
.th-card-top .th-lock .i {
  width: 13px;
  height: 13px;
}

/* tested or untested (1,000 impressions and 8 hours on the homepage): a pill, and for untested how far */
.th-test {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.th-test.is-tested {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}
.th-test-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  min-width: 0;
}
.th-test-bar {
  position: relative;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.th-test-bar > i {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: var(--ink-3);
  transition: width var(--t-med) var(--ease);
}
/* a tested picture's remembered numbers, on its bank tile */
.th-rec {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.th-rec-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.th-rec-q {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  font-size: var(--fs-20);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
}
.th-rec-when {
  color: var(--ink-4);
}
.th-rec-when.is-on {
  color: oklch(var(--tone-ink-l) var(--tone-ink-c) var(--hue-green));
}
.th-card.is-skel .th-card-body {
  gap: 10px;
}
.th-skel-line,
.th-skel-big {
  display: block;
  height: 12px;
  width: 70%;
  border-radius: 4px;
  background: var(--surface-2);
}
.th-skel-big {
  height: 30px;
  width: 45%;
}
.th-skel-line.is-short {
  width: 85%;
}

/* impressions and QPTR by hour (by day for 30 days), one above the other, one legend */
.th-chart {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 14px 16px 12px;
  border-radius: var(--r-4);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.th-chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}
.th-chart-head .st-legend {
  margin: 0;
}
/* a line's picture in the legend and the hover readout, ringed in the line's colour */
.th-page .st-thumb {
  flex: none;
  width: 40px;
  height: 22px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--surface-2);
  box-shadow: 0 0 0 1.5px var(--c), 0 0 0 2.5px var(--surface);
}
.th-page .st-tip {
  gap: 5px;
}
.th-page .st-tip-row {
  gap: 8px;
}
.th-page .st-tip-row b {
  min-width: 3.2em;
}
.th-page .st-legend {
  gap: 8px 16px;
}
.th-chart-one {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.th-chart-one + .th-chart-one {
  padding-top: 12px;
  box-shadow: inset 0 1px 0 var(--line);
}
.th-chart-none {
  margin-top: 12px;
}

/* ---------------------------------------------------------------- 3. the details page */
.th-strip {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 168px), 1fr));
  gap: 12px;
}
.th-strip-item {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  padding: 4px 4px 8px;
  border-radius: var(--r-4);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.th-strip-item > .media {
  border-radius: 6px;
}
.th-strip-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  min-width: 0;
  padding: 0 6px;
  font-size: var(--fs-13);
}
.th-strip-body b {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 600;
}
.th-pos {
  flex: none;
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--ink-3);
}
.th-strip-acts {
  display: flex;
  gap: 4px;
  padding: 0 4px;
}
.th-strip.is-editing .th-strip-item {
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.th-strip.is-editing .th-strip-acts .icon-btn:last-child {
  margin-left: auto;
}

/* ---------------------------------------------------------------- 4. the icon */
.th-icon-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px 32px;
}
.th-icon-now {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 18px 6px 6px;
  border-radius: var(--r-5);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.th-icon-now > .media {
  width: 112px;
  border-radius: 9px; /* 14 box - 5 inset, optically */
}
.th-icon-body {
  display: grid;
  gap: 4px;
  font-size: var(--fs-15);
}
.th-icon-body b {
  font-weight: 600;
}
.th-icon-others {
  display: grid;
  gap: 8px;
  min-width: 0;
  flex: 1 1 280px;
}
.th-icon-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.th-icon-item {
  display: grid;
  justify-items: start;
  gap: 6px;
  width: 112px;
  font-size: var(--fs-13);
}
.th-icon-item > .media {
  width: 100%;
}
.th-icon-item b {
  max-width: 100%;
  font-weight: 600;
}
.th-icon-hint {
  flex: 1 1 260px;
  max-width: 30rem;
  align-self: center;
  text-wrap: pretty;
}

/* ---------------------------------------------------------------- 5. proposals: pick the ones to keep */
/* the bar sticks under the game header while you scroll through the proposals */
.th-pickbar {
  position: sticky;
  top: var(--th-stick, 113px);
  z-index: 8;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 14px;
  padding: 8px 8px 8px 14px;
  border-radius: var(--r-4);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-2);
}
.th-pick-count {
  font-size: var(--fs-14);
  font-weight: 600;
  color: var(--ink);
}
.th-pickbar-acts {
  display: inline-flex;
  gap: 2px;
}
.th-pick-go {
  margin-left: auto;
  height: 36px;
  padding: 0 16px;
}
.th-pc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 172px), 1fr)); /* six across on a wide screen */
  gap: 12px;
}
.th-pc {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: var(--r-4);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  transition-property: box-shadow, opacity;
  transition-duration: var(--t-fast);
  transition-timing-function: var(--ease);
}
.th-pc-pick {
  position: relative;
  display: block;
  width: auto;
  margin: 4px 4px 0;
  border-radius: 6px; /* 10 card - 4 inset */
  cursor: pointer;
  transition: scale var(--t-fast) var(--ease);
}
.th-pc-pick:active:not(:disabled) {
  scale: 0.98;
}
.th-pc-pick.is-static {
  cursor: default;
}
.th-pc-pick > .media {
  border-radius: 6px;
}
.th-pc-pick img {
  transition: opacity var(--t-fast) var(--ease);
}
/* the check: an empty ring on hover and focus, filled when picked */
.th-pc-check {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: transparent;
  background: var(--stage-glass);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.7);
  opacity: 0;
  transition-property: opacity, background-color, color;
  transition-duration: var(--t-fast);
}
.th-pc-pick:hover .th-pc-check,
.th-pc-pick:focus-visible .th-pc-check {
  opacity: 1;
}
.th-pc.is-picked .th-pc-check {
  opacity: 1;
  color: var(--accent-ink);
  background: var(--accent);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
.th-pc.is-picked {
  box-shadow: 0 0 0 2px var(--accent), var(--shadow-2);
}
/* once anything is picked, the rest step back a little */
.th-pc-grid.has-picks .th-pc:not(.is-picked):not(.is-done) .th-pc-pick img {
  opacity: 0.55;
}
.th-pc-grid.has-picks .th-pc:not(.is-picked):not(.is-done) .th-pc-pick:hover img {
  opacity: 0.85;
}
.th-pc-body {
  display: grid;
  gap: 4px;
  padding: 8px 8px 8px 12px;
  min-width: 0;
}
.th-pc-top {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: var(--fs-14);
}
.th-pc-name {
  font-weight: 600;
  color: var(--ink);
}
.th-pc-name:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.th-pc-why {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: var(--fs-12);
  color: var(--ink-3);
  text-wrap: pretty;
}
.th-pc-foot {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 2px -2px 0 -6px; /* the quiet buttons' own padding lines their words up with the name */
}

.th-pc-foot {
  flex-wrap: wrap;
}
.th-pc-changes,
.th-pc-remove {
  color: var(--ink-3);
  padding: 0 6px;
  gap: 4px;
}

.th-pc-changes:hover {
  color: var(--ink);
}
/* the Changes box, in the card */
.th-pc-changebox {
  display: grid;
  gap: 6px;
  margin-top: 4px;
}
.th-pc-note {
  min-height: 72px;
  font-size: var(--fs-13);
}
.th-pc-changeacts {
  display: flex;
  align-items: center;
  gap: 4px;
}
.th-pc-changeacts {
  justify-content: flex-end;
}
.th-pc-state.is-sent {
  color: #fff;
  background: oklch(0.58 0.14 var(--hue-orange));
}
.th-pc-remove:hover {
  --h: var(--hue-red);
  color: oklch(var(--tone-ink-l) var(--tone-ink-c) var(--h));
  background: oklch(var(--tone-dot-l) var(--tone-dot-c) var(--h) / var(--tone-fill-a));
}
.th-pc-remove .i {
  width: 14px;
  height: 14px;
}
/* settled in place until the page opens again */
.th-pc-state {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: var(--fs-12);
  font-weight: 650;
  color: var(--on-stage);
  background: var(--stage-glass);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.th-pc-state.is-accepted {
  color: #fff;
  background: oklch(0.56 0.13 var(--hue-green));
}
.th-pc.is-removed .th-pc-pick .media,
.th-pc.is-sent .th-pc-pick .media {
  filter: grayscale(1);
  opacity: 0.4;
}
.th-pc.is-removed .th-pc-body,
.th-pc.is-sent .th-pc-body {
  opacity: 0.55;
}
.th-props-none {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 16px;
  border-radius: var(--r-4);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.th-props-none p {
  flex: 1 1 280px;
  text-wrap: pretty;
}

/* ---------------------------------------------------------------- 6. the bank */
.th-filters {
  flex-wrap: wrap; /* six filters: they wrap rather than scroll out of sight */
  margin-bottom: 14px;
}
.th-bank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
  gap: 14px;
}
.th-tile {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: var(--r-4);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  transition: box-shadow var(--t-fast) var(--ease);
}
.th-tile:hover {
  box-shadow: var(--shadow-2);
}
.th-tile > .media {
  margin: 4px 4px 0;
  border-radius: 6px;
}
.th-tile-body {
  flex: 1;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 9px 10px 10px 12px;
  min-width: 0;
}
.th-tile-name {
  font-size: var(--fs-14);
  font-weight: 600;
}
.th-places {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.th-places .status {
  height: 20px;
  padding: 0 7px;
  font-size: var(--fs-11);
}
.th-tile-acts {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.th-tile-acts .icon-btn {
  margin-left: auto;
}
.th-tile-acts .btn .i {
  width: 14px;
  height: 14px;
  margin-right: -3px;
}

/* ---------------------------------------------------------------- 7. icon requests, and the declined */
.th-reqs {
  border-radius: var(--r-4);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.th-req {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  min-height: 56px;
  padding: 10px 12px 10px 16px;
}
.th-req-pic {
  flex: none;
  width: 64px;
}
.th-req-pic > .media {
  border-radius: 5px;
}
.th-req-body {
  flex: 1 1 240px;
  display: grid;
  gap: 2px;
  min-width: 0;
  font-size: var(--fs-14);
}
.th-req-body b {
  font-weight: 600;
}
.th-declined {
  margin-top: 20px;
}
.th-declined summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  font-size: var(--fs-14);
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  list-style: none;
}
.th-declined summary::-webkit-details-marker {
  display: none;
}
.th-declined summary .i {
  color: var(--ink-3);
  transition: rotate var(--t-fast) var(--ease);
}
.th-declined[open] summary .i {
  rotate: 90deg;
}
.th-declined summary:hover {
  color: var(--ink);
}
.th-declined-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
  gap: 12px;
  margin-top: 8px;
}
.th-dec {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 4px 4px 8px;
  border-radius: var(--r-4);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  font-size: var(--fs-13);
}
.th-dec > .media {
  border-radius: 6px;
  opacity: 0.72;
}
.th-dec b,
.th-dec .t-tiny {
  padding: 0 6px;
}
.th-dec:hover {
  box-shadow: var(--shadow-2);
}

/* ---------------------------------------------------------------- dialogs: the picker, an icon request */
/* a page change's question shows its pictures: an outgoing one, an arrow, the incoming one */
.th-confirm {
  display: grid;
  gap: 10px;
}
.th-confirm-pics {
  display: flex;
  align-items: center;
  gap: 10px;
}
.th-confirm-pics.is-many {
  flex-wrap: wrap;
  gap: 8px;
}
.th-confirm-pic {
  display: grid;
  gap: 4px;
  width: 132px;
  min-width: 0;
  font-size: var(--fs-12);
  color: var(--ink-2);
}
.th-confirm-pics.is-many .th-confirm-pic {
  width: 96px;
}
.th-confirm-pic > .media {
  border-radius: 6px;
}
.th-confirm-arrow {
  display: grid;
  place-items: center;
  color: var(--ink-3);
}

.th-pick-dialog {
  width: min(760px, calc(100vw - 32px));
}
.th-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr));
  gap: 10px;
}
.th-pick {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  padding: 4px 4px 8px;
  border-radius: var(--r-4);
  text-align: left;
  font-size: var(--fs-13);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  transition-property: box-shadow, background-color, scale;
  transition-duration: var(--t-fast);
  transition-timing-function: var(--ease);
}
.th-pick > .media {
  border-radius: 6px;
}
.th-pick b,
.th-pick .t-tiny {
  padding: 0 6px;
}
.th-pick:hover {
  background: var(--control-hover);
}
.th-pick:active {
  scale: 0.98;
}
.th-pick[aria-checked='true'] {
  box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 3px var(--accent-soft);
}
.th-pick-dialog .dialog-foot {
  flex-wrap: wrap;
  align-items: center;
}
.th-pick-line {
  flex: 1 1 260px;
  min-width: 0;
  font-size: var(--fs-13);
  color: var(--ink-2);
  text-wrap: pretty;
}
.th-pick-line b {
  color: var(--ink);
  font-weight: 600;
}
.th-pick-warn {
  color: oklch(var(--tone-ink-l) var(--tone-ink-c) var(--hue-amber));
}
.th-pick-btns {
  display: inline-flex;
  gap: 8px;
  margin-left: auto;
}
.th-ask {
  display: grid;
  gap: 14px;
}
.th-ask-pic {
  width: min(280px, 100%);
}
.th-ask-pic > .media {
  border-radius: var(--r-3);
}
.th-ask-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.th-ask-row .switch {
  margin-top: 1px;
}
.th-ask-t {
  display: grid;
  gap: 2px;
  font-size: var(--fs-14);
}
.th-ask-t b {
  font-weight: 600;
}

/* ---------------------------------------------------------------- phones */
@media (max-width: 720px) {
  .th-head {
    align-items: stretch;
  }
  .th-bar {
    width: 100%;
  }
  .th-bar .seg {
    flex: 1 1 100%;
  }
  .th-bar .seg button {
    flex: 1;
    justify-content: center;
    height: 36px;
  }
  .th-bar > .btn {
    flex: 1 1 0;
    height: 40px;
  }
  .th-bar > .th-zip {
    display: none;
  }
  .th-pickbar {
    padding: 8px;
  }
  .th-pick-go {
    flex: 1 1 100%;
    height: 42px;
  }
  .th-pc-check {
    opacity: 1; /* no hover on touch: the ring always shows */
  }
  .th-pc-body {
    padding: 6px 6px 6px 8px;
  }
  /* two across: the homepage cards stay one per row, the rest is for scanning */
  .th-bank-grid,
  .th-pc-grid,
  .th-strip,
  .th-declined-grid,
  .th-pick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .th-tile-body {
    padding: 8px 8px 8px 10px;
  }
  .th-tile-acts {
    flex-wrap: wrap;
  }
  .th-qptr-v {
    font-size: var(--fs-38);
  }
  .th-card .btn.is-sm,
  .th-tile .btn.is-sm,
  .th-strip .btn.is-sm,
  .th-req .btn.is-sm {
    height: 36px;
  }
  .th-tile-acts .icon-btn.is-sm,
  .th-strip-acts .icon-btn.is-sm {
    width: 36px;
    height: 36px;
  }
  .th-icon-now {
    flex: 1 1 100%;
  }
  .th-icon-now > .media {
    width: 96px;
  }
  .th-notice {
    flex-wrap: wrap;
  }
  .th-pick-btns {
    width: 100%;
  }
  .th-pick-btns .btn {
    flex: 1;
    height: 40px;
  }
}
