:root{
  --bg:#fff8ea;--surface:rgba(255,253,248,.94);--surface-strong:#fffdf9;--text:#29261f;--muted:#766f63;
  --line:rgba(77,65,43,.11);--orange:#f49a36;--orange-deep:#d97d1c;--orange-soft:#fff0d9;
  --green:#91af45;--pink:#e78a9a;--shadow:0 20px 60px rgba(94,68,28,.11);--radius:24px;
  --font:"Noto Sans TC","Microsoft JhengHei",system-ui,sans-serif;
}
*{box-sizing:border-box}
html{min-height:100%;scroll-behavior:smooth}
body{margin:0;min-height:100vh;font-family:var(--font);color:var(--text);background-color:rgba(255,248,234,.96);background-image:url("./assets/carrot-bg.webp");background-size:460px auto;background-repeat:repeat}
button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:wait;opacity:.58}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid rgba(244,154,54,.3);outline-offset:2px}
.hidden{display:none!important}.muted{color:var(--muted)}.grow{flex:1}.full{width:100%}
.app-shell{display:grid;grid-template-columns:clamp(210px,15vw,250px) minmax(0,1fr);grid-template-rows:68px minmax(0,1fr);grid-template-areas:"header header" "sidebar main";width:100%;height:100dvh;min-height:100dvh;overflow:hidden;background:rgba(255,250,240,.28);transition:grid-template-columns .28s cubic-bezier(.2,.8,.25,1)}
.app-shell.sidebar-collapsed{grid-template-columns:64px minmax(0,1fr)}
.app-header{grid-area:header;position:relative;z-index:50;height:68px;display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:14px;padding:8px 12px;border-bottom:1px solid var(--line);background:rgba(255,253,248,.96);backdrop-filter:blur(24px) saturate(1.08)}
.header-left{display:flex;align-items:center;gap:10px;min-width:0}
.sidebar-toggle-btn{width:36px;height:36px;flex:none;display:grid;place-items:center;border:0;border-radius:10px;background:transparent;color:var(--muted);padding:0;transition:background .18s,color .18s,transform .18s}
.sidebar-toggle-btn:hover{background:var(--orange-soft);color:var(--text)}
.sidebar-toggle-btn:active{transform:scale(.94)}
.sidebar-toggle-btn .material-symbols-rounded{font-size:23px}
.brand{display:flex;gap:8px;align-items:center;min-width:160px;margin:0;flex:none}.brand img{width:42px;height:42px;flex:none;object-fit:contain}.brand-copy{min-width:0;white-space:nowrap;overflow:hidden}.brand strong{display:block;font-size:18px;letter-spacing:-.02em}.brand span{display:block;margin-top:1px;color:var(--muted);font-size:10.5px}
.sidebar,.detail-panel{background:rgba(255,253,248,.94);backdrop-filter:blur(24px) saturate(1.08)}
.sidebar{grid-area:sidebar;position:relative;z-index:20;height:100%;min-height:0;border-right:1px solid var(--line);overflow:hidden;display:flex;flex-direction:column;padding:0}
.sidebar-content{position:absolute;inset:0;min-height:0;overflow-y:auto;overflow-x:hidden;padding:0 16px 20px;opacity:1;transform:translateX(0);visibility:visible;pointer-events:auto;will-change:opacity,transform;transition:opacity .16s ease .05s,transform .26s cubic-bezier(.2,.8,.25,1) .03s,visibility 0s linear 0s}
.collapsed-member-rail{display:flex;position:absolute;inset:0;min-height:0;overflow-y:auto;overflow-x:hidden;padding:14px 7px;align-items:center;flex-direction:column;gap:10px;opacity:0;visibility:hidden;pointer-events:none;transform:translateX(-6px);will-change:opacity,transform;transition:opacity .14s ease,transform .24s cubic-bezier(.2,.8,.25,1),visibility 0s linear .24s}
.member-rail-button{width:44px;height:44px;flex:none;padding:0;border:2px solid transparent;border-radius:13px;background:transparent;display:grid;place-items:center;overflow:hidden;transition:transform .16s,border-color .16s,opacity .16s,background .16s}
.member-rail-button:hover{transform:translateY(-1px);background:var(--orange-soft)}
.member-rail-button.active{border-color:var(--orange)}
.member-rail-button.filtered{opacity:.38}
.member-rail-button img{width:100%;height:100%;object-fit:cover}
.member-rail-fallback{width:100%;height:100%;display:grid;place-items:center;background:var(--orange-soft);color:var(--orange-deep);font-size:14px;font-weight:850}
.app-shell.sidebar-collapsed .sidebar-content{opacity:0;transform:translateX(-10px);visibility:hidden;pointer-events:none;transition-delay:0s,0s,.18s}
.app-shell.sidebar-collapsed .collapsed-member-rail{opacity:1;transform:translateX(0);visibility:visible;pointer-events:auto;transition-delay:.05s,.02s,0s}
.detail-panel{overflow:auto;position:fixed;right:8px;top:76px;width:min(340px,calc(100vw - 16px));height:calc(100dvh - 84px);padding:24px 20px;border:1px solid var(--line);border-radius:20px;box-shadow:0 24px 70px rgba(51,42,29,.22);z-index:70;transform:translateX(calc(100% + 24px));visibility:hidden;transition:transform .28s cubic-bezier(.2,.8,.25,1),visibility .28s}.detail-panel.open{transform:none;visibility:visible}
.circle-card{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:14px;background:var(--surface-strong);border:1px solid var(--line);border-radius:18px;margin-bottom:18px;box-shadow:0 8px 24px rgba(86,66,31,.05)}
.eyebrow{font-size:11px;font-weight:800;color:var(--orange-deep);letter-spacing:.06em}.circle-card strong{display:block;max-width:118px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nav-stack{display:grid;gap:5px}.nav-item{border:0;background:transparent;border-radius:13px;padding:11px 12px;display:flex;gap:10px;align-items:center;color:var(--muted);font-weight:750;text-align:left;transition:background .2s ease,color .2s ease,transform .2s ease}.nav-item:hover{background:rgba(244,154,54,.08);color:var(--text);transform:translateX(2px)}.nav-item.active{background:var(--orange-soft);color:var(--text);box-shadow:inset 3px 0 0 var(--orange)}.nav-icon{font-size:18px;width:21px;text-align:center}
.sidebar-section{margin-top:23px}.section-head{display:flex;justify-content:space-between;align-items:center;font-size:13px;font-weight:850;margin-bottom:10px}.text-btn{border:0;background:transparent;color:var(--orange-deep);padding:4px 6px;font-weight:800;border-radius:7px}.text-btn:hover{background:var(--orange-soft)}
.member-list{display:grid;gap:4px}.member{display:flex;align-items:center;gap:8px;width:100%;padding:6px;border:0;background:transparent;border-radius:10px;font-size:13px;text-align:left;color:var(--text);cursor:pointer;transition:background .18s,opacity .18s}.member:hover{background:rgba(244,154,54,.07)}.member.filtered{opacity:.4}.avatar{width:28px;height:28px;border-radius:9px;background:var(--orange-soft);display:grid;place-items:center;font-size:12px;font-weight:850;color:var(--orange-deep);overflow:hidden}.avatar img{width:100%;height:100%;object-fit:cover}
.workspace{min-width:0;padding:17px 18px 24px}.topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:4px 1px 15px}.month-controls,.top-actions{display:flex;align-items:center;gap:8px}.month-controls h1{margin:0 0 0 5px;font-size:23px;letter-spacing:-.03em;white-space:nowrap;font-variant-numeric:tabular-nums}
.icon-btn,.round-add{border:1px solid var(--line);background:rgba(255,255,255,.82);border-radius:50%;width:37px;height:37px;display:grid;place-items:center;color:var(--text);box-shadow:0 5px 16px rgba(79,60,30,.06);font-size:24px;transition:transform .2s,background .2s}.icon-btn:hover,.round-add:hover{transform:translateY(-1px);background:#fff}.icon-btn:active,.round-add:active{transform:scale(.95)}
.soft-btn,.ghost-btn,.primary-btn,.danger-btn{border-radius:11px;padding:9px 13px;font-weight:800;border:1px solid transparent;transition:transform .18s,background .18s,box-shadow .18s}.soft-btn{background:var(--orange-soft);color:#9d5b16}.ghost-btn{background:rgba(255,255,255,.7);border-color:var(--line);color:var(--muted)}.primary-btn{background:var(--orange);color:#fff;box-shadow:0 7px 18px rgba(244,154,54,.2)}.danger-btn{background:#fff1ed;color:#b84939;border-color:#f0c8c0}.soft-btn:hover,.ghost-btn:hover,.primary-btn:hover,.danger-btn:hover{transform:translateY(-1px)}.primary-btn:hover{background:#ed8d27;box-shadow:0 9px 22px rgba(244,154,54,.25)}.soft-btn:active,.ghost-btn:active,.primary-btn:active,.danger-btn:active{transform:scale(.97)}
.search-box{height:38px;min-width:188px;border-radius:11px;background:rgba(255,255,255,.82);border:1px solid var(--line);display:flex;align-items:center;gap:7px;padding:0 11px;transition:border .2s,box-shadow .2s}.search-box:focus-within{border-color:rgba(244,154,54,.6);box-shadow:0 0 0 3px rgba(244,154,54,.1)}.search-box input{border:0;outline:0;background:transparent;min-width:0;width:138px;color:var(--text)}
.calendar-stage{position:relative;background:var(--surface);border:1px solid rgba(96,72,37,.08);border-radius:22px;box-shadow:var(--shadow);overflow:hidden;min-height:calc(100vh - 82px)}
.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));grid-template-rows:auto repeat(6,minmax(100px,1fr));min-height:calc(100vh - 82px);animation:month-in .28s cubic-bezier(.2,.75,.25,1)}
@keyframes month-in{from{opacity:.35;transform:translateY(5px)}to{opacity:1;transform:none}}
.weekday{padding:12px 9px;background:rgba(255,249,239,.86);border-bottom:1px solid var(--line);font-size:11px;color:var(--muted);font-weight:850}.weekday:first-child{color:#d96b5f}.weekday:last-child{color:#5e8daf}
.day-cell{position:relative;min-height:101px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);padding:6px;transition:background .16s,transform .16s}.day-cell:nth-child(7n){border-right:0}.day-cell:hover{background:rgba(244,154,54,.045)}.day-cell.other-month{background:rgba(255,255,255,.22);opacity:.42}.day-cell.selected{background:rgba(244,154,54,.075);box-shadow:inset 0 0 0 1px rgba(244,154,54,.16)}.day-cell.today .day-number{background:var(--orange);color:#fff;box-shadow:0 4px 10px rgba(244,154,54,.24)}.day-cell.drop-hover{background:rgba(244,154,54,.18);transform:scale(.985)}
.day-top{display:flex;align-items:center;justify-content:space-between;gap:5px;margin-bottom:4px}.day-number{width:25px;height:25px;border-radius:50%;display:grid;place-items:center;font-size:12px;font-weight:850;font-variant-numeric:tabular-nums}.day-meta{min-width:0;display:inline-flex;align-items:center;justify-content:flex-end;gap:4px;white-space:nowrap;overflow:hidden}.lunar{font-size:9px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.holiday{font-size:9px;color:var(--orange-deep);font-weight:850;white-space:nowrap}.birthday-chip{font-weight:850}
.event-chip{display:flex;align-items:center;justify-content:center;text-align:center;gap:4px;border-radius:5px;padding:3px 5px;margin:2px 0;font-size:10px;font-weight:750;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:grab;user-select:none;touch-action:none;transition:filter .16s,transform .16s,box-shadow .16s}.event-chip:hover{filter:saturate(1.08);transform:translateY(-1px);box-shadow:0 3px 8px rgba(62,47,25,.1)}.event-chip:active{cursor:grabbing;transform:scale(.98)}.event-chip .time{font-size:8px;opacity:.8}.more-events{font-size:9px;color:var(--muted);padding:2px 4px}
.detail-head{display:flex;justify-content:space-between;gap:10px;align-items:start}.detail-head h2{font-size:20px;margin:3px 0 17px;letter-spacing:-.02em}.panel-head-actions{display:flex;gap:7px;align-items:center}.panel-toggle{display:inline-flex}.panel-close{display:grid}.round-add{background:var(--orange);color:#fff;border:0;font-size:22px}.day-events,.activity-list{display:grid;gap:9px}.empty-state{border:1px dashed rgba(82,68,44,.17);background:rgba(255,255,255,.52);padding:17px;border-radius:15px;color:var(--muted);font-size:12px;text-align:center;line-height:1.7}.agenda-card{width:100%;border-radius:14px;background:rgba(255,255,255,.76);padding:11px;cursor:pointer;border:1px solid transparent;text-align:left;color:var(--text);transition:transform .18s,box-shadow .18s,border .18s}.agenda-card:hover{transform:translateY(-2px);border-color:var(--line);box-shadow:0 8px 20px rgba(91,66,29,.08)}.agenda-accent{height:4px;border-radius:4px;margin-bottom:7px}.agenda-card strong{display:block;font-size:13px}.agenda-card span{display:block;color:var(--muted);font-size:11px;margin-top:4px}.panel-divider{height:1px;background:var(--line);margin:21px 0}.activity-item{display:flex;gap:9px;align-items:flex-start;font-size:12px;line-height:1.45}.activity-dot{width:7px;height:7px;border-radius:50%;background:var(--orange);margin-top:5px;flex:none}.activity-item time{display:block;color:var(--muted);font-size:10px;margin-top:2px}
.modal-backdrop{position:fixed;inset:0;background:rgba(48,43,34,.34);backdrop-filter:blur(7px);display:grid;place-items:center;z-index:500;padding:22px;animation:backdrop-in .2s ease}.modal-card{position:relative;width:min(600px,100%);max-height:92vh;overflow:auto;background:#fffdf8;border-radius:24px;padding:24px;box-shadow:0 30px 90px rgba(51,42,29,.23);border:1px solid rgba(255,255,255,.9);animation:modal-in .26s cubic-bezier(.2,.8,.25,1)}
@keyframes backdrop-in{from{opacity:0}to{opacity:1}}@keyframes modal-in{from{opacity:0;transform:translateY(12px) scale(.98)}to{opacity:1;transform:none}}
.connect-card{width:min(420px,100%);text-align:center}.modal-logo{width:76px;height:76px;object-fit:contain}.modal-card h2{margin:5px 0 8px;letter-spacing:-.02em}.modal-card h3{font-size:15px;margin:0 0 10px}.modal-card p{color:var(--muted);line-height:1.65}.modal-close{position:absolute;right:14px;top:14px;width:34px;height:34px;border:0;border-radius:50%;background:rgba(77,65,44,.06);font-size:21px;color:var(--muted);transition:transform .18s,background .18s}.modal-close:hover{background:var(--orange-soft);transform:rotate(4deg)}
.modal-card label{display:grid;text-align:left;gap:6px;font-weight:750;font-size:12px;color:var(--muted);margin:10px 0}.modal-card input,.modal-card select,.modal-card textarea,.comment-compose textarea{width:100%;border:1px solid rgba(83,68,44,.15);background:#fff;border-radius:11px;padding:10px;color:var(--text);outline:none;resize:vertical}.modal-card input:focus,.modal-card select:focus,.modal-card textarea:focus,.comment-compose textarea:focus{border-color:rgba(244,154,54,.72);box-shadow:0 0 0 3px rgba(244,154,54,.11)}
.or{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:11px;margin:14px 0}.or:before,.or:after{content:"";height:1px;background:var(--line);flex:1}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:2px 13px}.span-2{grid-column:1/-1}.toggle-row{display:flex!important;align-items:center;justify-content:space-between;background:rgba(255,255,255,.62);border:1px solid var(--line);border-radius:11px;padding:8px 10px!important;margin-top:22px!important}.toggle-row input{width:auto}.field-label{font-size:12px;font-weight:750;color:var(--muted);margin:9px 0 8px}.color-picker{display:flex;gap:9px;flex-wrap:wrap}.color-dot{width:29px;height:29px;border-radius:50%;border:3px solid transparent;box-shadow:0 0 0 1px rgba(0,0,0,.05);cursor:pointer;transition:transform .16s}.color-dot:hover{transform:scale(1.08)}.color-dot.selected{border-color:#342f27;transform:scale(1.12)}.event-options-toggle{display:flex;align-items:center;justify-content:space-between;width:100%;margin-top:8px;padding:11px 12px;border:1px solid var(--line);border-radius:11px;background:#fff;color:var(--text);font-size:12px;font-weight:800;text-align:left}.options-chevron{font-size:17px;transition:transform .22s}.event-options-toggle[aria-expanded="true"] .options-chevron{transform:rotate(180deg)}.event-options{padding-top:5px;animation:options-in .24s cubic-bezier(.2,.75,.25,1)}@keyframes options-in{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:none}}.custom-reminder{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:4px 12px;background:var(--orange-soft);border-radius:13px}.attendee-picker{display:flex;gap:7px;flex-wrap:wrap}.attendee-option{border:1px solid var(--line);background:#fff;border-radius:10px;padding:7px 10px;color:var(--muted);font-size:12px;font-weight:750}.attendee-option.selected{color:#8e5111;background:var(--orange-soft);border-color:rgba(244,154,54,.34)}.image-actions{display:flex;align-items:center;gap:8px}.file-btn{display:inline-flex!important;margin:0!important;cursor:pointer}.file-btn input{display:none}.event-image-preview{display:block;width:100%;height:150px;object-fit:cover;border-radius:14px;margin-top:10px}.modal-title-row,.editor-footer{display:flex;align-items:center;gap:8px}.editor-footer{margin-top:17px}.status-text{min-height:18px;font-size:12px;color:#b15332;margin-top:8px}
.event-detail{width:min(540px,100%)}.detail-title-row{display:flex;align-items:center;gap:10px;padding-right:34px}.detail-title-row h2{margin:0}.detail-color{width:11px;height:11px;border-radius:50%;flex:none}.detail-time{margin-top:8px;color:var(--orange-deep);font-size:13px;font-weight:800}.detail-meta,.detail-secondary{color:var(--muted);font-size:12px;margin-top:8px}.detail-notes{white-space:pre-wrap;margin:12px 0}.detail-image{width:100%;height:220px;object-fit:cover;border-radius:16px;margin-top:12px}.detail-actions{display:flex;gap:8px;margin-top:17px}.detail-actions button{flex:1}.comment-list{display:grid;gap:8px}.comment-empty{font-size:12px;color:var(--muted);padding:8px 0}.comment-item{background:#f8f3e9;border-radius:12px;padding:10px}.comment-item strong{font-size:12px}.comment-item p{margin:4px 0;color:var(--text);font-size:13px}.comment-item time{color:var(--muted);font-size:10px}.comment-compose{display:flex;gap:8px;align-items:end;margin-top:10px}.comment-compose textarea{min-height:45px}.comment-compose button{flex:none}
.drop-menu{position:fixed;z-index:800;width:196px;overflow:visible;background:rgba(255,253,248,.98);border:1px solid rgba(244,154,54,.22);border-radius:16px;box-shadow:0 18px 46px rgba(72,49,23,.22);padding:0;transform-origin:50% 0;animation:drop-menu-in .16s cubic-bezier(.2,.8,.25,1)}.drop-menu:before{content:"";position:absolute;left:50%;top:-7px;width:14px;height:14px;background:rgba(255,253,248,.98);border-left:1px solid rgba(244,154,54,.22);border-top:1px solid rgba(244,154,54,.22);transform:translateX(-50%) rotate(45deg);border-radius:3px 0 0 0}.drop-menu-item{position:relative;z-index:1;display:flex;align-items:center;width:100%;height:51px;padding:0 20px;border:0;background:transparent;color:var(--text);font-size:15px;font-weight:800;letter-spacing:.01em;text-align:left;cursor:pointer}.drop-menu-item:first-child{border-radius:16px 16px 0 0;border-bottom:1px solid rgba(86,65,35,.10)}.drop-menu-item:last-child{border-radius:0 0 16px 16px}.drop-menu-item:hover,.drop-menu-item:focus-visible{background:var(--orange-soft);color:var(--orange-deep);outline:none}.drop-menu-item:active{background:rgba(244,154,54,.20)}@keyframes drop-menu-in{from{opacity:0;transform:translateY(-4px) scale(.98)}to{opacity:1;transform:none}}.drag-ghost{position:fixed;z-index:700;pointer-events:none;min-width:96px;max-width:180px;height:24px;display:flex;align-items:center;padding:0 7px;border-radius:5px;color:#fff;font-size:10px;font-weight:800;box-shadow:0 7px 20px rgba(40,30,18,.18);transform:translate(-50%,-50%);opacity:.98;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.calendar-dragging,.calendar-dragging *{cursor:grabbing!important}.calendar-dragging .event-chip{transition:none}.toast{position:fixed;left:50%;bottom:27px;transform:translateX(-50%);z-index:1000;background:#302c26;color:#fff;border-radius:999px;padding:10px 16px;font-size:12px;box-shadow:0 10px 30px rgba(0,0,0,.17);animation:toast-in .22s ease}@keyframes toast-in{from{opacity:0;transform:translate(-50%,8px)}to{opacity:1;transform:translate(-50%,0)}}

/* TimeTree-style calendar frame, using the 熊肥家族 palette. */
.material-symbols-rounded{font-family:"Material Symbols Rounded";font-weight:normal;font-style:normal;font-size:20px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;font-feature-settings:"liga";-webkit-font-feature-settings:"liga";-webkit-font-smoothing:antialiased}
.workspace{padding:0;background:rgba(255,253,248,.9)}
.topbar{position:relative;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;min-height:56px;padding:8px 12px;border-bottom:1px solid var(--line);background:rgba(255,253,248,.97);z-index:45}
.month-controls{justify-self:start}.top-actions{justify-self:end}.month-controls h1{font-size:15px;margin-left:3px}.period-arrows{display:flex;border:1px solid var(--line);border-radius:9px;overflow:hidden;background:#fff}.period-arrows .icon-btn{border:0;border-radius:0;box-shadow:none}.period-arrows .icon-btn+ .icon-btn{border-left:1px solid var(--line)}
.icon-btn,.round-add{width:32px;height:32px;border-radius:9px;box-shadow:none;font-size:18px}.icon-btn:hover,.round-add:hover{transform:none;background:var(--orange-soft)}
.todayBtn,.soft-btn{font-size:12px}.month-controls .soft-btn{padding:7px 12px;border:1px solid var(--line);background:#fff;color:var(--text)}
.view-switch{display:flex;width:116px;height:32px;padding:3px;border:1px solid var(--line);border-radius:9px;background:#f6f1e8}.view-switch button{flex:1;border:0;border-radius:6px;background:transparent;color:var(--muted);font-size:12px;font-weight:850}.view-switch button.active{background:var(--orange);color:#fff;box-shadow:0 2px 6px rgba(217,125,28,.18)}
.top-icon{width:32px;height:32px;background:#fff}.add-event{color:var(--orange-deep);border-color:rgba(244,154,54,.28)}
.compact-search{min-width:0;width:0;padding:0;border-color:transparent;opacity:0;overflow:hidden;pointer-events:none;background:#fff}.compact-search.open{width:190px;padding:0 9px;border-color:var(--line);opacity:1;pointer-events:auto}.compact-search input{width:145px;font-size:12px}
.calendar-stage{min-height:calc(100dvh - 56px);border:0;border-radius:0;box-shadow:none}
.calendar-grid{min-height:calc(100dvh - 56px);grid-template-rows:42px repeat(6,minmax(82px,1fr));animation:none}
.calendar-grid.week-mode{grid-template-rows:42px minmax(calc(100dvh - 98px),1fr)}
.calendar-grid.week-mode .day-cell{min-height:calc(100dvh - 98px)}
.weekday{display:grid;place-items:center;padding:0;background:#fffaf1;font-size:12px}
.day-cell{min-height:82px;padding:7px 5px;background:rgba(255,253,248,.76);transform:none}.day-cell:hover{background:#fff8eb}.day-cell.selected{background:#fff4df;box-shadow:inset 0 0 0 2px rgba(244,154,54,.66)}
.day-cell.drop-hover{transform:none}.day-top{justify-content:center;position:relative;min-height:27px}.day-top .lunar{position:absolute;right:2px}.event-chip{border-radius:4px;margin:2px 0;padding:3px 5px}.holiday-event-chip{display:block;width:100%;margin:2px 0;padding:3px 5px;border-radius:4px;background:#d95b55;color:#fff;font-size:10px;font-weight:850;line-height:1.25;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-shadow:inset 0 0 0 1px rgba(255,255,255,.08)}

.event-side-panel{position:fixed;top:0;right:0;width:min(396px,100vw);height:100dvh;z-index:510;background:#fffdf8;border-left:1px solid var(--line);box-shadow:-18px 0 48px rgba(71,54,29,.14);overflow:auto;animation:event-panel-in .24s cubic-bezier(.2,.78,.25,1)}
@keyframes event-panel-in{from{transform:translateX(100%)}to{transform:none}}
.event-editor{min-height:100%;padding:0 16px 24px}.event-panel-head{position:sticky;top:0;z-index:2;display:grid;grid-template-columns:34px 1fr auto;gap:10px;align-items:center;margin:0 -16px;padding:10px 14px;border-bottom:1px solid var(--line);background:rgba(255,253,248,.97);backdrop-filter:blur(18px)}.event-panel-head h2{margin:1px 0 0;font-size:15px}.editor-close{border:0;background:transparent}.editor-save{padding:7px 14px;font-size:12px;border-radius:999px;box-shadow:none}
.event-kind{display:flex;justify-content:center;padding:12px 0 6px}.event-kind span{display:block;width:118px;padding:6px;text-align:center;border-radius:999px;background:var(--orange-soft);color:var(--orange-deep);font-size:12px;font-weight:850}
.event-editor>.form-grid,.event-options .form-grid{grid-template-columns:1fr 1fr;gap:2px 10px}.event-editor label{display:grid;text-align:left;gap:6px;font-weight:750;font-size:11px;color:var(--muted);margin:8px 0}.event-editor input,.event-editor select,.event-editor textarea{width:100%;border:1px solid rgba(83,68,44,.14);background:#f8f5ee;border-radius:8px;padding:9px;color:var(--text);outline:none;resize:vertical}
#eventNotesInput{resize:none}.event-editor input:focus,.event-editor select:focus,.event-editor textarea:focus{border-color:rgba(244,154,54,.72);box-shadow:0 0 0 3px rgba(244,154,54,.11)}.event-title-field{font-size:12px!important;margin-top:13px!important}.event-title-field input{font-size:17px;font-weight:750;padding:13px 10px;background:#fff}.event-options{padding-top:3px}.event-options .form-grid{width:100%}.event-editor .toggle-row{margin-top:8px!important}.event-editor .field-label{font-size:11px}.event-editor .color-dot{width:25px;height:25px}.event-editor .editor-footer{margin-top:12px}.event-editor .event-image-preview{height:130px}
@media(max-width:1360px){.app-shell{grid-template-columns:210px minmax(0,1fr)}.app-shell.sidebar-collapsed{grid-template-columns:88px minmax(0,1fr)}.topbar{flex-wrap:wrap}.calendar-grid{grid-template-rows:auto repeat(6,minmax(90px,1fr))}}
@media(max-width:820px){body{background-size:auto,360px auto}.app-shell{display:block}.sidebar{display:none}.workspace{padding:8px}.topbar{position:sticky;top:0;z-index:40;background:rgba(255,248,234,.94);padding:9px 2px 10px;backdrop-filter:blur(14px)}.top-actions{width:100%;flex-wrap:wrap}.search-box{flex:1 1 100%;min-width:0}.calendar-stage,.calendar-grid{min-height:calc(100dvh - 137px)}.calendar-stage{border-radius:18px}.calendar-grid{grid-template-rows:auto repeat(6,minmax(76px,1fr))}.day-cell{min-height:76px;padding:3px}.lunar{display:none}.event-chip{font-size:8px;padding:2px 3px}.holiday-event-chip{font-size:8px;padding:2px 3px}.event-chip .time{display:none}.month-controls h1{font-size:19px}.primary-btn{padding-inline:11px}.panel-toggle{white-space:nowrap}.modal-backdrop{padding:10px}.modal-card{border-radius:20px;padding:18px}.form-grid{grid-template-columns:1fr}.span-2{grid-column:auto}.toggle-row{margin-top:4px!important}.custom-reminder{grid-template-columns:1fr}.detail-image{height:175px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}
@media(max-width:820px){
  .workspace{padding:0}.topbar{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"month actions" "switch switch";gap:7px;padding:7px 8px}.month-controls{grid-area:month;min-width:0}.top-actions{grid-area:actions;width:auto;flex-wrap:nowrap}.view-switch{grid-area:switch;justify-self:center}.month-controls h1{font-size:14px;overflow:hidden;text-overflow:ellipsis}.month-controls .soft-btn{padding:6px 9px}.panel-toggle{display:none}.compact-search{position:absolute;right:8px;top:49px;z-index:6}.compact-search.open{width:min(230px,calc(100vw - 16px))}.calendar-stage,.calendar-grid{min-height:calc(100dvh - 97px)}.calendar-grid{grid-template-rows:34px repeat(6,minmax(75px,1fr))}.calendar-grid.week-mode{grid-template-rows:34px minmax(calc(100dvh - 131px),1fr)}.calendar-grid.week-mode .day-cell{min-height:calc(100dvh - 131px)}.event-side-panel{width:100vw}.event-editor{padding-inline:12px}.event-panel-head{margin-inline:-12px}.event-editor>.form-grid,.event-options .form-grid{grid-template-columns:1fr 1fr}.event-chip{font-size:8px}.day-top .lunar{display:none}
}
@media(max-width:430px){.month-controls h1{font-size:12px}.event-editor>.form-grid,.event-options .form-grid{grid-template-columns:1fr}.event-editor .span-2{grid-column:auto}}

/* Sidebar content order and standalone activity feed. */
.account-section,.members-section,.activity-sidebar-section{opacity:1;transform:translateX(0);will-change:opacity,transform;transition:opacity .16s ease,transform .24s cubic-bezier(.2,.8,.25,1)}.account-section{transition-delay:.04s}.members-section{margin-top:0;transition-delay:.08s}.activity-sidebar-section{margin-top:28px;transition-delay:.13s;contain:layout paint style}.app-shell.sidebar-collapsed .account-section,.app-shell.sidebar-collapsed .members-section,.app-shell.sidebar-collapsed .activity-sidebar-section{opacity:0;transform:translateX(-8px);transition-delay:0s}.sidebar-refresh{width:27px;height:27px;border:0;background:transparent;color:var(--muted)}.sidebar-refresh .material-symbols-rounded{font-size:17px}.sidebar-activity-list{gap:2px}.sidebar-activity-list .activity-item{padding:8px 5px;border-bottom:1px solid var(--line)}.sidebar-activity-list .activity-item:last-child{border-bottom:0}.sidebar-activity-list .empty-state{padding:14px 8px}.activity-more{width:100%;margin-top:10px;padding:9px;border:1px solid rgba(244,154,54,.24);border-radius:10px;background:var(--orange-soft);color:var(--orange-deep);font-size:12px;font-weight:850}.activity-more:hover{background:#ffe6c0}.activity-modal{width:min(520px,100%)}.activity-modal h2{padding-right:38px;margin-bottom:18px}.full-activity-list{max-height:68vh;overflow:auto}.full-activity-list .activity-item{padding:11px 4px;border-bottom:1px solid var(--line)}

/* TimeTree-inspired grouped event form, with only the selected day. */
.event-form-stack{display:grid;gap:14px;padding:2px 0 8px}.event-editor .event-title-field{display:grid!important;gap:7px;margin:8px 0 2px!important}.event-editor .event-title-field input{background:#fff;border:1px solid rgba(83,68,44,.14);font-size:17px;padding:13px 11px}
.editor-card{overflow:hidden;border:1px solid rgba(83,68,44,.09);border-radius:14px;background:#f6f3ec;box-shadow:0 3px 12px rgba(79,60,30,.035)}.event-editor .editor-row{display:flex!important;align-items:center;justify-content:space-between;gap:12px;min-height:52px;margin:0!important;padding:9px 11px!important;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;color:var(--text);font-size:12px}.event-editor .editor-row:last-child{border-bottom:0}.event-editor .editor-row>span{flex:none;font-size:12px;font-weight:850}.event-editor .editor-row input,.event-editor .editor-row select{width:min(196px,68%);min-height:34px;margin:0;border:0;background:#fff;border-radius:7px;text-align:right}.event-editor .toggle-row input{width:18px;height:18px;min-height:18px;accent-color:var(--orange)}
.event-editor .editor-block{padding:11px;border-bottom:1px solid var(--line)}.event-editor .editor-block:last-child{border-bottom:0}.event-editor .editor-block .field-label{margin:0 0 10px;color:var(--text);font-size:12px;font-weight:850}.event-editor .event-options{padding:0}.event-editor .custom-reminder{margin:8px;background:#fff3df}.event-editor .custom-reminder label{display:grid!important;margin:5px 0!important}.event-editor .color-picker{gap:8px}.event-editor .color-dot{width:24px;height:24px}.event-editor .attendee-picker{min-height:28px}.event-editor .editor-text-card{display:flex!important;flex-direction:column;align-items:stretch;gap:8px;margin:0!important;padding:12px;color:var(--text);font-size:12px;font-weight:850}.event-editor .editor-text-card input,.event-editor .editor-text-card textarea{border:0;background:#fff}.event-editor .upload-card{padding:12px}.event-editor .upload-card>.field-label{margin:0 0 9px;color:var(--text);font-size:12px;font-weight:850}.event-editor .upload-card .file-btn{padding:8px 12px;background:#fff;border-color:var(--line)}
@media(max-width:820px){.activity-modal{width:100%}.event-form-stack{gap:12px}.event-editor .editor-row input,.event-editor .editor-row select{width:min(230px,70%)}}

/* TimeTree all-day switch and same-day schedule rows. */
.event-editor .toggle-row input[type="checkbox"]{appearance:none;-webkit-appearance:none;position:relative;width:48px!important;height:27px!important;min-height:27px;margin:0;border:0;border-radius:999px;background:#aaa49a;box-shadow:none;cursor:pointer;transition:background .18s ease}.event-editor .toggle-row input[type="checkbox"]:after{content:"";position:absolute;top:3px;left:3px;width:21px;height:21px;border-radius:50%;background:#fff;box-shadow:0 1px 4px rgba(45,35,21,.25);transition:transform .18s ease}.event-editor .toggle-row input[type="checkbox"]:checked{background:var(--orange)}.event-editor .toggle-row input[type="checkbox"]:checked:after{transform:translateX(21px)}
.schedule-values{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0;flex:1}.event-editor .schedule-values input{width:auto;min-width:0}.event-editor .schedule-values input[type="time"]{width:110px}.schedule-date-control{position:relative;display:block;flex:1;max-width:178px}.schedule-date-control .date-display{display:block;max-width:none;width:100%}.schedule-date-control input[type="date"]{position:absolute;inset:0;width:100%!important;height:100%;max-width:none!important;opacity:0;cursor:pointer}.date-display{flex:1;max-width:178px;padding:9px 8px;border-radius:7px;background:#fff;color:var(--text);font-size:12px;font-weight:750;text-align:center;white-space:nowrap}.schedule-values:has(.event-time-input.hidden) .schedule-date-control,.schedule-values:has(.event-time-input.hidden) .date-display{max-width:240px;width:100%}
.attendee-option{display:inline-flex;align-items:center;gap:7px;padding:6px 9px 6px 6px}.participant-avatar{width:26px;height:26px;flex:none;border-radius:50%;overflow:hidden;background:#fff}.participant-avatar img{display:block;width:100%;height:100%;object-fit:cover}.attendee-option.selected{box-shadow:inset 0 0 0 1px rgba(244,154,54,.16)}
@media(max-width:430px){.schedule-date-control,.date-display{max-width:170px}.event-editor .schedule-values input[type="time"]{width:116px}.schedule-values{gap:6px}}

/* v0.9.6 shared Google/Firebase account + period sync */
.account-section{margin-top:0;margin-bottom:18px}
.account-card{display:grid;grid-template-columns:36px minmax(0,1fr) 30px;align-items:center;gap:9px;padding:10px;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.72)}
.account-avatar{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;overflow:hidden;background:var(--orange-soft);color:var(--orange-deep);font-weight:900;font-size:13px}
.account-avatar img{width:100%;height:100%;object-fit:cover}
.account-copy{min-width:0}
.account-copy strong,.account-copy span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.account-copy strong{font-size:12px}
.account-copy span{margin-top:2px;color:var(--muted);font-size:9px}
.account-signout{width:28px;height:28px;border:0;background:transparent;color:var(--muted)}
.google-login-btn{display:flex;align-items:center;justify-content:center;gap:10px;border:1px solid rgba(69,64,57,.14);border-radius:12px;padding:11px 14px;background:#fff;color:var(--text);font-weight:850;box-shadow:0 5px 18px rgba(70,54,30,.06);cursor:pointer}
.google-login-btn:hover{background:#fff9ef}
.google-g{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;font-weight:900;color:#4285f4;border:1px solid rgba(66,133,244,.18)}
.login-hint{margin-top:10px;color:var(--muted);font-size:10px}
.period-chip{display:flex;align-items:center;gap:4px;border-radius:5px;padding:3px 5px;margin:2px 0;background:rgba(231,138,154,.17);color:#b75369;font-size:10px;font-weight:800;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.period-chip:before{content:"";width:6px;height:6px;border-radius:50%;background:var(--pink);flex:none}
.period-day-info{margin:0 0 12px;padding:12px 13px;border:1px solid rgba(231,138,154,.2);border-radius:14px;background:rgba(255,240,244,.74)}
.period-day-info strong{display:block;color:#a84f62;font-size:13px}
.period-day-info span{display:block;margin-top:4px;color:var(--muted);font-size:11px;line-height:1.5}

.period-day-info .period-meta{margin-top:6px;font-size:10px}

/* 2026-09-05: theme toggle, auth-only login screen, native date/time picker controls */
html{color-scheme:light}
html[data-theme="dark"]{color-scheme:dark}
.theme-toggle{position:relative;overflow:hidden}
.theme-glyph{position:absolute;inset:0;display:grid;place-items:center;transition:opacity .22s ease,transform .28s cubic-bezier(.2,.8,.25,1)}
.theme-sun{opacity:1;transform:rotate(0deg) scale(1)}
.theme-moon{opacity:0;transform:rotate(-55deg) scale(.55)}
html[data-theme="dark"] .theme-sun{opacity:0;transform:rotate(55deg) scale(.55)}
html[data-theme="dark"] .theme-moon{opacity:1;transform:rotate(0deg) scale(1)}

body.auth-gated{overflow:hidden;background-image:none!important;background-color:#fff8ea}
body.auth-gated #app,
body.auth-gated #eventModal,
body.auth-gated #activityModal,
body.auth-gated #detailModal,
body.auth-gated #dropMenu,
body.auth-gated #dragGhost,
body.auth-gated #toast{visibility:hidden!important;pointer-events:none!important}
body.auth-gated #connectModal{visibility:visible!important;background:#fff8ea;backdrop-filter:none}
body.auth-gated #connectModal .connect-card{box-shadow:0 24px 70px rgba(74,52,22,.13)}

.picker-control{position:relative;display:inline-flex;min-width:0}
.picker-proxy{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-height:0!important;margin:0!important;padding:0!important;border:0!important;opacity:0!important;pointer-events:none!important}
.picker-display{min-height:34px;border:0;border-radius:7px;background:#fff;color:var(--text);font-size:12px;font-weight:750;cursor:pointer;transition:background .16s,box-shadow .16s,color .16s}
.picker-display:hover{background:#fff8eb;box-shadow:inset 0 0 0 1px rgba(244,154,54,.24)}
.date-picker-control{flex:1;max-width:190px}
.date-picker-control .date-display{width:100%;max-width:none;padding:9px 8px;text-align:center;white-space:nowrap}
.time-picker-control{width:94px}
.time-picker-control .time-display{width:94px;padding:9px 8px;text-align:center;font-variant-numeric:tabular-nums}
.schedule-values{overflow:visible}

html[data-theme="dark"]{
  --bg:#171613;
  --surface:rgba(35,32,27,.96);
  --surface-strong:#24211d;
  --text:#f4efe6;
  --muted:#aaa296;
  --line:rgba(244,239,230,.11);
  --orange:#f49a36;
  --orange-deep:#ffad55;
  --orange-soft:rgba(244,154,54,.16);
  --green:#a8c95d;
  --pink:#ef9aaa;
  --shadow:0 20px 60px rgba(0,0,0,.28);
}
html[data-theme="dark"] body{background-color:#171613;background-image:url("./assets/carrot-bg.webp");background-blend-mode:multiply}
html[data-theme="dark"] body.auth-gated{background:#171613!important}
html[data-theme="dark"] body.auth-gated #connectModal{background:#171613}
html[data-theme="dark"] .app-shell{background:rgba(23,22,19,.62)}
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .detail-panel{background:rgba(31,29,25,.96)}
html[data-theme="dark"] .sidebar-top{background:rgba(31,29,25,.96)}
html[data-theme="dark"] .workspace{background:rgba(25,23,20,.94)}
html[data-theme="dark"] .topbar{background:rgba(31,29,25,.97)}
html[data-theme="dark"] .calendar-stage{background:#201e1a}
html[data-theme="dark"] .weekday{background:#28251f}
html[data-theme="dark"] .day-cell{background:rgba(35,32,27,.82)}
html[data-theme="dark"] .day-cell:hover{background:#302a22}
html[data-theme="dark"] .day-cell.other-month{background:rgba(18,17,15,.78)}
html[data-theme="dark"] .day-cell.selected{background:rgba(244,154,54,.12);box-shadow:inset 0 0 0 2px rgba(244,154,54,.68)}
html[data-theme="dark"] .period-arrows,
html[data-theme="dark"] .month-controls .soft-btn,
html[data-theme="dark"] .top-icon,
html[data-theme="dark"] .compact-search,
html[data-theme="dark"] .search-box,
html[data-theme="dark"] .view-switch{background:#28251f;color:var(--text)}
html[data-theme="dark"] .view-switch button.active{background:var(--orange);color:#fff}
html[data-theme="dark"] .circle-card,
html[data-theme="dark"] .account-card,
html[data-theme="dark"] .agenda-card,
html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .google-login-btn{background:#28251f;color:var(--text)}
html[data-theme="dark"] .event-side-panel{background:#201e1a}
html[data-theme="dark"] .event-panel-head{background:rgba(32,30,26,.97)}
html[data-theme="dark"] .modal-card{background:#24211d;border-color:rgba(255,255,255,.08)}
html[data-theme="dark"] .editor-card{background:#2a2722;border-color:rgba(255,255,255,.08)}
html[data-theme="dark"] .event-editor input,
html[data-theme="dark"] .event-editor select,
html[data-theme="dark"] .event-editor textarea,
html[data-theme="dark"] .modal-card input,
html[data-theme="dark"] .modal-card select,
html[data-theme="dark"] .modal-card textarea,
html[data-theme="dark"] .comment-compose textarea,
html[data-theme="dark"] .event-options-toggle,
html[data-theme="dark"] .attendee-option,
html[data-theme="dark"] .picker-display,
html[data-theme="dark"] .date-display{background:#201e1a;color:var(--text);border-color:rgba(255,255,255,.08)}
html[data-theme="dark"] .picker-display:hover{background:#342d24}
html[data-theme="dark"] .event-editor .toggle-row{background:rgba(36,33,29,.9)}
html[data-theme="dark"] .custom-reminder{background:rgba(244,154,54,.12)}
html[data-theme="dark"] .comment-item{background:#2c2822}
html[data-theme="dark"] .drop-menu,
html[data-theme="dark"] .drop-menu:before{background:#28251f}
html[data-theme="dark"] .drop-menu{box-shadow:0 18px 46px rgba(0,0,0,.42)}
html[data-theme="dark"] .toast{background:#f0e8dc;color:#211f1b}
html[data-theme="dark"] .login-hint{color:var(--muted)}
html[data-theme="dark"] .connect-card{background:#24211d}
@media(max-width:820px){
  .date-picker-control{max-width:170px}
  .time-picker-control,.time-picker-control .time-display{width:82px}
  html[data-theme="dark"] .topbar{background:rgba(31,29,25,.96)}
}

/* TimeTree-inspired custom editor pickers and interaction polish */
body.auth-pending{overflow:hidden;background-image:none!important;background:#fff8ea!important}
.auth-pending-splash{position:fixed;inset:0;z-index:2000;display:grid;place-content:center;justify-items:center;gap:10px;background:#fff8ea;color:var(--text)}
.auth-pending-splash img{width:74px;height:74px;object-fit:contain;animation:auth-logo-in .28s cubic-bezier(.2,.8,.25,1)}
.auth-pending-splash strong{font-size:15px;letter-spacing:.04em;animation:auth-logo-in .28s cubic-bezier(.2,.8,.25,1)}
@keyframes auth-logo-in{from{opacity:0;transform:scale(.94)}to{opacity:1;transform:none}}
body.auth-pending #app,
body.auth-pending #connectModal,
body.auth-pending #eventModal,
body.auth-pending #activityModal,
body.auth-pending #detailModal,
body.auth-pending #editorPopover,
body.auth-pending #dropMenu,
body.auth-pending #dragGhost,
body.auth-pending #toast{visibility:hidden!important;pointer-events:none!important}
html[data-theme="dark"] body.auth-pending{background:#171613!important}
html[data-theme="dark"] .auth-pending-splash{background:#171613;color:#f4efe6}

.control-value{display:none!important}
.repeat-row{position:relative}
.repeat-display{display:flex;align-items:center;justify-content:flex-end;gap:6px;min-width:150px;padding:8px 9px}
.repeat-chevron{font-size:18px;color:var(--muted);transition:transform .16s ease}
.repeat-display.picker-open .repeat-chevron{transform:rotate(90deg);color:var(--orange-deep)}
.picker-display.picker-open{background:var(--orange-soft);box-shadow:inset 0 0 0 1px rgba(244,154,54,.38)}

.editor-popover{position:fixed;z-index:950;background:#fffdf8;border:1px solid rgba(83,68,44,.12);border-radius:14px;box-shadow:0 18px 52px rgba(67,48,23,.22);overflow:hidden;animation:editor-popover-in .12s cubic-bezier(.2,.8,.25,1)}
@keyframes editor-popover-in{from{opacity:0;transform:translateY(-3px) scale(.985)}to{opacity:1;transform:none}}

.date-popover{width:318px;padding:12px}
.mini-calendar-head{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:8px;margin-bottom:10px}
.mini-calendar-head strong{text-align:center;font-size:14px}
.mini-today,.mini-nav button{height:32px;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--text);font-weight:800}
.mini-today{padding:0 11px;font-size:12px}
.mini-nav{display:flex;gap:5px}
.mini-nav button{width:32px;display:grid;place-items:center;padding:0}
.mini-nav button .material-symbols-rounded{font-size:18px}
.mini-today:hover,.mini-nav button:hover{background:var(--orange-soft);color:var(--orange-deep)}
.mini-weekdays,.mini-dates{display:grid;grid-template-columns:repeat(7,1fr);gap:3px}
.mini-weekdays{margin-bottom:4px}
.mini-weekdays span{display:grid;place-items:center;height:24px;font-size:10px;font-weight:800;color:var(--muted)}
.mini-date{height:34px;border:0;border-radius:50%;background:transparent;color:var(--text);font-size:11px;font-weight:750}
.mini-date:hover{background:var(--orange-soft)}
.mini-date.other{color:var(--muted);opacity:.38}
.mini-date.today{box-shadow:inset 0 0 0 1px rgba(244,154,54,.62)}
.mini-date.selected{background:var(--orange);color:#fff;box-shadow:0 4px 10px rgba(244,154,54,.22)}
.mini-date.selected.other{opacity:.72}
.day-number.holiday-date{color:#d95b55}
.mini-date.holiday-date:not(.selected){color:#d95b55}
.day-cell.other-month .day-number.holiday-date{color:#d95b55}
html[data-theme="dark"] .day-number.holiday-date,
html[data-theme="dark"] .mini-date.holiday-date:not(.selected){color:#ff6f68}

.time-popover{width:190px;max-height:348px}
.time-list{max-height:348px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
.time-option,.repeat-option,.reminder-option{display:flex;align-items:center;justify-content:space-between;width:100%;border:0;border-bottom:1px solid var(--line);background:transparent;color:var(--text);font-weight:750;text-align:left}
.time-option{height:48px;padding:0 13px;font-size:13px}
.repeat-option,.reminder-option{height:54px;padding:0 15px;font-size:13px}
.time-option:last-child,.repeat-option:last-child,.reminder-option:last-child{border-bottom:0}
.time-option:hover,.repeat-option:hover,.reminder-option:hover{background:var(--orange-soft)}
.time-option.selected,.repeat-option.selected,.reminder-option.selected{background:rgba(244,154,54,.09);color:var(--orange-deep)}
.picker-radio{width:18px;height:18px;border:2px solid rgba(93,82,68,.5);border-radius:50%;position:relative;flex:none}
.time-option.selected .picker-radio,.repeat-option.selected .picker-radio,.reminder-option.selected .picker-radio{border-color:var(--orange)}
.time-option.selected .picker-radio:after,.repeat-option.selected .picker-radio:after,.reminder-option.selected .picker-radio:after{content:"";position:absolute;inset:3px;border-radius:50%;background:var(--orange)}
.repeat-popover,.reminder-popover{width:300px;max-height:380px;overflow:auto}

.calendar-dragging .day-cell{transition:none!important}
.calendar-dragging .day-cell.drop-hover,
.day-cell.drop-hover{background:rgba(244,154,54,.18)!important;box-shadow:inset 0 0 0 3px rgba(244,154,54,.96)!important;opacity:1!important;transition:none!important}
html[data-theme="dark"] .calendar-dragging .day-cell.drop-hover,
html[data-theme="dark"] .day-cell.drop-hover{background:rgba(244,154,54,.25)!important;box-shadow:inset 0 0 0 3px #ffb45f!important;opacity:1!important}

html[data-theme="dark"] .period-arrows{background:#24221e;border-color:rgba(255,255,255,.12)}
html[data-theme="dark"] .period-arrows .icon-btn{background:#24221e!important;color:#f4efe6;border-color:rgba(255,255,255,.1)}
html[data-theme="dark"] .period-arrows .icon-btn:hover{background:#342d24!important;color:#ffad55}
html[data-theme="dark"] .month-controls .soft-btn{background:#24221e!important;border-color:rgba(255,255,255,.12);color:#f4efe6}
html[data-theme="dark"] .month-controls h1{color:#f4efe6}
html[data-theme="dark"] .panel-close,
html[data-theme="dark"] .editor-close{background:#302d28!important;color:#f4efe6!important;border-color:rgba(255,255,255,.08)!important}
html[data-theme="dark"] .panel-close:hover,
html[data-theme="dark"] .editor-close:hover{background:#3b342b!important;color:#ffad55!important}
html[data-theme="dark"] .round-add{background:var(--orange)!important;color:#fff!important}
html[data-theme="dark"] .editor-popover{background:#292723;border-color:rgba(255,255,255,.1);box-shadow:0 20px 58px rgba(0,0,0,.48)}
html[data-theme="dark"] .mini-today,
html[data-theme="dark"] .mini-nav button{background:#34312c;color:#f4efe6;border-color:rgba(255,255,255,.1)}
html[data-theme="dark"] .mini-date{color:#f4efe6}
html[data-theme="dark"] .mini-date.other{color:#8e887f}
html[data-theme="dark"] .mini-date:hover,
html[data-theme="dark"] .time-option:hover,
html[data-theme="dark"] .repeat-option:hover,
html[data-theme="dark"] .reminder-option:hover{background:rgba(244,154,54,.15)}
html[data-theme="dark"] .time-option.selected,
html[data-theme="dark"] .repeat-option.selected,
html[data-theme="dark"] .reminder-option.selected{background:rgba(244,154,54,.18);color:#ffb45f}
html[data-theme="dark"] .picker-radio{border-color:#7f7a72}

@media(max-width:520px){
  .date-popover{width:min(318px,calc(100vw - 20px))}
  .repeat-popover,.reminder-popover{width:min(300px,calc(100vw - 20px))}
  .time-popover{width:190px}
}

/* 2026-09-05: TimeTree-style continuous cross-date event bars */
.calendar-grid{position:relative}
.multi-day-space{width:100%;pointer-events:none}
.multi-day-bar{
  position:absolute;
  z-index:8;
  height:20px;
  min-height:20px;
  min-width:18px;
  margin:0!important;
  padding:0 8px!important;
  border-radius:5px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  box-sizing:border-box;
  overflow:hidden;
  white-space:nowrap;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.10);
}
.multi-day-bar.continues-left{border-top-left-radius:0;border-bottom-left-radius:0}
.multi-day-bar.continues-right{border-top-right-radius:0;border-bottom-right-radius:0}
.multi-day-title{
  display:block;
  width:100%;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  text-align:center;
  line-height:20px;
}
.multi-day-bar:hover{
  transform:none;
  filter:saturate(1.06) brightness(1.02);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.14),0 2px 8px rgba(62,47,25,.10);
}
.multi-day-bar:active{transform:none}
.calendar-dragging .multi-day-bar{pointer-events:none!important}
html[data-theme="dark"] .multi-day-bar{
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.12),0 2px 8px rgba(0,0,0,.16);
}
@media(max-width:820px){
  .multi-day-bar{height:18px;min-height:18px;padding:0 5px!important;font-size:8px}
  .multi-day-title{line-height:18px}
}

/* TimeTree-like shared element transition: no clone, no white flash */
.member-list .avatar{width:34px;height:34px;border-radius:10px;contain:paint}
.collapsed-member-rail{
  padding-top:var(--member-rail-top,150px);
  padding-left:17px;
  padding-right:0;
  align-items:flex-start;
}
.member-rail-button{width:30px;height:30px;border-radius:9px;contain:paint}
.member-list .avatar img,.member-rail-button img{display:block;width:100%;height:100%;object-fit:cover}
html.sidebar-view-transition{view-transition-name:none}
::view-transition-old(root),::view-transition-new(root){animation:none!important;mix-blend-mode:normal}
::view-transition-group(*){animation-duration:280ms;animation-timing-function:cubic-bezier(.2,.8,.25,1)}
::view-transition-old(*),::view-transition-new(*){mix-blend-mode:normal}
@media(max-width:820px){
  .collapsed-member-rail{padding-left:14px}
  .member-list .avatar{width:32px;height:32px}
  .member-rail-button{width:28px;height:28px}
}

/* 2026-09-05 v2: TimeTree-style fixed header + collapsible member rail */
.app-header.topbar{
  grid-area:header;
  position:relative;
  z-index:50;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  grid-template-areas:none;
  align-items:center;
  min-height:68px;
  height:68px;
  padding:8px 12px;
  gap:14px;
  border-bottom:1px solid var(--line);
  background:rgba(255,253,248,.97);
  backdrop-filter:blur(24px) saturate(1.08);
}
.app-header .header-left{display:flex;align-items:center;gap:10px;min-width:0}
.app-header .brand{display:flex;align-items:center;gap:8px;min-width:160px;flex:none}
.app-header .brand img{width:42px;height:42px}
.app-header .month-controls{display:flex;align-items:center;gap:8px;justify-self:auto;min-width:0}
.app-header .top-actions{display:flex;align-items:center;gap:7px;justify-self:end}
.workspace{
  grid-area:main;
  min-width:0;
  min-height:0;
  height:100%;
  overflow:hidden;
  padding:0;
  background:rgba(255,253,248,.9);
}
.calendar-stage{height:100%;min-height:0;border:0;border-radius:0;box-shadow:none}
.calendar-grid{
  height:100%;
  min-height:0;
  grid-template-rows:42px repeat(6,minmax(0,1fr));
  animation:none;
}
.calendar-grid.week-mode{grid-template-rows:42px minmax(0,1fr)}
.calendar-grid.week-mode .day-cell{min-height:0}
.app-shell.sidebar-collapsed{grid-template-columns:64px minmax(0,1fr)}
.app-shell.sidebar-collapsed .sidebar-content{opacity:0!important;transform:translateX(-10px)!important;visibility:hidden!important;pointer-events:none!important}
.app-shell.sidebar-collapsed .collapsed-member-rail{display:flex!important;opacity:1!important;transform:translateX(0)!important;visibility:visible!important;pointer-events:auto!important}
.app-shell:not(.sidebar-collapsed) .collapsed-member-rail{display:flex!important;opacity:0!important;transform:translateX(-6px)!important;visibility:hidden!important;pointer-events:none!important}

@media(max-width:1360px){
  .app-shell{grid-template-columns:210px minmax(0,1fr)}
  .app-shell.sidebar-collapsed{grid-template-columns:64px minmax(0,1fr)}
  .app-header.topbar{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:10px}
  .app-header .brand{min-width:150px}
  .app-header .brand img{width:38px;height:38px}
  .app-header .brand strong{font-size:16px}
  .app-header .brand span{font-size:9.5px}
  .app-header .month-controls{gap:6px}
}

@media(max-width:820px){
  .app-shell{
    display:grid;
    grid-template-columns:190px minmax(0,1fr);
    grid-template-rows:60px minmax(0,1fr);
    grid-template-areas:"header header" "sidebar main";
    height:100dvh;
    overflow:hidden;
  }
  .app-shell.sidebar-collapsed{grid-template-columns:58px minmax(0,1fr)}
  .sidebar{display:flex;height:100%;min-height:0}
  .app-header.topbar{
    position:relative;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    grid-template-areas:none;
    min-height:60px;
    height:60px;
    padding:6px 8px;
    gap:6px;
  }
  .app-header .header-left{gap:5px;min-width:0}
  .app-header .sidebar-toggle-btn{width:30px;height:30px}
  .app-header .brand{min-width:102px;gap:5px}
  .app-header .brand img{width:32px;height:32px}
  .app-header .brand strong{font-size:13px}
  .app-header .brand span{display:none}
  .app-header .month-controls{gap:4px}
  .app-header .month-controls .soft-btn{padding:6px 8px}
  .app-header .period-arrows .icon-btn{width:28px;height:28px}
  .app-header .month-controls h1{font-size:12px;margin-left:1px}
  .app-header .view-switch{display:none}
  .app-header .top-actions{width:auto;flex-wrap:nowrap}
  .app-header .theme-toggle,.app-header .panel-toggle{display:none}
  .app-header .compact-search{position:absolute;right:42px;top:11px}
  .app-header .compact-search.open{width:min(180px,calc(100vw - 250px))}
  .workspace{padding:0}
  .calendar-stage,.calendar-grid{height:100%;min-height:0}
  .calendar-grid{grid-template-rows:34px repeat(6,minmax(0,1fr))}
  .calendar-grid.week-mode{grid-template-rows:34px minmax(0,1fr)}
  .event-side-panel{width:100vw}
}



/* 2026-09-06 v0.9.21: larger, vertically centered calendar event text */
.event-chip{font-size:11px;line-height:1;min-height:20px;align-items:center;justify-content:center}
.holiday-event-chip{font-size:11px;line-height:20px;min-height:20px}
.multi-day-bar{font-size:11px;align-items:center;justify-content:center}
.multi-day-title{line-height:20px}
@media(max-width:820px){
  .event-chip{font-size:10px;line-height:1;min-height:18px}
  .holiday-event-chip{font-size:10px;line-height:18px;min-height:18px}
  .multi-day-bar{font-size:10px}
  .multi-day-title{line-height:18px}
}

/* 2026-09-06 v0.9.22: TimeTree-style timed event rows */
.timed-event-chip{background:transparent!important;color:var(--text)!important;box-shadow:none!important;filter:none!important;padding:2px 4px!important;gap:5px;justify-content:flex-start!important;text-align:left!important}
.timed-event-chip:hover{background:rgba(244,154,54,.055)!important;transform:none!important;box-shadow:none!important}
.timed-event-chip .event-color-dot{width:8px;height:8px;border-radius:50%;flex:0 0 8px}
.timed-event-chip .event-title{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text);font-size:11px;font-weight:750;text-align:left}
.timed-event-chip .time{margin-left:auto;flex:none;font-size:10px!important;line-height:1!important;opacity:1!important;color:var(--muted)!important;font-weight:500;white-space:nowrap}
html[data-theme="dark"] .timed-event-chip{color:var(--text)!important}
@media(max-width:820px){
  .timed-event-chip{padding:2px 3px!important;gap:4px}
  .timed-event-chip .event-color-dot{width:7px;height:7px;flex-basis:7px}
  .timed-event-chip .event-title{font-size:10px}
  .timed-event-chip .time{display:inline!important;font-size:9px!important}
}


/* 2026-09-06: TimeTree-like 5-week month layout + compact overflow counter */
.calendar-grid.month-five-weeks:not(.week-mode){
  grid-template-rows:42px repeat(5,minmax(0,1fr));
}
.more-events{
  position:absolute;
  right:6px;
  bottom:4px;
  z-index:12;
  padding:1px 4px;
  border-radius:6px;
  background:rgba(255,255,255,.9);
  color:var(--text);
  font-size:10px;
  line-height:1.2;
  font-weight:850;
  pointer-events:none;
  box-shadow:0 1px 4px rgba(45,35,20,.08);
}
html[data-theme="dark"] .more-events{
  background:rgba(36,34,30,.92);
  color:#f4efe6;
}
@media(max-width:820px){
  .calendar-grid.month-five-weeks:not(.week-mode){
    grid-template-rows:34px repeat(5,minmax(0,1fr));
  }
  .more-events{right:4px;bottom:3px;font-size:9px;padding:1px 3px}
}


/* 2026-09-06: Monday-first calendar + custom delete confirmation */
.calendar-grid .weekday:first-child{color:var(--muted)}
.calendar-grid .weekday.saturday{color:#5e8daf}
.calendar-grid .weekday.sunday{color:#d96b5f}
.mini-weekdays .saturday{color:#5e8daf}
.mini-weekdays .sunday{color:#d96b5f}

.delete-confirm-backdrop{z-index:900}
.delete-confirm-card{
  width:min(370px,calc(100vw - 32px));
  padding:26px 24px 22px;
  text-align:center;
}
.delete-confirm-icon{
  width:54px;
  height:54px;
  margin:0 auto 12px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#fff1ed;
  color:#b84939;
}
.delete-confirm-icon .material-symbols-rounded{font-size:28px}
.delete-confirm-card h2{margin:0 0 8px;font-size:20px}
.delete-confirm-card p{margin:0;color:var(--muted);font-size:13px;line-height:1.65;word-break:break-word}
.delete-confirm-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:22px}
.delete-confirm-actions button{height:42px}
html[data-theme="dark"] .delete-confirm-icon{background:rgba(184,73,57,.18)}
