/* Approved phone themes. Text stays live and accessible; only the banner is generated artwork. */
:root[data-theme]{--ink:#102b56;--page:#edf5fc;--surface:#fff;--line:#d9e6f2;--accent:#195c9c;--soft:#deedfa;--gold:#9a650d;--radius:20px;--shadow:0 4px 12px #193b6410;--art-position:0% 0%;color:var(--ink);background:var(--page)}
:root[data-theme] body{background:var(--page)}
:root[data-theme] header{background-color:#123461;background-image:url('/phone-theme-art.png');background-size:200% 200%;background-position:var(--art-position);border-radius:0;padding:26px 24px 30px;min-height:190px;position:relative}
:root[data-theme] .brand{font-size:1.15rem;letter-spacing:-.025em}.brand span{letter-spacing:.1em;font-size:.65rem;text-transform:uppercase;margin-top:5px}
:root[data-theme] h1{font-size:1.85rem;line-height:1.15;max-width:85%;margin:24px 0 10px;letter-spacing:-.035em}
:root[data-theme] #connection{font-size:.72rem;max-width:75%;color:#fff;line-height:1.5}
.header-settings{position:absolute;right:16px;top:18px;min-width:44px;padding:10px;background:#0b2443c9;color:white;border:1px solid #ffffff50;border-radius:50%;font-size:1.15rem}
:root[data-theme] .card{background:var(--surface);border-color:var(--line);border-radius:var(--radius);box-shadow:var(--shadow);margin:16px;padding:18px}
:root[data-theme] h2{font-size:1.2rem;letter-spacing:-.025em}
:root[data-theme] .row{border-color:var(--line)}
:root[data-theme] button{background:var(--accent);border-radius:12px}
:root[data-theme] button.secondary{background:var(--soft);color:var(--ink)}
:root[data-theme] button.danger{background:#fff0ed;color:#8a302a}
:root[data-theme] #workspace>.toolbar{padding:12px 18px 0;gap:8px}
:root[data-theme] #workspace>.toolbar button{font-size:.75rem;padding:6px 12px;min-height:36px}
:root[data-theme] #status{font-size:.8rem;margin:10px 0}
:root[data-theme] nav{background:var(--surface);border-color:var(--line)}
:root[data-theme] nav button{background:transparent;color:var(--ink);border-radius:14px;font-size:.72rem;padding:6px 4px;min-height:52px}
:root[data-theme] nav button[aria-current=page]{background:var(--accent);color:white}
.nav-icon{display:block;font-size:1.35rem;line-height:1.3;font-weight:400;margin-bottom:3px}
:root[data-theme] .member-row{grid-template-columns:48px minmax(0,1fr) auto;gap:12px;border:0;border-radius:14px;background:var(--soft);padding:12px;margin:8px 0;position:relative}
:root[data-theme] .member-row .avatar{border-radius:14px;width:48px;height:54px;object-fit:cover}
.member-row h3{font-size:1.05rem}.member-row small{font-size:.72rem}.member-points{font-size:1.25rem;font-weight:750;color:var(--ink);display:block;text-align:right}.member-points-label{display:block;font-size:.65rem;font-weight:400;color:#51627a}
.member-row .manage-member{position:absolute;inset:0;background:transparent!important;color:transparent!important;font-size:0!important;padding:0!important;border-radius:14px;z-index:1}
.member-row .manage-member:focus-visible{outline:3px solid #d39521;outline-offset:2px}
.task-progress{display:block;width:100%;height:5px;margin-top:7px;border:0;border-radius:5px;overflow:hidden;background:#c7d5e6;accent-color:var(--accent)}
.task-progress::-webkit-progress-bar{background:#c7d5e6}.task-progress::-webkit-progress-value{background:var(--accent)}
.avatar-initial{display:grid;place-items:center;background:#e7ebf1;color:#163253;font-family:Georgia,serif;font-size:1.2rem;border:1px solid #d7dee8}
.approvals-summary{width:100%;text-align:left;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:16px!important;font-size:.95rem}
.approvals-card summary{list-style:none}.approvals-card summary::-webkit-details-marker{display:none}.approvals-card[open] summary{margin-bottom:10px}.approvals-card[open] .approvals-summary:after{content:'−'}.approvals-summary:after{content:'+';font-size:1.3rem}
:root[data-theme] .approvals-card{padding:0;border:0;overflow:hidden}.approvals-card[open]{padding:14px}.task-manage-list summary{font-weight:650;cursor:pointer;min-height:44px;display:flex;align-items:center}.task-manage-list summary:after{content:' +';margin-left:auto}
:root[data-theme=clay]{--page:#e0eefb;--surface:#f9fcff;--soft:#e8f1fa;--radius:25px;--shadow:0 5px 0 #c9daeb,0 9px 20px #122f5510;--art-position:100% 0%}
:root[data-theme=clay] button:not(.manage-member){box-shadow:inset 0 2px 1px #ffffff35,0 2px 1px #173e6425;border-radius:18px}
:root[data-theme=paper]{--page:#f2efe7;--surface:#fffdf7;--soft:#f1eee5;--line:#ddd8ca;--radius:7px;--shadow:3px 4px 0 #d6d9d8;--art-position:0% 100%}
:root[data-theme=paper] button{border-radius:5px}:root[data-theme=paper] .member-row{border-radius:5px}
:root[data-theme=watercolor]{--page:#f2f6fc;--surface:#fffefa;--soft:#eaf0f8;--line:#d9e2ef;--radius:18px;--shadow:0 3px 13px #346aa516;--art-position:100% 100%;--accent:#315e95}
:root[data-theme=watercolor] .card{border-style:solid;border-width:1px 1px 2px}
:root[data-theme=professional]{--ink:#0c1e41;--page:#fafbfd;--surface:#fff;--line:#d6dfeb;--accent:#0c244c;--soft:#f0f2f6;--radius:10px;--shadow:none;--gold:#95650d;font-family:Georgia,'Times New Roman',serif}
:root[data-theme=professional] header{background:transparent;color:var(--ink);min-height:0;padding:28px 24px 18px;border-bottom:1px solid #8299b9}
:root[data-theme=professional] .brand{text-align:center;font-size:1.6rem;letter-spacing:-.025em;font-weight:600;padding:0 36px}
:root[data-theme=professional] .brand span{font-family:system-ui,sans-serif;font-size:.58rem;letter-spacing:.22em;color:var(--ink)}
:root[data-theme=professional] h1{font-size:1.8rem;font-weight:600;max-width:100%;letter-spacing:-.025em;margin-top:26px}
:root[data-theme=professional] #connection{color:#40516d;font-size:.75rem;max-width:100%}
:root[data-theme=professional] .header-settings{background:transparent;border:1px solid #d4dce7;color:var(--ink);font-family:system-ui,sans-serif;font-size:1rem;right:12px;top:28px}
:root[data-theme=professional] button{border-radius:7px;font-weight:500}
:root[data-theme=professional] h2{font-size:1.3rem;font-weight:600}
:root[data-theme=professional] .card{border:0;padding:14px 4px;margin:8px 20px}
:root[data-theme=professional] .member-row{border-radius:10px;padding:12px;background:#f0f2f6}
:root[data-theme=professional] .member-points{font-size:1.7rem;font-weight:500;border-left:1px solid #c8d1df;padding-left:12px;min-width:56px}
:root[data-theme=professional] .member-points-label{font-size:.8rem}
:root[data-theme=professional] .approvals-summary{background:transparent;border:1px solid #b28a40;color:var(--ink);padding:10px 12px!important;border-radius:8px}
:root[data-theme=professional] nav{box-shadow:none}:root[data-theme=professional] nav button{font-family:system-ui,sans-serif;border-radius:0}
:root[data-theme=professional] nav button[aria-current=page]{background:transparent;color:var(--ink);box-shadow:inset 0 -3px var(--accent)}
:root[data-theme=professional] .month-grid button{background:transparent}.month-grid button[aria-current=date],:root[data-theme=professional] .month-grid button[aria-current=date]{background:var(--accent);color:#fff}
.appearance-dialog{width:min(96vw,620px);padding:22px;background:#f6f8fc;color:#112544;font-family:system-ui,sans-serif;max-height:92dvh}.appearance-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.appearance-heading h2{margin:0}.theme-options{display:grid;gap:12px}.theme-option{padding:0!important;text-align:left;border:2px solid #dce4ed!important;background:white!important;color:#102b56!important;overflow:hidden;border-radius:14px!important;box-shadow:none!important}.theme-option[aria-pressed=true]{border-color:#164f8c!important;outline:2px solid #bbd9f3;outline-offset:1px}.theme-preview{display:flex;flex-direction:column;justify-content:center;gap:8px;min-height:104px;padding:16px 20px;background-color:#123461;background-image:url('/phone-theme-art.png');background-size:200% 200%;background-position:0 0;color:white}.theme-preview[data-theme=clay]{background-position:100% 0}.theme-preview[data-theme=paper]{background-position:0 100%}.theme-preview[data-theme=watercolor]{background-position:100% 100%}.theme-preview[data-theme=professional]{background:#fafbfd;color:#0c244c;font-family:Georgia,serif;border-bottom:1px solid #bac8d9}.preview-brand{font-size:1.2rem;letter-spacing:-.02em}.preview-caption{font-size:.78rem;max-width:75%;font-weight:400}.theme-label{display:flex;flex-direction:column;gap:5px;padding:14px 18px;font-size:.9rem}.theme-label>span{font-size:.75rem;font-weight:400;color:#4e6078}.appearance-actions{position:sticky;bottom:-22px;padding:12px 0;background:#f6f8fc}.appearance-actions button{width:100%;font-family:system-ui,sans-serif}.appearance-status{font-size:.85rem}.appearance-dialog .muted{font-size:.78rem}
@media(min-width:650px){.theme-options{grid-template-columns:1fr 1fr}.theme-option:last-child{grid-column:1/-1}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
.calendar-period{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:8px;align-items:center;text-align:center;margin-bottom:16px}.calendar-period h2{margin:0;font-size:1.1rem}.calendar-period button{padding:4px;font-size:1.6rem;background:transparent!important;color:var(--ink)!important;box-shadow:none!important}.calendar-modes{display:grid;grid-template-columns:repeat(3,1fr);border:1px solid #b7cadf;border-radius:12px;overflow:hidden;margin:12px 0 18px}.calendar-modes button{background:transparent!important;color:var(--ink)!important;border-radius:0!important;box-shadow:none!important;min-width:0;padding:10px 4px}.calendar-modes button[aria-pressed=true]{background:var(--accent)!important;color:#fff!important}.calendar-week-strip{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px}.calendar-week-strip button{display:flex;flex-direction:column;align-items:center;gap:5px;min-width:0;padding:9px 0;background:var(--soft)!important;color:var(--ink)!important}.calendar-week-strip small{font-size:.66rem;color:inherit}.calendar-week-strip strong{font-size:1.15rem}.calendar-week-strip button[aria-current=date]{background:var(--accent)!important;color:white!important}.calendar-options{margin-top:16px;font-size:.75rem}.calendar-options summary{min-height:36px;cursor:pointer;display:flex;align-items:center;color:#4b607c}.calendar-options[open] summary{margin-bottom:10px}.calendar-options button{font-size:.8rem;margin:0 6px 6px 0}.day-agenda h2{margin-bottom:18px}.agenda-row{display:grid;grid-template-columns:72px minmax(0,1fr);gap:10px;margin:14px 0;padding:10px 0}.agenda-time{font-size:.8rem;padding-top:3px;white-space:nowrap;color:#344c6d}.agenda-info{border-left:2px solid #6d96c3;padding:0 0 0 14px;position:relative;min-width:0}.agenda-info h3{font-size:1.1rem;margin:0 0 5px}.agenda-info .agenda-title{background:transparent!important;padding:0!important;min-height:32px;color:var(--ink)!important;text-align:left;font-weight:700;box-shadow:none!important;border-radius:3px!important;font-size:inherit;overflow-wrap:anywhere}.agenda-info small{display:block;font-size:.8rem;line-height:1.5;padding-right:24px}.agenda-person{position:absolute;right:0;top:36px;display:grid;place-items:center;min-width:28px;height:28px;border-radius:8px;background:var(--soft);font-size:.7rem}.event-tools{margin-top:8px;font-size:.75rem}.event-tools summary{cursor:pointer;color:#53647a;min-height:32px;display:flex;align-items:center}.event-tools button{font-size:.8rem;min-height:40px;margin:4px 6px 0 0}.event-notes{font-size:.85rem;overflow-wrap:anywhere}.calendar-add{text-align:center;padding:2px 20px 24px}.calendar-add button{min-width:160px}:root[data-theme=professional] .calendar-controls{padding-top:0;border-bottom:1px solid #9aafc9;padding-bottom:16px}:root[data-theme=professional] .agenda-row{padding:14px 0;border-bottom:1px solid #cbd6e4;margin:0}:root[data-theme=professional] .agenda-info h3{font-size:1.25rem}:root[data-theme=professional] .calendar-week-strip button{background:transparent!important}:root[data-theme=professional] .calendar-week-strip button[aria-current=date]{background:var(--accent)!important}:root[data-theme=professional] .agenda-time{font-size:.9rem}
@media(max-width:350px){.card{margin-left:10px!important;margin-right:10px!important;padding-left:12px!important;padding-right:12px!important}.agenda-row{grid-template-columns:64px minmax(0,1fr);gap:6px}.calendar-week-strip{gap:3px}.member-row{gap:8px!important}.member-points{font-size:1.3rem!important;padding-left:6px!important}.calendar-period h2{font-size:1rem!important}}

.agenda-event{display:block;width:100%;text-align:left;background:transparent!important;color:var(--ink)!important;border-radius:0!important;border-bottom:1px solid #cbd6e4!important;box-shadow:none!important;padding:16px 4px!important;font-size:1.05rem;overflow-wrap:anywhere}.agenda-event:focus-visible{outline:3px solid var(--accent);outline-offset:2px}.event-detail{max-height:85dvh;overflow:auto;overflow-wrap:anywhere}.event-detail .event-notes{white-space:pre-wrap}.event-detail .actions{position:sticky;bottom:0;background:inherit;padding-top:12px}

.agenda-event{display:flex;align-items:center;gap:12px}.event-avatar{width:38px;height:42px;object-fit:contain;flex:none}.event-title{min-width:0}.event-family{display:grid;place-items:center;color:var(--accent);font-size:28px}

/* Mockup audit: compact chrome; account details belong in Settings. */
:root[data-theme] body[data-family-page] header{min-height:0;padding:18px 20px 16px}
:root[data-theme] body[data-family-page] h1{font-size:1.7rem;line-height:1.2;margin:14px 0 0;overflow-wrap:anywhere}
body[data-family-page] #connection{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
body[data-family-page]:not([data-family-page=settings]) #workspace>.toolbar,body[data-family-page]:not([data-family-page=settings]) main>footer{display:none}
body[data-family-page=settings] main>footer{font-size:12px;line-height:1.5}
:root[data-theme]:not([data-theme=professional]) body[data-family-page] .card{background:#fff7e9;border-color:#eadcc4}
body[data-family-page] #status[hidden]{display:none}
body[data-family-page] #content{padding-bottom:20px}
body[data-family-page] .rewards-showcase>button{font-size:12px;padding:7px 10px}
body[data-family-page] details.card>summary{font-weight:800;cursor:pointer;padding:4px 0}

/* Shared blue-family navigation and heading rhythm. */
:root:not([data-theme=professional]) .brand{display:none}
:root:not([data-theme=professional]) h1,:root:not([data-theme=professional]) h2,:root:not([data-theme=professional]) h3{font-family:system-ui,sans-serif;letter-spacing:-.025em}

.member-row .adjust-member-points{position:relative;z-index:2;grid-column:2 / -1;justify-self:start;padding:8px 14px;min-height:40px;font-size:.9rem}
/* Approved Midnight Glass calendar. */
body[data-family-page=calendar]{--ink:#f4f8ff;--page:#031326;--surface:#0a213c;--soft:#18324e;--accent:#008cae;--line:#34516d;background:#031326!important;color:#f4f8ff}
body[data-family-page=calendar] main{background:#031326;min-height:100dvh;padding-bottom:100px}
body[data-family-page=calendar] header{min-height:108px;padding:30px 20px 12px;background-color:#071d37;background-size:200% 200%}
body[data-family-page=calendar] header .brand,body[data-family-page=calendar] #connection,body[data-family-page=calendar] #workspace>.toolbar,body[data-family-page=calendar] footer{display:none}
body[data-family-page=calendar] h1{margin:10px 0 0;font-size:2rem;color:white}
body[data-family-page=calendar] .header-settings{right:62px;top:34px;background:transparent}
.calendar-header-add{position:absolute;right:14px;top:32px;font-size:2rem;background:transparent!important;color:white!important;padding:0;width:44px}body:not([data-family-page=calendar]) .calendar-header-add{display:none}
body[data-family-page=calendar] .card{background:transparent;border:0;box-shadow:none;margin:0 14px;padding:12px 6px;color:white}
body[data-family-page=calendar] .calendar-period{margin-bottom:8px}body[data-family-page=calendar] .calendar-period h2{font-size:1.2rem;color:white}body[data-family-page=calendar] .calendar-period button{color:#f9d777!important}
body[data-family-page=calendar] .calendar-week-strip button{background:transparent!important;color:white!important;border:1px solid transparent;padding:8px 0}body[data-family-page=calendar] .calendar-week-strip button[aria-current=date]{background:linear-gradient(#29bed5,#00556d)!important;border-color:#54efff}
body[data-family-page=calendar] .calendar-modes{border-color:#405c7b;background:#142b45;border-radius:14px;margin:14px 0}body[data-family-page=calendar] .calendar-modes button{color:white!important}body[data-family-page=calendar] .calendar-modes button[aria-pressed=true]{background:linear-gradient(#23c3da,#006780)!important;border:1px solid #50f4ff;border-radius:12px!important}
.calendar-people{display:flex;gap:8px;overflow-x:auto;padding:5px 0 10px;scrollbar-width:thin}.calendar-people button{display:flex;align-items:center;gap:8px;flex-shrink:0;border-radius:40px!important;background:linear-gradient(#233e59,#11263c)!important;color:white!important;border:1px solid #456078;padding:8px 12px;min-height:54px}.calendar-people button[aria-pressed=true]{border:2px solid #43f2ff;background:linear-gradient(#155471,#043149)!important}.calendar-people img{width:40px;height:40px;object-fit:cover;border-radius:50%}.family-symbol{font-size:28px}
body[data-family-page=calendar] .calendar-options{margin-top:0}body[data-family-page=calendar] .calendar-options summary{color:#b4c9de;min-height:28px}
body[data-family-page=calendar] .day-agenda{background:linear-gradient(110deg,#102d48,#04172a);border-radius:18px;padding:16px 12px}body[data-family-page=calendar] .day-agenda h2{font-size:1.25rem;margin:0 0 10px;color:white}
body[data-family-page=calendar] .agenda-event{display:grid;grid-template-columns:74px 42px minmax(0,1fr) 12px;align-items:center;gap:8px;background:transparent!important;color:white!important;border:0;border-top:1px solid #426078;border-radius:0!important;padding:14px 0;min-height:76px;width:100%;text-align:left;box-shadow:none!important}.agenda-clock{font-size:.8rem;white-space:nowrap;border-right:3px solid #39daed;padding:8px 5px 8px 0}body[data-family-page=calendar] .event-avatar{width:40px;height:40px;border-radius:50%;object-fit:cover}body[data-family-page=calendar] .event-title{font-size:1rem;font-weight:650;overflow-wrap:anywhere}.event-chevron{color:#ffda76;font-size:1.7rem}
body[data-family-page=calendar] .calendar-add{padding:18px 22px}body[data-family-page=calendar] .calendar-add button{width:100%;background:linear-gradient(#08627a,#03243e)!important;color:white;border:2px solid #3beafa;border-radius:15px;font-size:1.15rem}
body[data-family-page=calendar] #tabs{background:#071b31!important;border:1px solid #3e5873;color:white!important}body[data-family-page=calendar] #tabs button{color:white!important;background:transparent!important}body[data-family-page=calendar] #tabs button[aria-current=page]{color:#46eafa!important;background:#16324a!important}
#editor.calendar-editor{background:#061a30;color:white;border:1px solid #42607c;border-radius:22px;padding:20px;max-height:92dvh;width:min(440px,calc(100vw - 20px));box-sizing:border-box}#editor.calendar-editor h2{color:white;font-size:1.65rem}#editor.calendar-editor label{color:#e5effb}#editor.calendar-editor input,#editor.calendar-editor select,#editor.calendar-editor textarea{background:#18324e;color:white;border:1px solid #44617e;border-radius:12px;min-height:46px;color-scheme:dark;box-sizing:border-box;max-width:100%}
#editor.calendar-editor #fields{display:flex;flex-direction:column;gap:12px}#editor.calendar-editor .calendar-more{border:1px solid #35516e;border-radius:14px;padding:12px}#editor.calendar-editor .calendar-more summary{cursor:pointer;padding:6px 0;color:#d3e5f5}#editor.calendar-editor .actions{position:sticky;bottom:-20px;background:#061a30;padding:14px 0;display:flex;flex-wrap:wrap;gap:8px}#editor.calendar-editor .actions button{background:#123851;color:white;border:1px solid #5f829a}#editor.calendar-editor #save{background:#007c98;border-color:cyan}#editor.calendar-editor #refresh-form{font-size:.75rem}
body[data-family-page=calendar] .event-detail{background:#0b243f;color:white;border:1px solid #557a9c}body[data-family-page=calendar] .event-detail h2{color:white}
body[data-family-page=calendar] .card{background:transparent!important;border:0!important;box-shadow:none!important;border-radius:18px!important;margin:0 14px!important;padding:12px 6px!important}
body[data-family-page=calendar] .day-agenda{background:linear-gradient(110deg,#102d48,#04172a)!important;padding:16px 12px!important}
body[data-family-page=calendar] #tabs{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;overflow:visible!important;padding:7px!important;left:10px!important;right:10px!important;width:auto!important;max-width:600px;margin:auto}
body[data-family-page=calendar] #tabs [data-page]{display:none!important}body[data-family-page=calendar] #tabs [data-page=calendar],body[data-family-page=calendar] #tabs [data-page=family],body[data-family-page=calendar] #tabs [data-page=tasks]{display:flex!important;min-width:0!important;flex-direction:column!important;align-items:center!important;font-size:.75rem!important;padding:5px!important}
body[data-family-page=calendar] #tabs [data-page=calendar]{order:0}body[data-family-page=calendar] #tabs [data-page=family]{order:1}body[data-family-page=calendar] #tabs [data-page=tasks]{order:2}#calendar-more-nav{order:3;display:flex;flex-direction:column;align-items:center;font-size:1.1rem!important;min-width:0;padding:4px!important}#calendar-more-nav span{font-size:.75rem}
body[data-family-page=calendar] .header-settings{display:none}.calendar-settings-button{position:absolute;right:60px;top:32px;background:transparent!important;color:white!important;font-size:1.6rem;padding:0;width:44px;height:44px}
body[data-family-page=calendar] #tabs{transform:none!important;bottom:10px!important}
#editor.calendar-editor #fields label{margin:0!important;display:flex;flex-direction:column;gap:5px;font-size:.9rem}#editor.calendar-editor #fields{gap:12px!important}#editor.calendar-editor h2{margin:0 0 16px!important}#editor.calendar-editor .calendar-people{padding:0!important}#editor.calendar-editor input,#editor.calendar-editor select{font-size:1rem!important;padding:9px!important;min-height:43px!important}#editor.calendar-editor .calendar-time-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}#editor.calendar-editor .calendar-time-fields>*{min-width:0}#editor.calendar-editor .calendar-more label{margin-top:10px!important}
body[data-family-page=calendar] header{background-image:linear-gradient(#05203a55,#031326),url('/phone-theme-art.png')!important;background-position:center,0 0;padding-top:26px!important;min-height:102px!important}
body[data-family-page=calendar] h1{font-size:2.1rem!important;letter-spacing:0;font-weight:750!important}body[data-family-page=calendar] .calendar-period h2{font-size:1.25rem;font-weight:700}body[data-family-page=calendar] button{font-weight:600}body[data-family-page=calendar] .calendar-week-strip small{font-size:.8rem;font-weight:400}body[data-family-page=calendar] .calendar-week-strip strong{font-size:1.4rem;font-weight:650}body[data-family-page=calendar] .calendar-people img{width:46px;height:46px}body[data-family-page=calendar] .calendar-options{font-size:.7rem}body[data-family-page=calendar] .calendar-options summary{font-weight:400}body[data-family-page=calendar] .agenda-event{min-height:82px}body[data-family-page=calendar] .event-title{font-size:1.1rem;font-weight:600}body[data-family-page=calendar] .agenda-clock{font-size:.85rem;font-weight:500}
#editor.calendar-editor{max-height:96dvh;padding:18px!important;background:#04182c!important}#editor.calendar-editor #edit-form{display:grid;grid-template-columns:32px minmax(0,1fr) 58px;gap:12px}#editor.calendar-editor #edit-title{grid-column:2;grid-row:1;font-size:1.6rem!important;padding:0;margin:0!important;align-self:center}#editor.calendar-editor #fields{grid-column:1/-1;grid-row:2}#editor.calendar-editor .actions{display:contents!important}#editor.calendar-editor #save{grid-column:3;grid-row:1;min-width:0;padding:0!important;border:0;background:transparent!important;color:#4df4ff;font-size:1.1rem;box-shadow:none}#editor.calendar-editor #cancel{grid-column:1;grid-row:1;min-width:0;padding:0!important;border:0;background:transparent!important;color:#ffe077;font-size:1.9rem;box-shadow:none}#editor.calendar-editor #refresh-form{grid-column:1/-1;background:transparent;color:#adc7dd;min-height:30px;padding:4px;font-weight:400}#editor.calendar-editor #form-status{grid-column:1/-1;color:#ffd793;margin:0}#editor.calendar-editor #form-status:empty{display:none}
#editor.calendar-editor .calendar-all-day{width:100%;display:flex;justify-content:space-between;align-items:center;background:#17304b;color:white;border:1px solid #405973;border-radius:12px;padding:10px 14px;font-size:1rem;font-weight:500}#editor.calendar-editor .calendar-all-day:after{content:'';display:block;width:46px;height:28px;border-radius:20px;background:radial-gradient(circle at 14px 14px,#fff 11px,transparent 12px),#3a4c64}#editor.calendar-editor .calendar-all-day[aria-checked=true]:after{background:radial-gradient(circle at 32px 14px,#fff 11px,transparent 12px),#008ea8}
body[data-family-page=calendar] header{background-image:linear-gradient(transparent,#031326),url('/phone-calendar.png')!important;background-size:cover!important;background-position:center top!important}
#editor.calendar-editor{background-image:linear-gradient(transparent 0,#04182c 110px),url('/phone-calendar.png')!important;background-size:100% auto!important;background-position:top center!important;background-repeat:no-repeat!important}
.calendar-group{display:flex;align-items:center;justify-content:center;width:46px;min-width:46px;height:46px;position:relative}.calendar-group img{width:32px!important;height:38px!important;object-fit:cover;border-radius:50%;position:relative}.calendar-group img+img{margin-left:-15px;top:5px}.event-family.calendar-group{width:40px;min-width:40px}
#editor.calendar-editor .calendar-more summary{font-size:1rem;font-weight:600}#editor.calendar-editor input,#editor.calendar-editor select{margin-top:0!important;font-weight:500}#editor.calendar-editor #fields>label,#editor.calendar-editor .calendar-time-fields{background:#112b45a8;border:1px solid #31485f;border-radius:13px;padding:8px 10px}#editor.calendar-editor .calendar-time-fields label{padding:0;border:0}#editor.calendar-editor .calendar-more{background:#112b45a8}
#editor.calendar-editor:not(:has(#form-status:not(:empty))) #refresh-form{display:none!important}
body[data-family-page=calendar] #status{margin:0 20px;color:#ffd991;font-size:.85rem}body[data-family-page=calendar] #status:empty{display:none}
body[data-family-page=calendar] .calendar-people button{font-size:1rem!important}body[data-family-page=calendar] #tabs .nav-icon{width:27px;height:27px}body[data-family-page=calendar] #tabs button[aria-current=page]{background:transparent!important;border-radius:0;position:relative}body[data-family-page=calendar] #tabs button[aria-current=page]:after{content:'';position:absolute;bottom:0;width:36px;height:3px;border-radius:3px;background:#44f4ff}
body[data-family-page=calendar] header{min-height:88px!important;padding-top:18px!important}body[data-family-page=calendar] .calendar-controls{padding-top:6px!important;padding-bottom:6px!important}body[data-family-page=calendar] .agenda-event{min-height:72px;padding:10px 0}body[data-family-page=calendar] .calendar-add{padding:16px 22px 110px}

/* Tablet companion uses the approved TV Midnight Glass treatment, with touch targets. */
@media (min-width:768px){
 :root[data-theme]{--ink:#f2f7ff;--page:#06172f;--surface:#102b50;--line:#5278a2;--soft:#193960;--accent:#1864a3;--gold:#ffe19a;--shadow:0 12px 28px #0003;color-scheme:dark}
 :root[data-theme] body{background:radial-gradient(ellipse at top right,#1a4a80,transparent 55%),#06172f;color:#f2f7ff}
 :root[data-theme] main{max-width:1440px!important;min-height:100vh;padding:0 24px 112px}
 :root[data-theme] header{min-height:110px!important;padding:26px 24px 16px!important;background-image:linear-gradient(transparent,#06172f),url('/phone-calendar.png')!important;background-size:cover!important;background-position:center 22%!important}
 :root[data-theme] .brand{display:none!important}
 :root[data-theme] h1{font-size:2.5rem!important;margin:0 0 8px!important;color:white}
 :root[data-theme] h2,:root[data-theme] h3{color:#f2f7ff}
 :root[data-theme] #connection{font-size:.8rem;color:#c1d4ee}
 :root[data-theme] .card,:root[data-theme] .settings-accordion{background:#102b50df!important;border:1px solid #5278a288!important;color:#f2f7ff!important;border-radius:22px;margin:12px 0;padding:20px;box-shadow:0 12px 28px #0002}
 :root[data-theme] .row{border-color:#6585aa55;color:#f2f7ff}
 :root[data-theme] .row small,:root[data-theme] .member-points-label{color:#c1d4ee!important}
 :root[data-theme] button,:root[data-theme] button.secondary{background:linear-gradient(#254b79,#132e52);color:#f2f7ff;border:1px solid #7195bd66;min-height:46px}
 :root[data-theme] button[aria-pressed=true],:root[data-theme] button:focus-visible{background:linear-gradient(#46d6ed,#087da3);color:#031c35;outline-color:#65edff}
 :root[data-theme] input,:root[data-theme] select,:root[data-theme] textarea{background:#183653;color:#fff;border-color:#7293b8}
 :root[data-theme] #tabs{position:fixed!important;left:50%!important;right:auto!important;bottom:16px!important;transform:translateX(-50%)!important;width:calc(100% - 64px)!important;max-width:1360px!important;background:#071c37e8!important;backdrop-filter:none;border:1px solid #648bb5!important;border-radius:26px!important;display:flex!important;flex-wrap:nowrap!important;gap:6px;padding:9px;z-index:50}
 :root[data-theme] #tabs button{display:flex!important;flex:1 1 0!important;min-width:60px!important;min-height:58px!important;flex-direction:column;align-items:center;justify-content:center;background:transparent!important;color:#d6e8ff!important;border:1px solid transparent!important;border-radius:19px!important;font-size:.8rem!important;transition:border-color .09s ease,color .09s ease}
 :root[data-theme] #tabs button[aria-current=page]{background:linear-gradient(#246eb3,#174879)!important;border-color:#65eaff!important;color:white!important}
 :root[data-theme] #tabs button[aria-current=page]:after{display:none!important}
 :root[data-theme] #tabs #calendar-more-nav{display:none!important}
 :root[data-theme] #tabs .nav-icon{width:26px;height:26px}
 body[data-family-page=family] #content{display:grid;grid-template-columns:minmax(0,2.5fr) minmax(250px,1fr);gap:18px;align-items:start}
 :root[data-theme] body[data-family-page=family] .family-members-panel{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:16px;align-items:center;background:transparent!important;border:0!important;box-shadow:none!important}
 body[data-family-page=family] .family-members-panel>.card-head{width:100%;margin:0}
 body[data-family-page=family] .family-members-panel>.secondary{order:4}
 body[data-family-page=family] .member-row{flex:1 1 220px;max-width:360px;min-height:145px;background:linear-gradient(#204a77bb,#102d51)!important;border:1px solid #7098c780;border-radius:22px;padding:14px;grid-template-columns:90px minmax(0,1fr) auto;overflow:visible}
 body[data-family-page=family] .member-row .avatar{width:90px!important;height:114px!important;object-fit:contain!important;background:transparent!important;border-radius:0!important;filter:drop-shadow(0 6px 4px #0004)}
 body[data-family-page=family] .member-row h3{font-size:1.4rem}
 body[data-family-page=family] .member-points{color:white!important;font-size:1.5rem}
 body[data-family-page=family] .family-tasks-panel{grid-column:1;grid-row:2;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 body[data-family-page=family] .family-tasks-panel>h2{grid-column:1/-1}
 body[data-family-page=family] .family-tasks-panel>.row{background:#16375b;border:1px solid #527ba588;border-radius:18px;padding:14px;gap:10px;min-width:0}
 body[data-family-page=family] .family-tasks-panel>.row .info{min-width:100px}
 body[data-family-page=family] .approvals-card{grid-column:2;grid-row:2}
 body[data-family-page=family] .task-picture{width:70px;height:70px}
 body[data-family-page=calendar] .calendar-controls,body[data-family-page=calendar] .calendar-people,body[data-family-page=calendar] .calendar-add,body[data-family-page=calendar] .calendar-card{max-width:1100px;margin-left:auto!important;margin-right:auto!important}
 body[data-family-page=calendar] .calendar-people img{width:64px;height:64px}
 body[data-family-page=calendar] .agenda-event{min-height:84px;grid-template-columns:110px 64px minmax(0,1fr) 28px}
 body[data-family-page=calendar] .calendar-add{padding-bottom:24px}
 :root[data-theme] dialog{background:#0c2444;color:#f2f7ff;border:1px solid #648db8;border-radius:24px;max-width:min(720px,90vw)}
 :root[data-theme] .settings-expanded .card{background:#173656!important}
}
@media (min-width:768px) and (max-width:1000px){body[data-family-page=family] #content{grid-template-columns:1fr}body[data-family-page=family] .approvals-card{grid-column:1;grid-row:3}body[data-family-page=family] .family-tasks-panel{grid-column:1;grid-row:2}}

@media(min-width:768px){:root[data-theme] #tabs [data-page=calendar]{order:0!important}:root[data-theme] #tabs [data-page=family]{order:1!important}:root[data-theme] #tabs [data-page=tasks]{order:2!important}:root[data-theme] #tabs [data-page=rewards]{order:3!important}:root[data-theme] #tabs [data-page=imports]{order:4!important}:root[data-theme] #tabs [data-page=analytics]{order:5!important}:root[data-theme] #tabs [data-page=news]{order:6!important}:root[data-theme] #tabs [data-page=settings]{order:7!important}:root[data-theme] .empty{color:#c1d4ee!important}}
@media(min-width:768px){
 body[data-family-page=family] .family-tasks-panel>h2{grid-column:1;grid-row:1;align-self:center;margin:0}
 body[data-family-page=family] .family-tasks-panel>button{grid-column:2;grid-row:1;justify-self:end;min-height:40px;padding:8px 16px}
 body[data-family-page=family] .family-members-panel{padding:12px 0!important;margin:0!important}
 body[data-family-page=family] .member-row{min-height:118px;margin:0!important}
 body[data-family-page=family] .family-tasks-panel>.row{flex-wrap:wrap}
 body[data-family-page=family] .family-tasks-panel>.row .info{flex:1 1 120px}
}

/* Consistent small-screen surfaces and readable white form fields. */
:root[data-theme] body:is([data-family-page=family],[data-family-page=imports],[data-family-page=news]){background:#081b34!important;color:#edf5ff}
:root[data-theme] body:is([data-family-page=family],[data-family-page=imports],[data-family-page=news]) main{background:transparent!important;padding-bottom:calc(120px + env(safe-area-inset-bottom))!important}
:root[data-theme] body:is([data-family-page=family],[data-family-page=news]) .card{background:#112c4b!important;color:#edf5ff!important;border:1px solid #365b80!important}
:root[data-theme] body:is([data-family-page=family],[data-family-page=imports],[data-family-page=news]) :is(h2,h3){color:#edf5ff!important}
:root[data-theme] body[data-family-page=family] .member-row{background:#1b3c60!important;color:#edf5ff!important}
:root[data-theme] body[data-family-page=family] :is(.member-points,.member-points-label,.row small){color:#dcecff!important}
:root[data-theme] body #tabs{background:#0b223deF!important;border-color:#6084aa!important;color:#edf5ff!important}
:root[data-theme] body #tabs button{color:#dcecff!important;background:transparent!important}
:root[data-theme] body #tabs button[aria-current=page]{background:linear-gradient(#276caa,#17446e)!important;color:#fff!important}
:root[data-theme] body :is(#editor,.news-editor,.upload-dialog) :is(input:not([type=checkbox]):not([type=range]),select,textarea){background:#fff!important;color:#142e50!important;color-scheme:light}
:root[data-theme] body :is(#editor,.news-editor,.upload-dialog) input::placeholder{color:#617690!important}
:root[data-theme] body[data-family-page=imports] .moments-shell{background:transparent!important}
:root[data-theme] body[data-family-page=imports] .moments-heading h2{color:#edf5ff!important}
:root[data-theme] body[data-family-page=news] :is(.news-empty,.news-card,.news-private){background:#153554!important;color:#edf5ff!important;border:1px solid #42698e}
:root[data-theme] body[data-family-page=news] :is(.news-topics button,.news-baskets button){background:#1b426b!important;color:#edf5ff!important;border:1px solid #6086ad}
:root[data-theme] body[data-family-page=news] button[aria-pressed=true]{background:#276e9f!important;color:#fff!important;border-color:#92e4ff}
:root[data-theme] body[data-family-page=news] :is(.news-card small,.news-private a){color:#bedfff!important}
@media(min-width:1000px){
 :root[data-theme] body[data-family-page=calendar] header{min-height:80px!important;padding:16px 24px 8px!important}
 body[data-family-page=calendar] #content{display:grid;grid-template-columns:minmax(290px,340px) minmax(0,1fr);gap:16px;align-items:start;padding:12px 14px 120px}
 :root[data-theme] body[data-family-page=calendar] .calendar-controls{grid-column:1;grid-row:1/span 20;position:sticky;top:12px;width:100%;min-width:0;max-width:none;margin:0!important;padding:14px!important;box-sizing:border-box}
 :root[data-theme] body[data-family-page=calendar] .day-agenda{grid-column:2;margin:0!important;padding:16px!important;min-width:0}
 body[data-family-page=calendar] .calendar-add{grid-column:2;width:100%;padding:0!important;box-sizing:border-box}
 body[data-family-page=calendar] .calendar-people{flex-wrap:wrap;gap:6px;padding:6px 0}
 body[data-family-page=calendar] .calendar-people button{padding:6px 10px;min-height:44px;font-size:.85rem}
 body[data-family-page=calendar] .calendar-people img{width:34px;height:34px}
 body[data-family-page=calendar] .agenda-event{min-height:62px;padding:8px 0;grid-template-columns:80px 44px minmax(0,1fr) 18px}
 body[data-family-page=calendar] .event-avatar{width:40px;height:40px}
 body[data-family-page=calendar] .event-title{font-size:1rem}
 body[data-family-page=calendar] .calendar-week-strip button{min-width:0!important}
 body[data-family-page=calendar] .calendar-modes button{min-width:0;padding:9px 4px!important}
}
@media(max-width:767px){:root[data-theme] body[data-family-page=family] .row{flex-wrap:wrap;gap:8px}:root[data-theme] body[data-family-page=family] .row .info{min-width:0;flex:1 1 140px}}

/* Hidden permissions and signed-out controls must win over themed flex layouts. */
:root[data-theme] body #tabs[hidden],:root[data-theme] body #tabs button[hidden]{display:none!important}
