/* 仿 iOS 设置页 */
:root{
  --ios-set-inset:56px;
  --ios-set-group-radius:12px;
}
.ios-set-body{
  min-height:100vh;
  background:#f2f2f7;
  padding-bottom:calc(24px + env(safe-area-inset-bottom,0px));
}
body.ios-set-body.app-shell{background:#f2f2f7}
html[data-theme="dark"] .ios-set-body{background:#000}

.ios-set-main{width:100%;max-width:none;margin:0;padding:0 16px 24px}
@media(min-width:768px){
  .ios-set-main{padding:0 32px 32px}
}
@media(min-width:1024px){
  .ios-set-main{padding:0 48px 40px}
}

.ios-set-group{
  background:#fff;
  border-radius:var(--ios-set-group-radius);
  overflow:hidden;
  margin-bottom:24px;
  border:none;
  box-shadow:none;
}
html[data-theme="dark"] .ios-set-group{
  background:#1c1c1e;
  border:none;
  box-shadow:none;
}

.ios-set-group--account{
  border-radius:14px;
  margin-bottom:28px;
}

.ios-set-row{
  position:relative;
  display:flex;align-items:center;gap:12px;
  min-height:44px;padding:11px 16px;
  text-decoration:none;color:inherit;
  -webkit-tap-highlight-color:transparent;
}
.ios-set-row:active{background:rgba(0,0,0,.04)}
.ios-set-row.is-pressed{background:rgba(0,0,0,.04);opacity:.88}
html[data-theme="dark"] .ios-set-row:active,
html[data-theme="dark"] .ios-set-row.is-pressed{background:rgba(255,255,255,.06)}

.ios-set-row-border{border-top:none}
.ios-set-row-border::before{
  content:'';
  position:absolute;top:0;left:var(--ios-set-inset);right:0;
  height:1px;
  background:rgba(60,60,67,.18);
  transform:scaleY(.5);
  transform-origin:top;
}
html[data-theme="dark"] .ios-set-row-border::before{
  background:rgba(84,84,88,.55);
}

.ios-set-row-profile{
  min-height:76px;
  padding:14px 16px;
  gap:14px;
}

.ios-set-avatar{
  width:58px;height:58px;border-radius:50%;object-fit:cover;flex-shrink:0;
  background:#e5e5ea;
}
.ios-set-avatar--card{
  width:62px;height:62px;border-radius:14px;
}
.ios-set-profile-text{display:flex;flex-direction:column;gap:4px;flex:1;min-width:0;padding-right:4px}
.ios-set-profile-text strong{font-size:20px;font-weight:600;line-height:1.2;color:var(--text)}
.ios-set-profile-text em{
  font-style:normal;font-size:14px;line-height:1.35;
  color:var(--text-muted);
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}

.ios-set-icon{flex-shrink:0;line-height:0;display:inline-flex}
.ios-set-icon .dock-app-icon{
  width:29px;height:29px;border-radius:7px;box-shadow:none;
  display:flex;align-items:center;justify-content:center;
  overflow:hidden;flex-shrink:0;
}
.ios-set-icon .dock-app-svg{
  position:relative;
  width:17px;height:17px;
  display:flex;align-items:center;justify-content:center;
  flex-shrink:0;
}
.ios-set-icon .dock-app-svg svg{width:100%;height:100%;display:block}

.ios-set-label{flex:1;font-size:17px;line-height:1.25;color:var(--text);text-align:left}
.ios-set-value{
  font-size:17px;color:var(--text-muted);flex-shrink:0;
}
.ios-set-btn{
  width:100%;border:none;background:transparent;cursor:pointer;
  font:inherit;color:inherit;
}
.ios-set-btn .ios-set-label{flex:1}

.ios-set-chevron{
  color:rgba(60,60,67,.28);font-size:20px;font-weight:400;line-height:1;flex-shrink:0;
  margin-left:2px;
}
html[data-theme="dark"] .ios-set-chevron{color:rgba(235,235,245,.28)}

/* 底部弹窗 */
.ios-set-sheet-mask{
  position:fixed;inset:0;z-index:400;
  background:var(--overlay-mask,rgba(0,0,0,.65));opacity:0;transition:opacity .28s ease;
}
.ios-set-sheet-mask.is-open{opacity:1}
.ios-set-sheet{
  position:fixed;left:0;right:0;bottom:0;z-index:401;
  max-height:88vh;overflow:auto;
  background:var(--panel-bg,#fff);
  border-radius:16px 16px 0 0;
  padding-bottom:calc(16px + env(safe-area-inset-bottom,0px));
  transform:translateY(100%);transition:transform .32s cubic-bezier(.22,1,.36,1);
}
.ios-set-sheet.is-open{transform:translateY(0)}
html[data-theme="dark"] .ios-set-sheet{background:#1c1c1e}
.ios-set-sheet-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:16px 16px 8px;border-bottom:1px solid var(--divider);
  position:sticky;top:0;background:inherit;z-index:1;
}
.ios-set-sheet-head h3{margin:0;font-size:17px;font-weight:600}
.ios-set-sheet-close{
  width:32px;height:32px;border:none;border-radius:50%;
  background:var(--icon-plate,rgba(0,0,0,.06));font-size:22px;line-height:1;
  color:var(--text-muted);cursor:pointer;
}
.ios-set-sheet-body{padding:16px}
.sheet-desc{font-size:14px;color:var(--text-muted);line-height:1.55;margin:0 0 14px}
.sheet-btn{
  display:block;width:100%;margin-bottom:10px;
  min-height:48px;padding:12px;border:none;border-radius:12px;
  background:var(--primary);color:#fff;font-size:16px;font-weight:600;
  text-align:center;text-decoration:none;cursor:pointer;
}
.sheet-btn-outline{
  background:var(--panel-bg,#fff);color:var(--primary);
  border:1px solid var(--divider);
}
.sheet-btn-danger{background:#ff3b30;color:#fff}
html[data-theme="dark"] .sheet-btn-outline{background:#2c2c2e}

/* 设置密码键盘 */
.set-pin-label{font-size:13px;color:var(--text-muted);text-align:center;margin:8px 0}
.set-pin-dots{
  display:flex;justify-content:center;gap:12px;margin:12px 0;
}
.set-pin-dots span{
  width:12px;height:12px;border-radius:50%;
  border:1.5px solid #c7c7cc;background:transparent;
}
.set-pin-dots span.filled{background:var(--primary);border-color:var(--primary)}
.set-pin-err{text-align:center;color:#ff3b30;font-size:13px;margin:8px 0}
.set-pin-pad{
  display:grid;grid-template-columns:repeat(3,1fr);gap:14px 10px;
  max-width:300px;margin:0 auto;padding:8px 0;justify-items:center;
}
.set-pin-key{
  width:68px;height:68px;padding:0;
  border:none;border-radius:50%;
  background:var(--icon-plate,rgba(0,0,0,.05));
  font-size:22px;color:var(--text);cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;
  flex-shrink:0;-webkit-tap-highlight-color:transparent;
}
.set-pin-key:active{background:rgba(0,0,0,.1)}
.set-pin-key.del{font-size:13px;border-radius:50%}
.set-pin-key.empty{visibility:hidden;pointer-events:none}
html[data-theme="dark"] .set-pin-key{background:#2c2c2e}

/* 内容页 */
.ios-page-body{background:var(--page-bg);padding-bottom:calc(24px + env(safe-area-inset-bottom,0px));min-height:100vh}
.ios-page-main{padding-top:12px;min-height:calc(100vh - 56px)}
.ios-page-body .ios-nav{background:var(--page-bg,#fff)}
html[data-theme="dark"] .ios-page-body .ios-nav{background:#000}

/* 设置页开关 */
.ios-set-row-appearance{cursor:default}
.ios-set-switch{position:relative;display:inline-flex;align-items:center;flex-shrink:0}
.ios-set-switch input{position:absolute;opacity:0;width:0;height:0}
.ios-set-switch-ui{
  width:51px;height:31px;border-radius:999px;background:#e9e9ea;position:relative;transition:background .2s ease;
}
.ios-set-switch-ui::after{
  content:'';position:absolute;top:2px;left:2px;width:27px;height:27px;border-radius:50%;
  background:#fff;box-shadow:0 2px 6px rgba(0,0,0,.18);transition:transform .2s ease;
}
.ios-set-switch input:checked + .ios-set-switch-ui{background:#34c759}
.ios-set-switch input:checked + .ios-set-switch-ui::after{transform:translateX(20px)}
html[data-theme="dark"] .ios-set-switch-ui{background:#39393d}
