/* House > Storage, folded in from Bins (2026-10-16).

   The tote is Bins' signature and it stays: a body in the tote's own color, a
   lid band across the top in the lid's color, two latches. The one on screen
   should look like the one on the shelf. Everything around it is Upkeep:
   Figtree, Title Case, white cards, the House teal for focus and selection. */

.sto-find {
  display:flex; align-items:center; gap:9px; margin:14px 0 4px; padding:0 8px 0 14px; height:var(--control-h);
  border:1.5px solid var(--line); border-radius:16px; background:var(--card); color:var(--slate);
}
.sto-find:focus-within { border-color:var(--teal); box-shadow:0 0 0 3px rgba(18,165,148,.16); }
.sto-find input { flex:1; min-width:0; height:100%; border:none !important; background:none; box-shadow:none !important; padding:0; font-size:16px; outline:none; }
h2 + .sto-find { margin-top:0; margin-bottom:10px; }
.sto-chips { padding-top:10px; }
.sto-hit { color:var(--teal) !important; font-weight:700; }

/* A zone in miniature: its slots as little lids. */
.sto-zone-ico { background:#FFF5D6; }
.sto-mini { display:grid; grid-template-columns:repeat(var(--c), 1fr); gap:2px; width:30px; }
.sto-mini i { display:block; height:5px; border-radius:1.5px; background:#E2B414; }

/* ---- The tote ---- */
.tote {
  --tub:#17191b; --lid:#F5C21B;
  position:relative; min-height:96px; min-width:0; padding:26px 10px 10px; cursor:pointer; overflow:hidden;
  display:flex; flex-direction:column; gap:3px; color:#fff;
  background:var(--tub); border:1px solid rgba(0,0,0,.25); border-radius:8px 8px 14px 14px;
  box-shadow:0 1px 2px rgba(16,24,40,.12), 0 6px 16px -8px rgba(16,24,40,.35);
  -webkit-user-select:none; user-select:none; -webkit-touch-callout:none; touch-action:manipulation;
  transition:transform .12s ease, box-shadow .12s ease;
}
.tote::before { content:""; position:absolute; top:0; left:0; right:0; height:17px; background:var(--lid); border-bottom:2px solid rgba(0,0,0,.55); }
.tote::after {
  content:""; position:absolute; top:4px; left:50%; transform:translateX(-50%); width:50px; height:8px; border-radius:2px;
  background:linear-gradient(90deg, rgba(0,0,0,.75) 0 9px, transparent 9px 41px, rgba(0,0,0,.75) 41px 50px);
}
.tote strong { font-size:14.5px; font-weight:800; line-height:1.2; overflow-wrap:anywhere;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.tote .tote-sub { font-size:12px; font-weight:600; opacity:.72; }
.tote.light { color:#17191b; }
.tote .tote-cam { position:absolute; right:7px; bottom:6px; opacity:.6; }
.tote:hover { transform:translateY(-1px); }
.tote:focus-visible { outline:2.5px solid var(--teal); outline-offset:2px; }
.tote.add {
  align-items:center; justify-content:center; padding:10px; background:transparent; color:var(--faint);
  border:2px dashed #D9D6CF; box-shadow:none;
}
.tote.add::before, .tote.add::after { display:none; }
.tote.add:hover { border-color:var(--teal); color:var(--teal); transform:none; }

.sto-board { margin-top:14px; }
.sto-gridwrap { overflow-x:auto; -webkit-overflow-scrolling:touch; padding:2px 2px 6px; margin:0 -2px; }
.sto-grid { display:grid; gap:10px; }
.sto-loose { display:grid; grid-template-columns:repeat(auto-fill, minmax(104px, 1fr)); gap:10px; }

/* The Floor: totes set aside to free a slot, droppable into any rack. */
.sto-floor { margin-top:14px; padding:12px 14px; border:2px dashed #D9D6CF; border-radius:var(--r); background:rgba(255,255,255,.5); }
.sto-floor-label { font-size:13px; font-weight:800; color:var(--slate); margin-bottom:8px; }
.sto-floor-items { display:flex; flex-wrap:wrap; gap:8px; }
.floorchip {
  display:flex; align-items:center; gap:8px; padding:8px 12px; border-radius:12px; background:var(--card); box-shadow:var(--shadow);
  cursor:grab; -webkit-user-select:none; user-select:none; -webkit-touch-callout:none; touch-action:manipulation;
}
.floorchip strong { font-size:14px; }

/* Dragging. A long-press lifts the tote; the page stops panning under it. */
.tote.dragging, .floorchip.dragging { opacity:.25; }
.tote-ghost { position:fixed; z-index:400; margin:0; pointer-events:none; opacity:.97; transform:scale(1.05) rotate(-1.5deg); box-shadow:0 22px 44px -12px rgba(0,0,0,.55); }
.tote.drop-target, .sto-floor.drop-target { outline:2.5px dashed var(--teal); outline-offset:3px; }
.sto-floor.drop-target { background:#EAF7F4; }
.dnd-lock, .dnd-lock .tote, .tote.dragging, .floorchip.dragging { touch-action:none; }

/* The All overview, grouped by zone. */
.sto-sec { margin-bottom:22px; }
.sto-sec-head { display:flex; justify-content:space-between; align-items:baseline; margin:0 2px 10px; padding-bottom:6px; border-bottom:1px solid var(--line); font-weight:800; }

/* A tote glyph for lists and the detail page. */
.toteglyph { --tub:#17191b; --lid:#F5C21B; position:relative; display:inline-block; flex:none; width:40px; height:30px;
  background:var(--tub); border-radius:4px 4px 7px 7px; box-shadow:inset 0 0 0 1px rgba(0,0,0,.25); }
.toteglyph::before { content:""; position:absolute; top:0; left:0; right:0; height:9px; background:var(--lid); border-radius:4px 4px 0 0; border-bottom:1.5px solid rgba(0,0,0,.5); }
.li > .toteglyph { margin:0 3px; }
.toteglyph.lg { width:120px; height:88px; border-radius:8px 8px 16px 16px; }
.toteglyph.lg::before { height:24px; border-radius:8px 8px 0 0; border-bottom-width:3px; }

/* ---- One container ---- */
.sto-hero { position:relative; display:flex; align-items:center; justify-content:center; height:180px; margin:4px 0 16px;
  border-radius:var(--r-lg); background:var(--card); box-shadow:var(--shadow); overflow:hidden; }
.sto-hero img { width:100%; height:100%; object-fit:cover; display:block; }
/* No photo yet: the tote drawing with the button under it. A photo fills the
   card and the button floats in its corner. */
.sto-hero:not(.has-photo) { flex-direction:column; gap:14px; }
.sto-hero.has-photo .sto-photo-btn { position:absolute; right:10px; bottom:10px; }
.sto-title { width:100%; border:none; background:none; padding:0; font:800 30px/1.1 var(--font); letter-spacing:-.02em; color:var(--ink); }
.sto-title:focus { outline:none; box-shadow:inset 0 -2px 0 var(--teal); }
.sto-notes { width:100%; min-height:180px; margin-top:10px; font:500 16px/1.6 var(--font); }
.prompt.busy { opacity:.6; pointer-events:none; }
.sto-typechips { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:14px; }
.sto-colorrow { display:flex; align-items:center; gap:12px; padding:10px 0; border-top:1px solid var(--line); }
.sto-colorrow > span { flex:none; width:40px; font-size:13.5px; font-weight:700; color:var(--slate); }
.sto-colorrow > div { display:flex; flex-wrap:wrap; gap:8px; }
.sto-swatch { width:32px; height:32px; padding:0; border-radius:50%; border:1px solid rgba(0,0,0,.2); cursor:pointer; }
.sto-swatch.on { box-shadow:0 0 0 2px var(--card), 0 0 0 4.5px var(--teal); }

/* Rack or Loose. */
.sto-seg { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.sto-seg button { display:flex; flex-direction:column; align-items:flex-start; gap:2px; padding:12px 14px; text-align:left; cursor:pointer;
  border:1.5px solid var(--line); border-radius:14px; background:var(--card); }
.sto-seg button span { font-size:12.5px; color:var(--slate); }
.sto-seg button.on { border-color:var(--teal); box-shadow:0 0 0 3px rgba(18,165,148,.16); }

@media (prefers-reduced-motion: reduce) { .tote, .tote-ghost { transition:none; transform:none; } }
