/* Day-Dot Kitchen Labels: account surfaces. Tokens and fonts come from scan.css; shared components (ink buttons, tape label,
   day dot, label paper, chips, action sheet, captions, empty states) come from
   kitchen.css (DESIGN.md). */

/* ---------- Household (/household, /join) and Settings (/settings): printed form sheets ---------- */
.hh, .st { color: var(--dd-ink); }
.hh { max-width: 640px; }
.st { max-width: 1040px; }
.acc-head { margin: 4px 0 18px; }
.acc-title { margin: 0 0 6px; }
.acc-lead { margin: 0; font-size: 1.1rem; color: var(--dd-ink-2); max-width: 46ch; text-wrap: pretty; }

.acc-paper { margin: 0 0 18px; padding: 18px 22px 20px; }
.acc-h { margin: 0 0 10px; font-family: var(--dd-sans); font-weight: 700; font-size: 1.25rem; line-height: 1.2; overflow-wrap: anywhere; }
.acc-h--big { margin: 0; font-size: 1.6rem; }
.acc-sub { margin: 4px 0 16px; color: var(--dd-ink-2); font-size: 1.02rem; }
.acc-num { font-family: var(--dd-cond); font-weight: 800; font-variant-numeric: tabular-nums; font-size: 1.2em; color: var(--dd-ink); }
.acc-date { font-family: var(--dd-marker); font-size: 1.1rem; color: var(--dd-ink); display: inline-block; transform: rotate(-1.5deg); }
.acc-cap, .acc-sub-label {
    display: block; margin: 0 0 8px; font-family: var(--dd-cond); font-weight: 700; font-size: 0.86rem;
    letter-spacing: 0.12em; text-transform: uppercase; color: var(--dd-ink-2);
}
.acc-sub-label { margin-bottom: 6px; }
.acc-cap--rule { margin-top: 4px; padding-top: 12px; border-top: 1.5px solid var(--dd-rule); }
.acc-note { margin: 0 0 14px; max-width: 52ch; text-wrap: pretty; }
.acc-hint { margin: 6px 0 0; font-size: 0.92rem; color: var(--dd-ink-2); max-width: 48ch; }
.acc-rule { border: 0; border-top: 1.5px dashed var(--dd-rule); margin: 18px 0; }
.acc-form { display: grid; gap: 14px; }
.acc-field { display: flex; flex-direction: column; min-width: 0; margin-bottom: 14px; }
.acc-form .acc-field { margin-bottom: 0; }
.acc-paper > .acc-field:last-child { margin-bottom: 0; }
.acc-wide { width: 100%; display: flex; }
.acc-paper .bag-btn, .acc-sheet .bag-btn, .st-close .bag-btn { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.acc-paper .bag-btn:disabled, .acc-sheet .bag-btn:disabled { opacity: 0.45; cursor: default; }
.acc-paper .bag-btn-ink, .acc-sheet .bag-btn-ink { flex: 1 1 auto; }

body.dd .acc-input {
    width: 100%; min-height: 50px; padding: 0 12px; border: 1.5px solid var(--dd-ink); border-radius: 8px;
    background: var(--dd-field); color: var(--dd-ink); box-shadow: none;
    font-family: var(--dd-sans); font-size: 1rem; font-weight: 500;
}
body.dd .acc-input::placeholder { color: var(--dd-placeholder); opacity: 1; }
body.dd .acc-input:focus, body.dd .acc-input:focus-visible { outline: 3px solid var(--dd-ink); outline-offset: 2px; border-color: var(--dd-ink); }
select.acc-input { appearance: auto; }
body.dd .acc-input--code {
    min-height: 66px; font-family: var(--dd-cond); font-weight: 800; font-size: 2rem; letter-spacing: 0.08em; font-variant-numeric: tabular-nums;
}
body.dd .acc-input--code::placeholder { font: 500 1.05rem var(--dd-sans); letter-spacing: 0; }

/* Members: avatar, name, role mark */
.hh-members.member-list { list-style: none; margin: 0 0 14px; padding: 0; display: block; }
.hh .member-row, .st .member-row {
    display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 0; margin: 0;
    background: none; border-radius: 0; border-bottom: 1px solid var(--dd-hair);
}
.hh .member-row:last-child, .st .member-row:last-child { border-bottom: 0; }
.hh .member-name, .st .member-name { flex: 1 1 auto; min-width: 0; font-weight: 700; font-size: 1.05rem; overflow-wrap: anywhere; }
.hh-av {
    display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%;
    background: var(--dd-ink); color: var(--dd-on-ink); font-family: var(--dd-cond); font-weight: 800; font-size: 1.3rem;
}
.hh-role, .st .badge {
    flex: none; display: inline-block; padding: 3px 9px 2px; border: 1.5px solid var(--dd-ink); border-radius: 4px; background: transparent; color: var(--dd-ink);
    font-family: var(--dd-cond); font-weight: 800; font-size: 0.86rem; letter-spacing: 0.12em; text-transform: uppercase;
}
.hh-role--owner { background: var(--dd-ink); color: var(--dd-on-ink); }

/* The invite code, big enough to read across a counter */
.hh-invite { margin-top: 18px; padding-top: 14px; border-top: 1.5px dashed var(--dd-rule); }
.hh-code {
    margin: 0 0 4px; font-family: var(--dd-cond); font-weight: 800; font-size: 3.4rem; line-height: 1; letter-spacing: 0.06em;
    font-variant-numeric: tabular-nums; overflow-wrap: anywhere; user-select: all;
}
.hh-expiry { margin: 0 0 8px; font-weight: 600; }
.hh-link { margin: 0 0 14px; font-size: 0.9rem; color: var(--dd-ink-2); overflow-wrap: anywhere; user-select: all; }
.acc-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.acc-acts .bag-btn { flex: 1 1 160px; }
.hh a, .st a { color: var(--dd-ink); font-weight: 700; text-underline-offset: 3px; }

/* Settings: two columns of label groups on wide screens */
.st-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 24px; align-items: start; }
.st-col { min-width: 0; }
.st-row {
    display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-height: 60px; padding: 10px 0; border-bottom: 1px solid var(--dd-hair);
}
.st-row:last-child { border-bottom: 0; }
.st-info { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.st-title { font-weight: 700; font-size: 1.02rem; }
.st-sub { font-size: 0.92rem; color: var(--dd-ink-2); max-width: 46ch; }
.st-saved { flex: none; min-width: 0; font-family: var(--dd-cond); font-weight: 700; font-size: 0.95rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dd-ink-2); }
.st-saved:empty { display: none; }
.st-saved[data-state="err"], .st-err { color: var(--dd-stamp); }
.st-err { margin: 10px 0 0; font-weight: 600; }
.st-err[hidden] { display: none; }
.st-labelrow { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.st-who { margin: 0 0 14px; }
.st-days { flex: none; font-family: var(--dd-cond); font-weight: 700; color: var(--dd-ink-2); min-width: 4.5ch; text-align: right; }
.st-row--range input[type="range"] { flex: 1 1 100%; order: 5; }
.st-row--range { padding-bottom: 4px; }

/* Switches: 50x30 track, 58x44 hit area (::before), ink when on */
.st-sw { position: relative; flex: none; width: 50px; height: 30px; cursor: pointer; }
.st-sw::before { content: ''; position: absolute; inset: -7px -4px; }
.st-sw input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.st-sw .track { position: absolute; inset: 0; border: 2px solid var(--dd-ink); border-radius: 15px; background: var(--dd-field); transition: background-color 0.15s; }
.st-sw .track::after {
    content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
    background: var(--dd-ink); transition: transform 0.18s var(--dd-ease), background-color 0.15s;
}
.st-sw input:checked + .track { background: var(--dd-ink); }
.st-sw input:checked + .track::after { transform: translateX(20px); background: var(--dd-on-ink); }
.st-sw:has(input:focus-visible) .track { outline: 3px solid var(--dd-ink); outline-offset: 3px; }
.st-sw input:disabled + .track { opacity: 0.5; }

/* Range: ink rail and thumb */
.st input[type="range"] {
    -webkit-appearance: none; appearance: none; height: 44px; min-height: 44px; padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; cursor: pointer;
}
.st input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--dd-rule); }
.st input[type="range"]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--dd-rule); }
.st input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: var(--dd-ink); border: 3px solid var(--dd-tape); box-shadow: 0 0 0 1.5px var(--dd-ink); }
.st input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--dd-ink); border: 3px solid var(--dd-tape); box-shadow: 0 0 0 1.5px var(--dd-ink); }
.st input[type="range"]:focus-visible { outline: 3px solid var(--dd-ink); outline-offset: 2px; border-radius: 4px; }

.st .seg { background: var(--dd-field); }
.st .seg-opt span { min-height: 48px; }

.st-devices.member-list { list-style: none; margin: 0 0 12px; padding: 0; display: block; }
.st-dev-meta { margin-top: 2px; font-size: 0.85rem; font-weight: 400; color: var(--dd-ink-2); }
.st-dev .badge { align-self: center; }

/* Close your account: quiet, on the bench below the sheets */
.st-close { max-width: 640px; margin: 8px 0 32px; padding-top: 16px; border-top: 1.5px solid var(--dd-rule); }
.st-close .acc-cap { color: var(--dd-ink-2); }

/* Account sheets (transfer ownership, delete account) */
.acc-sheet .acc-note { margin-bottom: 16px; }
.acc-sheet .acc-cap { color: var(--dd-ink-2); }
.acc-sheet .acc-acts .bag-btn { flex: 1 1 180px; }   /* stacks on phones so labels never wrap */

@media (min-width: 900px) {
    .st-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 480px) {
    .acc-title { font-size: 2.2rem; }
    .acc-paper { padding: 16px 16px 18px; }
    .hh-code { font-size: 2.8rem; }
}
@media (prefers-reduced-motion: reduce) {
    .st-sw .track, .st-sw .track::after { transition: none; }
}
