/* s- : item sheet + add sheet */
.s-sheet { position: fixed; inset: 0; z-index: 50; background: var(--bg); color: var(--fg); overflow-y: auto; overscroll-behavior: contain; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.s-back { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); border: 0; background: var(--bg); color: var(--fg); }
.s-icon { display: inline-flex; width: 24px; height: 24px; }
.s-icon svg { width: 100%; height: 100%; }
.s-body { display: flex; flex-direction: column; gap: 14px; padding: 0 14px 28px; }
.s-thumbs, .s-strip { display: flex; gap: var(--gap); overflow-x: auto; padding-bottom: 4px; }
.s-thumb, .s-photo, .s-addtile { position: relative; flex: 0 0 auto; width: 112px; height: 112px; border-radius: var(--radius); overflow: hidden; background: var(--card); }
.s-thumb img, .s-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.s-thumb { display: flex; align-items: center; justify-content: center; }
.s-thumb.is-done { outline: 3px solid var(--keep); outline-offset: -3px; }
.s-thumb.is-fail { outline: 3px solid #d33; outline-offset: -3px; }
.s-thumb.is-bad { color: #d33; }
.s-spin { width: 24px; height: 24px; border: 3px solid var(--line); border-top-color: var(--fg); border-radius: 50%; animation: s-rot .8s linear infinite; }
@keyframes s-rot { to { transform: rotate(360deg); } }
.s-x { position: absolute; top: 4px; right: 4px; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border: 0; background: none; color: #fff; }
.s-x .s-icon { width: 28px; height: 28px; padding: 3px; border-radius: 50%; background: rgba(0,0,0,.6); }
.s-addtile { display: flex; align-items: center; justify-content: center; border: 2px dashed var(--line); background: none; color: var(--muted); cursor: pointer; }
.s-addtile.is-busy { opacity: .4; pointer-events: none; }
.s-note, .s-select { width: 100%; padding: 12px; font: inherit; font-size: 16px; color: var(--fg); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.s-select { min-height: var(--tap); }
.s-note { resize: vertical; }
.s-primary, .s-danger { min-height: var(--tap); padding: 0 20px; font: inherit; font-weight: 600; border-radius: var(--radius); border: 0; }
.s-primary { background: var(--accent); color: #fff; }
.s-primary:disabled { opacity: .4; }
.s-danger { background: none; color: #d33; border: 1px solid #d33; }
.s-status { min-height: 1.2em; color: var(--muted); font-size: 14px; }
.s-pill { align-self: flex-start; padding: 8px 14px; border-radius: 999px; font-weight: 600; background: var(--card); border: 1px solid var(--line); color: var(--muted); }
.s-pill.is-keep { background: var(--keep); color: var(--keep-fg); border-color: var(--keep); }
.s-pill.is-not { color: var(--not); }
