/* 15:00 · Stock (stock.js). The markup is the end: the search typed, two
   Stone Island rows left, 00106 open, and the answer given. */

.stock-scene { position: relative; display: grid; place-items: center; padding: 56px 0; }
.stock .phone { --pw: 330; }

.bubble {
  position: absolute; z-index: 5; max-width: 220px; margin: 0;
  padding: 12px 16px; border-radius: 20px;
  font-size: 17px; font-weight: 600; line-height: 1.3;
  box-shadow: var(--shadow-card);
}
.bubble.ask { left: 0; top: 24px; background: var(--surface); border: 1px solid var(--line-soft); border-bottom-left-radius: 6px; }
.bubble.answer { right: 0; bottom: 80px; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 6px; }

/* The Stock screen. */
.st-screen { padding: 60px 16px 0; background: var(--ground); }
.st-screen .search {
  position: relative; margin-top: 14px; display: flex; align-items: center; gap: 8px;
  height: 46px; padding: 0 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--field); font-size: 16px;
}
.st-screen .search svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; }
.st-screen .search .ph { display: none; color: var(--faint); }
.st-screen .search .val:empty { display: none; }
.st-screen .search .val:empty + .ph { display: inline; }
.st-screen .search.typing .val::after { content: ""; display: inline-block; width: 1.5px; height: 18px; margin-left: 1px; vertical-align: -3px; background: var(--accent); }
.st-screen .filters { margin-top: 12px; display: flex; gap: 6px; overflow: hidden; }
.st-screen .filters span { flex: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; }
.st-screen .filters .on { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.st-screen .rows { margin-top: 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line-soft); overflow: hidden; }
.st-screen .row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }
.st-screen .row:last-child { border-bottom: 0; }
.st-screen .row[data-filtered] { display: none; }
.st-screen .row .photo { flex: none; width: 40px; border-radius: 8px; background-size: 70%; }
.st-screen .rw { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.st-screen .rn { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-screen .rm { font-size: 12px; color: var(--muted); }
.st-screen .rs { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.st-screen .rp { font-size: 14px; font-weight: 600; }

/* The piece, opened as a sheet. */
.phone .st-sheet {
  top: auto; height: 470px; padding: 10px 18px 0;
  border-radius: 28px 28px 0 0; background: var(--surface);
  box-shadow: 0 -10px 40px -16px rgba(20,29,35,.35);
}
.st-sheet .grab { display: block; width: 40px; height: 5px; margin: 0 auto 14px; border-radius: 3px; background: var(--line); }
.sh-head { display: flex; gap: 14px; align-items: center; }
.sh-head .photo { width: 72px; border-radius: 12px; }
.sh-head > span:last-child { display: flex; flex-direction: column; }
.sh-name { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.sh-no { font-size: 13px; color: var(--muted); }
.sh-stats { margin-top: 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sh-stats > span { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); }
.sh-stats .k, .sh-hist .k { font-size: 12px; color: var(--muted); }
.sh-stats .v { font-size: 16px; font-weight: 600; }
.sh-stats .v.good { color: var(--good); }
.sh-days { margin-top: 12px; font-size: 14px; color: var(--muted); }
.sh-hist { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.sh-hist .ev { position: relative; padding-left: 18px; font-size: 14px; }
.sh-hist .ev::before { content: ""; position: absolute; left: 2px; top: .45em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

@media (max-width: 767px) {
  .stock-scene { padding: 72px 0 96px; }
  .stock .phone { --pw: 290; }
  .bubble { font-size: 15px; }
  .bubble.ask { top: 0; }
  .bubble.answer { bottom: 24px; }
}
