/* Readable light theme; original visual assets and UI structure are preserved. */
:root{color-scheme:light;font-size:18px;--ink:#1e3045;--muted:#526479;--blue:#1756a5;--green:#166b52;--line:#cbd5e1;--surface:#fff;--soft:#f3f6fa}
:root[data-text-size=large]{font-size:22px}
*{box-sizing:border-box}
body,body.text-slate-100{font-family:'Segoe UI','Malgun Gothic',sans-serif;font-size:1rem;line-height:1.65;color:var(--ink);background:var(--soft);height:auto;min-height:100vh;overflow-x:hidden;overflow-y:auto;padding:20px;user-select:text}
button,input,select,textarea{font:inherit}
button,summary{touch-action:manipulation;cursor:pointer}
button{min-height:44px;line-height:1.4;white-space:normal}
button:disabled{opacity:1;color:#5c6878!important;background:#e7ecf2!important;border-color:#c3cdd9!important;cursor:not-allowed}
button:focus-visible,summary:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,[tabindex]:focus-visible{outline:3px solid #1756a5;outline-offset:3px}
input,select,textarea{min-width:0}
input:not([type=checkbox]),select,textarea,.field{font-size:1rem;line-height:1.5;min-height:46px;border:1px solid #a9b8ca;border-radius:10px;background:white;color:var(--ink);padding:9px 11px;outline-offset:2px;max-width:100%}
input[class]::placeholder,textarea[class]::placeholder{color:#607187;opacity:1}
input:disabled,select:disabled,textarea:disabled{color:#5c6878;background:#e7ecf2;opacity:1}
select,.field{width:100%}
input[type=checkbox]{accent-color:var(--green);width:26px;height:26px;flex-shrink:0;cursor:pointer;margin:2px 0}
input[type=date],input[type=time]{width:100%;min-height:46px;font-size:.9rem}
.glass-panel{background:white;border:1px solid #d5dfe9;backdrop-filter:none;box-shadow:0 4px 20px #1e304509}
.glass-card{background:#f8fafc;border:1px solid #d8e1eb;backdrop-filter:none;box-shadow:none}
body [class*="bg-slate-"]{background:#f0f4f8;color:var(--ink);border-color:#d5dfe9}
body [class*="border-slate-"]{border-color:#d5dfe9}
body [class*="text-slate-"],body .text-white{color:var(--ink)}
body .text-slate-400,body .text-slate-500{color:var(--muted)}
body [class*="text-blue-"],body [class*="text-indigo-"]{color:var(--blue)}
body [class*="text-emerald-"]{color:var(--green)}
body [class*="text-amber-"]{color:#8b5b08}
body .text-xs,body .text-sm,body [class~="text-[11px]"]{font-size:.875rem;line-height:1.6}
body .text-base,body .text-lg{font-size:1rem}
body button[class~="bg-blue-600"],.dialog-actions .primary{background:var(--blue);border:1px solid var(--blue);color:white}
body button[class~="bg-emerald-600"]{background:var(--green);border:1px solid var(--green);color:white}
body button[class~="bg-blue-600"]:hover,.dialog-actions .primary:hover{background:#104584}
body button[class~="bg-emerald-600"]:hover{background:#10563f}
body button[class*="bg-slate-"]:hover{background:#e2eaf3}
header{flex-shrink:0;padding:20px!important;gap:18px!important;margin-bottom:12px!important}
header h1{flex-wrap:wrap;font-size:1.45rem!important;letter-spacing:-.03em}
header h1>span:first-child{color:#164c86}
#syncStatusBadge{font-size:.76rem;line-height:1.65;color:#155c49;background:#edf7f1;border-color:#afcebf;padding:4px 9px;font-weight:600;max-width:100%}
#liveClock{font-size:.9rem;color:var(--muted);margin-top:5px}
header>.flex:last-child{gap:10px}
header button{padding:10px 14px!important;border-radius:10px}
.text-size-control{display:flex;align-items:center;gap:4px;flex-wrap:wrap;padding:4px;border:1px solid #c8d5e3;border-radius:12px;background:#f4f7fb}
.text-size-control>span{font-size:.85rem;color:var(--muted);padding:0 8px}
.text-size-control button{font-size:.875rem;border:1px solid transparent;color:var(--ink);background:transparent}
.text-size-control button[aria-pressed=true]{color:#fff;background:var(--blue);border-color:var(--blue);box-shadow:0 2px 4px #1756a520}
.text-size-control button[data-size=large]{font-weight:700}
.demo-notice{display:flex;flex-wrap:wrap;align-items:center;gap:10px;font-size:.82rem;color:var(--muted);padding:4px 5px 16px}
.demo-dot{height:8px;width:8px;border-radius:50%;background:var(--green);flex-shrink:0}
#workspaceNotice{flex:1;min-width:200px;overflow-wrap:anywhere}
#lastSynced{white-space:normal;font-size:.82rem!important}
.refresh-period{font-size:.78rem;color:var(--muted)}
.section-nav{display:none;position:sticky;top:0;z-index:10;gap:8px;flex-wrap:wrap;margin:0 0 16px;padding:8px 0;background:var(--soft);border-bottom:1px solid #d5dfe9}
.section-nav button{background:white;color:var(--blue);border:1px solid #b9cbdf;border-radius:10px;padding:10px 16px;font-size:.9rem;font-weight:600}
.desk-layout{display:grid;grid-template-columns:minmax(0,30fr) minmax(0,40fr) minmax(0,30fr);grid-template-areas:'daily week tasks';align-items:start;gap:18px;flex:0 0 auto;min-width:0}
.desk-layout>section{min-width:0;min-height:0;overflow:visible;padding:20px;scroll-margin-top:90px}
#dailyPanel{grid-area:daily}#weeklyPanel{grid-area:week}#tasksPanel{grid-area:tasks}
.glass-panel h2{font-size:1.22rem;line-height:1.5;letter-spacing:-.035em;color:var(--ink);overflow-wrap:anywhere}
.desk-layout>section>div:first-child>div:first-child{gap:12px;flex-wrap:wrap}
.desk-layout .uppercase{letter-spacing:.015em;text-transform:none;font-size:.82rem}
.field-label{display:flex;flex-direction:column;gap:6px;color:var(--muted);font-size:.84rem;line-height:1.5;margin-bottom:12px;min-width:0}
.field-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}
.check-label{display:flex;align-items:center;gap:10px;flex-wrap:wrap;min-height:44px;color:var(--ink);font-size:.9rem;line-height:1.65;margin:12px 0;cursor:pointer}
.check-label small{font-size:.82rem}
small,.muted{font-size:.85rem;color:var(--muted)}
#eventComposer{margin-bottom:18px;border:1px solid #b7cce4;background:#f6f9fe;border-radius:12px}
#eventComposer>summary{font-size:1rem;color:var(--blue);font-weight:700;min-height:48px;padding:12px 14px;border-radius:12px}
#eventComposer[open]>summary{border-bottom:1px solid #d5e1ef;border-radius:12px 12px 0 0}
#eventCreateForm{background:transparent!important;border:0;padding:14px;margin:0}
#eventCreateForm>.field-row,#eventCreateForm>.grid{margin:8px 0}
#eventCreateForm .field-label{margin-bottom:6px}
#newEventTitle,#newTaskInput{min-width:0;font-size:1rem;background:white}
.calendar-filter,.task-filter{margin-bottom:14px}
#dailyPanel>div:first-child{flex:0 0 auto}
#dailyEventList{flex:0 0 auto;min-height:150px;max-height:500px;overflow-y:auto;padding-right:4px}
#dailyPanel>div:last-child{flex:0 0 auto;margin-top:22px;padding-top:18px;border-color:var(--line)}
#allUpcomingList{max-height:300px;overflow-y:auto;padding-right:4px}
#tasksPanel>div:first-child{min-height:0}
#taskListContainer{max-height:600px;min-height:160px;overflow-y:auto;padding-right:4px;flex:0 0 auto}
#taskCounter{font-size:.8rem;line-height:1.6;color:var(--green);background:#eef8f2;border-color:#b9d7c8;padding:4px 10px}
#tasksPanel>div:last-child{margin-top:24px;padding-top:18px;border-color:var(--line)}
#quickMemoArea{height:130px;resize:vertical;min-height:110px;background:#fffcf1;color:var(--ink);border-color:#d6ceb3;font-size:1rem;line-height:1.8}
.icon{display:inline-flex;width:1.15em;height:1.15em;vertical-align:-.15em;flex-shrink:0}
.icon svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.item-row{display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:10px;row-gap:8px;align-items:start;padding:14px;border-radius:12px;margin-bottom:10px}
.item-main{min-width:0}
.item-title{font-size:1rem;font-weight:600;line-height:1.7;white-space:normal;overflow-wrap:anywhere;color:var(--ink)}
.item-meta{font-size:.82rem;line-height:1.6;color:var(--muted);margin-top:5px;overflow-wrap:anywhere}
.item-time{color:var(--blue);background:#eaf2fc;border:1px solid #c2d6ed;border-radius:8px;padding:6px 7px;font-family:inherit;font-size:.85rem;font-weight:700;line-height:1.6;white-space:nowrap}
.item-actions{grid-column:2;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px}
.icon-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:9px 10px;min-width:44px;min-height:44px;border:1px solid #cbd5e1;background:white;color:#415771;border-radius:8px;font-size:.82rem;line-height:1.35}
.icon-button:hover{background:#eaf2fc;color:var(--blue);border-color:#9bb8da}
.icon-button.delete{color:#a12c40}
.icon-button.delete:hover{color:#8a1b31;background:#fff0f3;border-color:#dcadba}
.task-check{display:flex;align-items:center;justify-content:center;width:44px;min-height:44px;margin:-4px -3px 0 -5px;cursor:pointer}
.completed .item-title{color:#526479;text-decoration:line-through;text-decoration-thickness:1px;font-weight:500}
.list-heading{font-size:.92rem;font-weight:700;line-height:1.6;color:var(--green);margin:18px 0 10px;overflow-wrap:anywhere}
.empty{color:var(--muted);font-size:.9rem;line-height:1.8;text-align:center;padding:24px 14px;background:#f5f8fc;border:1px dashed #b9c8da;border-radius:12px}
#weeklyGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-content:start;min-height:0;max-height:790px;overflow-y:auto;padding-right:5px;flex:0 0 auto}
#weeklyGrid>button{min-height:178px;text-align:left;display:flex;flex-direction:column;justify-content:flex-start;gap:8px;width:100%;overflow:visible}
.week-card{border:1px solid #cbd8e7;background:#f8fafd;padding:14px;border-radius:12px;transition:background .15s}
.week-card:hover{border-color:var(--blue);background:#f0f6fd}
.week-card.selected{border:2px solid var(--blue);padding:13px;background:#eaf2fd;box-shadow:0 0 0 2px #1756a511}
.week-card.today:not(.selected){border:2px solid #34856b;padding:13px;background:#f3fbf7}
.week-day{display:flex;gap:6px;flex-wrap:wrap;align-items:center;justify-content:space-between;font-size:1rem;font-weight:700;color:var(--ink);margin-bottom:4px}
.today-pill{font-size:.75rem;color:#175e48;background:#e0f2e9;padding:3px 8px;border-radius:20px;font-weight:700}
.week-event{font-size:.85rem;line-height:1.55;padding:6px 8px;background:white;color:var(--ink);border:1px solid #d3e0ed;border-radius:7px;overflow:hidden;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal}
.week-card .week-event+.week-event{margin-top:6px}
.week-time{font-weight:700;color:var(--blue);margin-right:6px}
.week-empty{font-size:.85rem;color:var(--muted)}
.sun{color:#a72c46}.sat{color:var(--blue)}
.upcoming{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 10px;width:100%;padding:12px;border:1px solid #d6e0eb;border-radius:10px;background:#f8fafc;text-align:left;font-size:.87rem;line-height:1.6;color:var(--ink)}
.upcoming:hover{background:#edf3fa;border-color:#a8bfd9}
.upcoming-date{color:var(--blue);font-family:inherit;font-weight:600;white-space:nowrap}
.upcoming-title{grid-row:2;grid-column:1/-1;white-space:normal;overflow-wrap:anywhere;font-weight:600}
.upcoming-time{grid-row:1;grid-column:2;color:var(--muted)}
.desk-dialog{position:fixed;inset:0;margin:auto;width:min(650px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;background:#fff;color:var(--ink);border:1px solid #b2c0d2;border-radius:18px;padding:24px;box-shadow:0 20px 80px #1e304533;font-size:1rem;line-height:1.8}
.desk-dialog::backdrop{background:#1e304563;backdrop-filter:blur(2px)}
.desk-dialog h2{font-size:1.35rem;font-weight:700;line-height:1.5;margin-bottom:14px;color:var(--ink)}
.desk-dialog h3,#settingsDialog h3{font-size:1.05rem;font-weight:700;margin:22px 0 12px;color:var(--blue)}
.desk-dialog p,#settingsDialog p{line-height:1.85;margin:12px 0;overflow-wrap:anywhere}
.desk-dialog hr{border-color:var(--line);margin-top:20px}
.dialog-heading{display:flex;justify-content:space-between;align-items:start;gap:12px}
.dialog-heading>button{font-size:1.45rem;color:var(--muted);min-width:44px;min-height:44px;background:#f1f5fa;border-radius:10px}
.dialog-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px;margin-top:20px}
.dialog-actions button,.desk-dialog details>button,.desk-dialog>button,#googleSettings>button{min-height:46px;padding:10px 16px;border:1px solid #aebed1;border-radius:10px;font-size:.95rem;background:#f1f5fa;color:var(--ink)}
.dialog-actions .danger,.desk-dialog .danger{background:#aa2740;border-color:#aa2740;color:white}
.settings-callout{padding:16px;border:1px solid #b1cae8;background:#edf5ff;border-radius:12px;color:#154e93;font-size:1rem}
.inline-error{color:#a71d38;font-size:.92rem;line-height:1.7}
#settingsDialog{width:min(850px,calc(100vw - 32px));max-height:calc(100dvh - 32px)}
#settingsDialog h4{font-weight:700;margin:10px 0;font-size:1rem}
#settingsDialog .dialog-actions{justify-content:flex-start}
#settingsDialog details{margin:16px 0;padding:14px 16px;background:#f2f6fb;border:1px solid #d6e0eb;border-radius:12px}
#settingsDialog summary{color:#304d6c;font-weight:600;line-height:1.7;min-height:44px;display:list-item;padding:8px 0}
#settingsDialog .check-label{align-items:flex-start;flex-wrap:nowrap;overflow-wrap:anywhere}
[hidden],#settingsDialog [hidden]{display:none!important}
#writableCalendars,#writableTasklists{max-height:260px;overflow-y:auto;font-size:1rem}
#editIdentity,#recurrenceHint{font-size:.9rem;overflow-wrap:anywhere}
#editEventFields>small{font-size:.85rem}
#toastBanner{background:#e8f3ff;border:1px solid #a7c3e4;color:#164d89;font-size:.95rem;line-height:1.8;user-select:text;gap:14px}
#toastBanner.error{background:#fff0f2;border-color:#d59aa7;color:#9d2039}
#toastBanner button{min-width:44px;min-height:44px;color:inherit;flex-shrink:0}
#toastMessage{min-width:0;overflow-wrap:anywhere}
::-webkit-scrollbar{width:14px;height:14px}::-webkit-scrollbar-track{background:#eaf0f6;border-radius:9px}::-webkit-scrollbar-thumb{background:#93a5b9;border:3px solid #eaf0f6;border-radius:9px}
@media(max-width:1200px){.desk-layout{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-areas:'daily tasks' 'week week'}.section-nav{display:flex}#weeklyGrid{grid-template-columns:repeat(3,minmax(0,1fr));max-height:none;overflow:visible}body{padding:16px}.refresh-period{display:none}}
@media(min-width:821px) and (max-width:1500px){:root[data-text-size=large] .desk-layout{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-areas:'daily tasks' 'week week'}:root[data-text-size=large] .section-nav{display:flex}:root[data-text-size=large] #weeklyGrid{grid-template-columns:repeat(3,minmax(0,1fr));max-height:none;overflow:visible}}
@media(max-width:820px){body{padding:12px}.desk-layout{grid-template-columns:minmax(0,1fr);grid-template-areas:'daily' 'tasks' 'week';gap:16px}.desk-layout>section{padding:18px}header{padding:16px!important}header>.flex:last-child{width:100%}.section-nav{display:flex}#weeklyGrid{grid-template-columns:repeat(2,minmax(0,1fr));max-height:none;overflow:visible}#dailyEventList{max-height:430px}#taskListContainer{max-height:520px}.field-row{gap:12px}}
@media(max-width:520px){#weeklyGrid{grid-template-columns:minmax(0,1fr)}.field-row,#eventCreateForm>.grid{grid-template-columns:minmax(0,1fr)}.desk-dialog{padding:18px}header{gap:12px!important}.text-size-control{width:100%}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
