/* カードの枠の中に置く、操作を持たない小さな画面 */
.top-shot-ui {
  --shot-pad: 6px;
  --shot-gap: 4px;
  --shot-number: clamp(14px, 1.8vw, 24px);
  display: grid;
  gap: var(--shot-gap);
  width: calc(100% - 12px);
  max-width: 194px;
  min-width: 0;
  padding: var(--shot-pad);
  border: 1px solid var(--line);
  border-top: 2px solid var(--c);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: clamp(9px, 1.15vw, 12px);
  line-height: 1.38;
}

.shot-title {
  padding-bottom: 3px;
  border-bottom: 1px solid var(--line);
  font-size: clamp(10px, 1.25vw, 14px);
  font-weight: 700;
}

.shot-label, .shot-note { color: var(--muted); }
.shot-note { text-align: center; }
.shot-sample { font-weight: 600; text-align: center; }
.shot-value { min-width: 0; }
.shot-row, .shot-table-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  align-items: center;
  gap: 3px;
}
.shot-field, .shot-result {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
}
.shot-field, .shot-code, .shot-action {
  padding: 2px 4px;
  border: 1px solid var(--line);
  border-radius: 3px;
}
.shot-field, .shot-code { background: var(--bg); }
.shot-field .shot-value { font-weight: 600; }
.shot-code { font-family: var(--mono); }
.shot-action {
  background: var(--accent-weak);
  color: var(--point);
  font-weight: 650;
  text-align: center;
}
.shot-row > .shot-field, .shot-row > .shot-result {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.shot-number {
  color: var(--point);
  font-family: var(--easelet-font);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}
.shot-result .shot-value {
  font-size: var(--shot-number);
  line-height: 1;
  white-space: nowrap;
}
.shot-row .shot-result .shot-value { font-size: clamp(12px, 1.55vw, 20px); }
.shot-row .shot-result .shot-label { text-align: center; }

.shot-table, .shot-keys {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.shot-table-row { background: var(--bg); }
.shot-table-row:nth-child(even) { background: var(--accent-weak); }
.shot-table-row span, .shot-keys span { padding: 2px; text-align: center; }
.shot-keys-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shot-keys-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shot-keys-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.shot-keys-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.shot-keys span { border: 1px solid var(--line); border-radius: 3px; background: var(--bg); font-weight: 650; }
.shot-keys span:last-child { background: var(--accent-weak); color: var(--point); }

.shot-figure {
  position: relative;
  min-width: 0;
  align-self: center;
  text-align: center;
}
.shot-figure-script, .shot-figure-serif, .shot-figure-stroke {
  color: var(--point);
  font-size: clamp(16px, 2.4vw, 28px);
  font-family: serif;
  font-weight: 600;
}
.shot-figure-stroke { border: 1px solid var(--line); background: var(--bg); }
.shot-figure-morse, .shot-figure-message, .shot-figure-diff,
.shot-figure-replace, .shot-figure-conversion, .shot-figure-dates,
.shot-figure-transcript, .shot-figure-questions, .shot-figure-memory,
.shot-figure-frames, .shot-figure-practice, .shot-figure-beats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.shot-figure-morse span, .shot-figure-message span, .shot-figure-conversion span,
.shot-figure-questions span, .shot-figure-memory span, .shot-figure-dates span {
  padding: 3px;
  border-radius: 3px;
  background: var(--accent-weak);
}
.shot-figure-morse { font-weight: 700; }
.shot-figure-typing {
  border-bottom: 2px solid var(--c);
  font: 650 1.65em/1.15 var(--mono);
  letter-spacing: .12em;
}
.shot-figure-ascii, .shot-figure-password {
  display: grid;
  background: var(--bg);
  color: var(--point);
  padding: 3px;
  font-family: var(--mono);
  white-space: pre;
}
.shot-figure-password { font-weight: 700; letter-spacing: .08em; }
.shot-figure-diff, .shot-figure-message { align-items: stretch; flex-direction: column; }
.shot-figure-diff span { padding: 2px 4px; background: var(--bg); text-align: left; }
.shot-figure-diff span:last-child, .shot-figure-message span:last-child { color: var(--point); background: var(--accent-weak); }
.shot-figure-message span:first-child { align-self: flex-start; }
.shot-figure-message span:last-child { align-self: flex-end; }
.shot-figure-replace span:first-child, .shot-figure-discount span:first-child { color: var(--muted); text-decoration: line-through; }
.shot-figure-replace span:last-child, .shot-figure-discount span:last-child { color: var(--point); font-weight: 700; }
.shot-figure-discount { display: grid; gap: 2px; }
.shot-figure-conversion span:first-child, .shot-figure-dates span:first-child { border: 1px solid var(--line); background: var(--bg); }
.shot-figure-conversion span + span::before, .shot-figure-dates span + span::before { content: "→ "; color: var(--muted); }
.shot-figure-factor { display: grid; justify-items: center; gap: 2px; }
.shot-figure-factor span:first-child { padding: 2px 5px; border: 1px solid var(--line); border-radius: 9px; }
.shot-figure-factor span:last-child { color: var(--point); border-top: 1px solid var(--c); font-weight: 650; }
.shot-figure-match, .shot-figure-transcript { background: var(--bg); padding: 3px; }
.shot-figure-match span:last-child { color: var(--point); background: var(--accent-weak); }
.shot-figure-transcript span:first-child { color: var(--point); font-family: var(--easelet-font); }

.shot-figure-ratio, .shot-figure-balance,
.shot-figure-margin, .shot-figure-level {
  height: .65em;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--c) 40%, var(--line) 40%);
}
.shot-figure-balance { background: linear-gradient(90deg, var(--c) 72%, var(--point) 72%); }
.shot-figure-probability { height: 1em; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.shot-figure-probability::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--c);
  clip-path: polygon(0 96%, 16% 58%, 35% 32%, 56% 16%, 78% 9%, 100% 7%, 100% 16%, 78% 18%, 56% 25%, 35% 41%, 16% 67%, 0 100%);
}
.shot-figure-margin { background: linear-gradient(90deg, var(--line) 60%, var(--c) 60%); }
.shot-figure-level { background: repeating-linear-gradient(90deg, transparent 0 7px, var(--surface) 7px 9px), linear-gradient(90deg, var(--c) 68%, var(--line) 68%); }
.shot-figure-triangle, .shot-figure-slope { display: flex; align-items: flex-end; justify-content: space-around; height: 2.45em; }
.shot-figure-triangle::before, .shot-figure-slope::before {
  content: "";
  position: absolute;
  inset: 1px 0 0;
  background: linear-gradient(143deg, transparent 49%, var(--c) 49.5% 53%, transparent 53.5%);
  border-bottom: 1px solid var(--c);
  border-left: 1px solid var(--c);
}
.shot-figure-triangle span { position: relative; margin-bottom: 2px; background: var(--surface); }
.shot-figure-slope { background: var(--bg); }
.shot-figure-die, .shot-figure-zodiac { font-size: 2.6em; line-height: 1; color: var(--point); }
.shot-figure-barbell {
  height: .85em;
  background: linear-gradient(var(--text), var(--text)) center / 65% 2px no-repeat;
}
.shot-figure-barbell::before, .shot-figure-barbell::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 12%;
  border-radius: 2px;
  background: var(--c);
}
.shot-figure-barbell::before { left: 20%; }
.shot-figure-barbell::after { right: 20%; }
.shot-figure-circuit {
  width: 68%;
  height: 1em;
  justify-self: center;
  border: 1px solid var(--point);
  clip-path: polygon(0 0, 35% 0, 35% 14%, 65% 14%, 65% 0, 100% 0, 100% 100%, 0 100%);
  background: linear-gradient(var(--c), var(--c)) center top / 26% 4px no-repeat;
}
.shot-figure-wheel-offset {
  height: 1.65em;
  background: repeating-linear-gradient(90deg, transparent 0 17%, var(--line) 17% 18%, transparent 18% 33%);
}
.shot-figure-wheel-offset::before, .shot-figure-wheel-offset::after {
  content: "";
  position: absolute;
  inset: 2px 34% 0 23%;
  border: 2px solid var(--c);
  border-radius: 3px;
}
.shot-figure-wheel-offset::after { inset: 0 22% 2px 34%; border-color: var(--point); }
.shot-figure-turn, .shot-figure-gauge, .shot-figure-clock, .shot-figure-roulette, .shot-figure-moon {
  justify-self: center;
  width: clamp(25px, 4vw, 44px);
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.shot-figure-turn { border: 3px solid var(--c); border-right-color: var(--line); }
.shot-figure-turn::after { content: "↻"; color: var(--point); font-size: 1.5em; line-height: 1.5; }
.shot-figure-measure {
  justify-self: center;
  width: 42%;
  height: 1.55em;
  border: 1px solid var(--line);
  border-radius: 2px 2px 5px 5px;
  background: repeating-linear-gradient(0deg, transparent 0 3px, var(--point) 3px 4px) left / 30% 100% no-repeat,
    linear-gradient(0deg, var(--accent-weak) 65%, transparent 65%);
}
.shot-figure-wave, .shot-figure-spectrum, .shot-figure-sine {
  height: 1.8em;
  background: var(--bg);
}
.shot-figure-wave::before, .shot-figure-sine::before, .shot-figure-spectrum::before {
  content: "";
  position: absolute;
  inset: 1px 3px;
  background: var(--c);
  clip-path: polygon(0 46%, 8% 35%, 14% 45%, 20% 10%, 27% 22%, 31% 4%, 37% 39%, 43% 27%, 48% 42%, 55% 15%, 61% 35%, 67% 21%, 73% 41%, 80% 29%, 85% 45%, 91% 33%, 100% 50%, 91% 67%, 85% 55%, 80% 71%, 73% 59%, 67% 79%, 61% 65%, 55% 85%, 48% 58%, 43% 73%, 37% 61%, 31% 96%, 27% 78%, 20% 90%, 14% 55%, 8% 65%, 0 54%);
}
.shot-figure-sine::before {
  clip-path: polygon(0 49%, 8% 15%, 16% 4%, 25% 15%, 33% 49%, 42% 80%, 50% 89%, 58% 80%, 67% 49%, 75% 15%, 83% 4%, 92% 15%, 100% 49%, 100% 58%, 92% 24%, 83% 13%, 75% 24%, 67% 58%, 58% 89%, 50% 98%, 42% 89%, 33% 58%, 25% 24%, 16% 13%, 8% 24%, 0 58%);
}
.shot-figure-spectrum { height: 1.1em; border-bottom: 1px solid var(--line); }
.shot-figure-spectrum::before {
  clip-path: polygon(0 94%, 18% 94%, 19% 66%, 24% 66%, 25% 94%, 43% 94%, 44% 0, 51% 0, 52% 94%, 72% 94%, 73% 75%, 77% 75%, 78% 94%, 100% 94%, 100% 100%, 0 100%);
}
.shot-figure-gauge {
  background: conic-gradient(from 225deg, var(--c) 0 38%, var(--line) 38% 75%, transparent 75%);
  border: 0;
}
.shot-figure-gauge::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--surface); }
.shot-figure-beats span { background: var(--accent-weak); border-radius: 50%; width: 1.25em; line-height: 1.25; }
.shot-figure-beats span:first-child { background: var(--point); color: var(--surface); }
.shot-figure-record { display: grid; place-items: center; }
.shot-figure-record::before { content: ""; width: 1.15em; aspect-ratio: 1; border: 2px solid var(--c); border-radius: 50%; background: var(--accent-weak); }
.shot-figure-needle { display: flex; justify-content: space-between; background: var(--bg); border-bottom: 1px solid var(--line); padding: 2px 5px; }
.shot-figure-needle::before { content: ""; position: absolute; inset: 0 calc(50% - 1px); background: var(--c); }
.shot-figure-piano {
  height: 2em;
  border: 1px solid var(--line);
  background: repeating-linear-gradient(90deg, transparent 0 11%, var(--text) 11% 16%, transparent 16% 24%) top / 100% 57% no-repeat,
    repeating-linear-gradient(90deg, var(--accent-weak) 0 13.5%, var(--line) 13.5% 14.285%);
}
.shot-figure-clock { background: var(--bg); border-color: var(--c); }
.shot-figure-clock::before, .shot-figure-clock::after {
  content: "";
  position: absolute;
  bottom: 50%;
  left: calc(50% - 1px);
  width: 2px;
  height: 32%;
  background: var(--point);
  transform: rotate(48deg);
  transform-origin: bottom;
}
.shot-figure-clock::after { height: 23%; transform: rotate(-56deg); background: var(--text); }
.shot-figure-calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--bg); }
.shot-figure-calendar span { padding: 2px 0; }
.shot-figure-calendar span:first-child { grid-column: 1 / -1; font-weight: 650; }
.shot-figure-calendar span:nth-child(-n+8) { background: var(--accent-weak); color: var(--point); }

.shot-figure-pixels, .shot-figure-cutout {
  height: 2.55em;
  background: repeating-conic-gradient(var(--line) 0 25%, var(--bg) 0 50%) 50% / 10px 10px;
}
.shot-figure-pixels::after {
  content: "";
  position: absolute;
  inset: 0 20%;
  background: var(--c);
  clip-path: polygon(0 40%, 17% 40%, 17% 20%, 34% 20%, 34% 0, 66% 0, 66% 20%, 83% 20%, 83% 40%, 100% 40%, 100% 100%, 0 100%);
}
.shot-figure-cutout::before, .shot-figure-cutout::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); background: var(--c); }
.shot-figure-cutout::before { top: 3px; width: 1em; aspect-ratio: 1; border-radius: 50%; }
.shot-figure-cutout::after { bottom: 0; width: 2em; height: 1.2em; border-radius: 1em 1em 0 0; }
.shot-figure-qr {
  justify-self: center;
  width: 2.75em;
  aspect-ratio: 1;
  color: var(--text);
  background: repeating-conic-gradient(var(--text) 0 25%, var(--surface) 0 50%) 0 0 / 5px 5px;
}
.shot-figure-qr::before, .shot-figure-qr::after {
  content: "";
  position: absolute;
  width: 29%;
  aspect-ratio: 1;
  border: 2px solid var(--text);
  outline: 1px solid var(--surface);
  background: linear-gradient(var(--text), var(--text)) center / 40% 40% no-repeat var(--surface);
}
.shot-figure-qr::before { top: 0; left: 0; box-shadow: 0 1.65em 0 -1px var(--surface), 0 1.65em 0 1px var(--text); }
.shot-figure-qr::after { top: 0; right: 0; }
.shot-figure-barcode {
  height: 1.55em;
  background: repeating-linear-gradient(90deg, var(--text) 0 1px, var(--surface) 1px 3px, var(--text) 3px 5px, var(--surface) 5px 6px, var(--text) 6px 7px, var(--surface) 7px 11px);
}
.shot-figure-crop { height: 2.2em; border: 1px dashed var(--point); background: var(--accent-weak); }
.shot-figure-crop::after {
  content: "";
  position: absolute;
  inset: 12% 14%;
  background: var(--c);
  clip-path: polygon(0 100%, 27% 46%, 47% 73%, 64% 20%, 100% 100%);
}
.shot-figure-sticker, .shot-figure-seal { justify-self: center; padding: 3px 6px; font-size: 1.45em; font-weight: 700; }
.shot-figure-sticker { border: 2px solid var(--line); border-radius: 12px 8px 11px 4px; background: var(--accent-weak); }
.shot-figure-seal { padding: 3px; border: 3px double var(--point); border-radius: 50%; aspect-ratio: 1; display: grid; place-items: center; color: var(--point); font-size: .95em; }
.shot-figure-palette {
  height: 2.3em;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: linear-gradient(90deg, var(--bg) 20%, var(--accent-weak) 20% 40%, var(--line) 40% 60%, var(--c) 60% 80%, var(--point) 80%);
}
.shot-figure-screen {
  height: 2.5em;
  border: 1px solid var(--line);
  border-top: 4px solid var(--c);
  border-radius: 2px;
  background: var(--bg);
  color: var(--point);
  display: grid;
  place-items: center;
  font: 600 1.15em/1 var(--easelet-font);
}
.shot-figure-frames span { flex: 1; padding: 5px 1px; border: 1px solid var(--line); background: var(--bg); }
.shot-figure-frames span:nth-child(2) { border-color: var(--c); background: var(--accent-weak); }
.shot-figure-logo { color: var(--point); font: 700 1.65em/1.2 var(--easelet-font); letter-spacing: .08em; }
.shot-figure-logo::before { content: "◆ "; color: var(--c); font-size: .7em; }
.shot-figure-bars { display: flex; justify-content: space-evenly; align-items: flex-end; border-bottom: 1px solid var(--line); }
.shot-figure-bars span { display: grid; gap: 1px; width: 21%; }
.shot-figure-bars span::before { content: ""; height: .7em; background: var(--c); }
.shot-figure-bars span:nth-child(2)::before { height: 1.55em; }
.shot-figure-bars span:nth-child(3)::before { height: 1.1em; }

.shot-figure-roulette { background: conic-gradient(var(--c) 0 50%, var(--accent-weak) 50%); }
.shot-figure-roulette::before { content: ""; position: absolute; inset: -1px 37% auto; height: 6px; background: var(--text); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.shot-figure-reaction { padding: 3px; background: var(--accent-weak); border: 2px solid var(--c); border-radius: 4px; }
.shot-figure-memory span { flex: 1; color: var(--point); font-size: 1.4em; }
.shot-figure-keyboard { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; }
.shot-figure-keyboard span { padding: 2px; border: 1px solid var(--line); border-radius: 2px 2px 4px 4px; background: var(--bg); }
.shot-figure-keyboard span:nth-child(2) { background: var(--accent-weak); color: var(--point); }

.shot-figure-moon { background: linear-gradient(90deg, var(--bg) 50%, var(--text) 50%); }
.shot-figure-people { display: flex; justify-content: center; gap: 7px; }
.shot-figure-people span {
  width: .85em;
  height: 1.3em;
  background: radial-gradient(circle at 50% 24%, var(--c) 0 2px, transparent 2.5px),
    radial-gradient(ellipse at center bottom, var(--c) 0 4px, transparent 4.5px);
}
.shot-figure-route { height: 1.7em; border-block: 1px solid var(--line); background: linear-gradient(145deg, transparent 48%, var(--c) 48% 52%, transparent 52%); }
.shot-figure-route::before, .shot-figure-route::after { content: ""; position: absolute; width: 5px; aspect-ratio: 1; border-radius: 50%; background: var(--point); bottom: 12%; left: 17%; }
.shot-figure-route::after { inset: 12% 17% auto auto; }

.shot-figure-paper { justify-self: center; padding: 5px; border: 1px solid var(--line); border-radius: 2px 7px 2px 2px; background: var(--bg); color: var(--point); font-weight: 650; }
.shot-figure-business-card, .shot-figure-resume { display: grid; gap: 3px; border: 1px solid var(--line); background: var(--bg); padding: 4px; }
.shot-figure-business-card { width: 80%; justify-self: center; border-left: 3px solid var(--c); text-align: left; }
.shot-figure-business-card span:first-child { color: var(--muted); }
.shot-figure-business-card span:last-child { font-size: 1.3em; font-weight: 650; }
.shot-figure-resume span:not(:first-child) { border-top: 1px solid var(--line); text-align: left; padding-top: 2px; }
.shot-figure-eye {
  justify-self: center;
  width: 1.75em;
  aspect-ratio: 1;
  border: 4px solid var(--text);
  border-right-color: transparent;
  border-radius: 50%;
}
.shot-figure-practice span { flex: 1; border: 1px solid var(--line); min-height: 1.45em; font-size: 1.3em; }
.shot-figure-practice span:not(:first-child) { color: var(--muted); background: var(--bg); }

@media (min-width: 900px) {
  .top-shot-ui { --shot-pad: 9px; --shot-gap: 5px; }
}

/* 短い言葉（ボタン・表の見出しなど）は、途中で折り返さない */
.shot-action, .shot-label, .shot-table-row span, .shot-keys span, .shot-figure-morse span { white-space: nowrap; }

/* スマホの幅：表とボタンの左右の余白を詰めて、言葉を1行に収める */
@media (max-width: 380px) {
  .shot-table-row span, .shot-action, .shot-figure-morse span { padding-inline: 1px; }
}

@media (max-width: 360px) {
  .top-shot-ui {
    --shot-pad: 4px;
    --shot-gap: 3px;
    width: calc(100% - 8px);
  }
  .shot-table-row span, .shot-keys span { padding-block: 1px; }
  .shot-table { gap: 1px; }
}
