/* I AM UBUNTU game board. This layer intentionally replaces the terminal skin. */
body[data-view="board"] {
  background: #dbeeea;
}

body[data-view="board"] .workspace {
  background: #dbeeea;
}

body[data-view="board"] .board-panel {
  background: #dbeeea;
}

body[data-view="board"] .linux-board-scene {
  color: #17221f;
  background-color: #cddbd8;
  background-image:
    linear-gradient(180deg, rgba(31, 48, 45, 0.14), rgba(24, 43, 39, 0.2)),
    url("/assets/ubuntu-unity-board-v2.webp");
  background-position: center;
  background-size: cover;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.9);
}

body[data-view="board"] .linux-board-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(23, 124, 92, 0.025) 1px, transparent 1px),
    linear-gradient(rgba(23, 124, 92, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
}

body[data-view="board"] .linux-board-scene > * {
  position: relative;
  z-index: 1;
}

body[data-view="board"] .board-game-boot {
  position: absolute;
  color: #266c59;
  background: rgba(235, 249, 244, 0.97);
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  text-transform: none;
}

body[data-view="board"] .board-game-boot {
  display: none !important;
}

.game-boot-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 14px;
  color: white;
  background: linear-gradient(145deg, #d82c86, #6d5dcc 52%, #1b946a);
  box-shadow: 0 16px 30px rgba(46, 107, 88, 0.2);
  font-size: 21px;
  font-weight: 900;
}

body[data-view="board"] .board-game-boot i {
  background: rgba(30, 126, 94, 0.12);
}

body[data-view="board"] .board-game-boot i::after {
  background: linear-gradient(90deg, #d82c86, #28a878);
  box-shadow: none;
}

.board-game-bar {
  width: min(1440px, 100%);
  min-height: 50px;
  margin: 10px auto 8px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: 0 16px 42px rgba(32, 67, 61, 0.12), inset 0 1px rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(24px) saturate(1.2);
}

.game-board-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.game-board-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: white;
  background: linear-gradient(145deg, #d82c86, #735ecd 54%, #209a6f);
  box-shadow: 0 8px 18px rgba(111, 73, 153, 0.18);
  font-size: 15px;
  font-weight: 900;
}

.game-board-identity > span:last-child {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.game-board-identity small {
  color: #74817d;
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

.game-board-identity strong {
  overflow: hidden;
  color: #17221f;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-board-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.game-level-entry {
  min-height: 34px;
  padding: 4px 6px 4px 10px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(203, 33, 127, 0.26);
  border-radius: 10px;
  color: #7f1b58;
  background: rgba(255, 242, 249, 0.88);
  box-shadow: 0 8px 22px rgba(176, 39, 111, 0.11);
  cursor: pointer;
  font: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.game-level-entry:hover {
  border-color: rgba(203, 33, 127, 0.48);
  box-shadow: 0 10px 26px rgba(176, 39, 111, 0.18);
  transform: translateY(-1px);
}

.game-level-entry > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
  white-space: nowrap;
}

.game-level-entry i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2ab979;
  box-shadow: 0 0 0 4px rgba(42, 185, 121, 0.12);
}

.game-level-entry strong {
  min-height: 24px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  border-radius: 7px;
  color: #fff;
  background: linear-gradient(135deg, #ce267d, #8f3bb5);
  font-size: 10px;
  letter-spacing: 0;
}

.game-board-live {
  min-height: 34px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(29, 148, 101, 0.16);
  border-radius: 10px;
  color: #26785d;
  background: rgba(231, 250, 241, 0.78);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.game-board-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2ab979;
  box-shadow: 0 0 0 4px rgba(42, 185, 121, 0.12);
}

.game-board-live small {
  min-width: 27px;
  padding-left: 7px;
  border-left: 1px solid rgba(29, 148, 101, 0.15);
  color: #74817d;
  font-size: 9px;
  text-align: center;
}

.board-game-bar .board-switcher {
  max-width: min(54vw, 680px);
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.board-game-bar .board-switcher-label {
  display: none;
}

.board-game-bar .board-switcher-tabs {
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
}

.board-game-bar .board-switcher-tab {
  min-height: 34px;
  padding: 3px 7px;
  border-color: rgba(32, 90, 74, 0.12);
  border-radius: 9px;
  color: #52635e;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: none;
}

.board-game-bar .board-switcher-tab.is-active {
  border-color: rgba(203, 33, 127, 0.22);
  color: #b51f72;
  background: rgba(255, 241, 248, 0.85);
  box-shadow: 0 8px 20px rgba(165, 50, 112, 0.09);
}

.board-game-bar .board-tab-level {
  width: 27px;
  min-width: 27px;
  height: 27px;
  border-radius: 7px;
}

.board-game-bar .board-tab-copy {
  display: none;
}

body[data-view="board"] .linux-legend-note {
  width: min(1440px, 100%);
  margin: 0 auto 7px;
  border-color: rgba(194, 138, 22, 0.18);
  border-radius: 12px;
  color: #765910;
  background: rgba(255, 250, 228, 0.75);
  box-shadow: 0 10px 26px rgba(120, 97, 34, 0.07);
  backdrop-filter: blur(14px);
}

body[data-view="board"] .board-system-hud.board-control-deck {
  width: min(1440px, 100%);
  min-height: 84px;
  margin: 0 auto 7px;
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(560px, 1.48fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.38);
  box-shadow: 0 18px 46px rgba(34, 65, 59, 0.13), inset 0 1px rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(26px) saturate(1.22);
}

body[data-view="board"] .board-control-deck .level-pass {
  width: 100%;
  min-height: 82px;
  height: 82px;
  margin: 0;
  border: 0;
  border-right: 1px solid rgba(35, 91, 82, 0.1);
  border-radius: 0;
  color: #17221f;
  background:
    linear-gradient(105deg, rgba(226, 65, 146, 0.1), transparent 47%),
    linear-gradient(285deg, rgba(37, 167, 118, 0.09), transparent 46%);
  box-shadow: none;
}

body[data-view="board"] .board-control-deck .level-pass::after {
  content: none;
}

body[data-view="board"] .board-control-deck .level-pass-serial {
  inset: 0 auto auto 0;
  min-height: 21px;
  padding: 6px 13px 4px;
  color: #7b8984;
  background: transparent;
  font-size: 8px;
}

body[data-view="board"] .board-control-deck .level-pass-body {
  padding: 26px 0 9px 14px;
  gap: 1px;
}

body[data-view="board"] .board-control-deck .level-pass-kicker,
body[data-view="board"] .board-control-deck .level-pass-body small {
  color: #278160;
  font-family: inherit;
  font-size: 8px;
}

body[data-view="board"] .board-control-deck .level-pass-body > strong {
  color: #17221f;
  font-size: 20px;
}

body[data-view="board"] .board-control-deck .level-pass-value {
  padding: 0 14px 9px 0;
}

body[data-view="board"] .board-control-deck .level-pass-value strong {
  color: #17221f;
  font-size: 20px;
}

body[data-view="board"] .board-control-deck .level-pass-value span {
  color: #278160;
}

body[data-view="board"] .board-control-deck .level-pass-mark {
  top: 15px;
  right: 14px;
}

body[data-view="board"] .board-control-deck .level-pass-mark i {
  border-color: rgba(203, 33, 127, 0.32);
  background: rgba(203, 33, 127, 0.07);
}

body[data-view="board"] .board-control-deck .board-meta {
  height: 82px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-view="board"] .board-control-deck .board-meta div {
  min-height: 82px;
  height: 82px;
  padding: 12px 11px;
  border-color: rgba(35, 91, 82, 0.09);
  background: transparent;
}

body[data-view="board"] .board-control-deck .board-meta small {
  color: #7b8984;
  font-family: inherit;
  font-size: 8px;
}

body[data-view="board"] .board-control-deck .board-meta strong {
  max-width: 100%;
  color: #17221f;
  font-size: clamp(12px, 1.2vw, 16px);
  text-shadow: none;
}

body[data-view="board"] .topology-heading {
  width: min(1440px, 100%);
  min-height: 34px;
  margin: 0 auto;
  padding: 0 6px 5px;
  align-items: end;
  border-bottom: 1px solid rgba(35, 91, 82, 0.1);
}

body[data-view="board"] .topology-heading::after {
  display: none;
}

body[data-view="board"] .topology-heading span,
body[data-view="board"] .topology-heading small {
  color: #72807b;
  font-family: inherit;
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

body[data-view="board"] .topology-heading strong {
  color: #17221f;
  font-size: 15px;
  text-shadow: none;
}

body[data-view="board"] .linux-board-scene .board-tree::after {
  display: none;
}

body[data-view="board"] .unity-tree {
  width: min(1440px, 100%);
  min-height: 0;
  margin: 0 auto;
  padding: 7px 4px 2px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: minmax(104px, 0.95fr) minmax(90px, 0.86fr) minmax(86px, 0.95fr);
  grid-template-areas:
    ". legend legend ."
    "leftBuilder leftBuilder rightBuilder rightBuilder"
    "leftDonor1 leftDonor2 rightDonor1 rightDonor2";
  align-items: center;
  gap: 13px 24px;
  background: transparent;
}

body[data-view="board"] .unity-tree > :not(.topology-links) {
  z-index: 2;
}

body[data-view="board"] .unity-tree > .position-card.legend,
body[data-view="board"] .team-branch > .position-card.left_builder,
body[data-view="board"] .team-branch > .position-card.right_builder,
body[data-view="board"] .branch-donors > .position-card,
body[data-view="board"] .branch-donors > .position-card.empty {
  min-height: 0;
  align-self: center;
}

body[data-view="board"] .unity-tree > .position-card.legend {
  width: min(310px, 62%);
  height: clamp(100px, 14vh, 126px);
}

body[data-view="board"] .team-branch > .position-card.left_builder,
body[data-view="board"] .team-branch > .position-card.right_builder {
  width: min(290px, 54%);
  height: clamp(88px, 12vh, 108px);
}

body[data-view="board"] .branch-donors > .position-card,
body[data-view="board"] .branch-donors > .position-card.empty {
  width: 100%;
  height: clamp(82px, 11vh, 100px);
}

body[data-view="board"] .team-branch,
body[data-view="board"] .branch-donors {
  display: contents;
}

body[data-view="board"] .team-branch-title {
  display: none;
}

body[data-view="board"] .unity-tree .position-card.left_builder { grid-area: leftBuilder; }
body[data-view="board"] .unity-tree .position-card.right_builder { grid-area: rightBuilder; }
body[data-view="board"] .unity-tree .position-card.left_donor_1 { grid-area: leftDonor1; }
body[data-view="board"] .unity-tree .position-card.left_donor_2 { grid-area: leftDonor2; }
body[data-view="board"] .unity-tree .position-card.right_donor_1 { grid-area: rightDonor1; }
body[data-view="board"] .unity-tree .position-card.right_donor_2 { grid-area: rightDonor2; }

body[data-view="board"] .topology-links.game-links {
  display: block;
  mix-blend-mode: normal;
}

body[data-view="board"] .game-links path {
  fill: none;
  vector-effect: non-scaling-stroke;
}

body[data-view="board"] .game-links .edge-glow {
  stroke-width: 14;
  opacity: 0.1;
  filter: blur(4px);
}

body[data-view="board"] .game-links .edge-line {
  stroke-width: 3;
  opacity: 0.72;
}

body[data-view="board"] .game-links .edge-flow {
  stroke: rgba(255, 255, 255, 0.84);
  stroke-width: 1.2;
  stroke-dasharray: 3 10;
  opacity: 0.92;
  animation: game-edge-flow 1.8s linear infinite;
}

body[data-view="board"] .game-links circle {
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

body[data-view="board"] .edge-core-left .edge-glow,
body[data-view="board"] .edge-core-left .edge-line { stroke: #d84691; }
body[data-view="board"] .edge-core-left circle { fill: #d84691; }

body[data-view="board"] .edge-core-right .edge-glow,
body[data-view="board"] .edge-core-right .edge-line { stroke: #8d57be; }
body[data-view="board"] .edge-core-right circle { fill: #8d57be; }

body[data-view="board"] .edge-left .edge-glow,
body[data-view="board"] .edge-left .edge-line { stroke: #28a878; }
body[data-view="board"] .edge-left circle { fill: #28a878; }

body[data-view="board"] .edge-right .edge-glow,
body[data-view="board"] .edge-right .edge-line { stroke: #318bb4; }
body[data-view="board"] .edge-right circle { fill: #318bb4; }

@keyframes game-edge-flow {
  to { stroke-dashoffset: -26; }
}

body[data-view="board"] .linux-board-scene .position-card,
body[data-view="board"] .linux-board-scene .position-card.legend,
body[data-view="board"] .linux-board-scene .position-card.left_builder,
body[data-view="board"] .linux-board-scene .position-card.right_builder {
  position: relative;
  overflow: visible;
  padding: 9px 11px;
  display: grid;
  align-content: space-between;
  justify-items: stretch;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 15px;
  color: #17221f;
  background: rgba(255, 255, 255, 0.3);
  box-shadow:
    0 18px 42px rgba(38, 61, 57, 0.16),
    inset 0 1px rgba(255, 255, 255, 0.78),
    inset 0 -1px rgba(68, 104, 94, 0.06);
  backdrop-filter: blur(24px) saturate(1.24);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

body[data-view="board"] .linux-board-scene .position-card::after {
  content: "";
  position: absolute;
  inset: 5px;
  z-index: -1;
  border: 1px solid rgba(32, 91, 75, 0.05);
  border-radius: 11px;
}

body[data-view="board"] .linux-board-scene .position-card::before {
  top: -6px;
  width: 10px;
  height: 10px;
  border: 3px solid rgba(243, 251, 248, 0.96);
  background: #96aaa3;
  box-shadow: 0 0 0 1px rgba(48, 98, 83, 0.14);
}

body[data-view="board"] .linux-board-scene .position-card.legend {
  border-color: rgba(227, 91, 162, 0.35);
  background:
    linear-gradient(135deg, rgba(255, 224, 241, 0.46), rgba(255, 255, 255, 0.25) 48%, rgba(222, 247, 238, 0.35));
  box-shadow:
    0 20px 46px rgba(153, 65, 116, 0.15),
    0 0 0 5px rgba(216, 70, 145, 0.04),
    inset 0 1px rgba(255, 255, 255, 0.98);
  transform: none;
}

body[data-view="board"] .linux-board-scene .position-card.legend::before {
  background: #d84691;
  box-shadow: 0 0 0 1px rgba(216, 70, 145, 0.2), 0 0 14px rgba(216, 70, 145, 0.32);
}

body[data-view="board"] .linux-board-scene .position-card.left_builder {
  border-color: rgba(40, 168, 120, 0.32);
  background: linear-gradient(140deg, rgba(213, 248, 234, 0.42), rgba(255, 255, 255, 0.25));
  box-shadow: 0 17px 40px rgba(32, 132, 95, 0.12), inset 0 1px rgba(255, 255, 255, 0.96);
}

body[data-view="board"] .linux-board-scene .position-card.left_builder::before {
  background: #28a878;
  box-shadow: 0 0 0 1px rgba(40, 168, 120, 0.2), 0 0 13px rgba(40, 168, 120, 0.28);
}

body[data-view="board"] .linux-board-scene .position-card.right_builder {
  border-color: rgba(49, 139, 180, 0.3);
  background: linear-gradient(220deg, rgba(211, 241, 252, 0.42), rgba(255, 255, 255, 0.25));
  box-shadow: 0 17px 40px rgba(41, 121, 157, 0.12), inset 0 1px rgba(255, 255, 255, 0.96);
}

body[data-view="board"] .linux-board-scene .position-card.right_builder::before {
  background: #318bb4;
  box-shadow: 0 0 0 1px rgba(49, 139, 180, 0.2), 0 0 13px rgba(49, 139, 180, 0.28);
}

body[data-view="board"] .linux-board-scene .position-card.left_donor_1,
body[data-view="board"] .linux-board-scene .position-card.left_donor_2 {
  border-color: rgba(40, 168, 120, 0.18);
}

body[data-view="board"] .linux-board-scene .position-card.right_donor_1,
body[data-view="board"] .linux-board-scene .position-card.right_donor_2 {
  border-color: rgba(49, 139, 180, 0.18);
}

body[data-view="board"] .linux-board-scene .position-card.empty {
  border-style: dashed;
  border-color: rgba(67, 108, 96, 0.23);
  color: #7b8984;
  background: rgba(245, 252, 249, 0.22);
  box-shadow: 0 12px 30px rgba(39, 90, 77, 0.07), inset 0 1px rgba(255, 255, 255, 0.84);
}

body[data-view="board"] .linux-board-scene .position-card.empty::before {
  background: #9caaa5;
}

body[data-view="board"] .linux-board-scene .position-card:has(.position-user-button):hover {
  border-color: rgba(203, 33, 127, 0.3);
  box-shadow: 0 22px 48px rgba(43, 93, 79, 0.17), inset 0 1px rgba(255, 255, 255, 0.98);
  transform: translateY(-3px);
}

body[data-view="board"] .linux-board-scene .board-tree .position-head {
  min-height: 24px;
}

body[data-view="board"] .linux-board-scene .board-tree .slot-label {
  color: #71807b;
  font-family: inherit;
  font-size: 9px;
  font-weight: 900;
}

body[data-view="board"] .linux-board-scene .position-card.legend .slot-label { color: #bd2c78; }
body[data-view="board"] .linux-board-scene .position-card.left_builder .slot-label { color: #208561; }
body[data-view="board"] .linux-board-scene .position-card.right_builder .slot-label { color: #25799f; }

body[data-view="board"] .linux-board-scene .board-tree .status-pill {
  min-height: 19px;
  border-color: rgba(51, 101, 86, 0.12);
  color: #567068;
  background: rgba(240, 248, 245, 0.82);
  box-shadow: none;
  font-size: 8px;
}

body[data-view="board"] .linux-board-scene .board-tree .position-user,
body[data-view="board"] .linux-board-scene .board-tree .position-user-button {
  color: #17221f;
}

body[data-view="board"] .linux-board-scene .board-tree .position-user-button {
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-view="board"] .linux-board-scene .board-tree .position-user-button:hover {
  background: transparent;
}

body[data-view="board"] .linux-board-scene .board-tree .position-user strong {
  color: #17221f;
  font-size: 12px;
}

body[data-view="board"] .linux-board-scene .board-tree .position-user small {
  color: #798680;
  font-size: 10px;
}

body[data-view="board"] .linux-board-scene .board-tree .avatar-mini,
body[data-view="board"] .linux-board-scene .board-tree .position-card.legend .avatar-mini {
  width: 48px;
  height: 48px;
  flex-basis: 48px;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 13px;
  color: white;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), transparent 43%),
    linear-gradient(145deg, #d32f84, #6a5dcc 53%, #20956c);
  box-shadow: 0 10px 22px rgba(86, 75, 133, 0.22), inset 0 1px rgba(255, 255, 255, 0.24);
}

body[data-view="board"] .linux-board-scene .board-tree .position-card.legend .avatar-mini {
  width: 58px;
  height: 58px;
  flex-basis: 58px;
  border-radius: 16px;
  box-shadow: 0 12px 26px rgba(143, 58, 112, 0.22), 0 0 0 4px rgba(216, 70, 145, 0.06);
}

body[data-view="board"] .linux-board-scene .board-tree .position-card.empty .avatar-mini {
  border-color: rgba(68, 111, 98, 0.1);
  color: #799088;
  background: rgba(225, 239, 234, 0.7);
  box-shadow: none;
}

body[data-view="board"] .branch-donors .avatar-mini {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
}

body[data-view="board"] .branch-donors .position-user {
  flex-direction: row;
  text-align: left;
}

body[data-view="board"] .linux-board-scene .position-actions button {
  min-height: 26px;
  padding: 4px 9px;
  border-color: rgba(34, 139, 99, 0.18);
  border-radius: 8px;
  color: #216f56;
  background: rgba(229, 248, 240, 0.86);
  box-shadow: none;
  font-size: 9px;
}

body[data-view="board"] .linux-board-scene .position-actions button:hover {
  border-color: rgba(34, 139, 99, 0.34);
  background: #e2f7ee;
}

/* Keep every player detail inside its seat. */
body[data-view="board"] .linux-board-scene .board-tree .position-card {
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-content: stretch;
}

body[data-view="board"] .linux-board-scene .board-tree .position-head {
  width: 100%;
  min-height: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  text-align: left;
}

body[data-view="board"] .linux-board-scene .board-tree .slot-label {
	min-width: 0;
	flex: 1 1 auto;
	overflow: visible;
	text-overflow: clip;
	white-space: normal;
	line-height: 1.2;
}

body[data-view="board"] .linux-board-scene .board-tree .position-user,
body[data-view="board"] .linux-board-scene .board-tree .position-user-button,
body[data-view="board"] .linux-board-scene .board-tree > .position-card.legend .position-user,
body[data-view="board"] .linux-board-scene .board-tree > .position-card.left_builder .position-user,
body[data-view="board"] .linux-board-scene .board-tree > .position-card.right_builder .position-user {
  width: 100%;
  min-height: 48px;
  padding: 5px 7px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  justify-content: stretch;
  gap: 9px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 11px;
  color: #17221f;
  background: rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(12px);
  text-align: left;
}

body[data-view="board"] .linux-board-scene .board-tree .position-card.legend .position-user {
  border-color: rgba(216, 70, 145, 0.12);
  background: rgba(255, 241, 248, 0.28);
}

body[data-view="board"] .linux-board-scene .board-tree .position-card.left_builder .position-user,
body[data-view="board"] .linux-board-scene .board-tree .position-card.left_donor_1 .position-user,
body[data-view="board"] .linux-board-scene .board-tree .position-card.left_donor_2 .position-user {
  border-color: rgba(40, 168, 120, 0.11);
  background: rgba(236, 255, 247, 0.27);
}

body[data-view="board"] .linux-board-scene .board-tree .position-card.right_builder .position-user,
body[data-view="board"] .linux-board-scene .board-tree .position-card.right_donor_1 .position-user,
body[data-view="board"] .linux-board-scene .board-tree .position-card.right_donor_2 .position-user {
  border-color: rgba(49, 139, 180, 0.11);
  background: rgba(235, 249, 255, 0.27);
}

body[data-view="board"] .linux-board-scene .board-tree .position-user > div {
  min-width: 0;
  overflow: hidden;
}

body[data-view="board"] .linux-board-scene .board-tree .position-user strong,
body[data-view="board"] .linux-board-scene .board-tree .position-user small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-view="board"] .linux-board-scene .board-tree .position-user small {
  margin-top: 2px;
}

body[data-view="board"] .linux-board-scene .board-tree .avatar-mini,
body[data-view="board"] .linux-board-scene .board-tree .position-card.legend .avatar-mini {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
  border-radius: 11px;
}

body[data-view="board"] .linux-board-scene .board-tree .position-card.legend .avatar-mini {
  width: 48px;
  height: 48px;
  flex-basis: 48px;
  border-radius: 13px;
}

body[data-view="board"] .unity-tree > .position-card.legend {
  height: 120px;
}

body[data-view="board"] .team-branch > .position-card.left_builder,
body[data-view="board"] .team-branch > .position-card.right_builder {
  height: 106px;
}

body[data-view="board"] .branch-donors > .position-card,
body[data-view="board"] .branch-donors > .position-card.empty {
  height: 94px;
}

body[data-view="board"] .branch-donors .position-card:has(.position-actions) .position-user {
  padding-right: 92px;
}

body[data-view="board"] .branch-donors .position-actions {
  right: 9px;
  bottom: 10px;
}

body[data-view="board"] .linux-board-scene .board-scene-progress {
  width: min(420px, 100%);
  min-height: 17px;
  margin: 0 auto;
  grid-template-columns: minmax(80px, 1fr) auto;
}

body[data-view="board"] .linux-board-scene .board-scene-progress > span {
  height: 5px;
  border: 1px solid rgba(48, 105, 88, 0.1);
  background: rgba(255, 255, 255, 0.64);
  box-shadow: inset 0 1px 3px rgba(38, 91, 75, 0.08);
}

body[data-view="board"] .linux-board-scene .board-scene-progress > span::after {
  background: linear-gradient(90deg, #28a878, #318bb4 55%, #d84691);
  box-shadow: none;
}

body[data-view="board"] .linux-board-scene .board-scene-progress small,
body[data-view="board"] .linux-board-scene .board-scene-progress b {
  color: #60716b;
  font-family: inherit;
  font-size: 9px;
}

@media (min-width: 901px) and (min-height: 700px) {
  body[data-view="board"] {
    overflow: hidden;
    background: #dbeeea;
  }

  body[data-view="board"] .workspace {
    background: #dbeeea;
  }

  body[data-view="board"] .linux-board-scene {
    padding: 0 22px 6px;
  }

  body[data-view="board"] .board-game-bar {
    flex: 0 0 50px;
  }

  body[data-view="board"] .board-control-deck {
    flex: 0 0 84px;
  }

  body[data-view="board"] .topology-heading {
    flex: 0 0 34px;
  }

  body[data-view="board"] .unity-tree {
    flex: 1 1 auto;
    height: auto;
  }

  body[data-view="board"] .board-scene-progress {
    flex: 0 0 17px;
  }
}

@media (max-width: 900px) {
  body[data-view="board"] .workspace {
    padding-bottom: 84px;
  }

  body[data-view="board"] .linux-board-scene {
    padding: 0 14px 18px;
  }

  body[data-view="board"] .board-system-hud.board-control-deck {
    grid-template-columns: 1fr;
  }

  body[data-view="board"] .board-control-deck .level-pass {
    border-right: 0;
    border-bottom: 1px solid rgba(35, 91, 82, 0.1);
  }
}

@media (max-width: 620px) {
  .board-game-bar {
    min-height: 54px;
    margin-top: 8px;
    padding: 7px;
  }

  .game-board-identity strong {
    max-width: 136px;
    font-size: 12px;
  }

  .game-board-identity small { font-size: 8px; }
  .game-board-live { padding: 0 8px; }
  .game-board-live small { display: none; }
  .game-level-entry > span { display: none; }
  .game-level-entry { padding: 4px; }
  .game-level-entry strong { padding: 0 8px; }
  .board-game-bar .board-switcher { max-width: 94px; }
  .board-game-bar .board-switcher-tab { padding: 2px 4px; }

  body[data-view="board"] .board-system-hud.board-control-deck {
    border-radius: 14px;
  }

  body[data-view="board"] .board-control-deck .level-pass,
  body[data-view="board"] .board-control-deck .board-meta {
    height: auto;
  }

  body[data-view="board"] .board-control-deck .board-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-view="board"] .board-control-deck .board-meta div {
    min-height: 66px;
    height: auto;
  }

  body[data-view="board"] .unity-tree {
    padding: 12px 0 4px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas:
      "legend"
      "leftTeam"
      "rightTeam";
    gap: 22px;
  }

  body[data-view="board"] .team-branch,
  body[data-view="board"] .branch-donors {
    display: grid;
  }

  body[data-view="board"] .team-branch {
    width: 100%;
    grid-template-rows: 18px auto auto;
    gap: 12px;
  }

  body[data-view="board"] .team-branch-title {
    display: inline-flex;
    color: #61726c;
    font-family: inherit;
  }

  body[data-view="board"] .unity-tree > .position-card.legend {
    width: min(300px, 88%);
    height: 132px;
  }

  body[data-view="board"] .team-branch > .position-card.left_builder,
  body[data-view="board"] .team-branch > .position-card.right_builder {
    width: min(270px, 82%);
    height: 116px;
  }

  body[data-view="board"] .branch-donors {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  body[data-view="board"] .branch-donors > .position-card,
  body[data-view="board"] .branch-donors > .position-card.empty {
    height: 148px;
    padding: 8px;
  }

  body[data-view="board"] .branch-donors .position-user {
    flex-direction: column;
    text-align: center;
  }

  body[data-view="board"] .branch-donors .position-actions {
    position: static;
  }

  body[data-view="board"] .topology-links.game-links {
    display: none;
  }
}

/* Mobile board: a readable single-column game flow. */
@media (max-width: 620px) {
  body[data-view="board"] .unity-tree {
    width: 100%;
    padding: 10px 0 6px;
    gap: 14px;
  }

  body[data-view="board"] .unity-tree > .position-card.legend,
  body[data-view="board"] .team-branch > .position-card.left_builder,
  body[data-view="board"] .team-branch > .position-card.right_builder,
  body[data-view="board"] .branch-donors > .position-card,
  body[data-view="board"] .branch-donors > .position-card.empty {
    width: 100%;
    height: auto;
    min-height: 112px;
    grid-area: auto;
    justify-self: stretch;
  }

  body[data-view="board"] .unity-tree > .position-card.legend {
    min-height: 126px;
  }

  body[data-view="board"] .team-branch {
    grid-template-rows: auto auto auto;
    gap: 8px;
  }

  body[data-view="board"] .team-branch-title {
    min-height: 28px;
    padding: 0 10px;
    justify-self: stretch;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  body[data-view="board"] .right-team .team-branch-title {
    justify-self: stretch;
  }

body[data-view="board"] .right-team .team-branch-title i {
  order: 0;
}

  body[data-view="board"] .branch-donors {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  body[data-view="board"] .unity-tree .position-card.left_donor_1,
  body[data-view="board"] .unity-tree .position-card.left_donor_2,
  body[data-view="board"] .unity-tree .position-card.right_donor_1,
  body[data-view="board"] .unity-tree .position-card.right_donor_2 {
    grid-area: auto;
  }

  body[data-view="board"] .branch-donors::before {
    display: none;
  }

  body[data-view="board"] .unity-tree .position-card {
    padding: 10px 12px;
  }

  body[data-view="board"] .unity-tree .position-head {
    min-height: 25px;
    grid-template-columns: minmax(0, 1fr) auto;
    justify-items: start;
    justify-content: stretch;
    text-align: left;
  }

  body[data-view="board"] .unity-tree .position-badges {
    justify-content: flex-end;
  }

  body[data-view="board"] .unity-tree .position-user,
  body[data-view="board"] .branch-donors .position-user {
    min-width: 0;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    text-align: left;
  }

  body[data-view="board"] .unity-tree .position-user > div {
    min-width: 0;
  }

  body[data-view="board"] .unity-tree .position-user strong,
  body[data-view="board"] .unity-tree .position-user small {
    overflow: hidden;
    display: block;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-view="board"] .unity-tree .avatar-mini,
  body[data-view="board"] .unity-tree .position-card.legend .avatar-mini,
  body[data-view="board"] .unity-tree .position-card.left_builder .avatar-mini,
  body[data-view="board"] .unity-tree .position-card.right_builder .avatar-mini {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
    border-width: 4px;
    font-size: 17px;
  }

  body[data-view="board"] .unity-tree .position-actions,
  body[data-view="board"] .branch-donors .position-actions {
    position: static;
    justify-content: stretch;
  }

  body[data-view="board"] .unity-tree .position-actions button {
    width: 100%;
  }
}

/* Closed branches remain legible within the final 1 -> 2 -> 4 layout. */
body[data-view="board"] .team-branch.is-separated {
  opacity: 1;
  filter: none;
}

body[data-view="board"] .team-branch.is-separated > .position-card,
body[data-view="board"] .team-branch.is-separated > .branch-donors {
  opacity: 0.42;
  filter: grayscale(0.72) saturate(0.34);
}

body[data-view="board"] .has-left-closed .edge-core-left,
body[data-view="board"] .has-left-closed .edge-left,
body[data-view="board"] .has-right-closed .edge-core-right,
body[data-view="board"] .has-right-closed .edge-right {
  opacity: 0.18;
  filter: grayscale(1);
}

@media (min-width: 621px) {
  body[data-view="board"] .left-team .branch-closed-banner,
  body[data-view="board"] .right-team .branch-closed-banner {
    position: relative;
    inset: auto;
    width: min(320px, 58%);
    min-height: 44px;
    align-self: start;
    justify-self: center;
    transform: translateY(-48px);
  }

  body[data-view="board"] .left-team .branch-closed-banner {
    grid-area: leftBuilder;
  }

  body[data-view="board"] .right-team .branch-closed-banner {
    grid-area: rightBuilder;
  }
}

@media (max-width: 620px) {
  body[data-view="board"] .team-branch.is-separated {
    padding-top: 0;
  }

  body[data-view="board"] .team-branch .branch-closed-banner {
    position: static;
    inset: auto;
    width: 100%;
    min-height: 54px;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-view="board"] .game-links .edge-flow {
    animation: none;
  }
}
