/* Pool Labeler, phone (swipe) page */
.sw-body { background: #0f172a; color: #e2e8f0; overscroll-behavior: none; touch-action: pan-y; }
.sw-main { max-width: 560px; margin: 0 auto; padding: 0.5rem 0.6rem 1rem; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.sw-top { display: flex; justify-content: space-between; align-items: center; padding: 0.2rem 0 0.4rem; }
.sw-progress { font-size: 0.85rem; color: #94a3b8; }
.sw-progress b { color: #f8fafc; }
.sw-top-btns { display: flex; gap: 0.4rem; }
.sw-icon { width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 1px solid #334155; background: #1e293b; color: #e2e8f0; font-size: 1.1rem; font-weight: 700; }
.sw-meta { font-size: 0.8rem; color: #cbd5e1; padding-bottom: 0.4rem; min-height: 1.2rem; }
.sw-meta b { color: #f8fafc; }

.sw-stage { position: relative; width: 100%; aspect-ratio: 1 / 1; }
.sw-card {
  position: absolute; inset: 0; border-radius: 0.9rem; overflow: hidden; background: #111; box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  touch-action: none; user-select: none; will-change: transform;
}
.sw-card img { width: 100%; height: 100%; display: block; pointer-events: none; transform-origin: center center; will-change: transform; }
.sw-stamp {
  position: absolute; top: 1rem; padding: 0.3rem 0.8rem; border: 4px solid; border-radius: 0.5rem; font-weight: 900; font-size: 1.6rem;
  letter-spacing: 0.05em; opacity: 0; transition: opacity 0.1s; transform: rotate(-12deg); text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.sw-stamp-good { left: 1rem; color: #22c55e; border-color: #22c55e; }
.sw-stamp-bad { right: 1rem; color: #ef4444; border-color: #ef4444; transform: rotate(12deg); }
.sw-stamp-unsure { left: 50%; top: 40%; transform: translateX(-50%) rotate(0); color: #eab308; border-color: #eab308; }
.sw-card.sw-good .sw-stamp-good, .sw-card.sw-bad .sw-stamp-bad, .sw-card.sw-unsure .sw-stamp-unsure { opacity: 1; }
.sw-dots { position: absolute; bottom: 0.5rem; left: 50%; transform: translateX(-50%); display: flex; gap: 0.35rem; }
.sw-dots i { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: rgba(255,255,255,0.35); }
.sw-dots i.on { background: #fff; }
.sw-done { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 1.5rem; color: #cbd5e1; background: #1e293b; border-radius: 0.9rem; }

.sw-thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.5rem; }
.sw-thumbs img { width: 100%; aspect-ratio: 1 / 1; border-radius: 0.5rem; background: #111; }

.sw-bar { display: grid; grid-template-columns: 1fr 1.3fr 1.3fr 1fr 1fr; gap: 0.4rem; margin-top: 0.7rem; }
.sw-btn { padding: 0.85rem 0.2rem; border-radius: 0.7rem; border: 1px solid #334155; background: #1e293b; color: #e2e8f0; font-weight: 700; font-size: 0.85rem; font-family: inherit; }
.sw-btn-good { background: #15803d; border-color: #15803d; color: #fff; }
.sw-btn-bad { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.sw-legend { font-size: 0.7rem; color: #94a3b8; padding-top: 0.6rem; text-align: center; }
.sw-legend i { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 2px; vertical-align: -1px; margin: 0 0.2rem 0 0.6rem; }

/* bottom sheets */
.sw-sheet { position: fixed; inset: 0; background: rgba(2, 6, 23, 0.6); z-index: 300; display: flex; align-items: flex-end; }
.sw-sheet-card { width: 100%; max-width: 560px; margin: 0 auto; background: #fff; color: #0f172a; border-radius: 1rem 1rem 0 0; padding: 1rem 1rem 1.5rem; max-height: 85vh; overflow-y: auto; }
.sw-sheet-card h3 { font-size: 1.1rem; margin-bottom: 0.6rem; }
.sw-reason { display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: left; padding: 0.75rem 0.9rem; margin-bottom: 0.45rem; border-radius: 0.6rem; border: 1px solid #cbd5e1; background: #f8fafc; font-family: inherit; font-size: 1rem; font-weight: 700; color: #0f172a; }
.sw-reason small { font-weight: 500; font-size: 0.78rem; color: #64748b; }
.sw-reason-cancel { background: #fff; color: #475569; text-align: center; align-items: center; }
.sw-link { text-decoration: none; }
.sw-field { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.8rem; color: #475569; margin-bottom: 0.7rem; }
.sw-field select { padding: 0.55rem 0.6rem; border: 1px solid #cbd5e1; border-radius: 0.5rem; font-size: 1rem; font-family: inherit; }
.sw-filter-count { font-size: 0.8rem; color: #64748b; margin-bottom: 0.7rem; }
.sw-check span { flex-direction: row; display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: #0f172a; }

/* dark-page overrides for the shared modals */
.sw-body .pl-modal-card { color: #0f172a; }
.sw-body .pl-toast { bottom: 5.5rem; }

/* reason sheet: two images side by side, then 3 x 2 square buttons */
.sw-reason-card { padding-top: 0.75rem; }
.sw-sheet-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; margin-bottom: 0.6rem; }
.sw-sheet-imgs img { width: 100%; aspect-ratio: 1 / 1; border-radius: 0.5rem; background: #111; }
.sw-reason-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.45rem; margin-bottom: 0.45rem; }
.sw-reason-sq { aspect-ratio: 1 / 1; align-items: center; justify-content: center; text-align: center; margin: 0; padding: 0.4rem; font-size: 0.9rem; line-height: 1.15; }
.sw-reason-sq small { font-size: 0.68rem; margin-top: 0.25rem; }
.sw-reason-sq[data-label="2"], .sw-reason-sq[data-label="3"] { border-color: #f59e0b; }
.sw-reason-sq[data-label="4"] { border-color: #8b5cf6; }
.sw-reason-sq[data-label="5"] { border-color: #3b82f6; }
.sw-reason-sq[data-label="6"] { border-color: #ef4444; }
.sw-reason-sq[data-label="7"] { border-color: #64748b; }

/* first-visit guide overlay */
.sw-tour { position: fixed; inset: 0; z-index: 400; background: rgba(2, 6, 23, 0.82); color: #f8fafc; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.sw-tour-close { position: absolute; top: 0.6rem; right: 0.8rem; width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 2px solid #f8fafc; background: transparent; color: #f8fafc; font-size: 1.6rem; line-height: 1; }
.sw-tour-body { max-width: 420px; width: 100%; }
.sw-tour-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.1rem; font-size: 1rem; line-height: 1.3; }
.sw-tour-row b { color: #fff; }
.sw-tour-arrow { flex: 0 0 3.4rem; height: 3.4rem; display: flex; align-items: center; justify-content: center; font-size: 2.4rem; font-weight: 700; border: 2px solid #f8fafc; border-radius: 0.8rem; }
.sw-tour-row:nth-child(1) .sw-tour-arrow { color: #22c55e; border-color: #22c55e; }
.sw-tour-row:nth-child(2) .sw-tour-arrow { color: #ef4444; border-color: #ef4444; }
.sw-tour-row:nth-child(3) .sw-tour-arrow { color: #eab308; border-color: #eab308; }
.sw-tour-tap { font-size: 1.4rem; }
.sw-tour-note { font-size: 0.85rem; color: #cbd5e1; margin: 0.4rem 0 1rem; }
.sw-tour-actions { display: flex; gap: 0.6rem; }
.sw-tour-actions .tv-btn { padding: 0.7rem 1.2rem; font-size: 0.95rem; }
