:root{
color-scheme:light;
--bg:#faf7ef;
--page-gutter:24px;
--content-width:1280px;
--workspace-width:1280px;
--surface:#fffdf8;
--text:#23382f;
--muted:#55665c;
--line:#d7ddd3;
--accent:#bc4b2d;
--accent-ink:#a43b1e;
--on-accent:#fff;
--accent-soft:#ffe8df;
--danger:#b6382a;
--shadow:0 18px 50px #20342c12;
font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
[data-theme=dark]{
color-scheme:dark;
--bg:#111716;
--surface:#19211f;
--text:#f1f3ed;
--muted:#a8b1ad;
--line:#35413d;
--accent:#ff7752;
--accent-ink:var(--accent);
--on-accent:#23382f;
--accent-soft:#43271f;
--danger:#ff9a7e;
--shadow:0 18px 50px #0005}
*{
box-sizing:border-box}
body{
margin:0;
min-height:100dvh;
display:flex;
flex-direction:column;
background:var(--bg);
color:var(--text)}
button,input,select{
font:inherit}
button,input,select,a{
outline-offset:3px}
.site-header{
height:82px;
flex-shrink:0;
display:flex;
align-items:center;
justify-content:space-between;
padding:0 max(var(--page-gutter),calc((100vw - var(--content-width)) / 2));
border-bottom:1px solid var(--line)}
.brand{
font-weight:800;
color:var(--text);
text-decoration:none;
letter-spacing:-.03em}
.brand span{
font-weight:400;
color:var(--muted)}
.preferences,.actions{
display:flex;
gap:8px}
.preferences button,.actions button,.tabs button{
min-height:40px;
font-size:.875rem;
font-weight:600;
line-height:1.4;
border:1px solid var(--line);
background:var(--surface);
color:var(--text);
border-radius:999px;
padding:9px 14px;
cursor:pointer}
main{
width:min(var(--workspace-width),calc(100% - var(--page-gutter) * 2));
flex:1;
margin:0 auto;
padding:clamp(36px,7vw,88px) 0}
.intro-panel,.import-panel{max-width:560px;margin:0 auto}
.intro-panel{padding:clamp(12px,4vw,28px) 0}
.intro-panel h1{font-size:clamp(2.1rem,5vw,3rem);line-height:1.08;max-width:16ch}
.intro-panel>p{max-width:44ch;color:var(--muted);margin:20px 0 28px}
.import-panel{display:block}
.eyebrow{
text-transform:uppercase;
letter-spacing:.13em;
font-size:.76rem;
font-weight:800;
color:var(--accent)}
h1{
font-size:clamp(2.7rem,6vw,5.8rem);
line-height:.94;
letter-spacing:-.065em;
margin:.3em 0;
max-width:12ch}
p{
line-height:1.6}
.import-gate{
min-width:0;
background:var(--surface);
border:1px solid var(--line);
border-radius:20px;
padding:clamp(20px,3vw,32px);
box-shadow:var(--shadow)}
.import-gate>.eyebrow{margin:0 0 20px}
.import-gate h1{font-size:1.5rem;letter-spacing:-.03em;margin:0 0 20px;line-height:1.2;max-width:none}
.import-panel label:not(.check){display:block;font-weight:700;margin-bottom:8px}
.import-panel input[type=url]{width:100%;min-width:0;padding:14px;border:1px solid var(--line);border-radius:10px;background:var(--bg);color:var(--text)}
.import-panel input[aria-invalid=true]{border-color:var(--accent)}
.check{display:flex;gap:10px;align-items:flex-start;margin:18px 0;color:var(--muted);line-height:1.5}
.check input{width:18px;height:18px;flex:0 0 auto;margin:3px 0 0;accent-color:var(--accent)}
.primary{display:block;width:100%;border:0;border-radius:10px;padding:12px 18px;background:var(--accent);color:var(--on-accent);font-weight:800;cursor:pointer;text-align:center;text-decoration:none}
button:disabled{opacity:.65;cursor:wait}
.preferences button{min-width:40px}
.status{min-height:24px;color:var(--accent);line-height:1.5}
.import-gate .status{margin-bottom:0}
.link-help ol{padding-left:24px;line-height:1.6;margin:20px 0}
.link-help li+li{margin-top:12px}
.link-help p{font-size:.9rem;margin:12px 0}
.guide-label{font-weight:700}
.device-note{border-left:3px solid var(--accent);padding-left:12px}
.link-options{margin:10px 0}
.link-options summary{cursor:pointer;min-height:44px;display:list-item;padding:12px 0;line-height:1.5}
.link-options select{width:100%;padding:10px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--text);font:inherit}
.secondary-action{width:100%;min-height:44px;padding:12px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--text);font:inherit;font-weight:700;cursor:pointer}
:is(.primary,.secondary-action,.text-button,.link-options summary,.link-options select):focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.more-help{display:block;width:fit-content;margin:16px 0 24px;color:var(--text);font-size:.9rem;text-underline-offset:3px}
.text-button{border:0;background:none;padding:10px 0;min-height:44px;color:var(--muted);text-decoration:underline;text-underline-offset:3px;font:inherit;cursor:pointer;text-align:left}
.text-button:hover{color:var(--text)}
#import-cancel,#setup-back,#import-back{margin-top:12px}
.import-actions{margin-top:22px}
.link-actions{display:grid;gap:12px}
.mobile-web-guide,.app-backup{display:none}
.mobile-guide-figure{margin:10px 0 18px}
.mobile-guide-figure img{display:block;width:100%;height:auto;border-radius:8px}
.mobile-guide-image{position:relative}
.mobile-calendar-annotation{position:absolute;inset:0;width:100%;height:100%;color:#f05548;pointer-events:none}
.mobile-calendar-annotation>path{fill:none;stroke:currentColor;stroke-width:5;stroke-linecap:round;marker-end:url(#mobile-calendar-arrow)}
.mobile-guide-figure figcaption{margin-top:8px;font-size:.85rem;line-height:1.5;font-weight:600;color:var(--danger);text-align:center}
.app-backup summary{cursor:pointer;min-height:44px;padding:12px 0;color:var(--text);font-size:.9rem;text-decoration:underline;text-underline-offset:3px}
@media(max-width:767px){.mobile-web-guide,.app-backup{display:block}.mobile-web-steps{padding-left:22px!important;margin:16px 0!important}.mobile-web-steps>li+li{margin-top:24px}.mobile-web-steps>li::marker{font-weight:700;color:var(--accent)}#desktop-connect-example,#link-copy-hint{display:none}.app-backup{margin-top:10px}}
/* Equal-level actions share type and height; emphasis comes from fill, border and color. */
:is(.primary,.secondary-action,.text-button,.empty-state button){min-height:50px;font-family:inherit;font-size:1rem;font-weight:600;line-height:1.4}
#import-privacy{font-size:.9rem;line-height:1.6}
.connect-example{margin:0 0 22px}
.connect-example[hidden]{display:none}
.connect-example figcaption{margin-bottom:8px;padding-right:5.5%;font-size:.85rem;font-weight:600;line-height:1.5;text-align:right;color:var(--accent)}
.connect-example-image{position:relative}
.connect-example-image img{display:block;width:100%;height:auto;border-radius:8px}
.connect-annotation{position:absolute;inset:0;width:100%;height:100%;overflow:visible;color:var(--accent);pointer-events:none}
.waitlist-annotation{position:absolute;inset:0;width:100%;height:100%;overflow:visible;color:#f05548;pointer-events:none}
.waitlist-instruction{margin:10px 0 0;padding-right:14%;font-size:.85rem;font-weight:600;line-height:1.5;text-align:right;color:var(--danger)}
.connect-example-note{margin:10px 0 0;font-size:.8rem;line-height:1.5;color:var(--muted)}
.replacement-note{font-size:.9rem;line-height:1.5;border-left:3px solid var(--accent);padding-left:12px;margin:0 0 20px}
.empty-state button{margin-top:14px;border:1px solid var(--line);border-radius:10px;padding:12px 16px;background:var(--surface);color:var(--text);cursor:pointer}
.planner-head{
max-width:var(--content-width);
margin-inline:auto;
display:flex;
justify-content:space-between;
gap:24px;
align-items:start}
.planner-head h1{
font-size:clamp(2.4rem,5vw,4.8rem);
margin:.2em 0}
.muted{
color:var(--muted);
font-size:.9rem}
.danger{
color:var(--danger)!important}
.tabs{
display:flex;
border-bottom:1px solid var(--line);
margin-top:34px}
.tabs button{
min-height:44px;
border:0;
border-radius:0;
background:transparent;
padding:12px 22px}
.tabs button[aria-pressed=true]{
color:var(--accent);
border-bottom:3px solid var(--accent)}
.filters{
display:flex;
gap:14px;
align-items:end;
flex-wrap:wrap;
padding:20px 0}
.filters label{
display:grid;
gap:6px;
font-size:.78rem;
font-weight:700}
.filters>label,.filters>.location-facet{min-width:0}
.filters select,.filters input{
background:var(--surface);
color:var(--text);
border:1px solid var(--line);
border-radius:8px;
padding:9px 34px 9px 12px;
min-height:38px}
.filters input[type=date]{padding-right:10px}
.filters input[type=date]::-webkit-calendar-picker-indicator{margin:0 0 0 6px;cursor:pointer}
.filters select{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%2366706d' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center}
.filters>span{
display:flex;
gap:8px}
.location-facet{position:relative;min-width:155px}
.location-facet[hidden]{display:none}
.location-facet summary{display:grid;gap:6px;list-style:none;cursor:pointer;font-size:.78rem;font-weight:700}
.location-facet .filter-label{font-size:.78rem;font-weight:700}
.location-facet .facet-value{display:block;position:relative;background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:9px 34px 9px 12px;min-height:38px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.location-facet summary::-webkit-details-marker{display:none}
.location-facet .facet-value:after{content:'';position:absolute;right:15px;top:13px;width:7px;height:7px;border-right:1.5px solid var(--muted);border-bottom:1.5px solid var(--muted);transform:rotate(45deg)}
.facet-menu{position:absolute;z-index:1000;top:calc(100% + 4px);left:0;min-width:270px;max-width:min(370px,90vw);max-height:310px;overflow:auto;background:var(--surface);border:1px solid var(--line);border-radius:10px;box-shadow:0 8px 24px #0002;padding:6px}
.single-facet .facet-menu{min-width:210px}
.filters .facet-choice{display:flex;align-items:center;gap:8px;padding:5px 7px;font-size:.78rem;font-weight:500;cursor:pointer}
.filters .facet-choice input{accent-color:var(--accent);margin:0;padding:0;width:16px;height:16px;min-height:16px;flex:none}
.filters .single-facet .facet-choice{width:100%;border:0;background:transparent;color:var(--text);text-align:left;min-height:34px}
.single-facet .facet-choice[aria-pressed=true]{background:var(--accent-soft);color:var(--accent-ink);border-radius:6px;font-weight:700}
.single-facet .facet-choice:hover{background:var(--accent-soft);border-radius:6px}
.facet-count{margin-left:auto;color:var(--muted);font-variant-numeric:tabular-nums}
:is(.location-facet summary,.facet-choice input,.single-facet .facet-choice,.map-detail button,.event-card,.map-dot):focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.notice{
background:var(--accent-soft);
border-radius:10px;
padding:0 14px}
.notice:empty{
display:none}
.calendar-shell{
overflow-x:auto;
overscroll-behavior-x:contain;
touch-action:auto;
border:1px solid var(--line);
border-radius:16px;
background:var(--surface)}
.week-calendar{
--hour-height:64px;
display:grid;
grid-template-columns:64px repeat(var(--day-count),minmax(210px,1fr));
grid-template-rows:64px 1024px;
min-width:calc(64px + var(--day-count) * 210px)}
.calendar-corner,.calendar-day-head{
position:sticky;
top:0;
z-index:4;
display:flex;
align-items:center;
justify-content:center;
background:var(--surface);
border-bottom:1px solid var(--line)}
.calendar-corner{
left:0;
z-index:5;
font-size:.68rem;
font-weight:800;
color:var(--muted)}
.calendar-day-head{
flex-direction:column;
gap:3px;
border-left:1px solid var(--line)}
.calendar-day-head strong{
font-size:.75rem;
text-transform:uppercase;
letter-spacing:.08em}
.calendar-day-head span{
font-size:.78rem;
color:var(--muted)}
.calendar-axis{
position:sticky;
left:0;
z-index:3;
display:grid;
grid-template-rows:repeat(16,var(--hour-height));
background:var(--surface);
border-right:1px solid var(--line)}
.calendar-axis span{
position:relative;
top:-.55em;
padding-right:9px;
text-align:right;
font-size:.67rem;
color:var(--muted)}
.calendar-day-track{
position:relative;
border-left:1px solid var(--line);
background:repeating-linear-gradient(to bottom,transparent 0,transparent calc(var(--hour-height) - 1px),var(--line) calc(var(--hour-height) - 1px),var(--line) var(--hour-height))}
.calendar-day-track:after{
content:"";
position:absolute;
inset:0;
pointer-events:none;
background:repeating-linear-gradient(to bottom,transparent 0,transparent calc(var(--hour-height) / 2 - 1px),color-mix(in srgb,var(--line) 45%,transparent) calc(var(--hour-height) / 2 - 1px),color-mix(in srgb,var(--line) 45%,transparent) calc(var(--hour-height) / 2))}
.event-card.calendar-event{
position:absolute;
z-index:2;
top:var(--event-top);
left:calc(var(--lane) * (100% / var(--lane-count)) + 3px);
width:calc(100% * var(--lane-span,1) / var(--lane-count) - 6px);
height:var(--event-height);
min-height:38px;
overflow:hidden;
display:flex;
flex-direction:column;
align-items:stretch;
gap:3px;
margin:0;
padding:6px 7px;
border-color:var(--line);
background:var(--calendar-status-bg,var(--surface));
box-shadow:none}
.calendar-event:not([data-status]){--calendar-status-bg:#edf8f1}
[data-theme=dark] .calendar-event:not([data-status]){--calendar-status-bg:#1c302a}
.calendar-event[data-status=waitlist]{--calendar-status-color:#776024;--calendar-status-bg:#faf3e2}
.calendar-event[data-status=pending]{--calendar-status-color:#9b5a00;--calendar-status-bg:#fff5de}
[data-theme=dark] .calendar-event[data-status=waitlist]{--calendar-status-color:#e3cf98;--calendar-status-bg:#302b20}
[data-theme=dark] .calendar-event[data-status=pending]{--calendar-status-color:#e5c477;--calendar-status-bg:#302b1d}
.event-card.calendar-event .calendar-event-status{color:var(--calendar-status-color,var(--text));font-size:.625rem;line-height:1.2;font-weight:400;letter-spacing:0;text-transform:none;flex-shrink:0}
.event-card.calendar-event .calendar-event-title{display:block;min-width:0;min-height:0;overflow:hidden;font-size:.75rem;font-weight:400;line-height:1.35;overflow-wrap:break-word;flex:1}
.calendar-event-time{flex-shrink:0;font-weight:400;display:block;overflow:hidden;white-space:normal;color:var(--text);font-size:.625rem;line-height:1.25}
.list-board{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(230px,1fr);gap:12px;overflow-x:auto;padding-bottom:8px}
.list-day{min-width:0;padding:10px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.list-day-heading{position:sticky;top:0;z-index:1;margin:0 0 10px;padding:4px 2px 9px;background:var(--surface);font-size:.9rem}
.list-day .event-card{width:100%;margin-bottom:8px}
.list-day-empty{margin:8px 2px;color:var(--muted);font-size:.8rem}
.calendar-day-empty{
display:block;
padding:18px 8px;
text-align:center;
font-size:.72rem;
color:var(--muted)}
.event-card{
display:grid;
gap:7px;
width:100%;
text-align:left;
border:1px solid var(--line);
background:var(--surface);
color:var(--text);
border-radius:12px;
padding:14px;
margin:6px 0;
cursor:pointer}
.event-card:hover{
border-color:var(--accent);
transform:translateY(-1px)}
.badge{
width:max-content;
text-transform:uppercase;
font-size:.68rem;
font-weight:800;
letter-spacing:.08em;
color:var(--muted)}
.badge[data-status=waitlist]{color:#776024}
[data-theme=dark] .badge[data-status=waitlist]{color:#e3cf98}
[data-theme=dark] .badge[data-status=pending]{color:#e5c477}
.badge[data-status=pending]{
color:#9b5a00}
.location-badge{
width:max-content;
border:1px solid color-mix(in srgb,var(--accent) 45%,var(--line));
border-radius:999px;
padding:3px 7px;
background:var(--accent-soft);
color:var(--accent-ink);
font-size:.66rem;
font-weight:800}
.event-list{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
gap:10px}
.empty-state{
padding:80px 20px;
text-align:center;
color:var(--muted);
border:1px dashed var(--line);
border-radius:16px}
.map-layout{
display:grid;
grid-template-columns:minmax(0,1.4fr) minmax(280px,.6fr);
gap:16px}
.map-results{grid-column:1/-1;margin:0;color:var(--muted);font-size:.8rem;font-weight:700}
.map-panel{
min-width:0;position:relative}
.map-layout .event-list{
display:block;
max-height:620px;
overflow:auto}
.map-canvas{
height:620px;
position:relative;
overflow:hidden;
border:1px solid var(--line);
border-radius:18px;
background:#eae3d3}
.map-canvas .leaflet-control-zoom a{color:#23382f}
.map-canvas .leaflet-tile{filter:sepia(.16) saturate(.78) brightness(1.04)}
.map-canvas:before,.map-canvas:after{
content:"";
position:absolute;
background:var(--line);
opacity:.5}
.map-canvas:before{
width:130%;
height:1px;
left:-10%;
top:48%;
transform:rotate(-18deg)}
.map-canvas:after{
width:1px;
height:130%;
left:57%;
top:-10%;
transform:rotate(15deg)}
.map-pin{
position:absolute;
z-index:2;
transform:translate(-50%,-50%);
border:3px solid var(--surface);
border-radius:50%;
background:var(--accent);
color:var(--accent);
width:24px;
height:24px;
box-shadow:0 3px 12px #0004;
cursor:pointer}
.map-count-marker{
display:flex!important;
align-items:center;
justify-content:center;
border:3px solid var(--surface);
border-radius:50%;
background:var(--accent);
color:white;
font-size:.78rem;
font-weight:800;
box-shadow:0 3px 12px #0005}
.map-count-marker-area{
background:var(--surface);
color:var(--accent);
border-color:var(--accent)}
.map-dot{border:3px solid white;border-radius:50%;background:var(--accent);box-shadow:0 2px 8px #0005}
.map-dot.is-selected{outline:4px solid #23382f;outline-offset:2px}
.leaflet-tooltip.map-dot-tooltip{width:min(270px,75vw);padding:10px 12px;background:#23382f;color:#fff;border:0;border-radius:8px;box-shadow:0 4px 16px #0004;white-space:normal;opacity:1}
.leaflet-tooltip.map-dot-tooltip:before{border-top-color:#23382f!important}
.map-dot-hint{display:grid;gap:6px;min-width:0;font-size:.82rem;line-height:1.35}
.map-dot-hint strong{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}
.map-dot-hint-time{color:#b8cbc1;font-weight:600}
.map-detail{position:absolute;z-index:700;top:18px;left:18px;width:min(330px,calc(100% - 36px));max-height:calc(100% - 36px);overflow:auto;background:var(--surface);color:var(--text);border:0;border-radius:14px;box-shadow:0 12px 28px #0004;padding:18px}
.map-detail[hidden]{display:none}
.map-detail-content{display:contents}
.map-detail h3{font-size:1.2rem;line-height:1.28;letter-spacing:-.02em;margin:4px 30px 14px 0;overflow-wrap:anywhere}
.map-detail p{margin:0 0 14px;line-height:1.55;white-space:pre-wrap;font-size:.84rem;overflow-wrap:anywhere}
.map-detail-facts{display:grid;gap:4px;margin-bottom:17px;font-size:.84rem;line-height:1.45}
.map-detail-location{display:flex;align-items:start;gap:5px;color:var(--muted);margin-top:5px;overflow-wrap:anywhere}
.map-detail-location span{min-width:0}
.map-detail-close{position:absolute;top:4px;right:4px;width:44px;height:44px;border:0;border-radius:8px;background:transparent;color:var(--muted);font-size:1.4rem;line-height:1;cursor:pointer}
.map-detail-close:hover,.map-detail-edit:hover{background:var(--bg);color:var(--accent)}
.map-detail-more{display:block;min-height:32px;margin:-5px 0 12px;border:0;background:none;color:var(--muted);padding:3px 0;font-size:.875rem;font-weight:600;line-height:1.4;text-align:left;cursor:pointer}
.map-detail-more:hover{text-decoration:underline;text-underline-offset:3px}
.detail-show-more{display:block;min-height:32px;margin:-6px 0 16px;padding:4px 0;border:0;background:none;color:var(--muted);font-size:.875rem;font-weight:600;line-height:1.4;cursor:pointer}
.detail-show-more[hidden]{display:none}
.detail-show-more:hover{text-decoration:underline;text-underline-offset:3px}
.map-detail-edit{display:inline-grid;place-items:center;flex:none;width:44px;height:44px;margin-top:-11px;border:0;border-radius:8px;background:transparent;color:var(--muted);cursor:pointer}
.map-detail-link{display:block;width:max-content;max-width:100%;color:var(--accent);font-size:.82rem;font-weight:800;text-decoration:underline;text-underline-offset:3px}
.map-panel .leaflet-top.leaflet-left{left:auto;right:0}
/* Map/List cards share a restrained surface; Calendar retains its own event colors. */
:is(.map-layout,.list-board) .event-card{background:color-mix(in srgb,var(--surface) 80%,var(--line));border-color:var(--line);box-shadow:none}
:is(.map-layout,.list-board) .event-card>strong{font-size:1rem;font-weight:650;line-height:1.35;overflow-wrap:anywhere}
:is(.map-layout,.list-board) .event-card .event-time,:is(.map-layout,.list-board) .event-card .event-location{font-size:.82rem;line-height:1.45;overflow-wrap:anywhere}
:is(.map-layout,.list-board) .event-card:hover{border-color:var(--muted);transform:none}
:is(.map-layout,.list-board) .event-card.is-selected{background:#e7efe5;border-color:#abc0aa;box-shadow:none}
[data-theme=dark] :is(.map-layout,.list-board) .event-card.is-selected{background:#24392f;border-color:#627e6b}
.card-location-hint{font-size:.72rem;font-weight:500;line-height:1.4;color:var(--muted)}
.map-canvas.leaflet-container:before,.map-canvas.leaflet-container:after{
display:none}
.map-privacy,.map-coverage{
margin:8px 4px 0;
font-size:.78rem;
line-height:1.45;
color:var(--muted)}
.map-coverage{
font-weight:700;
color:var(--text)}
.map-empty{
position:absolute;
z-index:2;
left:16px;
right:16px;
background:var(--surface);
border:1px solid var(--line);
border-radius:10px;
padding:10px;
font-size:.78rem;
color:var(--muted)}
.map-empty{
top:40%;
bottom:auto;
text-align:center}
.map-event-chooser{
display:grid;
gap:8px;
color:#23382f}
.map-event-chooser-title{
line-height:1.35}
.map-event-choices{
display:grid;
gap:6px}
.map-event-choices button{
display:grid;
gap:3px;
width:100%;
border:1px solid #d7ddd3;
border-radius:8px;
background:#fffdf8;
color:#23382f;
padding:8px 10px;
text-align:left;
cursor:pointer}
.map-event-choices button .muted{
font-size:.7rem;
color:#55665c}
.map-event-choices button:hover,.map-event-choices button:focus-visible{
border-color:#bc4b2d}
dialog{
position:fixed;
inset:calc(16px + env(safe-area-inset-top,0px)) calc(16px + env(safe-area-inset-right,0px)) calc(16px + env(safe-area-inset-bottom,0px)) calc(16px + env(safe-area-inset-left,0px));
margin:auto;
width:560px;
max-width:calc(100% - 32px - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px));
height:fit-content;
max-height:calc(100dvh - 32px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));
overflow:auto;
overscroll-behavior:contain;
border:1px solid var(--line);
border-radius:18px;
background:var(--surface);
color:var(--text);
padding:28px;
box-shadow:0 30px 100px #0005}
dialog::backdrop{
background:#07110d99}
.close{
position:absolute;
top:14px;
right:14px;
width:44px;
height:44px;
border:0;
background:transparent;
color:var(--muted);
font-size:2rem;
cursor:pointer}
dialog a{
color:var(--accent);
font-weight:700}
#detail-time span{display:block}
.detail-status-slot{display:block;min-height:14px;line-height:14px;margin:0 44px 0 0}
.detail-status-slot[data-empty=true]{visibility:hidden}
#detail-title{margin:4px 40px 18px 0;line-height:1.25}
.detail-location{
line-height:1.7;
overflow-wrap:anywhere}
.location-edit{
display:inline-flex;
align-items:center;
justify-content:center;
vertical-align:middle;
width:32px;
height:32px;
margin-left:6px;
padding:0;
border:0;
border-radius:6px;
background:transparent;
color:var(--muted);
cursor:pointer}
.location-edit:hover{
background:var(--bg);
color:var(--accent)}
.location-edit:focus-visible{
outline:2px solid var(--accent);
outline-offset:2px}
.location-edit[hidden]{
display:none}
.detail-location-source:has(.location-badge:not([hidden])){
margin-top:8px}
.location-form{
display:grid;
gap:8px;
margin:14px 0;
padding:14px;
border:1px solid var(--line);
border-radius:12px;
background:var(--bg)}
.location-form[hidden]{
display:none}
.location-form label{
font-size:.78rem;
font-weight:800}
.location-form input{
width:100%;
border:1px solid var(--line);
border-radius:8px;
background:var(--surface);
color:var(--text);
padding:10px}
.location-form .status{
margin:0;
min-height:1.25em;
font-size:.76rem}
.location-actions{
display:flex;
gap:8px;
flex-wrap:wrap}
.location-actions button{
min-height:40px;
font-size:.875rem;
font-weight:600;
line-height:1.4;
border:1px solid var(--line);
border-radius:8px;
background:var(--surface);
color:var(--text);
padding:8px 10px;
cursor:pointer}
.location-actions button[type=submit]{
border-color:var(--accent);
background:var(--accent);
color:var(--on-accent)}
@media(max-width:800px){
.import-gate{width:100%}
.planner-head{
display:block}
.actions{
flex-wrap:wrap}
.map-layout{
grid-template-columns:1fr}
.map-canvas{
height:420px}
.map-layout .event-list{
max-height:none}
.map-detail{--map-detail-available:calc(100dvh - 32px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));position:fixed;top:auto;bottom:calc(16px + env(safe-area-inset-bottom,0px));left:max(16px,env(safe-area-inset-left,0px));right:max(16px,env(safe-area-inset-right,0px));width:auto;max-height:min(60dvh,var(--map-detail-available));z-index:1200;display:flex;flex-direction:column;overflow:hidden;padding-top:48px;overflow-anchor:none}
.map-detail[data-expanded=true],.map-detail.is-resizing{max-height:var(--map-detail-available)}
.map-detail-content{display:block;min-height:0;overflow:auto;overscroll-behavior:contain;overflow-anchor:none;scrollbar-gutter:stable}
.list-board{display:grid;grid-auto-flow:row;grid-auto-columns:auto;overflow:visible}
}
@media(max-width:520px){
main{
width:calc(100% - var(--page-gutter) * 2);
padding-top:36px}
.site-header{
padding:0 var(--page-gutter)}
.preferences button{
padding:8px}
.filters{
display:grid;
grid-template-columns:1fr 1fr;
gap:8px;
padding:12px 0}
.location-facet summary,.filters label{gap:4px}
.filters select,.filters input{
width:100%}
.location-facet{min-width:0}
.location-facet summary{max-width:none}
.facet-menu{max-width:calc(100vw - 48px)}
#condition-facet .facet-menu,#status-facet .facet-menu,.single-facet .facet-menu{min-width:0;width:100%}
.filters>span{
grid-column:1/-1}
.actions button{
flex:none;
padding:8px 12px}
.tabs button{
flex:1;
padding:14px 8px}
}

/* The gate's small labels and actions retain readable contrast in both themes. */
#import-panel #gate-step{color:var(--text)}
.import-gate .primary,.intro-panel .primary{background:var(--accent);color:var(--on-accent)}
.import-gate .status{color:#a43b1e}
[data-theme=dark] .import-gate .primary,[data-theme=dark] .intro-panel .primary{background:var(--accent);color:var(--on-accent)}
[data-theme=dark] .import-gate .status{color:#ff9a7e}

.detail-time-row{display:flex;align-items:flex-start;justify-content:space-between;gap:8px 16px;flex-wrap:wrap;margin:14px 0}
.detail-time-row>p{margin:0;flex:1 1 175px}
.event-time-copy span{display:block}
.registration-control{display:flex;align-items:center;gap:4px;flex-wrap:wrap;margin:0;padding:0}
.waitlist-toggle{display:flex;align-items:center;gap:6px;min-height:32px;font-size:.78rem;font-weight:500;color:var(--muted);cursor:pointer;white-space:nowrap}
.waitlist-toggle input{width:16px;height:16px;margin:0;accent-color:var(--accent)}
.waitlist-help{position:relative;color:var(--muted);font-size:.78rem;line-height:1.5}
.waitlist-help-button{position:relative;display:grid;place-items:center;width:32px;height:32px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--muted);font-size:11px;line-height:1;cursor:pointer}
.waitlist-help-button::before{content:"";position:absolute;inset:7px;border:1px solid currentColor;border-radius:50%;pointer-events:none}
.waitlist-help-button:hover,.waitlist-help-button[aria-expanded=true]{background:var(--bg);color:var(--text)}
.waitlist-help-button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.waitlist-help .waitlist-hint{position:absolute;z-index:6;right:0;top:100%;width:min(260px,calc(100vw - 80px));margin:0;padding:12px;background:var(--surface);border:1px solid var(--line);border-radius:8px;box-shadow:var(--shadow);font-size:.78rem;line-height:1.5;color:var(--muted)}
.waitlist-hint[hidden]{display:none}
.waitlist-error{flex-basis:100%;font-size:.8rem;margin:8px 0 0;min-height:0}
.waitlist-error:empty{display:none}
.status-choice:focus-visible{outline:3px solid var(--accent);outline-offset:2px}

/* Shared date navigation across Calendar, Map and List. */
.date-navigation{max-width:1280px;margin:0 auto;padding:0}
.date-scopes{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}
.date-navigation button,.date-navigation summary{border:1px solid var(--line);background:var(--surface);color:var(--text);padding:9px 14px;cursor:pointer;min-height:44px;font-family:inherit;font-size:.875rem;font-weight:600;line-height:1.4;border-radius:8px}
.date-navigation button[aria-pressed=true]{background:var(--accent);color:var(--on-accent);border-color:var(--accent)}
.date-heading-row{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:60px}
#date-heading{margin:0;font-size:1.35rem;line-height:1.3;text-align:left}
.date-tools{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-left:auto}
.date-tools .tabs{padding:0;margin:0;gap:4px;max-width:none}
.date-tools #timezone-facet{min-width:72px}
.date-tools #timezone-summary{padding:10px 28px 10px 12px}
.date-strip-row{display:flex;align-items:center;gap:8px;margin:12px 0}
.date-strip{display:flex;gap:8px;overflow-x:auto;flex:1;min-width:0;scrollbar-width:thin}
.date-strip button{flex:1 0 96px;white-space:nowrap}
.date-strip-row>button{flex:0 0 44px;padding:8px}
.date-navigation button:disabled{cursor:default;opacity:.35}
@media(max-width:600px){.date-heading-row{flex-wrap:wrap;gap:10px}.date-tools{flex-wrap:wrap;gap:8px}.date-tools .tabs button{padding:9px 10px}.date-scopes{gap:6px}.date-scopes button{padding:9px 10px}.date-strip button{flex-basis:100px}}
.week-calendar{grid-template-rows:64px calc(var(--calendar-hours,16) * 64px + var(--all-day-height,0px))}
.calendar-axis{grid-template-rows:repeat(var(--calendar-hours,16),var(--hour-height));padding-top:var(--all-day-height,0px)}
.calendar-event{margin-top:var(--all-day-height,0px)}
.calendar-all-day{position:relative;z-index:3;height:var(--all-day-height);overflow-y:auto;background:var(--surface);border-bottom:1px solid var(--line)}
.calendar-all-day .event-card{padding:6px;font-size:.75rem}
.date-tools .facet-choice{display:block;width:100%;border:0;text-align:left;background:var(--surface);color:var(--text);padding:8px 12px}
.date-tools .facet-choice[aria-pressed=true]{background:var(--accent-soft);color:var(--accent-ink)}

.date-tools .tabs{border:0}.date-tools .tabs button{border:1px solid var(--line)}
.date-navigation button:hover:not(:disabled){border-color:var(--muted)}
.date-navigation :is(button,summary):focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.planner-head .actions button{border-radius:8px;min-height:44px}
@media(max-width:600px){.date-heading-row{display:grid;grid-template-columns:1fr}.date-tools{width:auto;justify-self:end;flex-wrap:nowrap}.date-tools .tabs{flex-wrap:nowrap}.date-tools .tabs button{padding:9px 10px}.date-tools #timezone-facet{min-width:64px}.date-tools #timezone-summary{padding:10px 24px 10px 10px}}
.date-tools #timezone-summary{border:0;padding:0;min-height:44px}
.date-tools #timezone-value{min-height:44px;padding:11px 28px 9px 12px;font-size:.875rem}
.date-tools #timezone-value:after{right:11px;top:16px}
.date-tools #timezone-options{left:auto;right:0;min-width:96px}
.event-card.calendar-event{top:calc(var(--event-top) + var(--all-day-height,0px))}
.calendar-day-track{background-position:0 var(--all-day-height,0px)}
.calendar-day-track:after{top:var(--all-day-height,0px)}

/* Date cards, full-width views and shared range toolbar. */
.date-scopes button{border-radius:999px}
.date-strip-row{margin:24px 0 20px}
.date-strip{padding:4px}
.date-strip .date-card{display:flex;flex-direction:column;align-items:center;gap:2px;flex:1 0 80px;padding:12px 8px;background:transparent;border-color:transparent;font-weight:400}
.date-card-number{font-size:1.8rem;font-weight:600;line-height:1.3}
.date-strip .date-card[aria-pressed=true]{background:transparent;color:var(--text);border-color:var(--accent)}
.date-navigation>.tabs{margin:0;gap:0}
.date-navigation>.tabs button{flex:1;border:0;border-bottom:3px solid transparent;border-radius:0;background:transparent;color:var(--muted);padding:16px 8px;font-size:1rem}
.date-navigation>.tabs button[aria-pressed=true]{background:transparent;color:var(--accent);border-bottom-color:var(--accent)}
.date-heading-row{min-height:88px}
.date-tools{flex-shrink:0;gap:10px}
.date-tools .location-facet{min-width:0}
.date-tools .location-facet summary{border:0;padding:0;min-height:44px;background:transparent}
.date-tools .facet-value{min-height:44px;padding:11px 28px 9px 12px;font-size:.875rem;border-radius:999px;max-width:180px}
.date-tools .facet-value:after{right:11px;top:16px}
.date-tools .facet-menu{left:auto;right:0;min-width:96px}
.date-tools #status-options{min-width:190px;width:max-content}
.date-tools #status-options .facet-choice{display:flex;align-items:center;gap:8px;font-size:.875rem;font-weight:400;cursor:pointer}
.date-tools #status-options input{accent-color:var(--accent);width:16px;height:16px;margin:0}
.date-arrows{display:flex;gap:4px}
.date-arrows button{width:40px;padding:0;font-size:1.5rem;border-radius:999px}
@media(max-width:600px){
.date-strip .date-card{flex-basis:64px;padding:10px 6px}
.date-heading-row{display:flex;flex-wrap:nowrap;gap:8px;align-items:center;padding:14px 0}
#date-heading{font-size:1rem;flex:1;min-width:0}
.date-tools{gap:4px}.date-tools .facet-value{padding-left:8px;max-width:90px;font-size:.75rem}
.date-arrows{gap:0}.date-arrows button{width:32px;min-width:32px}
}
.date-arrows button{border:0;border-radius:0;background:transparent}
.date-tools #custom-range{display:flex;align-items:center;gap:8px}
.date-tools #custom-range[hidden],.date-strip-row[hidden]{display:none}
#custom-range label{display:flex;align-items:center;gap:6px;font-size:.78rem;font-weight:600}
#custom-range input{min-width:0;max-width:145px;min-height:44px;padding:8px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--text);font:inherit}
@media(max-width:800px){.date-heading-row:has(#custom-range:not([hidden])){flex-wrap:wrap}.date-tools:has(#custom-range:not([hidden])){flex-wrap:wrap;width:100%}.date-tools #custom-range{flex-basis:100%;justify-content:flex-end}#custom-range input{max-width:125px}}
.date-arrows button{display:inline-flex;align-items:center;justify-content:center;min-width:40px;min-height:44px;color:var(--muted)}
.date-arrows button:hover:not(:disabled){background:var(--line);border-radius:8px;color:var(--text)}
/* Shared compact controls use one size in every viewport. */
.date-tools :is(#status-value,#timezone-value){box-sizing:border-box;display:flex;align-items:center;height:44px;min-height:44px;padding:0 28px 0 12px;font-size:.875rem;font-weight:600;line-height:1.4;max-width:150px}
.date-tools :is(#status-facet,#timezone-facet){min-width:0}
.date-tools :is(#status-value,#timezone-value):after{top:16px;right:11px}
.date-strip .date-card[aria-pressed=true]{background:var(--accent);color:var(--on-accent);border-color:var(--accent)}
.date-tools #custom-range{flex-basis:auto}
#week-picker-trigger{border-radius:999px;white-space:nowrap}
#week-picker{width:min(350px,calc(100vw - 32px));padding:16px;background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:16px}
#week-picker::backdrop{background:#0004}
.week-picker-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.week-picker-head h2{font-size:1rem;margin:0}
#week-picker button{font:inherit;color:inherit;cursor:pointer;min-height:40px;background:transparent;border:0;border-radius:8px}
.week-picker-head button{width:40px;font-size:1.5rem}
#week-picker-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));margin:12px 0;gap:2px}
.week-picker-weekday{text-align:center;font-size:.75rem;padding:8px 0;color:var(--muted)}
#week-picker .week-picker-day[aria-pressed=true]{background:var(--accent);color:var(--on-accent)}
.week-picker-day[data-outside=true]:not([aria-pressed=true]){color:var(--muted)}
#week-picker button:hover{background:var(--accent-soft)}
#week-picker button:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
@media(max-width:600px){.date-tools{gap:2px}.date-tools :is(#status-value,#timezone-value){padding-left:10px;max-width:100px}.date-arrows button{min-width:32px;width:32px}}
#planner-actions{position:relative}
body:not([data-screen=planner]) #planner-actions{display:none}
#planner-actions summary{display:flex;align-items:center;justify-content:center;list-style:none;cursor:pointer;width:40px;height:40px;border:1px solid var(--line);border-radius:999px;background:var(--surface);font-size:24px;line-height:1}
#planner-actions summary::-webkit-details-marker{display:none}
#planner-actions .actions{position:absolute;z-index:1100;right:0;top:calc(100% + 8px);display:flex;flex-direction:column;align-items:stretch;gap:0;min-width:200px;padding:6px;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:0 8px 24px #0002}
#planner-actions .actions button{border:0;border-radius:6px;text-align:left;min-height:44px;padding:10px 12px;background:transparent;white-space:nowrap}
#planner-actions .actions button:hover{background:var(--bg)}
#planner-actions #clear{border-top:1px solid var(--line);border-radius:0;margin-top:4px}
#planner-actions summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
/* Desktop keeps the selectors and navigation at the right. */
.date-heading-row>.date-arrows{order:2}
.date-heading-row>.date-tools{order:1}
@media(max-width:800px){
.date-heading-row,.date-heading-row:has(#custom-range:not([hidden])){display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center}
#date-heading{grid-column:1;grid-row:1}
.date-heading-row>.date-arrows{grid-column:2;grid-row:1;justify-self:end}
.date-tools,.date-tools:has(#custom-range:not([hidden])){display:flex;grid-column:1/-1;grid-row:2;justify-self:start;justify-content:flex-start;flex-wrap:wrap;width:100%;margin:0;gap:8px}
.date-tools #custom-range{flex-basis:auto;justify-content:flex-start}
}
@media(min-width:801px){
.date-heading-row>#date-heading{margin-right:auto}
.date-heading-row>.date-tools{display:contents}
.date-tools #custom-range{order:1}
.date-heading-row>.date-arrows{order:2}
.date-tools #status-facet{order:3}
.date-tools #timezone-facet{order:4}
}
/* Keep dropdown labels separate from their fixed disclosure glyph. */
.date-tools #status-value{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:42px}
.week-calendar.has-all-day{grid-template-rows:64px auto calc(var(--calendar-hours,16) * 64px)}
.all-day-label{grid-row:2;grid-column:1;position:sticky;left:0;z-index:3;background:var(--surface);font-size:.68rem;color:var(--muted);padding:10px 6px;text-align:center;border-bottom:1px solid var(--line)}
.all-day-band{grid-row:2;grid-column:2/-1;display:grid;grid-template-columns:repeat(var(--day-count),minmax(0,1fr));grid-template-rows:repeat(var(--all-day-lanes),28px);gap:4px 0;padding:6px 0;border-bottom:1px solid var(--line);background:var(--surface)}
.all-day-band .all-day-bar{min-width:0;min-height:0;margin:0 3px;padding:3px 8px;border-radius:5px;background:#edf8f1;border:1px solid var(--line);color:var(--text);font-size:.75rem;line-height:20px;display:block;text-align:left}
.all-day-title{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:400}
.all-day-band .all-day-bar[data-status=pending]{background:var(--accent-soft)}
.all-day-band .all-day-bar[data-status=waitlist]{border-style:dashed}
[data-theme=dark] .all-day-band .all-day-bar{background:var(--surface)}
.date-tools #status-value{max-width:150px}

/* Dense calendar groups preserve readable titles and an explicit overflow entry. */
.event-card.calendar-event .calendar-event-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:var(--title-lines,2);text-overflow:ellipsis;flex:none;overflow-wrap:anywhere}
.calendar-event-time,.event-card.calendar-event .calendar-event-status{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.event-card.calendar-more{justify-content:center;font-weight:400;font-size:.75rem;overflow-wrap:anywhere;background:var(--surface)}
.overlap-dialog .event-card{width:100%;margin-bottom:10px}
.overlap-dialog .event-card strong{overflow-wrap:anywhere}
