/* 多个页面共用：页面顶部、圆形按钮、开关、分段、底部弹卡、按钮 */
.page { position: relative; z-index: 1; min-height: 100vh; padding: calc(52px + env(safe-area-inset-top)) var(--page-x) calc(148px + env(safe-area-inset-bottom)); }
.page-head { height: 44px; display: flex; align-items: center; gap: 12px; }
.page-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.page-title h1 { font-family: var(--f-title); font-weight: 600; font-size: 22px; line-height: 28px; letter-spacing: 2px; }
.icon-btn { width: 44px; height: 44px; border-radius: 22px; display: flex; align-items: center; justify-content: center; flex: none; color: var(--c-ink-3); }
.icon-btn.primary { background: var(--c-whale); color: #FFFFFF; border: 0; box-shadow: 0 8px 20px rgba(38, 34, 119, 0.24); }
.pill { height: 36px; padding: 0 14px; border-radius: 18px; font-size: var(--fs-small); color: var(--c-ink-3); display: inline-flex; align-items: center; gap: 4px; }

.switch { width: 48px; height: 28px; border-radius: 14px; background: var(--c-haze); position: relative; flex: none; transition: background 0.2s; }
.switch span { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 11px; background: #FFFFFF; box-shadow: 0 2px 6px rgba(38, 34, 119, 0.2); transition: left 0.2s; }
.switch[aria-checked="true"] { background: var(--c-whale); }
.switch[aria-checked="true"] span { left: 23px; }

.seg { height: 40px; border-radius: 20px; padding: 4px; background: rgba(186, 203, 227, 0.4); display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
.seg button { border-radius: 16px; font-size: var(--fs-body); color: var(--c-ink-2); }
.seg button[aria-selected="true"] { background: #FFFFFF; color: var(--c-ink); font-weight: 500; box-shadow: 0 2px 8px rgba(38, 34, 119, 0.12); }

/* 底部弹卡 */
.sheet-layer { position: fixed; inset: 0; z-index: 30; }
.sheet-mask { position: absolute; inset: 0; background: rgba(38, 34, 119, 0.22); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); opacity: 0; transition: opacity 0.2s; }
.sheet {
  position: absolute; left: 50%; bottom: 0; width: min(100vw, 430px); transform: translate(-50%, 100%);
  max-height: 92vh; overflow-y: auto;
  border-radius: 30px 30px 0 0; padding: 10px 20px calc(34px + env(safe-area-inset-bottom));
  background: rgba(246, 251, 253, 0.80); -webkit-backdrop-filter: blur(24px) saturate(1.3); backdrop-filter: blur(24px) saturate(1.3);
  border-top: 1px solid rgba(255, 255, 255, 0.8); box-shadow: 0 -12px 32px rgba(38, 34, 119, 0.14);
  display: flex; flex-direction: column; gap: 14px; transition: transform 0.22s ease;
}
.sheet-layer.open .sheet-mask { opacity: 1; }
.sheet-layer.open .sheet { transform: translate(-50%, 0); }
.grabber { align-self: center; width: 40px; height: 5px; border-radius: 3px; background: var(--c-haze); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-head h2 { font-family: var(--f-title); font-weight: 600; font-size: 19px; line-height: 26px; }
.sheet-close { width: 36px; height: 36px; border-radius: 18px; background: rgba(186, 203, 227, 0.45); display: flex; align-items: center; justify-content: center; color: var(--c-ink-3); }
.sheet-close .icon { width: 16px; height: 16px; stroke-width: 2; }

.field { width: 100%; border-radius: 18px; padding: 14px 16px; background: rgba(255, 255, 255, 0.8); border: 1px solid rgba(186, 203, 227, 0.8); font: inherit; font-size: 15px; color: var(--c-ink); outline: none; }
.field:focus { border-color: var(--c-sea); }
textarea.field { height: 148px; resize: none; line-height: 24px; }
.field-wrap { position: relative; }
.field-wrap .count { position: absolute; right: 14px; bottom: 10px; }

.group { border-radius: 20px; background: rgba(255, 255, 255, 0.55); padding: 0 16px; }
.group-row { min-height: 50px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid rgba(186, 203, 227, 0.6); }
.group-row:last-child { border-bottom: 0; }
.group-row .k { flex: 1; font-size: 15px; }
.group-row .k .cap { margin-left: 8px; }
.group-row input, .group-row select { border: 0; background: transparent; font: inherit; font-size: 14px; color: var(--c-whale); text-align: right; outline: none; }

.btn-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.btn { height: 50px; border-radius: 25px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 15px; background: rgba(186, 203, 227, 0.45); color: var(--c-ink-3); }
.btn.primary { background: var(--c-whale); color: #FFFFFF; font-weight: 500; }
.btn:disabled { opacity: 0.5; }
.btn .icon { width: 16px; height: 16px; }

.empty-tip { margin: 40px auto 0; text-align: center; color: var(--c-ink-2); font-size: var(--fs-small); }
