:root {
  color-scheme: dark;
  --bg: #0f1720;
  --panel: #17212b;
  --panel-2: #202d38;
  --line: rgba(232, 238, 235, 0.12);
  --text: #eef4f1;
  --muted: #9dacaa;
  --accent: #3fb27f;
  --accent-2: #f2c14e;
  --danger: #e46d5c;
  --own: #54c6eb;
  --opp: #ff7a6f;
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

body.postmatch-fullscreen-open {
  overflow: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
}

button:hover,
button.active {
  border-color: rgba(63, 178, 127, 0.72);
  background: rgba(63, 178, 127, 0.16);
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  padding: 10px 11px;
  outline: none;
}

input,
textarea {
  -webkit-user-select: text;
  user-select: text;
}

textarea {
  min-height: 104px;
  resize: vertical;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.app-shell {
  min-height: 100vh;
}

.layout {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100vh;
  min-height: 100vh;
  border-right: 1px solid var(--line);
  background: #111b24;
  padding: 18px;
  overflow: hidden;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background: rgba(67, 184, 135, 0.1);
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-title {
  font-size: 18px;
  font-weight: 800;
}

.touchline-wordmark {
  color: var(--accent);
  font-weight: 1000;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.touchline-wordmark span {
  color: #fff;
  font-size: 1.28em;
  letter-spacing: 0.04em;
}

.brand-subtitle,
.muted {
  color: var(--muted);
}

.brand-subtitle {
  font-size: 13px;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-heading {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.nav button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 10px 12px;
  text-align: left;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.sidebar-settings-button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  height: 46px;
  min-height: 46px;
  margin-top: auto;
  padding: 0 12px;
  border-radius: 14px;
  border-color: rgba(232, 238, 235, 0.14);
  background: rgba(238, 244, 241, 0.06);
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  text-align: left;
}

.sidebar-settings-button svg {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-settings-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-settings-button:hover,
.sidebar-settings-button.active {
  border-color: rgba(242, 193, 78, 0.72);
  background: rgba(242, 193, 78, 0.14);
  color: #f2c14e;
}

.sidebar-logout-button {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border-color: rgba(232, 238, 235, 0.12);
  background: rgba(238, 244, 241, 0.035);
  color: rgba(238, 244, 241, 0.72);
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}

.sidebar-logout-button:hover {
  border-color: rgba(255, 106, 99, 0.55);
  background: rgba(255, 106, 99, 0.1);
  color: #ffb6b1;
}

.main {
  min-width: 0;
  padding: 18px;
}

.home-main {
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.05;
  letter-spacing: 0;
}

.topbar p {
  max-width: 800px;
  margin: 8px 0 0;
  color: var(--muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.active-team-badge {
  display: grid;
  gap: 3px;
  min-width: 160px;
  padding: 9px 12px;
  border: 1px solid rgba(66, 184, 131, 0.45);
  border-radius: 14px;
  background: rgba(66, 184, 131, 0.1);
  color: var(--text);
}

.active-team-badge span,
.active-team-badge small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.active-team-badge select,
.active-team-badge strong {
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 900;
}

.sync {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(63, 178, 127, 0.12);
}

.workspace {
  display: grid;
  gap: 16px;
}

.readonly-banner {
  padding: 12px 14px;
  border: 1px solid rgba(143, 232, 190, 0.34);
  border-radius: 12px;
  background: rgba(63, 178, 127, 0.11);
  color: #9df0c8;
  font-weight: 900;
}

.team-readonly .workspace input:disabled,
.team-readonly .workspace textarea:disabled,
.team-readonly .workspace select:disabled,
.team-readonly .workspace button:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.team-readonly .workspace button:disabled {
  filter: grayscale(0.25);
}

.app-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(6, 12, 14, 0.58);
}

.app-modal {
  display: grid;
  gap: 14px;
  width: min(420px, 100%);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

.app-modal h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.12;
  letter-spacing: 0;
}

.app-modal p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.app-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.app-modal-actions.single {
  grid-template-columns: 1fr;
}

.app-modal-actions button {
  min-height: 42px;
}

.birthday-modal {
  width: min(460px, 100%);
}

.birthday-popup-list {
  display: grid;
  gap: 10px;
}

.birthday-popup-player {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(63, 178, 127, 0.38);
  border-radius: 12px;
  background: rgba(63, 178, 127, 0.12);
}

.birthday-popup-player strong {
  font-size: 18px;
}

.birthday-popup-player span {
  color: #f2c14e;
  font-weight: 900;
}

.login-screen {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 14%, rgba(67, 184, 135, 0.16), transparent 32%),
    #101922;
}

.login-card {
  display: grid;
  gap: 24px;
  width: min(560px, 100%);
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid rgba(232, 238, 235, 0.14);
  border-radius: 22px;
  background: rgba(17, 27, 36, 0.94);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-copy {
  display: grid;
  gap: 8px;
}

.login-copy p {
  margin: 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 1000;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-copy h1 {
  margin: 0;
  font-size: clamp(34px, 7vw, 58px);
  line-height: 1;
}

.login-copy span {
  color: var(--muted);
  font-weight: 800;
}

.login-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.login-form input {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  font: inherit;
  font-size: 18px;
  font-weight: 900;
  padding: 0 14px;
}

.login-form button,
.login-users button {
  width: auto;
  min-height: 52px;
  padding: 0 18px;
  border-color: rgba(65, 185, 130, 0.62);
  background: rgba(65, 185, 130, 0.16);
  color: var(--text);
  font-weight: 1000;
}

.login-form button,
.login-error {
  grid-column: 1 / -1;
}

.login-error {
  padding: 10px 12px;
  border: 1px solid rgba(224, 89, 76, 0.5);
  border-radius: 12px;
  background: rgba(224, 89, 76, 0.12);
  color: #ffb2aa;
  font-weight: 900;
}

.password-setup-backdrop {
  z-index: 12000;
}

.password-setup-modal label {
  display: grid;
  gap: 7px;
}

.password-setup-modal label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.password-setup-modal input {
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  font: inherit;
  font-weight: 900;
  padding: 0 12px;
}

.login-users {
  display: grid;
  gap: 10px;
}

.login-users > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
}

.login-users > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.login-users button {
  min-height: 38px;
  border-color: rgba(232, 238, 235, 0.16);
  background: rgba(238, 244, 241, 0.07);
}

.home-screen {
  position: relative;
  min-height: calc(100vh - 130px);
  padding-bottom: 54px;
}

.home-team-switcher {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
}

.home-team-switcher label {
  display: grid;
  gap: 5px;
  min-width: 190px;
}

.home-team-switcher span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.home-team-switcher select,
.home-team-switcher strong {
  display: flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid rgba(65, 185, 130, 0.58);
  border-radius: 14px;
  background: rgba(65, 185, 130, 0.14);
  color: var(--text);
  font: inherit;
  font-weight: 1000;
  padding: 0 12px;
}

.home-question {
  display: grid;
  gap: 8px;
  max-width: 900px;
  margin: clamp(18px, 5vh, 58px) 0 clamp(28px, 5vh, 54px);
}

.home-wordmark-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.home-wordmark-slogan {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-question .touchline-wordmark {
  font-size: 13px;
}

.home-question h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.02;
  letter-spacing: 0;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas:
    "matchday training"
    "principles orga";
  gap: 16px;
}

.home-birthday-notice {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 14px 16px;
  border: 1px solid rgba(63, 178, 127, 0.42);
  border-radius: var(--radius);
  background: rgba(63, 178, 127, 0.10);
}

.home-birthday-notice > span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.home-birthday-notice > div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-birthday-pill {
  display: inline-flex;
  align-items: center;
}

.home-birthday-pill strong {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(238, 244, 241, 0.10);
  color: var(--text);
}

.home-birthday-pill small {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-left: -6px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(242, 193, 78, 0.16);
  color: #f2c14e;
  font-weight: 900;
}

.home-tile {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(96px, 18vw, 170px);
  align-items: stretch;
  min-height: 190px;
  overflow: hidden;
  padding: 0;
  border-radius: var(--radius);
  text-align: left;
  isolation: isolate;
}

.home-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 52%);
}

.tile-matchday {
  grid-area: matchday;
  background: #163728;
}

.tile-training {
  grid-area: training;
  background: #243229;
}

.tile-principles {
  grid-area: principles;
  background: #192a36;
}

.tile-orga {
  grid-area: orga;
  background: #20262d;
}

.home-settings-button {
  position: absolute;
  right: 0;
  bottom: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: auto;
  min-height: 36px;
  padding: 0 12px;
  border-color: rgba(232, 238, 235, 0.14);
  background: rgba(238, 244, 241, 0.07);
  color: rgba(238, 244, 241, 0.78);
  font-size: 12px;
  font-weight: 800;
}

.home-settings-button:hover {
  border-color: rgba(242, 193, 78, 0.72);
  background: rgba(242, 193, 78, 0.14);
  color: #f2c14e;
}

.home-logout-button {
  position: absolute;
  left: 0;
  bottom: 0;
  width: auto;
  min-height: 36px;
  padding: 0 12px;
  border-color: rgba(232, 238, 235, 0.14);
  background: rgba(238, 244, 241, 0.05);
  color: rgba(238, 244, 241, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.home-logout-button:hover {
  border-color: rgba(255, 106, 99, 0.55);
  background: rgba(255, 106, 99, 0.1);
  color: #ffb6b1;
}

.tile-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 9px;
  min-width: 0;
  padding: 22px;
}

.tile-copy strong {
  font-size: clamp(23px, 3vw, 34px);
  line-height: 1;
}

.tile-copy span:last-child {
  max-width: 520px;
  color: rgba(238, 244, 241, 0.78);
  line-height: 1.45;
}

.tile-art {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 14px 18px 14px 0;
}

.tile-art svg {
  width: 100%;
  max-width: 164px;
  height: auto;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.22));
}

.svg-field {
  fill: #1f6f58;
}

.svg-board {
  fill: rgba(238, 244, 241, 0.14);
  stroke: rgba(238, 244, 241, 0.34);
  stroke-width: 5;
}

.svg-bg {
  fill: #101922;
}

.svg-line,
.svg-line-soft,
.svg-accent {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.svg-line {
  stroke: rgba(216, 243, 220, 0.72);
  stroke-width: 5;
}

.svg-line-fill {
  fill: none;
  stroke: rgba(216, 243, 220, 0.72);
  stroke-width: 5;
}

.svg-line-soft {
  stroke: rgba(216, 243, 220, 0.42);
  stroke-width: 6;
}

.svg-accent {
  stroke: var(--accent-2);
  stroke-width: 8;
}

.svg-own {
  fill: var(--own);
}

.svg-opp {
  fill: var(--opp);
}

.svg-ball {
  fill: var(--accent-2);
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.training-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: 16px;
}

.wide-panel {
  grid-column: 1 / -1;
}

.training-classic {
  display: grid;
  justify-items: center;
  gap: 18px;
  min-height: 560px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  padding: 20px;
}

.training-classic h2 {
  margin: 34px 0 18px;
  color: var(--text);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
}

.classic-team-select {
  width: min(240px, 100%);
  justify-self: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.065);
  color: var(--text);
  padding: 10px 12px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}

.classic-team-label {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  width: min(240px, 100%);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.065);
  color: var(--text);
  padding: 10px 12px;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
}

.classic-team-label.compact {
  width: auto;
  min-height: 36px;
  padding: 8px 12px;
  font-size: 15px;
}

.training-button-stack {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: min(620px, 100%);
}

.training-button-stack.compact {
  gap: 18px;
}

.training-button-stack button {
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  color: var(--text);
  padding: 10px 14px;
  font-size: clamp(16px, 2.3vw, 22px);
  font-weight: 800;
  text-align: center;
}

.planner-menu {
  gap: 16px;
}

.training-subnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.training-subnav button {
  width: auto;
  min-height: 38px;
  padding: 8px 12px;
}

.training-subnav .classic-team-select {
  justify-self: auto;
  width: 180px;
}

.training-top-actions {
  width: min(620px, 100%);
}

.training-top-actions button {
  width: 100%;
  min-height: 58px;
  border-color: rgba(242, 193, 78, 0.55);
  background: rgba(242, 193, 78, 0.13);
  font-size: clamp(17px, 2.4vw, 23px);
  font-weight: 900;
}

.training-calendar-menu {
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.training-calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.training-calendar-head div {
  display: grid;
  gap: 2px;
}

.training-calendar-head strong {
  font-size: 18px;
}

.training-calendar-head span,
.training-week-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.training-calendar-head button {
  width: auto;
  min-height: 38px;
  padding: 8px 12px;
}

.training-calendar-weeks {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 1fr);
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.training-calendar-week {
  display: grid;
  gap: 7px;
  min-width: 260px;
}

.training-slot-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 7px;
}

.training-slot {
  display: grid;
  gap: 2px;
  min-height: 64px;
  padding: 8px 6px;
  border-color: rgba(232, 238, 235, 0.16);
  background: rgba(238, 244, 241, 0.05);
  text-align: center;
}

.training-slot strong {
  color: var(--accent);
  font-size: 16px;
}

.training-slot span {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.training-slot small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.training-slot.planned {
  border-color: rgba(63, 178, 127, 0.42);
}

.training-slot.active {
  border-color: rgba(242, 193, 78, 0.85);
  background: rgba(242, 193, 78, 0.16);
}

.training-drafts {
  width: 100%;
}

.draft-list {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.draft-card {
  position: relative;
  display: grid;
  gap: 5px;
  min-height: 72px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.draft-card:hover,
.draft-card.active {
  border-color: rgba(63, 178, 127, 0.72);
  background: rgba(63, 178, 127, 0.16);
}

.draft-card.delete-open {
  border-color: rgba(228, 109, 92, 0.74);
}

.draft-card span {
  color: var(--muted);
  font-size: 12px;
}

.draft-delete-confirm {
  position: absolute;
  right: 6px;
  top: 6px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  border-color: rgba(228, 109, 92, 0.78);
  border-radius: 999px;
  background: rgba(228, 109, 92, 0.18);
  color: #ffb1a7;
  font-size: 18px;
  font-weight: 900;
}

.planner-menu .training-button-stack {
  gap: 10px;
  width: min(620px, 100%);
}

.planner-menu .training-button-stack button {
  min-height: 52px;
}

.classic-workspace {
  width: 100%;
  justify-self: stretch;
  color: var(--text);
}

.principle-pyramid-screen {
  display: grid;
  gap: clamp(12px, 2vh, 20px);
  justify-items: center;
  width: 100%;
  min-height: min(620px, calc(100vh - 140px));
  padding: clamp(14px, 2.2vw, 24px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(140deg, rgba(63, 178, 127, 0.12), transparent 36%),
    var(--panel);
}

.principle-pyramid-copy {
  display: grid;
  gap: 4px;
  text-align: center;
}

.principle-pyramid-copy span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.principle-pyramid-copy h2 {
  margin: 0;
  font-size: clamp(24px, 3.2vw, 38px);
}

.principle-pyramid {
  position: relative;
  width: min(820px, 100%, calc((100vh - 245px) * 1.22));
  aspect-ratio: 1.22 / 1;
  --pyramid-tactics-bottom: 48%;
  --pyramid-buffer-bottom: 56%;
}

.pyramid-level {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: clamp(8px, 1.4vw, 13px);
  width: 100%;
  min-height: auto;
  padding: 0 clamp(28px, 7vw, 86px);
  border: 0;
  border-radius: 0;
  color: #f6faf7;
  text-align: center;
  box-shadow: 0 24px 46px rgba(3, 12, 14, 0.24);
}

.pyramid-level::after {
  content: "";
  position: absolute;
  inset: 2px;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 52%);
  clip-path: inherit;
}

.pyramid-level span,
.pyramid-level strong {
  position: relative;
  z-index: 1;
}

.pyramid-level span {
  font-size: clamp(22px, 3.2vw, 34px);
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
}

.pyramid-level strong {
  max-width: min(520px, 60%);
  font-size: clamp(13px, 1.55vw, 17px);
  font-weight: 800;
  line-height: 1.25;
}

.pyramid-level:hover {
  filter: brightness(1.08);
}

.pyramid-tactics {
  padding-top: 15%;
  padding-bottom: 49%;
  clip-path: polygon(50% 0, 74% var(--pyramid-tactics-bottom), 26% var(--pyramid-tactics-bottom));
  background: linear-gradient(145deg, #123a4a, #1f6f6b);
}

.pyramid-tactics strong {
  max-width: min(360px, 36%);
  font-size: clamp(11px, 1.28vw, 15px);
  line-height: 1.18;
}

.pyramid-strategy {
  padding-top: 57%;
  padding-bottom: 11%;
  clip-path: polygon(22% var(--pyramid-buffer-bottom), 78% var(--pyramid-buffer-bottom), 100% 100%, 0 100%);
  background: linear-gradient(145deg, #1b4d38, #46b879);
}

.principle-panel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.empty-principle {
  min-height: 180px;
  justify-content: center;
  color: var(--muted);
}

.classic-archive {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: min(980px, 100%);
}

.classic-archive img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.archive-open-header {
  width: 100%;
  min-height: 0;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  box-shadow: none;
}

.archive-open-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.training-archive-library {
  align-items: stretch;
}

.archive-library-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.archive-library-head p {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.archive-library-head h2 {
  margin: 0;
}

.archive-date-groups {
  display: grid;
  gap: 18px;
  width: 100%;
}

.archive-date-group {
  display: grid;
  gap: 10px;
}

.archive-date-group h3 {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.archive-draft-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.draft-card.archive-card {
  min-height: 118px;
  align-content: start;
  gap: 7px;
}

.draft-card.archive-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.classic-team-list {
  display: grid;
  gap: 10px;
  width: 100%;
}

.classic-player-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.7fr) 132px 34px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.classic-player-row input,
.classic-player-row select,
.team-add-row input,
.team-add-row select {
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.team-manager {
  align-items: stretch;
}

.settings-workspace {
  display: grid;
  gap: 18px;
}

.settings-team-panel .panel-body {
  padding-top: 0;
}

.settings-team-switch {
  display: grid;
  gap: 6px;
  min-width: 220px;
}

.settings-team-switch span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.settings-team-switch select,
.settings-team-switch strong {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(66, 184, 131, 0.45);
  border-radius: 12px;
  background: rgba(66, 184, 131, 0.1);
  color: var(--text);
  font-weight: 900;
}

.active-team-context {
  display: grid;
  gap: 4px;
  min-width: 220px;
}

.active-team-context span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.active-team-context strong {
  color: var(--accent);
  font-size: 18px;
}

.team-manager-head,
.team-settings-panel,
.team-user-panel,
.team-add-panel {
  width: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.team-manager-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.team-manager-head p {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.team-manager-head h2,
.team-settings-panel h3,
.team-user-panel h3,
.team-add-panel h3,
.team-manager-group h3 {
  margin: 0;
}

.team-manager-actions {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.team-manager-actions button {
  width: 34px;
  min-height: 34px;
  padding: 0;
}

.team-manager-list {
  display: grid;
  gap: 18px;
  width: 100%;
}

.team-settings-panel {
  display: grid;
  gap: 14px;
}

.team-user-panel {
  display: grid;
  gap: 12px;
}

.team-user-panel > div:first-child {
  display: grid;
  gap: 4px;
}

.team-user-panel > div:first-child span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.team-user-list {
  display: grid;
  gap: 8px;
}

.team-user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 7px 8px 7px 12px;
  border: 1px solid rgba(232, 238, 235, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.team-user-row small {
  color: var(--muted);
  font-weight: 900;
}

.team-user-row select,
.team-user-add-row select {
  min-height: 34px;
  border: 1px solid rgba(232, 238, 235, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font: inherit;
  font-weight: 900;
  padding: 0 10px;
}

.team-user-row button {
  width: 30px;
  min-height: 30px;
  padding: 0;
  border-color: rgba(185, 75, 65, 0.42);
  color: #d36a5f;
}

.team-user-add-row {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(150px, auto) auto;
  gap: 8px;
}

.team-user-add-row input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  padding: 0 12px;
}

.team-user-add-row button {
  width: auto;
  min-height: 42px;
  padding: 0 12px;
}

.team-settings-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.55fr) minmax(280px, 1fr);
  gap: 12px;
}

.team-settings-grid label,
.team-training-days {
  display: grid;
  gap: 7px;
}

.team-settings-grid span,
.team-training-days > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.team-settings-grid input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  padding: 10px 12px;
}

.team-training-days > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.team-day-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted);
  cursor: pointer;
}

.team-day-toggle input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.team-day-toggle.active {
  border-color: rgba(65, 185, 130, 0.72);
  background: rgba(65, 185, 130, 0.16);
  color: var(--text);
}

.team-manager-group {
  display: grid;
  gap: 10px;
}

.team-add-panel {
  display: grid;
  gap: 12px;
}

.team-add-row {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) 160px minmax(180px, 0.7fr) 132px auto;
  gap: 8px;
}

.team-import-panel {
  border-color: rgba(66, 184, 131, 0.34);
  background: linear-gradient(135deg, rgba(66, 184, 131, 0.1), rgba(255, 255, 255, 0.025));
}

.team-import-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.team-import-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.info-button {
  width: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 50%;
  border-color: rgba(66, 184, 131, 0.5);
  color: #9cf0c5;
  font-weight: 900;
  font-style: italic;
}

.info-button.active,
.info-button:hover {
  background: rgba(66, 184, 131, 0.18);
}

.team-import-info {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 12px 12px 12px 32px;
  border: 1px solid rgba(66, 184, 131, 0.28);
  border-radius: 12px;
  background: rgba(5, 12, 18, 0.34);
  color: var(--text);
}

.team-import-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.team-import-actions input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.team-import-actions label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(66, 184, 131, 0.5);
  border-radius: 999px;
  color: #9cf0c5;
  font-weight: 900;
  cursor: pointer;
}

.team-import-actions span {
  color: var(--muted);
  font-weight: 800;
}

.status-toggle {
  min-height: 36px;
  padding: 0 10px;
}

.player-remove-x {
  width: 30px;
  min-height: 30px;
  padding: 0;
  border-color: rgba(185, 75, 65, 0.42);
  color: #d36a5f;
}

.player-delete-confirm {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.player-delete-confirm button {
  min-height: 30px;
  padding: 0 12px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.panel-header h2,
.panel-header h3 {
  margin: 0;
  font-size: 16px;
}

.panel-body {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.toolbar button {
  padding: 8px 10px;
}

.graphic-player-stacks {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 8px;
}

.graphic-player-token {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  min-height: 25px;
  padding: 0;
  border: 2px solid rgba(16, 25, 34, 0.34);
  border-radius: 999px;
  background: #164994;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.18);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.graphic-player-token:hover {
  border-color: rgba(238, 244, 241, 0.8);
  background: #164994;
}

.graphic-player-token:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.graphic-player-token.navy,
.graphic-object.player.navy {
  background: #164994;
  color: #fff;
}

.graphic-player-token.darkgreen,
.graphic-object.player.darkgreen {
  background: #0b5d3b;
  color: #fff;
}

.graphic-player-token.red,
.graphic-object.player.red {
  background: #f32922;
  color: #101922;
}

.graphic-player-token.white,
.graphic-object.player.white {
  background: #f7f8f3;
  color: #151719;
}

.graphic-player-token.yellow,
.graphic-object.player.yellow {
  background: #f5f10b;
  color: #101922;
}

.graphic-player-token.black,
.graphic-object.player.black {
  background: #1f2424;
  color: #f7f8f3;
}

.graphic-player-token-ghost {
  position: fixed;
  z-index: 70000;
  pointer-events: none;
  transform: translate(-50%, -50%);
  opacity: 0.9;
}

.graphic-ball-token {
  position: relative;
  width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent url("/assets/keynote/Data/ball-tactical-sport.png") center / contain no-repeat;
  box-shadow: 0 6px 11px rgba(0, 0, 0, 0.2);
  cursor: grab;
  touch-action: none;
  overflow: hidden;
}

.graphic-ball-token:hover {
  filter: drop-shadow(0 0 0 rgba(238, 244, 241, 0.86));
}

.graphic-ball-token::before,
.graphic-ball-token::after,
.graphic-object.ball::before,
.graphic-object.ball::after {
  display: none;
}

.graphic-ball-token::before,
.graphic-object.ball::before {
  left: 50%;
  top: 50%;
  width: 33%;
  height: 33%;
  background: #111;
  clip-path: polygon(50% 0, 100% 34%, 82% 100%, 18% 100%, 0 34%);
  transform: translate(-50%, -50%);
}

.graphic-ball-token::after,
.graphic-object.ball::after {
  inset: 12%;
  background:
    linear-gradient(28deg, transparent 0 43%, #111 44% 48%, transparent 49% 100%),
    linear-gradient(-28deg, transparent 0 43%, #111 44% 48%, transparent 49% 100%),
    radial-gradient(circle at 18% 22%, #111 0 11%, transparent 12%),
    radial-gradient(circle at 82% 22%, #111 0 11%, transparent 12%),
    radial-gradient(circle at 18% 78%, #111 0 11%, transparent 12%),
    radial-gradient(circle at 82% 78%, #111 0 11%, transparent 12%);
}

.graphic-ball-token-ghost {
  position: fixed;
  z-index: 70000;
  pointer-events: none;
  transform: translate(-50%, -50%);
  opacity: 0.9;
}

.pitch {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 330px;
  overflow: hidden;
  border: 1px solid rgba(216, 243, 220, 0.32);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px) 50% 0 / 25% 100%,
    linear-gradient(#236f4e, #1a5c42);
}

.keynote-pitch {
  aspect-ratio: 16 / 9;
  min-height: 340px;
  background-color: #cfcfcf;
  background-position: center;
  background-size: cover;
}

.keynote-pitch.fullscreen {
  position: fixed;
  inset: 12px;
  z-index: 3000;
  width: auto;
  min-height: 0;
  aspect-ratio: auto;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.62);
}

.board-fullscreen-toggle {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 15;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 999px;
  background: rgba(12, 24, 30, 0.74);
  color: #f4faf7;
  font-size: 20px;
  font-weight: 900;
}

.board-fullscreen-toggle:hover {
  background: rgba(63, 178, 127, 0.28);
}

.keynote-pitch::before,
.keynote-pitch::after,
.keynote-pitch .half-line,
.keynote-pitch .penalty {
  display: none;
}

.pitch::before,
.pitch::after {
  content: "";
  position: absolute;
  inset: 9%;
  border: 2px solid rgba(232, 255, 241, 0.72);
  pointer-events: none;
}

.pitch::after {
  inset: auto;
  left: 50%;
  top: 50%;
  width: 16%;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.half-line {
  position: absolute;
  left: 50%;
  top: 9%;
  bottom: 9%;
  width: 2px;
  background: rgba(232, 255, 241, 0.72);
}

.penalty {
  position: absolute;
  top: 29%;
  width: 13%;
  height: 42%;
  border: 2px solid rgba(232, 255, 241, 0.72);
}

.penalty.left {
  left: 9%;
  border-left: 0;
}

.penalty.right {
  right: 9%;
  border-right: 0;
}

.marker {
  position: absolute;
  display: grid;
  place-items: center;
  width: clamp(24px, 3.1vw, 34px);
  height: clamp(24px, 3.1vw, 34px);
  border: clamp(3px, 0.36vw, 5px) solid rgba(16, 25, 34, 0.32);
  border-radius: 999px;
  color: #ffffff;
  font-size: clamp(12px, 1.55vw, 18px);
  font-weight: 900;
  line-height: 1;
  transform: translate(-50%, -50%);
  user-select: none;
  touch-action: none;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22);
}

.marker.own {
  background: var(--pitch-own-color, #164994);
  border-color: var(--pitch-own-border, #0c356e);
  color: var(--pitch-own-text, #ffffff);
}

.marker.opp {
  background: var(--pitch-opp-color, #f32922);
  border-color: var(--pitch-opp-border, #b51513);
  color: var(--pitch-opp-text, #ffffff);
}

.marker.ball {
  width: clamp(16px, 2vw, 22px);
  height: clamp(16px, 2vw, 22px);
  border: 2px solid #111;
  background: radial-gradient(circle at 50% 50%, #ffffff 0 28%, transparent 29%),
    conic-gradient(from 18deg, #111 0 14%, #fff 14% 28%, #111 28% 42%, #fff 42% 56%, #111 56% 70%, #fff 70% 84%, #111 84% 100%);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.22);
}

.keynote-pitch.fullscreen .marker {
  width: clamp(30px, 3.1vw, 44px);
  height: clamp(30px, 3.1vw, 44px);
  font-size: clamp(15px, 1.55vw, 23px);
}

.matchday-team-colors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.matchday-color-side {
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.matchday-color-side > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.matchday-color-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.matchday-color-options button {
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border: 2px solid var(--swatch-border);
  border-radius: 999px;
  background: var(--swatch);
}

.matchday-color-options button.active {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.matchday-formation-setup {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto minmax(280px, 1.4fr) auto;
  gap: 10px;
  align-items: end;
}

.matchday-fussballde-import input {
  min-height: 43px;
  padding: 9px 11px;
  font-size: 13px;
}

.matchday-import-status {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.matchday-formation-setup button {
  min-height: 43px;
  padding: 0 14px;
  font-weight: 900;
}

@media (max-width: 980px) {
  .matchday-formation-setup {
    grid-template-columns: 1fr;
  }
}

.matchday-workspace {
  display: grid;
  gap: 16px;
}

.matchday-plan-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px auto auto;
  align-items: end;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.matchday-ingame-launch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 18px;
  border-color: rgba(76, 211, 149, 0.72);
  background: linear-gradient(135deg, rgba(56, 185, 125, 0.96), rgba(28, 119, 89, 0.96));
  color: #f7fff9;
  box-shadow: 0 10px 26px rgba(35, 171, 111, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.matchday-ingame-launch span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #b8ffd7;
  box-shadow: 0 0 0 5px rgba(184, 255, 215, 0.13);
}

.matchday-ingame-launch strong {
  font-size: 14px;
  letter-spacing: 0.02em;
}

.matchday-ingame-launch:hover {
  transform: translateY(-1px);
  border-color: rgba(151, 255, 202, 0.9);
  background: linear-gradient(135deg, rgba(68, 207, 142, 1), rgba(31, 137, 100, 1));
}

.matchday-archive-grid .draft-card {
  text-align: left;
}

.matchday-archive-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.matchday-schedule-sync-status {
  display: inline-flex;
  margin-top: 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.matchday-live-notes {
  display: grid;
  gap: 10px;
}

.matchday-live-notes textarea {
  min-height: 110px;
}

.matchday-live-notes > button {
  justify-self: start;
  min-width: 140px;
}

.matchday-postmatch-launch {
  display: grid;
}

.matchday-postmatch-launch button {
  display: grid;
  justify-items: start;
  gap: 4px;
  min-height: 96px;
  padding: 18px 22px;
  border: 1px solid rgba(255, 196, 72, 0.78);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 196, 72, 0.95), rgba(63, 178, 127, 0.76));
  color: #101922;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
  text-align: left;
}

.matchday-postmatch-launch span {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.matchday-postmatch-launch strong {
  font-size: 28px;
  line-height: 1;
}

.matchday-postmatch-overview {
  display: grid;
  gap: 16px;
}

.postmatch-circle {
  position: relative;
  display: grid;
  grid-template-areas:
    ". possession ."
    "transition-win set-pieces transition-loss"
    ". ball-win individual";
  grid-template-columns: 1fr 1fr 1fr;
  gap: 72px 86px;
  padding: 62px 28px 28px;
}

.postmatch-circle-arrows {
  position: absolute;
  inset: 11% 8% 8%;
  z-index: 0;
  width: 84%;
  height: 81%;
  pointer-events: none;
  object-fit: contain;
  opacity: 0.82;
}

.postmatch-phase-card {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 150px;
  padding: 26px 18px 18px;
  border: 2px solid currentColor;
  border-radius: var(--radius);
  text-align: left;
}

.postmatch-phase-card.possession { grid-area: possession; }
.postmatch-phase-card.transition-win { grid-area: transition-win; }
.postmatch-phase-card.transition-loss { grid-area: transition-loss; }
.postmatch-phase-card.ball-win { grid-area: ball-win; }
.postmatch-phase-card.set-pieces { grid-area: set-pieces; }

.postmatch-phase-card.blue { background: rgba(10, 125, 180, 0.10); color: #28aee4; }
.postmatch-phase-card.red { background: rgba(238, 36, 24, 0.10); color: #ff6a5e; }
.postmatch-phase-card.yellow { background: rgba(255, 176, 0, 0.13); color: #ffc448; }

.principle-game-circle {
  grid-template-areas:
    ". possession ."
    "transition-win set-pieces transition-loss"
    ". ball-win .";
}

.principle-game-phase-button {
  place-items: center;
  min-height: 170px;
  padding: 22px;
  text-align: center;
}

.postmatch-individual-box {
  position: relative;
  z-index: 1;
  grid-area: individual;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  min-height: 150px;
  padding: 16px;
  border: 2px solid rgba(255, 255, 255, 0.84);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  color: #101922;
}

.postmatch-individual-box strong {
  font-size: 22px;
  line-height: 1;
}

.postmatch-individual-box textarea {
  width: 100%;
  min-height: 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: #101922;
  resize: vertical;
  align-self: stretch;
}

.postmatch-individual-box textarea:focus {
  outline: none;
}

.postmatch-phase-card strong {
  position: absolute;
  left: 16px;
  bottom: calc(100% + 10px);
  width: calc(100% - 32px);
  padding: 0;
  background: transparent;
  font-size: 23px;
  line-height: 1.05;
  text-align: left;
}

.principle-game-phase-button strong {
  position: static;
  left: auto;
  bottom: auto;
  width: auto;
  align-self: center;
  justify-self: center;
  font-size: 30px;
  line-height: 1.08;
  text-align: center;
}

.postmatch-phase-card span,
.postmatch-phase-card small {
  font-size: 12px;
  opacity: 0.86;
}

.postmatch-empty {
  align-self: center;
  justify-self: center;
  color: inherit;
  font-size: 16px;
  font-weight: 900;
}

.postmatch-header-actions {
  display: flex;
  gap: 8px;
}

.matchday-postmatch-panel.fullscreen {
  position: fixed;
  inset: 0;
  z-index: 2000;
  overflow: auto;
  min-height: 100vh;
  margin: 0;
  border-radius: 0;
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.matchday-postmatch-panel.fullscreen .postmatch-circle {
  min-height: calc(100vh - 150px);
  gap: 96px 120px;
  padding: 78px 58px 58px;
}

.matchday-postmatch-panel.fullscreen .postmatch-phase-card {
  min-height: 230px;
}

.matchday-postmatch-panel.fullscreen .postmatch-individual-box {
  min-height: 230px;
}

.matchday-postmatch-panel.fullscreen .postmatch-phase-detail {
  min-height: calc(100vh - 116px);
}

.postmatch-entry-list {
  display: grid;
  gap: 8px;
}

.postmatch-entry {
  display: grid;
  gap: 5px;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.postmatch-entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.topic-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  font-weight: 900;
  color: #fff;
  font-size: 12px;
}

.topic-tag {
  border-radius: 999px;
}

.topic-tag.blue { background: #49b9e7; }
.topic-tag.red { background: #ef806b; }
.topic-tag.yellow { background: #ffd06a; color: #101922; }

.postmatch-entry ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 16px;
  font-size: 15px;
  line-height: 1.28;
}

.postmatch-phase-detail {
  display: grid;
  grid-template-columns: 210px minmax(460px, 1fr);
  gap: 12px;
  align-items: start;
  padding: 24px;
  background: transparent;
  color: var(--text);
}

.postmatch-phase-side {
  display: grid;
  gap: 8px;
}

.phase-model-label {
  display: grid;
  place-items: center;
  min-height: 92px;
  padding: 14px;
  border: 2px solid rgba(232, 238, 235, 0.34);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 24px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
}

.phase-model-label.big {
  min-height: 100%;
  font-size: 28px;
}

.postmatch-phase-main {
  display: grid;
  gap: 8px;
}

.phase-model-title {
  display: grid;
  place-items: center;
  min-height: 118px;
  padding: 18px;
  border-radius: 10px;
  color: #fff;
  font-size: 34px;
  font-weight: 1000;
  line-height: 1.1;
  text-align: center;
}

.phase-model-title.blue { background: #087db8; }
.phase-model-title.red { background: #f12318; }
.phase-model-title.yellow { background: #ffb000; color: #fff; }

.postmatch-phase-main .postmatch-topic-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.postmatch-topic-grid {
  display: grid;
  gap: 8px;
}

.postmatch-topic-card {
  display: grid;
  align-content: center;
  place-items: center;
  gap: 8px;
  min-height: 118px;
  padding: 16px 18px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  text-align: center;
}

.postmatch-topic-card.active {
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.88), 0 8px 22px rgba(16, 25, 34, 0.20);
}

.postmatch-topic-card.blue { background: #5fb9de; }
.postmatch-topic-card.red { background: #ec7b63; }
.postmatch-topic-card.yellow { background: #ffd06a; color: #101922; }

.postmatch-topic-card strong {
  font-size: 28px;
  font-weight: 1000;
  line-height: 1.05;
}

.postmatch-topic-card span {
  max-width: 44ch;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  opacity: 0.92;
}

.postmatch-note-editor {
  display: grid;
  gap: 8px;
  width: min(520px, 100%);
  min-height: 300px;
  margin-top: 8px;
  padding: 14px;
  border: 3px solid #101010;
  border-radius: 10px;
  background: #fff;
  color: #101010;
}

.postmatch-note-editor span {
  width: max-content;
  max-width: 100%;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
}

.postmatch-note-editor.blue span { background: #087db8; }
.postmatch-note-editor.red span { background: #f12318; }
.postmatch-note-editor.yellow span { background: #ffb000; color: #101922; }

.postmatch-note-editor textarea {
  min-height: 220px;
  border: 0;
  background: transparent;
  color: #101922;
  resize: vertical;
}

.postmatch-note-editor textarea:focus {
  outline: none;
}

.principle-game-card-summary {
  display: grid;
  gap: 5px;
  align-self: center;
  color: inherit;
}

.principle-game-card-summary span {
  font-size: 16px;
  font-weight: 1000;
}

.principle-game-card-summary small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: inherit;
  font-size: 12px;
  font-weight: 800;
  opacity: 0.9;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.principle-scope-card {
  border: 2px dashed rgba(255, 255, 255, 0.42);
}

.principle-game-panel .postmatch-phase-detail {
  grid-template-columns: 150px minmax(460px, 1fr);
}

.principle-game-panel .phase-model-label.big {
  min-height: 100%;
  font-size: 22px;
}

.principle-scope-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.principle-scope-tabs button {
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid rgba(232, 238, 235, 0.14);
  border-radius: 999px;
  background: rgba(16, 25, 34, 0.56);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.principle-scope-tabs button.active {
  border-color: rgba(69, 185, 138, 0.72);
  background: rgba(69, 185, 138, 0.18);
  color: var(--text);
}

.principle-scope-tabs button.drag-over {
  border-color: var(--accent-2);
  background: rgba(255, 207, 71, 0.22);
  color: var(--text);
  transform: translateY(-1px);
}

.principle-scope-description {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.principle-card-workspace {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.principle-card-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.principle-card-toolbar div {
  display: grid;
  gap: 2px;
}

.principle-card-toolbar strong {
  font-size: 20px;
}

.principle-card-toolbar span {
  color: var(--muted);
  font-weight: 800;
}

.principle-card-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.principle-card-list {
  display: grid;
  gap: 8px;
}

.principle-card-list-focused {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: start;
}

.principle-game-card,
.principle-card-placeholder {
  padding: 10px;
  border-radius: 10px;
  background: rgba(232, 238, 235, 0.08);
}

.principle-card-placeholder {
  min-height: 88px;
  border: 1px dashed rgba(232, 238, 235, 0.22);
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.principle-card-add-placeholder {
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 16px;
  cursor: pointer;
}

.principle-game-card {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(232, 238, 235, 0.16);
  cursor: grab;
}

.principle-game-card.selected {
  border-color: rgba(67, 184, 135, 0.78);
  box-shadow: 0 0 0 2px rgba(67, 184, 135, 0.18);
}

.principle-game-card:active {
  cursor: grabbing;
}

.principle-game-card.dragging {
  opacity: 0.48;
}

.principle-game-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.principle-game-card-head button {
  width: 30px;
  min-height: 30px;
  padding: 0;
}

.principle-card-preview {
  display: grid;
  gap: 5px;
}

.principle-card-preview strong {
  font-size: 18px;
  line-height: 1.1;
}

.principle-card-preview span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.principle-card-preview small {
  color: var(--accent-2);
  font-weight: 900;
}

.principle-card-edit {
  min-height: 34px;
}

.principle-delete-confirm {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(242, 193, 78, 0.42);
  border-radius: 10px;
  background: rgba(11, 18, 24, 0.92);
}

.principle-delete-confirm span {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.principle-delete-confirm button {
  min-height: 32px;
  padding: 6px 10px;
}

.principle-delete-confirm button:first-of-type {
  border-color: rgba(255, 108, 102, 0.62);
  color: #ff8b86;
}

.principle-delete-confirm.legacy {
  margin-bottom: 10px;
}

.principle-tactic-workspace {
  margin-top: 14px;
}

.principle-tactic-board-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.principle-tactic-board-tabs button {
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid rgba(232, 238, 235, 0.14);
  border-radius: 999px;
  background: rgba(16, 25, 34, 0.56);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.principle-tactic-board-tabs button.active {
  border-color: rgba(69, 185, 138, 0.72);
  background: rgba(69, 185, 138, 0.18);
  color: var(--text);
}

.principle-tactic-board-card {
  cursor: default;
}

.principle-tactic-board-fields {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(280px, 1.25fr);
  gap: 10px;
  margin-bottom: 10px;
}

.principle-tactic-board-fields label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
}

.principle-tactic-board-fields input,
.principle-tactic-board-fields textarea {
  min-height: 42px;
  border: 1px solid rgba(232, 238, 235, 0.15);
  border-radius: 10px;
  background: rgba(16, 25, 34, 0.72);
  color: var(--text);
  padding: 9px 11px;
  font-size: 16px;
  font-weight: 800;
  text-transform: none;
}

.principle-tactic-board-fields textarea {
  resize: vertical;
}

.principle-tactic-inline-editor {
  min-height: 520px;
}

.principle-tactic-inline-editor .exercise-field-board.editable.horizontal {
  min-height: 520px;
}

.principle-tactic-inline-editor .graphic-board-toolbar {
  flex-wrap: nowrap;
  min-height: 46px;
  overflow: visible;
}

.principle-tactic-inline-editor .graphic-toolbar-right {
  flex-wrap: nowrap;
}

.principle-tactic-inline-editor .graphic-tool-rail {
  gap: 4px;
  min-width: 268px;
}

.principle-tactic-inline-editor .graphic-tool-rail button:not(:first-child) {
  width: 30px;
  min-width: 30px;
  border-width: 1px;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.principle-tactic-presentation .principle-tactic-presentation-board {
  display: grid;
  min-height: min(68vh, 720px);
}

.principle-tactic-presentation-board .exercise-field-board.preview {
  width: min(100%, 1100px);
  height: auto;
  aspect-ratio: 16 / 9;
  justify-self: center;
  align-self: center;
}

.principle-tactic-presentation-board .exercise-field-board.horizontal {
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: #d2d2d2;
}

.principle-card-editor-backdrop,
.principle-presentation {
  position: fixed;
  inset: 0;
  z-index: 2400;
  background: #0a1117;
}

.principle-card-editor-backdrop {
  display: grid;
  place-items: center;
  padding: 24px;
}

.principle-card-editor {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1280px, 96vw);
  height: min(860px, 92vh);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.56);
  overflow: hidden;
}

.principle-card-editor header,
.principle-presentation header,
.principle-presentation footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.principle-card-editor header span,
.principle-presentation header span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 1000;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.principle-presentation-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.8ch;
  white-space: nowrap;
  word-break: keep-all;
  flex: 0 0 auto;
}

.principle-presentation-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 118px;
  height: 46px;
  padding: 0 18px;
  white-space: nowrap;
  text-align: center;
  line-height: 1;
  flex: 0 0 auto;
}

.principle-presentation-scope {
  display: inline-flex;
  width: fit-content;
  min-height: 30px;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.principle-presentation-scope.blue {
  background: rgba(73, 185, 231, 0.14);
  color: #49b9e7;
}

.principle-presentation-scope.red {
  background: rgba(239, 128, 107, 0.14);
  color: #ef806b;
}

.principle-presentation-scope.yellow {
  background: rgba(255, 208, 106, 0.16);
  color: #ffd06a;
}

.principle-card-editor header h3 {
  margin: 0;
  font-size: 30px;
}

.principle-card-editor header button {
  width: 48px;
  min-height: 48px;
  padding: 0;
  font-size: 28px;
}

.principle-card-editor-grid {
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  gap: 20px;
  min-height: 0;
  padding: 22px;
}

.principle-card-editor-fields {
  display: grid;
  align-content: start;
  gap: 14px;
}

.principle-card-editor-fields label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 900;
}

.principle-card-editor-fields input,
.principle-card-editor-fields textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(232, 238, 235, 0.18);
  border-radius: 8px;
  background: rgba(16, 25, 34, 0.62);
  color: var(--text);
  font-weight: 900;
}

.principle-card-editor-fields textarea {
  min-height: 110px;
  resize: vertical;
}

.principle-media-upload {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(232, 238, 235, 0.18);
  border-radius: 12px;
  background: rgba(16, 25, 34, 0.56);
}

.principle-media-upload span {
  color: var(--muted);
  font-weight: 1000;
  text-transform: uppercase;
}

.principle-media-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.principle-media-upload label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid rgba(67, 184, 135, 0.5);
  border-radius: 999px;
  background: rgba(67, 184, 135, 0.16);
  color: #a7f3c8;
  cursor: pointer;
}

.principle-media-upload small {
  color: var(--muted);
  font-weight: 800;
}

.principle-media-crop-controls {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(232, 238, 235, 0.14);
  border-radius: 12px;
  background: rgba(232, 238, 235, 0.05);
}

.principle-media-crop-controls strong {
  color: var(--text);
}

.principle-crop-grid,
.principle-trim-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.principle-crop-grid label,
.principle-trim-grid label {
  font-size: 12px;
}

.principle-card-editor-media,
.principle-presentation-media {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 0;
}

.principle-card-editor-media img,
.principle-card-editor-media video,
.principle-presentation-media img,
.principle-presentation-media video {
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  object-fit: contain;
}

.principle-media-frame {
  position: relative;
  min-height: 360px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
}

.principle-media-tools {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(232, 238, 235, 0.14);
  border-radius: 12px;
  background: rgba(5, 8, 12, 0.78);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  max-width: calc(100% - 24px);
}

.principle-media-tools button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 900;
}

.principle-media-tools-trigger {
  width: auto !important;
  min-width: 94px !important;
  padding: 0 12px !important;
}

.principle-media-tool-menu {
  display: inline-flex;
  max-width: 0;
  gap: 6px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: max-width 140ms ease, opacity 120ms ease;
}

.principle-media-tools.open .principle-media-tool-menu {
  max-width: 520px;
  opacity: 1;
  pointer-events: auto;
}

.principle-media-color-divider {
  width: 1px;
  height: 24px;
  background: rgba(232, 238, 235, 0.18);
}

.principle-media-tools .principle-media-color {
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  border-radius: 999px;
  background: var(--principle-tool-color);
  box-shadow: inset 0 0 0 2px rgba(5, 8, 12, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.principle-media-tools .principle-media-color.active {
  box-shadow: inset 0 0 0 3px rgba(5, 8, 12, 0.72), 0 0 0 3px #f0c75e;
}

.principle-media-align {
  font-size: 15px;
  line-height: 1;
}

.principle-media-tool-menu .tool-cursor {
  width: 17px;
  height: 22px;
}

.principle-media-tool-menu .tool-ellipse,
.principle-media-tool-menu .tool-rect {
  width: 18px;
  height: 13px;
}

.principle-media-tool-menu .tool-polygon {
  width: 21px;
  height: 21px;
}

.principle-media-tool-menu .tool-text {
  display: inline-grid;
  place-items: center;
  color: currentColor;
  font-size: 18px;
  font-weight: 1000;
  line-height: 1;
}

.principle-media-visual,
.principle-media-visual img,
.principle-media-visual video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.principle-media-visual img,
.principle-media-visual video {
  border-radius: 14px;
  object-fit: contain;
  -webkit-user-drag: none;
  user-select: none;
}

.principle-media-annotations {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.principle-media-annotation {
  position: absolute;
  border: 3px solid var(--annotation-color, #ffffff);
  background: color-mix(in srgb, var(--annotation-color, #ffffff) 20%, transparent);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
  pointer-events: auto;
  cursor: move;
  touch-action: none;
  container-type: size;
}

.principle-media-annotation.selected {
  outline: 2px solid #f0c75e;
  outline-offset: 0;
}

.principle-annotation-delete-menu {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 12;
  width: 92px;
  min-height: 34px;
  padding: 0 12px;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 0;
  background: #f0c75e;
  color: #4e5560;
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
  pointer-events: auto;
  cursor: pointer;
}

.principle-media-annotation.ellipse {
  border-radius: 999px;
}

.principle-media-annotation.polygon {
  clip-path: polygon(50% 0, 96% 35%, 78% 100%, 22% 100%, 4% 35%);
}

.principle-media-annotation.preview {
  z-index: 5;
  pointer-events: none;
}

.principle-media-annotation.text {
  min-width: 62px;
  min-height: 30px;
  border: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: auto;
}

.principle-media-annotation.text > div {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  width: 100%;
  min-height: 100%;
  min-width: 0;
  height: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--annotation-color, #ffffff);
  font-size: clamp(12px, 48cqh, 120px);
  font-weight: 1000;
  line-height: 1.1;
  outline: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.46);
  text-align: var(--annotation-align, left);
  white-space: pre-wrap;
  overflow-wrap: normal;
  word-break: normal;
  overflow: visible;
  pointer-events: auto;
  -webkit-user-select: none;
  user-select: none;
}

.principle-media-annotation.text[style*="--annotation-align:center"] > div {
  justify-content: center;
}

.principle-media-annotation.text[style*="--annotation-align:right"] > div {
  justify-content: flex-end;
}

.principle-media-annotation.text.editing > div {
  pointer-events: auto;
  -webkit-user-select: text;
  user-select: text;
  cursor: text;
}

.principle-annotation-handles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.principle-annotation-handles span {
  position: absolute;
  z-index: 7;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #f6f8f7;
  box-shadow: 0 0 0 2px rgba(16, 25, 34, 0.8), 0 2px 7px rgba(0, 0, 0, 0.28);
  pointer-events: auto;
  touch-action: none;
}

.principle-annotation-handles .handle-nw { left: 0; top: 0; transform: translate(-50%, -50%); cursor: nwse-resize; }
.principle-annotation-handles .handle-n { left: 50%; top: 0; transform: translate(-50%, -50%); cursor: ns-resize; }
.principle-annotation-handles .handle-ne { right: 0; top: 0; transform: translate(50%, -50%); cursor: nesw-resize; }
.principle-annotation-handles .handle-e { right: 0; top: 50%; transform: translate(50%, -50%); cursor: ew-resize; }
.principle-annotation-handles .handle-se { right: 0; bottom: 0; transform: translate(50%, 50%); cursor: nwse-resize; }
.principle-annotation-handles .handle-s { left: 50%; bottom: 0; transform: translate(-50%, 50%); cursor: ns-resize; }
.principle-annotation-handles .handle-sw { left: 0; bottom: 0; transform: translate(-50%, 50%); cursor: nesw-resize; }
.principle-annotation-handles .handle-w { left: 0; top: 50%; transform: translate(-50%, -50%); cursor: ew-resize; }

.principle-media-annotations.presentation {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.principle-media-annotations.presentation .principle-media-annotation.text {
  pointer-events: none;
}

.principle-media-crop-window {
  position: absolute;
  z-index: 3;
  border: 2px solid rgba(255, 255, 255, 0.96);
  pointer-events: none;
}

.crop-handle {
  position: absolute;
  z-index: 4;
  display: block;
  background: #050607;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95);
  pointer-events: auto;
  touch-action: none;
}

.crop-left,
.crop-right {
  top: 50%;
  width: 10px;
  height: 42px;
  transform: translateY(-50%);
}

.crop-left { left: -5px; }
.crop-right { right: -5px; }

.crop-top,
.crop-bottom {
  left: 50%;
  width: 42px;
  height: 10px;
  transform: translateX(-50%);
}

.crop-top { top: -5px; }
.crop-bottom { bottom: -5px; }

.principle-presentation-media .crop-handle {
  display: none;
}

.principle-video-trim {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 62px;
  z-index: 4;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(5, 6, 7, 0.86);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
  pointer-events: auto;
}

.principle-video-play {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #f5f7f6;
  font-size: 28px;
  line-height: 1;
  pointer-events: auto;
}

.principle-video-trim-track {
  position: relative;
  height: 44px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.08));
  overflow: visible;
  pointer-events: none;
}

.principle-video-trim-window {
  position: absolute;
  inset: 0 var(--trim-end, 0%) 0 var(--trim-start, 0%);
  border: 4px solid #ffd21f;
  border-radius: 5px;
  background: rgba(255, 210, 31, 0.08);
  box-shadow: 0 0 0 1px rgba(16, 25, 34, 0.4);
  pointer-events: auto;
}

.principle-video-trim-handle {
  position: absolute;
  top: 50%;
  width: 13px;
  height: 34px;
  transform: translateY(-50%);
  border-radius: 3px;
  background: #ffd21f;
  cursor: ew-resize;
  pointer-events: auto;
}

.principle-video-trim-handle::before,
.principle-video-trim-handle::after {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: rgba(16, 25, 34, 0.78);
}

.principle-video-trim-handle::before { left: 4px; }
.principle-video-trim-handle::after { right: 4px; }
.principle-video-trim-handle.start { left: -9px; }
.principle-video-trim-handle.end { right: -9px; }

.principle-video-playhead {
  position: absolute;
  top: -7px;
  bottom: -7px;
  left: 0;
  z-index: 3;
  width: 3px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(16, 25, 34, 0.55), 0 0 12px rgba(255, 255, 255, 0.72);
  pointer-events: none;
}

.principle-presentation-media .principle-video-trim-handle {
  display: none;
}

.principle-presentation-media .principle-video-trim {
  bottom: 18px;
}

.principle-presentation-media-frame {
  position: relative;
  width: 100%;
  height: auto;
  max-height: 100%;
  aspect-ratio: var(--presentation-media-aspect, 1.777);
  align-self: center;
  min-height: 0;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 16px;
  background: rgba(5, 8, 12, 0.42);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  overflow: hidden;
}

.principle-presentation-media-clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.principle-presentation-media-scale {
  position: absolute;
  left: var(--presentation-media-left, 0%);
  top: var(--presentation-media-top, 0%);
  width: var(--presentation-media-width, 100%);
  height: var(--presentation-media-height, 100%);
}

.principle-presentation-media-scale img,
.principle-presentation-media-scale video {
  width: 100%;
  height: 100%;
  border-radius: 0;
  background: transparent;
  object-fit: cover;
}

.principle-presentation-media-frame.image .principle-presentation-media-scale img {
  object-fit: contain;
}

.principle-presentation-media-frame .principle-video-trim {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  min-height: 58px;
  border-radius: 12px;
  background: rgba(5, 6, 7, 0.82);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.32);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: auto;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.principle-presentation-media-frame:hover .principle-video-trim,
.principle-presentation-media-frame:focus-within .principle-video-trim {
  opacity: 1;
  transform: translateY(0);
}

.principle-presentation-media-frame .principle-video-trim-handle {
  display: none;
}

.principle-presentation-media-frame .principle-video-trim-track {
  margin-left: var(--trim-start, 0%);
  width: calc(100% - var(--trim-start, 0%) - var(--trim-end, 0%));
  background: rgba(255, 255, 255, 0.18);
  pointer-events: none;
}

.principle-presentation-media-frame .principle-video-trim-window {
  inset: 0;
  border-color: transparent;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.principle-card-media-empty {
  display: grid;
  place-items: center;
  min-height: 360px;
  border: 1px dashed rgba(232, 238, 235, 0.22);
  border-radius: 14px;
  color: var(--muted);
  font-size: 22px;
  font-weight: 900;
}

.principle-card-editor-media.drag-over,
.principle-card-media-empty.drag-over {
  border-color: rgba(67, 184, 135, 0.72);
  background: rgba(67, 184, 135, 0.12);
}

.principle-card-editor-media p,
.principle-presentation-media p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

.principle-presentation {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  color: var(--text);
  overflow: hidden;
}

.principle-presentation::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(rgba(10, 17, 23, 0.46), rgba(10, 17, 23, 0.58)),
    url("/assets/principles/presentation-contour.png") center / cover no-repeat;
  opacity: 0.82;
  filter: grayscale(1) contrast(1.22);
  pointer-events: none;
}

.principle-presentation header,
.principle-presentation main,
.principle-presentation footer {
  position: relative;
  z-index: 1;
}

.principle-presentation main {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(440px, 1.28fr);
  gap: clamp(28px, 4vw, 72px);
  min-height: 0;
  padding: 36px clamp(36px, 5vw, 72px);
}

.principle-presentation-copy {
  display: grid;
  align-content: center;
  gap: 18px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.principle-presentation-media {
  min-width: 0;
  max-width: 100%;
  align-content: center;
}

.principle-presentation-copy h2 {
  margin: 0;
  max-width: 100%;
  font-size: clamp(34px, 3.65vw, 76px);
  line-height: 1;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.principle-presentation-copy p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(20px, 2vw, 30px);
  font-weight: 800;
  line-height: 1.28;
}

.principle-presentation footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.matchday-scenario-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
}

.matchday-scenario-create {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  min-height: 220px;
  padding: 18px;
  border: 1px dashed rgba(232, 255, 241, 0.32);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  text-align: center;
}

.matchday-scenario-create.primary {
  min-height: 320px;
}

.matchday-scenario-plus {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  min-height: 76px;
  padding: 0;
  border: 2px solid rgba(63, 178, 127, 0.74);
  border-radius: 999px;
  background: rgba(63, 178, 127, 0.14);
  color: #8ef0be;
  font-size: 48px;
  line-height: 1;
  font-weight: 900;
}

.matchday-scenario-create > strong {
  color: var(--text);
  font-size: 18px;
}

.matchday-scenario-menu {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 40;
  display: grid;
  gap: 10px;
  width: min(430px, calc(100vw - 48px));
  max-height: min(620px, calc(100vh - 80px));
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(232, 255, 241, 0.22);
  border-radius: var(--radius);
  background: #14222b;
  box-shadow: 0 24px 65px rgba(0, 0, 0, 0.46);
  text-align: left;
  transform: translate(-50%, -50%);
}

.matchday-scenario-menu-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.matchday-scenario-menu-head strong {
  color: var(--text);
  font-size: 18px;
}

.matchday-scenario-menu-head button {
  width: auto;
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 900;
}

.matchday-scenario-actions,
.matchday-scenario-template-list,
.matchday-template-editor {
  display: grid;
  gap: 8px;
}

.matchday-scenario-template-list button {
  display: grid;
  gap: 4px;
  justify-items: start;
  padding: 10px 12px;
  text-align: left;
}

.matchday-scenario-template-list span {
  color: var(--muted);
  font-size: 12px;
}

.matchday-template-editor {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.matchday-template-row {
  display: grid;
  gap: 6px;
}

.matchday-template-row textarea {
  min-height: 70px;
}

.matchday-template-editor-toggle {
  margin-top: 2px;
}

.matchday-board-card {
  position: relative;
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.matchday-board-card.delete-open {
  border-color: rgba(228, 109, 92, 0.74);
}

.matchday-board-delete-confirm {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border-color: rgba(228, 109, 92, 0.78);
  border-radius: 999px;
  background: rgba(228, 109, 92, 0.2);
  color: #ffb1a7;
  font-size: 20px;
  font-weight: 900;
}

.matchday-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.matchday-board-head > div:first-child {
  display: grid;
  gap: 4px;
}

.matchday-board-head strong {
  color: var(--text);
  font-size: 16px;
}

.matchday-board-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.matchday-board-actions button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.matchday-board-card.fullscreen {
  position: fixed;
  inset: 12px;
  z-index: 5000;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 12px;
  background: var(--bg);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.62);
  overflow: auto;
}

.matchday-board-card.fullscreen .exercise-field-board.preview {
  justify-self: center;
  align-self: center;
  width: min(100%, calc((100vh - 120px) * 16 / 9));
  height: auto;
  min-height: 0;
  aspect-ratio: 16 / 9;
}

.board-editor-shell {
  display: block;
  min-width: 0;
}

.board-editor-panel {
  min-width: 0;
}

.board-editor-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.board-editor-title-fields {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(150px, 220px);
  gap: 12px;
  align-items: end;
  min-width: 0;
}

.board-editor-actions {
  align-self: end;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.board-clone-row {
  display: flex;
  gap: 10px;
  align-items: end;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.board-clone-row label {
  min-width: min(360px, 100%);
}

.board-graphic-editor {
  display: grid;
  gap: 8px;
}

.board-graphic-editor .exercise-field-board.editable {
  width: 100%;
  max-width: none;
}

.matchday-inline-editor {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.matchday-bench {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(232, 255, 241, 0.16);
  border-radius: 8px;
  background: rgba(9, 20, 26, 0.42);
}

.matchday-bench-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.matchday-bench-head strong {
  color: var(--text);
  font-size: 13px;
}

.matchday-bench-form {
  display: grid;
  grid-template-columns: 54px minmax(160px, 1fr) auto;
  gap: 6px;
  align-items: center;
  max-width: 430px;
}

.matchday-bench-form input {
  min-height: 30px;
  padding: 6px 8px;
  font-size: 12px;
}

.matchday-bench-form button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.matchday-bench-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 30px;
}

.matchday-bench-player {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 4px 6px 4px 4px;
  border: 1px solid rgba(232, 238, 235, 0.2);
  border-radius: 999px;
  background: rgba(238, 244, 241, 0.08);
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.matchday-bench-player.navy {
  background: rgba(22, 73, 148, 0.32);
  border-color: rgba(83, 142, 225, 0.45);
}

.matchday-bench-player.darkgreen {
  background: rgba(11, 93, 59, 0.34);
  border-color: rgba(91, 184, 138, 0.45);
}

.matchday-bench-player.red {
  background: rgba(243, 41, 34, 0.22);
  border-color: rgba(243, 41, 34, 0.5);
}

.matchday-bench-player.white {
  background: rgba(247, 248, 243, 0.18);
  border-color: rgba(247, 248, 243, 0.52);
}

.matchday-bench-player.yellow {
  background: rgba(245, 241, 11, 0.18);
  border-color: rgba(245, 241, 11, 0.56);
}

.matchday-bench-player.black {
  background: rgba(31, 36, 36, 0.72);
  border-color: rgba(238, 244, 241, 0.18);
}

.matchday-bench-number {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #f6faf7;
  color: #101922;
  font-size: 11px;
  line-height: 1;
}

.matchday-bench-player button {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  min-height: 21px;
  padding: 0;
  border-color: rgba(228, 109, 92, 0.65);
  border-radius: 999px;
  color: #ffb1a7;
  font-size: 14px;
  line-height: 1;
}

.matchday-bench-empty {
  color: var(--muted);
  font-size: 12px;
  align-self: center;
}

.matchday-board-card.fullscreen .matchday-inline-editor {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  align-self: center;
}

.matchday-board-card.fullscreen .exercise-field-board.editable {
  justify-self: center;
  align-self: center;
  width: min(100%, calc((100vh - 150px) * 16 / 9));
  height: auto;
  min-height: 0;
  aspect-ratio: 16 / 9;
}

.matchday-ingame-workspace {
  display: grid;
  gap: 18px;
}

.matchday-ingame-topbar,
.matchday-ingame-section-head,
.matchday-ingame-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.matchday-ingame-topbar {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.matchday-ingame-topbar p {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.matchday-ingame-topbar h2,
.matchday-ingame-section-head h3 {
  margin: 0;
}

.matchday-ingame-lineup,
.matchday-ingame-scenarios {
  min-width: 0;
}

.matchday-ingame-scroll {
  display: grid;
  grid-auto-columns: minmax(620px, 76vw);
  grid-auto-flow: column;
  gap: 14px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-bottom: 8px;
  scroll-snap-type: x proximity;
}

.matchday-ingame-board {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  scroll-snap-align: start;
}

.matchday-ingame-board.formation {
  max-width: none;
}

.matchday-ingame-title {
  min-height: 42px;
  padding: 8px 12px;
  border-color: transparent;
  background: rgba(9, 20, 26, 0.35);
  color: var(--text);
  font-size: 22px;
  font-weight: 900;
}

.matchday-ingame-title:focus {
  border-color: var(--accent);
}

.matchday-ingame-notes,
.matchday-board-notes {
  display: grid;
  gap: 6px;
}

.matchday-ingame-notes span,
.matchday-board-notes span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.matchday-ingame-notes textarea,
.matchday-board-notes textarea {
  min-height: 120px;
  resize: vertical;
}

.matchday-board-card.fullscreen .matchday-board-notes {
  display: none;
}

.matchday-ingame-board.fullscreen {
  position: fixed;
  inset: 10px;
  z-index: 5000;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 12px;
  background: var(--bg);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.62);
  overflow: hidden;
}

.matchday-ingame-board.fullscreen .matchday-ingame-title {
  pointer-events: none;
  border-color: transparent;
  background: transparent;
  font-size: 26px;
}

.matchday-ingame-board.fullscreen .matchday-board-actions {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  min-width: max-content;
}

.matchday-ingame-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.8ch;
  min-height: 32px;
  padding: 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  word-break: keep-all;
  flex: 0 0 auto;
}

.matchday-ingame-board.fullscreen .matchday-board-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 36px;
  padding: 0 12px;
  white-space: nowrap;
  line-height: 1;
  flex: 0 0 auto;
}

.matchday-ingame-board.fullscreen .matchday-board-actions [data-matchday-board-fullscreen] {
  min-width: 104px;
}

.matchday-ingame-board.fullscreen .matchday-inline-editor {
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
}

.matchday-ingame-board.fullscreen .exercise-field-board.editable {
  justify-self: center;
  align-self: center;
  width: min(calc(100vw - 44px), calc((100vh - 148px) * 16 / 9));
  height: auto;
  min-height: 0;
  aspect-ratio: 16 / 9;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.board-graphic-editor .exercise-field-board.horizontal,
.matchday-board-card .exercise-field-board.horizontal {
  aspect-ratio: 16 / 9;
  background-size: contain;
  background-repeat: no-repeat;
  background-color: #d2d2d2;
}

.matchday-board-card .exercise-field-board.editable.horizontal {
  width: 100%;
  min-height: 0;
}

.exercise-field-board.fullscreen.horizontal {
  left: 50%;
  top: 50%;
  right: auto;
  bottom: auto;
  width: min(calc(100vw - 24px), calc((100vh - 24px) * 16 / 9));
  height: auto;
  min-height: 0;
  aspect-ratio: 16 / 9;
  transform: translate(-50%, -50%);
  background-size: contain;
  background-repeat: no-repeat;
}

.board-graphic-editor .exercise-field-board.editable {
  min-height: 0;
}

.board-graphic-editor .exercise-field-board.fullscreen.horizontal {
  left: 50%;
  top: 50%;
  right: auto;
  bottom: auto;
  width: min(calc(100vw - 24px), calc((100vh - 24px) * 16 / 9));
  height: auto;
  aspect-ratio: 16 / 9;
  transform: translate(-50%, -50%);
}

.matchday-board-card .exercise-field-board.preview .graphic-object.player {
  width: clamp(18px, 2.35cqw, 28px);
  height: clamp(18px, 2.35cqw, 28px);
  min-width: clamp(18px, 2.35cqw, 28px);
  min-height: clamp(18px, 2.35cqw, 28px);
  font-size: clamp(9px, 1.15cqw, 15px);
  border-width: clamp(2px, 0.34cqw, 4px);
}

.matchday-board-card .exercise-field-board.preview .graphic-object.ball {
  width: clamp(12px, 1.55cqw, 19px);
  height: clamp(12px, 1.55cqw, 19px);
  min-width: clamp(12px, 1.55cqw, 19px);
  min-height: clamp(12px, 1.55cqw, 19px);
}

.list {
  display: grid;
  gap: 10px;
}

.item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.item strong {
  font-size: 14px;
}

.item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  width: fit-content;
  border-radius: 999px;
  background: rgba(242, 193, 78, 0.15);
  color: #ffdf8a;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 800;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.orga-workspace {
  gap: 14px;
}

.orga-mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.orga-mode-tabs button {
  min-width: 150px;
  padding: 8px 14px;
  font-weight: 850;
}

.orga-table-wrap {
  width: 100%;
  max-height: calc(100vh - 260px);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.orga-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.orga-table th,
.orga-table td {
  min-width: 112px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 8px;
  text-align: left;
  vertical-align: middle;
}

.orga-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #1b2833;
  box-shadow: 0 1px 0 var(--line), 0 8px 18px rgba(9, 20, 26, 0.28);
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.orga-table tr:last-child th,
.orga-table tr:last-child td {
  border-bottom: 0;
}

.orga-table .player-col {
  position: sticky;
  left: 0;
  z-index: 4;
  min-width: 220px;
  background: #1a2630;
  color: var(--text);
  font-weight: 850;
  box-shadow: 1px 0 0 var(--line);
}

.orga-player-summary {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 850;
}

.orga-table tbody .player-col > span {
  display: block;
}

.orga-table tbody .player-col > span + span {
  margin-top: 3px;
}

.orga-player-summary.percent-0 {
  background: rgba(228, 109, 92, 0.26);
  color: #ffb5ad;
}

.orga-player-summary.percent-17 {
  background: rgba(235, 126, 78, 0.24);
  color: #ffc0a5;
}

.orga-player-summary.percent-34 {
  background: rgba(242, 166, 78, 0.24);
  color: #ffd09b;
}

.orga-player-summary.percent-50 {
  background: rgba(242, 193, 78, 0.24);
  color: #ffdf8a;
}

.orga-player-summary.percent-67 {
  background: rgba(172, 199, 83, 0.24);
  color: #d9ed9b;
}

.orga-player-summary.percent-84 {
  background: rgba(101, 190, 111, 0.24);
  color: #abedb5;
}

.orga-player-summary.percent-100 {
  background: rgba(63, 178, 127, 0.3);
  color: #9af0c7;
}

.orga-table thead .player-col {
  z-index: 8;
  background: #1b2833;
}

.orga-match-head {
  display: grid;
  gap: 5px;
  min-width: 134px;
  max-width: 180px;
  text-transform: none;
}

.orga-match-head strong {
  color: var(--text);
  font-size: 13px;
}

.orga-match-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.orga-match-head select,
.orga-status-select,
.orga-cell-input {
  min-height: 34px;
  padding: 7px 8px;
}

.orga-cell-input {
  width: 76px;
}

.orga-cell-input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.orga-cell-input.auto-filled {
  border-color: rgba(63, 178, 127, 0.72);
  background: rgba(63, 178, 127, 0.18);
  color: #9af0c7;
}

.orga-score-inputs {
  display: grid;
  grid-template-columns: repeat(2, 64px);
  gap: 6px;
}

.orga-score-inputs label {
  gap: 4px;
  font-size: 11px;
  text-transform: none;
}

.orga-score-inputs input {
  padding: 7px 8px;
}

.orga-total {
  color: var(--accent-2);
  font-weight: 900;
  text-align: center;
}

.orga-status-select.status-full {
  border-color: rgba(63, 178, 127, 0.7);
}

.orga-status-select.status-present {
  background: rgba(63, 178, 127, 0.24);
  color: #9af0c7;
}

.orga-status-select.status-reduced {
  border-color: rgba(84, 198, 235, 0.75);
}

.orga-status-select.status-absent {
  border-color: rgba(228, 109, 92, 0.65);
  color: #ffb5ad;
  background: rgba(228, 109, 92, 0.24);
}

.orga-training-head {
  gap: 6px;
}

.orga-training-head button {
  min-height: 28px;
  padding: 4px 8px;
  border-color: rgba(228, 109, 92, 0.45);
  color: #ffb5ad;
  font-size: 11px;
}

.orga-training-head button.active {
  background: rgba(228, 109, 92, 0.24);
  color: #ffb5ad;
}

.orga-cancelled-training-col {
  position: relative;
  background: rgba(228, 109, 92, 0.10);
  color: #ffb5ad;
}

.orga-cancelled-training-col::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 50%;
  border-top: 2px solid rgba(228, 109, 92, 0.72);
  pointer-events: none;
}

.orga-cancelled-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  color: #ffb5ad;
  font-size: 12px;
  font-weight: 900;
}

.trainer-picker,
.exercise-coach-picker {
  display: grid;
  gap: 7px;
}

.trainer-picker-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.9fr);
  gap: 10px;
  align-items: end;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: none;
}

.trainer-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 6px;
}

.trainer-add-row input {
  min-height: 38px;
}

.trainer-add-row button {
  min-height: 38px;
  padding: 0;
  font-size: 18px;
  font-weight: 900;
}

.trainer-choice-list,
.coach-choice-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.trainer-choice {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: auto;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}

.trainer-choice span {
  letter-spacing: 0;
  text-transform: none;
}

.trainer-choice.delete-open {
  padding-right: 28px;
  border-color: rgba(228, 109, 92, 0.76);
}

.trainer-delete-confirm {
  position: absolute;
  right: 3px;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  min-height: 21px;
  padding: 0;
  border-color: rgba(228, 109, 92, 0.78);
  border-radius: 999px;
  background: rgba(228, 109, 92, 0.18);
  color: #ffb1a7;
  font-size: 15px;
  font-weight: 900;
  transform: translateY(-50%);
}

.trainer-choice.compact {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 11px;
}

.trainer-choice.active {
  border-color: rgba(63, 178, 127, 0.76);
  background: rgba(63, 178, 127, 0.16);
  color: #eef4f1;
}

.trainer-choice input {
  width: auto;
  margin: 0;
  accent-color: var(--accent);
}

.exercise-coach-picker > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.empty-inline {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.wide {
  grid-column: 1 / -1;
}

.empty {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.checklist {
  display: grid;
  gap: 9px;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.check input {
  width: 18px;
  height: 18px;
}

.training-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.training-panel-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.training-panel-actions button {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.training-summary div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.training-summary strong {
  font-size: 24px;
}

.training-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.training-preview {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #101922;
}

.training-preview.fullscreen {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 54px 18px 18px;
  border: 0;
  border-radius: 0;
  background: rgba(6, 12, 15, 0.96);
}

.training-fullscreen-toggle {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border: 1px solid rgba(232, 238, 235, 0.24);
  border-radius: 8px;
  background: rgba(9, 20, 26, 0.72);
  color: rgba(238, 244, 241, 0.86);
  font-size: 22px;
  font-weight: 900;
}

.training-fullscreen-toggle:hover {
  border-color: rgba(242, 193, 78, 0.78);
  background: rgba(242, 193, 78, 0.18);
  color: #f2c14e;
}

.formation-switch {
  display: flex;
  gap: 8px;
  margin: 14px 0 10px;
}

.formation-switch button {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 900;
}

.training-field {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  background-color: #d0d0d0;
  background-position: center;
  background-size: cover;
  overflow: hidden;
}

.training-preview.fullscreen .training-field {
  width: min(100%, calc((100vh - 72px) * 1.5));
  max-height: calc(100vh - 72px);
  border: 1px solid rgba(232, 238, 235, 0.18);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.44);
}

.formation-slot {
  position: absolute;
  width: clamp(86px, 18%, 116px);
  min-height: 40px;
  max-height: clamp(76px, 20%, 112px);
  transform: translate(-50%, -50%);
  display: grid;
  gap: 3px;
  padding: 5px;
  border: 1px dashed rgba(255, 255, 255, 0.42);
  border-radius: 8px;
  background: rgba(6, 16, 22, 0.18);
  overflow: auto;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.formation-slot.drag-over {
  border-color: rgba(255, 255, 255, 0.9);
  background: rgba(31, 111, 88, 0.32);
}

.formation-slot-label {
  justify-self: start;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(6, 16, 22, 0.72);
  color: rgba(255, 255, 255, 0.82);
  font-size: 9px;
  font-weight: 900;
  line-height: 1.2;
}

.formation-slot-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
}

.training-magnet {
  width: 100%;
  min-height: 0;
  min-width: 0;
  padding: 2px 4px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: #b90d18;
  color: white;
  font-size: var(--name-size, 8.3px);
  font-weight: 900;
  line-height: 1;
  text-align: center;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.22);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.training-magnet.long {
  font-size: var(--name-size, 7.4px);
}

.training-magnet.xlong {
  font-size: var(--name-size, 6.8px);
}

.training-magnet.xxlong {
  font-size: var(--name-size, 6.2px);
}

.training-magnet:hover {
  border-color: rgba(255, 255, 255, 0.9);
  background: #d11624;
}

.training-magnet.reduced {
  background: #1d7ed0;
  box-shadow: 0 8px 16px rgba(29, 126, 208, 0.26);
}

.training-magnet.reduced:hover {
  background: #2f9bf0;
}

.training-magnet:active,
.training-magnet.drag-source {
  cursor: grabbing;
}

.training-magnet.drag-source {
  opacity: 0.52;
}

.training-magnet-ghost {
  position: fixed;
  z-index: 1000;
  width: 104px;
  pointer-events: none;
  transform: translate(-50%, -50%);
  border-color: rgba(255, 255, 255, 0.95);
  background: #d11624;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.38);
}

.attendance-list {
  display: grid;
  gap: 8px;
  max-height: 520px;
  overflow: auto;
  padding-right: 3px;
}

.player-check {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.attendance-group {
  display: grid;
  gap: 8px;
}

.attendance-group + .attendance-group {
  margin-top: 8px;
}

.attendance-group h4 {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.player-check.guest-player {
  background: rgba(63, 178, 127, 0.06);
}

.player-check.reduced-player {
  border-color: rgba(67, 166, 244, 0.58);
  background: rgba(67, 166, 244, 0.1);
}

.player-check.temp-guest-player {
  grid-template-columns: 22px minmax(0, 1fr) 28px;
  background: rgba(242, 193, 78, 0.07);
}

.temp-guest-remove {
  width: 26px;
  min-height: 26px;
  padding: 0;
  border-color: rgba(185, 75, 65, 0.42);
  color: #d36a5f;
  line-height: 1;
}

.temp-guest-add-row {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(140px, 0.8fr) auto;
  gap: 8px;
  padding-top: 4px;
}

.temp-guest-add-row input,
.temp-guest-add-row select {
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.temp-guest-add-row input {
  font-size: 13px;
}

.temp-guest-add-row input::placeholder {
  font-size: 12px;
}

.presence-toggle {
  display: grid;
  place-items: center;
}

.presence-toggle input {
  width: 16px;
  height: 16px;
}

.attendance-player-meta {
  display: grid;
  gap: 2px;
}

.attendance-name {
  width: fit-content;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-weight: 800;
  text-align: left;
}

.attendance-name:hover {
  color: var(--accent);
  background: transparent;
}

.position-tag {
  width: fit-content;
  min-height: 0;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.position-tag:hover {
  color: var(--accent);
  border-color: rgba(63, 178, 127, 0.58);
  background: rgba(63, 178, 127, 0.12);
}

.position-editor-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
}

.training-load-toggle {
  width: auto;
  min-height: 22px;
  padding: 2px 8px;
  border-color: rgba(232, 255, 241, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.training-load-toggle.reduced {
  border-color: rgba(67, 166, 244, 0.7);
  background: rgba(67, 166, 244, 0.18);
  color: #8fd0ff;
}

.attendance-position-select {
  display: none;
  width: 136px;
  padding: 6px 8px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
}

[data-position-editor].open .attendance-position-select {
  display: block;
}

[data-position-editor].open .position-tag {
  color: var(--accent);
  border-color: rgba(63, 178, 127, 0.58);
  background: rgba(63, 178, 127, 0.12);
}

.player-check > button,
.exercise-item > button[data-delete-exercise] {
  min-height: 32px;
  width: 32px;
  padding: 0;
}

.add-player-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.15fr) minmax(180px, 0.8fr) auto;
  gap: 8px;
}

.add-player-row input[data-new-player-name] {
  min-width: 190px;
}

.exercise-list {
  display: grid;
  gap: 0;
}

.exercise-composer {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(63, 178, 127, 0.38);
  border-radius: var(--radius);
  background: rgba(63, 178, 127, 0.07);
}

.composer-head,
.composer-actions,
.graphic-mode-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.composer-head {
  justify-content: space-between;
}

.composer-head button {
  min-height: 30px;
  width: 30px;
  padding: 0;
}

.graphic-mode-tabs button,
.composer-actions button {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 900;
}

.graphic-archive-picker,
.graphic-editor {
  display: grid;
  gap: 10px;
}

.exercise-formation-editor {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
}

.exercise-formation-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.exercise-formation-head h3 {
  margin: 0;
}

.exercise-formation-head span,
.formation-saved-strip span,
.formation-pool-empty {
  color: var(--muted);
  font-size: 12px;
}

.exercise-formation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.formation-player-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 42px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 25, 34, 0.26);
}

.formation-pool-player {
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  font-weight: 900;
  touch-action: none;
}

.formation-pool-player.color-red {
  border-color: rgba(243, 41, 34, 0.58);
  background: rgba(243, 41, 34, 0.16);
  color: #ff8e87;
}

.formation-pool-player.color-blue {
  border-color: rgba(55, 151, 235, 0.75);
  background: rgba(55, 151, 235, 0.2);
  color: #78bfff;
}

.formation-pool-player.color-darkgreen {
  border-color: rgba(11, 93, 59, 0.82);
  background: rgba(11, 93, 59, 0.26);
  color: #8ee0b8;
}

.formation-pool-player.color-yellow {
  border-color: rgba(245, 241, 11, 0.72);
  background: rgba(245, 241, 11, 0.18);
  color: #f5f10b;
}

.formation-drag-ghost {
  position: fixed;
  z-index: 70000;
  pointer-events: none;
  transform: translate(-50%, -50%);
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  font-weight: 900;
  opacity: 0.94;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

.exercise-formation-board {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 280px;
  overflow: hidden;
  border: 1px solid rgba(232, 255, 241, 0.34);
  border-radius: var(--radius);
  background-color: #cfcfcf;
  background-position: center;
  background-size: cover;
}

.formation-board-player {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -50%);
  padding: 5px 9px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.22);
  cursor: grab;
  touch-action: none;
}

.formation-board-player.color-red {
  background: #f32922;
}

.formation-board-player.color-blue {
  background: #1d7ed0;
}

.formation-board-player.color-darkgreen {
  background: #0b5d3b;
  color: #fff;
}

.formation-board-player.color-yellow {
  background: #f5f10b;
  color: #101922;
}

.formation-player-delete {
  position: absolute;
  right: -8px;
  top: -10px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  min-height: 21px;
  padding: 0;
  border-color: rgba(228, 109, 92, 0.8);
  border-radius: 999px;
  background: rgba(20, 24, 28, 0.92);
  color: #ffb1a7;
  font-size: 15px;
  font-weight: 900;
}

.formation-saved-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.formation-saved-strip span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.formation-saved-strip span.saved {
  border-color: rgba(63, 178, 127, 0.58);
  color: #8fe0ba;
}

.formation-saved-delete {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  border-color: rgba(228, 109, 92, 0.7);
  border-radius: 999px;
  background: rgba(20, 24, 28, 0.88);
  color: #ffb1a7;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.graphic-result-list {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}

.graphic-result-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.graphic-result-card.delete-open {
  border-color: rgba(228, 109, 92, 0.74);
}

.graphic-result-card.active {
  border-color: rgba(63, 178, 127, 0.72);
  background: rgba(63, 178, 127, 0.16);
}

.graphic-result-select {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 0;
  padding: 9px 10px;
  border: 0;
  background: transparent;
  text-align: left;
}

.graphic-result-delete-confirm {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border-color: rgba(228, 109, 92, 0.78);
  border-radius: 999px;
  background: rgba(228, 109, 92, 0.18);
  color: #ffb1a7;
  font-size: 18px;
  font-weight: 900;
}

.graphic-result-copy {
  display: grid;
  gap: 3px;
}

.graphic-result-list span,
.exercise-graphic-summary small {
  color: var(--muted);
}

.graphic-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.34fr);
  gap: 12px;
  align-items: start;
}

.graphic-board-wrap {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.board-graphic-editor {
  display: grid;
  gap: 8px;
}

.exercise-field-board {
  position: relative;
  container-type: inline-size;
  --graphic-ball-size: clamp(13px, 1.85cqw, 26px);
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border: 1px solid rgba(232, 255, 241, 0.34);
  border-radius: var(--radius);
  background-color: #d2d2d2;
  background-position: center;
  background-size: cover;
  touch-action: none;
}

.exercise-field-board.editable {
  min-height: 420px;
}

.exercise-field-board.fullscreen {
  position: fixed;
  inset: 12px;
  z-index: 3000;
  width: auto;
  height: auto;
  min-height: 0;
  aspect-ratio: auto;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.62);
}

.capture-document,
.capture-document body {
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  background: #d2d2d2;
}

.capture-document .app-shell {
  min-height: 100vh;
  background: #d2d2d2;
}

.capture-shell {
  display: grid;
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #d2d2d2;
}

.capture-shell .exercise-field-board.preview {
  width: 100vw;
  height: 100vh;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background-color: #d2d2d2;
  box-shadow: none;
}

.graphic-fullscreen-toolbar {
  position: absolute;
  left: 8px;
  top: 10px;
  z-index: 15;
  max-width: calc(100% - 66px);
  border: 1px solid rgba(16, 25, 34, 0.28);
  border-radius: 8px;
  background: rgba(12, 24, 30, 0.7);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.graphic-board-toolbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 34px;
  padding: 5px;
  border: 1px solid rgba(232, 238, 235, 0.14);
  border-radius: 8px;
  background: rgba(9, 20, 26, 0.72);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.2);
}

.graphic-toolbar-png {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 0 10px;
  border-color: rgba(242, 193, 78, 0.6);
  background: rgba(242, 193, 78, 0.16);
  color: #f2c14e;
  font-size: 11px;
  font-weight: 900;
}

.graphic-toolbar-png:hover {
  border-color: rgba(242, 193, 78, 0.9);
  background: rgba(242, 193, 78, 0.24);
}

.graphic-toolbar-right {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}

.graphic-fullscreen-toolbar .graphic-board-toolbar {
  flex-wrap: nowrap;
  max-width: 100%;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.graphic-fullscreen-toolbar .graphic-player-stacks,
.graphic-fullscreen-toolbar .graphic-toolbar-right {
  flex: 0 0 auto;
  flex-wrap: nowrap;
}

.graphic-fullscreen-toolbar .graphic-tool-panel button {
  box-sizing: border-box;
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
  padding: 0;
}

.graphic-fullscreen-toolbar .graphic-tool-rail button:not(:first-child) {
  width: 0;
  min-width: 0;
  padding: 0;
}

.graphic-fullscreen-toolbar .graphic-tool-rail.open button:not(:first-child) {
  width: 30px;
  min-width: 30px;
}

.graphic-fullscreen-toolbar .graphic-line-option-menu button {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
}

.graphic-tool-panel {
  position: relative;
  display: flex;
  gap: 4px;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.graphic-tool-panel button {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  min-height: 30px;
  border: 1px solid rgba(232, 238, 235, 0.16);
  border-radius: 5px;
  background: rgba(238, 244, 241, 0.08);
  color: rgba(238, 244, 241, 0.78);
  padding: 0;
  line-height: 1;
}

.graphic-tool-panel button:hover,
.graphic-tool-panel button.active {
  border-color: rgba(242, 193, 78, 0.78);
  background: rgba(242, 193, 78, 0.18);
  color: #f2c14e;
}

.graphic-tool-rail {
  z-index: 22;
  flex-direction: row-reverse;
  gap: 0;
  overflow: visible;
  min-width: 30px;
}

.graphic-tool-rail::before {
  content: "";
  position: absolute;
  inset: -8px;
  right: -10px;
  z-index: -1;
}

.graphic-tool-rail button:not(:first-child) {
  width: 0;
  min-width: 0;
  border-width: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateX(4px);
  transition: width 140ms ease, opacity 120ms ease, transform 140ms ease, border-width 140ms ease;
}

.graphic-tool-rail.open {
  gap: 4px;
  min-width: 268px;
}

.graphic-tool-rail.open button:not(:first-child) {
  width: 30px;
  min-width: 30px;
  border-width: 1px;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.graphic-material-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 2px);
  z-index: 80;
  display: grid;
  grid-template-columns: repeat(5, 72px);
  gap: 0;
  border: 1px solid rgba(190, 185, 92, 0.9);
  background: rgba(13, 15, 14, 0.96);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.34);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.graphic-material-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -8px;
  height: 8px;
}

.graphic-toolbar-right:has([data-graphic-tool="cone"]:hover) .graphic-material-menu,
.graphic-toolbar-right:has([data-graphic-tool="cone"]:focus-visible) .graphic-material-menu,
.graphic-toolbar-right:has(.graphic-material-menu:hover) .graphic-material-menu,
.graphic-toolbar-right:has(.graphic-material-menu:focus-within) .graphic-material-menu,
.graphic-material-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.graphic-material-menu button {
  display: grid;
  place-items: center;
  width: 72px;
  height: 64px;
  min-height: 64px;
  border: 0;
  border-right: 1px solid rgba(190, 185, 92, 0.78);
  border-bottom: 1px solid rgba(190, 185, 92, 0.78);
  border-radius: 0;
  background: transparent;
  color: #fff;
}

.graphic-material-menu button:nth-child(5n) {
  border-right: 0;
}

.graphic-material-menu button:nth-last-child(-n + 5) {
  border-bottom: 0;
}

.graphic-material-menu button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.graphic-material-menu button.active {
  background: rgba(242, 193, 78, 0.2);
  box-shadow: inset 0 0 0 2px rgba(242, 193, 78, 0.72);
}

.graphic-formation-tool {
  z-index: 21;
  flex: 0 0 auto;
}

.graphic-line-options {
  align-items: center;
}

.graphic-line-option {
  position: relative;
  display: grid;
}

.graphic-line-option-menu {
  position: absolute;
  left: 50%;
  top: calc(100% + 5px);
  z-index: 40;
  display: grid;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(232, 238, 235, 0.16);
  border-radius: 6px;
  background: rgba(9, 20, 26, 0.9);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -4px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.graphic-line-option:hover .graphic-line-option-menu,
.graphic-line-option:focus-within .graphic-line-option-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.graphic-line-option-menu button {
  width: 28px;
  height: 28px;
  min-height: 28px;
}

.graphic-board-actions {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 14;
  gap: 7px;
}

.graphic-board-actions button {
  width: 38px;
  height: 38px;
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #b94b41;
  box-shadow: none;
}

.graphic-board-actions button:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #a84239;
}

.graphic-board-actions button::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  transform: none;
  width: max-content;
  max-width: none;
  padding: 4px 7px;
  border-radius: 4px;
  background: rgba(8, 16, 20, 0.62);
  color: rgba(238, 244, 241, 0.72);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.graphic-board-actions button:hover::after {
  opacity: 1;
}

.tool-cursor {
  width: 20px;
  height: 24px;
  background: currentColor;
  -webkit-mask: url("/assets/keynote/Data/cursor-tool-mask.png") center / contain no-repeat;
  mask: url("/assets/keynote/Data/cursor-tool-mask.png") center / contain no-repeat;
  transform: none;
}

.tool-marquee {
  position: relative;
  width: 22px;
  height: 20px;
}

.tool-marquee::before {
  content: "";
  position: absolute;
  inset: 4px 2px 2px 5px;
  border: 2px dashed currentColor;
  border-radius: 2px;
}

.tool-marquee::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 11px;
  height: 14px;
  background: currentColor;
  -webkit-mask: url("/assets/keynote/Data/cursor-tool-mask.png") center / contain no-repeat;
  mask: url("/assets/keynote/Data/cursor-tool-mask.png") center / contain no-repeat;
}

.tool-cone {
  width: 22px;
  height: 16px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 37%, #101922 0 12%, transparent 13%),
    #fff;
  box-shadow: inset 0 -2px 0 rgba(16, 25, 34, 0.16);
}

.tool-formation {
  position: relative;
  width: 22px;
  height: 22px;
}

.tool-formation::before,
.tool-formation::after {
  content: "";
  position: absolute;
  inset: 2px;
  background:
    radial-gradient(circle at 50% 9%, currentColor 0 2px, transparent 2.4px),
    radial-gradient(circle at 24% 34%, currentColor 0 2px, transparent 2.4px),
    radial-gradient(circle at 76% 34%, currentColor 0 2px, transparent 2.4px),
    radial-gradient(circle at 35% 64%, currentColor 0 2px, transparent 2.4px),
    radial-gradient(circle at 65% 64%, currentColor 0 2px, transparent 2.4px),
    radial-gradient(circle at 50% 91%, currentColor 0 2px, transparent 2.4px);
}

.tool-formation::after {
  inset: 0;
  border: 1px solid currentColor;
  border-radius: 4px;
  opacity: 0.5;
}

.tool-line {
  position: relative;
  width: 22px;
  height: 3px;
  background: currentColor;
}

.tool-line.diagonal {
  transform: rotate(-45deg);
}

.tool-line.dashed {
  background: repeating-linear-gradient(90deg, currentColor 0 6px, transparent 6px 14px);
}

.tool-line.arrow::after,
.tool-undo::before {
  content: "";
  position: absolute;
  top: 50%;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  transform: translateY(-50%);
}

.tool-line.arrow.end::after {
  right: -1px;
  border-left: 11px solid currentColor;
}

.tool-line.arrow.start::after {
  left: -1px;
  border-right: 11px solid currentColor;
}

.tool-line.bar::before {
  content: "";
  position: absolute;
  top: -9px;
  width: 3px;
  height: 21px;
  background: currentColor;
}

.tool-line.bar.start::before {
  left: 0;
}

.tool-line.bar.end::before {
  right: 0;
}

.tool-ellipse,
.tool-rect {
  width: 21px;
  height: 15px;
  border: 2.5px solid currentColor;
}

.tool-ellipse {
  border-radius: 999px;
}

.tool-rect {
  border-radius: 0;
}

.tool-polygon {
  width: 22px;
  height: 22px;
  fill: color-mix(in srgb, currentColor 18%, transparent);
  stroke: currentColor;
  stroke-width: 3;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.tool-text {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  font-weight: 800;
}

.graphic-color-swatch::before,
.graphic-draw-color-menu button::before {
  content: "";
  width: 22px;
  height: 22px;
  border: 2px solid rgba(16, 25, 34, 0.2);
  border-radius: 999px;
  background: var(--tool-color, #d7dcca);
}

.graphic-draw-color-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 7px);
  z-index: 90;
  display: flex;
  gap: 6px;
  padding: 6px;
  background: rgba(238, 244, 241, 0.92);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.graphic-draw-color-menu button {
  width: 28px;
  height: 28px;
  min-height: 28px;
  background: transparent;
}

.graphic-draw-color-menu button.active {
  outline: 2px solid #101922;
  outline-offset: 1px;
}

.tool-undo {
  position: relative;
  width: 30px;
  height: 24px;
  background: currentColor;
  border: 0;
  clip-path: polygon(0 50%, 38% 7%, 38% 30%, 100% 30%, 100% 70%, 38% 70%, 38% 93%);
  transform: none;
}

.tool-undo::before {
  display: none;
}

.tool-undo::after {
  display: none;
}

.tool-clear-lines {
  position: relative;
  width: 29px;
  height: 29px;
  border: 4px solid currentColor;
  border-radius: 999px;
}

.tool-clear-board::before,
.tool-clear-board::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 33px;
  height: 4px;
  background: currentColor;
  border-radius: 999px;
  transform: translate(-50%, -50%) rotate(-45deg);
}

.tool-clear-lines::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 24px;
  height: 7px;
  border-radius: 2px 1px 1px 2px;
  background: linear-gradient(90deg, #4f5a55 0 72%, #d7c071 72% 86%, #2f3835 86% 100%);
  clip-path: polygon(0 0, 84% 0, 100% 50%, 84% 100%, 0 100%);
  transform: translate(-50%, -50%) rotate(45deg);
}

.tool-clear-lines::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(-45deg);
}

.tool-clear-board {
  position: relative;
  width: 29px;
  height: 29px;
  border: 4px solid currentColor;
  border-radius: 999px;
}

.exercise-field-board.preview {
  min-height: 0;
  --graphic-ball-size: clamp(3px, 1.85cqw, 12px);
}

.graphic-field-picker {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, 42px);
  gap: 7px;
  padding: 7px;
  border: 1px solid rgba(16, 25, 34, 0.28);
  border-radius: var(--radius);
  background: rgba(238, 244, 241, 0.72);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.graphic-formation-panel {
  position: absolute;
  right: 10px;
  top: 54px;
  z-index: 60;
  width: min(430px, calc(100% - 20px));
  padding: 10px;
  border: 1px solid rgba(232, 238, 235, 0.18);
  border-radius: 8px;
  background: rgba(9, 20, 26, 0.92);
  color: #eef4f1;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.graphic-formation-close {
  position: absolute;
  right: 7px;
  top: 6px;
  width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(238, 244, 241, 0.8);
  font-size: 22px;
  line-height: 1;
}

.graphic-formation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding-right: 24px;
}

.graphic-formation-side {
  display: grid;
  gap: 7px;
}

.graphic-formation-side strong {
  font-size: 12px;
}

.graphic-formation-side label,
.graphic-formation-fit {
  display: grid;
  gap: 4px;
  color: rgba(238, 244, 241, 0.72);
  font-size: 11px;
  font-weight: 700;
}

.graphic-formation-side select {
  min-width: 0;
  height: 30px;
  border: 1px solid rgba(232, 238, 235, 0.2);
  border-radius: 5px;
  background: rgba(238, 244, 241, 0.08);
  color: #fff;
}

.graphic-formation-fit {
  grid-template-columns: auto 1fr;
  align-items: center;
  margin-top: 9px;
}

.graphic-formation-create {
  width: 100%;
  min-height: 32px;
  margin-top: 9px;
  border: 0;
  border-radius: 5px;
  background: rgba(242, 193, 78, 0.9);
  color: #101922;
  font-weight: 900;
}

.exercise-field-board.fullscreen .graphic-formation-panel {
  top: 62px;
  right: 14px;
}

.graphic-field-picker button {
  width: 42px;
  min-height: 30px;
  height: 30px;
  padding: 0;
  overflow: hidden;
  border: 2px solid rgba(16, 25, 34, 0.32);
  border-radius: 5px;
  background: #d0d0d0;
}

.graphic-field-picker button.active {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 2px rgba(16, 25, 34, 0.8);
}

.graphic-field-picker span {
  display: block;
  width: 100%;
  height: 100%;
  background-position: center;
  background-size: cover;
}

.graphic-fullscreen-toggle {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 8;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  min-height: 38px;
  border: 1px solid rgba(16, 25, 34, 0.32);
  border-radius: 6px;
  background: rgba(238, 244, 241, 0.82);
  color: #101922;
  padding: 0;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.graphic-fullscreen-toggle:hover {
  border-color: rgba(16, 25, 34, 0.55);
  background: #fff;
}

.graphic-preview {
  display: block;
  width: 100%;
  min-width: 96px;
}

.graphic-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 1;
}

.exercise-field-board.arrow-draw-mode {
  cursor: grab;
}

.exercise-field-board.arrow-draw-mode:active {
  cursor: grabbing;
}

.exercise-field-board.marquee-select-mode {
  cursor: crosshair;
}

.exercise-field-board.shape-draw-mode {
  cursor: crosshair;
}

.exercise-field-board.text-place-mode {
  cursor: text;
}

.exercise-field-board.material-place-mode {
  cursor: copy;
}

.graphic-lines marker path {
  fill: context-stroke;
  stroke: context-stroke;
}

.graphic-line {
  stroke: #101922;
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

.graphic-line.arrow {
  stroke-width: 2.5;
}

.graphic-line.selected {
  filter: drop-shadow(0 0 1px rgba(16, 25, 34, 0.28));
}

.graphic-arrow-head-shape {
  pointer-events: visiblePainted;
  cursor: grab;
}

.graphic-arrow-head-shape:active {
  cursor: grabbing;
}

.graphic-line-catcher {
  fill: none;
  stroke: rgba(255, 255, 255, 0);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: stroke;
  cursor: grab;
  vector-effect: non-scaling-stroke;
}

.graphic-line-catcher:active {
  cursor: grabbing;
}

.graphic-free-polygon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 2;
}

.graphic-free-polygon-fill {
  fill: color-mix(in srgb, var(--shape-color, #d7dcca) 24%, transparent);
  stroke: var(--shape-color, #d7dcca);
  stroke-width: 2.5;
  stroke-linejoin: round;
  pointer-events: visiblePainted;
  cursor: grab;
  vector-effect: non-scaling-stroke;
}

.graphic-free-polygon-line {
  fill: none;
  stroke: var(--shape-color, #d7dcca);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: stroke;
  cursor: grab;
  vector-effect: non-scaling-stroke;
}

.graphic-free-polygon-seed {
  fill: rgba(245, 248, 244, 0.94);
  stroke: rgba(16, 25, 34, 0.28);
  stroke-width: 0.2;
  pointer-events: visiblePainted;
  cursor: grab;
  vector-effect: non-scaling-stroke;
}

.graphic-free-polygon.selected .graphic-free-polygon-fill,
.graphic-free-polygon.selected .graphic-free-polygon-line,
.graphic-free-polygon.drawing .graphic-free-polygon-line {
  filter: drop-shadow(0 0 1px rgba(16, 25, 34, 0.28));
}

.graphic-object,
.graphic-handle,
.graphic-line-hit,
.graphic-polygon-point {
  position: absolute;
  transform: translate(-50%, -50%);
  user-select: none;
  touch-action: none;
}

.graphic-object {
  z-index: 3;
  display: grid;
  place-items: center;
  min-width: 28px;
  min-height: 28px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
  cursor: grab;
}

.graphic-object.player {
  z-index: 8;
  width: clamp(var(--player-size, 20px), var(--player-size-fluid, 3.25cqw), 46px);
  height: clamp(var(--player-size, 20px), var(--player-size-fluid, 3.25cqw), 46px);
  min-width: clamp(var(--player-size, 20px), var(--player-size-fluid, 3.25cqw), 46px);
  min-height: clamp(var(--player-size, 20px), var(--player-size-fluid, 3.25cqw), 46px);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(16, 25, 34, 0.36);
  color: #fff;
  font-size: clamp(var(--player-font-size, 11px), var(--player-font-size-fluid, 1.75cqw), 25px);
  padding: 0;
  box-shadow: 0 6px 13px rgba(0, 0, 0, 0.22);
}

.graphic-player-name {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 3px);
  transform: translateX(-50%);
  color: #050505;
  font-size: clamp(10px, 1.65cqw, 18px);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
  pointer-events: none;
}

.graphic-player-number {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  text-align: center;
  line-height: 1;
  transform: translateY(0);
}

.graphic-object.player.own {
  background: #b90d18;
}

.graphic-object.player.opp {
  background: #1f6f58;
}

.graphic-object.ball {
  position: absolute;
  z-index: 8;
  width: var(--graphic-ball-size);
  height: var(--graphic-ball-size);
  min-width: var(--graphic-ball-size);
  min-height: var(--graphic-ball-size);
  border: 0;
  background: transparent url("/assets/keynote/Data/ball-tactical-sport.png") center / contain no-repeat;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.graphic-object.cone {
  width: 0;
  height: 0;
  min-width: 0;
  min-height: 0;
  border-right: 12px solid transparent;
  border-bottom: 24px solid #ff9f1c;
  border-left: 12px solid transparent;
  border-top: 0;
  border-radius: 2px;
  background: transparent;
  box-shadow: 0 8px 13px rgba(0, 0, 0, 0.22);
}

.graphic-object.material {
  z-index: 5;
  min-width: 18px;
  min-height: 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--material-color, #fff);
}

.graphic-object.material > .material-icon {
  display: none;
}

.graphic-object.material.goal-box.large {
  width: 89px;
  height: 54px;
  background:
    var(--material-image) center / contain no-repeat;
  filter: drop-shadow(0 5px 7px rgba(0, 0, 0, 0.28));
}

.graphic-object.material.goal-box.mini {
  width: 51px;
  height: 32px;
  background:
    var(--material-image) center / contain no-repeat;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.25));
}

.graphic-object.material.goal-box.large::before,
.graphic-object.material.goal-box.mini::before {
  display: none;
}

.graphic-object.material.goal-box.large::after,
.graphic-object.material.goal-box.mini::after {
  display: none;
}

.graphic-object.material.flat-cone {
  width: 14px;
  height: 9px;
  min-width: 14px;
  min-height: 9px;
  border: 1.5px solid rgba(16, 25, 34, 0.72);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 37%, #050505 0 11%, transparent 12%),
    var(--material-color, #fff);
  box-shadow:
    inset 0 -2px 0 rgba(16, 25, 34, 0.16),
    0 3px 7px rgba(0, 0, 0, 0.25);
}

.graphic-object.material.pylon {
  width: 14px;
  height: 18px;
  min-width: 14px;
  min-height: 18px;
}

.graphic-object.material.pylon::before {
  content: "";
  display: block;
  position: absolute;
  left: 31%;
  top: 4%;
  width: 38%;
  height: 78%;
  background: var(--material-color, #fff);
  clip-path: polygon(35% 0, 65% 0, 100% 100%, 0 100%);
  filter: drop-shadow(0 0 1.5px #101922);
}

.graphic-object.material.pylon::after {
  content: "";
  display: block;
  position: absolute;
  left: 4%;
  bottom: 0;
  width: 92%;
  height: 26%;
  background: var(--material-color, #fff);
  clip-path: polygon(50% 0, 100% 55%, 50% 100%, 0 55%);
  filter: drop-shadow(0 0 1.5px #101922);
}

.graphic-object.material.pylon > .material-icon {
  display: none;
}

.graphic-object.material.dummy {
  width: 18px;
  height: 41px;
  min-width: 18px;
  min-height: 41px;
}

.graphic-object.material.dummy::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/assets/keynote/Data/material-dummy.png") center / contain no-repeat;
  filter:
    brightness(1.2)
    contrast(1.28)
    drop-shadow(0 0 1.3px #101922)
    drop-shadow(0 4px 5px rgba(0, 0, 0, 0.25));
}

.graphic-object.material.dummy::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--material-color, #fff);
  opacity: 0.78;
  mix-blend-mode: multiply;
  -webkit-mask: url("/assets/keynote/Data/material-dummy.png") center / contain no-repeat;
  mask: url("/assets/keynote/Data/material-dummy.png") center / contain no-repeat;
  pointer-events: none;
}

.material-icon {
  position: relative;
  display: block;
  width: 46px;
  height: 34px;
  color: var(--material-color, #fff);
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.34));
}

.material-icon.goal-box,
.material-icon.goal-triangle {
  width: 52px;
  height: 34px;
  transform: rotate(35deg) skewX(-14deg);
}

.material-icon.goal-box.large {
  width: calc(76px * var(--material-scale, 1));
  height: calc(46px * var(--material-scale, 1));
  background: var(--material-image) center / contain no-repeat;
  transform: none;
  filter: drop-shadow(0 5px 7px rgba(0, 0, 0, 0.28));
}

.material-icon.goal-box.mini {
  width: calc(46px * var(--material-scale, 1));
  height: calc(28px * var(--material-scale, 1));
  background: var(--material-image) center / contain no-repeat;
  transform: none;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.25));
}

.graphic-material-menu .material-icon.goal-box.large {
  width: 66px;
  height: 40px;
}

.graphic-material-menu .material-icon.goal-box.mini {
  width: 48px;
  height: 29px;
}

.material-icon.goal-box.large::before,
.material-icon.goal-box.large::after,
.material-icon.goal-box.mini::before,
.material-icon.goal-box.mini::after {
  display: none;
}

.graphic-object.material .material-icon.goal-box.large,
.graphic-object.material .material-icon.goal-box.mini {
  background:
    var(--material-image) center / contain no-repeat,
    linear-gradient(90deg, transparent 0 10%, rgba(255, 255, 255, 0.18) 10% 90%, transparent 90% 100%);
}

.graphic-object.material .material-icon.goal-box.large::before,
.graphic-object.material .material-icon.goal-box.mini::before {
  content: "";
  position: absolute;
  display: block;
  left: 8%;
  right: 8%;
  top: 18%;
  bottom: 22%;
  border: calc(3px * var(--material-scale, 1)) solid rgba(255, 255, 255, 0.96);
  border-radius: calc(3px * var(--material-scale, 1));
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.26) 0 1px, transparent 1px calc(8px * var(--material-scale, 1))),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.22) 0 1px, transparent 1px calc(7px * var(--material-scale, 1))),
    rgba(120, 120, 120, 0.24);
}

.graphic-object.material .material-icon.goal-box.large::after,
.graphic-object.material .material-icon.goal-box.mini::after {
  content: "";
  position: absolute;
  display: block;
  left: 2%;
  right: 2%;
  bottom: 13%;
  height: calc(5px * var(--material-scale, 1));
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    calc(4px * var(--material-scale, 1)) calc(-22px * var(--material-scale, 1)) 0 calc(-1px * var(--material-scale, 1)) rgba(255, 255, 255, 0.92),
    calc(-4px * var(--material-scale, 1)) calc(-22px * var(--material-scale, 1)) 0 calc(-1px * var(--material-scale, 1)) rgba(255, 255, 255, 0.92);
}

.material-icon.goal-triangle.mini {
  width: 42px;
  height: 27px;
}

.material-icon.goal-box::before,
.material-icon.goal-triangle::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 7px;
  width: 34px;
  height: 15px;
  border: 2px solid #fff;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.12)),
    rgba(150, 150, 150, 0.58);
}

.material-icon.goal-box::after,
.material-icon.goal-triangle::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 5px;
  width: 42px;
  height: 24px;
  border-left: 3px solid #fff;
  border-right: 3px solid #fff;
  transform: skewY(-18deg);
}

.material-icon.goal-box.mini::before,
.material-icon.goal-triangle.mini::before {
  left: 8px;
  top: 8px;
  width: 26px;
  height: 11px;
}

.material-icon.goal-box.mini::after,
.material-icon.goal-triangle.mini::after {
  left: 5px;
  top: 6px;
  width: 32px;
  height: 19px;
}

.material-icon.goal-triangle::before {
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.material-icon.goal-triangle::after {
  border-right: 0;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.material-icon.flat-cone {
  width: calc(34px * var(--material-scale, 1));
  height: calc(22px * var(--material-scale, 1));
  border: calc(1.5px * var(--material-scale, 1)) solid rgba(16, 25, 34, 0.72);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 37%, #050505 0 11%, transparent 12%),
    var(--material-color, #fff);
  box-shadow:
    inset 0 -2px 0 rgba(16, 25, 34, 0.16),
    0 3px 7px rgba(0, 0, 0, 0.25);
}

.material-icon.pylon {
  width: calc(30px * var(--material-scale, 1));
  height: calc(36px * var(--material-scale, 1));
  --pylon-outline: calc(1.5px * var(--material-scale, 1));
  filter: drop-shadow(0 0 var(--pylon-outline) #101922);
}

.material-icon.pylon::before {
  content: "";
  position: absolute;
  left: calc(9px * var(--material-scale, 1));
  top: calc(2px * var(--material-scale, 1));
  width: calc(12px * var(--material-scale, 1));
  height: calc(28px * var(--material-scale, 1));
  background: var(--material-color, #fff);
  filter: none;
  clip-path: polygon(35% 0, 65% 0, 100% 100%, 0 100%);
}

.material-icon.pylon::after {
  content: "";
  position: absolute;
  left: calc(3px * var(--material-scale, 1));
  bottom: calc(2px * var(--material-scale, 1));
  width: calc(24px * var(--material-scale, 1));
  height: calc(8px * var(--material-scale, 1));
  background: var(--material-color, #fff);
  filter: none;
  clip-path: polygon(50% 0, 100% 55%, 50% 100%, 0 55%);
}

.material-icon.dummy {
  width: calc(44px * var(--material-scale, 1));
  height: calc(100px * var(--material-scale, 1));
  background: url("/assets/keynote/Data/material-dummy.png") center / contain no-repeat;
  filter:
    brightness(1.2)
    contrast(1.28)
    drop-shadow(0 0 calc(1.3px * var(--material-scale, 1)) #101922)
    drop-shadow(0 4px 5px rgba(0, 0, 0, 0.25));
}

.material-icon.dummy::before {
  display: none;
}

.material-icon.dummy::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--material-color, #fff);
  opacity: 0.78;
  mix-blend-mode: multiply;
  -webkit-mask: url("/assets/keynote/Data/material-dummy.png") center / contain no-repeat;
  mask: url("/assets/keynote/Data/material-dummy.png") center / contain no-repeat;
  pointer-events: none;
}

.exercise-field-board.fullscreen .graphic-object.material.goal-box.large {
  width: clamp(129px, 13.5cqw, 192px);
  height: clamp(80px, 8.25cqw, 117px);
}

.exercise-field-board.fullscreen .graphic-object.material.goal-box.mini {
  width: clamp(75px, 7.8cqw, 111px);
  height: clamp(47px, 4.8cqw, 69px);
}

.exercise-field-board.fullscreen .graphic-object.material.flat-cone {
  width: clamp(20px, 2.1cqw, 31px);
  height: clamp(13px, 1.35cqw, 20px);
  min-width: clamp(20px, 2.1cqw, 31px);
  min-height: clamp(13px, 1.35cqw, 20px);
  border-width: clamp(2px, 0.2cqw, 3px);
}

.exercise-field-board.fullscreen .graphic-object.material.pylon {
  width: clamp(20px, 2.1cqw, 31px);
  height: clamp(29px, 3cqw, 45px);
  min-width: clamp(20px, 2.1cqw, 31px);
  min-height: clamp(29px, 3cqw, 45px);
}

.exercise-field-board.fullscreen .graphic-object.material.pylon::before,
.exercise-field-board.fullscreen .graphic-object.material.pylon::after {
  filter: drop-shadow(0 0 clamp(2px, 0.2cqw, 3px) #101922);
}

.exercise-field-board.fullscreen .graphic-object.material.dummy {
  width: clamp(27px, 2.8cqw, 41px);
  height: clamp(62px, 6.4cqw, 92px);
  min-width: clamp(27px, 2.8cqw, 41px);
  min-height: clamp(62px, 6.4cqw, 92px);
}

.exercise-field-board.fullscreen .graphic-object.material.dummy::before {
  filter:
    brightness(1.2)
    contrast(1.28)
    drop-shadow(0 0 clamp(2px, 0.2cqw, 3px) #101922)
    drop-shadow(0 5px 7px rgba(0, 0, 0, 0.25));
}

.graphic-material-menu .material-icon.dummy {
  width: 24px;
  height: 54px;
}

.graphic-material-menu .material-icon.flat-cone {
  width: 18px;
  height: 12px;
  border-width: 1px;
}

.graphic-material-menu .material-icon.pylon {
  --pylon-outline: 1px;
  width: 18px;
  height: 22px;
}

.graphic-material-menu .material-icon.pylon::before {
  left: 5.4px;
  top: 1.2px;
  width: 7.2px;
  height: 17px;
}

.graphic-material-menu .material-icon.pylon::after {
  left: 1.8px;
  bottom: 1.2px;
  width: 14.4px;
  height: 5px;
}

.graphic-object.marker {
  min-width: 24px;
  min-height: 24px;
  border-color: #101922;
  background: var(--accent-2);
  color: #101922;
}

.graphic-object.shape {
  z-index: 2;
  width: clamp(42px, 9cqw, 118px);
  height: clamp(26px, 5.8cqw, 76px);
  min-width: clamp(42px, 9cqw, 118px);
  min-height: clamp(26px, 5.8cqw, 76px);
  border: 2.5px solid var(--shape-color, #d7dcca);
  background: rgba(255, 255, 255, 0.04);
  color: var(--shape-color, #d7dcca);
  box-shadow: none;
}

.graphic-object.shape.ellipse {
  width: var(--shape-width, 30%);
  height: var(--shape-height, 20%);
  min-width: 0;
  min-height: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--shape-color, #d7dcca) 20%, transparent);
  transform: translate(-50%, -50%) rotate(var(--shape-rotation, 0deg));
}

.graphic-object.shape.rectangle {
  width: var(--shape-width, 32%);
  height: var(--shape-height, 22%);
  min-width: 0;
  min-height: 0;
  border-radius: 0;
  background: color-mix(in srgb, var(--shape-color, #d7dcca) 26%, transparent);
  transform: translate(-50%, -50%) rotate(var(--shape-rotation, 0deg));
}

.graphic-object.shape.polygon {
  height: clamp(38px, 7cqw, 92px);
  min-height: clamp(38px, 7cqw, 92px);
  clip-path: polygon(50% 0, 96% 35%, 78% 100%, 22% 100%, 4% 35%);
}

.graphic-object.text {
  z-index: 4;
  width: var(--text-width, 20%);
  height: var(--text-height, 7%);
  min-width: 0;
  min-height: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text-color, #fff);
  padding: 0;
  font-size: var(--text-size, 14px);
  line-height: 1.15;
  text-align: center;
  white-space: normal;
  box-shadow: none;
}

.graphic-object.text span,
.graphic-object.text textarea {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 4px 6px;
  font: inherit;
  line-height: 1.15;
  text-align: center;
  resize: none;
  outline: 0;
  overflow: hidden;
}

.graphic-object.text textarea {
  display: block;
  cursor: text;
}

.graphic-object.selected {
  outline: 3px solid rgba(242, 193, 78, 0.74);
  outline-offset: 2px;
}

.graphic-marquee {
  position: absolute;
  z-index: 20;
  border: 1.5px solid rgba(242, 193, 78, 0.92);
  background: rgba(242, 193, 78, 0.16);
  box-shadow: inset 0 0 0 1px rgba(8, 16, 20, 0.18);
  pointer-events: none;
}

.graphic-object.shape.ellipse.selected,
.graphic-object.shape.rectangle.selected {
  outline: 0;
}

.graphic-shape-handle,
.graphic-shape-rotate {
  position: absolute;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border: 1px solid rgba(16, 25, 34, 0.28);
  border-radius: 999px;
  background: rgba(245, 248, 244, 0.94);
  color: rgba(190, 198, 194, 0.96);
  box-shadow: inset 0 -2px 0 rgba(16, 25, 34, 0.08);
  transform: translate(-50%, -50%);
  cursor: grab;
}

.graphic-shape-handle.nw { left: 0; top: 0; cursor: nwse-resize; }
.graphic-shape-handle.n { left: 50%; top: 0; cursor: ns-resize; }
.graphic-shape-handle.ne { left: 100%; top: 0; cursor: nesw-resize; }
.graphic-shape-handle.e { left: 100%; top: 50%; cursor: ew-resize; }
.graphic-shape-handle.se { left: 100%; top: 100%; cursor: nwse-resize; }
.graphic-shape-handle.s { left: 50%; top: 100%; cursor: ns-resize; }
.graphic-shape-handle.sw { left: 0; top: 100%; cursor: nesw-resize; }
.graphic-shape-handle.w { left: 0; top: 50%; cursor: ew-resize; }

.graphic-shape-rotate {
  left: 50%;
  top: -39px;
  border: 0;
  background: transparent;
  color: rgba(222, 229, 225, 0.95);
  font-size: 32px;
  line-height: 1;
  box-shadow: none;
  cursor: grab;
}

.graphic-shape-rotate::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 25px;
  width: 2px;
  height: 24px;
  background: rgba(222, 229, 225, 0.95);
  transform: translateX(-50%);
}

.graphic-handle {
  z-index: 5;
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  border: 1px solid rgba(16, 25, 34, 0.28);
  border-radius: 999px;
  background: rgba(245, 248, 244, 0.94);
  box-shadow: inset 0 -2px 0 rgba(16, 25, 34, 0.08);
  cursor: grab;
}

.graphic-polygon-point {
  z-index: 6;
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  border: 1px solid rgba(16, 25, 34, 0.28);
  border-radius: 999px;
  background: rgba(245, 248, 244, 0.94);
  box-shadow: inset 0 -2px 0 rgba(16, 25, 34, 0.08);
  cursor: grab;
}

.graphic-line-hit {
  z-index: 4;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(242, 193, 78, 0.01);
  cursor: grab;
}

.graphic-line-hit.selected {
  border: 2px solid rgba(242, 193, 78, 0.74);
  background: rgba(242, 193, 78, 0.12);
}

.exercise-field-board.preview .graphic-object {
  border-width: 1px;
  box-shadow: none;
}

.exercise-field-board.preview .graphic-object.player {
  width: clamp(4px, var(--player-size-fluid, 3.25cqw), 16px);
  height: clamp(4px, var(--player-size-fluid, 3.25cqw), 16px);
  min-width: clamp(4px, var(--player-size-fluid, 3.25cqw), 16px);
  min-height: clamp(4px, var(--player-size-fluid, 3.25cqw), 16px);
  display: grid;
  place-items: center;
  border-width: 1px;
  font-size: clamp(3px, var(--player-font-size-fluid, 1.75cqw), 8px);
}

.exercise-field-board.preview .graphic-player-number {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: clamp(3px, var(--player-font-size-fluid, 1.75cqw), 8px);
  line-height: 1;
  text-align: center;
  transform: translateY(0);
}

.exercise-field-board.preview .graphic-player-name {
  display: none;
}

.exercise-field-board.preview .graphic-object.ball {
  width: var(--graphic-ball-size);
  height: var(--graphic-ball-size);
  min-width: var(--graphic-ball-size);
  min-height: var(--graphic-ball-size);
  border-width: 1px;
}

.exercise-field-board.preview .graphic-object.material.goal-box.large {
  width: clamp(10px, 9.9cqw, 42px);
  height: clamp(6px, 6cqw, 25px);
}

.exercise-field-board.preview .graphic-object.material.goal-box.mini {
  width: clamp(6px, 5.7cqw, 24px);
  height: clamp(4px, 3.55cqw, 15px);
}

.exercise-field-board.preview .graphic-object.material.flat-cone {
  width: clamp(2px, 1.55cqw, 7px);
  height: clamp(2px, 1cqw, 5px);
  min-width: clamp(2px, 1.55cqw, 7px);
  min-height: clamp(2px, 1cqw, 5px);
  border-width: 1px;
}

.exercise-field-board.preview .graphic-object.material.pylon {
  width: clamp(2px, 1.55cqw, 7px);
  height: clamp(3px, 2cqw, 9px);
  min-width: clamp(2px, 1.55cqw, 7px);
  min-height: clamp(3px, 2cqw, 9px);
}

.exercise-field-board.preview .graphic-object.material.dummy {
  width: clamp(3px, 2cqw, 9px);
  height: clamp(7px, 4.55cqw, 20px);
  min-width: clamp(3px, 2cqw, 9px);
  min-height: clamp(7px, 4.55cqw, 20px);
}

.exercise-field-board.preview .graphic-object.cone {
  border-right-width: 5px;
  border-bottom-width: 10px;
  border-left-width: 5px;
}

.exercise-field-board.preview .graphic-object.text {
  max-width: 70px;
  padding: 2px 3px;
  font-size: 5px;
}

.exercise-field-board.preview .graphic-line {
  stroke-width: 0.75;
}

.graphic-inspector {
  display: grid;
  gap: 10px;
}

.graphic-context-menu {
  position: absolute;
  z-index: 60000;
  display: grid;
  gap: 3px;
  width: min(166px, 44%);
  padding: 16px 6px 6px;
  border: 1px solid rgba(16, 25, 34, 0.18);
  background: #fff;
  color: #050505;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

.graphic-context-menu.compact {
  transform: translate(-50%, -50%);
  width: 86px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.graphic-context-menu input {
  width: 100%;
  min-height: 22px;
  border: 1px solid #111;
  border-radius: 0;
  background: #fff;
  color: #050505;
  padding: 1px 4px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
  text-align: center;
}

.graphic-context-close {
  position: absolute;
  right: 3px;
  top: 1px;
  width: 18px;
  min-height: 18px;
  height: 18px;
  border: 0;
  background: transparent;
  color: #777;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.graphic-context-name-row {
  position: relative;
}

.graphic-size-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  column-gap: 2px;
  align-items: center;
  justify-items: center;
  min-height: 25px;
  border: 1px solid #111;
  padding: 2px 5px;
  background: #fff;
}

.graphic-size-row button {
  display: grid;
  place-items: center;
  width: 24px;
  min-height: 21px;
  height: 21px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  padding: 0;
}

.graphic-size-row button::before {
  content: "";
  width: min(var(--dot-size, 14px), 19px);
  height: min(var(--dot-size, 14px), 19px);
  border: 1.3px solid #050505;
  border-radius: 999px;
  background: #fff;
}

.graphic-size-row button.active::before {
  background: #050505;
}

.graphic-context-action {
  min-height: 23px;
  border: 0;
  border-radius: 0;
  background: #efc667;
  color: #565665;
  font-size: 12px;
  font-weight: 400;
}

.graphic-context-action.danger {
  background: #efc667;
  color: #4f4f59;
}

.graphic-context-menu.compact .graphic-context-action {
  width: 86px;
  min-height: 30px;
  padding: 0 8px;
  border: 0;
  background: #efc667;
  color: #4f4f59;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.graphic-context-action:hover {
  background: #e8bd5c;
  border: 0;
}

.graphic-color-menu {
  position: relative;
  padding: 8px 30px 4px 0;
  background: #fff;
}

.graphic-color-close {
  position: absolute;
  right: 2px;
  top: 0;
  width: 26px;
  min-height: 26px;
  border: 0;
  background: transparent;
  color: #777;
  font-size: 28px;
  line-height: 1;
}

.graphic-color-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.graphic-color-choice {
  width: 30px;
  height: 30px;
  min-height: 30px;
  border: 2px solid #d0d0d0;
  border-radius: 999px;
  padding: 0;
}

.graphic-color-choice.active {
  outline: 4px solid #050505;
  outline-offset: 2px;
}

.graphic-color-choice.navy {
  background: #164994;
}

.graphic-color-choice.darkgreen {
  background: #0b5d3b;
}

.graphic-color-choice.red {
  background: #f32922;
}

.graphic-color-choice.white {
  background: #f7f8f3;
}

.graphic-color-choice.yellow {
  background: #f5f10b;
}

.graphic-color-choice.black {
  background: #1f2424;
}

.exercise-item {
  display: grid;
  grid-template-columns: 30px 58px minmax(0, 1fr) minmax(120px, 0.38fr) 36px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.exercise-left-tools {
  display: grid;
  justify-items: start;
  gap: 8px;
}

.exercise-item.dragging {
  opacity: 0.48;
}

.exercise-item.drag-over {
  border-color: rgba(242, 193, 78, 0.85);
  background: rgba(242, 193, 78, 0.08);
}

.exercise-drag-handle {
  width: 28px;
  min-width: 28px;
  min-height: 32px;
  padding: 0;
  border-color: rgba(232, 238, 235, 0.16);
  background: rgba(238, 244, 241, 0.06);
  color: rgba(238, 244, 241, 0.64);
  cursor: grab;
  font-size: 16px;
  line-height: 1;
}

.exercise-drag-handle:active {
  cursor: grabbing;
}

.exercise-formation-markers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 0;
}

.exercise-formation-markers span {
  padding: 4px 8px;
  border: 1px solid rgba(63, 178, 127, 0.72);
  border-radius: 999px;
  background: rgba(63, 178, 127, 0.12);
  color: #8fe0ba;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
  width: fit-content;
}

.exercise-formation-markers:empty {
  display: none;
}

.exercise-connection {
  position: relative;
  display: grid;
  grid-template-columns: minmax(58px, 0.18fr) auto minmax(180px, 0.72fr);
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 0 12px;
}

.exercise-connection-line {
  position: absolute;
  left: 35px;
  top: -1px;
  bottom: -1px;
  width: 2px;
  background: rgba(232, 238, 235, 0.22);
}

.exercise-connection.active .exercise-connection-line {
  background: rgba(242, 193, 78, 0.9);
  box-shadow: 0 0 0 1px rgba(242, 193, 78, 0.18);
}

.exercise-connection-toggle {
  grid-column: 2;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border-color: rgba(232, 238, 235, 0.18);
  background: rgba(238, 244, 241, 0.07);
  color: rgba(238, 244, 241, 0.7);
  font-size: 11px;
  font-weight: 800;
}

.exercise-connection-toggle.active {
  border-color: rgba(242, 193, 78, 0.78);
  background: rgba(242, 193, 78, 0.18);
  color: #f2c14e;
}

.exercise-connection-mode {
  grid-column: 3;
  min-height: 28px;
  padding: 5px 9px;
  border-color: rgba(242, 193, 78, 0.38);
  background: rgba(10, 18, 20, 0.42);
  font-size: 12px;
}

.exercise-number {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: var(--accent-2);
  color: #101922;
  font-size: 20px;
  font-weight: 900;
}

.exercise-main-fields {
  display: grid;
  gap: 42px;
}

.exercise-fields {
  display: grid;
  grid-template-columns: 1.2fr 0.45fr 0.75fr 0.75fr;
  gap: 10px;
}

.exercise-graphic-summary {
  display: grid;
  gap: 5px;
  align-content: center;
}

.exercise-graphic-summary .graphic-preview {
  width: min(160px, 100%);
}

.exercise-graphic-summary button {
  min-height: 28px;
  padding: 0 8px;
  font-size: 12px;
}

.layout-source-grid,
.archive-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.layout-source-grid img,
.archive-grid img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #cfcfcf;
}

@media (max-width: 980px) {
  .layout,
  .home-grid,
  .training-layout,
  .graphic-editor-layout,
  .archive-draft-grid,
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .home-grid {
    grid-template-areas:
      "matchday"
      "training"
      "principles"
      "orga";
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    height: auto;
    min-height: auto;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .nav button {
    justify-content: center;
  }

  .sidebar-footer {
    display: none;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .principle-pyramid-screen {
    min-height: auto;
    padding: 14px;
  }

  .principle-pyramid {
    width: min(520px, 100%);
    aspect-ratio: 0.92 / 1;
  }

  .pyramid-tactics {
    padding: 18% 24px 50%;
  }

  .pyramid-strategy {
    padding: 58% 24px 12%;
  }
}

@media (max-width: 620px) {
  .main,
  .sidebar {
    padding: 12px;
  }

  .brand-subtitle,
  .nav-heading {
    display: none;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .add-player-row,
  .exercise-fields,
  .exercise-item,
  .layout-source-grid,
  .archive-grid {
    grid-template-columns: 1fr;
  }

  .graphic-result-select {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .exercise-field-board.editable {
    min-height: 280px;
  }

  .pitch {
    min-height: 270px;
    aspect-ratio: 11 / 14;
  }

  .home-tile {
    grid-template-columns: 1fr 92px;
    min-height: 158px;
  }

  .training-classic {
    padding: 14px 10px 36px;
  }

  .training-button-stack {
    gap: 22px;
  }

  .training-button-stack button {
    min-height: 76px;
    font-size: 28px;
  }

  .classic-player-row {
    grid-template-columns: 1fr;
  }

  .team-add-row {
    grid-template-columns: 1fr;
  }

  .tile-copy {
    padding: 16px;
  }

  .tile-copy strong {
    font-size: 24px;
  }
}
