/* CalendarScreen.kt and AccountScreen.kt use the same Inter text and dp breakpoints as the library. */
.library>.shelf:has(.calendar-screen){padding:0;container:calendar-page / inline-size}
.calendar-screen{--cal-paper:#fffdf9;--cal-peach:#f5dabd;padding:28px;display:grid;gap:18px;color:var(--ink)}
.calendar-screen h1,.calendar-screen h2,.calendar-screen p,.account-screen h1,.account-screen h2,.account-screen h3,.account-screen p{margin:0}
.account-line-icon{width:24px;height:24px;vertical-align:middle}.cal-actions .account-line-icon{width:20px;height:20px;margin-right:4px}
.cal-head,.cal-actions,.cal-period,.cal-source,.cal-row,.cal-cell-event,.account-screen header,.account-identity,.account-method{display:flex;align-items:center}
.cal-head{gap:12px}.cal-head>img,.account-screen header>img{width:48px;height:48px;object-fit:contain}
.cal-head h1{font:500 30px/1.25 Inter,sans-serif}.cal-head p,.account-screen p{line-height:1.5;color:var(--muted)}
.cal-actions{flex-wrap:wrap;gap:8px}.cal-actions button,.cal-side button.cal-text,.cal-access button,.cal-detail button,.cal-period button{min-height:40px;padding:7px 16px;border:1px solid var(--edge);border-radius:20px;background:var(--surface);font:500 16px/1.3 Inter,sans-serif;color:var(--ink)}
.cal-actions .cal-primary,.cal-period button[aria-pressed=true]{background:var(--cal-peach);border-color:var(--cal-peach)}
.cal-actions button.cal-text,.cal-side button.cal-text,.cal-period button[aria-label]{background:transparent;border-color:transparent;color:var(--accent)}
.cal-actions b,.cal-actions span[aria-hidden]{font-size:20px;vertical-align:-1px}
.cal-period{gap:6px;margin-bottom:14px}.cal-period h2{font:500 23px/1.25 Inter,sans-serif;flex:1}.cal-period button[aria-label]{font-size:29px;line-height:1;padding:3px 12px}.cal-period button[aria-pressed]{border-radius:12px}
.cal-layout{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(0,1fr);gap:20px;align-items:start}
.cal-side,.cal-form,.cal-detail,.account-card{display:grid;gap:12px;min-width:0;align-content:start}
.cal-card{padding:18px;border:1px solid var(--edge);border-radius:20px;background:var(--cal-paper);min-width:0}
.cal-side>.cal-card{display:grid;gap:12px;justify-items:start}.cal-card h2{font:500 21px/1.35 Inter,sans-serif}.cal-card p{color:var(--muted)}
.cal-card>img{width:60px;height:60px;object-fit:contain}.cal-grid{padding:8px}.cal-weekdays,.cal-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}
.cal-weekdays{align-items:center;text-align:center;height:38px;color:var(--muted);font-size:15px}
.cal-cell{display:flex;flex-direction:column;align-items:center;gap:2px;min-width:0;height:86px;overflow:hidden;padding:5px;border:1px solid transparent;border-radius:12px;background:transparent;color:var(--ink);text-align:start}
.cal-cell[aria-pressed=true]{background:color-mix(in srgb,var(--cal-peach) 48%,var(--cal-paper));border-color:var(--edge)}
.cal-cell .day-num{font:400 18px/24px Inter,sans-serif;min-width:24px;text-align:center}
.cal-cell.current-day{border-color:var(--accent)}.cal-cell[aria-pressed=true] .day-num{font-weight:500}
.cal-cell.other-month .day-num{color:var(--muted);opacity:.7}
.cal-cell-event{display:block;min-width:0;width:100%;border-radius:5px;padding:0 4px;text-align:left;background:color-mix(in srgb,var(--event-color) 16%,transparent);font-size:12px;line-height:15px}.cal-cell-event>.cal-dot,.cal-cell-event:nth-of-type(4){display:none}.cal-cell-event span{display:block}.cal-cell-event span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.cal-cell small{font-size:10px;line-height:12px}.cal-dot{display:inline-block;width:8px;height:8px;border-radius:50%;flex:none}
.cal-row{background:transparent;border:0;text-align:left;gap:11px;padding:8px 0;width:100%;border-radius:8px;color:var(--ink)}.cal-row>.cal-dot{height:48px;width:4px;border-radius:2px}
.cal-row strong,.cal-row small,.cal-check small{display:block;overflow-wrap:anywhere}.cal-row strong{font-size:19px;font-weight:400}.cal-source small,.cal-hint{font-size:14px;color:var(--muted)}.cal-source small{display:block}.cal-row small,.cal-check small{color:var(--muted)}
.cal-source{gap:9px}.cal-access{display:flex;align-items:center;gap:16px;margin-bottom:18px}.cal-access img{width:76px;height:76px}.cal-access button{margin-top:10px}
.cal-detail p{white-space:pre-wrap;overflow-wrap:anywhere}.cal-detail .cal-dot{margin-right:8px}.cal-detail button{justify-self:start}
#fields label.cal-check{display:flex;align-items:center;gap:10px;min-height:44px}#fields .cal-check input{width:20px;min-height:20px;height:20px;margin:0;accent-color:var(--accent)}
#sheet:has(#calProviders){width:min(620px,calc(100vw - 28px));max-width:calc(100vw - 28px)}
.cal-providers{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.cal-providers button,.cal-provider-info button{color:var(--ink);border:1px solid var(--edge);border-radius:14px;background:var(--surface);min-height:44px;padding:7px 11px;font:500 15px/1.35 Inter,sans-serif}
.cal-providers button[aria-expanded=true]{background:#f5dabd;color:#423629}
.cal-provider-info{background:var(--surface);border:1px solid var(--edge);border-radius:16px;padding:14px;margin-top:10px}
.cal-provider-info p{line-height:1.5;margin:0 0 9px}.cal-provider-info p:last-child{margin-bottom:0}
.cal-provider-info button+button{margin-left:6px}.cal-pick-group{border:0;border-top:1px solid var(--edge);padding:4px 0 7px;margin:12px 0;min-width:0}
.cal-pick-group legend{padding:0 8px 0 0;font-weight:500}.cal-check input{flex:none}
#calProviderNotice:empty{display:none}#calProviderNotice{font-size:14px;color:var(--muted)}
@media(max-width:450px){.cal-providers{grid-template-columns:1fr}.cal-providers button{text-align:left}.cal-provider-info button+button{margin:6px 0 0}}
.cal-times{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(190px,100%),1fr));gap:12px}.cal-form :is(input,select,textarea){min-width:0;max-width:100%}
#calendarStudy .study-layout{margin:0}.cal-message,#accountNotice,#accountPending{padding:12px 16px;border-radius:14px;background:var(--strong);overflow-wrap:anywhere}.account-screen [hidden]{display:none!important}
@container calendar-page (max-width:849px){.cal-layout{grid-template-columns:1fr}.cal-cell{height:64px;display:block;text-align:center}.cal-cell .day-num{display:block;margin:auto}.cal-cell .cal-cell-event{display:inline-flex;width:auto;background:none;padding:0 1px}.cal-cell .cal-cell-event .cal-dot{display:inline-block;width:5px;height:5px}.cal-cell .cal-cell-event span,.cal-cell small{display:none}}
@container calendar-page (max-width:599px){.calendar-screen{padding:16px}.cal-weekdays{font-size:13px}.cal-cell{padding:3px}.cal-period{gap:2px}.cal-period button{padding:6px 10px}.cal-period h2{font-size:18px}}
.account-screen{--account-paper:#fff;--account-card:#fff;--account-accent:#f4e3c7;height:100dvh;overflow-y:auto;overscroll-behavior:contain;background:var(--account-paper);color:var(--ink)}
.account-wrap{box-sizing:border-box;margin:auto;padding:8px 14px max(26px,env(safe-area-inset-bottom));display:grid;gap:18px}.account-grid,.account-screen footer{width:min(calc(100% - 44px),1040px);margin-inline:auto}
.account-screen header{gap:12px}.account-screen header h1{font:500 22px/1.3 Inter,sans-serif}.account-screen header button{background:transparent;border:0;padding:8px;border-radius:50%;height:44px;width:44px}.account-screen header button img{width:25px;height:25px}
.account-grid{display:grid;grid-template-columns:minmax(0,.42fr) minmax(0,.58fr);gap:0;align-items:start;border-radius:28px;background:var(--account-card)}
.account-card{padding:32px;gap:16px;background:transparent}.account-intro{gap:18px}.account-intro h2{font-size:28px;line-height:36px}.account-switch{justify-self:start}
.account-intro>img{width:80px;height:80px;object-fit:contain}.account-card h2{font:500 26px/1.25 Inter,sans-serif}.account-card h3{font:500 20px/1.35 Inter,sans-serif}
.data-panels{width:min(100%,900px);margin:auto;display:grid;gap:18px}.data-card{border:1px solid var(--edge);border-radius:20px;padding:22px}.data-card button{justify-self:start}.data-card #dailyStatus{display:flex;flex-wrap:wrap;gap:8px}.data-card #dailyStatus p{width:100%}.account-small,.account-card small{font-size:14px;color:var(--muted);line-height:1.5}
.account-screen button{color:var(--ink);cursor:pointer}.account-card button,.account-screen footer button,#accountPending button{padding:8px 14px;min-height:42px;border:1px solid var(--edge);border-radius:14px;font:500 16px/1.35 Inter,sans-serif;background:var(--account-card)}
.account-card .account-primary,.account-card .account-provider,.account-screen .account-backup{width:100%;min-height:54px;font-size:17px}
.account-card .account-primary{background:var(--account-accent);border-color:var(--account-accent)}
.account-card button.account-text,.account-screen footer .account-text,.account-card .account-eye{background:transparent;border-color:transparent;color:var(--accent);justify-self:start}
.account-screen footer .account-text{justify-self:center;color:var(--muted)}.account-screen footer{display:grid;justify-items:center;gap:8px}.account-screen footer .account-backup{width:auto;min-height:50px;color:var(--accent)}
.account-screen form{display:grid;gap:12px}.account-screen label{margin:0;display:grid;gap:5px;font-size:15px;color:var(--muted);min-width:0}
.account-screen input{font:400 18px/1.4 Inter,sans-serif;color:var(--ink);background:var(--account-card);min-height:48px;width:100%;padding:9px 12px;border:1px solid var(--edge);border-radius:14px}
.account-screen .account-field{position:relative;display:block;margin:4px 0 0}.account-field input{height:56px;padding:10px 16px}
.account-field>span{position:absolute;top:50%;left:12px;transform:translateY(-50%);padding:0 4px;font-size:18px;pointer-events:none;background:var(--account-card)}
.account-field:focus-within>span,.account-field:has(input:not(:placeholder-shown))>span{top:0;font-size:13px;color:var(--accent)}
.account-field:focus-within input{outline:2px solid var(--accent);outline-offset:-2px}.account-password{position:relative}.account-password input{padding-right:50px}.account-password .account-eye{position:absolute;right:5px;bottom:6px;padding:8px;min-width:44px;min-height:44px}
.account-identity{gap:16px}.account-identity img{width:60px;height:60px}.account-identity p{overflow-wrap:anywhere}.account-card hr{width:100%;height:1px;background:var(--edge);border:none;margin:5px 0}
.account-method{justify-content:space-between;gap:10px}.account-links{display:flex;flex-wrap:wrap;gap:6px}.account-card .account-verified{color:var(--accent)}
.account-screen{--account-danger:#dc3e45;--account-error-ink:color-mix(in srgb,var(--account-danger) 85%,var(--ink))}
.account-card .danger,#accountNotice.error{color:var(--account-error-ink)}
#accountNotice.error{background:color-mix(in srgb,var(--account-danger) 8%,var(--account-paper))}
.library-settings button.account-tile{padding:14px;gap:14px;text-align:start}.library-settings .account-tile img{width:56px;height:56px}.account-tile strong,.account-tile small{display:block;overflow-wrap:anywhere}.account-tile strong{font-size:21px;font-weight:500}.account-tile small{font-size:16px;color:var(--muted)}
@media(max-width:799px){.account-wrap{padding:16px 18px} .account-grid,.account-screen footer{width:100%}.account-grid{grid-template-columns:1fr}.account-intro>img{width:56px;height:56px}.account-card{padding:24px}}

:where(:root[data-tone="dark"]) .account-screen {--account-danger:#ff8b82;--account-error-ink:var(--account-danger)}

.cal-choices{min-width:0;border:0;margin:0;padding:0;color:var(--ink)}
.cal-choices legend{margin-bottom:6px}
.cal-choices>div{display:flex;flex-wrap:wrap;gap:6px}
#fields .cal-choices label{position:relative;display:inline-flex;margin:0;cursor:pointer}
#fields .cal-choices label input{position:absolute;inset:0;width:100%;height:100%;min-height:0;margin:0;opacity:0;cursor:pointer}
.cal-choices label span{display:block;padding:6px 12px;min-height:34px;border:1px solid var(--edge);border-radius:9px;background:var(--surface);color:var(--ink)}
.cal-choices input:checked+span{background:var(--strong);border-color:var(--accent)}
.cal-choices input:focus-visible+span{outline:2px solid var(--accent);outline-offset:2px}
.cal-form #calPickBook,.cal-book-picker button{color:var(--accent);border:0;background:transparent;text-align:start;padding:8px 12px;min-height:44px}
.cal-form #calPickBook{justify-self:start}
.cal-book-picker{position:fixed;inset:0;margin:auto;width:min(520px,calc(100vw - 32px));max-height:calc(100dvh - 40px);overflow:auto;padding:24px;border:1px solid var(--edge);border-radius:24px;background:var(--surface);color:var(--ink)}
.cal-book-picker::backdrop{background:#0005}
.cal-book-picker h2{margin:0;font:500 24px/32px Inter,sans-serif}
.cal-book-picker p{color:var(--muted);font-size:15px;line-height:1.5}
.cal-book-picker label{display:grid;gap:6px}
.cal-book-picker input{width:100%;min-height:48px;padding:8px 12px;border:1px solid var(--edge);border-radius:12px;background:var(--surface);color:var(--ink)}
.cal-book-results{display:grid;max-height:min(350px,40dvh);overflow:auto;margin:10px 0}
.cal-book-results button{width:100%;border-radius:10px;overflow-wrap:anywhere}
.cal-book-results [aria-pressed=true]{background:var(--side);font-weight:500}
.cal-book-picker>[data-close]{display:block;margin-inline-start:auto}
.cal-row{border-radius:12px;border-bottom:1px solid var(--edge);padding:10px 0;min-height:74px}
.cal-row>.cal-dot{height:54px}
.cal-row .cal-row-next{font-size:22px;margin-inline-start:auto;color:var(--muted)}
.cal-side small{color:var(--muted)}
.account-links [data-account=logout]{width:100%;min-height:52px}
#accountPending progress{display:block;width:100%;height:4px;accent-color:var(--accent);margin-bottom:8px}
#accountPending small{display:block;margin-top:4px}
