:root{--ink:#25231f;--paper:#f8f5ef;--card:#fffdf8;--line:#dcd5c9;--accent:#d95f3b;--muted:#746f67;--green:#396b52}*{box-sizing:border-box}html,body{height:100%;margin:0}body{font-family:Inter,"PingFang SC","Microsoft YaHei",sans-serif;color:var(--ink);background:var(--paper)}button,input,textarea{font:inherit}button{cursor:pointer;border:1px solid var(--line);background:var(--card);color:var(--ink);border-radius:10px;padding:.65rem .9rem}button:hover{border-color:#aaa}.primary{background:var(--ink);border-color:var(--ink);color:white;font-weight:650}.icon-button{width:42px;height:42px;padding:0;font-size:1.25rem}.hidden{display:none!important}.eyebrow{font-size:.875rem;letter-spacing:.19em;font-weight:750;color:var(--accent)}h1,h2,p{margin:0}.centered{min-height:100%;display:grid;place-items:center;padding:1.5rem;background:radial-gradient(circle at 20% 10%,#f1d8c6,transparent 38%),var(--paper)}.login-card{width:min(100%,390px);padding:2.2rem;background:var(--card);border:1px solid var(--line);border-radius:22px;box-shadow:0 24px 70px #4d352315}.login-card h1{font-family:Georgia,"Songti SC",serif;font-size:2.2rem;margin:.35rem 0 .4rem}.login-card p{color:var(--muted);margin-bottom:1.6rem}label{display:grid;gap:.45rem;font-size:.875rem;font-weight:650;margin:1rem 0}input,textarea{width:100%;border:1px solid var(--line);border-radius:10px;padding:.78rem;background:white;color:var(--ink);outline:none}input:focus,textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px #d95f3b18}textarea{min-height:84px;resize:vertical}.login-card button{width:100%;margin-top:.5rem}.error{color:#a93226!important;font-size:.875rem!important;margin:.8rem 0 0!important;min-height:1em}#app-view{height:auto;min-height:100%;display:flex;flex-direction:column}header{height:74px;padding:0 22px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);background:var(--paper)}header h1{font-family:Georgia,"Songti SC",serif;font-size:1.45rem}.header-actions{display:flex;gap:.5rem;align-items:center}.workspace{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 390px}.map-shell{position:relative;min-width:0;min-height:300px}#map{width:100%;height:100%;min-height:300px;background:#e9e4da}.map-status{position:absolute;top:12px;left:50%;z-index:5;transform:translateX(-50%);max-width:calc(100% - 24px);padding:.45rem .7rem;border:1px solid var(--line);border-radius:999px;background:#fffdf8e8;box-shadow:0 3px 14px #39291818;color:var(--muted);font-size:.875rem;white-space:nowrap}.map-status[data-state="ready"]{color:var(--green)}.map-status[data-state="error"]{color:#a93226;border-color:#d8aaa5;white-space:normal}aside{min-height:0;border-left:1px solid var(--line);display:flex;flex-direction:column;background:var(--paper)}.list-heading{padding:1rem 1.1rem;display:flex;justify-content:space-between;border-bottom:1px solid var(--line)}.list-heading span{color:var(--muted);font-size:.875rem}.restaurant-list{overflow:auto;padding:.8rem;display:grid;gap:.7rem}.restaurant-card{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:1rem;transition:.15s}.restaurant-card:hover,.restaurant-card.active{border-color:var(--accent);box-shadow:0 6px 25px #59351e12}.card-top{display:flex;justify-content:space-between;gap:1rem}.restaurant-card h3{margin:0 0 .2rem;font-size:1rem}.tag{font-size:.875rem;color:var(--green);background:#e5efe9;padding:.25rem .5rem;border-radius:20px;white-space:nowrap;height:max-content}.address,.meta,.note{font-size:.875rem;color:var(--muted);margin:.3rem 0}.note{color:var(--ink);padding:.55rem 0}.votes{display:flex;gap:.35rem;flex-wrap:wrap;margin-top:.65rem}.votes button{font-size:.875rem;padding:.4rem .55rem}.votes button.selected{background:var(--ink);color:#fff}.card-actions{display:flex;justify-content:flex-end;gap:.35rem;margin-top:.65rem}.card-actions button,.card-actions a{font-size:.875rem;color:var(--muted);padding:.2rem .35rem;text-decoration:none;border:0;background:none}.empty{margin:auto;display:grid;text-align:center;gap:.4rem;color:var(--muted)}.empty b{color:var(--ink)}.warning{padding:.7rem 1rem;background:#fff1c9;border-bottom:1px solid #e6ca7e;font-size:.875rem}dialog{width:min(92vw,560px);max-height:85vh;border:1px solid var(--line);border-radius:18px;background:var(--paper);padding:1.25rem;box-shadow:0 30px 90px #1e171344}dialog::backdrop{background:#211b1788;backdrop-filter:blur(3px)}.dialog-head{display:flex;justify-content:space-between;align-items:flex-start}.dialog-head h2{font-family:Georgia,"Songti SC",serif;margin-top:.2rem}.search-results{max-height:45vh;overflow:auto;display:grid;gap:.45rem}.search-result{display:block;text-align:left;padding:.8rem;background:var(--card)}.search-result b,.search-result span{display:block}.search-result span{font-size:.875rem;color:var(--muted);margin-top:.22rem}.selected-poi{padding:.8rem;border-left:3px solid var(--accent);background:var(--card)}.form-actions{display:flex;justify-content:flex-end;gap:.5rem}.toast{pointer-events:none;position:fixed;left:50%;bottom:26px;transform:translateX(-50%);background:var(--ink);color:white;padding:.7rem 1rem;border-radius:10px;z-index:50;font-size:.875rem}.amap-logo,.amap-copyright{opacity:.7}@media(max-width:760px){header{height:66px;padding:0 12px}.header-actions{gap:.3rem}.header-actions .primary{font-size:.875rem;padding:.6rem}.workspace{display:flex;flex-direction:column}.map-shell{height:47%;min-height:240px;flex:none}#map{min-height:240px}aside{flex:1;border-left:0;border-top:1px solid var(--line);min-height:0}.restaurant-list{padding:.65rem}.list-heading{padding:.7rem 1rem}.eyebrow{font-size:.875rem}header h1{font-size:1.25rem}}

.brand{color:inherit;text-decoration:none}.page-shell{width:min(100% - 2rem,1100px);margin:0 auto;padding:2rem 0}.section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:1rem}.section-heading h2{font-family:Georgia,"Songti SC",serif;font-size:clamp(1.7rem,4vw,2.5rem);margin:.3rem 0}.plan-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:.8rem}.plan-card{display:grid;gap:.65rem;padding:1rem;border:1px solid var(--line);border-radius:14px;background:var(--card);color:inherit;text-decoration:none;box-shadow:0 8px 25px #59351e0a;transition:.15s}.plan-card:hover{border-color:var(--accent);transform:translateY(-1px)}.plan-card h3{margin:0;font-family:Georgia,"Songti SC",serif}.plan-card p,.plan-card small{color:var(--muted);line-height:1.45}.archive-panel,.secondary-surface{margin-top:1.5rem;border-top:1px solid var(--line);padding-top:1rem}.archive-panel>summary,.secondary-surface>summary{cursor:pointer;font-weight:700;color:var(--muted)}.archive-panel .plan-grid{margin-top:1rem}.secondary-surface .library-head{display:flex;align-items:flex-end;justify-content:space-between;margin:1rem 0}.secondary-surface .library-head h2{font-family:Georgia,"Songti SC",serif;margin:.2rem 0}.library-filter{max-width:420px;margin:.5rem 0 1rem}.library-filter input{margin-top:.1rem}select{width:100%;border:1px solid var(--line);border-radius:10px;padding:.78rem;background:white;color:var(--ink);outline:none}select:focus{border-color:var(--accent);box-shadow:0 0 0 3px #d95f3b18}#plan-view{width:min(100% - 2rem,920px);margin:0 auto;padding-bottom:5rem}.document-header{height:auto;min-height:180px;margin:1rem 0 0;padding:2rem;border:1px solid var(--line);border-radius:22px;background:linear-gradient(135deg,#fffdf8,#f1e7da);align-items:flex-end}.document-header h2{font-family:Georgia,"Songti SC",serif;font-size:clamp(2rem,5vw,3.5rem);margin:.55rem 0}.document-header .lede{max-width:60ch;color:var(--muted);line-height:1.65}.document-actions{display:flex;align-items:center;justify-content:flex-end;gap:.5rem;flex-wrap:wrap}.document-actions small{width:100%;text-align:right;color:var(--muted)}.document-section{margin-top:1rem;padding:1.35rem;border:1px solid var(--line);border-radius:18px;background:var(--card)}.document-section h3{font-family:Georgia,"Songti SC",serif;font-size:1.45rem;margin:.2rem 0}.inline-form{margin-top:1rem;padding:1rem;border-radius:14px;background:#f4efe7}.inline-form label{margin:.65rem 0}.people-list{display:flex;gap:.5rem;flex-wrap:wrap;margin-top:1rem}.person{padding:.45rem .7rem;border:1px solid var(--line);border-radius:999px;background:white;font-size:.875rem}.person.me{border-color:var(--accent);color:#9e3d24}.candidate-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:.8rem;margin-top:1rem}.candidate-card{padding:1rem;border:1px solid var(--line);border-radius:14px;background:white}.candidate-card h4{font-family:Georgia,"Songti SC",serif;font-size:1.25rem;margin:0 0 .3rem}.candidate-distance{display:block;color:var(--green);margin:.4rem 0}.candidate-vote.selected{background:var(--green);border-color:var(--green);color:white}.comment-list{display:grid;gap:.45rem;margin:.8rem 0}.comment{display:grid;gap:.2rem;padding:.65rem .75rem;border-left:3px solid #dfcbb7;background:#faf6f0;font-size:.875rem}.comment span{line-height:1.5}.time-option-list{display:grid;gap:.65rem;margin-top:1rem}.time-option{display:grid;grid-template-columns:minmax(110px,1fr) minmax(220px,2fr) minmax(140px,1fr) auto;gap:.8rem;align-items:center;padding:.8rem;border:1px solid var(--line);border-radius:12px;background:white}.time-option span,.time-option small{color:var(--muted)}.availability-toggle{display:flex;align-items:center;gap:.4rem;margin:0;white-space:nowrap}.availability-toggle input{width:auto}.candidate-map-panel{margin-top:1rem;border-top:1px solid var(--line);padding-top:1rem}.candidate-map-panel>summary{cursor:pointer;font-weight:700}.candidate-map-panel .map-shell{height:340px;margin-top:.7rem;border-radius:14px;overflow:hidden}.map-tools{display:flex;align-items:center;gap:.75rem;margin-top:.75rem}.map-tools span{font-size:.875rem;color:var(--muted)}.privacy-note{display:block;margin-top:.55rem;color:var(--muted);line-height:1.45}.user-location-dot{display:block;width:18px;height:18px;border:3px solid white;border-radius:50%;background:#2878d0;box-shadow:0 0 0 3px #2878d055,0 3px 10px #174b7c66}.closure-summary{padding:1rem;border:1px solid #a9c5b5;border-radius:12px;background:#edf6f0;color:#28533f;font-weight:650}.back-link{display:inline-block;margin-top:1.2rem;color:var(--muted);text-decoration:none}.secondary-surface>.workspace{height:auto;min-height:0}.secondary-surface aside{width:100%;border-left:0}.secondary-surface .restaurant-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr))}.plan-group{margin:1.2rem 0}.plan-group>h3{font-family:Georgia,"Songti SC",serif;font-size:1rem;color:var(--muted);margin:0 0 .65rem}.plan-group>.plan-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:.8rem}button:disabled,input:disabled,textarea:disabled,select:disabled{cursor:not-allowed;opacity:.55}
@media(max-width:760px){#plan-view{width:min(100% - 1rem,920px)}.document-header{padding:1.25rem;align-items:flex-start;display:grid}.document-actions{justify-content:flex-start}.document-actions small{text-align:left}.document-section{padding:1rem}.candidate-list{grid-template-columns:1fr}.time-option{grid-template-columns:1fr;gap:.35rem}.candidate-map-panel .map-shell{height:280px}.inline-form{padding:.8rem}}

/* A reading surface first; tools appear only when requested. */
#plan-view { width:min(100% - 2rem,780px); overflow-wrap:anywhere; }
#plan-view .document-header { background:none; border:0; border-radius:0; padding:1.5rem 0 .5rem; min-height:0; align-items:flex-start; gap:1.2rem; }
#plan-view .document-header>div { min-width:0; }
#plan-view .document-header h2 { font-size:clamp(1.8rem,5vw,2.8rem); line-height:1.25; }
#plan-note { white-space:pre-wrap; color:var(--ink); }
#plan-view .document-section { background:none; border:0; border-top:1px solid var(--line); border-radius:0; padding:1.25rem 0; margin:0; }
#plan-view .document-section h3 { font-weight:650; line-height:1.5; font-family:inherit; font-size:1.05rem; }
#plan-view #plan-summary { border:0; display:flex; flex-wrap:wrap; gap:.3rem 1rem; padding:.6rem 0 1rem; color:var(--muted); font-size:.875rem; }
#plan-view summary { cursor:pointer; line-height:1.6; padding:.4rem 0; }
#plan-view .document-section>details>summary { font-weight:650; }
#plan-view .brief-editor, #plan-view .edit-disclosure { color:var(--muted); font-size:.88rem; margin:.5rem 0; }
#plan-view .inline-form { color:var(--ink); background:#f2efe9; border-radius:8px; }
#plan-view .inline-form small { display:block; color:var(--muted); line-height:1.5; }
#plan-view .candidate-list { grid-template-columns:1fr; gap:0; margin-top:.5rem; }
#plan-view .candidate-card { background:none; border:0; border-bottom:1px solid var(--line); border-radius:0; padding:1rem 0; }
#plan-view .candidate-card:last-child { border-bottom:0; }
#plan-view .candidate-card h4 { font-family:inherit; font-size:1.08rem; }
#plan-view .comment { background:none; padding:.2rem .8rem; }
#plan-view .comment span, #plan-view .note { white-space:pre-wrap; }
#plan-view .people-list { margin:.5rem 0; }
#plan-view .person { background:none; border:0; border-radius:0; padding:.25rem .5rem .25rem 0; }
#plan-view .stage-strip { display:flex; align-items:center; flex-wrap:wrap; gap:.7rem; padding:1rem 0; }
#stage-hint { flex:1 1 250px; color:var(--muted); font-size:.88rem; line-height:1.6; }
#stage-action-error { flex-basis:100%; }
#plan-view .error:empty { display:none; }
#plan-view .time-option { grid-template-columns:1fr; gap:.35rem; background:none; border:0; border-bottom:1px solid var(--line); border-radius:0; padding:.75rem 0; }
#plan-view .candidate-map-panel { font-size:.875rem; border:0; }
#plan-view .closure-summary { white-space:pre-wrap; line-height:1.8; margin:.5rem 0; }
#document-tools { color:var(--muted); font-size:.875rem; }
#document-tools>p { margin:.8rem 0; line-height:1.6; }
#plan-view button, #plan-view input, #plan-view select { min-height:44px; }
#plan-view summary:focus-visible, #plan-view button:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
@media(max-width:760px) {
  #plan-view { width:calc(100% - 2rem); }
  #plan-view .document-header { display:block; }
  #plan-view .document-actions { margin:.7rem 0; }
  #plan-view .document-actions small { width:auto; font-size:.875rem; }
  #plan-view .stage-strip>button { width:100%; }
  #plan-view .map-tools { align-items:flex-start; flex-direction:column; }
}

/* Compact overview: one panel, with a desktop rail. */
#plan-view { width:min(100% - 2rem,1000px); padding-top:.5rem; padding-bottom:2rem; }
#plan-view .back-link { margin-top:.5rem; font-size:.875rem; }
#plan-view .document-header { padding:.8rem 0 1rem; margin:0; align-items:center; }
#plan-view .document-header h2 { font-family:inherit; font-size:1.6rem; margin:.3rem 0 0; }
#plan-view .document-header .tag { font-size:.875rem; }
#plan-view .document-actions { gap:.4rem; }
.document-layout { display:grid; grid-template-columns:150px minmax(0,1fr); gap:1.5rem; align-items:start; }
#plan-navigation { display:grid; gap:.25rem; padding:.5rem 1rem .5rem 0; border-right:1px solid var(--line); }
#plan-navigation button { border:0; background:none; text-align:left; font-size:.88rem; min-width:0; }
#plan-navigation button.selected { background:#e9e4da; color:var(--ink); font-weight:700; }
#plan-panels { min-width:0; padding:1rem 1.25rem; background:var(--card); border:1px solid var(--line); border-radius:14px; }
#plan-view #plan-panels>.document-section { border:0; padding:0; }
.mobile-panel-label { display:none; }
.overview-heading { display:flex; align-items:center; justify-content:space-between; margin-bottom:.75rem; }
.overview-heading h3 { margin:0; font-size:1rem; }
.overview-heading>span { color:var(--muted); font-size:.875rem; }
#overview-items { display:grid; grid-template-columns:1fr 1fr; gap:.5rem; }
#plan-view .overview-item { display:flex; align-items:center; justify-content:space-between; gap:.5rem; text-align:left; min-height:58px; padding:.75rem; background:none; border:1px solid var(--line); border-radius:9px; }
.overview-item>span { font-size:.9rem; font-weight:600; }
.overview-item>small { color:var(--muted); font-size:.875rem; white-space:nowrap; }
#overview-recommend { margin-top:12px; }
#search-widen { min-height:44px; max-width:100%; text-align:left; }
#search-scope-help,.search-category { display:block; margin:8px 0; font-size:14px; line-height:1.5; color:var(--muted); overflow-wrap:anywhere; }
#overview-outcome { padding:.65rem .8rem; margin-bottom:.75rem; background:#edf6f0; border-radius:8px; color:var(--green); font-size:.88rem; overflow-wrap:anywhere; }
#plan-view #plan-overview .stage-strip { padding:.8rem 0 0; margin-top:.8rem; border-top:1px solid var(--line); }
#plan-view #stage-hint { font-size:.875rem; flex:1 1 160px; }
#plan-view #stage-next { font-size:.875rem; padding:.5rem .75rem; }
#plan-view .candidate-card { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; column-gap:.75rem; padding:.65rem 0; }
#plan-view .candidate-card h4 { margin:0; font-size:.95rem; }
#plan-view .candidate-card>.candidate-vote { font-size:.875rem; padding:.4rem .6rem; }
#plan-view .candidate-details { grid-column:1 / -1; color:var(--muted); font-size:.875rem; }
#plan-view .candidate-details>summary { padding:.3rem 0; font-size:.875rem; }
#plan-view .candidate-details[open] { padding-bottom:.5rem; }
#plan-panels>#restaurant-library { width:100%; margin:0; padding:0; border:0; }
#plan-panels>#restaurant-library>summary { display:none; }
#restaurant-library .library-head { margin:0 0 .8rem; align-items:center; gap:.5rem; }
#restaurant-library .library-head h2 { font-family:inherit; font-size:1.05rem; margin:0; }
.library-lists { display:flex; flex-wrap:wrap; gap:.4rem; margin-bottom:.75rem; }
.library-lists button { padding:.45rem .65rem; min-height:36px; font-size:.875rem; max-width:100%; overflow-wrap:anywhere; }
.library-lists button.selected { background:var(--ink); color:white; }
#restaurant-library .restaurant-list { display:block; padding:0; overflow:visible; }
#restaurant-library .restaurant-card { margin:0; border:0; border-top:1px solid var(--line); border-radius:0; background:none; padding:.75rem 0; }
#restaurant-library .restaurant-card h3 { font-family:inherit; font-size:.95rem; }
.restaurant-details>summary, .list-memberships>summary { cursor:pointer; color:var(--muted); font-size:.875rem; padding:.4rem 0; }
.membership-choice { display:flex; align-items:center; gap:.5rem; font-size:.875rem; }
.membership-choice input { width:auto; min-height:0!important; }
#restaurant-library .library-filter { margin:.5rem 0; font-size:.875rem; }
#restaurant-library .list-heading { padding:.5rem 0; font-size:.875rem; }
#restaurant-library .error:empty { display:none; }
#list-tools { font-size:.875rem; color:var(--muted); }
#plan-note { margin:.75rem 0; line-height:1.6; }
@media(max-width:760px) {
  #plan-view { width:calc(100% - 1.5rem); }
  #plan-view .document-header { display:flex; gap:.5rem; padding:.7rem 0; }
  #plan-view .document-header h2 { font-size:1.2rem; }
  #plan-view .document-actions small { display:none; }
  .document-layout { display:block; }
  #plan-navigation { display:none; }
  .mobile-panel-label { display:flex; align-items:center; gap:.6rem; margin:0 0 .75rem; color:var(--muted); font-size:.875rem; }
  .mobile-panel-label select { flex:1; min-width:0; padding:.55rem; }
  #plan-panels { padding:.85rem; }
  #plan-view .overview-item { flex-direction:column; align-items:flex-start; gap:.3rem; min-height:66px; padding:.65rem; }
  #plan-view #stage-hint { flex-basis:100%; }
  #plan-view .stage-strip>button { width:100%; }
  #restaurant-library .header-actions { gap:.25rem; }
  #restaurant-library .header-actions button { padding:.45rem; font-size:.875rem; }
}

/* Application workspace; document navigation is not the sidebar. */
body { background:#fbfaf8; color:#243832; }
#app-view { padding-left:232px; }
#app-sidebar { position:fixed; inset:0 auto 0 0; width:232px; padding:24px 16px; background:#eaece6; border-right:1px solid #dce0d8; z-index:40; display:flex; flex-direction:column; overflow:hidden; }
#app-sidebar > :not(#sidebar-plans) { flex-shrink:0; }
.sidebar-primary { padding-bottom:20px; border-bottom:1px solid #c5cec2; }
#app-sidebar .sidebar-primary button { display:flex; align-items:center; gap:12px; min-height:44px; }
.nav-icon { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; flex-shrink:0; }
#sidebar-plans { flex:1; min-height:0; overflow-y:auto; overscroll-behavior:contain; }
#sidebar-plans button { min-height:44px; margin-bottom:4px; }
#sidebar-plans button.selected { box-shadow:inset 3px 0 #396b52; font-weight:700; }
#account-control { position:relative; min-width:0; }
#account-toggle { display:flex; align-items:center; gap:4px; min-height:44px; max-width:300px; width:100%; font-size:14px; }
.account-prefix { flex-shrink:0; }
#account-name { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#account-panel { position:absolute; z-index:50; right:0; top:calc(100% + 8px); width:260px; max-width:calc(100vw - 28px); padding:8px; border:1px solid var(--line); border-radius:12px; background:var(--card); box-shadow:0 10px 30px #24383222; }
#account-panel button { display:block; width:100%; text-align:left; min-height:44px; border:0; }
#account-panel small { display:block; margin:0 10px 10px; font-size:14px; color:var(--muted); }
#account-panel #logout-button { border-top:1px solid var(--line); border-radius:0; color:#914431; }
#app-view > header .header-actions { min-width:0; gap:10px; }
#create-plan-open { flex-shrink:0; white-space:nowrap; min-height:44px; }
@media(max-width:760px) {
 #app-view > header .workspace-label { display:none; }
 #app-view > header .header-actions { flex:1; justify-content:flex-end; gap:6px; }
 #app-view > header { min-height:64px; }
 #account-toggle { max-width:230px; padding:8px; }
 #sidebar-toggle { min-width:44px; min-height:44px; flex-shrink:0; }
 #create-plan-open { padding:8px; font-size:14px; }
}
@media(max-width:380px) {
 #account-toggle { flex-wrap:wrap; justify-content:flex-start; gap:0 4px; }
 #account-toggle .account-prefix { width:100%; font-size:12px; }
 #account-name { flex:1; }
}
.sidebar-brand { display:flex; justify-content:space-between; align-items:center; font-size:20px; font-weight:750; margin:4px 10px 32px; }
#app-sidebar button { display:block; width:100%; text-align:left; background:transparent; border:0; border-radius:8px; padding:12px; color:#31483e; }
#app-sidebar button:hover,#app-sidebar button.selected { background:#d8e2d7; }
#app-sidebar .sidebar-brand button { width:auto; display:none; }
.sidebar-label { display:block; margin:20px 12px 12px; color:#53654f; font-size:14px; font-weight:650; }
#sidebar-plans button { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#app-view > header { height:64px; padding:12px 28px; border:0; background:transparent; }
.workspace-label { color:#7a8278; font-size:.875rem; }
#sidebar-toggle { display:none; }
#workspace-tabs { display:flex; gap:4px; padding:0 28px; border-bottom:1px solid #e1e3dc; overflow-x:auto; min-height:44px; }
#workspace-tabs:empty { min-height:0; border:0; }
#workspace-tabs button { flex:0 0 auto; max-width:220px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; border:0; border-radius:8px 8px 0 0; background:transparent; color:#788278; font-size:.875rem; padding:12px 18px; }
#workspace-tabs button.selected { color:#244f3c; background:#e5ece2; box-shadow:inset 0 -3px #658668; }
#plan-view { width:min(100% - 64px,940px); padding-top:24px; }
#plan-view .document-header { margin-bottom:20px; }
#plan-title { font-size:30px; letter-spacing:-.7px; }
#plan-view .document-layout { display:block; }
#plan-navigation { display:flex; flex-direction:row; flex-wrap:wrap; gap:4px; border:0; border-bottom:1px solid #e4e5df; padding:0 0 12px; margin:0 0 22px; background:transparent; width:auto; }
#plan-navigation button { width:auto; padding:6px 10px; font-size:.875rem; border:0; background:transparent; }
#plan-navigation button.selected { background:#edf0e8; color:#305c43; }
.collaboration-status { margin:0; padding:0 28px 8px; color:#667263; font-size:12px; overflow-wrap:anywhere; }
#stage-adjustment { margin:-10px 0 18px; color:#53654f; font-size:14px; }
#participation-banner { border:1px solid #c6d3bf; border-radius:12px; padding:12px 16px; margin:0 0 20px; background:#f1f5ed; overflow-wrap:anywhere; }
#participation-banner.needs-participation { border:2px solid #a76c36; background:#fff5df; }
#participation-heading { font-size:16px; }
#participation-banner p { font-size:14px; line-height:1.5; margin:6px 0; }
#participation-banner p:empty { display:none; }
.participation-choices { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.participation-choices button { min-width:64px; min-height:44px; }
.participation-choices button.selected { background:#315e40; color:white; border-color:#315e40; }
#search-dialog #participation-banner { margin-top:12px; }

/* A single compact share surface, including a readable manual-copy path. */
#plan-share-dialog { width:min(560px,calc(100% - 24px)); max-height:calc(100dvh - 24px); padding:20px; overflow:auto; }
#plan-share-dialog .dialog-head { align-items:center; gap:12px; }
#plan-share-heading { margin:0; font-size:22px; }
#plan-share-help,#plan-share-feedback { font-size:14px; line-height:1.6; overflow-wrap:anywhere; }
#plan-share-feedback:empty { display:none; }
#plan-share-dialog label { font-size:14px; }
#plan-share-text { display:block; width:100%; min-height:210px; max-height:40dvh; margin:8px 0 12px; resize:vertical; font-size:16px; line-height:1.6; }
#plan-share-dialog .plan-share-actions { display:flex; flex-wrap:wrap; gap:10px; }
#plan-share-dialog button { min-height:44px; min-width:44px; }
#plan-share-dialog .plan-share-secondary button { font-size:14px; }
#plan-share-dialog [hidden] { display:none; }
@media(max-width:400px) { #plan-share-dialog { padding:16px; } #plan-share-dialog .plan-share-actions > button { flex:1 1 auto; } }

#stage-adjustment > summary { cursor:pointer; width:fit-content; min-height:44px; padding:12px 0; }
#stage-adjustment .inline-form { max-width:580px; }
#stage-adjustment select { min-height:44px; }
#stage-timeline { display:flex; list-style:none; padding:0; margin:0 0 22px; counter-reset:step; gap:8px; }
#stage-timeline li { flex:1; display:flex; align-items:center; gap:8px; font-size:.875rem; color:#91988b; border-top:3px solid #e5e7df; padding-top:10px; counter-increment:step; }
#stage-timeline li:before { content:counter(step); border-radius:50%; background:#eceee7; width:20px; height:20px; display:grid; place-items:center; font-size:.875rem; }
#stage-timeline li.current { color:#315e40; border-color:#62815d; font-weight:750; }
#stage-timeline li.current:before { background:#62815d; color:white; }
#stage-timeline li.done { border-color:#b6c6aa; color:#708463; }
#stage-timeline li.done:before { content:'✓'; }
#stage-timeline li.cancelled { color:#975746; border-color:#975746; }
.stage-focus { background:linear-gradient(130deg,#f0f3e9,#f9f8f0); border:1px solid #e3e7d9; border-radius:16px; padding:22px; }
.focus-heading { display:flex; align-items:baseline; justify-content:space-between; margin-bottom:16px; gap:10px; }
.focus-heading h3 { font-size:19px; margin:0; }
#stage-focus-count { font-size:.875rem; color:#78836c; }
#stage-focus-options { display:grid; grid-template-columns:minmax(0,1fr); gap:8px; }
.focus-restaurant { min-width:0; display:flex; align-items:center; justify-content:space-between; gap:15px; text-align:left; background:#fffdf9; border:1px solid #e5e7dc; border-radius:9px; padding:13px 16px; }
.focus-restaurant strong { font-size:14px; }
.focus-restaurant small { max-width:45%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#8b907d; font-size:.875rem; }
#overview-items { display:flex; gap:8px; margin:16px 0; border:0; flex-wrap:wrap; }
#overview-items .overview-item { width:auto; display:flex; gap:10px; border:0; background:transparent; padding:8px 10px; font-size:.875rem; }
#overview-items .overview-item small { font-size:.875rem; }
#plan-overview .stage-strip { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; border-top:1px solid #e8e9e1; padding:18px 0 0; margin:0; gap:12px; }
#stage-hint { font-size:.875rem; color:#7b846f; margin:0; }
#plan-overview .stage-strip button { width:auto; margin:0; font-size:.875rem; }
#stage-action-error:empty { display:none; }
#plan-view .document-section { border:0; }
.context-thread { margin:10px 0; border-top:1px solid #ebece5; padding:10px 0; font-size:.875rem; color:#64735e; }
.context-thread > summary { font-size:.875rem; font-weight:500; }
.context-thread textarea { min-height:66px; }
#candidate-list .candidate-card { background:#fffefa; border:1px solid #e5e6dc; padding:16px; }
#restaurant-library { width:min(100% - 64px,940px); background:transparent; border:0; }
#restaurant-library > summary { display:none; }
#plan-board { width:min(100% - 64px,940px); padding-top:32px; }
#plan-board .eyebrow { display:none; }
#active-plans { display:block; }
.plan-group { margin:0 0 30px; }
.plan-group > h3 { font-size:.875rem; color:#758169; }
.plan-card { border-radius:14px; background:#fffefa; padding:22px; border-color:#e3e5dc; box-shadow:0 3px 12px #253d2610; }
#sidebar-backdrop { position:fixed; inset:0; z-index:35; border:0; border-radius:0; background:#142a2455; }
#plan-view #plan-panels { padding:0; background:transparent; border:0; border-radius:0; }
#plan-view .document-header { padding:4px 0 12px; margin:0 0 12px; }
#plan-view #plan-navigation { margin-bottom:14px; padding-bottom:8px; }
#plan-view #overview-items .overview-item { min-height:38px; }
#plan-view #stage-timeline { margin-bottom:12px; }
#plan-view .candidate-card > .context-thread { grid-column:1 / -1; }
#plan-view .document-header h2 { font-size:28px; }
@media(max-width:760px) {
 #app-view { padding-left:0; }
 #app-sidebar { transform:translateX(-100%); transition:transform .15s ease; }
 #app-sidebar.is-open { transform:translateX(0); }
 #app-sidebar .sidebar-brand button { display:block; }
 #sidebar-toggle { display:block; padding:5px 9px; font-size:18px; border:0; background:transparent; }
 #app-view > header { height:54px; padding:10px 14px; gap:10px; }
 .workspace-label { margin-right:auto; }
 #workspace-tabs { padding:0 14px; min-height:40px; }
 #workspace-tabs button { max-width:190px; padding:10px 12px; }
 #plan-view { padding-bottom:16px; }
 #plan-view,#plan-board,#restaurant-library { width:calc(100% - 32px); padding-top:18px; }
 #plan-title { font-size:24px; }
 #plan-updated { display:none; }
 #plan-view .document-header { margin-bottom:16px; }
 #stage-timeline { margin-bottom:16px; gap:6px; }
 #stage-timeline li { gap:5px; }
 #plan-navigation { display:flex; flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; margin-bottom:14px; padding-bottom:10px; }
 #plan-navigation button { flex:0 0 auto; padding:5px 8px; }
 .mobile-panel-label { display:none; }
 .stage-focus { padding:16px; }
 .focus-heading h3 { font-size:17px; }
 .focus-restaurant { padding:12px; flex-direction:column; align-items:flex-start; gap:4px; }
 .focus-restaurant small { max-width:100%; }
 #overview-items { gap:0; margin:12px 0; }
 #overview-items .overview-item { padding:8px 7px; gap:5px; }
 #plan-overview .stage-strip { padding-top:14px; }
}

/* Anchored document comments: one reading panel, not many forms. */
#comments-panel { position:fixed; top:80px; bottom:16px; right:16px; width:min(360px,calc(100% - 32px)); z-index:60; padding:20px; background:#fffdf8; border:1px solid #dbdfd3; border-radius:12px; box-shadow:0 16px 64px #172b2630; overflow:auto; }
.comments-heading { display:flex; justify-content:space-between; align-items:center; gap:8px; border-bottom:1px solid #e6e8df; padding-bottom:12px; }
.comments-heading strong { font-size:14px; overflow-wrap:anywhere; }
#comments-content .context-thread { border:0; color:inherit; }
#comments-content .context-thread > summary { display:none; }
#comments-content .comment { display:flex; flex-wrap:wrap; gap:8px; padding:12px 0; border-bottom:1px solid #eeeee5; }
#comments-content .comment span { flex-basis:100%; white-space:pre-wrap; overflow-wrap:anywhere; }
#comments-content textarea { margin:12px 0; min-height:80px; }
#plan-view .comment-marker,#plan-view .trash-button,.comment-marker,.trash-button { border:0; background:transparent; padding:4px 7px; min-height:32px; min-width:32px; font-size:.875rem; color:#64745b; border-radius:6px; }
.comment-marker:hover,.trash-button:hover { background:#e9eee4; }
#plan-view .candidate-card > .comment-marker { justify-self:start; }
#plan-view .candidate-card > .trash-button { justify-self:end; }
#brief-thread,#people-thread,#candidates-thread,#time-thread,#decision-thread { float:right; position:relative; z-index:1; }
#library-title { display:inline-block; }
#list-trash-host { display:inline-flex; }
#identity-form p { font-size:.875rem; color:#72796a; margin:12px 0; }
#comments-panel .trash-button { margin-left:auto; }
.comment-anchor-active { outline:1px solid #a5b697; outline-offset:3px; }
#comments-panel.inline-comments { position:static; width:100%; max-height:none; margin-top:12px; padding:12px 0 0; border:0; border-top:1px solid #dbdfd3; border-radius:0; box-shadow:none; overflow:visible; grid-column:1 / -1; }
#comments-panel.inline-comments .comments-heading { padding-bottom:6px; }
@media(max-width:760px) {
 .comment-marker, #plan-view .comment-marker, #comments-close { min-height:44px; min-width:44px; }
}

/* Readable text and discoverable creator actions. */
body { font-size:1rem; line-height:1.5; }
.site-footer { display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:.25rem 1rem; padding:1.25rem 1rem; text-align:center; color:var(--muted); font-size:.875rem; }
.site-footer a { display:inline-flex; align-items:center; justify-content:center; gap:.35rem; min-height:44px; max-width:100%; color:inherit; }
.site-footer img { width:20px; height:22px; flex:none; object-fit:contain; }
input, textarea, select { font:inherit; font-size:1rem; }
#comments-content .context-thread, #comments-content .comment { font-size:1rem; }
#plan-view .trash-button, .trash-button { min-width:44px; min-height:44px; padding:8px 10px; font-size:20px; line-height:1; color:#9b392e; background:#fff0ec; border:1px solid #d49a8f; border-radius:8px; }
#plan-view .trash-button:hover, .trash-button:hover { background:#f9dcd4; border-color:#9b392e; }
.trash-button:focus-visible { outline:3px solid #9b392e; outline-offset:2px; }

/* Keep map geometry proportional to its document, not a fixed-height strip. */
.candidate-map-panel .map-shell { height:auto; aspect-ratio:16 / 10; min-height:320px; max-height:680px; width:100%; }
#map .amap-marker-label:has(.candidate-map-marker) { border:0; padding:0; background:transparent; }
#map .candidate-map-marker { display:block; width:20px; min-width:20px; height:22px; min-height:0; padding:0; border:0; border-radius:50%; color:#173b60; background:#fff; font-size:12px; font-weight:700; line-height:22px; text-align:center; }
#map .candidate-map-marker.confirmed { background:#fff0bc; box-shadow:0 0 0 2px #ad7022; }
#map .candidate-map-marker.active { background:#304f35; color:#fff; box-shadow:0 0 0 3px #304f35; }
#map .candidate-map-marker:focus-visible { outline:3px solid #25231f; outline-offset:3px; }
#map.has-tooltip + .map-status[data-state="ready"] { visibility:hidden; }
.candidate-map-tooltip { width:max-content; max-width:min(280px,calc(100vw - 96px)); max-height:180px; overflow:auto; white-space:normal; overflow-wrap:anywhere; padding:10px 12px; border:1px solid #506745; border-radius:10px; color:#25231f; background:#fffdf8; font-size:15px; line-height:1.5; box-shadow:0 2px 8px #0003; }
#plan-view .candidate-card.map-selected { background:#edf3e7; border:2px solid #506745; }
.candidate-locate { min-height:44px; font-size:14px; }
@media(max-width:760px) {
 .candidate-map-panel .map-shell { aspect-ratio:1 / 1; min-height:300px; max-height:520px; }

}

/* Home gallery: shared rows across stages; sparse boards never stretch cards. */
#active-plans, #archived-plans { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
#plan-board .plan-card { position:relative; min-width:0; min-height:236px; align-content:start; grid-template-rows:auto minmax(54px,auto) auto auto 1fr; gap:12px; padding:22px; border-radius:18px; border-top:5px solid #8da78b; transition:box-shadow .15s,transform .15s; }
#plan-board .plan-card[data-status="voting"] { border-top-color:#be955c; }
#plan-board .plan-card[data-status="confirmed"] { border-top-color:#517970; background:#f4f8f0; }
#plan-board .plan-card .tag { justify-self:start; }
#plan-board .plan-card h3 { font-size:20px; line-height:1.45; overflow-wrap:anywhere; margin:0; }
#plan-board .plan-card p { margin:0; font-size:14px; line-height:1.6; overflow-wrap:anywhere; }
#plan-board .plan-card small { align-self:end; border-top:1px solid var(--line); padding-top:12px; font-size:14px; }
#plan-board .plan-card:hover { transform:translateY(-2px); box-shadow:0 8px 24px #253d261a; }
#plan-board .plan-card:focus-visible { outline:3px solid #517970; outline-offset:3px; }
#archived-plans .plan-card { min-height:190px; border-top-color:#b4b6ad; }
@media (max-width:1100px) { #active-plans, #archived-plans { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:760px) { #active-plans, #archived-plans { grid-template-columns:minmax(0,1fr); gap:14px; } #plan-board .plan-card { min-height:218px; } }
@media (prefers-reduced-motion:reduce) { #plan-board .plan-card { transition:none; } #plan-board .plan-card:hover { transform:none; } }

/* Standalone favorites no longer share the old map + 390px sidebar grid. */
#restaurant-library > .workspace { display:grid; grid-template-columns:minmax(0,1fr); }
#restaurant-library > .workspace > aside { min-width:0; }
#restaurant-library .library-head { display:flex; flex-wrap:wrap; }
#restaurant-library .library-head > div:first-child { display:flex; flex-wrap:wrap; align-items:center; gap:8px; flex:1 1 16rem; min-width:0; }
#restaurant-library #library-title { min-width:0; overflow-wrap:anywhere; }
#restaurant-library #list-trash-host { flex:none; }
#restaurant-library .header-actions { display:flex; flex-wrap:wrap; flex:0 1 auto; min-width:0; gap:8px; }
#restaurant-library .header-actions > button { flex:none; white-space:nowrap; }
#restaurant-library .list-heading { flex-wrap:wrap; gap:8px; }
#restaurant-library .list-heading > * { min-width:0; overflow-wrap:anywhere; }
#restaurant-library .card-actions { flex-wrap:wrap; align-items:center; gap:8px; }
#restaurant-library button, #restaurant-library .card-actions a { min-width:44px; min-height:44px; }
#restaurant-library .card-actions a { display:inline-flex; align-items:center; }
#restaurant-library #list-tools > summary { width:fit-content; min-width:44px; min-height:44px; padding:10px 0; }

/* Favorites: status belongs to the name, not a drifting space-between column. */
#restaurant-library .card-top { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; }
#restaurant-library .favorite-heading { display:flex; flex-wrap:wrap; align-items:center; gap:8px; flex:1 1 16rem; min-width:0; }
#restaurant-library .favorite-heading h3 { margin:0; min-width:0; overflow-wrap:anywhere; }
#restaurant-library .favorite-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
#restaurant-library .favorite-actions:empty { display:none; }
#restaurant-library .restaurant-details { overflow-wrap:anywhere; }
#restaurant-library .restaurant-details summary { width:fit-content; min-width:44px; min-height:44px; padding:10px 0; }
#restaurant-library .restaurant-details button, #restaurant-library .membership-choice { min-width:44px; min-height:44px; }
#restaurant-library .membership-choice { min-width:0; }
#restaurant-library .membership-choice input { flex-shrink:0; }

/* Participant rows share intrinsic status/action columns, including empty actions. */
#plan-view .people-list { display:grid; grid-template-columns:minmax(0,1fr) max-content auto; gap:0 12px; }
#plan-view .person { display:grid; grid-column:1 / -1; grid-template-columns:subgrid; align-items:center; min-height:44px; padding:6px 0; border-bottom:1px solid var(--line); }
#plan-view .person-name { min-width:0; overflow-wrap:anywhere; }
#plan-view .person-status { white-space:nowrap; color:var(--muted); }
#plan-view .person-actions { display:flex; align-items:center; }

/* Proposed restaurants only: decisions in cards, the map below the whole grid. */
#plan-view #candidate-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; align-items:start; }
#plan-view #candidate-list .candidate-card { position:relative; display:flex; flex-direction:column; align-items:stretch; gap:12px; min-width:0; padding:18px; border:1px solid #dcded2; border-radius:14px; background:#fffefa; }
#plan-view #candidate-list .candidate-card.map-selected { border-color:#506745; box-shadow:0 0 0 1px #506745; background:#edf3e7; }
#plan-view .candidate-header { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding-right:48px; min-height:44px; }
#plan-view .candidate-header h4 { font-size:18px; line-height:1.5; margin:0; }
#plan-view .candidate-confirmed { flex:none; padding:2px 8px; border-radius:6px; background:#edf2df; color:#45613a; font-size:14px; font-weight:650; }
#plan-view .candidate-note { margin:0; font-size:16px; line-height:1.6; white-space:pre-wrap; overflow-wrap:anywhere; }
#plan-view .candidate-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; border-top:1px solid #e5e6dc; padding-top:12px; }
#plan-view .candidate-actions > button { flex:0 0 auto; width:auto; min-height:44px; min-width:44px; font-size:14px; padding:8px 10px; }
#plan-view .candidate-actions > small { font-size:14px; }
#plan-view .candidate-card > .trash-button { position:absolute; top:18px; right:18px; }
#plan-view .candidate-details { margin:0; font-size:14px; }
#plan-view .candidate-details > summary { width:fit-content; min-width:44px; min-height:44px; padding:10px 0; }
#plan-view .candidate-actions > button:focus-visible, #plan-view .candidate-details > summary:focus-visible { outline:3px solid #506745; outline-offset:2px; }
#plan-view .candidate-map-panel { margin-top:16px; }
@media(max-width:760px) {
 #plan-view #candidate-list { grid-template-columns:minmax(0,1fr); gap:14px; }
 #plan-view #candidate-list .candidate-card { padding:16px; }
 #plan-view .candidate-card > .trash-button { top:16px; right:16px; }
}
