.team3-body {
  --team3-red: #b92d25;
  --team3-red-dark: #8f211b;
  min-height: 100vh;
  margin: 0;
  color: var(--foreground);
  font-family: var(--paper-font-body, Inter, "Noto Sans SC", system-ui, sans-serif);
  background-color: var(--paper-bg, #faf9f5);
  background-image: radial-gradient(#ded9cf 0.7px, transparent 0.7px);
  background-size: 18px 18px;
}

.team3-body::before,
.team3-body::after {
  display: none !important;
}

.team3-body [hidden] {
  display: none !important;
}

.team3-body * {
  box-sizing: border-box;
}

.team3-shell {
  width: 100%;
  padding: 26px 0 64px;
}

.team3-simple-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 0 10px;
}

.team3-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 28px;
  margin-bottom: 26px;
}

.team3-hero h1 {
  max-width: 780px;
  margin: 0;
  color: var(--foreground);
  font-family: var(--paper-font-heading, Georgia, serif);
  font-size: clamp(52px, 7vw, 90px);
  line-height: 1.02;
  letter-spacing: 0;
}

.team3-hero p {
  max-width: 740px;
  margin: 14px 0 0;
  color: var(--paper-text-soft);
  font-size: 15px;
  line-height: 1.75;
}

.room-info-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  background: #fff1cf;
  border: 2px solid #15120f;
  border-radius: 8px;
  box-shadow: var(--paper-shadow-sm, 3px 3px 0 #15120f);
  padding: 12px 14px;
  margin: 18px 0;
}

.team-info-banner {
  margin: 2px 0 24px;
}

.room-info-banner strong {
  display: block;
  color: #15120f !important;
  font-size: 14px;
  line-height: 1.25;
}

.room-info-banner p {
  margin: 4px 0 0;
  color: #6c6256 !important;
  font-size: 13px;
  line-height: 1.45;
}

.team-info-banner-note {
  margin-top: 6px !important;
  padding-top: 6px;
  border-top: 1px solid rgba(21, 18, 15, 0.12);
  color: #766b5e !important;
  font-size: 12px !important;
  line-height: 1.55 !important;
}

.room-info-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.room-ghost {
  border: 2px solid #15120f;
  border-radius: 6px;
  padding: 10px 13px;
  background: #fffaf0;
  color: #15120f !important;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  box-shadow: var(--paper-shadow-sm, 3px 3px 0 #15120f);
}

.room-ghost:hover {
  transform: translateY(-1px);
  box-shadow: var(--paper-shadow-hover, 4px 4px 0 #15120f);
}

.team-info-copy-action {
  cursor: pointer;
  background: var(--paper-hover, #f5ead3);
}

.team-info-copy-action:hover,
.team-info-copy-action:focus-visible {
  background: rgba(185, 45, 37, 0.12);
}

.team-copy-toast {
  position: fixed;
  right: 22px;
  top: 88px;
  z-index: 60;
  width: min(380px, calc(100vw - 32px));
  padding: 12px 14px;
  color: var(--foreground);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
  background: var(--paper-surface);
  border: 2px solid var(--border);
  box-shadow: var(--paper-shadow);
  opacity: 1;
  transform: translateY(0);
  transition: opacity .18s ease, transform .18s ease;
}

.team-copy-toast.is-leaving {
  opacity: 0;
  transform: translateY(-8px);
}

.team-share-shell {
  padding-top: 14px;
}

.team-share-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  margin-bottom: 24px;
  padding: 30px;
  border: 2px solid var(--border);
  border-radius: 2px;
  background:
    linear-gradient(135deg, rgba(185, 45, 37, 0.08), transparent 36%),
    var(--paper-surface);
  box-shadow: var(--paper-shadow);
}

.team-share-identity {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.team-share-logo {
  width: 152px;
  height: 152px;
  display: grid;
  place-items: center;
  border: 2px solid var(--border);
  border-radius: 2px;
  background: #111521;
  color: #fffaf0;
  box-shadow: var(--paper-shadow-sm);
  overflow: hidden;
}

.team-share-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #fffef9;
}

.team-share-logo span {
  width: 100%;
  padding: 12px;
  text-align: center;
  font-family: var(--paper-font-heading, Georgia, serif);
  font-size: 26px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.team-share-hero h1 {
  margin: 0;
  color: var(--foreground);
  font-family: var(--paper-font-heading, Georgia, serif);
  font-size: clamp(54px, 8vw, 112px);
  line-height: 0.95;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.team-share-owner {
  margin: 12px 0 0;
  color: var(--paper-text-soft);
  font-size: 15px;
  font-weight: 800;
}

.team-share-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}

.team-share-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
  margin-bottom: 20px;
}

.team-share-story,
.team-share-stats {
  border: 2px solid var(--border);
  border-radius: 2px;
  background: var(--paper-surface);
  box-shadow: var(--paper-shadow);
}

.team-share-story {
  padding: 24px;
}

.team-share-story h2,
.team-share-section h2 {
  margin: 0;
  color: var(--foreground);
  font-family: var(--paper-font-heading, Georgia, serif);
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1;
  letter-spacing: 0;
}

.team-share-story p {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--paper-text-soft);
  font-size: 16px;
  line-height: 1.75;
}

.team-share-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.team-share-stats div {
  min-height: 112px;
  padding: 18px;
  border-right: 1.5px solid rgba(17, 17, 17, 0.16);
  border-bottom: 1.5px solid rgba(17, 17, 17, 0.16);
}

.team-share-stats span {
  display: block;
  color: var(--paper-text-soft);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.team-share-stats strong {
  display: block;
  margin-top: 10px;
  color: var(--foreground);
  font-family: var(--paper-font-heading, Georgia, serif);
  font-size: 34px;
  line-height: 1;
  overflow-wrap: anywhere;
}

.team-share-members {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.team-share-member {
  min-width: 210px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  column-gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: 2px;
  background: var(--paper-surface);
  box-shadow: 2px 2px 0 #111111;
}

.team-share-member span {
  grid-row: span 2;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--border);
  border-radius: 2px;
  background: #15120f;
  color: #fffaf0;
  font-weight: 900;
}

.team-share-member strong {
  color: var(--foreground);
  overflow-wrap: anywhere;
}

.team-share-member em {
  color: var(--paper-text-soft);
  font-style: normal;
  font-size: 13px;
}

.team-share-section {
  padding: 24px;
}

.team-share-tank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.team-share-tank {
  min-height: 128px;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: 2px;
  background: var(--paper-surface);
  color: var(--foreground);
  text-decoration: none;
  box-shadow: 2px 2px 0 #111111;
}

.team-share-tank:hover {
  transform: translateY(-1px);
  box-shadow: var(--paper-shadow-hover);
}

.team-share-tank-art {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--border);
  border-radius: 2px;
  background: #15120f;
  box-shadow: 2px 2px 0 #111111;
}

.team-share-tank-art img {
  width: 88%;
  height: 88%;
  object-fit: contain;
}

.team-share-tank-copy {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.team-share-tank-copy strong {
  color: var(--foreground);
  font-size: 16px;
  overflow-wrap: anywhere;
}

.team-share-tank-copy em,
.team-share-tank-copy small {
  color: var(--paper-text-soft);
  font-style: normal;
  font-size: 13px;
}

.team-share-battle-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.team-share-battle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1.5px solid var(--border);
  border-left-width: 8px;
  border-radius: 2px;
  background: var(--paper-surface);
  color: var(--foreground);
  text-decoration: none;
  box-shadow: 2px 2px 0 #111111;
}

.team-share-battle.is-win,
.team3-battle-row.is-win {
  border-left-color: #237447;
  background: linear-gradient(90deg, rgba(35, 116, 71, 0.09), transparent 42%), var(--paper-surface);
}

.team-share-battle.is-loss,
.team3-battle-row.is-loss {
  border-left-color: var(--team3-red-dark);
  background: linear-gradient(90deg, rgba(185, 45, 37, 0.1), transparent 42%), var(--paper-surface);
}

.team-share-battle.is-draw,
.team3-battle-row.is-draw {
  border-left-color: #8b6b24;
  background: linear-gradient(90deg, rgba(139, 107, 36, 0.1), transparent 42%), var(--paper-surface);
}

.team-share-battle-outcome,
.team3-battle-outcome {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--border);
  border-radius: 2px;
  color: #fffaf0;
  font-size: 13px;
  font-weight: 950;
  line-height: 1;
  box-shadow: 2px 2px 0 #111111;
}

.team-share-battle.is-win .team-share-battle-outcome,
.team3-battle-row.is-win .team3-battle-outcome {
  background: #237447;
}

.team-share-battle.is-loss .team-share-battle-outcome,
.team3-battle-row.is-loss .team3-battle-outcome {
  background: var(--team3-red-dark);
}

.team-share-battle.is-draw .team-share-battle-outcome,
.team3-battle-row.is-draw .team3-battle-outcome {
  background: #8b6b24;
}

.team-share-battle strong,
.team-share-battle em,
.team-share-battle small {
  display: block;
}

.team-share-battle strong {
  color: var(--foreground);
  font-size: 15px;
}

.team-share-battle em,
.team-share-battle small {
  margin-top: 5px;
  color: var(--paper-text-soft);
  font-style: normal;
  font-size: 13px;
}

.team-share-battle b {
  color: var(--team3-red-dark);
  font-size: 13px;
}

.team3-kicker {
  margin: 0 0 12px;
  color: var(--team3-red-dark);
  font-family: var(--paper-font-body, Inter, sans-serif);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.team3-kicker::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  background: var(--team3-red);
}

.team3-primary,
.team3-secondary,
.team3-pill {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1.5px solid var(--border);
  border-radius: 2px;
  padding: 8px 14px;
  color: var(--foreground);
  font-family: var(--paper-font-body, Inter, sans-serif);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  box-shadow: var(--paper-shadow-sm);
}

.team3-primary {
  background: var(--team3-red);
  color: #ffffff;
}

.team3-secondary,
.team3-pill {
  background: var(--paper-surface);
}

.team3-danger {
  color: var(--team3-red-dark);
}

.team3-primary:hover,
.team3-secondary:hover {
  transform: translateY(-1px);
  box-shadow: var(--paper-shadow-hover);
}

button.team3-primary,
button.team3-secondary {
  cursor: pointer;
}

.team3-primary:disabled {
  cursor: wait;
  opacity: 0.55;
  transform: none;
}

.team3-panel,
.team3-notice {
  border: 2px solid var(--border);
  border-radius: 2px;
  background: var(--paper-surface);
  color: var(--foreground);
  box-shadow: var(--paper-shadow);
}

.team3-panel {
  padding: 22px;
  margin-bottom: 20px;
}

.team3-notice {
  margin-bottom: 22px;
  padding: 14px 16px;
  border-color: var(--team3-red-dark);
  background: #fff7e9;
  color: var(--team3-red-dark);
  font-weight: 800;
}

.team3-panel-head,
.team3-actions,
.team3-team-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.team3-panel h2 {
  margin: 0;
  color: var(--foreground);
  font-family: var(--paper-font-heading, Georgia, serif);
  font-size: 28px;
  line-height: 1.12;
  letter-spacing: 0;
}

.team3-muted {
  color: var(--paper-text-soft);
}

.team3-form {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.team3-form label {
  display: grid;
  gap: 8px;
  color: var(--foreground);
  font-size: 13px;
  font-weight: 900;
}

.team3-field {
  display: grid;
  gap: 8px;
}

.team3-field-label {
  color: var(--foreground);
  font-size: 13px;
  font-weight: 900;
}

.team3-form input,
.team3-form textarea,
.team3-actions input {
  width: 100%;
  min-height: 44px;
  border: 1.5px solid var(--border);
  border-radius: 2px;
  background: var(--paper-surface);
  color: var(--foreground);
  padding: 12px 13px;
  outline: none;
  box-shadow: inset 2px 2px 0 rgba(17, 17, 17, 0.06);
}

.team3-form textarea {
  min-height: 118px;
  resize: vertical;
}

.team3-form input:focus,
.team3-form textarea:focus,
.team3-actions input:focus {
  border-color: var(--team3-red-dark);
  box-shadow: 0 0 0 3px rgba(185, 45, 37, 0.13);
}

.team3-grid,
.team3-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 20px;
}

.team3-wide-panel {
  grid-column: 1 / -1;
}

.team3-logo {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  flex: 0 0 auto;
  border: 2px solid var(--border);
  border-radius: 2px;
  background:
    linear-gradient(135deg, rgba(185, 45, 37, 0.16), transparent 44%),
    var(--paper-muted) center / cover no-repeat;
  box-shadow: var(--paper-shadow-sm);
  overflow: hidden;
}

.team3-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #fffef9;
}

.team3-team-card {
  padding: 28px;
}

.team3-team-card-main {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.75fr);
  gap: 28px;
  align-items: stretch;
}

.team3-team-identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  min-width: 0;
}

.team3-team-logo {
  width: 138px;
  height: 138px;
  background: #101421;
}

.team3-team-copy {
  min-width: 0;
}

.team3-team-copy h2 {
  margin: 0 0 10px;
  color: var(--foreground);
  font-family: var(--paper-font-heading, Georgia, serif);
  font-size: clamp(42px, 6vw, 74px);
  line-height: 0.98;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.team3-team-copy p {
  max-width: 680px;
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
}

.team3-team-members-card {
  min-width: 0;
  border: 1.5px solid var(--border);
  border-radius: 2px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(185, 45, 37, 0.08), transparent 42%),
    var(--paper-muted);
}

.team3-panel-head.compact {
  margin-bottom: 12px;
}

.team3-panel-head.compact h3 {
  margin: 0;
  color: var(--foreground);
  font-family: var(--paper-font-heading, Georgia, serif);
  font-size: 24px;
  line-height: 1;
}

.team3-member-strip {
  display: grid;
  gap: 10px;
}

.team3-team-card-actions {
  justify-content: flex-end;
  border-top: 1.5px solid rgba(17, 17, 17, 0.16);
  padding-top: 18px;
}

.team3-logo-upload {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-height: 112px;
  padding: 16px;
  border: 2px solid var(--border);
  border-radius: 2px;
  background:
    linear-gradient(135deg, rgba(185, 45, 37, 0.08), transparent 42%),
    var(--paper-muted);
  box-shadow: var(--paper-shadow-sm);
}

.team3-logo-preview {
  width: 76px;
  height: 76px;
}

.team3-logo-upload-copy {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.team3-logo-upload-copy strong {
  color: var(--foreground);
  font-family: var(--paper-font-heading, Georgia, serif);
  font-size: 20px;
  line-height: 1.1;
}

.team3-upload-action {
  width: fit-content;
  cursor: pointer;
}

.team3-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.team3-actions {
  margin-top: 18px;
}

.team3-actions input {
  min-width: 0;
  flex: 1 1 420px;
}

.team3-more-menu {
  position: relative;
  flex: 0 0 auto;
}

.team3-more-menu summary {
  list-style: none;
  cursor: pointer;
}

.team3-more-menu summary::-webkit-details-marker {
  display: none;
}

.team3-more-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 5;
  width: 220px;
  border: 2px solid var(--border);
  border-radius: 2px;
  background: var(--paper-surface);
  box-shadow: var(--paper-shadow);
  padding: 8px;
}

.team3-menu-danger {
  width: 100%;
  min-height: 38px;
  border: 1.5px solid var(--team3-red-dark);
  border-radius: 2px;
  background: #fff7e9;
  color: var(--team3-red-dark);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.team3-menu-danger:hover {
  background: #f8e7e3;
}

.team3-member,
.team3-tank {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 2px;
  background: var(--paper-surface);
  color: var(--foreground);
  padding: 13px;
  text-align: left;
  box-shadow: 2px 2px 0 #111111;
}

.team3-member {
  min-height: 58px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
}

.team3-member-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--border);
  border-radius: 2px;
  background: #15120f;
  color: #fffaf0;
  font-weight: 900;
}

.team3-member-copy {
  min-width: 0;
}

.team3-member-copy span {
  display: block;
  margin-top: 3px;
  font-size: 13px;
}

.team3-member strong,
.team3-tank strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--foreground);
  font-size: 15px;
}

.team3-tank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

#battleTankPool.team3-tank-grid {
  max-height: min(58vh, 620px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 2px 8px 8px 2px;
  scroll-snap-type: y proximity;
}

#battleTankPool .team3-tank {
  width: 100%;
  scroll-snap-align: start;
}

.team3-tank {
  min-height: 124px;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
}

.team3-tank-art {
  width: 88px;
  height: 88px;
  display: block;
  border: 1.5px solid var(--border);
  border-radius: 2px;
  background-color: #15120f;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 82%;
  box-shadow: 2px 2px 0 #111111;
}

.team3-tank-copy {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.team3-tank-copy .team3-muted {
  font-size: 13px;
  line-height: 1.3;
}

.team3-tank-grid.selectable .team3-tank {
  cursor: pointer;
}

.team3-tank-grid.selectable .team3-tank:hover,
.team3-tank.is-selected,
.team3-tank.is-active-placement {
  background: var(--paper-hover);
  transform: translateY(-1px);
}

.team3-tank.is-selected {
  border-color: var(--team3-red-dark);
  box-shadow: 4px 4px 0 var(--team3-red-dark);
}

.team3-tank.is-active-placement {
  outline: 3px solid rgba(185, 45, 37, 0.22);
  outline-offset: 2px;
}

.team3-pill {
  min-height: 32px;
  color: var(--team3-red-dark);
  box-shadow: 2px 2px 0 #111111;
}

.team3-map {
  display: grid;
  grid-template-columns: repeat(20, minmax(18px, 1fr));
  gap: 2px;
  margin-top: 18px;
  padding: 10px;
  border: 2px solid var(--border);
  border-radius: 2px;
  background:
    linear-gradient(180deg, rgba(255, 254, 249, 0.14), rgba(35, 32, 28, 0.08)),
    #d9cfac var(--asset-ground);
  background-size: auto, 50px 50px;
}

.team3-cell {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-width: 0;
  border: 1px solid rgba(17, 17, 17, 0.28);
  border-radius: 1px;
  background: rgba(255, 254, 249, 0.34);
  color: var(--foreground);
  font-family: var(--paper-font-mono, monospace);
  font-size: 11px;
  font-weight: 900;
}

.team3-cell.wall {
  background: var(--asset-stone) center / cover;
}

.team3-cell.breakable {
  background: var(--asset-dirt) center / cover;
}

.team3-cell.grass {
  background: var(--asset-grass) center / cover;
}

.team3-cell.enemy-zone {
  box-shadow: inset 0 0 0 2px rgba(155, 58, 50, 0.18);
}

.team3-cell.ally-zone {
  cursor: pointer;
  box-shadow: inset 0 0 0 2px rgba(79, 111, 82, 0.2);
}

.team3-cell.ally-zone:hover {
  border-color: #4f6f52;
}

.team3-cell.spawn {
  background: #e7f5ec;
  border-color: #0f5132;
  color: #0f5132;
  box-shadow: inset 0 0 0 2px #0f5132;
}

.team3-map-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.team3-map-choice {
  display: grid;
  gap: 10px;
  align-content: start;
  border: 2px solid var(--border);
  border-radius: 2px;
  padding: 12px;
  background: var(--paper-surface);
  color: var(--foreground);
  cursor: pointer;
  text-align: left;
  box-shadow: var(--paper-shadow-sm);
}

.team3-map-choice.is-active {
  border-color: var(--team3-red-dark);
  box-shadow: 4px 4px 0 var(--team3-red-dark);
}

.team3-map-mini {
  display: grid;
  gap: 1px;
  width: 100%;
  max-width: 260px;
  padding: 6px;
  border: 1.5px solid var(--border);
  background: #15120f;
}

.team3-map-mini i {
  display: grid;
  grid-template-columns: repeat(20, 1fr);
  gap: 1px;
}

.team3-map-mini b {
  aspect-ratio: 1;
  background: #e9dfc8;
}

.team3-map-mini .tile-x {
  background: #5c5548;
}

.team3-map-mini .tile-m {
  background: #a56a35;
}

.team3-map-mini .tile-o {
  background: #55744b;
}

.team3-select {
  min-height: 38px;
  border: 1.5px solid var(--border);
  border-radius: 2px;
  padding: 8px 10px;
  background: var(--paper-surface);
  color: var(--foreground);
  font: inherit;
  font-weight: 800;
}

.team3-actions.compact {
  justify-content: flex-end;
}

.team3-spawn-token {
  width: min(100%, 34px);
  height: min(100%, 34px);
  display: grid;
  place-items: center;
  border: 1.5px solid #0f5132;
  border-radius: 2px;
  background: rgba(255, 254, 249, 0.92);
  color: #0f5132;
  overflow: hidden;
  font-size: 10px;
}

.team3-spawn-art {
  width: 100%;
  height: 100%;
  display: block;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.team3-result {
  margin-top: 16px;
  color: var(--foreground);
  line-height: 1.7;
}

.team3-replay-stage {
  min-height: 620px;
  display: grid;
  place-items: center;
  margin-top: 18px;
  padding: 14px;
  overflow: hidden;
  border: 2px solid var(--border);
  border-radius: 2px;
  background: #15120f;
}

.team3-replay-mount {
  width: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.team3-replay-mount .playground {
  box-shadow: none;
  clip-path: none;
  border: 2px solid rgba(255, 250, 240, 0.2);
}

.team3-replay-mount .playground .status.battle-royale-status-bar {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.team3-replay-logs {
  max-height: 180px;
  overflow: auto;
  margin-top: 14px;
  border: 1.5px solid var(--border);
  border-radius: 2px;
  background: var(--paper-muted);
  color: var(--foreground);
  padding: 12px;
  white-space: pre-wrap;
  font-family: var(--paper-font-mono, monospace);
  font-size: 12px;
  line-height: 1.55;
}

.team3-battle-list,
.team3-runtime-list {
  display: grid;
  gap: 10px;
}

.team3-battle-row,
.team3-runtime-row {
  display: grid;
  grid-template-columns: auto minmax(180px, 0.9fr) minmax(0, 1.5fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: 2px;
  background: var(--paper-surface);
  color: var(--foreground);
  text-decoration: none;
  box-shadow: var(--paper-shadow-sm);
}

.team3-battle-row {
  border-left-width: 8px;
}

.team3-battle-main {
  min-width: 0;
}

.team3-battle-row:hover {
  transform: translateY(-1px);
  box-shadow: var(--paper-shadow-hover);
}

.team3-battle-row strong,
.team3-runtime-row strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--paper-font-heading, Georgia, serif);
  font-size: 18px;
  line-height: 1.1;
}

.team3-battle-tanks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.team3-battle-tanks span {
  max-width: 150px;
  overflow: hidden;
  border: 1px solid rgba(21, 18, 15, 0.18);
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--paper-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
}

.team3-result-modal .modal-window {
  border-radius: 2px;
}

.team3-invite-window {
  width: min(860px, calc(100vw - 32px));
  border-radius: 2px;
}

.team3-invite-modal-body {
  display: grid;
  gap: 16px;
}

.team3-invite-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.team3-invite-list {
  display: grid;
  gap: 10px;
  max-height: min(56vh, 520px);
  overflow: auto;
  padding-right: 4px;
}

.team3-invite-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1.5px solid var(--border);
  border-radius: 2px;
  padding: 12px;
  background: var(--paper-surface);
  box-shadow: var(--paper-shadow-sm);
}

.team3-invite-row-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.team3-invite-row-main strong {
  color: var(--team3-red-dark);
  font-size: 13px;
}

.team3-invite-row-main code {
  overflow: hidden;
  color: var(--foreground);
  font-family: var(--paper-font-mono, monospace);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team3-invite-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.team3-result-modal-body {
  display: grid;
  gap: 16px;
}

.team3-result-hero {
  border: 1.5px solid var(--border);
  border-radius: 2px;
  padding: 14px;
  background: var(--paper-muted);
}

.team3-result-hero strong {
  display: block;
  margin: 2px 0 6px;
  font-family: var(--paper-font-heading, Georgia, serif);
  font-size: 28px;
  line-height: 1.05;
}

.team3-runtime-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
  box-shadow: none;
}

.team3-runtime-row code {
  color: var(--team3-red-dark);
  font-family: var(--paper-font-mono, monospace);
  font-size: 13px;
  font-weight: 900;
}

.team3-modal-actions,
.team3-share-row,
.team3-replay-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.team3-share-row input {
  min-width: 0;
  flex: 1 1 260px;
  border: 1.5px solid var(--border);
  border-radius: 2px;
  padding: 10px 12px;
  background: var(--paper-surface);
  color: var(--foreground);
  font: inherit;
}

.team3-replay-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.team3-replay-summary-card {
  border: 2px solid var(--border);
  border-radius: 2px;
  padding: 14px;
  background: var(--paper-surface);
  box-shadow: var(--paper-shadow-sm);
}

.team3-replay-summary-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--paper-text-soft);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.team3-replay-summary-card strong {
  color: var(--foreground);
  font-family: var(--paper-font-heading, Georgia, serif);
  font-size: 22px;
  line-height: 1.12;
}

.team3-replay-details {
  margin-top: 18px;
}

.team3-share-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  border: 2px solid var(--border);
  border-radius: 2px;
  padding: 28px;
  background: var(--paper-surface);
  box-shadow: var(--paper-shadow-sm);
}

.team3-share-card h1 {
  margin: 0 0 12px;
  color: var(--foreground);
  font-family: var(--paper-font-heading, Georgia, serif);
  font-size: clamp(44px, 7vw, 82px);
  line-height: 0.98;
}

.team3-share-logo {
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
  border: 2px solid var(--border);
  border-radius: 2px;
  background: var(--paper-muted);
  box-shadow: var(--paper-shadow-sm);
}

.team3-share-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.team3-share-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.team3-share-facts span {
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--paper-muted);
  color: var(--foreground);
  font-size: 12px;
  font-weight: 900;
}

@media (max-width: 900px) {
  .team3-hero,
  .room-info-banner,
  .team3-panel-head,
  .team3-actions,
  .team3-team-head {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .team3-more-menu,
  .team3-more-menu summary,
  .team3-more-panel {
    width: 100%;
  }

  .team3-more-panel {
    position: static;
    margin-top: 8px;
  }
  .team3-grid,
  .team3-layout {
    grid-template-columns: 1fr;
  }

  .team3-team-card-main,
  .team3-team-identity {
    grid-template-columns: 1fr;
  }

  .team3-team-card-actions {
    justify-content: stretch;
  }

  .team3-team-logo {
    width: 112px;
    height: 112px;
  }

  .team3-battle-row,
  .team3-runtime-row,
  .team3-replay-summary-grid,
  .team3-invite-row {
    grid-template-columns: 1fr;
  }

  .team3-share-card {
    grid-template-columns: 1fr;
  }

  .team-share-hero,
  .team-share-overview,
  .team-share-identity {
    grid-template-columns: 1fr;
  }

  .team-share-actions {
    justify-content: stretch;
    flex-direction: column;
  }

  .room-info-actions {
    justify-content: flex-start;
  }

  .team-share-actions .team3-primary,
  .team-share-actions .team3-secondary {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .team3-shell {
    padding-top: 18px;
  }

  .team3-hero h1 {
    font-size: 46px;
  }

  .team3-panel {
    padding: 16px;
  }

  .team-share-hero,
  .team-share-story,
  .team-share-section {
    padding: 18px;
  }

  .team-share-logo {
    width: 112px;
    height: 112px;
  }

  .team-share-hero h1 {
    font-size: 48px;
  }

  .team-share-stats {
    grid-template-columns: 1fr;
  }

  .team-share-battle,
  .team-share-tank {
    grid-template-columns: 1fr;
  }

  .team3-team-card {
    padding: 18px;
  }

  .team3-tank {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .team3-tank-art {
    width: 72px;
    height: 72px;
  }

  .team3-replay-stage {
    min-height: 420px;
    padding: 8px;
  }

  .team3-replay-mount .playground .status.battle-royale-status-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    height: 150px;
    padding-right: 8px;
  }
}
