/* Presentation only: the dinner engine and transport own all durable state. */
:root{--tap:48px}body{overscroll-behavior-y:none}button,a,input,select,summary{-webkit-tap-highlight-color:transparent}button,input,select{font-size:1rem}button{touch-action:manipulation}button,.button{white-space:normal}input,select,textarea{scroll-margin-block:100px}button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible{outline:3px solid #5360d5;outline-offset:4px}button:disabled{cursor:not-allowed}.button{min-height:var(--tap)}.text-button,.icon-button{min-height:var(--tap)}[hidden]{display:none!important}h1,h2,h3,strong,.saved-row span,.member-check span{overflow-wrap:anywhere}.eyebrow{letter-spacing:.09em}.small-note{line-height:1.5}.topbar{padding-top:max(18px,env(safe-area-inset-top));padding-left:max(20px,env(safe-area-inset-left));padding-right:max(20px,env(safe-area-inset-right))}footer{padding-bottom:max(24px,env(safe-area-inset-bottom))}
#multiplayer-layer{padding:24px max(20px,env(safe-area-inset-right)) 48px max(20px,env(safe-area-inset-left));min-height:65vh}#multiplayer-layer .social-shell{max-width:680px;margin:auto}#multiplayer-layer h1{font-size:clamp(1.9rem,6vw,2.8rem);line-height:1.12;margin:20px 0}#multiplayer-layer .flow-nav{align-items:center;flex-wrap:wrap;gap:12px}#mp-connection{border-top:1px solid var(--line);padding-top:16px;margin-top:28px;min-height:42px;font-size:.875rem}#mp-error:not(:empty){padding:14px 16px;border:1px solid #d08d80;border-radius:14px;background:#fff0e9;color:#862411;line-height:1.5}#mp-ready{margin:8px 0 20px;min-width:180px}.table-intro{line-height:1.6;color:var(--muted)}
.live-progress{background:var(--paper);border:1px solid var(--line);border-radius:24px;padding:20px;margin:24px 0}.live-progress>strong{display:block;padding-bottom:12px;font-size:1rem}.live-progress>div{display:grid;grid-template-columns:minmax(0,1fr) minmax(100px,auto);gap:16px;align-items:center;padding:14px 0;border-top:1px solid var(--line);min-height:58px}.live-progress>div>span:first-child{font-weight:700;overflow-wrap:anywhere}.live-progress>div>span:last-child{font-size:.875rem;text-align:right;color:#44552c;max-width:190px;line-height:1.4}.host-controls{padding:0!important;background:transparent!important}.host-controls h2{font-size:1.25rem;margin:24px 0 16px}.host-controls>.button{margin:0 8px 12px 0}.host-controls>#mp-begin{min-width:180px}.table-settings,.ballot-table{border:1px solid var(--line);border-radius:16px;padding:0 16px;margin:20px 0}summary{min-height:48px;padding:14px 0;cursor:pointer;font-weight:700}.table-settings .saved-row{background:transparent}.member-check{padding:14px!important;border:1px solid var(--line);border-radius:14px;min-height:52px;gap:12px;align-items:center;margin:8px 0}.member-check:has(input:checked){background:#edf5cf;border-color:#809347}.member-check input{width:22px;height:22px;min-height:22px;flex:0 0 22px;accent-color:#53682b}.social-form input:not([type=checkbox]),.social-form select{min-width:0;width:100%;font-size:1rem;min-height:52px}.social-form fieldset{min-width:0}.saved-row>span{min-width:0}.saved-row small{line-height:1.5}.social-shell .empty-dinners,.empty-dinners{padding:24px;border:1px dashed #b9baa8;border-radius:20px;line-height:1.6;color:var(--muted)}
.invite-card{background:var(--paper);border:1px solid var(--line);border-radius:28px;box-shadow:0 8px 0 #e7e4d5;display:flex;flex-direction:column;align-items:center;gap:14px;text-align:center;padding:28px;margin:20px 0 28px}.invite-card h2{font-size:clamp(1.5rem,5vw,2rem);margin:0}.invite-card h3{font-size:1.6rem;margin:0}.invite-card p{margin:0;line-height:1.5}.invite-card canvas{display:block;width:320px;max-width:100%;height:auto;aspect-ratio:1;background:white;border-radius:12px}.invite-card .joined-count{padding:8px 16px;border-radius:999px;background:#edf5cf;color:#394622;font-weight:700}.invite-card .button{width:100%;max-width:360px}.invite-card input{width:100%;min-width:0;font-size:14px;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--cream);min-height:48px}.invite-card #mp-copy-status{min-height:24px;font-size:.875rem}#mp-invite-back{width:100%}
.waiting-card,.truce-reveal{text-align:center;border-radius:24px;background:#edf5cf;padding:32px 24px;margin:24px 0}.waiting-card h2{font-size:2rem;margin:16px 0 8px}.waiting-card p{line-height:1.6}.success-seal{display:inline-grid;place-items:center;width:64px;height:64px;border-radius:50%;background:var(--ink);color:white;font-size:2rem}.truce-reveal{padding:64px 24px;animation:truce-in .5s ease-out both}.truce-reveal h2{font-size:clamp(2rem,6vw,3rem);margin:20px 0}.live-winner{position:relative;border:1px solid #a5b865;border-radius:28px;padding:36px 28px;margin:24px 0;background:var(--green);animation:truce-in .45s ease-out both}.live-winner h2{font-size:clamp(2.1rem,7vw,3.5rem);line-height:1.08;letter-spacing:-.045em;margin:24px 0}.live-winner p{line-height:1.6}.live-winner .vote-summary{justify-content:center;flex-wrap:wrap}.live-winner+.button{margin:8px 12px 12px 0}#mp-done{margin-bottom:12px}
.live-ballot{border:1px solid var(--line);border-radius:24px;background:var(--paper);padding:24px;margin:20px 0}.live-ballot h2{font-size:clamp(1.8rem,6.5vw,2.6rem);line-height:1.15;margin:24px 0 12px}.ballot-progress{appearance:none;display:block;width:100%;height:6px;border:0;border-radius:9px;margin-top:16px;overflow:hidden;background:#e5e4d8;color:var(--red-dark)}.ballot-progress::-webkit-progress-bar{background:#e5e4d8}.ballot-progress::-webkit-progress-value{background:var(--red-dark);border-radius:9px}.ballot-progress::-moz-progress-bar{background:var(--red-dark)}.ballot-hint{font-size:.875rem;line-height:1.5;color:var(--muted)}.live-ballot .vote-buttons{position:static;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;background:transparent;margin:20px 0 8px;padding:0}.live-ballot .vote-button{min-width:0;min-height:92px;padding:12px 4px;font-size:1rem}.live-ballot .vote-symbol{font-size:1.7rem}.live-ballot .result-actions{gap:10px;display:flex;flex-wrap:wrap}.live-ballot .result-actions>.button{flex:1 1 150px;font-size:.875rem;padding:12px}.live-ballot #mp-hide{width:100%}.save-pill{min-height:28px;font-size:.875rem;color:#40542b;font-weight:700;margin:12px 0 20px}.ballot-table .live-progress{border:0;padding:0;margin:0 0 12px}
.dinner-save-bar{gap:12px;align-items:center;flex-wrap:wrap}.dinner-save-bar>span{flex:1 1 180px;min-width:0}.dinner-save-bar>span>strong{display:block}.dinner-save-bar>div{display:flex;flex-wrap:wrap;gap:8px}.dinner-save-bar #dinner-save-status{display:block;min-height:24px;font-size:.875rem;margin-top:6px}.dinner-library{padding-bottom:24px}.dinner-library h2{font-size:1.5rem}.saved-dinner{border:1px solid var(--line);border-radius:20px;background:var(--paper);margin:14px 0;overflow:hidden}.dinner-resume{min-width:0}.dinner-resume strong{font-size:1.15rem}.dinner-resume span{line-height:1.5;overflow-wrap:anywhere}.dinner-resume small{color:var(--muted);font-size:.8125rem}.dinner-resume b{margin-top:8px;color:var(--red-dark)}dialog{max-height:calc(100dvh - 32px);overflow-y:auto;overscroll-behavior:contain;padding-bottom:max(24px,env(safe-area-inset-bottom))}.result-actions{gap:10px}.form-error:empty{display:none}
@keyframes truce-in{from{opacity:0;transform:translateY(12px) scale(.98)}to{opacity:1;transform:none}}
@media(max-width:480px){#multiplayer-layer{padding:12px max(16px,env(safe-area-inset-right)) 32px max(16px,env(safe-area-inset-left))}.live-ballot{padding:18px 14px}.live-progress{padding:18px 14px}.live-progress>div{gap:10px;grid-template-columns:minmax(0,1fr) minmax(94px,40%)}.invite-card{padding:22px 16px}.host-controls>.button{width:100%;margin-right:0}.live-winner{padding:28px 20px}.live-winner+.button,#mp-done{width:100%}.saved-dinner{flex-wrap:wrap}.saved-dinner>.text-button{margin-left:auto}.dinner-save-bar{margin:0 16px}.landing-copy h1{font-size:clamp(2.7rem,12vw,3.6rem)}.people-screen{padding:20px 16px}.flow-nav{flex-wrap:wrap}.button{line-height:1.3}.vote-buttons .key-hint{display:none}}
@media(max-height:500px) and (orientation:landscape){.mobile-vote-dock{position:static;margin:16px}.vote-buttons{position:static}.invite-card canvas{width:240px}.truce-reveal{padding:24px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

@media(max-width:760px){body.choosing:has(input:focus) .mobile-vote-dock{position:static;margin-top:20px;box-shadow:none}.mobile-vote-dock{flex-wrap:wrap}.mobile-vote-dock .button{white-space:normal}}
#multiplayer-layer h1:focus{outline:none}.dinner-save-bar>div{flex-shrink:1}.social-form.inline{grid-template-columns:minmax(0,1fr) auto}

/* Reserve the dock's actual wrapped height plus its bottom inset and breathing room. */
@media(max-width:760px){
 body.choosing{padding-bottom:0}
 body.choosing #main{padding-bottom:calc(max(100px,var(--voting-dock-height,140px)) + max(12px,env(safe-area-inset-bottom)) + 32px)}
 body.choosing .option-row{scroll-margin-bottom:calc(max(100px,var(--voting-dock-height,140px)) + env(safe-area-inset-bottom) + 44px)}
 .mobile-vote-dock{left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right))}
}

/* RC1: allow narrow screens and enlarged text to reflow instead of clipping. */
.topbar,.section-heading,.shortlist-header,.vote-top,.vote-bottom,.winner-top{flex-wrap:wrap}
.topbar>*{min-width:0}.brand-mark{flex-shrink:0}.brand{max-width:100%}
.dinner-modes{grid-template-columns:repeat(2,minmax(0,1fr))}
.dinner-modes button,.button,.search-submit,.near-me,.home-idea{max-width:100%;overflow-wrap:anywhere}
.dinner-modes strong{margin-top:28px}
.restaurant-search input,.restaurant-search select,.search-submit,.result-filter input,.result-filter select{height:auto;min-height:48px;line-height:1.5}
.restaurant-search,.result-filter,.optional-filters{min-width:0}
.restaurant-search>div,.result-filter>*,.setup-layout>*,.result-layout>*{min-width:0}
.live-ballot{container-type:inline-size}
.live-ballot .vote-button[aria-pressed=true]{border:2px solid var(--ink);background:var(--yellow)}
.invite-card #mp-copy-status{min-height:1.5em}
.social-form.inline{grid-template-columns:repeat(auto-fit,minmax(min(100%,10rem),1fr))}
.live-progress>div>span{overflow-wrap:anywhere}
#action-dialog,dialog{max-height:calc(100dvh - max(16px,env(safe-area-inset-top)) - max(16px,env(safe-area-inset-bottom)));overflow-y:auto}
@container(max-width:20rem){.live-ballot .vote-buttons{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){
 main{padding-left:max(20px,env(safe-area-inset-left));padding-right:max(20px,env(safe-area-inset-right))}
 #social-layer{padding-left:max(20px,env(safe-area-inset-left));padding-right:max(20px,env(safe-area-inset-right))}
 .vote-top .option-count{white-space:normal}
 .result-actions .button{flex:1 1 10rem;min-width:0}
 .restaurant-search{grid-template-columns:minmax(0,1fr) minmax(0,6.25rem)}
 .search-submit{grid-column:1/-1;white-space:normal}
 .near-me,.place-add,.load-more,.home-idea{min-height:48px}
}
@media(max-width:360px){.live-ballot .vote-buttons{grid-template-columns:repeat(2,minmax(0,1fr))}}
.dinner-modes strong{padding-right:0}
/* Destination navigation is a user-selected, ordinary external link. */
.map-choice-actions{display:grid;gap:12px;margin-top:24px}.map-choice-actions a{text-decoration:none}.map-destination-name{overflow-wrap:anywhere;margin-top:12px}.venue-links .map-directions{font-size:.875rem;padding:10px 15px;min-height:48px}.map-directions{margin-top:12px}#map-choice-dialog{max-width:420px}
@media(max-width:600px){#map-choice-dialog{margin:auto auto max(16px,env(safe-area-inset-bottom));width:calc(100% - 32px)}}
/* RC1 result actions: one shared layout for links and the directions button. */
.restaurant-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,9rem),1fr));gap:12px;margin-top:18px;min-width:0}
.restaurant-actions .restaurant-action{display:inline-flex;flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:center;gap:8px;min-height:48px;height:auto;padding:12px 14px;margin:0;border:1px solid var(--line);border-radius:12px;background:var(--paper);color:var(--ink);font-size:1rem;line-height:1.5;text-decoration:none;white-space:nowrap}
.restaurant-action>span{white-space:nowrap}.restaurant-action>.action-icon{display:block;width:18px;height:18px;flex:0 0 18px}
@media(max-width:760px){.venue-details.compact .restaurant-actions{display:none}}
