:root {
  --brand-green: #007a3f;
  --brand-red: #cc0000;
  --ink: #12231d;
  --panel: #13241feF;
  --cream: #f7f6ef;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--cream);
  background: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.startup-warning { position: fixed; z-index: 30; top: 12px; left: 12px; right: 12px; max-width: 680px; margin: 0 auto; padding: 14px 16px; border: 2px solid var(--brand-red); border-radius: 12px; background: #fff; color: #17251d; box-shadow: 0 12px 32px #0005; font-size: 14px; line-height: 1.45; }
.startup-warning code { font-weight: 800; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #6cdb9d; outline-offset: 2px; }
.app-shell { height: 100dvh; min-height: 640px; display: flex; flex-direction: column; overflow: hidden; }
.topbar { height: 64px; flex: none; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 clamp(12px,2vw,28px); background: #10211cf5; box-shadow: 0 2px 10px #0003; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; letter-spacing: -.05em; white-space: nowrap; font-size: clamp(16px,2vw,25px); }
.brand-logo { display: block; width: 44px; height: 44px; flex: none; object-fit: contain; filter: drop-shadow(0 2px 4px #0006); }
.brand-logo.big { width: min(128px, 42vw); height: auto; max-height: 117px; justify-self: center; }
.topbar-actions { display: flex; align-items: center; gap: 12px; font-weight: 800; white-space: nowrap; font-size: 13px; }
.connection { color: #81d4a0; font-size: 17px; }
.connection.offline { color: var(--brand-red); }
.menu-button { color: white; background: transparent; border: 0; border-left: 1px solid #76817a; padding: 3px 0 4px 16px; font-size: 24px; line-height: 1; }

.stage { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #e6e9e3; --sidebar-width: clamp(150px,24vw,330px); }
.map-fallback { position: absolute; inset: 0; background-color: #e9ece7; background-image: linear-gradient(20deg,transparent 44%,#ffffffc9 45%,#ffffffc9 48%,transparent 49%),linear-gradient(115deg,transparent 40%,#ffffffb8 41%,#ffffffb8 45%,transparent 46%),linear-gradient(80deg,transparent 50%,#d2ded0 51%,#d2ded0 54%,transparent 55%); background-size: 130px 120px,170px 160px,210px 190px; touch-action: none; cursor: grab; }
.map-tiles { position: absolute; inset: 0; overflow: hidden; touch-action: none; cursor: grab; }
.map-panning .map-tiles, .map-panning .map-fallback { cursor: grabbing; }
.map-tiles img { position: absolute; width: 256px; height: 256px; max-width: none; user-select: none; pointer-events: none; }
.map-route { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.map-route .route-halo { fill: none; stroke: white; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.map-route .route-line { fill: none; stroke: var(--brand-green); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.map-route .location-halo { fill: #fff; }
.map-route .location-dot { fill: #1876cf; }
.map-route .destination-halo { fill: #fff; }
.map-route .destination-dot { fill: var(--brand-green); }
.map-zoom { position: absolute; z-index: 3; right: 9px; top: 49%; transform: translateY(-50%); display: grid; gap: 3px; padding: 4px; border-radius: 12px; background: #fff; box-shadow: 0 5px 18px #0005; }
.map-zoom button { width: 43px; min-height: 38px; border: 0; border-radius: 8px; background: #f2f6f2; color: #123d28; font-size: 22px; font-weight: 800; line-height: 1; }
.map-zoom button:last-child { font-size: 11px; }
.map-zoom button:hover:not(:disabled) { background: #dceee2; }
.map-zoom button:disabled { opacity: .4; cursor: not-allowed; }
.stops-panel, .destination-panel { position: absolute; z-index: 2; background: var(--panel); box-shadow: 0 10px 28px #0005; backdrop-filter: blur(8px); }
.stops-panel { left: 12px; top: 12px; bottom: 12px; width: var(--sidebar-width); padding: 17px 12px; border-radius: 18px; display: flex; flex-direction: column; overflow: hidden; }
.stops-panel h2 { margin: 0 0 12px; color: #75d7a3; font-size: clamp(13px,2vw,20px); letter-spacing: .12em; white-space: nowrap; }
.stop-list { list-style: none; padding: 0; margin: 0; flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; justify-content: space-around; gap: 4px; scrollbar-width: thin; }
.stop-item { position: relative; display: flex; align-items: center; gap: 8px; min-height: 47px; border: 1px solid transparent; border-radius: 10px; padding: 6px 4px; }
.stop-item:not(:last-child):after { content: ""; position: absolute; left: 17px; top: calc(50% + 17px); bottom: -17px; border-left: 2px dashed #95a79b; z-index: -1; }
.stop-item.complete:not(:last-child):after { border-color: var(--brand-green); border-style: solid; }
.stop-item.active { background: #007a3f3b; border-color: #2da46a; }
.stop-number { width: 29px; height: 29px; flex: none; border: 2px solid #b8c6bc; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 13px; color: #fff; background: #1d3028; }
.stop-item.complete .stop-number { border-color: #48ba80; }
.stop-item.active .stop-number { background: var(--brand-green); border-color: var(--brand-green); }
.stop-copy { min-width: 0; display: block; font-size: clamp(11px,1.25vw,16px); font-weight: 800; line-height: 1.1; overflow-wrap: anywhere; }
.stop-copy small { display: block; color: #72dca4; font-size: 9px; font-weight: 900; letter-spacing: .08em; margin-top: 4px; }
.stop-check { color: #75d7a3; margin-left: auto; font-weight: 900; }
.stops-empty { color: #c4d1c6; font-size: 12px; line-height: 1.4; }
.destination-panel { top: 12px; right: 12px; width: min(370px,calc(100% - var(--sidebar-width) - 34px)); padding: 17px; border-radius: 18px; }
.panel-label { color: #75d7a3; font-size: 11px; font-weight: 900; letter-spacing: .13em; margin: 0 0 10px; }
.destination-meta .panel-label { display: flex; align-items: center; gap: 6px; min-width: 0; }
.beer-icon { width: 20px; height: 20px; flex: none; color: #12352a; }
.beer-fill { fill: #dfa94f; }
.beer-foam { fill: #fff8e9; }
.beer-outline { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.beer-highlight { fill: none; stroke: #fff8e9; stroke-width: 1.5; stroke-linecap: round; }
.destination-panel h1 { margin: 0 0 5px; font-size: clamp(20px,2.5vw,30px); line-height: 1.1; letter-spacing: -.04em; }
.destination-panel .address { color: #b4c5ba; font-size: 12px; line-height: 1.3; margin: 0 0 10px; overflow-wrap: anywhere; }
.destination-panel .eta { color: #e3f0e7; font-size: 12px; font-weight: 800; margin: 0 0 11px; }
.rule { border: 1px solid #536c5d; border-left: 4px solid var(--brand-green); padding: 8px 10px; border-radius: 7px; font-size: 12px; font-weight: 800; line-height: 1.3; }
.rule span { display: block; color: #75d7a3; font-size: 10px; letter-spacing: .08em; margin-bottom: 3px; }
.rule-pending { border-left-color: #d8b975; font-weight: 600; }
.destination-empty { color: #c4d1c6; font-size: 12px; line-height: 1.4; }
.map-actions { position: absolute; z-index: 2; right: 12px; bottom: 26px; display: grid; justify-items: end; gap: 6px; max-width: min(290px,calc(100% - var(--sidebar-width) - 30px)); }
.route-status { background: #13241fdd; color: #fff; padding: 8px 10px; border-radius: 8px; margin: 0; font-size: 11px; line-height: 1.3; text-align: right; }
.primary-button, .secondary-button, .danger-button { border: 0; border-radius: 10px; padding: 11px 14px; font-size: 13px; font-weight: 850; }
.primary-button { color: white; background: var(--brand-green); }
.primary-button:hover { background: #006535; }
.secondary-button { color: #183428; background: #e8f2eb; }
.secondary-button:hover { background: #d6e9dc; }
.danger-button { color: white; background: var(--brand-red); }
.primary-button:disabled, .secondary-button:disabled, .danger-button:disabled { opacity: .5; cursor: not-allowed; }
.map-link { color: #114e31; background: #ffffffdc; padding: 5px 8px; border-radius: 6px; font-size: 11px; font-weight: 800; }
.attribution { position: absolute; z-index: 1; right: 7px; bottom: 3px; background: #ffffffcb; color: #294436; font-size: 9px; text-decoration: none; }

.players-panel { flex: none; max-height: 35dvh; min-height: 140px; overflow: auto; padding: 12px 16px max(13px,env(safe-area-inset-bottom)); background: #10211cf7; box-shadow: 0 -5px 25px #0005; z-index: 4; }
.players-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 5px; margin-bottom: 8px; }
.players-heading h2 { margin: 0; font-size: 15px; letter-spacing: .08em; }
.players-heading h2 span { font-size: 12px; color: #8ed7aa; }
.players-heading>span { color: #b7c7bb; font-size: 10px; white-space: nowrap; }
.players-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.player-tile { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; background: #ffffff0b; border: 1px solid #ffffff1a; border-radius: 9px; padding: 5px 2px; color: white; }
.player-tile:hover { border-color: #7ac99b; }
.avatar { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--brand-green); color: white; object-fit: cover; font-size: 15px; font-weight: 900; }
.player-name { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 800; }
.player-role { color: #aebeb1; font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.player-role.admin { color: #82daa9; }
.crosses { display: flex; gap: 3px; }
.cross { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: #b4bdb6; background: #ffffff22; font-size: 12px; font-weight: 900; }
.cross.on { color: #fff; background: var(--brand-red); }
.penalty-badge { display: block; color: white; background: var(--brand-red); border-radius: 20px; padding: 2px 4px; font-size: 9px; font-weight: 900; white-space: nowrap; }
.player-empty { grid-column: 1/-1; color: #b7c7bb; font-size: 12px; padding: 15px 0; }

.modal { width: min(430px,calc(100vw - 24px)); max-height: min(90dvh,850px); border: 0; border-radius: 18px; padding: 0; background: #f8faf7; color: #17251d; box-shadow: 0 30px 90px #0008; }
.modal::backdrop { background: #06140dbb; }
#join-dialog .dialog-content { max-height: min(90dvh,850px); gap: 10px; overflow-y: auto; }
.dialog-content { position: relative; padding: 24px; display: grid; gap: 13px; }
.dialog-content .panel-label { color: var(--brand-green); margin: 0; }
.dialog-content h2 { font-size: 29px; letter-spacing: -.05em; margin: 0; }
.dialog-content h3 { font-size: 18px; margin: 10px 0 0; }
.dialog-content p { margin: 0; line-height: 1.45; }
.dialog-content>p:not(.panel-label) { color: #657267; font-size: 13px; }
.dialog-content label { display: grid; gap: 5px; font-size: 12px; font-weight: 800; }
.dialog-content label small { font-weight: 400; }
.dialog-content input, .dialog-content textarea, .dialog-content select { width: 100%; border: 1px solid #cbd8ce; border-radius: 8px; padding: 10px; background: white; color: #17251d; font-size: 14px; }
.dialog-content select:disabled { background: #e8eee9; color: #516b59; }
.role-note { color: #657267; font-size: 12px; }
.dialog-content textarea { resize: vertical; }
.close-button { position: absolute; right: 14px; top: 9px; border: 0; background: transparent; font-size: 27px; color: #375342; }
.score-controls, .form-actions, .manage-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.score-controls>* { flex: 1; }
.score-detail { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 700; }
.score-detail .cross { width: 31px; height: 31px; font-size: 19px; }
.score-detail p { width: 100%; font-size: 13px; }
.manage-modal { width: min(680px,calc(100vw - 20px)); overflow: hidden; }
.manage-content { max-height: calc(min(90dvh,850px) - 2px); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.manage-switch { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 5px; border-radius: 12px; background: #e6eee8; }
.manage-switch button { min-height: 43px; border: 0; border-radius: 9px; background: transparent; color: #375342; font-size: 13px; font-weight: 800; }
.manage-switch button[aria-pressed="true"] { background: var(--brand-green); color: white; box-shadow: 0 3px 9px #007a3f36; }
.manage-slide { display: grid; gap: 13px; min-width: 0; }
.manage-slide h2, .manage-slide h3 { margin: 0; }
.plan-form { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px; align-items: end; padding: 12px; border: 1px solid #bcd9c7; border-radius: 12px; background: #eaf5ed; }
.plan-form label { min-width: 0; }
.plan-form input { max-width: 110px; }
.plan-form #plan-available { align-self: center; text-align: right; }
.plan-form .primary-button, .plan-form .secondary-button, .plan-form p { grid-column: 1 / -1; }
.plan-form p { margin: 0; }
.manage-slide.slide-in-next { animation: slide-in-next .22s ease-out; }
.manage-slide.slide-in-back { animation: slide-in-back .22s ease-out; }
@keyframes slide-in-next { from { opacity: .5; transform: translateX(18px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slide-in-back { from { opacity: .5; transform: translateX(-18px); } to { opacity: 1; transform: translateX(0); } }
.slide-next { justify-self: start; border: 0; background: none; color: var(--brand-green); padding: 7px 0; font-size: 13px; font-weight: 800; }
.profile-preview { display: flex; align-items: center; gap: 14px; border: 1px solid #cbded1; border-radius: 14px; padding: 16px; background: #e9f4ed; }
.profile-preview .avatar { width: 70px; height: 70px; font-size: 30px; }
.profile-preview strong { display: block; font-size: 19px; overflow-wrap: anywhere; }
.profile-preview span:not(.avatar) { display: block; color: #657267; font-size: 12px; margin-top: 3px; }
.role-admin { display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid #d9e5dc; }
.role-admin h3 { margin: 0; }
.role-list { display: grid; gap: 8px; }
.role-item { display: grid; grid-template-columns: 34px minmax(0,1fr) auto auto; align-items: center; gap: 8px; padding: 8px; border: 1px solid #d9e5dc; border-radius: 10px; }
.role-item strong { min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
.role-item select { width: auto; min-width: 92px; }
.role-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.role-actions button { padding: 10px; font-size: 12px; }
.manage-list { list-style: none; margin: 4px 0; padding: 0; display: grid; gap: 6px; }
.rule-assignment-status { margin: 0; color: #16452c; font-size: 13px; font-weight: 800; }
.manage-item { display: grid; gap: 8px; padding: 10px; border: 1px solid #d9e5dc; border-radius: 9px; font-size: 13px; }
.manage-item.active { border-color: var(--brand-green); background: #e7f4ed; }
.manage-item-top, .manage-item-rule, .manage-item-order { display: flex; align-items: center; gap: 7px; }
.manage-item-copy, .manage-rule-copy { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.manage-item strong { display: block; overflow-wrap: anywhere; }
.manage-item small { display: block; color: #748578; font-size: 11px; font-weight: 400; }
.manage-item-rule { align-items: flex-start; justify-content: space-between; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid #d9e5dc; }
.manage-rule-copy { flex: 1 1 130px; }
.manage-rule-copy p { margin: 5px 0 0; color: #375342; font-size: 12px; line-height: 1.35; }
.rule-status { display: inline-block; padding: 4px 7px; border: 1px solid; border-radius: 6px; font-size: 11px; font-weight: 800; }
.rule-status.assigned { border-color: #a8d3b7; background: #e0f3e7; color: #075b2e; }
.rule-status.missing { border-color: #e8c373; background: #fff1d6; color: #754800; }
.manage-item button { border: 0; border-radius: 5px; background: #e8f2eb; color: #16452c; padding: 4px 6px; font-weight: 800; }
.manage-item-rule button { min-height: 36px; padding: 7px 9px; }
.manage-item button:disabled { opacity: .3; cursor: not-allowed; }
.stop-rule-editor { display: grid; gap: 10px; min-width: 0; padding: 12px; border: 1px solid #bcd9c7; border-radius: 12px; background: #eaf5ed; }
.stop-rule-editor h3 { margin: 0; }
.stop-rule-editor > p { margin: 0; }
.field-form { display: grid; gap: 10px; }
.field-form > #pub-search { justify-self: start; }
.rule-templates { min-width: 0; padding: 10px; border: 1px solid #cbd8ce; border-radius: 10px; background: #f8fbf8; }
.rule-templates summary { color: #16452c; font-size: 13px; font-weight: 800; cursor: pointer; }
.rule-templates[open] { display: grid; gap: 10px; }
.rule-template-list, .rule-template-group { display: grid; gap: 6px; }
.rule-template-group h4 { margin: 6px 0 2px; color: #657267; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.rule-template { width: 100%; border: 1px solid #cbd8ce; border-radius: 8px; padding: 9px 10px; background: #fff; color: #17251d; text-align: left; }
.rule-template:not(:disabled):hover, .rule-template:not(:disabled):focus-visible { border-color: var(--brand-green); background: #e7f4ed; }
.rule-template:disabled { opacity: .55; cursor: not-allowed; }
.rule-template strong, .rule-template span { display: block; }
.rule-template strong { font-size: 12px; }
.rule-template span { margin-top: 3px; color: #657267; font-size: 11px; line-height: 1.35; }
.rule-link-controls { display: grid; justify-items: start; gap: 6px; }
.rule-link-controls button { font-size: 12px; }
.rule-conflict { color: #a00000; font-size: 12px; font-weight: 800; }
.search-status { color: #657267; font-size: 12px; }
.search-results { display: grid; gap: 6px; }
.search-result { width: 100%; border: 1px solid #cbd8ce; border-radius: 8px; padding: 10px; background: #fff; color: #17251d; font: inherit; font-size: 12px; text-align: left; overflow-wrap: anywhere; }
.search-result:hover, .search-result:focus-visible { border-color: var(--brand-green); background: #e7f4ed; }
.pub-catalog { min-width: 0; padding: 12px; border: 1px solid #cbd8ce; border-radius: 12px; background: #f8fbf8; }
.pub-catalog summary { color: #16452c; font-weight: 800; cursor: pointer; }
.pub-catalog[open] { display: grid; gap: 10px; }
.pub-catalog p { margin: 0; }
.preset-list { display: grid; gap: 8px; }
.preset-card { display: grid; gap: 8px; min-width: 0; padding: 10px; border: 1px solid #d9e5dc; border-radius: 9px; background: #fff; }
.preset-card > strong { font-size: 14px; overflow-wrap: anywhere; }
.preset-card > small { color: #657267; font-size: 11px; }
.preset-preview summary { color: #16452c; font-size: 12px; font-weight: 800; cursor: pointer; }
.preset-preview ol { display: grid; gap: 7px; margin: 8px 0 0; padding-left: 20px; font-size: 12px; }
.preset-preview li { overflow-wrap: anywhere; }
.preset-preview li small { display: block; margin-top: 2px; color: #657267; line-height: 1.35; }
.preset-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.preset-actions button { font-size: 12px; }
.catalog-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.catalog-actions button { padding: 8px 10px; font-size: 12px; }
.pub-catalog label { display: grid; gap: 5px; font-size: 12px; font-weight: 700; }
.pub-catalog input { width: 100%; min-width: 0; border: 1px solid #b8c8bb; border-radius: 8px; padding: 10px; font: inherit; }
.catalog-list { display: grid; gap: 6px; }
.catalog-item { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 9px; border: 1px solid #d9e5dc; border-radius: 9px; background: #fff; }
.catalog-item > div { flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; }
.catalog-item strong, .catalog-item small { display: block; }
.catalog-item strong { font-size: 13px; }
.catalog-item small { margin-top: 3px; color: #657267; font-size: 11px; }
.dialog-content .catalog-check { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-size: 12px; }
.dialog-content .catalog-check input { width: 18px; height: 18px; margin: 0; padding: 0; accent-color: var(--brand-green); }
.catalog-item button { min-height: 36px; padding: 7px 9px; font-size: 12px; }
.catalog-item button:disabled { opacity: .6; }
.catalog-item a, .catalog-credit a { color: var(--brand-green); font-size: 12px; font-weight: 700; }
.rule-library-list { display: grid; gap: 10px; }
.rule-library { display: grid; gap: 12px; }
.rule-library-item { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 9px; border: 1px solid #d9e5dc; border-radius: 9px; background: #fff; }
.rule-library-item > div { flex: 1 1 100%; min-width: 0; overflow-wrap: anywhere; }
.rule-library-item strong, .rule-library-item small { display: block; }
.rule-library-item strong { font-size: 13px; }
.rule-library-item small { margin-top: 3px; color: #657267; font-size: 11px; line-height: 1.35; }
.rule-library-item button { min-height: 36px; padding: 7px 9px; font-size: 12px; }
.rule-library-editor { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid #d9e5dc; }
.form-actions .primary-button { flex: 1; }
.muted { color: #657267; font-size: 13px; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 20px; transform: translate(-50%,120px); opacity: 0; background: #12231d; color: white; border-radius: 9px; box-shadow: 0 10px 30px #0006; padding: 11px 15px; font-size: 13px; transition: .2s; max-width: 90vw; }
.toast.show { transform: translate(-50%,0); opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .manage-slide.slide-in-next, .manage-slide.slide-in-back { animation: none; }
}
@media (max-width: 650px) {
  .plan-form { grid-template-columns: 1fr; }
  .plan-form #plan-available { text-align: left; }
  .role-item { grid-template-columns: 34px minmax(0,1fr) auto; }
  .role-actions { grid-column: 2 / -1; }
  .topbar { height: 58px; }
  .brand { gap: 6px; font-size: 16px; }
  .brand-logo { width: 36px; height: 36px; }
  .brand-logo.big { width: 116px; max-height: 106px; }
  .topbar-actions { gap: 7px; font-size: 11px; }
  .menu-button { padding-left: 9px; }
  .stage { --sidebar-width: clamp(142px,40vw,168px); }
  .stops-panel { left: 6px; top: 7px; bottom: 7px; padding: 12px 7px; border-radius: 13px; }
  .stops-panel h2 { font-size: 12px; letter-spacing: .07em; margin-bottom: 5px; }
  .stop-item { min-height: 45px; gap: 5px; padding: 3px 2px; }
  .stop-number { width: 25px; height: 25px; font-size: 11px; }
  .stop-item:not(:last-child):after { left: 14px; top: calc(50% + 14px); bottom: -14px; }
  .stop-copy { font-size: 11px; }
  .stop-copy small { font-size: 8px; }
  .destination-panel { left: calc(var(--sidebar-width) + 12px); right: 6px; width: auto; top: 7px; padding: 10px; border-radius: 12px; }
  .destination-panel h1 { font-size: 18px; }
  .destination-panel .address { font-size: 10px; }
  .destination-panel .eta { font-size: 11px; margin-bottom: 7px; }
  .destination-panel .panel-label { font-size: 9px; margin-bottom: 6px; }
  .rule { padding: 6px; font-size: 11px; }
  .map-actions { right: 6px; bottom: 22px; max-width: calc(100% - var(--sidebar-width) - 20px); }
  .route-status { font-size: 10px; padding: 6px; }
  .players-panel { padding: 9px 7px max(8px,env(safe-area-inset-bottom)); max-height: 34dvh; }
  .players-grid { gap: 3px; }
  .player-tile { padding: 4px 1px; }
}

/* Weihnachts-Tourfahrplan: eine Lichterkette, klare Wegweiser, lesbare Daten. */
.christmas-theme {
  --winter-pine: #12352a;
  --winter-paper: #f7f7f2;
  --winter-ink: #12352a;
  --winter-muted: #4c6257;
  --winter-light: #f5ce83;
  --panel: #12352a;
  --cream: #f7f7f2;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--winter-paper);
  background: var(--winter-pine);
}
.christmas-theme button,
.christmas-theme a { -webkit-tap-highlight-color: transparent; }
.christmas-theme button:active:not(:disabled) { transform: translateY(1px); }
.christmas-theme :where(select, summary, .stop-list, .destination-panel, .players-panel):focus-visible { outline: 3px solid #f5ce83; outline-offset: 2px; }
.christmas-theme .topbar {
  position: relative;
  height: 68px;
  padding-inline: clamp(10px, 2vw, 24px);
  background: var(--winter-pine);
  border-bottom: 1px solid #f5ce834f;
  box-shadow: 0 4px 20px #081d1655;
}
.christmas-theme .brand { gap: 10px; letter-spacing: 0; }
.christmas-theme .brand-logo { width: 44px; height: 44px; padding: 2px; border: 1px solid #f5ce83; border-radius: 10px; background: #f7f7f2; }
.christmas-theme .brand-logo.big { width: min(128px, 42vw); height: auto; max-height: 117px; padding: 0; border: 0; background: transparent; }
.christmas-theme .brand-copy { display: grid; gap: 3px; line-height: 1; }
.christmas-theme .brand-copy strong { font-size: 19px; font-weight: 850; letter-spacing: -.045em; }
.christmas-theme .brand-copy small { color: #f5ce83; font-size: 10px; font-weight: 750; letter-spacing: .13em; }
.christmas-theme .topbar-actions { gap: 10px; }
.christmas-theme #progress { padding: 8px 11px; border: 1px solid #f5ce8370; border-radius: 8px; color: #fff9e9; background: #ffffff0b; font-size: 12px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.christmas-theme .connection { color: #93dab2; }
.christmas-theme .menu-button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid #f5ce8370; border-radius: 10px; background: #ffffff0b; font-size: 23px; }
.christmas-theme .menu-button:hover { background: #ffffff1b; }
.holiday-garland { display: none; }
.christmas-theme .holiday-garland { display: block; position: absolute; z-index: 6; left: 0; bottom: -18px; width: 100%; height: 26px; pointer-events: none; filter: drop-shadow(0 2px 2px #081d1677); }
.christmas-theme .stage { --sidebar-width: clamp(190px, 23vw, 320px); background: #dfe8e0; }
.christmas-theme .map-fallback { background-color: #e4ece5; background-image: linear-gradient(#d2ded4 1px,transparent 1px),linear-gradient(90deg,#d2ded4 1px,transparent 1px),linear-gradient(115deg,transparent 47%,#f7faf5 48%,#f7faf5 50%,transparent 51%); background-size: 118px 118px,118px 118px,340px 300px; }
.christmas-theme .map-zoom { border: 1px solid #c5d3c8; border-radius: 12px; background: #f7f7f2; box-shadow: 0 6px 20px #12352a40; }
.christmas-theme .map-zoom button { min-width: 44px; min-height: 44px; background: #f7f7f2; }
.christmas-theme .stops-panel {
  top: 18px;
  bottom: 0;
  left: 0;
  width: var(--sidebar-width);
  padding: 22px 16px 18px;
  border: 0;
  border-right: 1px solid #f5ce836b;
  border-radius: 0 18px 0 0;
  background: #12352a;
  box-shadow: 8px 0 28px #09221938;
  backdrop-filter: none;
}
.christmas-theme .stops-panel h2 { margin-bottom: 18px; color: #f5ce83; font-size: 12px; font-weight: 850; letter-spacing: .12em; }
.christmas-theme .stop-list { justify-content: flex-start; gap: 8px; padding-right: 3px; }
.christmas-theme .stop-item { min-height: 51px; padding: 7px 6px; border-radius: 10px; }
.christmas-theme .stop-item:not(:last-child):after { left: 21px; top: calc(50% + 18px); bottom: -20px; border-color: #95bca399; }
.christmas-theme .stop-item.complete:not(:last-child):after { border-color: #82c89d; }
.christmas-theme .stop-number { width: 31px; height: 31px; border: 2px solid #9bb8a4; background: #12352a; font-size: 12px; font-variant-numeric: tabular-nums; }
.christmas-theme .stop-item.complete .stop-number { border-color: #82c89d; }
.christmas-theme .stop-item.active { border-color: #f7f7f2; background: #f7f7f2; box-shadow: 0 6px 14px #071b153d; }
.christmas-theme .stop-item.active .stop-number { border-color: var(--brand-green); background: var(--brand-green); color: #fff; }
.christmas-theme .stop-item.active .stop-copy { color: var(--winter-ink); }
.christmas-theme .stop-copy { color: #fff; font-size: 13px; font-weight: 730; line-height: 1.23; }
.christmas-theme .stop-copy small { color: #cc0000; font-size: 10px; font-weight: 850; letter-spacing: .03em; }
.christmas-theme .stop-check { color: #f5ce83; font-size: 14px; }
.christmas-theme .stops-empty { color: #d9e6d9; font-size: 13px; }
.christmas-theme .destination-panel {
  top: 18px;
  right: 16px;
  width: min(380px, calc(100% - var(--sidebar-width) - 32px));
  padding: 17px;
  border: 1px solid #d5e0d6;
  border-top: 4px solid #d9aa60;
  border-radius: 15px;
  background: var(--winter-paper);
  box-shadow: 0 10px 30px #12352a3d;
  color: var(--winter-ink);
  backdrop-filter: none;
}
.christmas-theme .destination-meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 7px; }
.christmas-theme .destination-panel .panel-label { margin: 0; padding-top: 4px; color: #a40000; font-size: 12px; font-weight: 850; letter-spacing: .07em; }
.christmas-theme .destination-counter { color: var(--brand-red); font-size: 27px; font-weight: 850; font-variant-numeric: tabular-nums; line-height: 1; }
.christmas-theme .destination-panel h1 { margin-bottom: 7px; font: 820 clamp(23px, 2.5vw, 31px)/1.07 system-ui, sans-serif; letter-spacing: -.045em; overflow-wrap: anywhere; }
.christmas-theme .destination-panel .address { color: var(--winter-muted); font-size: 13px; line-height: 1.35; }
.christmas-theme .destination-panel .eta { color: #075c33; font-size: 12px; }
.christmas-theme .destination-empty { color: var(--winter-muted); font-size: 13px; }
.christmas-theme .rule { padding: 10px 11px; border: 0; border-left: 3px solid var(--brand-red); border-radius: 8px; background: #e9f0e9; color: var(--winter-ink); font-size: 13px; font-weight: 700; line-height: 1.35; }
.christmas-theme .rule span { color: #a40000; font-size: 11px; letter-spacing: .04em; }
.christmas-theme .rule-pending { border-left-color: #a67623; }
.christmas-theme .rule-pending span { color: #6b4d1c; }
.christmas-theme .stop-timer { display: grid; gap: 9px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #cad9cb; }
.christmas-theme .timer-copy { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
.christmas-theme .timer-copy span { color: #456251; font-size: 10px; font-weight: 850; letter-spacing: .055em; line-height: 1.25; }
.christmas-theme .timer-copy strong { color: #075c33; font-size: 27px; font-weight: 850; font-variant-numeric: tabular-nums; line-height: 1; }
.christmas-theme .stop-timer.expired .timer-copy strong { color: var(--brand-red); }
.christmas-theme .timer-controls { display: flex; flex-wrap: wrap; gap: 6px; }
.christmas-theme .timer-controls button { flex: 1 1 auto; min-height: 44px; padding: 8px 10px; font-size: 12px; }
.christmas-theme .map-actions { right: 16px; bottom: 30px; gap: 7px; max-width: min(300px, calc(100% - var(--sidebar-width) - 32px)); }
.christmas-theme .route-status { max-width: 280px; margin: 0; padding: 8px 11px; border: 1px solid #d1ded2; border-radius: 9px; background: #f7f7f2f7; color: var(--winter-ink); font-size: 12px; box-shadow: 0 4px 12px #12352a2c; }
.christmas-theme .map-actions .primary-button { min-height: 48px; padding-inline: 17px; background: var(--brand-green); box-shadow: 0 6px 18px #0b482e52; }
.christmas-theme .map-actions .primary-button:hover { background: #006535; }
.christmas-theme .map-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding-inline: 11px; border: 1px solid #c8d8ca; border-radius: 8px; background: #f7f7f2f7; color: #075c33; font-size: 12px; text-decoration: none; box-shadow: 0 4px 12px #12352a24; }
.christmas-theme .map-link:hover { text-decoration: underline; }
.christmas-theme .players-panel { position: relative; min-height: 150px; max-height: 38dvh; padding: 13px 16px max(13px, env(safe-area-inset-bottom)); border-top: 3px solid var(--brand-green); background: #edf2ec; color: var(--winter-ink); box-shadow: 0 -4px 18px #12352a26; }
.christmas-theme .players-heading { align-items: center; margin-bottom: 10px; }
.christmas-theme .players-heading h2 { color: var(--winter-ink); font-size: 14px; letter-spacing: .08em; }
.christmas-theme .players-heading h2 span { color: #075c33; font-size: 13px; }
.christmas-theme .players-heading>span { color: var(--winter-muted); font-size: 12px; }
.christmas-theme .players-grid { gap: 8px; }
.christmas-theme .player-tile { min-height: 104px; padding: 9px 5px; gap: 2px; border: 1px solid #cbd9cd; border-radius: 11px; background: #fff; color: var(--winter-ink); box-shadow: none; }
.christmas-theme .player-tile:hover { border-color: var(--brand-green); }
.christmas-theme .avatar { width: 34px; height: 34px; background: var(--brand-green); font-size: 17px; }
.christmas-theme .player-name { font-size: 13px; }
.christmas-theme .player-role { color: var(--winter-muted); font-size: 11px; letter-spacing: .03em; }
.christmas-theme .player-role.admin { color: #ad0000; }
.christmas-theme .cross { width: 21px; height: 21px; background: #e9eeea; color: #667b6e; font-size: 13px; }
.christmas-theme .cross.on { background: var(--brand-red); color: #fff; }
.christmas-theme .penalty-badge { padding: 3px 7px; font-size: 11px; }
.christmas-theme .player-empty { color: var(--winter-muted); font-size: 13px; }
.christmas-theme .modal { border: 1px solid #c8d6c9; border-radius: 17px; background: var(--winter-paper); color: var(--winter-ink); box-shadow: 0 28px 70px #071b1599; }
.christmas-theme .modal::backdrop { background: #071b15d6; }
.christmas-theme .dialog-content { gap: 14px; padding: clamp(18px, 4vw, 28px); }
.christmas-theme .dialog-content .panel-label { color: #a40000; font-size: 12px; letter-spacing: .08em; }
.christmas-theme .dialog-content h2 { color: var(--winter-ink); font-family: system-ui, sans-serif; font-size: 25px; font-weight: 800; letter-spacing: -.035em; }
.christmas-theme .dialog-content>p:not(.panel-label) { color: var(--winter-muted); font-size: 14px; }
.christmas-theme .dialog-content label { font-size: 13px; }
.christmas-theme .dialog-content input,
.christmas-theme .dialog-content textarea,
.christmas-theme .dialog-content select { min-height: 44px; border-color: #b9cbbb; border-radius: 8px; background: #fff; color: var(--winter-ink); font-size: 15px; }
.christmas-theme .dialog-content input:focus,
.christmas-theme .dialog-content textarea:focus,
.christmas-theme .dialog-content select:focus { border-color: var(--brand-green); }
.christmas-theme .location-optin { display: grid; gap: 5px; padding: 9px; border: 1px solid #cbd9cd; border-radius: 10px; background: #eef3ec; }
.christmas-theme .location-optin button { width: 100%; min-height: 42px; padding: 8px 10px; }
.christmas-theme .location-optin p { margin: 0; color: var(--winter-muted); font-size: 11px; line-height: 1.35; }
.christmas-theme .dialog-content>p.remove-player-error { color: #a40000; font-weight: 700; }
.christmas-theme .remove-player-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.christmas-theme .remove-player-actions button { flex: 1 1 135px; }
.christmas-theme .primary-button,
.christmas-theme .secondary-button,
.christmas-theme .danger-button { min-height: 44px; border-radius: 8px; font-size: 14px; }
.christmas-theme .primary-button { background: var(--brand-green); }
.christmas-theme .secondary-button { background: #e3ede3; color: #16422d; }
.christmas-theme #logout { justify-self: start; border: 1px solid #cbd9cd; background: #fff; }
.christmas-theme .danger-button { background: var(--brand-red); }
.christmas-theme .close-button { display: grid; place-items: center; top: 8px; right: 8px; width: 44px; height: 44px; border-radius: 9px; color: var(--winter-ink); }
.christmas-theme .close-button:hover { background: #e3ede3; }
.christmas-theme .manage-switch { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 5px; border: 1px solid #cbd9cd; border-radius: 10px; background: #e9efe8; }
.christmas-theme .manage-switch.player-view { grid-template-columns: 1fr; }
.christmas-theme .manage-switch button { min-height: 46px; border-radius: 7px; color: #3f594b; font-size: 13px; }
.christmas-theme .manage-switch button[aria-pressed="true"] { background: var(--brand-green); color: #fff; box-shadow: none; }
.christmas-theme .plan-form,
.christmas-theme .stop-rule-editor,
.christmas-theme .rule-templates,
.christmas-theme .pub-catalog,
.christmas-theme .profile-preview { border-color: #cbd9cd; background: #eef3ec; }
.christmas-theme .manage-item,
.christmas-theme .catalog-item,
.christmas-theme .rule-library-item,
.christmas-theme .preset-card,
.christmas-theme .role-item { border-color: #d2dfd3; border-radius: 9px; background: #fff; }
.christmas-theme .manage-item.active { border-color: var(--brand-green); background: #edf5ed; }
.christmas-theme .manage-item button { min-height: 40px; padding: 8px 10px; border-radius: 7px; font-size: 13px; }
.christmas-theme .timing-summary { display: grid; gap: 5px; padding: 15px; border: 1px solid #c8d9cb; border-left: 4px solid var(--brand-green); border-radius: 10px; background: #f4f8f2; }
.christmas-theme .timing-summary h3 { color: #a40000; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.christmas-theme .timing-summary strong { color: #12352a; font-size: 20px; line-height: 1.2; }
.christmas-theme .timing-summary p { margin: 0; line-height: 1.4; }
.christmas-theme .timing-summary button { justify-self: start; min-height: 44px; margin-top: 4px; }
.christmas-theme .manage-item-time { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; padding-top: 8px; border-top: 1px solid #d9e5dc; color: #214833; font-weight: 700; }
.christmas-theme .stay-form { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.christmas-theme .stay-form label { display: inline-flex; align-items: center; gap: 6px; }
.christmas-theme .stay-form input { width: 72px; min-height: 44px; padding: 7px; text-align: center; font-variant-numeric: tabular-nums; }
.christmas-theme .stay-form button { min-height: 44px; }
.christmas-theme .walk-leg { color: #536b58; font-size: 12px; font-weight: 650; }
.christmas-theme .rule-status.assigned { color: #075b2e; }
.christmas-theme .rule-status.missing { color: #754800; }
.christmas-theme .plan-help { grid-column: 1 / -1; border-top: 1px solid #cbd9cd; padding-top: 10px; }
.christmas-theme .plan-help summary { color: #16422d; font-size: 13px; font-weight: 750; cursor: pointer; }
.christmas-theme .plan-help p { margin: 8px 0 0; }
.christmas-theme .muted,
.christmas-theme .search-status,
.christmas-theme .role-note { color: var(--winter-muted); }
.christmas-theme .toast { border-radius: 9px; background: #12352a; color: #fff; }
@media (max-width: 650px) {
  .christmas-theme .app-shell { height: auto; min-height: 100dvh; overflow: visible; }
  .christmas-theme .topbar { height: 64px; padding-inline: 9px; }
  .christmas-theme .topbar { position: sticky; top: 0; }
  .christmas-theme .brand { gap: 7px; }
  .christmas-theme .brand-logo { width: 36px; height: 36px; }
  .christmas-theme .brand-logo.big { width: 94px; max-height: 86px; }
  .christmas-theme #join-dialog .dialog-content { gap: 8px; }
  .christmas-theme .brand-copy strong { font-size: 16px; }
  .christmas-theme .brand-copy small { font-size: 8px; letter-spacing: .08em; }
  .christmas-theme .topbar-actions { gap: 5px; }
  .christmas-theme #progress { padding: 7px 6px; font-size: 11px; }
  .christmas-theme .menu-button { width: 44px; height: 44px; }
  .christmas-theme .stage { --sidebar-width: clamp(106px, 28vw, 136px); flex: none; height: max(500px, calc(var(--destination-height, 220px) + var(--route-actions-height, 150px) + 111px)); min-height: 500px; }
  .christmas-theme .stops-panel { top: 18px; bottom: auto; left: 8px; height: auto; max-height: min(235px, 42dvh); padding: 10px 6px 8px; border: 1px solid #f5ce836b; border-radius: 13px; }
  .christmas-theme .stops-panel h2 { margin-bottom: 8px; font-size: 10px; }
  .christmas-theme .stop-list { flex: 0 1 auto; gap: 4px; scrollbar-width: thin; overscroll-behavior: contain; }
  .christmas-theme .stop-item { min-height: 42px; gap: 4px; padding: 3px 2px; }
  .christmas-theme .stop-item:not(:last-child):after { left: 16px; top: calc(50% + 17px); bottom: -20px; }
  .christmas-theme .stop-number { width: 25px; height: 25px; font-size: 10px; }
  .christmas-theme .stop-copy { font-size: 11px; }
  .christmas-theme .stop-copy small { font-size: 9px; }
  .christmas-theme .destination-panel { left: auto; right: 8px; width: min(240px, calc(100% - var(--sidebar-width) - 24px)); max-height: min(225px, 42dvh); top: 18px; padding: 8px; overflow-y: auto; scrollbar-width: thin; overscroll-behavior: contain; }
  .christmas-theme .destination-meta { margin-bottom: 4px; }
  .christmas-theme .destination-panel .panel-label { gap: 4px; font-size: 9px; }
  .christmas-theme .beer-icon { width: 16px; height: 16px; }
  .christmas-theme .destination-counter { font-size: 20px; }
  .christmas-theme .destination-panel h1 { margin-bottom: 4px; font-size: 19px; }
  .christmas-theme .destination-panel .address { margin-bottom: 6px; font-size: 11px; }
  .christmas-theme .destination-panel .eta { margin-bottom: 6px; }
  .christmas-theme .rule { padding: 6px 7px; font-size: 11px; }
  .christmas-theme .rule span { display: inline; margin: 0 5px 0 0; }
  .christmas-theme .stop-timer { gap: 6px; margin-top: 7px; padding-top: 7px; }
  .christmas-theme .timer-copy { flex-wrap: nowrap; gap: 6px; }
  .christmas-theme .timer-copy span { flex: 1; min-width: 0; font-size: 9px; }
  .christmas-theme .timer-copy strong { flex: none; font-size: 19px; }
  .christmas-theme .map-actions { right: 8px; bottom: 19px; gap: 4px; max-width: calc(100% - var(--sidebar-width) - 17px); }
  .christmas-theme .map-actions .primary-button { min-height: 44px; padding: 8px 10px; font-size: 12px; }
  .christmas-theme .map-link { padding-inline: 8px; font-size: 11px; }
  .christmas-theme .map-zoom { top: calc(26px + var(--destination-height, 220px)); right: 8px; bottom: auto; transform: none; display: flex; gap: 2px; padding: 3px; }
  .christmas-theme .route-status { max-width: 210px; padding: 4px 7px; font-size: 10px; }
  .christmas-theme .players-panel { flex: 1 0 auto; max-height: none; padding: 13px 9px max(10px, env(safe-area-inset-bottom)); }
  .christmas-theme .players-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .christmas-theme .player-tile { min-height: 98px; padding: 7px 3px; }
  .christmas-theme .manage-switch { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 355px) {
  .christmas-theme .brand-copy strong { font-size: 14px; }
  .christmas-theme .brand-copy small { font-size: 7px; }
  .christmas-theme #progress { font-size: 10px; }
  .christmas-theme .stop-copy { font-size: 11px; }
  .christmas-theme .destination-panel h1 { font-size: 20px; }
}
@media (max-width: 300px) {
  .christmas-theme .topbar { height: auto; min-height: 64px; flex-wrap: wrap; gap: 7px; padding-block: 8px; }
  .christmas-theme .brand { flex: 1 1 100%; }
  .christmas-theme .topbar-actions { width: 100%; justify-content: space-between; }
  .christmas-theme .stage { display: grid; gap: 12px; height: auto; padding: 20px 8px; min-height: 0; overflow: visible; }
  .christmas-theme .map-fallback,
  .christmas-theme .map-tiles,
  .christmas-theme .map-route { position: absolute; inset: auto 0 0; height: 300px; }
  .christmas-theme .stops-panel,
  .christmas-theme .destination-panel,
  .christmas-theme .map-actions { position: relative; inset: auto; width: auto; max-width: none; }
  .christmas-theme .stops-panel { height: auto; min-height: 0; max-height: 360px; border-radius: 12px; }
  .christmas-theme .destination-panel { max-height: none; padding: 14px; overflow: visible; }
  .christmas-theme .map-actions { min-height: 280px; align-content: end; justify-items: stretch; }
  .christmas-theme .map-zoom { top: auto; bottom: 180px; }
  .christmas-theme .players-panel { max-height: none; }
  .christmas-theme .players-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .christmas-theme .toast { transition: none; }
}
@media (prefers-contrast: more) {
  .christmas-theme .stops-panel { border-right-color: #fff; }
  .christmas-theme .player-tile,
  .christmas-theme .destination-panel,
  .christmas-theme .modal { border-color: #12352a; }
}
