/* Scoped adoption of the Vereinsportal group championship editor. */
.portal-editor-dialog{--primary:#cc142c;--border:#e1dfdc;--muted:#746e68;width:min(1120px,96vw);max-width:1120px;max-height:94dvh;overflow:auto;border:1px solid var(--border);border-radius:.8rem;background:#fff;color:#24272e;font-family:var(--app-font-sans,Inter,"Segoe UI",sans-serif);font-size:14px;line-height:1.5}
.portal-editor-dialog form{padding:1.2rem;display:grid;gap:1rem}
.portal-editor-dialog .dialog-head{margin:0;align-items:flex-start;gap:1rem}.portal-editor-dialog .dialog-head h2{font-size:1.25rem;font-weight:600;line-height:1.4}
.portal-editor-dialog .dialog-head p,.portal-editor-dialog .muted{font-size:.8rem;font-weight:400;line-height:1.4;margin:.2rem 0 0}
.portal-editor-dialog :is(h3,h4,legend){font-size:1rem;font-weight:600;line-height:1.4;margin:0}
.portal-editor-dialog label{font-family:inherit;font-size:.875rem;font-weight:500;line-height:1.4;gap:.35rem;color:inherit;min-width:0}
.portal-editor-dialog :is(input:not([type=checkbox]):not([type=radio]),select,textarea){font-family:inherit;font-size:.875rem;font-weight:400;line-height:1.4;width:100%;min-width:0;background:#fff;color:inherit;border:1px solid var(--border);border-radius:.375rem;padding:.55rem .65rem;box-shadow:none}
.portal-editor-dialog :is(input:not([type=checkbox]):not([type=radio]),select){min-height:2.4rem}
.portal-editor-dialog :is(input[type=checkbox],input[type=radio]){accent-color:var(--primary);width:auto}
.portal-editor-dialog :is(.button,.compact-button){font:500 .875rem/1.4 var(--app-font-sans,Inter,"Segoe UI",sans-serif);min-height:2.25rem;height:auto;padding:.4rem .75rem;border:1px solid var(--primary);border-radius:.375rem;background:var(--primary);color:#fff;box-shadow:none}
.portal-editor-dialog :is(.button.secondary,.compact-button){background:#fff;color:inherit;border-color:var(--border)}
.portal-editor-dialog :is(.button.danger,.compact-button.danger){background:#fff;color:#dc2626;border-color:var(--border)}
.portal-editor-dialog .icon-button{display:grid;place-items:center;min-width:2.25rem;min-height:2.25rem;font-size:1.25rem;padding:0;border:0;background:none}
.portal-editor-dialog :is(.group-template-section,.portal-editor-box,.template-awards,.template-documents,.template-tier-card,.template-award-matrix,.group-award-editor,.group-award-level){display:grid;gap:.75rem;margin:0;padding:1rem;border:1px solid var(--border);border-radius:.75rem;background:#fff;box-shadow:none;min-width:0}
.portal-editor-dialog .portal-editor-panel>.grid{padding:1rem;border:1px solid var(--border);border-radius:.75rem;background:#fff}
.portal-editor-dialog .portal-panel-head{display:grid;gap:.2rem}.portal-editor-dialog .portal-panel-head h3{font-size:1.125rem;font-weight:600}.portal-editor-dialog .portal-panel-head p{font-size:.8rem;color:var(--muted);margin:0}
.admin-standard-editor{display:grid;gap:1rem;min-width:0}.admin-standard-editor [hidden]{display:none!important}
.portal-editor-tabs{position:sticky;top:-1.2rem;z-index:20;display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:.3rem;padding:.4rem;border:1px solid var(--border);border-radius:.5rem;background:#f0efed}
.portal-editor-tabs>[role=tab]{display:flex;align-items:center;justify-content:center;gap:.5rem;padding:.55rem .65rem;border:1px solid transparent;border-radius:.375rem;background:transparent;color:#746e68;font:500 .875rem/1.3 inherit;cursor:pointer;min-width:0;min-height:2.4rem}
.portal-editor-tabs>[aria-selected=true]{background:#fff;color:#24272e;border-color:var(--border)}
.portal-editor-tabs>[role=tab]{font-family:inherit;font-size:.875rem;font-weight:500;line-height:1.3}
.portal-editor-tabs>[role=tab]>span:last-child{min-width:0;overflow-wrap:anywhere;white-space:normal}
.template-collapsible-body>.portal-editor-tabs{position:static}
.portal-editor-dialog .danger-link{font:500 .875rem/1.4 Inter,"Segoe UI",sans-serif;min-height:2.25rem;padding:.4rem .75rem;border:1px solid var(--border);border-radius:.375rem;background:#fff;color:#dc2626}
.portal-tab-number{display:grid;place-items:center;flex:none;width:1.4rem;height:1.4rem;border:1px solid var(--border);border-radius:50%;background:#fff;font-size:.75rem}.portal-editor-tabs>[aria-selected=true] .portal-tab-number{background:var(--primary);border-color:var(--primary);color:#fff}
.portal-editor-panel{display:grid;gap:1rem;min-width:0}.portal-editor-nav{display:flex;align-items:center;justify-content:flex-end;gap:.55rem;flex-wrap:wrap;margin-left:auto}
.portal-editor-actions{position:sticky;bottom:-1.2rem;z-index:15;gap:.55rem;flex-wrap:wrap;background:#fff;padding:.8rem 0 0;margin:0;border-top:1px solid var(--border)}
.portal-editor-actions>.message{flex-basis:100%;margin:0}.portal-editor-actions>.message:empty{display:none}
.portal-editor-dialog :is(.template-stitch-editor,.template-pass-editor){margin:0;border:1px solid var(--border);border-radius:.5rem;overflow:clip;background:#0b0b0b05}
.portal-editor-dialog .template-pass-editor{background:#0b0b0b1c}
.portal-editor-dialog :is(.template-stitch-editor,.template-pass-editor)>summary{background:transparent;padding:.8rem 1rem;font-size:.875rem;font-weight:600;line-height:1.4}
.portal-editor-dialog .template-summary-meta{display:block;font-size:.8rem;font-weight:400;color:var(--muted);margin-top:.2rem}
.portal-editor-dialog .template-collapsible-body{padding:1rem;background:transparent}
.portal-editor-dialog .portal-stitch-program{background:transparent;border:0;padding:0}
.portal-editor-dialog :is(.template-weapon-choice,.group-choice-option,.group-counting-rounds label){background:#0b0b0b05;border:1px solid var(--border);border-radius:.5rem;font-size:.875rem;font-weight:400}
.portal-editor-dialog :is(.template-radio-choice,.template-scoring-choice span,.switch-row,.group-award-toggle-row){background:#fff;border-color:var(--border);font-size:.875rem;font-weight:400}
.portal-editor-dialog :is(.template-weapon-choice strong,.group-choice-option strong){font-size:.875rem;font-weight:600}
.portal-editor-dialog .template-award-section{border:0;padding:0;display:grid;gap:.75rem}.portal-editor-dialog .template-award-section+.template-award-section{padding-top:.75rem}
.portal-editor-dialog .portal-prize-choice{background:transparent;font-weight:400}.portal-editor-dialog .portal-prize-editor{background:#fff!important}
.portal-editor-dialog .switch-row input:checked+.switch,.portal-editor-dialog .group-switch input:checked+span{background:var(--primary)}
.portal-kind-info{padding:.85rem 1rem;background:#fff1f5;border:1px solid #f4c9d5;border-radius:.65rem;font-size:.875rem;line-height:1.5}
.portal-kind-info p{margin:.25rem 0}
@media(max-width:760px){.portal-editor-dialog{width:calc(100vw - 1rem);max-height:94dvh}.portal-editor-dialog form{padding:1rem}.portal-editor-dialog .grid.two{grid-template-columns:minmax(0,1fr)}.portal-editor-tabs{grid-template-columns:repeat(2,minmax(0,1fr));top:-1rem}.portal-editor-tabs>[role=tab]{justify-content:flex-start;text-align:left}.portal-editor-dialog .template-collapsible-body{padding:.75rem}.portal-editor-actions{position:static}.portal-editor-dialog .template-weapon-choices{grid-template-columns:minmax(0,1fr)}}
@media(max-width:480px){.template-collapsible-body>.portal-editor-tabs{grid-template-columns:minmax(0,1fr)}}

/* Explicit informational pink requested for the explanation of the selected event kind. */
.portal-kind-info {grid-column:1/-1;background:#fff1f5;border:1px solid #f4c9d5;border-radius:.65rem;padding:.85rem 1rem;color:#24272e;font-size:.875rem;line-height:1.5}
.portal-kind-info .feature-shoot-kind-title {display:block;font-size:1rem;font-weight:600;margin-bottom:.25rem}
.portal-kind-info p {margin:.25rem 0}
.portal-kind-info .feature-shoot-kind-tree {margin:1rem 0 0;text-align:center}
.portal-kind-info .feature-shoot-kind-tree-root {position:relative;display:grid;gap:.15rem;width:min(260px,100%);box-sizing:border-box;margin:auto;padding:.55rem;border:1px solid #e7b5c4;border-radius:.45rem;background:#fff}
.portal-kind-info .feature-shoot-kind-tree-root::after {content:"";position:absolute;left:50%;top:100%;height:18px;border-left:1px solid #bf8395}
.portal-kind-info .feature-shoot-kind-tree ul {position:relative;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));list-style:none;margin:18px 0 0;padding:0}
.portal-kind-info .feature-shoot-kind-tree ul::before {content:"";position:absolute;left:16.6667%;right:16.6667%;top:0;border-top:1px solid #bf8395}
.portal-kind-info .feature-shoot-kind-tree li {position:relative;padding:18px 4px 0;min-width:0}
.portal-kind-info .feature-shoot-kind-tree li::before {content:"";position:absolute;left:50%;top:0;height:18px;border-left:1px solid #bf8395}
.portal-kind-info .feature-shoot-kind-tree li>div {display:grid;gap:.15rem;height:100%;box-sizing:border-box;padding:.55rem .25rem;background:#fff;border:1px solid #e7b5c4;border-radius:.45rem;overflow-wrap:anywhere}
.portal-kind-info .feature-shoot-kind-tree strong {font-weight:600}
.portal-kind-info .feature-shoot-kind-tree span,.portal-kind-info .feature-shoot-kind-tree figcaption {font-size:.8rem;color:var(--muted)}
.portal-kind-info .feature-shoot-kind-tree figcaption {margin-top:.4rem}
.portal-kind-info .feature-shoot-kind-examples {list-style:disc;margin:.25rem 0 .75rem;padding-left:1.25rem}
.portal-kind-info .feature-shoot-kind-examples li+li {margin-top:.35rem}
.portal-kind-info .feature-shoot-stich-diagrams {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.5fr);gap:1.5rem}
.portal-kind-info .feature-shoot-stich-diagrams .feature-shoot-kind-tree {min-width:0;margin:.5rem 0}
.portal-kind-info .feature-shoot-kind-tree-single ul {grid-template-columns:minmax(0,1fr)}
.portal-kind-info .feature-shoot-kind-tree-single ul::before {content:none}
.portal-kind-info .feature-shoot-kind-tree-double ul {grid-template-columns:repeat(2,minmax(0,1fr))}
.portal-kind-info .feature-shoot-kind-tree-double ul::before {left:25%;right:25%}
@media(max-width:560px){.portal-kind-info .feature-shoot-stich-diagrams {grid-template-columns:minmax(0,1fr);gap:1.25rem}}
/* Seasonal groups and VM stiches use the same restrained disclosure design. */
.portal-kind-info details.feature-season-group {border:1px solid hsl(var(--border));border-radius:.75rem;padding:.85rem 1rem;min-width:0}
.portal-kind-info .feature-season-group>summary {display:flex;align-items:center;justify-content:space-between;gap:1rem;list-style:none;cursor:pointer}
.portal-kind-info .feature-season-group>summary::-webkit-details-marker {display:none}
.portal-kind-info .feature-season-group>summary h2 {margin:0;font-size:1.125rem;font-weight:600;line-height:1.4}
.portal-kind-info .feature-season-group>summary::after {content:"▾";flex:none;color:var(--muted);transform:rotate(-90deg)}
.portal-kind-info .feature-season-group[open]>summary::after {transform:rotate(0)}
.portal-kind-info .feature-season-group>summary~* {margin-top:.85rem}
body[data-feature-portal-design="vereinsmeisterschaft"] .feature-vm-stich-block {background:#0b0b0b05!important}
body[data-feature-portal-design="vereinsmeisterschaft"] .feature-vm-stich-block>[data-vm-stich-toggle] {grid-column:1/-1!important;grid-row:1;display:flex;align-items:center;justify-content:space-between;gap:1rem;min-width:0;width:100%;min-height:1.5rem;padding:0;border:0;background:transparent;text-align:left;font:inherit;font-size:.875rem;font-weight:600;line-height:1.4;cursor:pointer;overflow-wrap:anywhere}
body[data-feature-portal-design="vereinsmeisterschaft"] [data-vm-stich-toggle]::after {content:"▾";flex:none;color:var(--muted)}
body[data-feature-portal-design="vereinsmeisterschaft"] [data-vm-collapsed="true"]>[data-vm-stich-toggle]::after {transform:rotate(-90deg)}
body[data-feature-portal-design="vereinsmeisterschaft"] .feature-vm-stich-block>button:not([data-vm-stich-toggle]) {grid-row:2}
body[data-feature-portal-design="vereinsmeisterschaft"] .feature-vm-stich-block[data-vm-collapsed="true"]>:not([data-vm-stich-toggle]) {display:none!important}

/* Fest > Stich > Passe: each pass stays attached to its own shooting programme. */
.portal-kind-info .feature-shoot-kind-tree-fest>ul {align-items:start}
.portal-kind-info .feature-shoot-kind-tree-fest li>div {height:auto}
.portal-kind-info .feature-shoot-kind-tree-fest>ul>li>ul {grid-template-columns:minmax(0,1fr);gap:.5rem;margin:18px 0 0}
.portal-kind-info .feature-shoot-kind-tree-fest>ul>li>ul::before {left:50%;right:auto;top:-18px;bottom:0;border-top:0;border-left:1px solid #bf8395}
.portal-kind-info .feature-shoot-kind-tree-fest>ul>li>ul>li {padding:0}
.portal-kind-info .feature-shoot-kind-tree-fest>ul>li>ul>li::before {content:none}
.portal-kind-info .feature-shoot-kind-tree-fest>ul>li>ul>li>div {position:relative;padding:.55rem}
@media(max-width:640px){
 .portal-kind-info .feature-shoot-kind-tree-fest>.feature-shoot-kind-tree-root {width:100%}
 .portal-kind-info .feature-shoot-kind-tree-fest>.feature-shoot-kind-tree-root::after {left:10px}
 .portal-kind-info .feature-shoot-kind-tree-fest>ul {grid-template-columns:minmax(0,1fr);gap:1rem;padding-left:28px}
 .portal-kind-info .feature-shoot-kind-tree-fest>ul::before {left:10px;right:auto;bottom:0;border-top:0;border-left:1px solid #bf8395}
 .portal-kind-info .feature-shoot-kind-tree-fest>ul>li {padding:0}
 .portal-kind-info .feature-shoot-kind-tree-fest>ul>li::before {left:-18px;top:30px;width:18px;height:0;border-left:0;border-top:1px solid #bf8395}
}
