/* 겹쳐 뜨는 화면 공통 */
.dim {
  position: absolute; inset: 0;
  background: rgba(13,10,38,.3);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  opacity: 0; transition: opacity 250ms var(--ease);
}
.dim.on { opacity: 1; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .dim { background: rgba(13,10,38,.55); } }
.dim.plain { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(30,24,81,.4); }

/* 팝업 (피그마 Popup · 300 · 반경 28) */
.popup-wrap { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; }
.popup {
  position: relative; width: min(300px, 100%);
  padding: 28px 24px 24px; border-radius: 28px; background: var(--white);
  box-shadow: var(--shadow-popup); text-align: center;
  display: flex; flex-direction: column; align-items: center;
  transform: scale(.92); opacity: 0;
  transition: transform 300ms var(--ease), opacity 200ms var(--ease);
}
.popup.on { transform: none; opacity: 1; }
.popup .app-icon { --s: 72px; }
.popup .app-icon .lock-badge { width: 29px; height: 29px; top: -6px; right: -7px; box-shadow: 0 0 0 2.4px var(--white); }
.popup .tag { margin-top: 12px; height: 19px; padding: 0 10px; border-radius: 10px; background: var(--brand-sky); color: var(--brand-blue); font-size: 11px; font-weight: 700; line-height: 19px; letter-spacing: 0; }
.popup h2 { margin-top: 12px; font-size: 20px; font-weight: 700; line-height: 1.35; letter-spacing: -0.05em; }
.popup p { margin-top: 12px; font-size: 14px; line-height: 1.45; color: var(--text-secondary); letter-spacing: -0.03em; }
.popup .btn { margin-top: 12px; height: 44px; font-size: 14px; }
.popup .close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-snow); display: grid; place-items: center; color: #5C5C70; }
.popup .close::after { content: ""; position: absolute; inset: -6px; }
.popup .close svg { width: 16px; height: 16px; }

/* 위에서 내려오는 배너 (반전 메시지) */
.drop-banner {
  position: absolute; left: calc(16px + var(--sal)); right: calc(16px + var(--sar));
  top: calc(54px + var(--sat));
  transform: translateY(calc(-100% - 80px));
  transition: transform 420ms var(--ease);
  touch-action: none;
}
.drop-banner.on { transform: translateY(0); }

/* 알림 센터 (위에서 끌어내림) */
.nc {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  color: var(--white);
  transform: translateY(-100%);
  transition: transform 380ms var(--ease);
  touch-action: pan-y;
}
.nc.on { transform: translateY(0); }
.nc .nc-bg { position: absolute; inset: 0; background: rgba(30,24,81,.55); -webkit-backdrop-filter: blur(30px) saturate(1.4); backdrop-filter: blur(30px) saturate(1.4); }
/* 목록 위·아래가 딱 잘리지 않고 흐려지며 사라지게 + 맨 아래 손잡이 칸도 같은 배경으로 이어짐 */
.fade-edges {
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 18px, #000 calc(100% - 32px), transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 18px, #000 calc(100% - 32px), transparent 100%);
}
.nc .head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.nc .clear-all { flex: none; height: 32px; padding: 0 14px; border-radius: 16px; background: rgba(255,255,255,.16); color: var(--white); font-size: 13px; font-weight: 700; }
.nc .nc-empty { padding: 48px 0; text-align: center; font-size: 15px; color: rgba(255,255,255,.7); }
.nc .list .notif, .lock-notifs .notif { touch-action: pan-y; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .nc .nc-bg { background: rgba(16,12,51,.94); } }
.nc > *:not(.nc-bg) { position: relative; }
.nc .head { padding: 12px calc(var(--gutter) + var(--sar)) 12px calc(var(--gutter) + var(--sal)); }
.nc .head h2 { font-size: 28px; font-weight: 700; letter-spacing: -0.05em; }
.nc .head p { margin-top: 4px; font-size: 13px; font-weight: 500; opacity: .7; }
.nc .list { padding: 0 calc(16px + var(--sar)) 24px calc(16px + var(--sal)); display: flex; flex-direction: column; gap: 8px; }
.nc .group { font-size: 14px; font-weight: 700; opacity: .75; margin: 8px 4px 0; }
.nc .handle { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 0 calc(14px + var(--sab)); font-size: 12px; font-weight: 500; color: rgba(255,255,255,.7); }
.nc .handle i { width: 40px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.6); }

/* 바텀 시트 */
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: calc(100% - 64px - var(--sat));
  display: flex; flex-direction: column;
  background: var(--white); border-radius: 24px 24px 0 0;
  padding-bottom: calc(34px + var(--sab));
  transform: translateY(100%);
  transition: transform 340ms var(--ease);
  touch-action: none;
}
.sheet.on { transform: translateY(0); }
.sheet .grab { flex: none; padding: 8px 0 4px; display: grid; place-items: center; cursor: grab; }
.sheet .grab i { width: 36px; height: 5px; border-radius: 3px; background: rgba(30,24,81,.18); }
.sheet .sheet-head { display: flex; align-items: center; gap: 12px; padding: 8px 20px 4px 24px; }
.sheet .sheet-head h2 { flex: 1; font-size: 20px; font-weight: 700; letter-spacing: -0.04em; }
.sheet .sheet-head .close { width: 32px; height: 32px; border-radius: 50%; background: #EEF1FB; display: grid; place-items: center; color: #5C5C70; position: relative; }
.sheet .sheet-head .close::after { content: ""; position: absolute; inset: -6px; }
.sheet .sheet-head .close svg { width: 16px; height: 16px; }
.sheet .sheet-body { padding: 8px 24px 0; overflow-y: auto; touch-action: pan-y; display: flex; flex-direction: column; gap: 16px; }
