.layout.library-open{grid-template-columns:190px minmax(0,1fr) 285px;gap:20px}.idea-panel{position:sticky;top:90px;align-self:start;margin-top:25px;background:#eeebe4;border:1px solid #e2dbd0;border-radius:11px;padding:17px;max-height:calc(100vh - 110px);display:flex;flex-direction:column;min-width:0}.idea-panel[hidden]{display:none!important}.idea-heading{display:flex;justify-content:space-between;align-items:center;gap:8px}.idea-heading h2{font-size:17px;font-weight:500;margin:6px 0}.idea-heading h2 span{font-size:10px;color:#a798a8;margin-left:6px}.idea-heading .eyebrow{font-size:7px;letter-spacing:1.4px}.idea-heading>button{font-size:10px;padding:8px;white-space:nowrap}.idea-intro{font-size:10px;line-height:1.9;margin:10px 0;color:#9a8e9d}.idea-panel>input{font-size:11px;padding:9px;margin-bottom:10px;background:#faf8f4}.idea-filters{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-bottom:13px}.idea-filters select{font-size:10px;padding:7px;background:#faf8f4;min-width:0}.idea-list{overflow:auto;scrollbar-width:thin;min-height:100px;padding:0 3px 2px 0}.idea-card{background:#fffdfa;border:1px solid #e0d9e4;border-left:3px solid #b29cd4;border-radius:8px;padding:12px;margin-bottom:10px;min-width:0}.idea-card[data-kind="餐饮"]{border-left-color:#d6ae7b}.idea-card[data-kind="休息"]{border-left-color:#a3b792}.idea-card[data-kind="交通"],.idea-card[data-kind="住宿"],.idea-card[data-kind="航班"],.idea-card[data-kind="火车"],.idea-card[data-kind="自驾"]{border-left-color:#94b1c1}.idea-card-top{display:flex;align-items:center;gap:5px}.idea-card .idea-grip{min-width:25px;min-height:26px;line-height:26px;text-align:center;padding:0;flex:none}.idea-usage{font-size:8px;color:#afa1b5;margin-left:auto}.idea-name{border:0;font-size:13px;font-weight:550;text-align:left;padding:6px 0;overflow-wrap:anywhere}.idea-badges{display:flex;gap:5px;flex-wrap:wrap;margin:5px 0 7px}.priority-badge,.category-badge{display:inline-block;padding:3px 6px;border-radius:4px;font-size:9px;line-height:1.3;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.priority-badge{background:#efebf3;color:#95849f}.priority-badge[data-priority="一定去"]{background:#f4dfd7;color:#ab6c54}.priority-badge[data-priority="可去"]{background:#e6ecdf;color:#7c8d63}.category-badge{background:#eee9dd;color:#a09172}.idea-card p{font-size:9px;line-height:1.7;margin:5px 0;color:#a093aa;overflow-wrap:anywhere}.idea-card .idea-notes{white-space:pre-wrap;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.idea-card-actions{display:flex;justify-content:space-between;gap:7px;margin-top:10px;border-top:1px solid #eee8ee;padding-top:8px}.idea-card-actions button{font-size:10px;padding:5px 8px}.idea-card-actions button:last-child{color:#7e668e;background:#f0eaf5;border-color:#e5daee}.idea-empty{text-align:center;color:#a597ac;padding:35px 8px;font-size:11px;line-height:2.1}.idea-empty button{display:block;margin:16px auto 0;font-size:10px}.idea-footnote{font-size:8px;line-height:1.8;color:#a899ad;margin:12px 0 0}.event-labels{display:flex;gap:3px;overflow:hidden}.event-labels .priority-badge,.event-labels .category-badge{font-size:7px;padding:2px 4px;background:#ffffff80}.event.compact .event-labels{display:none}.detail-card-head{flex-wrap:wrap}.detail-card-head .detail-meta{min-width:100px}.quick-capture #quick-priority{width:78px;font-size:10px}.quick-capture #quick-kind{width:78px}#library-toggle[aria-expanded="true"]{background:#eee6f3;color:#765e8c;border-color:#dfd2e9}#idea-form label input,#idea-form label select{margin-bottom:12px}#idea-place-name{font-size:13px;color:#7b6489}
@media(min-width:1650px){.layout.library-open{grid-template-columns:205px minmax(0,1fr) 305px;gap:25px}}
@media(min-width:701px) and (max-width:1250px){.layout.library-open{grid-template-columns:185px minmax(0,1fr);}.library-open .idea-panel{grid-column:1/-1;grid-row:1;position:static;max-height:330px;margin-top:20px}.idea-panel .idea-intro{display:none}.idea-panel .idea-filters{grid-template-columns:repeat(4,1fr);margin-top:8px}.idea-panel .idea-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:10px}.idea-panel .idea-card{margin:0}.idea-panel>input{margin:8px 0 0}.idea-panel .idea-footnote{margin-top:7px}.idea-panel .idea-card .idea-notes{display:none}}
@media(max-width:700px){.layout.library-open{display:flex;gap:0}.idea-panel{order:0;position:static;margin-top:18px;max-height:none;padding:14px;width:100%;margin-bottom:8px}.idea-intro{display:none}.idea-panel>input{margin:10px 0 7px}.idea-filters{margin-bottom:10px;gap:5px}.idea-list{display:flex;gap:10px;overflow:auto;flex:none;max-height:200px;padding-bottom:4px}.idea-card{min-width:225px;max-width:250px;margin:0;padding:10px;flex:none}.idea-card .idea-notes{display:none}.idea-footnote{display:none}.idea-empty{width:100%;padding:15px 8px}.idea-empty button{margin-top:9px}.quick-capture #quick-priority{width:67px;font-size:9px;padding:9px 3px}.quick-capture #quick-kind{width:64px;font-size:9px;padding:9px 3px}.quick-capture input{padding:10px 6px}.quick-capture input::placeholder{font-size:9px}.detail-card-head .detail-meta{flex-basis:55%;min-width:0}.topbar>#library-toggle{font-size:9px}.idea-heading h2{font-size:16px}.idea-card-top .kind-label{font-size:8px}}

/* Drag-first surfaces. Controls are excluded from pointer capture. */
[data-card-drag],[data-idea-card]{cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none}
[data-card-drag] .drag-grip,[data-idea-card] .drag-grip{cursor:grab}
.day-grid .event{cursor:grab;padding-right:28px}
.card-edit{font-size:9px;padding:3px 4px;position:absolute;right:3px;top:3px;line-height:1.3;z-index:2;background:#ffffffc9;color:#756380;border:1px solid #d8cddd;border-radius:4px;cursor:pointer}
.card-selected,[data-card-drag]:focus-visible,[data-idea-card]:focus-visible{outline:2px solid #9d82b5;outline-offset:2px}
.dragging [data-card-drag],.dragging [data-idea-card],.dragging .drag-grip{cursor:grabbing}
.idea-name{display:block}.detail-title{display:block}.month-event-name{display:block;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding-right:18px;font-size:10px;line-height:1.7}
.month-event{position:relative}.month-event .card-edit{top:1px;right:1px;font-size:9px;padding:1px 3px}
.drop-hover{outline:2px dashed #9779ae!important;outline-offset:-3px;background-color:#b6a0cb18!important}

.idea-card,.detail-card{position:relative}

/* Drag previews never participate in layout or hit testing. */
.drag-slot-preview{position:absolute;z-index:12;pointer-events:none!important;box-sizing:border-box;min-width:0;overflow:hidden;border:2px dashed #8862aa;border-radius:6px;background:#eee4f5dc;color:#63427e;padding:5px 7px;box-shadow:0 3px 14px #60487922;font-size:10px;line-height:1.5}
.drag-slot-preview strong,.drag-slot-preview span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drag-slot-preview strong{font-size:11px}.drag-floating-slot{position:fixed;z-index:40;min-height:40px;max-width:calc(100vw - 8px);background:#f5eefbee}.drag-invalid{color:#aa5447;border-color:#c77a68;background:#fff0e9ed}.drag-source{opacity:.32!important}#drag-ghost{max-width:285px;z-index:100;pointer-events:none}

/* Quiet workspace, inspired by ink, torn paper and generous negative space. */
.tools-menu{position:relative;margin-left:auto}.tools-menu summary,.day-tools summary,.filter-menu summary{cursor:pointer;font-size:11px;list-style:none;padding:9px 10px}.tools-menu summary::-webkit-details-marker,.day-tools summary::-webkit-details-marker,.filter-menu summary::-webkit-details-marker{display:none}.tools-menu summary::after,.filter-menu summary::after{content:' +';opacity:.5}.tools-menu[open] summary::after,.filter-menu[open] summary::after{content:' −'}.tools-popover{position:absolute;right:0;top:100%;width:175px;display:flex;flex-direction:column;padding:9px;background:#faf8f3;border:1px solid #d6d0c6;z-index:35;box-shadow:0 10px 35px #0002}.tools-popover button{text-align:left;border:0;padding:12px}.tools-popover .local-tag{font-size:9px;padding:12px}.topbar #style-select{width:83px;margin-left:8px}.layout{grid-template-columns:minmax(0,1fr)}.layout.library-open{grid-template-columns:minmax(0,1fr) 260px;gap:32px}.masthead .eyebrow,.trip-stamp,.idea-heading .eyebrow,.month-heading>.eyebrow,.brand span,footer,.idea-footnote{display:none}.masthead{padding:42px 0 24px}.title-input{font-weight:400;letter-spacing:.02em}.masthead p{font-size:10px;opacity:.65}.calendar-toolbar{padding-top:12px}.idea-panel{margin-top:12px}.filter-menu{margin-bottom:10px}.filter-menu>summary{padding:4px 0 9px}.filter-menu .idea-filters{margin:0}.calendar-caption{font-size:9px;opacity:.6}.calendar-caption span:first-child{max-width:70%}.event-labels{opacity:.65}.event-note,.idea-intro{font-size:9px}.idea-card{padding:13px}.day-tools{margin-top:8px}.day-tools summary{padding-left:0}.day-header [data-day-drag],.agenda-date[data-day-drag],.month-cell-head [data-day-drag]{cursor:grab;touch-action:none;user-select:none}.dragging [data-day-drag]{cursor:grabbing}.date-select:focus-visible,.agenda-date:focus-visible,.month-cell-head [data-day-drag]:focus-visible{outline:1px solid currentColor;outline-offset:3px}
body[data-theme="ink"]{--surface:#131312;--panel:#1b1b19;--card:#23231f;--text:#e4dfd2;--muted:#a6a397;--stroke:#363630;--ink:#151512;color-scheme:dark}
body[data-theme="paper"]{--surface:#f2efe6;--panel:#f8f5ec;--card:#e9e5da;--text:#282822;--muted:#777568;--stroke:#d5d0c3;--ink:#f4f1e9;color-scheme:light}
body:is([data-theme="ink"],[data-theme="paper"],[data-theme="natura"]){background:var(--surface);color:var(--text);--line:var(--stroke);--purple:var(--text);--ink:var(--text);font-family:'Segoe UI','Microsoft YaHei',sans-serif}
body:is([data-theme="ink"],[data-theme="paper"],[data-theme="natura"]) :is(input,select,textarea,button,summary){color:var(--text)}
body:is([data-theme="ink"],[data-theme="paper"],[data-theme="natura"]) :is(button,input,select,textarea,dialog,.tools-popover,.calendar-scroll,.month-scroll,.agenda-day,.idea-panel,.detail-card,.quick-capture,.search-box,.view-tabs){background:var(--panel);border-color:var(--stroke);border-radius:2px;box-shadow:none}
body:is([data-theme="ink"],[data-theme="paper"],[data-theme="natura"]) :is(.topbar,.day-header,.gutter-head,.month-board,.month-cell,.month-weekdays,.day-column,.day-grid,.time-labels){background:var(--surface);border-color:var(--stroke)}
body:is([data-theme="ink"],[data-theme="paper"],[data-theme="natura"]) .topbar{backdrop-filter:blur(14px);padding-top:16px;padding-bottom:16px;border-bottom:1px solid var(--stroke)}
body:is([data-theme="ink"],[data-theme="paper"],[data-theme="natura"]) :is(.event,.idea-card,.month-event,.priority-badge,.category-badge,.view-tabs .active,.day-header .day-add,.card-edit){background:var(--card);color:var(--text);border-color:var(--stroke);border-radius:2px;box-shadow:none}
body:is([data-theme="ink"],[data-theme="paper"],[data-theme="natura"]) :is(.event,.idea-card){border-left:2px solid var(--muted)}
body:is([data-theme="ink"],[data-theme="paper"],[data-theme="natura"]) :is(h1,h2,h3,.brand,.date-number,.event-name,.detail-title,.agenda-date,.idea-name,.date-select,.title-input){color:var(--text)}
body:is([data-theme="ink"],[data-theme="paper"],[data-theme="natura"]) :is(p,small,label,.eyebrow,.day-heading-meta,.detail-meta,.kind-label,.idea-usage,.day-summary,.time-label,.weather-inline,.idea-empty,.storage-note,.hint,.month-note){color:var(--muted)}
body:is([data-theme="ink"],[data-theme="paper"],[data-theme="natura"]) :is(.primary,.dark){background:var(--text);color:var(--surface);border-color:var(--text)}
body:is([data-theme="ink"],[data-theme="paper"],[data-theme="natura"]) #library-toggle[aria-expanded="true"]{background:var(--card);color:var(--text);border-color:var(--stroke)}
body:is([data-theme="ink"],[data-theme="paper"],[data-theme="natura"]) :is(.day-grid,.time-labels){background-image:linear-gradient(to bottom,var(--stroke) 1px,transparent 1px);background-size:100% 70px}
body:is([data-theme="ink"],[data-theme="paper"],[data-theme="natura"]) :is(.warning,.toast,#drag-ghost,.drag-slot-preview){background:var(--panel);color:var(--text);border-color:var(--muted);box-shadow:0 8px 30px #0002}
body:is([data-theme="ink"],[data-theme="paper"],[data-theme="natura"]) :is(.drop-hover,.card-selected){outline-color:var(--muted)!important}
body:is([data-theme="ink"],[data-theme="paper"],[data-theme="natura"]) :is(.idea-card-actions,.rail-divider,.detail-actions,.weather-panel){border-color:var(--stroke)}
body:is([data-theme="ink"],[data-theme="paper"],[data-theme="natura"]) button:hover{background:var(--card);color:var(--text)}
body:is([data-theme="ink"],[data-theme="paper"],[data-theme="natura"]) .title-input{background:transparent;border:0}
body:is([data-theme="ink"],[data-theme="paper"],[data-theme="natura"]) dialog::backdrop{background:#0009}
@media(hover:hover) and (pointer:fine){.event .card-edit{opacity:0}.event:hover .card-edit,.event:focus-within .card-edit{opacity:1}.idea-card-actions{opacity:0;transition:opacity .12s}.idea-card:hover .idea-card-actions,.idea-card:focus-within .idea-card-actions{opacity:1}}
@media(min-width:701px) and (max-width:1250px){.layout.library-open{grid-template-columns:minmax(0,1fr) 235px;gap:20px}.layout.library-open .idea-panel{grid-column:auto;grid-row:auto;position:sticky;max-height:calc(100vh - 110px)}.layout.library-open .idea-list{display:block}.layout.library-open .idea-card{margin-bottom:10px}.layout.library-open .idea-filters{grid-template-columns:1fr 1fr}}
@media(max-width:700px){.layout,.layout.library-open{display:flex}.topbar #trip-select{margin-left:0;max-width:calc(100% - 85px);flex:1}.topbar #style-select{width:75px;flex:none;margin:0}.tools-menu{margin-left:auto}.masthead{padding:24px 0 12px}.calendar-caption{display:block}.calendar-caption span{display:block;max-width:100%!important}.title-input{font-size:25px}.idea-panel{margin-top:8px}.tools-popover{right:0}.calendar-toolbar .toolbar-actions button{font-size:9px}.day-header{min-height:85px}}

.drag-grip{display:none!important}.day-grid .event{padding-left:10px}.day-grid .event.compact{padding-left:8px}.day-header,.gutter-head{height:88px}.tools-menu[open]{z-index:40}

/* Selected dates stay within the current palette. Override legacy light states. */
body:is([data-theme="ink"],[data-theme="paper"],[data-theme="natura"]) .day-column.active .day-header{background:var(--panel);border-bottom-color:var(--muted)}
body:is([data-theme="ink"],[data-theme="paper"],[data-theme="natura"]) .day-column.active .day-grid{background-color:var(--surface)}
body:is([data-theme="ink"],[data-theme="paper"],[data-theme="natura"]) .day-header:hover{background:var(--panel)}
body:is([data-theme="ink"],[data-theme="paper"],[data-theme="natura"]) .month-cell.active{background:var(--panel);box-shadow:inset 0 0 0 1px var(--muted)}
body:is([data-theme="ink"],[data-theme="paper"],[data-theme="natura"]) :is(input,textarea,select,button,a):focus-visible{outline:1px solid var(--muted);outline-offset:2px}
body:is([data-theme="ink"],[data-theme="paper"],[data-theme="natura"]) :is(input,textarea,select):focus{outline:1px solid var(--muted)}
body:is([data-theme="ink"],[data-theme="paper"],[data-theme="natura"]) .drop-hover{background-color:var(--panel)!important}

/* Calendar navigation is a separate gesture from moving cards or dates. */
#calendar-scroll,.month-continuous{cursor:grab;touch-action:none;overscroll-behavior:contain}.panning,.panning #calendar-scroll,.panning .month-continuous{cursor:grabbing!important;user-select:none}.month-continuous{max-height:90vh;overflow:auto;position:relative;scrollbar-width:thin;overflow-anchor:none}.month-page{min-width:770px;padding-bottom:28px}.month-page>h2{font-size:17px;font-weight:400;margin:0;padding:20px 14px 14px}.month-page .month-board{border-top:1px solid var(--line)}.month-page .month-weekdays{position:sticky;top:0;z-index:3}.empty-journey{padding:80px 20px;text-align:center;font-size:12px;opacity:.6}.view-tabs button{padding-left:12px;padding-right:12px}.toolbar-actions [hidden]{display:none!important}
@media(max-width:700px){.view-tabs button{font-size:10px;padding:8px 7px}.month-page{min-width:735px}.month-continuous{max-height:65vh}.viewbar .view-tabs{overflow-x:auto}}

#calendar-scroll{overflow-anchor:none}.week-board .day-column{flex:0 0 180px}
