/* Redaktion – ruhige Arbeitsoberfläche in den Vereinsfarben */
@font-face { font-family: "Hanken Grotesk"; src: url("../fonts/hankengrotesk.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Big Shoulders"; src: url("../fonts/bigshoulders.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #f1f2f0; --panel: #fff; --line: #dcdfdb; --ink: #0b1a24; --muted: #56636c;
  --navy: #06304a; --red: #c71e19; --ok: #1d6b3a; --ok-bg: #e3f2e7; --err-bg: #fbe4e2;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}
* { box-sizing: border-box; }
body.adm { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.5 "Hanken Grotesk", system-ui, sans-serif; display: grid; grid-template-columns: 15rem minmax(0, 1fr); min-height: 100vh; }
body.adm:not(:has(.adm-side)) { grid-template-columns: 1fr; }
a { color: inherit; }
h1, h2 { font-family: "Big Shoulders", sans-serif; font-weight: 800; text-transform: uppercase; letter-spacing: -0.005em; line-height: 1; margin: 0; }
h1 { font-size: 2.6rem; }
h2 { font-size: 1.5rem; margin-bottom: 0.9rem; }
p { margin: 0 0 0.8em; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
code { background: var(--line); padding: 0 0.3em; }

.adm-side { background: var(--navy); color: #fff; padding: 1.25rem 0.75rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 1rem; }
.adm-brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; font: 800 1.5rem "Big Shoulders", sans-serif; text-transform: uppercase; padding: 0 0.5rem; }
.adm-brand img { background: #fff; border-radius: 50%; }
.adm-side nav { display: flex; flex-direction: column; }
.adm-side nav a { padding: 0.45rem 0.75rem; text-decoration: none; border-radius: 4px; color: rgb(255 255 255 / 0.86); transition: background-color 150ms ease; }
.adm-side nav a:hover { background: rgb(255 255 255 / 0.08); color: #fff; }
.adm-side nav a.is-active { background: #fff; color: var(--ink); font-weight: 700; }
.adm-group { margin: 1rem 0 0.25rem; padding: 0 0.75rem; font-weight: 700; font-size: 0.85rem; color: rgb(255 255 255 / 0.6); }
.adm-user { margin-top: auto; display: grid; gap: 0.35rem; padding: 0.75rem; background: rgb(255 255 255 / 0.06); border-radius: 4px; }
.adm-user span { font-weight: 700; }
.adm-user small { display: block; font-weight: 400; color: rgb(255 255 255 / 0.7); }
.linkish { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; text-align: left; }
.linkish.danger { color: var(--red); }
.adm-menu { display: none; }

.adm-main { padding: 2rem clamp(1rem, 3vw, 2.5rem) 4rem; min-width: 0; }
.adm-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.adm-head p { margin: 0.4rem 0 0; }
.adm-crumb { display: inline-block; margin-bottom: 0.5rem; text-decoration: none; font-weight: 600; color: var(--muted); }
.adm-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.5rem; padding: 0.5rem 1rem; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); color: var(--ink); font: 600 0.95rem/1 inherit; font-family: inherit; text-decoration: none; cursor: pointer; transition: transform 140ms var(--ease-out), background-color 150ms ease; }
.btn:active { transform: scale(0.97); }
.btn:hover { background: #f6f7f5; }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: #a81813; }
.btn-danger { color: var(--red); border-color: #e6b3b0; }
.btn-quiet { border-color: transparent; background: none; }
.btn-small { min-height: 2rem; padding: 0.35rem 0.7rem; font-size: 0.88rem; }
.btn-block { width: 100%; margin-top: 0.5rem; }

.adm-flash { padding: 0.75rem 1rem; border-radius: 4px; margin-bottom: 1rem; font-weight: 600; }
.adm-flash-ok { background: var(--ok-bg); color: var(--ok); }
.adm-flash-err { background: var(--err-bg); color: #8f1410; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 1.25rem; }
.panel.empty { text-align: center; padding: 3rem 1rem; }
.adm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 1rem; }
.panel-wide { grid-column: 1 / -1; }
.plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.plain a { text-decoration: none; }
.plain a:hover { text-decoration: underline; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin: 0; }
.stats dt { color: var(--muted); }
.stats dd { margin: 0; font: 800 2rem/1 "Big Shoulders", sans-serif; }

.table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: 0.85rem; color: var(--muted); font-weight: 700; background: #fafbf9; }
.table tbody tr:hover { background: #fafbf9; }
.table td a { font-weight: 600; }
.table .right { text-align: right; }
.table td.nowrap a + a { margin-left: 0.9rem; }
.nowrap { white-space: nowrap; }
.score-in { display: flex; align-items: center; gap: 0.35rem; }
.score-in input { width: 4.5rem; }
.quickscore .btn { margin-top: 1rem; }
.adm-filter { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.adm-filter input, .adm-filter select { min-width: 14rem; }
.pager { display: flex; gap: 0.3rem; margin-top: 1rem; }
.pager a { padding: 0.35rem 0.7rem; border: 1px solid var(--line); border-radius: 4px; text-decoration: none; background: var(--panel); }
.pager a.is-active { background: var(--ink); color: #fff; }

.adm-form label { display: block; font-weight: 700; margin-bottom: 0.35rem; }
.adm-form input[type=text], .adm-form input[type=email], .adm-form input[type=password], .adm-form input[type=number],
.adm-form input[type=date], .adm-form input[type=time], .adm-form input[type=datetime-local], .adm-form input[type=search],
.adm-form select, .adm-form textarea, .adm-filter input, .adm-filter select, .score-in input, .inline-form input {
  width: 100%; padding: 0.55rem 0.7rem; border: 1px solid #c9cdc8; border-radius: 4px; background: #fff; font: inherit; color: inherit;
}
.adm-form textarea { resize: vertical; }
.adm-form input:focus, .adm-form select:focus, .adm-form textarea:focus { border-color: var(--navy); outline: 2px solid rgb(6 48 74 / 0.18); }
.field { margin-bottom: 1.15rem; }
.help { font-size: 0.86rem; color: var(--muted); margin: 0.35rem 0 0; }
.error { color: #b0140f; font-weight: 600; margin: 0.35rem 0 0; }
.has-error input, .has-error select, .has-error textarea { border-color: #b0140f; }
.check { display: flex !important; gap: 0.5rem; align-items: center; font-weight: 600 !important; }
.check input { width: 1.1rem; height: 1.1rem; }

.edit-form { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: 1.5rem; align-items: start; }
.edit-main { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 1.5rem; }
.edit-side .sticky { position: sticky; top: 1rem; }
.field-text input[name=title] { font-size: 1.35rem; font-weight: 700; }
.rte-source { display: none; }
.js-off .rte-source { display: block; }
.rte { background: #fff; }
.rte .ql-editor { min-height: 22rem; font-size: 1.05rem; line-height: 1.6; }
.ql-toolbar.ql-snow, .ql-container.ql-snow { border-color: #c9cdc8 !important; }
.ql-toolbar.ql-snow { border-radius: 4px 4px 0 0; position: sticky; top: 0; background: #fff; z-index: 2; }
.ql-container.ql-snow { border-radius: 0 0 4px 4px; }

.picker-preview { min-height: 3rem; display: flex; align-items: center; margin-bottom: 0.5rem; }
.picker-preview img { max-height: 10rem; max-width: 100%; border-radius: 4px; }
.picker-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.gallery-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 0.75rem; margin-bottom: 0.75rem; }
.gallery-edit figure { margin: 0; background: #fafbf9; border: 1px solid var(--line); border-radius: 4px; padding: 0.4rem; display: grid; gap: 0.35rem; }
.gallery-edit img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px; }
.gallery-edit input[type=text] { padding: 0.3rem 0.4rem; font-size: 0.85rem; }
.delete-form { margin-top: 2rem; }

.media-dialog { width: min(64rem, 94vw); max-height: 86vh; border: 0; border-radius: 8px; padding: 0; box-shadow: 0 24px 60px -20px rgb(0 0 0 / 0.45); }
.media-dialog[open] { animation: dlg 200ms var(--ease-out); }
@keyframes dlg { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }
.media-dialog::backdrop { background: rgb(11 26 36 / 0.45); }
.media-dialog-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; }
.media-dialog-head h2 { margin: 0; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: 0.6rem; padding: 1.25rem; }
.media-grid button { padding: 0; border: 2px solid transparent; border-radius: 4px; background: none; cursor: pointer; transition: transform 140ms var(--ease-out); }
.media-grid button:hover { border-color: var(--red); }
.media-grid button:active { transform: scale(0.97); }
.media-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 2px; }

.dropzone { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-bottom: 1.25rem; border-style: dashed; transition: background-color 150ms ease; }
.dropzone p { margin: 0; flex: 1 1 100%; }
.dropzone.is-over { background: #fff6f5; border-color: var(--red); }
.media-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 1rem; }
.media-item { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.media-thumb { display: grid; place-items: center; aspect-ratio: 4 / 3; background: #e9ebe8; font-weight: 800; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-item figcaption { padding: 0.65rem; display: grid; gap: 0.35rem; font-size: 0.88rem; }
.media-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inline-form { display: flex; gap: 0.3rem; }
.inline-form input { padding: 0.3rem 0.45rem; }

.adm-login { max-width: 26rem; margin: 8vh auto 0; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 2rem; }
.adm-login.wide { max-width: 36rem; }
.adm-login img { margin-bottom: 1rem; }
.adm-login h1 { margin-bottom: 0.5rem; }
.adm-login .btn-primary { width: 100%; margin-top: 0.5rem; min-height: 2.9rem; }
.adm-login label { margin-bottom: 1rem; }
.adm-login label input { margin-top: 0.35rem; }
.adm-back { display: inline-block; margin-top: 1.25rem; }
.checks { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; gap: 0.3rem; }
.checks .pass { color: var(--ok); font-weight: 600; }
.checks .fail { color: #b0140f; font-weight: 700; }
.settings .panel { margin-bottom: 1rem; max-width: 52rem; }

@media (max-width: 900px) {
  body.adm { grid-template-columns: 1fr; }
  .adm-side { position: fixed; inset: 0 auto 0 0; width: 17rem; z-index: 30; transform: translateX(-100%); transition: transform 260ms var(--ease-out); }
  .adm-side.is-open { transform: none; box-shadow: 0 0 0 100vmax rgb(11 26 36 / 0.4); }
  .adm-menu { display: inline-flex; position: fixed; right: 1rem; bottom: 1rem; z-index: 31; min-height: 3rem; padding: 0 1.25rem; border: 0; border-radius: 4px; background: var(--navy); color: #fff; font: 700 1rem inherit; font-family: inherit; box-shadow: 0 8px 24px -8px rgb(0 0 0 / 0.4); }
  .edit-form { grid-template-columns: 1fr; }
  .table-click thead { display: none; }
  .table-click tr { display: grid; padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--line); }
  .table-click td { border: 0; padding: 0.1rem 0; text-align: left !important; }
}
@media (prefers-reduced-motion: reduce) { * { transition-duration: 0ms !important; animation: none !important; } }

/* Startseite gestalten */
.home-form .panel { margin-bottom: 1rem; max-width: 60rem; scroll-margin-top: 1rem; }
.home-form h3 { font: 800 1.2rem "Big Shoulders", sans-serif; text-transform: uppercase; margin: 1.5rem 0 0.6rem; }
.home-form .check { margin-bottom: 0.4rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.sort-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.sort-list li { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.45rem 0.6rem; background: #fafbf9; border: 1px solid var(--line); border-radius: 4px; }
.sort-list .check { margin: 0; }
.sort-buttons { display: flex; gap: 0.3rem; }
.quick-edit, .tiles-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 0.75rem; }
.quick-edit fieldset, .tiles-edit fieldset { border: 1px solid var(--line); border-radius: 4px; padding: 0.6rem; display: grid; gap: 0.4rem; margin: 0; }
.quick-edit legend, .tiles-edit legend { font-weight: 700; padding: 0 0.3rem; }
.tiles-edit .field { margin: 0.2rem 0 0; }
.hero-thumbs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.5rem; }
.hero-thumbs figure { position: relative; margin: 0; width: 8rem; }
.hero-thumbs img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 3px; }
.hero-thumbs button { position: absolute; top: 0.2rem; right: 0.2rem; background: #fff; min-height: 1.6rem; padding: 0.1rem 0.45rem; }
.mono-small { font-size: 0.82rem !important; color: var(--muted); }
.save-bar { position: sticky; bottom: 0; padding: 0.75rem 0; background: linear-gradient(0deg, var(--bg) 70%, transparent); }
input[type=color] { width: 4rem; height: 2.5rem; padding: 0.15rem; border: 1px solid #c9cdc8; border-radius: 4px; background: #fff; }
input[type=range] { width: 100%; }
@media (max-width: 700px) { .grid-2 { grid-template-columns: 1fr; } }
.picker-size { margin: 0 0 0.5rem; font-size: 0.85rem; color: var(--muted); }
.picker-size.is-small { color: #9a5b00; font-weight: 600; }
.table .group-row th { background: var(--navy); color: #fff; font-size: 0.9rem; padding: 0.5rem 0.9rem; }

/* Übersicht: häufige Aufgaben */
.quick-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 0.6rem; margin-bottom: 1.5rem; }
.quick-actions a { display: grid; gap: 0.2rem; padding: 0.9rem 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; text-decoration: none; transition: border-color 150ms ease, transform 140ms var(--ease-out); }
.quick-actions a:hover { border-color: var(--red); }
.quick-actions a:active { transform: scale(0.98); }
.quick-actions a:first-child { background: var(--red); border-color: var(--red); color: #fff; }
.quick-actions a:first-child span { color: rgb(255 255 255 / 0.85); }
.quick-actions strong { font-size: 1.02rem; }
.quick-actions span { font-size: 0.86rem; color: var(--muted); }

/* Bildmittelpunkt */
.focus-box, .picker-preview { position: relative; }
.picker-preview img, .focus-box img { cursor: crosshair; }
.media-thumb.focus-box img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: initial; }
.focus-dot { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; border: 3px solid #fff; background: var(--red); box-shadow: 0 0 0 2px rgb(0 0 0 / 0.45); pointer-events: none; transition: left 160ms var(--ease-out), top 160ms var(--ease-out); }
.focus-saved .focus-dot { background: #1d6b3a; }
.crop-demo { display: flex; gap: 0.5rem; margin: 0 0 0.6rem; align-items: flex-end; }
.crop-demo figure { margin: 0; width: 6.5rem; }
.crop-demo img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 3px; display: block; }
.crop-demo .sq { width: 4rem; } .crop-demo .sq img { aspect-ratio: 1; }
.crop-demo .tall { width: 3.2rem; } .crop-demo .tall img { aspect-ratio: 9 / 16; }
.crop-demo figcaption { font-size: 0.75rem; color: var(--muted); margin-top: 0.15rem; }
.hero-thumbs figure.focus-box img { aspect-ratio: auto; height: auto; }

/* Bildershow-Vorschau: größer, mit Ansicht Computer und Handy */
.hero-thumbs figure { width: 15rem; display: grid; gap: 0.35rem; }
.hero-thumbs figure > img { touch-action: none; }
.picker-preview > img, .focus-box > img { touch-action: none; user-select: none; -webkit-user-drag: none; }
.hero-thumbs .crop-demo { margin: 0; }
.crop-demo .wide { width: 9rem; } .crop-demo .wide img { aspect-ratio: 16 / 9; }
.hero-thumbs .crop-demo .tall { width: 2.9rem; }
.crop-demo { flex-wrap: wrap; }
.crop-demo .cd-img { display: block; overflow: hidden; border-radius: 3px; }
.zoom-range { display: flex !important; align-items: center; gap: 0.4rem; width: 100%; font-size: 0.82rem !important; font-weight: 600 !important; margin: 0.2rem 0 0 !important; }
.zoom-range input { flex: 1; min-width: 5rem; }
.zoom-range output { min-width: 3rem; color: var(--muted); }

/* Videos in der Bildershow */
.hero-thumbs video, .crop-demo video { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 3px; display: block; background: #000; }
.hero-thumbs figure.focus-box > video { aspect-ratio: 16 / 9; touch-action: none; cursor: crosshair; }
.crop-demo .wide video { aspect-ratio: 16 / 9; } .crop-demo .tall video { aspect-ratio: 9 / 16; }
.thumb-badge { position: absolute; top: 0.3rem; left: 0.3rem; padding: 0.1rem 0.45rem; border-radius: 3px; background: #d0211b; color: #fff; font-size: 0.72rem; font-weight: 700; pointer-events: none; }

/* Feste Seiten */
.sys-teaser { display: grid; gap: 0.2rem; margin-bottom: 0.75rem; text-decoration: none; color: inherit; border-left: 4px solid var(--red); }
.sys-teaser strong { font-size: 1.05rem; }
.sys-teaser:hover { border-color: var(--red); }
.sys-teaser-note { margin: 0 0 1rem; }
.sys-list { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 0.5rem; }
.sys-list li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.sys-list li > div:first-child { display: grid; gap: 0.15rem; }
.sys-menu h2 { margin-top: 0; }

/* Einstellungen: Animationen */
.anim-panel fieldset { border: 0; padding: 0; margin: 0 0 1.25rem; }
.anim-panel legend { font-weight: 700; margin-bottom: 0.5rem; }
.anim-panel .check { margin-top: 0.6rem; }
.anim-help { margin: 0.15rem 0 0 1.6rem; }
.anim-fab { margin: 0.5rem 0 0 1.6rem; padding: 0.25rem 0 0.25rem 0.9rem; border-left: 2px solid var(--line); }

/* Kader-Editor */
.roster-edit { margin-bottom: 0.5rem; }
.roster-rows { list-style: none; padding: 0; margin: 0 0 0.6rem; display: grid; gap: 0.4rem; }
.roster-rows[hidden] { display: none; }
.roster-rows li { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); gap: 0.35rem 0.6rem; align-items: center; padding: 0.5rem; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
.roster-rows li > .roster-photo { grid-row: span 2; align-self: start; }
.roster-photo { width: 3.4rem; aspect-ratio: 3 / 4; padding: 0; border: 1px dashed var(--line); border-radius: 4px; background: var(--panel); cursor: pointer; overflow: hidden; display: grid; place-items: center; font-size: 0.75rem; color: var(--muted); }
.roster-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.roster-photo:hover { border-color: var(--red); }
.roster-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.4rem; }
.roster-fields input { width: 100%; min-width: 0; }
.roster-fields input[data-f=name] { font-weight: 600; }
.roster-tools { display: flex; gap: 0.2rem; flex-wrap: wrap; justify-content: flex-start; }
.roster-tools [hidden] { display: none; }
.roster-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.focus-reset[hidden] { display: none; }
.crop-demo .focus-reset, .hero-thumbs .crop-demo .focus-reset { position: static; background: none; min-height: 0; padding: 0.2rem 0.4rem; font-size: 0.8rem; text-decoration: underline; justify-self: start; }

/* Kader: Spieler aus der Meldung des Vereinsmanagers */
.roster-note { margin: 0 0 0.6rem; padding: 0.5rem 0.75rem; border-left: 3px solid var(--red); background: var(--panel); font-size: 0.9rem; }
.roster-rows li.is-meldung { background: var(--panel); }
.roster-rows li.is-meldung input[data-f=name] { background: transparent; border-color: transparent; cursor: default; padding-left: 0; }
.roster-fields { position: relative; }
.roster-pos { position: absolute; left: -0.1rem; top: -0.55rem; font-size: 0.68rem; font-weight: 700; color: var(--muted); letter-spacing: 0.02em; }

/* Spielerprofile nach Mannschaft */
.team-tabs { display: flex; gap: 0.35rem; overflow-x: auto; padding-bottom: 0.4rem; margin-bottom: 1rem; scrollbar-width: thin; }
.team-tabs a { flex: none; padding: 0.45rem 0.8rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 0.9rem; color: inherit; background: var(--panel); }
.team-tabs a[aria-current] { background: var(--red); border-color: var(--red); color: #fff; }
.sync-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.75rem; }
.sync-bar p { margin: 0; }
.sync-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
.sync-list li { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto auto; gap: 0.8rem; align-items: center; padding: 0.5rem 0.75rem; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.sync-photo { width: 3rem; aspect-ratio: 3 / 4; border-radius: 4px; overflow: hidden; display: grid; place-items: center; background: var(--bg); font-weight: 800; color: var(--muted); }
.sync-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.sync-name { display: grid; line-height: 1.25; }
.sync-name small { color: var(--muted); font-size: 0.8rem; }
.sync-state { font-size: 0.85rem; font-weight: 600; color: #1d7a3e; }
.sync-state.is-missing { color: var(--muted); }
.sync-actions { display: flex; gap: 0.3rem; margin: 0; }
@media (max-width: 700px) {
  .sync-list li { grid-template-columns: 3rem minmax(0, 1fr); }
  .sync-state, .sync-actions { grid-column: 2; }
}

/* Bildershow: Dateien beim Hochladen */
.hero-thumbs figure.is-uploading, .hero-thumbs figure.is-failed { width: 15rem; }
.up-box { display: grid; gap: 0.35rem; padding: 0.75rem; border: 1px dashed var(--line); border-radius: 6px; background: var(--panel); font-size: 0.85rem; }
.up-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-bar { display: block; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.up-bar i { display: block; height: 100%; background: #d0211b; transform: scaleX(0); transform-origin: left; transition: transform 200ms linear; }
.up-state { color: var(--muted); }
.is-failed .up-box { border-style: solid; border-color: #d0211b; }
.is-failed .up-state { color: #b3261e; font-weight: 600; }
.is-failed .up-bar { display: none; }
.hero-thumbs .up-box .btn { position: static; justify-self: start; background: none; }

/* Ausschnitt: Umschalter Computer | Handy */
.focus-mode { display: inline-flex; flex-basis: 100%; width: max-content; border: 1px solid var(--line); border-radius: 999px; padding: 2px; margin-bottom: 0.35rem; background: var(--bg); }
.focus-mode button { border: 0; background: none; padding: 0.3rem 0.8rem; border-radius: 999px; font: inherit; font-size: 0.82rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.focus-mode button[aria-pressed="true"] { background: #06304a; color: #fff; }
.crop-demo.mode-m .focus-mode button[aria-pressed="true"] { background: #1f6feb; }
.crop-demo figure { opacity: 0.55; transition: opacity 150ms ease; }
.crop-demo figure.is-active { opacity: 1; }
.crop-demo figure.is-active figcaption { color: inherit; font-weight: 700; }
.focus-hint { flex-basis: 100%; margin: 0; font-size: 0.78rem; color: var(--muted); line-height: 1.35; }
.focus-dot.is-m { background: #1f6feb !important; }
.hero-thumbs .crop-demo .focus-mode button { position: static; min-height: 0; }

/* =====================================================================
   Redaktion: neues Erscheinungsbild
   Ruhig, hell, große Schrift und Klickflächen. Überschriften in normaler Schrift statt Versalien,
   damit sich auch ungeübte Nutzer schnell zurechtfinden.
   ===================================================================== */
:root {
  --bg: #f3f4f2; --panel: #fff; --line: #e2e5e1; --line-strong: #c9cec8; --ink: #14212b; --muted: #5a6670;
  --navy: #0b2233; --navy-2: #06304a; --red: #c71e19; --red-press: #a81813; --blue: #1f6feb;
  --ok: #1d6b3a; --ok-bg: #e6f4ea; --warn: #8a5300; --warn-bg: #fff4e0; --err-bg: #fdecea;
  --radius: 12px; --radius-s: 8px;
  --shadow: 0 1px 2px rgb(16 24 32 / 0.05), 0 6px 20px -12px rgb(16 24 32 / 0.18);
}
body.adm { font-size: 16px; line-height: 1.55; background: var(--bg); grid-template-columns: 16.5rem minmax(0, 1fr); }
body.adm h1 { font: 700 clamp(1.6rem, 1.3rem + 1vw, 2rem)/1.15 "Hanken Grotesk", system-ui, sans-serif; text-transform: none; letter-spacing: -0.02em; }
body.adm h2 { font: 700 1.15rem/1.3 "Hanken Grotesk", system-ui, sans-serif; text-transform: none; letter-spacing: -0.01em; margin-bottom: 0.85rem; }
body.adm .home-form h3 { font: 700 1.02rem/1.3 "Hanken Grotesk", system-ui, sans-serif; text-transform: none; }
.ico { flex: none; display: block; }

/* Seitenleiste */
.adm-side { background: var(--navy); padding: 1.1rem 0.75rem; gap: 0.75rem; }
.adm-side .adm-brand { padding: 0.25rem 0.6rem 0.5rem; font-size: 1.45rem; }
.adm-side nav { gap: 1px; }
.adm-side nav a { display: flex; align-items: center; gap: 0.75rem; min-height: 2.6rem; padding: 0.45rem 0.75rem; border-radius: var(--radius-s); font-weight: 500; color: rgb(255 255 255 / 0.8); }
.adm-side nav a .ico { opacity: 0.75; }
.adm-side nav a:hover { background: rgb(255 255 255 / 0.07); color: #fff; }
.adm-side nav a.is-active { background: rgb(255 255 255 / 0.13); color: #fff; font-weight: 700; box-shadow: inset 3px 0 0 var(--red); }
.adm-side nav a.is-active .ico { opacity: 1; }
.adm-group { margin: 1.1rem 0 0.3rem; padding: 0 0.75rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: rgb(255 255 255 / 0.48); }
.adm-user { background: none; padding: 0.25rem 0; gap: 0.5rem; }
.adm-site { display: flex; align-items: center; gap: 0.6rem; min-height: 2.6rem; padding: 0.45rem 0.75rem; border-radius: var(--radius-s); background: rgb(255 255 255 / 0.08); text-decoration: none; font-weight: 600; }
.adm-site:hover { background: rgb(255 255 255 / 0.14); }
.adm-me { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.6rem; padding: 0.5rem 0.75rem; border-top: 1px solid rgb(255 255 255 / 0.1); }
.adm-me > span:nth-child(2) { font-weight: 700; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; }
.adm-me small { font-weight: 400; }
.adm-avatar { width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: var(--red); font-weight: 800; }
.adm-logout { width: 2.25rem; height: 2.25rem; display: grid; place-items: center; border: 0; border-radius: var(--radius-s); background: none; color: rgb(255 255 255 / 0.75); cursor: pointer; }
.adm-logout:hover { background: rgb(255 255 255 / 0.1); color: #fff; }
.adm-top { display: none; }

/* Inhaltsbereich */
.adm-main { padding: 2rem clamp(1rem, 3vw, 2.75rem) 6rem; max-width: 84rem; }
.adm-head { align-items: center; margin-bottom: 1.5rem; }
.adm-head p.muted { margin-top: 0.3rem; }
.adm-crumb { font-size: 0.92rem; margin-bottom: 0.35rem; }
.adm-crumb:hover { color: var(--ink); }

/* Knöpfe */
.btn { min-height: 2.75rem; padding: 0.55rem 1.1rem; border-radius: var(--radius-s); border-color: var(--line-strong); font-weight: 600; font-size: 0.97rem; gap: 0.45rem; }
.btn .ico { width: 18px; height: 18px; }
.btn:hover { background: #f5f6f4; }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 1px 2px rgb(199 30 25 / 0.25); }
.btn-primary:hover { background: var(--red-press); border-color: var(--red-press); }
.btn-small { min-height: 2.25rem; padding: 0.35rem 0.75rem; font-size: 0.9rem; }
.btn-large { min-height: 3rem; padding: 0.6rem 1.6rem; font-size: 1.02rem; }
.btn-quiet { border-color: transparent; }

/* Karten */
.panel, .edit-main, .table-wrap { border-radius: var(--radius); border-color: var(--line); box-shadow: var(--shadow); }
.panel { padding: 1.4rem; }
.edit-main { padding: clamp(1.1rem, 2vw, 1.75rem); }

/* Formulare */
.adm-form label { font-weight: 700; font-size: 0.97rem; margin-bottom: 0.4rem; }
.adm-form input[type=text], .adm-form input[type=email], .adm-form input[type=password], .adm-form input[type=number],
.adm-form input[type=date], .adm-form input[type=time], .adm-form input[type=datetime-local], .adm-form input[type=search],
.adm-form select, .adm-form textarea, .adm-filter input, .adm-filter select {
  min-height: 2.9rem; padding: 0.6rem 0.8rem; border: 1px solid var(--line-strong); border-radius: var(--radius-s); font-size: 1rem;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.adm-form textarea { min-height: 0; line-height: 1.5; }
.adm-form input:focus, .adm-form select:focus, .adm-form textarea:focus, .adm-filter input:focus { border-color: var(--navy-2); outline: none; box-shadow: 0 0 0 3px rgb(6 48 74 / 0.15); }
.field { margin-bottom: 1.4rem; }
.help { font-size: 0.88rem; line-height: 1.45; margin-top: 0.4rem; }
.check input { width: 1.2rem; height: 1.2rem; accent-color: var(--red); }
.field-text input[name=title] { font-size: 1.3rem; font-weight: 700; min-height: 3.2rem; }
.edit-side .panel { padding: 1.25rem; }
.edit-side .btn-block { display: none; } /* Speichern steht unten in der festen Leiste */
.rte .ql-editor { font-size: 1.05rem; }
.ql-toolbar.ql-snow { border-radius: var(--radius-s) var(--radius-s) 0 0; }
.ql-container.ql-snow { border-radius: 0 0 var(--radius-s) var(--radius-s); }

/* Adresse (URL): eingeklappt */
.slug-field input { display: none; }
.slug-field.is-open input { display: block; }
.slug-field.is-open .slug-preview .linkish { display: none; }
.slug-preview { margin: 0 0 0.4rem; color: var(--muted); font-size: 0.95rem; }
.slug-preview code { background: #eef0ed; padding: 0.1rem 0.4rem; border-radius: 4px; color: var(--ink); }
.slug-preview .linkish { color: var(--navy-2); font-weight: 600; margin-left: 0.25rem; }

/* Feste Speichern-Leiste unten */
.adm-savebar {
  grid-column: 1 / -1; position: sticky; bottom: 0.75rem; z-index: 6;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 0.7rem 0.75rem 0.7rem 1.1rem; background: rgb(255 255 255 / 0.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px -12px rgb(16 24 32 / 0.35);
}
.savebar-state { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; color: var(--muted); }
.savebar-state::before { content: ""; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: #3aa35b; }
.is-dirty .savebar-state { color: var(--warn); }
.is-dirty .savebar-state::before { background: #e08a00; }
.savebar-actions { display: flex; gap: 0.5rem; margin-left: auto; }
.save-bar { padding: 0.75rem; margin-top: 1rem; border-radius: var(--radius); background: rgb(255 255 255 / 0.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid var(--line); box-shadow: 0 10px 30px -12px rgb(16 24 32 / 0.35); bottom: 0.75rem; }
.save-bar .btn-primary { min-height: 3rem; padding-inline: 1.6rem; }
.delete-form { margin-top: 1.5rem; }

/* Meldungen */
.adm-flash { display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.85rem 1.1rem; border-radius: var(--radius); font-weight: 600; box-shadow: var(--shadow);
  max-height: 12rem; overflow: hidden; transition: opacity 300ms ease, max-height 400ms ease 200ms, padding 400ms ease 200ms, margin 400ms ease 200ms; }
.adm-flash::before { flex: none; display: grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; font-size: 0.85rem; font-weight: 800; color: #fff; }
.adm-flash-ok { background: var(--ok-bg); border: 1px solid #bfe3c9; }
.adm-flash-ok::before { content: "✓"; background: var(--ok); }
.adm-flash-err { background: var(--err-bg); border: 1px solid #f4c5c1; }
.adm-flash-err::before { content: "!"; background: #b3261e; }
.adm-flash.is-gone { opacity: 0; max-height: 0; padding-block: 0; margin: 0; border-width: 0; }

/* Listen */
.table th { background: #f8f9f7; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.7rem 1rem; }
.table td { padding: 0.85rem 1rem; }
.table td a { text-decoration: none; }
.table td:first-child a { font-weight: 700; color: var(--ink); }
.table td:first-child a:hover { color: var(--red); }
.table td.nowrap a { font-weight: 600; color: var(--navy-2); }
.table tbody tr { transition: background-color 120ms ease; }
.table tbody tr:hover { background: #f8f9f7; }
.table .group-row th { background: #eef1f4; color: var(--navy-2); font-size: 0.78rem; letter-spacing: 0.06em; }
.pill { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.15rem 0.6rem; border-radius: 999px; font-size: 0.82rem; font-weight: 700; background: #eef0ed; color: var(--muted); white-space: nowrap; }
.pill::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: currentColor; }
.pill-published { background: var(--ok-bg); color: var(--ok); }
.pill-draft { background: var(--warn-bg); color: var(--warn); }
.adm-filter { align-items: center; }
.adm-filter.panel { padding: 1rem 1.2rem; }
.pager a { border-radius: var(--radius-s); min-width: 2.4rem; text-align: center; }

/* Übersicht */
.dash-hello { margin-bottom: 1.5rem; }
.dash-hello p { margin: 0.3rem 0 0; color: var(--muted); }
.dash-label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.6rem; }
.dash-tasks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.85rem; margin-bottom: 1rem; }
.dash-tasks a {
  display: grid; align-content: start; gap: 0.35rem; min-height: 9.5rem; padding: 1.2rem; text-decoration: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform 160ms var(--ease-out), border-color 150ms ease, box-shadow 160ms ease;
}
.dash-tasks a:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: 0 2px 4px rgb(16 24 32 / 0.05), 0 14px 30px -14px rgb(16 24 32 / 0.28); }
.dash-tasks a:active { transform: scale(0.98); }
.dash-tasks .ico-wrap { width: 2.75rem; height: 2.75rem; display: grid; place-items: center; border-radius: 10px; background: #fdecea; color: var(--red); margin-bottom: 0.4rem; }
.dash-tasks .ico-wrap .ico { width: 22px; height: 22px; }
.dash-tasks strong { font-size: 1.08rem; }
.dash-tasks span:last-child { color: var(--muted); font-size: 0.92rem; line-height: 1.4; }
.dash-more { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.dash-more a { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.6rem; padding: 0.45rem 0.95rem; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: 0.95rem; box-shadow: 0 1px 2px rgb(16 24 32 / 0.04); }
.dash-more a:hover { border-color: var(--line-strong); }
.dash-more .ico { width: 18px; height: 18px; color: var(--muted); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.dash-col { display: grid; gap: 1rem; }
.dash-list { list-style: none; margin: 0; padding: 0; }
.dash-list li { border-top: 1px solid var(--line); }
.dash-list li:first-child { border-top: 0; }
.dash-list a, .dash-list .dl-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.65rem 0; text-decoration: none; }
.dash-list a:hover strong { color: var(--red); }
.dash-list small { color: var(--muted); white-space: nowrap; }
.dash-status li { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0; border-top: 1px solid var(--line); }
.dash-status li:first-child { border-top: 0; }
.dash-status .dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: #3aa35b; flex: none; }
.dash-status .dot.is-warn { background: #e08a00; }
.dash-status .dot.is-off { background: #9aa3a9; }
.dash-status a { margin-left: auto; font-size: 0.9rem; font-weight: 600; color: var(--navy-2); text-decoration: none; }
.dash-empty { color: var(--muted); margin: 0; }
.quickscore .table td { padding: 0.6rem 0.75rem; }
.score-in input { min-height: 2.6rem; border-radius: var(--radius-s); text-align: center; font-size: 1.05rem; }

/* Handy und Tablet */
@media (max-width: 900px) {
  body.adm { grid-template-columns: 1fr; }
  .adm-top { display: flex; position: sticky; top: 0; z-index: 25; align-items: center; justify-content: space-between; padding: 0.6rem 1rem; background: var(--navy); color: #fff; }
  .adm-top .adm-brand { font-size: 1.3rem; padding: 0; }
  .adm-top .adm-menu { position: static; display: inline-flex; align-items: center; gap: 0.45rem; min-height: 2.6rem; padding: 0 0.9rem; border: 1px solid rgb(255 255 255 / 0.25); border-radius: var(--radius-s); background: none; box-shadow: none; color: #fff; font: 600 0.95rem "Hanken Grotesk", system-ui, sans-serif; }
  .adm-side { width: min(18rem, 86vw); }
  .adm-side > .adm-brand { display: none; }
  .adm-main { padding: 1.25rem 1rem 6rem; }
  .dash-tasks { grid-template-columns: 1fr 1fr; }
  .dash-tasks a { min-height: 8rem; padding: 1rem; }
  .dash-grid { grid-template-columns: 1fr; }
  .adm-savebar { bottom: 0.5rem; padding: 0.6rem; }
  .savebar-state { font-size: 0.88rem; }
  .table-click tr { padding: 0.8rem 1rem; gap: 0.15rem; }
  .table-click td[data-label]:not(:first-child)::before { content: attr(data-label) ": "; color: var(--muted); font-size: 0.85rem; }
  .table-click td:first-child a { font-size: 1.05rem; }
  .table-click td.right { margin-top: 0.3rem; }
}
@media (max-width: 480px) {
  .dash-tasks { grid-template-columns: 1fr; }
  .dash-tasks a { min-height: 0; grid-template-columns: auto minmax(0, 1fr); column-gap: 0.9rem; align-items: center; }
  .dash-tasks .ico-wrap { grid-row: span 2; margin: 0; }
  .savebar-state { display: none; }
  .savebar-actions { width: 100%; }
  .savebar-actions .btn-primary { flex: 1; }
}
/* Suche und Filter in einer Zeile */
.adm-filter input, .adm-filter select { width: auto; flex: 1 1 16rem; min-width: 0; }
.adm-filter .btn { flex: none; }

/* Spielerprofile: Mannschaft wählen, löschen */
.team-pick { margin-bottom: 1rem; }
.team-pick .team-tabs { flex-wrap: wrap; overflow: visible; margin: 0; }
.team-pick .team-tabs a { padding: 0.55rem 1rem; font-size: 0.95rem; }
.team-tabs a:hover { border-color: var(--line-strong); }
.sync-actions form { margin: 0; }
.btn-del { color: #b3261e; }
.btn-del:hover { background: var(--err-bg); }
.row-del { display: inline; margin-left: 0.9rem; }
.linkish.danger { color: #b3261e; font-weight: 600; text-decoration: none; }
.linkish.danger:hover { text-decoration: underline; }

/* Startseite gestalten: links Aufbau, rechts ein Bereich */
.home-layout { display: grid; grid-template-columns: 21rem minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.home-nav { position: sticky; top: 1rem; padding: 1.1rem; max-height: calc(100vh - 2rem); overflow-y: auto; }
.home-nav h2 { font-size: 1rem; margin-bottom: 0.75rem; }
.home-nav .sort-list { gap: 0.3rem; }
.home-nav .sort-list li, .hn-fixed { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.6rem; padding: 0.35rem 0.4rem 0.35rem 0.6rem; border: 1px solid var(--line); border-radius: var(--radius-s); background: #fafbf9; }
.hn-fixed { grid-template-columns: 1fr; gap: 0; padding: 0.6rem 0.75rem; margin-bottom: 0.3rem; text-decoration: none; }
.hn-fixed small { color: var(--muted); font-size: 0.8rem; }
.hn-name { text-decoration: none; font-weight: 600; font-size: 0.95rem; line-height: 1.3; padding: 0.35rem 0; }
.home-nav li.is-active, .hn-fixed.is-active { background: #fff; border-color: var(--navy-2); box-shadow: inset 3px 0 0 var(--red), 0 2px 8px -4px rgb(16 24 32 / 0.25); }
.home-nav li:has(.switch input:not(:checked)) .hn-name { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.home-nav .sort-buttons .btn { min-height: 2rem; min-width: 2rem; padding: 0.2rem; }
.home-panels .panel { max-width: none; margin-bottom: 0; }
.home-form .home-panels h3 { margin: 1.75rem 0 0.75rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.hp-intro { color: var(--muted); margin: -0.35rem 0 1.25rem; }
.hint-more { margin: 0.5rem 0; }
.hint-more summary { cursor: pointer; font-size: 0.9rem; font-weight: 600; color: var(--navy-2); }
.hint-more[open] summary { margin-bottom: 0.5rem; }

/* Schalter statt Häkchen */
.switch { position: relative; display: inline-block; width: 2.6rem; height: 1.5rem; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch::before { content: ""; position: absolute; inset: 0; border-radius: 999px; background: #c9cec8; transition: background-color 160ms ease; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: calc(1.5rem - 6px); height: calc(1.5rem - 6px); border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / 0.25); transition: transform 180ms var(--ease-out); }
.switch:has(input:checked)::before { background: #2e9b55; }
.switch:has(input:checked)::after { transform: translateX(1.1rem); }
.switch:has(input:focus-visible) { outline: 3px solid var(--red); outline-offset: 2px; border-radius: 999px; }

@media (max-width: 900px) {
  .home-layout { grid-template-columns: 1fr; }
  .home-nav { position: static; max-height: none; }
}

/* Ausschnitt: ganzes Bild am Handy */
.fit-m { display: none !important; flex-basis: 100%; align-items: center; gap: 0.45rem; margin: 0.2rem 0; font-size: 0.85rem; font-weight: 600 !important; }
.crop-demo.mode-m .fit-m { display: flex !important; }
.fit-m input { width: 1.1rem; height: 1.1rem; accent-color: var(--blue); margin: 0; }
.crop-demo .tall .cd-img { background: #0b1a24; }

/* =====================================================================
   Ausschnitt festlegen: großes Fenster mit Rahmen
   ===================================================================== */
.picker-preview > img, .focus-box > img, .focus-box > video { cursor: zoom-in; }
.focus-dot { display: none; }
.focus-saved > img, .focus-saved > video { outline: 3px solid #2e9b55; outline-offset: 2px; }

/* kleine Vorschau am Bild */
.crop-mini { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.6rem; margin: 0.5rem 0 0.75rem; }
.crop-mini figure { margin: 0; }
.crop-mini figure:first-child { width: 8.5rem; }
.crop-mini .cm-m { width: 3.4rem; }
.cm-img { display: block; overflow: hidden; border-radius: 4px; background: #0b1a24; }
.cm-img img, .cm-img video { width: 100%; height: 100%; display: block; object-fit: cover; }
.crop-mini figcaption { font-size: 0.75rem; color: var(--muted); margin-top: 0.2rem; }
.cm-side { display: grid; gap: 0.3rem; justify-items: start; }
.cm-state { color: var(--muted); font-size: 0.78rem; }
.hero-thumbs .crop-mini { margin: 0.4rem 0 0; }
.hero-thumbs .crop-mini .btn { position: static; background: #fff; min-height: 2.1rem; }
.hero-thumbs .crop-mini figure:first-child { width: 7rem; }
.hero-thumbs .crop-mini .cm-m { width: 2.6rem; }

/* Fenster */
.crop-dialog { width: min(68rem, 96vw); max-height: 94vh; padding: 0; border: 0; border-radius: 14px; box-shadow: 0 30px 80px -20px rgb(0 0 0 / 0.55); color: var(--ink); }
.crop-dialog[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; animation: dlg 200ms var(--ease-out); }
.crop-dialog::backdrop { background: rgb(11 26 36 / 0.6); }
.cd-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.crop-dialog h2 { margin: 0; }
.cd-tabs { display: inline-flex; padding: 3px; border-radius: 999px; background: #eef0ed; }
.cd-tabs button { border: 0; background: none; min-height: 2.4rem; padding: 0 1.1rem; border-radius: 999px; font: 600 0.95rem "Hanken Grotesk", system-ui, sans-serif; color: var(--muted); cursor: pointer; }
.cd-tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / 0.15); }
.cd-body { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: 1.25rem; padding: 1.25rem; min-height: 0; }
.cd-stage { display: grid; place-items: center; min-height: 0; height: min(62vh, 36rem); background: #0b1a24; border-radius: 10px; overflow: hidden; }
.cd-wrap { position: relative; touch-action: none; user-select: none; overflow: hidden; cursor: crosshair; }
.cd-wrap > img, .cd-wrap > video { display: block; width: 100%; height: 100%; object-fit: fill; pointer-events: none; }
.cd-frame { position: absolute; box-shadow: 0 0 0 100vmax rgb(11 26 36 / 0.62); outline: 2px solid #fff; cursor: grab; }
.cd-frame.is-drag { cursor: grabbing; }
.cd-frame::before, .cd-frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; border: 1px solid rgb(255 255 255 / 0.35); }
.cd-frame::before { left: 33.33%; right: 33.33%; border-block: 0; }
.cd-frame::after { top: 33.33%; bottom: 33.33%; border-inline: 0; }
.cd-frame i { position: absolute; width: 14px; height: 14px; border: 3px solid #fff; }
.cd-frame i:nth-child(1) { left: -3px; top: -3px; border-right: 0; border-bottom: 0; }
.cd-frame i:nth-child(2) { right: -3px; top: -3px; border-left: 0; border-bottom: 0; }
.cd-frame i:nth-child(3) { left: -3px; bottom: -3px; border-right: 0; border-top: 0; }
.cd-frame i:nth-child(4) { right: -3px; bottom: -3px; border-left: 0; border-top: 0; }
.crop-dialog.is-m .cd-frame { outline-color: #8cb4ff; }
.crop-dialog.is-fit .cd-frame { display: none; }
.crop-dialog.is-fit .cd-wrap { cursor: default; }

.cd-side { display: grid; align-content: start; gap: 0.9rem; }
.cd-label { margin: 0; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.cd-pv { width: 100%; overflow: hidden; border-radius: 8px; background: #0b1a24; box-shadow: 0 6px 18px -10px rgb(0 0 0 / 0.5); }
.cd-pv.is-tall { width: 55%; justify-self: center; border-radius: 14px; border: 3px solid #14212b; }
.cd-pv img, .cd-pv video { width: 100%; height: 100%; display: block; object-fit: cover; }
.cd-zoom { display: grid !important; gap: 0.35rem; font-size: 0.9rem !important; font-weight: 600 !important; }
.cd-zoom input { accent-color: var(--red); }
.crop-dialog.is-fit .cd-zoom { opacity: 0.4; pointer-events: none; }
.cd-fit { display: none !important; align-items: flex-start; gap: 0.5rem; font-size: 0.92rem !important; font-weight: 600 !important; line-height: 1.35; }
.crop-dialog.is-m .cd-fit { display: flex !important; }
.cd-fit input { width: 1.15rem; height: 1.15rem; margin: 0.1rem 0 0; accent-color: var(--blue); flex: none; }
.cd-help { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.45; }
.cd-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 0.85rem 1.25rem; border-top: 1px solid var(--line); background: #fafbf9; border-radius: 0 0 14px 14px; }
.cd-gap { flex: 1; }

@media (max-width: 760px) {
  .crop-dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .cd-head { padding: 0.75rem 1rem; }
  .cd-tabs { width: 100%; }
  .cd-tabs button { flex: 1; }
  .cd-body { grid-template-columns: 1fr; padding: 0.75rem; gap: 0.75rem; overflow-y: auto; }
  .cd-stage { height: 46vh; }
  .cd-side { grid-template-columns: 6.5rem minmax(0, 1fr); align-items: start; column-gap: 0.9rem; }
  .cd-label { grid-column: 1 / -1; }
  .cd-pv, .cd-pv.is-tall { grid-row: span 3; width: 100%; }
  .cd-foot { padding: 0.75rem; border-radius: 0; }
  .cd-foot .btn-primary { flex: 1; }
}
/* Ausschnitt-Fenster: immer nur Bild ODER Video zeigen (das ausgeblendete Element darf nichts überdecken) */
.cd-wrap > [hidden], .cd-pv > [hidden], .cm-img > [hidden] { display: none !important; }

/* Spielerprofile: Mannschaft per Auswahlfeld, Spieler direkt darunter */
.team-panel { margin-bottom: 1.5rem; }
.team-select label { font-size: 1.05rem; margin-bottom: 0.5rem; }
.ts-row { display: flex; gap: 0.5rem; max-width: 28rem; }
.ts-row select { flex: 1; min-height: 3rem; font-size: 1.02rem; font-weight: 600; }
.js .js-hide { display: none; }
.team-panel .sync-bar { margin: 1.25rem 0 0.75rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.team-empty-note { margin-top: 1.25rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.sync-list li { background: #fafbf9; }
.list-title { margin: 0 0 0.75rem; }
