/* 설정·자동 작업·시작하기·로그인 전 화면 (개편 S6). app.css·v2.css 위에 얹는 차이만.
   색은 토큰만 써서 밝게·어둡게를 따라가요. 누르는 것은 모두 44px 이상 */

/* ---------- 공통 ---------- */
.s6-a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; color: var(--link); font-weight: 600; }
.s6-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.s6-acts form { margin: 0; }
.s6-note { margin: 8px 0 0; font-size: var(--fs-13); color: var(--ink2); }
.s6 .btn.sm, .s6-start .btn.sm, .s6-auth .btn.sm { min-height: 44px; height: 44px; min-width: 44px; }
.s6 .btn.text, .s6-auth .btn.text, .s6-start .btn.text { color: var(--ink2); }
.s6 details > summary { min-height: 44px; }
.s6 .card h3 { font-size: var(--fs-15); margin: 20px 0 6px; }
.s6 .card input, .s6 .card select { max-width: 100%; }
.s6 .list .item .v { overflow-wrap: anywhere; }
.s6 .run-note { margin: 8px 0 0; }
.s6 .more-link, .s6 a.item { min-height: 44px; }
.s6 .more-link { display: inline-flex; align-items: center; }
.s6 .chip { flex: none; }
.s6-sw .switch-row { padding: 12px 0; min-height: 44px; }
.s6-sw + .s6-sw .switch-row { border-top: 1px solid var(--line); }
.s6-sw .switch-row .d { color: var(--ink2); }
.s6 .btn.danger.weak { color: var(--red-ink); }

.s6 .pw-eye, .s6-auth .pw-eye { width: 44px; height: 44px; right: 2px; }
.s6 .check, .s6-auth .check { min-height: 44px; }
.s6 .backlink { height: 44px; min-width: 44px; }

/* ---------- 설정: 왼쪽 묶음 메뉴 (D19) ---------- */
.s6-set { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; align-items: start; }
.s6-nav { display: grid; gap: 2px; margin: 0; position: sticky; top: calc(var(--top-h, 56px) + 8px); }
.s6-nav a { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px; border-radius: 12px;
  font-size: var(--fs-15); font-weight: 500; color: var(--ink2); text-decoration: none; }
.s6-nav a:hover, .s6-nav a.on { background: var(--fill); color: var(--ink); }
.s6-nav a.on { font-weight: 700; }
.s6-grp[hidden] { display: none; }
.s6-grp > .card:first-child, .s6-cols > div > .card:first-child { margin-top: 0; }
.s6-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; align-items: start; }
.s6-cols > div { min-width: 0; }
.s6-h { font-size: var(--fs-15); font-weight: 700; margin: 20px 2px 8px; color: var(--ink2); }
.s6-set .card.hl { outline: 2px solid var(--blue); outline-offset: 2px; }
.s6-conn { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin-top: 12px; }
.s6-conn a { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px; border-radius: 12px;
  background: var(--fill); font-size: var(--fs-13); font-weight: 700; color: var(--ink); text-decoration: none; }
.s6-conn a:hover { background: var(--fill-strong); }
.s6-hours { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.s6-hours .field { margin: 0; flex: 1 1 110px; min-width: 0; }
.s6-hours select { width: 100%; }
.s6-hours .btn { height: 52px; flex: none; }
.s6-hours > span { align-self: center; padding-top: 18px; }
.s6-inline { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.s6-inline .field { margin: 0; flex: 1 1 160px; min-width: 0; }
.s6-inline .btn { height: 52px; flex: none; }
.s6-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.s6 .topic-box { flex-wrap: wrap; }

/* 위험 구역 (D22, S15): 계정 묶음 맨 아래 */
.s6-danger { border: 1.5px solid var(--red) !important; }
.s6-danger h2 { color: var(--red-ink); }
.s6-danger .row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.s6-danger .row b { display: block; }
.s6-danger .row span.d { display: block; font-size: var(--fs-13); color: var(--ink2); }
.s6-danger .row form { flex: none; margin: 0; }
.s6-danger details { border-top: 1px solid var(--line); padding: 4px 0; }
.s6-danger details .inner { max-width: 420px; padding-bottom: 8px; }

/* ---------- 시작하기 3단계 (D20, R16) ---------- */
.s6-start { background: var(--card); border-radius: 20px; padding: 20px 24px; margin: 0 0 16px; border: 1px solid var(--line); }
.s6-start-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.s6-start-h h2 { margin: 0 0 4px; font-size: var(--fs-17); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.s6-start-h p { margin: 0; font-size: var(--fs-13); color: var(--ink2); }
.s6-start-h form { flex: none; margin: 0; }
.s6-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.s6-step { display: grid; gap: 4px; align-content: start; padding: 12px 14px; border-radius: 14px; background: var(--fill); min-width: 0; }
.s6-step b { font-size: var(--fs-15); }
.s6-step > span { font-size: var(--fs-13); color: var(--ink2); }
.s6-step .btn, .s6-step .chip { justify-self: start; margin-top: 4px; }
.s6-step.done b { color: var(--ink2); }

/* ---------- 자동 작업 (D24, R18, S16) ---------- */
.s6-auto { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.s6-auto > .card { margin-top: 0; }
.s6-row { display: flex; align-items: center; gap: 12px; padding: 12px 4px; min-width: 0; }
.s6-row + .s6-row { border-top: 1px solid var(--line); }
.s6-row .sr-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.s6-row .sr-body em { font-style: normal; font-size: var(--fs-13); color: var(--ink2); overflow-wrap: anywhere; }
.s6-row .s6-name { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; color: var(--ink); text-decoration: none; }
.s6-row .s6-name:hover { color: var(--link); }
.s6-row .sr-right { display: flex; align-items: center; gap: 8px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.s6-row .sr-right form { margin: 0; }
.s6-row .sl-ic.bad { background: var(--red-soft); color: var(--red-ink); }
.s6-swl { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; min-height: 44px; cursor: pointer; }
.s6-t-ok { color: var(--green-ink); font-weight: 700; }
.s6-t-bad { color: var(--red-ink); font-weight: 700; }
.s6-range { margin: 14px 0 6px; font-size: var(--fs-19, 19px); font-weight: 700; }
.s6-band { position: relative; height: 48px; margin: 0 22px; touch-action: none; }
.s6-band .track { position: absolute; left: 0; right: 0; top: 18px; height: 12px; border-radius: 6px; background: var(--fill-strong); }
.s6-band .fill { position: absolute; top: 18px; height: 12px; border-radius: 6px; background: var(--btn-bg); }
.s6-band .h { position: absolute; top: 2px; width: 44px; height: 44px; margin-left: -22px; border: 0; background: none; padding: 0; cursor: ew-resize; touch-action: none; }
.s6-band .h::after { content: ''; position: absolute; left: 8px; top: 8px; width: 28px; height: 28px; border-radius: 50%; background: var(--card);
  border: 2px solid var(--blue); box-shadow: 0 1px 4px rgba(0, 0, 0, .15); }
.s6-band .h:focus-visible { outline: 2px solid var(--blue); outline-offset: -4px; border-radius: 50%; }
.s6-band[aria-disabled=true] .h { cursor: default; }
.s6-ticks { position: relative; height: 22px; margin: 0 22px; }
.s6-ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; font-size: var(--fs-13); color: var(--ink2); }
.s6-mini { display: grid; gap: 4px; padding: 10px 0; }
.s6-mini + .s6-mini { border-top: 1px solid var(--line); }
.s6-mini-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.s6-mini-h span { font-size: var(--fs-13); color: var(--ink2); }
.s6-mini .bar { position: relative; height: 8px; border-radius: 4px; background: var(--fill-strong); margin: 2px 0; }
/* 옛 app.css 의 .bar·.bar i (홈 막대 그래프: flex, max-width 28px, min-height 2px)가 새어 띠가 28px 조각으로 그려지던 것을 여기서 막아요 */
.s6-mini .bar { display: block; flex: none; width: auto; }
.s6-mini .bar i { position: absolute; top: 0; bottom: 0; display: block; max-width: none; min-width: 2px; min-height: 0; border-radius: 4px; background: var(--btn-bg); overflow: visible; }
.s6-mini .bar.off i { background: var(--ink3); }
.s6-runs { max-height: 560px; overflow-y: auto; }
.s6-runs .item { min-height: 44px; }
.s6-save { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.s6-save span { font-size: var(--fs-13); color: var(--ink2); }

/* ---------- 로그인 전 화면 (D21, R15) ---------- */
.s6-auth .logo a { display: flex; align-items: center; gap: 8px; color: inherit; min-height: 44px; text-decoration: none; }
.s6-auth .logo .mark { background: var(--btn-bg); }
.s6-remember { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 6px 6px 14px; min-height: 56px; border-radius: 12px;
  background: var(--fill); font-size: var(--fs-13); margin: 0 0 16px; color: var(--ink2); }
.s6-remember b { color: var(--ink); overflow-wrap: anywhere; }
.s6-remember .btn { flex: none; }
.s6-auth form.s6-form { display: flex; flex-direction: column; }
.s6-auth .foot { color: var(--ink2); }
.s6-auth .foot a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; color: var(--link); }
.s6-auth .lead { color: var(--ink2); }
.s6-auth .field .hint { color: var(--ink2); }
.s6-agree { background: var(--fill); border-radius: 16px; padding: 8px 16px; margin: 8px 0 0; }
.s6-agree .check { min-height: 44px; }
.s6-agree summary { min-height: 44px; font-size: var(--fs-13); font-weight: 500; color: var(--ink2); }
.s6-agree p { margin: 4px 0 0; font-size: var(--fs-13); color: var(--ink2); }
.s6-done-ic { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green-ink); margin: 0 0 16px; }
.s6-done-ic svg { width: 28px; height: 28px; }
.s6-trap { position: absolute; left: -9999px; }

@media (max-width: 1023px) {
  .s6-set { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .s6-nav { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .s6-nav a { flex: 1 1 30%; min-height: 44px; justify-content: center; background: var(--fill); }
  .s6-nav a.on { background: var(--fill-strong); }
  .s6-cols, .s6-auto { grid-template-columns: minmax(0, 1fr); }
  .s6-steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .s6-3 { grid-template-columns: minmax(0, 1fr); }
  .s6-row { flex-wrap: wrap; }
  .s6-row .sr-right { width: 100%; justify-content: flex-start; padding-left: 52px; }
  .s6-danger .row { flex-wrap: wrap; }
  .s6-start { padding: 16px; }
  .s6-start-h { flex-wrap: wrap; }
}

/* ---------- 설정 2차 (개편 B7): 알림 종류별 켜기·끄기, 규칙 엑셀 미리 보기 ---------- */
.b7-top { margin: 0 0 4px; }
.b7-h { margin-top: 20px; }
.b7-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; min-height: 44px; border-top: 1px solid var(--line); }
.b7-row .t { display: block; font-weight: 600; }
.b7-row .d { display: block; color: var(--ink2); font-size: var(--fs-13); margin-top: 2px; }
.b7-row .chip { display: inline-flex; align-items: center; gap: 4px; }
.s6-sw + .b7-row, h3 + .s6-note + .b7-row { border-top: 1px solid var(--line); }
.b7-pv .b7-fname { max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b7-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.b7-nums > div { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--fill); min-width: 0; }
.b7-nums span { font-size: var(--fs-13); color: var(--ink2); }
.b7-nums b { font-size: var(--fs-20, 20px); color: var(--ink); }
.b7-nums .warn b { color: var(--red-ink); }
.b7-ul { margin: 4px 0 0; padding-left: 20px; font-size: var(--fs-14, 14px); line-height: 1.6; overflow-wrap: anywhere; }
.b7-ul b { font-weight: 700; margin-right: 4px; }
.b7-acts .btn { min-width: 120px; }
@media (max-width: 600px) {
  .b7-nums { grid-template-columns: 1fr; }
  .b7-nums > div { flex-direction: row; justify-content: space-between; align-items: center; }
  .b7-acts form, .b7-acts .btn { flex: 1 1 auto; }
}

/* ---------- 회원 관리 (FIX-D): 설정의 사람 묶음에서 넘어오는 화면 ---------- */
.s6-mb { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: 14px; align-items: start; }
.s6-mb > .card { margin: 0; }
.s6-mb h2 { margin: 0 0 8px; }
.s6-mb-list { list-style: none; margin: 0; padding: 0; }
.s6-mb-list li + li { border-top: 1px solid var(--line); }
.s6-mb-row > summary { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 4px; cursor: pointer; list-style: none; border-radius: 10px; }
.s6-mb-row > summary::-webkit-details-marker { display: none; }
.s6-mb-row > summary::after { content: '펼치기'; margin-left: auto; font-size: var(--fs-13); color: var(--ink2); flex: none; }
.s6-mb-row[open] > summary::after { content: '접기'; }
.s6-mb-row > summary:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.s6-mb-ico { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--blue-soft); color: var(--blue-soft-ink); font-weight: 700; }
.s6-mb-txt { display: grid; min-width: 0; line-height: 1.35; }
.s6-mb-txt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s6-mb-txt span { font-size: var(--fs-13); color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s6-mb-in { padding: 8px 4px 14px 50px; display: grid; gap: 10px; max-width: 460px; }
.s6-mb-in .field { margin: 0 0 8px; }
.s6-mb-in .btn, .s6-mb .card > form > .btn { min-height: 44px; height: 44px; }
.s6-mb-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.s6-mb-acts form { margin: 0; }
.s6-mb-lab { display: block; color: var(--ink2); font-size: var(--fs-13); font-weight: 600; margin: 0 0 4px; }
.s6-mb .hint { color: var(--ink2); }
.s6-mb .segpick label { min-height: 44px; }
@media (max-width: 1023px) { .s6-mb { grid-template-columns: minmax(0, 1fr); } .s6-mb-in { padding-left: 4px; } }

/* ---------- 요금제·결제 (11-16, templates/v2/_billing.html) ---------- */
.bl-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 4px 0 0; }
.bl-price b { font-size: var(--fs-15); }
.bl-amt { font-size: var(--fs-20, 20px); font-weight: 700; font-variant-numeric: tabular-nums; }
.bl-plans { margin-top: 8px; }
.bl-plans .btn { margin-top: 12px; }
.bl-report { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.bl-report-t { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 8px; }
.bl-report-t span { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bl-inv .grow { min-width: 0; }
.bl-inv-r { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; margin-left: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ── 설정 › 알림: 휴대폰 연결·조용한 시간·견본 (11-16, app/notify_web.py) ── */
.nf-top { margin-top: 12px; align-items: center; }
.nf-steps { margin: 8px 0 0; padding-left: 20px; }
.nf-steps li + li { margin-top: 8px; }
.nf-qr[hidden] { display: none; }
.nf-qr { display: flex; gap: 16px; align-items: center; margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.nf-qr svg { flex: none; width: 112px; height: 112px; border-radius: 4px; background: #fff; }
.nf-qr .t { font-weight: 600; display: block; }
.nf-qr .d { color: var(--ink2); font-size: var(--fs-13); display: block; margin-top: 2px; }
.nf-open { margin-top: 8px; }
.nf-login { margin-top: 12px; }
.nf-login .v { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
.nf-login code { font-size: var(--fs-13); overflow-wrap: anywhere; }
.nf-quiet .switch-row { padding: 12px 0; min-height: 44px; }
.nf-quiet .switch-row .d { color: var(--ink2); }
.nf-time { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.nf-time span { white-space: nowrap; }
.nf-time select { width: auto; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--ink); font: inherit; }
.nf-pv { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.nf-ban { display: flex; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg2, transparent); }
.nf-ban .ic { flex: none; width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; font-size: 18px; border: 1px solid var(--line); }
.nf-ban .b { min-width: 0; flex: 1; }
.nf-ban .top { display: flex; justify-content: space-between; gap: 8px; font-size: var(--fs-13); color: var(--ink2); }
.nf-ban .tt { display: block; font-weight: 700; margin-top: 1px; }
.nf-ban .bd { display: block; font-size: var(--fs-13); white-space: pre-line; margin-top: 1px; }
