/* Coin triage's phone page (views/triage.js, /app/triage): one column the width of a phone, the photo first, one filled
   button per screen at the bottom where a thumb reaches it. Colours are studio.css's variables, so dark follows. */
.tr { max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; min-height: calc(100dvh - 150px); }
#tr-screen { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.tr .tr-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); pointer-events: none; }
/* the phone page has its own one filled button per screen: the nav's Scan coin (the bench's action) steps aside, as on
   the Coins page (inventory.css) */
body:has(#tr) #navscan { display: none; }

/* the buttons: big, one filled; the actions stay in reach at the bottom of a phone's screen */
.tr-acts { margin-top: auto; display: grid; gap: 10px; position: sticky; bottom: 0; z-index: 1;
           padding: 14px 0 calc(10px + env(safe-area-inset-bottom, 0px));
           background: linear-gradient(to bottom, transparent, var(--bg) 22px); }
.tr-btn { display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 10px 18px; border-radius: 12px;
          font-size: 17px; font-weight: 500; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tr-btn.primary { background: var(--ink); color: var(--panel); border: 1px solid var(--ink); }
.tr-btn.primary:hover:not(:disabled) { background: color-mix(in srgb, var(--ink) 84%, var(--panel)); }
.tr-btn.ghost { background: var(--panel); color: var(--ink); border: 1px solid var(--rule); min-height: 46px; font-size: 16px; }
.tr-btn.ghost:hover:not(:disabled) { background: var(--soft); }

/* T1: today's coins, each its photo and one chip */
.tr-head { display: flex; align-items: center; justify-content: space-between; margin: 0; }
.tr-head strong { font-size: 17px; }
.tr-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 14px 8px; }
.tr-item { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); min-width: 0; }
.tr-disc { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: var(--soft); border: 1px solid var(--rule); display: block; }
.tr-disc img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.6); }   /* the coin, not the table */
.tr-item:hover .tr-disc { border-color: var(--muted); }
.tr-chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.tr-k-reading { background: color-mix(in srgb, var(--focus) 16%, var(--chip)); }
.tr-k-queued, .tr-k-scanned { background: color-mix(in srgb, var(--ok) 16%, var(--chip)); color: var(--ink); }
.tr-k-reasons { background: color-mix(in srgb, var(--warn) 20%, var(--chip)); color: var(--ink); }
.tr-k-retake, .tr-k-failed { background: color-mix(in srgb, var(--bad) 15%, var(--chip)); color: var(--ink); }
.tr-empty { display: grid; place-items: center; padding: 8vh 0 2vh; }
.tr-ring { width: 168px; height: 168px; border-radius: 50%; border: 2px dashed color-mix(in srgb, var(--muted) 55%, transparent);
           background: radial-gradient(circle at 36% 30%, var(--panel), var(--soft)); }
.tr-toast { display: flex; align-items: center; gap: 10px; margin: 0; padding: 11px 14px; border-radius: 12px; background: var(--ink); color: var(--panel);
            font-size: 14px; font-weight: 500; animation: tr-in .25s ease-out; }
.tr-toast::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
@keyframes tr-in { from { opacity: 0; transform: translateY(-6px); } }

/* the photo just taken (the device's check, T2) */
.tr-photo { --ph: 58dvh; position: relative; margin: 0; border-radius: 16px; overflow: hidden; background: var(--stage); aspect-ratio: 3 / 4;
            width: min(100%, calc(var(--ph) * 3 / 4)); max-height: var(--ph); align-self: center; }
.tr-photo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tr-photo .tr-issue { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); font-size: 15px; padding: 6px 14px; }
.tr-up { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0, 0, 0, .55); }
.tr-up::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .35);
                border-top-color: #fff; animation: tr-spin .8s linear infinite; }
.tr-up.done { background: var(--ok); }
.tr-up.done::after { inset: 8px 10px 11px 10px; border: solid #fff; border-width: 0 2.5px 2.5px 0; border-radius: 0; transform: rotate(45deg);
                     animation: none; }
.tr-up.bad { background: var(--bad); }
.tr-up.bad::after { content: "!"; inset: 0; border: 0; display: grid; place-items: center; color: #fff; font-weight: 700; animation: none; }
@keyframes tr-spin { to { transform: rotate(360deg); } }

/* T3: the photos, the title, the AI's tag, the reasons */
.tr-pair { display: flex; gap: 10px; justify-content: center; }
.tr-pair img { flex: 1 1 0; min-width: 0; max-width: 240px; aspect-ratio: 1; object-fit: cover; border-radius: 14px; background: var(--stage); }
.tr-read { display: flex; flex-direction: column; gap: 8px; }
.tr-title { font-size: 21px; font-weight: 600; line-height: 1.25; margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tr-tags, .tr-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.tr .chip { font-size: 13px; padding: 3px 10px; }
/* the provenance tag: amber, darkened toward the ink so it reads at AA in both themes (6.2:1 light, 8.0:1 dark) */
.tr-ai { color: color-mix(in srgb, var(--warn) 70%, var(--ink)); background: color-mix(in srgb, var(--warn) 12%, var(--panel));
         border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); }
.tr-why { background: var(--panel); color: var(--ink); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--rule)); }
.tr-more { background: var(--panel); border: 1px dashed var(--muted); }
.tr-issue { background: color-mix(in srgb, var(--bad) 16%, var(--panel)); color: var(--ink); border: 1px solid color-mix(in srgb, var(--bad) 45%, transparent); }
.tr-wait { font-size: 14px; }
.tr-wait::before, .tr-closer { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--focus);
                               margin-right: 6px; vertical-align: 1px; animation: tr-pulse 1.2s ease-in-out infinite; }
.tr-closer { margin: 0; width: 10px; height: 10px; flex: none; }
@keyframes tr-pulse { 50% { opacity: .25; } }
.tr-standing { margin: 0; color: var(--ink2); }
.tr-q { font-size: 14px; color: var(--ink2); }
.tr-q summary { color: var(--ink2); }
.tr-q ol { margin: 6px 0 0; padding-left: 20px; }
.tr-q li { margin: 3px 0; }
.tr-note { margin: 0; padding: 8px 12px; border-left: 3px solid var(--warn); background: var(--panel); border-radius: 0 8px 8px 0; font-size: 14px; }

@media (min-width: 700px) {
  .tr { min-height: 0; }
  .tr-acts { position: static; background: none; padding-top: 6px; grid-template-columns: minmax(0, 1fr); max-width: 360px; width: 100%; align-self: center; }
  .tr-photo { --ph: 62vh; }
}
@media (prefers-reduced-motion: reduce) { .tr-toast, .tr-up::after, .tr-wait::before, .tr-closer { animation: none; } }

/* the bench's Which coin? and the coin page's Same coin? / phone card: the coin's own square of each phone photo (the
   store frames it on the coin's disc), big enough to tell a design apart; a tap on a Same coin? picture opens it whole */
.sp-coins { align-items: center; }
.sp-coin { padding: 3px; border-radius: 12px; }
.sp-coin .rv-thumb { width: 96px; height: 96px; border-radius: 10px; }
.sp-coin .rv-thumb img, .sc-pic img { object-fit: cover; padding: 0; }
.sc-pic { width: 136px; height: 136px; border-radius: 12px; }
a.sc-pic:hover, a.sc-pic:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sp-more { min-width: 56px; }
@media (max-width: 560px) {
  .sp-coin .rv-thumb { width: 84px; height: 84px; }
  .sc-pic { width: 104px; height: 104px; }
}
