/* 设置各页。class 一律 sg- 开头；十项同一个排版：说明一句 → 一段一张信纸卡 → 卡里一行一行 */
.sg { position: relative; min-height: 100%; padding-bottom: calc(34px + var(--safe-b)); }
.sg .lace-edge { top: 0; }
.sg-intro { margin: 0 26px 4px; font-size: 12px; line-height: 1.8; color: var(--ink-2); text-align: center; }
.sg-sec { margin: 16px 22px 0; }
.sg-sec h2 { margin: 0 0 8px 4px; display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 500; letter-spacing: 2px; color: var(--mauve-deep); }
.sg-sec h2::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--lace), transparent); }
.sg-card { position: relative; border-radius: 4px 16px 4px 16px; background-color: var(--card); background-image: radial-gradient(rgba(169, 154, 170, .12) .6px, transparent .7px); background-size: 5px 5px;
  border: 1px solid var(--lace); box-shadow: var(--shadow); overflow: hidden; }
.sg-row { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 10px 16px; box-sizing: border-box; border-top: 1px dashed var(--lace); }
.sg-card > :first-child { border-top: 0; }
.sg-row .lb { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; color: var(--ink); }
.sg-row .lb i { font-style: normal; font-size: 11px; color: var(--ink-2); }
/* 输入 */
.sg-row.in .lb { flex: none; width: 92px; }
.sg-row.in input { flex: 1; min-width: 0; height: 34px; border: 0; border-bottom: 1px solid var(--lace); background: none; font: inherit; font-size: 14px; color: var(--ink); outline: 0; text-align: right; }
.sg-row.in input[type=date], .sg-row.in input[type=time] { font-family: var(--font-serif); font-size: 15px; color: var(--teal); }
.sg-row.in input:focus { border-bottom-color: var(--mauve); }
/* 开关（借日记的 .dy-sw） */
.sg-row.tg { cursor: pointer; }
.sg-row.tg input { position: absolute; opacity: 0; pointer-events: none; }
.sg-row.tg input:checked + .dy-sw { background: var(--mauve-btn); }
.sg-row.tg input:checked + .dy-sw::after { transform: translateX(18px); }
.sg-row .pv { font-style: normal; font-size: 10.5px; padding: 1px 8px; border-radius: 8px; background: rgba(130, 133, 121, .15); color: var(--sage); flex: none; }
.sg-row .pv.no { background: rgba(169, 154, 170, .15); color: var(--mauve-deep); }
/* 选项签 */
.sg-row.ch { flex-direction: column; align-items: stretch; gap: 10px; }
.sg-row .opts { display: flex; flex-wrap: wrap; gap: 8px; }
.sg-row .opts button { height: 32px; padding: 0 14px; border-radius: 16px; border: 1px solid var(--lace); background: var(--paper); font-size: 12.5px; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; }
.sg-row .opts button[aria-pressed="true"] { background: var(--mauve-btn); border-color: var(--mauve-btn); color: var(--paper); }
.sg-row .opts u { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255, 255, 255, .7); }
.sw-mauve { background: #897B8D; } .sw-teal { background: #637479; } .sw-sage { background: #7F866F; } .sw-rose { background: #8E5A63; }
/* 滑条 */
.sg-row.sl { flex-direction: column; align-items: stretch; gap: 6px; padding-bottom: 12px; }
.sg-row.sl .lb { flex-direction: row; justify-content: space-between; }
.sg-row.sl .lb b { font-family: var(--font-serif); font-weight: 500; font-size: 15px; color: var(--mauve-deep); }
.sg-row.sl input { width: 100%; accent-color: var(--mauve-btn); }
.sg-row.sl .ends { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--ink-2); }
.sg-row.sl .ends i { font-style: normal; }
/* 信息 */
.sg-row.if .vl { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); text-align: right; }
.sg-row.if .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lace); }
.sg-row.if .dot.on { background: var(--sage); }
.sg-row.if.slot { background: repeating-linear-gradient(135deg, rgba(169, 154, 170, .05) 0 6px, transparent 6px 12px); }
.sg-row.if.slot .lb { color: var(--mauve-deep); }
/* 头像 */
.sg-row.av { padding: 16px; gap: 14px; }
.sg-row.av .dy-av.big { width: 64px; height: 64px; font-size: 24px; box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--lace), 0 4px 10px rgba(81, 75, 74, .15); }
.sg-row.av .pick { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 14px; border-radius: 17px; border: 1px solid var(--lace); background: var(--paper); font-size: 12.5px; color: var(--mauve-deep); cursor: pointer; }
.sg-row.av .rm { border: 0; background: none; font-size: 12px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
/* 大段文字 */
.sg-row.ta { padding: 0; }
.sg-row.ta textarea { width: 100%; box-sizing: border-box; border: 0; outline: 0; resize: vertical; padding: 14px 16px; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12.5px; line-height: 1.8; color: var(--ink);
  background: repeating-linear-gradient(transparent 0 21.5px, var(--line-soft) 21.5px 22.5px) 0 13px; }
/* 用量条 */
.sg-row.mt { flex-direction: column; align-items: stretch; gap: 8px; }
.sg-row.mt .lb { flex-direction: row; justify-content: space-between; }
.sg-row.mt .lb b { font-weight: 400; font-size: 12px; color: var(--ink-2); }
.sg-row .bar { height: 6px; border-radius: 3px; background: var(--lace); overflow: hidden; display: flex; }
.sg-row.mt .bar i { background: var(--teal-soft); border-radius: 3px; } .sg-row.mt .bar i.hot { background: #8E5A63; }
/* 存储分段 */
.sg-row.sk { flex-direction: column; align-items: stretch; gap: 8px; padding: 14px 16px; }
.sg-row.sk .bar { height: 10px; gap: 1.5px; }
.sg-row.sk .keys { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11px; color: var(--ink-2); }
.sg-row.sk .keys u { display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 4px; }
.sg-row.sk .tot { font-family: var(--font-serif); font-size: 13px; color: var(--ink); }
.sg-row.sk .c0 { background: #8C7591; } .sg-row.sk .c1 { background: #637479; } .sg-row.sk .c2 { background: #B79A6B; } .sg-row.sk .c3 { background: #A9AC9E; } .sg-row.sk .c4 { background: #CFC3D0; }
/* 授权表 */
.sg-grid { display: grid; grid-template-columns: 1fr 72px 82px; align-items: center; padding: 6px 16px 10px; }
.sg-grid > b { font-size: 11px; font-weight: 400; color: var(--ink-2); text-align: center; padding: 6px 0; }
.sg-grid .nm { font-size: 13.5px; padding: 11px 0; border-top: 1px dashed var(--lace); }
.sg-grid .ck { display: flex; justify-content: center; align-items: center; height: 100%; border-top: 1px dashed var(--lace); cursor: pointer; }
.sg-grid .ck input { position: absolute; opacity: 0; }
.sg-grid .ck i { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--mauve-pale); display: flex; align-items: center; justify-content: center; }
.sg-grid .ck input:checked + i { background: var(--mauve-btn); border-color: var(--mauve-btn); }
.sg-grid .ck input:checked + i::after { content: ''; width: 9px; height: 5px; border-left: 1.6px solid #fff; border-bottom: 1.6px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
/* 按钮 */
.sg-btn { display: block; width: calc(100% - 32px); margin: 12px 16px; height: 40px; border-radius: 20px; border: 0; background: var(--mauve-btn); color: var(--paper); font-size: 13.5px; letter-spacing: 1px; box-shadow: var(--shadow-accent); }
.sg-btn.ghost { background: var(--paper); color: var(--mauve-deep); border: 1px dashed var(--mauve); box-shadow: none; }
.sg-btn + .sg-btn { margin-top: 0; }
.sg-note { margin: 14px 26px 0; font-size: 11.5px; line-height: 1.7; color: var(--ink-2); }

/* 外观设置套到整个 App 上 */
.no-lace .lace-edge, .no-lace .dl-hero .lace, .no-lace .mr-hero .lace { display: none !important; }
.no-motion *, .no-motion *::before, .no-motion *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
.font-sans body, .font-sans #app { font-family: 'PingFang SC', 'Noto Sans SC', sans-serif; }
