/* ════════════════════════════════════════════════════════════
   Gestures + states CSS
   ════════════════════════════════════════════════════════════ */

.swipe-wrap { position: relative; overflow: hidden; }
.swipe-tray {
  position: absolute; inset: 0;
  display: flex; align-items: stretch;
  pointer-events: none;
}
.swipe-tray.left { justify-content: flex-start; }
.swipe-tray.right { justify-content: flex-end; }
.swipe-act {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  padding: 0 18px;
  color: #fff;
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.02em;
}
.swipe-content { background: inherit; touch-action: pan-y; will-change: transform; }

.peek-trigger { display: contents; }
.peek-veil {
  position: fixed; inset: 0; z-index: 8500;
  background: color-mix(in oklab, #000 50%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: veilIn var(--dur-base) var(--ease-decelerate);
}
.peek-card {
  position: fixed;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: min(360px, 86vw);
  background: var(--bg-1, #1c1c1e);
  color: var(--text-1, #fff);
  border-radius: 14px;
  box-shadow: var(--shadow-pop);
  z-index: 8501;
  animation: peekIn var(--dur-slow) var(--ease-spring-soft);
  overflow: hidden;
}
@keyframes peekIn {
  from { transform: translate(-50%,-50%) scale(0.86); opacity: 0; }
  to   { transform: translate(-50%,-50%) scale(1); opacity: 1; }
}
.peek-body { padding: 16px; max-height: 60vh; overflow: auto; }
.peek-cta {
  width: 100%;
  padding: 12px;
  border: none; border-top: 0.5px solid var(--border);
  background: transparent;
  color: #0a84ff;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  letter-spacing: -0.005em;
}
.peek-cta:hover { background: color-mix(in oklab, #0a84ff 8%, transparent); }

/* Skeleton shimmer */
.skel {
  position: relative;
  overflow: hidden;
  background: color-mix(in oklab, var(--text-3, #999) 18%, transparent);
}
.skel::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg,
    transparent,
    color-mix(in oklab, var(--text-1, #fff) 14%, transparent),
    transparent);
  animation: skelShimmer 1.4s var(--ease-standard) infinite;
}
@keyframes skelShimmer {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}

/* Empty state */
.empty-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 48px 24px;
  text-align: center;
  gap: 8px;
}
.es-glyph {
  font-size: 44px;
  color: var(--text-3, #999);
  opacity: 0.7;
  font-family: var(--font-serif, var(--font-sans));
  margin-bottom: 4px;
}
.es-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-1);
  letter-spacing: -0.01em;
}
.es-hint {
  font-size: 13px;
  color: var(--text-3);
  max-width: 280px;
  line-height: 1.5;
  text-wrap: pretty;
}
.es-cta {
  margin-top: 14px;
  padding: 9px 20px;
  border-radius: 999px;
  border: none;
  background: #0a84ff;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: -0.005em;
  transition: transform var(--dur-fast) var(--ease-standard), background var(--dur-fast);
}
.es-cta:hover { background: #0070e5; }
.es-cta:active { transform: scale(0.96); }

/* Error bar */
.err-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  margin: 8px 12px;
  background: color-mix(in oklab, #f5a524 12%, var(--bg-1));
  border: 0.5px solid color-mix(in oklab, #f5a524 50%, transparent);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--text-1);
}
.err-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #f5a524;
  flex-shrink: 0;
  box-shadow: 0 0 6px #f5a524;
}
.err-msg { flex: 1; }
.err-retry {
  background: transparent; border: none;
  color: #0a84ff;
  font-size: 12px; font-weight: 600;
  cursor: pointer;
}

/* ─── P1-1 block-hover handles (Notion-style) ─────────────── */
.nb-block { position: relative; }
.nb-handles {
  position: absolute;
  left: -34px; top: 4px;
  display: flex; gap: 2px;
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-standard);
}
.nb-block:hover .nb-handles { opacity: 1; }
.nb-handle {
  width: 18px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: none;
  border-radius: 4px;
  color: var(--text-3, #999);
  font-size: 14px; cursor: grab;
  transition: background var(--dur-fast);
}
.nb-handle:hover { background: color-mix(in oklab, var(--text-3) 18%, transparent); color: var(--text-1); }

/* ─── Dynamic Island-style top status pill ─────────────────── */
.island-pill {
  position: absolute;
  top: max(env(safe-area-inset-top, 10px), 10px);
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center; gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #000;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.02em;
  z-index: 50;
  box-shadow: var(--shadow-2);
}
.island-pill .ip-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--up-strong, #34c759);
  box-shadow: 0 0 4px var(--up-strong);
}
.island-pill .ip-dot.closed { background: var(--text-3); box-shadow: none; }
.island-pill .ip-val {
  font-family: var(--font-mono);
  font-weight: 600;
}
.island-pill .ip-val.up   { color: #34c759; }
.island-pill .ip-val.down { color: #ff453a; }
