:root {
  --bg: #ffffff;
  --ink: #17171a;
  --soft: rgba(23, 23, 26, 0.58);
  --line: rgba(23, 23, 26, 0.1);
  --good: #128a5e;
  --low: #d48806;
  --out: #d9432f;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 10px 12px;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; outline: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.sr, .live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.iv { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; width: min(348px, 100%); padding: 16px 14px 8px; border-radius: 26px; background: #ffffff; box-shadow: inset 0 0 0 1.500px var(--line), 0 30px 44px -30px rgba(23, 23, 26, 0.4); }
.iv__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 0 2px; }
.iv__head strong { font-size: 16px; line-height: 20px; font-weight: 740; letter-spacing: -0.01em; }
.iv__sum { display: block; height: 16px; overflow: hidden; font-size: 12.500px; line-height: 16px; font-weight: 660; color: var(--soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
.iv__sum span { display: block; }

.iv__table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.iv__table th { height: 22px; padding: 0 2px; font-size: 10.500px; font-weight: 660; color: var(--soft); text-align: left; }
.iv__table th:nth-child(1) { width: 37%; }
.iv__table th:nth-child(2) { width: 37%; }
.iv__table td { height: 50px; padding: 0 2px; vertical-align: middle; box-shadow: inset 0 1px 0 var(--line); }
.iv__name { display: grid; gap: 1px; min-width: 0; padding-right: 8px; }
.iv__name b { font-size: 13px; line-height: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iv__name i { font-style: normal; font-size: 10.500px; line-height: 13px; font-weight: 620; letter-spacing: 0.03em; color: var(--soft); font-variant-numeric: tabular-nums; }
.iv__stock { display: grid; gap: 4px; padding-right: 10px; }
.iv__nums { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; font-size: 11px; line-height: 14px; white-space: nowrap; }
.iv__nums b { font-size: 13px; font-weight: 740; font-variant-numeric: tabular-nums; }
.iv__state { display: block; height: 14px; overflow: hidden; font-weight: 700; color: var(--tone); transition: color 0.3s; }
.iv__state span { display: block; }
.iv__bar { position: relative; display: block; height: 6px; border-radius: 3px; background: rgba(23, 23, 26, 0.08); overflow: hidden; }
.iv__bar i { position: absolute; inset: 0; border-radius: 3px; background: var(--tone); transform-origin: 0 50%; transition: background-color 0.3s; }
tr[data-state="good"] { --tone: var(--good); }
tr[data-state="low"] { --tone: var(--low); }
tr[data-state="out"] { --tone: var(--out); }
.iv__act { text-align: right; }
.iv__btn { position: relative; display: block; margin-left: auto; width: 78px; height: 32px; border-radius: 16px; background: var(--ink); color: #ffffff; overflow: hidden; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 8px 12px -8px rgba(23, 23, 26, 0.7); transition: background-color 0.3s, color 0.3s, box-shadow 0.3s; }
.iv__btn.is-done { background: rgba(23, 23, 26, 0.06); color: var(--soft); box-shadow: none; cursor: default; }
.iv__btn:focus-visible { box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--ink); }
.iv__face { position: absolute; inset: 0; display: flex; justify-content: center; align-items: center; gap: 4px; font-size: 12px; font-weight: 720; white-space: nowrap; font-variant-numeric: tabular-nums; }
.iv__face[data-face="done"] { opacity: 0; }
.iv__face svg { display: block; width: 13px; height: 13px; fill: none; stroke: var(--good); stroke-width: 2.200; stroke-linecap: round; stroke-linejoin: round; }
.iv__face path { stroke-dasharray: 1; stroke-dashoffset: 1; }

.ghost { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -3px 0 0 -5px; transform-origin: 20% 15%; pointer-events: none; opacity: 0; fill: #17171a; stroke: #ffffff; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)); z-index: 6; }

@media (max-width: 350px) { .iv__btn { width: 72px; } .iv__face { font-size: 11px; } .iv__name b { font-size: 12.500px; } }
@media (prefers-reduced-motion: reduce) { .iv__state, .iv__bar i, .iv__btn { transition: none; } }
