/* ───────── 앱 공통 틀 ───────── */
.app {
  z-index: 10; background: #fff; overflow: hidden;
  border-radius: 0;
}
.app.opening { animation: appOpen .42s cubic-bezier(.2, .85, .25, 1) both; }
.app.closing { animation: appClose .32s cubic-bezier(.45, 0, .7, .6) both; pointer-events: none; }
@keyframes appOpen { from { transform: scale(.16); opacity: 0; border-radius: 80px; } 60% { opacity: 1; } to { transform: none; border-radius: 0; } }
@keyframes appClose { from { transform: none; opacity: 1; } to { transform: scale(.2); opacity: 0; border-radius: 80px; } }

.page {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: #fff;
}
.page.push-in { animation: pushIn .35s cubic-bezier(.3, .8, .3, 1) both; z-index: 2; box-shadow: -6px 0 20px rgba(0,0,0,.08); }
.page.push-out { animation: pushOut .35s cubic-bezier(.3, .8, .3, 1) both; }
.page.pop-in { animation: popIn .35s cubic-bezier(.3, .8, .3, 1) both; }
.page.pop-out { animation: popOut .35s cubic-bezier(.3, .8, .3, 1) both; z-index: 2; }
@keyframes pushIn { from { transform: translateX(100%); } to { transform: none; } }
@keyframes pushOut { to { transform: translateX(-30%); filter: brightness(.9); } }
@keyframes popIn { from { transform: translateX(-30%); filter: brightness(.9); } to { transform: none; } }
@keyframes popOut { to { transform: translateX(100%); } }

.page-head {
  flex: none; position: relative; z-index: 3;
  padding-top: calc(var(--sb-h) + var(--safe-top));
  background: rgba(249, 249, 249, .94);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border-bottom: .5px solid rgba(0, 0, 0, .15);
}
.nav { height: 44px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 8px; }
.nav-left { justify-self: start; }
.nav-right { justify-self: end; padding-right: 8px; }
.nav-title { font-size: 17px; font-weight: 600; letter-spacing: -.3px; transition: opacity .2s; }
.nav-back { display: flex; align-items: center; gap: 5px; color: var(--blue); font-size: 17px; padding: 6px 4px; }
.nav-back svg { height: 20px; width: auto; }
.nav-btn { color: var(--blue); font-size: 17px; font-weight: 600; }
.nav-btn:disabled { color: #c7c7cc; }

.page-head.has-large { border-bottom-color: transparent; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.page-head.has-large .nav-title { opacity: 0; }
.page-head.has-large.scrolled { background: rgba(249, 249, 249, .94); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border-bottom-color: rgba(0,0,0,.15); }
.page-head.has-large.scrolled .nav-title { opacity: 1; }
.grouped .page-head.has-large.scrolled { background: rgba(242, 242, 247, .94); }

.page-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding-bottom: calc(40px + var(--safe-bottom)); }
.grouped .page-head:not(.has-large) + .page-body { padding-top: 22px; }
.large-title { font-size: 34px; font-weight: 700; letter-spacing: -.5px; padding: 2px 16px 8px; }

/* 준비 중 화면 */
.ph { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 30px 80px; color: #8e8e93; }
.ph-icon { width: 76px; height: 76px; border-radius: 23%; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.1); }
.ph-icon svg, .ph-icon img { width: 100%; height: 100%; }
.ph-title { margin-top: 16px; font-size: 20px; font-weight: 600; color: #1c1c1e; }
.ph-sub { margin-top: 6px; font-size: 15px; }
.ph-home { margin-top: 22px; color: var(--blue); font-size: 15px; }

/* ───────── 설정 (iOS 그룹 목록) ───────── */
.grouped, .grouped .page { background: #F2F2F7; }
.search-field {
  display: flex; align-items: center; gap: 6px;
  margin: 2px 16px 18px; height: 36px; padding: 0 9px;
  border-radius: 10px; background: rgba(118, 118, 128, .12); color: #8e8e93; font-size: 17px;
}
.group { margin: 0 16px 34px; background: #fff; border-radius: 12px; overflow: hidden; }
.group-header { margin: 0 32px 7px; font-size: 13px; color: #6d6d72; }
.group-footer { margin: -27px 32px 34px; font-size: 13px; line-height: 1.4; color: #6d6d72; }
.row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 44px; padding-left: 16px; background: #fff; text-align: left; color: #000; }
.row:active { background: #e5e5ea; }
.ricon { flex: none; width: 29px; height: 29px; border-radius: 7px; display: grid; place-items: center; }
.rbody { flex: 1; min-width: 0; align-self: stretch; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px 10px 0; border-bottom: .5px solid #c6c6c8; }
.row:last-child .rbody { border-bottom: 0; }
.rlabel { font-size: 17px; letter-spacing: -.3px; display: flex; flex-direction: column; }
.rlabel small { font-size: 13px; color: #8e8e93; margin-top: 2px; letter-spacing: 0; }
.rlabel b { font-weight: 400; font-size: 20px; letter-spacing: -.4px; }
.rright { display: flex; align-items: center; gap: 8px; color: #8e8e93; font-size: 17px; flex: none; }
.rchev { color: #c4c4c7; }
.row.danger .rlabel { color: #FF3B30; }
.row.confirm .rlabel { font-weight: 600; }
.profile { min-height: 78px; }
.avatar {
  flex: none; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(180deg, #A5ABB6, #858A94); color: #fff; font-size: 22px; font-weight: 600;
}
.switch { position: relative; width: 51px; height: 31px; border-radius: 16px; background: #E9E9EA; transition: background .25s; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.15); transition: transform .25s; }
.switch.on { background: #34C759; }
.switch.on::after { transform: translateX(20px); }

.input-row { padding-right: 16px; gap: 2px; cursor: text; }
.input-row input { flex: 1; height: 44px; border: 0; outline: 0; background: transparent; font-size: 17px; color: #000; }
.input-row .at { color: #8e8e93; font-size: 17px; }
.chips.light { margin: -24px 28px 32px; }
.chips.light .chip { background: #fff; color: #3a3a3c; }
