/* Settings, sign-in and the dev outbox. */

.settings { max-width: 680px; margin: 0 auto; }
.set-section { margin-bottom: 22px; scroll-margin-top: calc(var(--top-h) + var(--safe-t) + 8px); }
.set-section:target .set-card { border-color: var(--red-ln); }
.set-title { font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); margin: 18px 4px 10px; }
.set-card { overflow: hidden; }
.set-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-top: 1px solid var(--border); }
.set-row:first-child { border-top: 0; }
.set-main { flex: 1; min-width: 0; }
.set-label { font-weight: 700; font-size: .95rem; }
.set-value { font-size: .86rem; color: var(--ink-soft); line-height: 1.5; margin-top: 2px; overflow-wrap: anywhere; }
.set-inline { display: flex; gap: 8px; margin-top: 8px; }
.set-inline .input { min-height: 42px; }
.set-actions { flex-wrap: wrap; gap: 10px; }
/* select.input sets width: 100%; a select in a row is as wide as its options. */
select.input.set-select { width: auto; min-height: 40px; padding: 0 12px; }
.set-note { padding: 12px 16px; font-size: .86rem; border-top: 1px solid var(--border); }
.set-note.is-warn { background: var(--casual-bg); color: var(--casual); }
.set-bar { margin-top: 10px; height: 6px; }
.set-dl .btn { flex: none; }
.set-links { gap: 18px; font-size: .88rem; flex-wrap: wrap; }
.set-links a { color: var(--ink-mid); }
.check-row { display: flex; align-items: center; gap: 10px; margin: 4px 0 16px; font-size: .9rem; color: var(--ink-mid); }
.check-row input { width: 18px; height: 18px; accent-color: var(--red); }

.switch { appearance: none; flex: none; position: relative; width: 50px; height: 30px; border-radius: 999px; border: 0; background: var(--line-2); transition: background .2s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s var(--ease); }
.switch.is-on { background: var(--green); }
.switch.is-on i { transform: translateX(20px); }
.switch:disabled { opacity: .6; }

/* ── Sign in ── */
.login { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: calc(24px + var(--safe-t)) 18px calc(24px + var(--safe-b)); }
.login-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 30px 24px 24px; box-shadow: var(--shadow-1); text-align: center; }
.login-mark { width: 104px; height: 31px; margin: 0 auto 22px; display: block; }
.login-mailicon { width: 52px; height: 52px; margin: -6px auto 12px; border-radius: 16px; display: flex; align-items: center; justify-content: center; color: var(--red); background: var(--red-bg); border: 1px solid var(--red-ln); }
.login-mailicon svg { width: 26px; height: 26px; }
.login-title { font-family: var(--display); font-weight: var(--display-weight); font-size: 1.7rem; letter-spacing: -.025em; margin-bottom: 8px; }
.login-text { color: var(--ink-soft); line-height: 1.6; font-size: .95rem; margin-bottom: 20px; }
.login-text b { color: var(--ink); }
.login-form { text-align: left; }
.login-form .error-text { margin: -4px 0 12px; }
.code-input { text-align: center; font-size: 1.7rem; letter-spacing: .4em; font-weight: 800; font-variant-numeric: tabular-nums; padding-left: .4em; }
.login-alt { margin-top: 16px; font-size: .86rem; color: var(--ink-soft); }
.login-alt .link-btn:disabled { color: var(--ink-soft); text-decoration: none; cursor: default; }
.login-ios { margin-top: 14px; }
.login-foot { margin-top: 18px; font-size: .84rem; color: var(--ink-soft); }
.login-foot a { color: var(--ink-mid); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.dev-box { margin: 0 0 16px; padding: 10px 12px; border-radius: 12px; font-size: .85rem; text-align: left; background: var(--polite-bg); border: 1px dashed var(--polite-ln); color: var(--ink-mid); }
.dev-box a { color: var(--polite); }

/* ── Dev outbox ── */
.outbox { display: flex; flex-direction: column; gap: 14px; }
.outbox-item { padding: 12px; }
.outbox-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.outbox-frame { width: 100%; height: 520px; border: 1px solid var(--border); border-radius: 10px; background: #F4F2ED; }

/* Goals: the explanation beside the control, the control under it on a phone. */
.set-goal { flex-wrap: wrap; row-gap: 12px; }
.set-goal .set-main { flex: 1 1 240px; }
.set-group { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 16px 10px; background: var(--sunken); border-top: 1px solid var(--border); }
.set-group:first-child { border-top: 0; }
.sg-title { font-size: .8rem; font-weight: 800; color: var(--ink); }
.sg-note { font-size: .76rem; color: var(--ink-soft); }

/* − value + */
.stepper { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 3px; border-radius: 14px; background: var(--sunken); border: 1px solid var(--border); }
.stp-btn {
  appearance: none; width: 40px; height: 40px; border-radius: 11px; border: 0; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); touch-action: manipulation; user-select: none;
}
html[data-theme="dark"] .stp-btn { background: var(--line-2); }
.stp-btn svg { width: 18px; height: 18px; }
.stp-btn:hover:not(:disabled) { color: var(--red); }
.stp-btn:disabled { opacity: .35; cursor: default; }
.stp-mid { min-width: 84px; display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.stp-val {
  width: 84px; border: 0; background: transparent; padding: 0; text-align: center;
  font-size: 1.05rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink); outline-offset: 3px; border-radius: 6px;
}
.stp-unit { font-size: .7rem; font-weight: 600; color: var(--ink-soft); }
