/* [TEAM1-CSS] 1팀 듀얼정보 전용 스타일 시작 */
.team1-duel-root {
  width: 100%;
}

.team1-loading-card,
.team1-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.team1-loading-card {
  padding: 28px;
  color: var(--muted);
}

.team1-hero {
  padding: 26px;
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.team1-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--accent);
  background: var(--card-bg-2);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 12px;
}

.team1-title {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.team1-desc {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.team1-role-card {
  min-width: 210px;
  padding: 16px;
  border-radius: 16px;
  background: var(--card-bg-2);
  border: 1px solid var(--border);
}

.team1-logout-card {
  min-width: 120px;
  padding: 0;
  border: none;
  background: transparent;
}

.team1-role-label {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.team1-role-value {
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
}

.team1-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.team1-panel {
  padding: 20px;
}

.team1-panel + .team1-panel {
  margin-top: 16px;
}

.team1-panel-title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 850;
}

.team1-panel-desc {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.team1-form-stack {
  display: grid;
  gap: 12px;
}

.team1-field {
  display: grid;
  gap: 7px;
}

.team1-field label {
  color: var(--muted);
  font-size: 13px;
}

.team1-input,
.team1-textarea,
.team1-fake-select {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--card-bg-2);
  color: var(--text);
  border-radius: 13px;
  min-height: 46px;
  padding: 0 14px;
  outline: none;
}

.team1-textarea {
  min-height: 92px;
  padding: 12px 14px;
  resize: vertical;
}

.team1-input:focus,
.team1-textarea:focus,
.team1-fake-select:focus {
  border-color: var(--accent);
}

.team1-fake-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 700;
}

.team1-fake-select::after {
  content: "⌄";
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--muted);
}

.team1-inline-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.team1-attr-box {
  border: 1px solid var(--border);
  background: var(--card-bg-2);
  border-radius: 16px;
  padding: 14px;
}

.team1-attr-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.team1-attr-title {
  font-weight: 800;
}

.team1-attr-total {
  color: var(--muted);
  font-size: 13px;
}

.team1-attr-row {
  display: grid;
  grid-template-columns: 40px 40px 1fr 40px;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.team1-attr-name {
  font-weight: 900;
}

.team1-attr-name.earth { color: #22c55e; }
.team1-attr-name.water { color: #38bdf8; }
.team1-attr-name.fire { color: #ef4444; }
.team1-attr-name.wind { color: #facc15; }

.team1-mini-btn {
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card-bg);
  color: var(--text);
  cursor: pointer;
  font-size: 18px;
}

.team1-mini-btn:hover {
  background: var(--hover);
}

.team1-attr-value {
  height: 36px;
  border-radius: 10px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-weight: 850;
}

.team1-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.team1-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card-bg-2);
  font-size: 13px;
  font-weight: 800;
}

.team1-badge.blue { color: #8ab4f8; }
.team1-badge.green { color: #22c55e; }
.team1-badge.red { color: #ef4444; }
.team1-badge.yellow { color: #facc15; }
.team1-badge.purple { color: #c084fc; }

.team1-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.team1-btn {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 16px;
  background: var(--card-bg-2);
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

.team1-btn:hover {
  background: var(--hover);
}

.team1-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.team1-tab-shell {
  margin: 0 0 16px;
}

.team1-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.team1-tab {
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  border-radius: 999px;
  min-height: 38px;
  padding: 0 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.team1-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.team1-dashboard-tools {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, minmax(130px, 0.7fr));
  gap: 10px;
  margin-bottom: 14px;
}

.team1-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
}

.team1-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  font-size: 14px;
}

.team1-table th,
.team1-table td {
  text-align: left;
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.team1-table th {
  color: var(--muted);
  background: var(--card-bg-2);
  font-size: 12px;
  font-weight: 900;
}

.team1-table tr:last-child td {
  border-bottom: none;
}

.team1-table tr:hover td {
  background: var(--hover);
}

.team1-soft-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.team1-login-card {
  padding: 24px;
  max-width: 560px;
}

.team1-login-wrap {
  display: grid;
  place-items: start;
}

.team1-login-only-wrap {
  min-height: auto;
  place-items: start;
  padding: 24px 0 0;
}

.team1-simple-login-card {
  width: min(520px, 100%);
}

.team1-locked-line {
  margin-top: 16px;
  padding: 14px;
  border-radius: 14px;
  background: var(--card-bg-2);
  border: 1px dashed var(--border);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 1180px) {
  .team1-layout {
    grid-template-columns: 1fr;
  }

  .team1-dashboard-tools {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .team1-hero,
  .team1-inline-grid,
  .team1-dashboard-tools {
    grid-template-columns: 1fr;
  }

  .team1-role-card {
    min-width: 0;
  }
}
/* [TEAM1-CSS-END] 1팀 듀얼정보 전용 스타일 끝 */

/* [TEAM1-CSS-LOGIN] 로그인/세션 UI 추가 */
.team1-error-box {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.08);
  color: var(--danger);
  font-size: 14px;
  line-height: 1.5;
}

.team1-link-btn {
  margin-top: 0;
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.team1-link-btn:hover {
  background: var(--hover);
  color: var(--text);
}
/* [TEAM1-CSS-LOGIN-END] 로그인/세션 UI 추가 끝 */

/* [TEAM1-CSS-V3] 보안형 빈 테이블/비활성 상태 표시 */
.team1-empty-cell {
  color: var(--muted);
  text-align: center !important;
  padding: 26px 14px !important;
  white-space: normal !important;
}
/* [TEAM1-CSS-V3-END] */

/* [TEAM1-CSS-V4] 실제 DB 입력/관리 화면 보강 */
.team1-message-box {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.08);
  color: var(--success);
  font-size: 14px;
  line-height: 1.5;
}

.team1-select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 19px, calc(100% - 12px) 19px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
  cursor: pointer;
}

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

.team1-stat-mini {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card-bg-2);
}

.team1-stat-mini div {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.team1-stat-mini strong {
  font-size: 24px;
  font-weight: 900;
}

.team1-row-actions {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.team1-small-action {
  min-height: 30px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--card-bg-2);
  color: var(--text);
  padding: 0 9px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.team1-small-action:hover {
  background: var(--hover);
}

.team1-small-action.danger {
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.4);
}

.team1-three-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr) minmax(380px, 1.2fr);
  gap: 16px;
  align-items: start;
}

.team1-subtitle {
  margin: 14px 0 8px;
  font-size: 15px;
  font-weight: 900;
}

.team1-turn-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.team1-turn-row strong {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1320px) {
  .team1-three-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .team1-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team1-turn-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .team1-summary-grid {
    grid-template-columns: 1fr;
  }
}
/* [TEAM1-CSS-V4-END] */

/* [TEAM1-CSS-V4-7] 홈 그룹/페트 자동검색 UI */
.team1-section-title {
  margin: 18px 0 10px;
  font-size: 15px;
  font-weight: 900;
  color: var(--text);
}

.team1-owner-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.team1-owner-card {
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--card-bg-2);
  overflow: hidden;
}

.team1-owner-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.team1-owner-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.team1-owner-pets {
  display: grid;
}

.team1-owner-pet-row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1.2fr 0.7fr 0.7fr;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.team1-owner-pet-row:last-child {
  border-bottom: none;
}

.team1-lookup-list {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--card-bg-2);
  overflow: hidden;
}

.team1-lookup-item {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  min-height: 42px;
  padding: 9px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-align: left;
}

.team1-lookup-item:last-child {
  border-bottom: none;
}

.team1-lookup-item:hover {
  background: var(--hover);
}

.team1-pet-attr-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--card-bg-2);
}

.team1-pet-attr-preview > span:first-child {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 900px) {
  .team1-owner-grid {
    grid-template-columns: 1fr;
  }

  .team1-owner-pet-row {
    grid-template-columns: 1fr;
  }
}
/* [TEAM1-CSS-V4-7-END] */

/* [TEAM1-CSS-V4-9] 홈/페트 정렬 및 속성 수동입력 개선 */
.team1-section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.team1-sort-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.team1-chip-btn {
  border: 1px solid var(--border);
  background: var(--card-bg-2);
  color: var(--text);
  border-radius: 999px;
  min-height: 34px;
  padding: 0 13px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.team1-chip-btn.active,
.team1-chip-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.team1-owner-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.team1-owner-head > div:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.team1-owner-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  text-align: right;
}

.team1-owner-stat {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.team1-owner-pet-row {
  grid-template-columns: 1.2fr 0.55fr 0.7fr 1.1fr 0.65fr 0.65fr;
}

@media (max-width: 900px) {
  .team1-owner-head,
  .team1-owner-meta {
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
  }

  .team1-owner-pet-row {
    grid-template-columns: 1fr;
  }
}
/* [TEAM1-CSS-V4-9-END] */

/* [TEAM1-CSS-V4-10] 적팀 부족 카드 / 비밀번호 변경 / 기타 페트 간소화 */
.team1-enemy-team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.team1-enemy-team-card {
  width: 100%;
  min-height: 128px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card-bg-2);
  color: var(--text);
  padding: 14px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.team1-enemy-team-card:hover,
.team1-enemy-team-card.active {
  background: var(--hover);
  border-color: var(--accent);
}

.team1-enemy-team-card.active {
  box-shadow: 0 0 0 1px rgba(138, 180, 248, 0.35) inset;
}

.team1-enemy-team-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.team1-enemy-team-head strong {
  font-size: 16px;
  font-weight: 900;
}

.team1-enemy-team-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.team1-enemy-team-memo {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  min-height: 20px;
  margin-bottom: 10px;
}

.team1-enemy-chip-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.team1-enemy-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card-bg);
  font-size: 12px;
  font-weight: 800;
}

.team1-enemy-character-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.team1-enemy-character-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card-bg-2);
  padding: 12px;
  min-height: 92px;
}

.team1-enemy-forms {
  margin-top: 16px;
}

.team1-password-panel {
  max-width: 540px;
}

@media (max-width: 1180px) {
  .team1-enemy-team-grid,
  .team1-enemy-character-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .team1-enemy-team-grid,
  .team1-enemy-character-grid {
    grid-template-columns: 1fr;
  }
}
/* [TEAM1-CSS-V4-10-END] */

.team1-log-legend {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: var(--card-bg-2);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.team1-log-legend strong {
  color: var(--text);
}

/* [TEAM1-CSS-V4-14] 홈 적 부족/순성 필터/기타페트 정리 */
.team1-owner-card.wide {
  grid-column: 1 / -1;
}

.team1-filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}

.team1-dashboard-enemy-detail {
  margin-top: 12px;
  box-shadow: none;
}

.team1-lookup-meta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.team1-lookup-meta b {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  font-size: 12px;
}
/* [TEAM1-CSS-V4-14-END] */

/* [TEAM1-CSS-V4-15] 홈 기타페트/하단 여백 정리 */
.team1-owner-pet-row.external-pet {
  grid-template-columns: 1.05fr 1.15fr 0.65fr 0.7fr 1fr 0.65fr 0.65fr;
}

.team1-bottom-space {
  height: 420px;
}

@media (max-width: 900px) {
  .team1-owner-pet-row.external-pet {
    grid-template-columns: 1fr;
  }

  .team1-bottom-space {
    height: 280px;
  }
}
/* [TEAM1-CSS-V4-15-END] */


/* [TEAM1-CSS-V4-16] 카드 접기/캐릭터 목록 간소화 */
.team1-owner-toggle {
  width: 100%;
  border: 0;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.team1-owner-toggle:hover {
  background: var(--hover);
}

.team1-owner-caret {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--accent) !important;
  font-size: 12px;
  font-weight: 900;
}

.team1-owner-card.collapsed .team1-owner-head {
  border-bottom: none;
}

.team1-character-layout {
  grid-template-columns: 320px minmax(0, 1fr);
}

.team1-character-layout .team1-table {
  min-width: 720px;
}

.team1-table th:last-child,
.team1-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 1;
  background: var(--card-bg);
  box-shadow: -8px 0 12px rgba(0, 0, 0, 0.10);
}

.team1-table th:last-child {
  z-index: 2;
  background: var(--card-bg-2);
}

.team1-table tr:hover td:last-child {
  background: var(--hover);
}

.team1-row-actions {
  white-space: nowrap;
}

@media (max-width: 900px) {
  .team1-character-layout {
    grid-template-columns: 1fr;
  }
}
/* [TEAM1-CSS-V4-16-END] */

/* [TEAM1-CSS-V4-17] 홈 전체목록/적팀 DB 레이아웃 조정 시작 */
.team1-enemy-character-full {
  margin-top: 16px;
}

.team1-enemy-character-full .enemy-character-input-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.team1-enemy-character-full .team1-attr-box {
  max-width: 760px;
}

.team1-enemy-character-full .team1-table {
  min-width: 680px;
}

.team1-enemy-bottom-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1.45fr);
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}

.team1-enemy-bottom-layout .team1-table {
  min-width: 620px;
}

@media (max-width: 1180px) {
  .team1-enemy-bottom-layout,
  .team1-enemy-character-full .enemy-character-input-grid {
    grid-template-columns: 1fr;
  }
}
/* [TEAM1-CSS-V4-17-END] */

/* [TEAM1-CSS-V4-18] 홈 적 부족 선택 초기화 / 페트 소유자 필터 / 적팀 캐릭터 입력 UI 시작 */
.team1-panel-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.team1-panel-title-row .team1-panel-title {
  margin-bottom: 0;
}

.team1-owner-filter-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 70%;
}

.team1-enemy-character-editor {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(300px, 0.9fr) minmax(260px, 1fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 14px;
}

.team1-enemy-character-left {
  display: grid;
  gap: 12px;
}

.team1-enemy-character-attr .team1-attr-box {
  margin: 0;
}

.team1-enemy-character-memo .team1-textarea {
  min-height: 220px;
}

@media (max-width: 1100px) {
  .team1-panel-title-row,
  .team1-owner-filter-row {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    max-width: none;
    flex-direction: column;
  }

  .team1-enemy-character-editor {
    grid-template-columns: 1fr;
  }

  .team1-enemy-character-memo .team1-textarea {
    min-height: 140px;
  }
}
/* [TEAM1-CSS-V4-18-END] */

/* [TEAM1-CSS-V4-19] 적팀 DB 선택 초기화 / 입력 박스 정렬 보정 시작 */
.team1-enemy-character-editor {
  grid-template-columns: minmax(260px, 320px) minmax(360px, 420px) minmax(360px, 1fr);
  gap: 18px;
  align-items: stretch;
}

.team1-enemy-character-left,
.team1-enemy-character-attr,
.team1-enemy-character-memo {
  min-width: 0;
}

.team1-enemy-character-left {
  align-content: start;
}

.team1-enemy-character-left .team1-field,
.team1-enemy-character-memo .team1-field {
  width: 100%;
}

.team1-enemy-character-left .team1-input,
.team1-enemy-character-left .team1-select,
.team1-enemy-character-memo .team1-textarea {
  width: 100%;
}

.team1-enemy-character-attr .team1-attr-box {
  width: 100%;
  max-width: none;
  min-height: 224px;
}

.team1-enemy-character-memo .team1-textarea {
  min-height: 224px;
}

.team1-enemy-bottom-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.team1-enemy-bottom-layout > .team1-card {
  min-width: 0;
}

.team1-enemy-bottom-layout .team1-table-wrap {
  width: 100%;
}

.team1-enemy-bottom-layout .team1-table {
  min-width: 0;
}

@media (max-width: 1180px) {
  .team1-enemy-character-editor,
  .team1-enemy-bottom-layout {
    grid-template-columns: 1fr;
  }

  .team1-enemy-character-attr .team1-attr-box,
  .team1-enemy-character-memo .team1-textarea {
    min-height: 160px;
  }
}
/* [TEAM1-CSS-V4-19-END] */

/* [TEAM1-CSS-V4-20] 적팀 DB 카드 정렬/입력 박스 균일화 시작 */
.team1-enemy-character-editor {
  grid-template-columns: minmax(300px, 1fr) minmax(300px, 1fr) minmax(300px, 1fr);
  gap: 16px;
  align-items: stretch;
}

.team1-enemy-character-left,
.team1-enemy-character-attr,
.team1-enemy-character-memo {
  min-width: 0;
  height: 100%;
}

.team1-enemy-character-left,
.team1-enemy-character-memo {
  border: 1px solid var(--border);
  background: var(--card-bg-2);
  border-radius: 16px;
  padding: 14px;
}

.team1-enemy-character-left {
  display: grid;
  gap: 12px;
  align-content: start;
}

.team1-enemy-character-attr .team1-attr-box {
  height: 100%;
  min-height: 252px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.team1-enemy-character-memo .team1-field {
  height: 100%;
}

.team1-enemy-character-memo .team1-textarea {
  min-height: 0;
  height: 100%;
}

.team1-enemy-bottom-layout {
  align-items: start;
}

.team1-enemy-bottom-layout > .team1-card,
.team1-enemy-bottom-layout > .team1-panel {
  margin-top: 0 !important;
}

.team1-enemy-bottom-layout > .team1-panel + .team1-panel,
.team1-enemy-bottom-layout > .team1-card + .team1-card {
  margin-top: 0 !important;
}

.team1-enemy-bottom-layout .team1-panel-title {
  min-height: 28px;
}

@media (max-width: 1180px) {
  .team1-enemy-character-editor,
  .team1-enemy-bottom-layout {
    grid-template-columns: 1fr;
  }

  .team1-enemy-character-attr .team1-attr-box {
    min-height: 0;
  }

  .team1-enemy-character-memo .team1-textarea {
    min-height: 140px;
  }
}
/* [TEAM1-CSS-V4-20-END] */

/* [TEAM1-CSS-V4-21] 적팀 캐릭터 비고 입력칸 높이 보정 시작 */
.team1-enemy-character-memo {
  display: flex;
  flex-direction: column;
}

.team1-enemy-character-memo .team1-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 8px;
}

.team1-enemy-character-memo .team1-textarea {
  flex: 1;
  height: auto;
  min-height: 0;
  resize: vertical;
}

@media (max-width: 1180px) {
  .team1-enemy-character-memo .team1-textarea {
    min-height: 140px;
  }
}
/* [TEAM1-CSS-V4-21-END] 적팀 캐릭터 비고 입력칸 높이 보정 끝 */

/* [TEAM1-CSS-V4-25] 화면 인식 테스트 시작 */
.screen-recognition-grid {
  align-items: start;
}

.screen-recognition-panel {
  min-width: 0;
}

.screen-recognition-controls {
  margin-top: 12px;
}

.team1-segment-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.team1-segment {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card-bg-2);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}

.team1-segment.active {
  border-color: var(--accent);
  background: rgba(138, 180, 248, 0.18);
  color: var(--accent);
}

.screen-recognition-note {
  margin-top: 12px;
}

.team1-screen-preview-wrap {
  position: relative;
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  line-height: 0;
}

.team1-screen-preview-wrap img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.team1-screen-overlay {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
}

.team1-screen-box {
  position: absolute;
  border: 2px solid var(--accent);
  background: rgba(138, 180, 248, 0.10);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.04);
  cursor: move;
  pointer-events: auto;
  min-width: 30px;
  min-height: 18px;
}

.team1-screen-box span {
  position: absolute;
  left: -2px;
  top: -24px;
  min-width: 28px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.team1-screen-box i {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--card-bg);
  cursor: nwse-resize;
  pointer-events: auto;
}

.team1-screen-results {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.team1-screen-result-row {
  display: grid;
  grid-template-columns: 44px 180px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card-bg-2);
}

.team1-screen-result-slot {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  font-weight: 800;
}

.team1-screen-crop-wrap {
  min-height: 48px;
  border-radius: 12px;
  background: #050505;
  border: 1px solid var(--border);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.team1-screen-crop-wrap img {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.team1-screen-result-body {
  min-width: 0;
}

.team1-screen-result-label {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.team1-screen-result-sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 900px) {
  .team1-screen-result-row {
    grid-template-columns: 1fr;
  }

  .team1-screen-crop-wrap {
    width: 100%;
  }
}
/* [TEAM1-CSS-V4-25-END] 화면 인식 테스트 끝 */

/* [V4.26] 화면 인식 박스 드래그 중 텍스트 선택/이미지 끌림 방지 */
body.team1-screen-dragging,
body.team1-screen-dragging * {
  user-select: none !important;
  -webkit-user-select: none !important;
  cursor: grabbing !important;
}

/* [V4.27] 화면 인식 OCR 전처리 결과 표시 */
.team1-screen-result-row {
  grid-template-columns: 44px minmax(220px, 300px) minmax(0, 1fr);
}

.team1-screen-crop-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  min-width: 0;
}

.team1-screen-crop-wrap {
  position: relative;
  min-height: 62px;
  padding-top: 18px;
}

.team1-screen-crop-wrap b {
  position: absolute;
  left: 8px;
  top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
  z-index: 1;
}

@media (max-width: 900px) {
  .team1-screen-result-row {
    grid-template-columns: 1fr;
  }
  .team1-screen-crop-pair {
    grid-template-columns: 1fr;
  }
}

/* [V4.28] 화면 공유 실시간 미리보기 전환 */
.team1-screen-preview-wrap video {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
  background: #000;
}

.live-screen-recognition-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
}

.live-screen-recognition-panel .team1-screen-preview-wrap {
  max-height: 70vh;
  overflow: auto;
}

.team1-screen-crop-pair.single {
  grid-template-columns: 1fr;
}

.team1-screen-crop-pair.single .team1-screen-crop-wrap {
  min-height: 54px;
}

.team1-screen-crop-pair.single .team1-screen-crop-wrap img {
  image-rendering: pixelated;
}

@media (max-width: 1100px) {
  .live-screen-recognition-grid {
    grid-template-columns: 1fr;
  }
}
/* [V4.28-END] 화면 공유 실시간 미리보기 전환 */

/* [V4.29] 화면 인식 슬롯-카드 연결 / 확대 보기 */
.live-screen-recognition-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(390px, 0.75fr);
  align-items: start;
}

.live-screen-recognition-panel {
  grid-row: span 2;
}

.team1-screen-candidate-panel,
.team1-screen-magnifier-panel {
  min-width: 0;
}

.team1-screen-results-panel {
  grid-column: 1 / -1;
}

.team1-screen-candidate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.team1-screen-candidate {
  width: 100%;
  min-height: 132px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card-bg-2);
  color: var(--text);
  padding: 16px 18px;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .1s ease;
}

.team1-screen-candidate:hover,
.team1-screen-candidate.pending {
  border-color: var(--accent);
  background: rgba(138, 180, 248, 0.12);
}

.team1-screen-candidate.assigned {
  opacity: .7;
  border-color: rgba(107, 203, 119, .55);
}

.team1-screen-candidate-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-weight: 900;
  font-size: 24px;
  line-height: 1.35;
}

.team1-screen-candidate-main strong {
  font-size: 24px;
  line-height: 1.35;
}

.team1-screen-candidate-main .team1-attr-badge,
.team1-screen-candidate-main .team1-attr-stack {
  transform: scale(1.2);
  transform-origin: left center;
  margin-right: 6px;
}

.team1-screen-candidate-sub,
.team1-screen-candidate-memo {
  margin-top: 10px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.team1-screen-selection-state {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: var(--card-bg-2);
  color: var(--muted);
  font-size: 13px;
}

.team1-screen-selection-state b {
  color: var(--text);
}

.team1-screen-result-row.selectable {
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.team1-screen-result-row.selectable:hover,
.team1-screen-result-row.selectable.active {
  border-color: var(--accent);
  background: rgba(138, 180, 248, 0.08);
}

.team1-screen-assigned {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.team1-screen-assigned-card {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card-bg);
}

.team1-screen-assigned-card span,
.team1-screen-assigned-card em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.team1-screen-magnifier-box {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #050505;
  overflow: auto;
  min-height: 190px;
  display: grid;
  place-items: center;
}

.team1-screen-magnifier-box img {
  display: block;
  width: 100%;
  max-width: 680px;
  height: auto;
  image-rendering: pixelated;
}

.team1-screen-magnifier-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
  color: var(--muted);
}

.team1-screen-magnifier-meta strong {
  color: var(--accent);
}

@media (max-width: 1180px) {
  .live-screen-recognition-grid {
    grid-template-columns: 1fr;
  }
  .live-screen-recognition-panel,
  .team1-screen-results-panel {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 700px) {
  .team1-screen-candidate-grid {
    grid-template-columns: 1fr;
  }
}
/* [V4.29-END] */


/* [V4.32] 화면 인식 자동 추천 보조 */
.team1-screen-suggest {
  margin-top: 10px;
}

.team1-screen-suggest-title {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.team1-screen-suggest-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.team1-screen-suggest-chip {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.team1-screen-suggest-chip:hover {
  border-color: var(--accent);
  background: rgba(138, 180, 248, 0.08);
}

.team1-screen-suggest-chip strong {
  color: var(--accent);
  font-size: 13px;
}

.team1-screen-suggest-chip span,
.team1-screen-suggest-chip em {
  font-size: 12px;
  color: var(--text);
  font-style: normal;
}

.team1-screen-suggest-chip em {
  color: var(--muted);
}


/* [V4.33] 적팀 기록 분리 / 페트 순성 기록 */
.team1-enemy-comp-pet-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.team1-enemy-comp-pet-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card-bg-2);
}

.team1-speed-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 2px 7px;
  margin-left: 4px;
  border-radius: 999px;
  background: rgba(138, 180, 248, 0.14);
  border: 1px solid rgba(138, 180, 248, 0.35);
  color: var(--accent);
  font-weight: 800;
  font-size: 12px;
  white-space: nowrap;
}

.team1-speed-summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
}

.team1-speed-summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card-bg-2);
  color: var(--text);
  font-size: 13px;
}

.team1-speed-summary-chip b {
  color: var(--accent);
}

@media (max-width: 1200px) {
  .team1-enemy-comp-pet-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .team1-enemy-comp-pet-grid {
    grid-template-columns: 1fr;
  }
}

/* [V4.34] 순성 색상/적팀 기록 분류 */
.team1-speed-pill.speed-low,
.team1-speed-summary-chip.speed-low,
.team1-speed-filter-chip.speed-low {
  --speed-bg: rgba(210, 214, 220, 0.16);
  --speed-border: rgba(210, 214, 220, 0.45);
  --speed-text: #e8edf3;
}
.team1-speed-pill.speed-10,
.team1-speed-summary-chip.speed-10,
.team1-speed-filter-chip.speed-10 {
  --speed-bg: rgba(255, 64, 64, 0.18);
  --speed-border: rgba(255, 64, 64, 0.55);
  --speed-text: #ff5a5a;
}
.team1-speed-pill.speed-11,
.team1-speed-summary-chip.speed-11,
.team1-speed-filter-chip.speed-11 {
  --speed-bg: rgba(255, 106, 38, 0.18);
  --speed-border: rgba(255, 106, 38, 0.55);
  --speed-text: #ff7a35;
}
.team1-speed-pill.speed-12,
.team1-speed-summary-chip.speed-12,
.team1-speed-filter-chip.speed-12 {
  --speed-bg: rgba(255, 154, 26, 0.18);
  --speed-border: rgba(255, 154, 26, 0.55);
  --speed-text: #ffae24;
}
.team1-speed-pill.speed-13,
.team1-speed-summary-chip.speed-13,
.team1-speed-filter-chip.speed-13 {
  --speed-bg: rgba(255, 205, 36, 0.18);
  --speed-border: rgba(255, 205, 36, 0.55);
  --speed-text: #ffd633;
}
.team1-speed-pill.speed-14,
.team1-speed-summary-chip.speed-14,
.team1-speed-filter-chip.speed-14 {
  --speed-bg: rgba(224, 255, 50, 0.18);
  --speed-border: rgba(224, 255, 50, 0.55);
  --speed-text: #e7ff43;
}
.team1-speed-pill.speed-15,
.team1-speed-summary-chip.speed-15,
.team1-speed-filter-chip.speed-15 {
  --speed-bg: rgba(162, 255, 55, 0.18);
  --speed-border: rgba(162, 255, 55, 0.55);
  --speed-text: #b2ff42;
}
.team1-speed-pill.speed-16,
.team1-speed-summary-chip.speed-16,
.team1-speed-filter-chip.speed-16 {
  --speed-bg: rgba(80, 235, 85, 0.18);
  --speed-border: rgba(80, 235, 85, 0.55);
  --speed-text: #5cff63;
}
.team1-speed-pill.speed-17,
.team1-speed-summary-chip.speed-17,
.team1-speed-filter-chip.speed-17 {
  --speed-bg: rgba(25, 225, 120, 0.18);
  --speed-border: rgba(25, 225, 120, 0.55);
  --speed-text: #36f084;
}
.team1-speed-pill.speed-18,
.team1-speed-summary-chip.speed-18,
.team1-speed-filter-chip.speed-18 {
  --speed-bg: rgba(30, 235, 170, 0.18);
  --speed-border: rgba(30, 235, 170, 0.55);
  --speed-text: #39efbd;
}
.team1-speed-pill.speed-19,
.team1-speed-summary-chip.speed-19,
.team1-speed-filter-chip.speed-19 {
  --speed-bg: rgba(45, 238, 210, 0.18);
  --speed-border: rgba(45, 238, 210, 0.55);
  --speed-text: #45f1d7;
}
.team1-speed-pill.speed-20,
.team1-speed-summary-chip.speed-20,
.team1-speed-filter-chip.speed-20 {
  --speed-bg: rgba(100, 245, 245, 0.18);
  --speed-border: rgba(100, 245, 245, 0.55);
  --speed-text: #6ff5f5;
}

.team1-speed-pill[class*="speed-"],
.team1-speed-summary-chip[class*="speed-"],
.team1-speed-filter-chip[class*="speed-"] {
  background: var(--speed-bg, rgba(138, 180, 248, 0.14));
  border-color: var(--speed-border, rgba(138, 180, 248, 0.35));
  color: var(--speed-text, var(--accent));
}

.team1-speed-summary-chip[class*="speed-"] b {
  color: var(--speed-text, var(--accent));
}

.team1-record-filter-block {
  margin: 12px 0;
}

.team1-record-filter-block > strong {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--muted);
}

.team1-enemy-record-team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0 16px;
}

.team1-enemy-record-team-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card-bg-2);
  overflow: hidden;
}

.team1-enemy-record-team-head {
  width: 100%;
  border: 0;
  background: rgba(255,255,255,0.03);
  color: var(--text);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
}

.team1-enemy-record-team-head:hover {
  background: rgba(138, 180, 248, 0.1);
}

.team1-enemy-record-team-head span {
  color: var(--accent);
  font-weight: 800;
}

.team1-enemy-record-mini-list {
  display: flex;
  flex-direction: column;
}

.team1-enemy-record-mini-row {
  display: grid;
  grid-template-columns: 90px 110px minmax(0, 1fr);
  gap: 8px;
  padding: 9px 12px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}

.team1-enemy-record-mini-row span:last-child {
  color: var(--text);
}

@media (max-width: 900px) {
  .team1-enemy-record-team-grid {
    grid-template-columns: 1fr;
  }
  .team1-enemy-record-mini-row {
    grid-template-columns: 1fr;
  }
}


/* [V4.35] 적팀 기록 UI 재정렬: 입력 위 / 기록 아래 */
.team1-enemy-record-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.team1-enemy-record-form-panel,
.team1-enemy-record-list-panel {
  width: 100%;
  min-width: 0;
}

.team1-enemy-record-meta-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.team1-enemy-record-form-panel .team1-enemy-comp-pet-grid {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.team1-enemy-record-form-panel .team1-enemy-comp-pet-card {
  min-width: 0;
}

.team1-enemy-record-form-panel .team1-enemy-comp-pet-card .team1-field + .team1-field {
  margin-top: 10px;
}

.team1-enemy-record-filter-wrap {
  margin-bottom: 12px;
}

.team1-enemy-record-list-panel .team1-table-wrap {
  margin-top: 14px;
}

@media (max-width: 1280px) {
  .team1-enemy-record-form-panel .team1-enemy-comp-pet-grid {
    grid-template-columns: repeat(3, minmax(170px, 1fr));
  }
}

@media (max-width: 900px) {
  .team1-enemy-record-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .team1-enemy-record-form-panel .team1-enemy-comp-pet-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

@media (max-width: 640px) {
  .team1-enemy-record-meta-grid,
  .team1-enemy-record-form-panel .team1-enemy-comp-pet-grid {
    grid-template-columns: 1fr;
  }
}

/* [V4.37] 모의스탯 뼈대 */
.team1-mock-page {
  display: grid;
  gap: 16px;
}

.team1-mock-top-grid {
  display: grid;
  grid-template-columns: minmax(360px, .9fr) minmax(420px, 1.1fr);
  gap: 16px;
  align-items: start;
}

.team1-mock-box {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card-bg-2);
  padding: 16px;
  min-width: 0;
}

.team1-mock-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.team1-mock-stat-control label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.team1-mock-stepper {
  display: grid;
  grid-template-columns: auto auto auto minmax(70px, 1fr) auto auto auto;
  gap: 6px;
  align-items: center;
}

.team1-mock-stepper input {
  text-align: center;
  font-weight: 800;
}

.team1-stat-mini.danger {
  border-color: rgba(255, 91, 91, .6);
  background: rgba(255, 91, 91, .08);
}

.team1-stat-mini.danger strong {
  color: #ff7474;
}

.team1-mock-result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.team1-mock-result-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card-bg);
  padding: 12px;
  min-height: 90px;
}

.team1-mock-result-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.team1-mock-result-card strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
  line-height: 1;
}

.team1-mock-result-card em {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.team1-inline-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.mock-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  margin-top: 12px;
}

.team1-mock-item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.team1-mock-item-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card-bg-2);
  padding: 14px;
  min-width: 0;
}

.team1-mock-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.team1-mock-item-head strong {
  font-size: 16px;
}

.team1-mock-item-head span {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team1-mock-item-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.team1-mock-item-mini-grid label span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 4px;
}

.team1-mock-item-mini-grid input {
  min-height: 34px;
  padding: 7px 8px;
}

@media (max-width: 1100px) {
  .team1-mock-top-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .team1-mock-stat-grid,
  .team1-mock-result-grid,
  .team1-mock-item-mini-grid {
    grid-template-columns: 1fr;
  }
}
/* [V4.37-END] */


/* [V4.39] 모의스탯 UI 정리 */
.team1-mock-point-grid {
  align-items: stretch;
}

.team1-mock-level-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.team1-mock-level-card input {
  width: 100%;
  min-height: 38px;
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 24px;
  font-weight: 900;
  box-shadow: none;
}

.team1-mock-level-card input:focus {
  outline: none;
  box-shadow: none;
}

@media (max-width: 860px) {
  .team1-mock-stepper {
    grid-template-columns: repeat(3, auto) minmax(70px, 1fr);
  }
}

/* [V4.40] 모의스탯 아이템 랜덤 옵션 조정 UI */
.team1-mock-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 12px;
}

.team1-mock-range-summary {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgba(138, 180, 248, .35);
  border-radius: 999px;
  background: rgba(138, 180, 248, .08);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.team1-mock-item-stat-control {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card-bg);
}

.team1-mock-item-stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.team1-mock-item-stat-head span {
  color: var(--text);
  font-weight: 700;
}

.team1-mock-item-stat-head em {
  color: var(--accent);
  font-style: normal;
  font-size: 11px;
  white-space: nowrap;
}

.team1-mock-item-stepper {
  display: grid;
  grid-template-columns: auto auto minmax(56px, 1fr) auto auto;
  gap: 4px;
  align-items: center;
}

.team1-mock-item-stepper input {
  min-width: 0;
  text-align: center;
  padding-left: 6px;
  padding-right: 6px;
}

.team1-mock-item-stepper .team1-mini-btn {
  min-width: 34px;
  padding-left: 6px;
  padding-right: 6px;
}

@media (max-width: 760px) {
  .team1-mock-item-stepper {
    grid-template-columns: auto auto minmax(52px, 1fr) auto auto;
  }
}
/* [V4.40-END] */


/* [V4.42] 모의스탯 버튼/아이템목록 UI 수정 */
.team1-mock-stat-grid {
  grid-template-columns: 1fr;
}

.team1-mock-stepper {
  grid-template-columns: repeat(3, minmax(44px, 52px)) minmax(64px, 1fr) repeat(3, minmax(44px, 52px));
  gap: 5px;
}

.team1-mock-stepper .team1-mini-btn {
  min-width: 0;
  padding-left: 5px;
  padding-right: 5px;
  font-size: 14px;
  white-space: nowrap;
}

.team1-mock-stepper input {
  min-width: 0;
  padding-left: 6px;
  padding-right: 6px;
}

@media (max-width: 1280px) {
  .team1-mock-top-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .team1-mock-stepper {
    grid-template-columns: repeat(3, 1fr);
  }
  .team1-mock-stepper input {
    grid-column: 1 / -1;
    order: -1;
  }
}

/* [V4.43] 모의스탯 아이템 UI/부위별 DB/착용목록 보정 */
.team1-mock-top-grid {
  grid-template-columns: minmax(360px, .82fr) minmax(420px, 1.18fr);
}

.team1-mock-stepper {
  grid-template-columns: minmax(42px, 50px) minmax(42px, 50px) minmax(42px, 50px) minmax(58px, 1fr) minmax(42px, 50px) minmax(42px, 50px) minmax(46px, 54px);
}

.team1-mock-stepper .team1-mini-btn {
  font-size: 13px;
  min-height: 34px;
}

.team1-mock-item-grid {
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  align-items: start;
}

.team1-mock-item-card {
  overflow: hidden;
}

.team1-mock-item-card .team1-inline-grid.compact {
  grid-template-columns: minmax(150px, 1.25fr) minmax(120px, .85fr) minmax(90px, .65fr);
}

.team1-mock-item-mini-grid {
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
}

.team1-mock-item-stat-control {
  padding: 7px;
}

.team1-mock-item-stat-head {
  gap: 4px;
  font-size: 11px;
}

.team1-mock-item-stepper {
  grid-template-columns: minmax(30px, 36px) minmax(30px, 36px) minmax(42px, 1fr) minmax(30px, 36px) minmax(34px, 42px);
  gap: 3px;
}

.team1-mock-item-stepper .team1-mini-btn {
  min-width: 0;
  min-height: 32px;
  padding-left: 4px;
  padding-right: 4px;
  font-size: 12px;
}

.team1-mock-item-stepper input {
  min-height: 32px;
  font-size: 13px;
}

.team1-mock-equipped-list {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.team1-mock-equipped-list h4 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 15px;
}

.team1-mock-equipped-item {
  display: grid;
  grid-template-columns: 76px minmax(110px, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-top: 7px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card-bg);
}

.team1-mock-equipped-item span {
  font-size: 12px;
  color: var(--muted);
}

.team1-mock-equipped-item strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team1-mock-equipped-item em {
  font-style: normal;
  font-weight: 800;
  color: var(--text);
}

.team1-mock-equipped-item small {
  grid-column: 2 / -1;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.team1-mock-equipped-item.weapon {
  border-color: rgba(255, 88, 88, .55);
  background: rgba(255, 88, 88, .08);
}

.team1-mock-equipped-item.armor {
  border-color: rgba(72, 214, 115, .55);
  background: rgba(72, 214, 115, .08);
}

.team1-mock-equipped-item.accessory {
  border-color: rgba(93, 164, 255, .55);
  background: rgba(93, 164, 255, .08);
}

.team1-mock-equipped-item.totem {
  border-color: rgba(255, 211, 78, .6);
  background: rgba(255, 211, 78, .09);
}

.team1-mock-equipped-item.support {
  border-color: rgba(255, 112, 205, .55);
  background: rgba(255, 112, 205, .08);
}

@media (max-width: 1350px) {
  .team1-mock-top-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .team1-mock-item-grid {
    grid-template-columns: 1fr;
  }
  .team1-mock-item-card .team1-inline-grid.compact {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .team1-mock-stepper {
    grid-template-columns: repeat(3, 1fr);
  }
  .team1-mock-stepper input {
    grid-column: 1 / -1;
    order: -1;
  }
  .team1-mock-item-stepper {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .team1-mock-equipped-item {
    grid-template-columns: 1fr auto;
  }
  .team1-mock-equipped-item span,
  .team1-mock-equipped-item small {
    grid-column: 1 / -1;
  }
}

/* [V4.44] 모의스탯 아이템 카드 compact / 가시성 개선 */
.team1-mock-item-grid {
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 12px;
}

.team1-mock-item-card {
  padding: 14px !important;
}

.team1-mock-item-card .team1-inline-grid.compact {
  grid-template-columns: minmax(130px, 1fr) minmax(105px, .72fr) minmax(92px, .56fr);
  gap: 8px;
}

.team1-mock-item-head {
  margin-bottom: 10px;
}

.team1-mock-item-mini-grid {
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 7px;
}

.team1-mock-item-stat-control {
  padding: 7px;
  border-radius: 11px;
}

.team1-mock-item-stat-head {
  min-height: 28px;
  gap: 3px;
}

.team1-mock-item-stepper.one-step,
.team1-mock-enhance-stepper {
  display: grid;
  grid-template-columns: 38px minmax(42px, 1fr) 38px;
  gap: 4px;
  align-items: center;
}

.team1-mock-item-stepper.one-step .team1-mini-btn,
.team1-mock-enhance-stepper .team1-mini-btn {
  min-width: 0;
  min-height: 30px;
  padding: 0 4px;
  font-size: 12px;
}

.team1-mock-item-value {
  min-height: 30px !important;
  padding: 0 6px !important;
  text-align: center;
  font-weight: 900;
  color: #fff !important;
  background: rgba(138, 180, 248, .16) !important;
  border-color: rgba(138, 180, 248, .55) !important;
}

.team1-mock-item-actions {
  gap: 6px;
  margin: 9px 0;
}

.team1-mock-range-summary,
.team1-mock-current-summary {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(138, 180, 248, .45);
  background: rgba(138, 180, 248, .08);
  color: var(--text);
  font-size: 12px;
  line-height: 1.25;
}

.team1-mock-current-summary {
  border-color: rgba(107, 203, 119, .5);
  background: rgba(107, 203, 119, .08);
}

@media (max-width: 980px) {
  .team1-mock-item-card .team1-inline-grid.compact {
    grid-template-columns: 1fr;
  }
}

/* [V4.45] 모의스탯 아이템 보너스 / 컴팩트 UI */
.team1-mock-item-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
  gap: 10px !important;
}

.team1-mock-item-card {
  padding: 10px !important;
  border-radius: 14px !important;
}

.team1-mock-item-card .team1-inline-grid.compact {
  grid-template-columns: minmax(120px, 1fr) minmax(92px, .7fr) minmax(82px, .55fr) !important;
  gap: 6px !important;
}

.team1-mock-item-mini-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 6px !important;
}

.team1-mock-item-stat-control {
  padding: 6px !important;
  min-width: 0;
}

.team1-mock-item-stat-head {
  min-height: 24px !important;
}

.team1-mock-item-stat-head span {
  font-size: 12px !important;
}

.team1-mock-item-stat-head em {
  font-size: 11px !important;
}

.team1-mock-item-stepper.one-step,
.team1-mock-enhance-stepper,
.team1-mock-bonus-stepper {
  display: grid;
  grid-template-columns: 32px minmax(38px, 1fr) 32px;
  gap: 3px;
  align-items: center;
}

.team1-mock-item-stepper.one-step .team1-mini-btn,
.team1-mock-enhance-stepper .team1-mini-btn,
.team1-mock-bonus-stepper .team1-mini-btn {
  min-width: 0 !important;
  min-height: 28px !important;
  padding: 0 2px !important;
  font-size: 11px !important;
}

.team1-mock-item-value {
  min-height: 28px !important;
  padding: 0 4px !important;
}

.team1-mock-item-actions {
  gap: 5px !important;
  margin: 7px 0 !important;
}

.team1-mock-range-summary,
.team1-mock-current-summary {
  min-height: 24px !important;
  padding: 3px 7px !important;
  font-size: 11px !important;
}

.team1-mock-extra-box {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.team1-mock-extra-row {
  display: grid;
  grid-template-columns: minmax(74px, .7fr) minmax(105px, 1fr) auto;
  gap: 6px;
  align-items: center;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}

.team1-mock-extra-row.revival {
  grid-template-columns: minmax(82px, .7fr) auto minmax(105px, 1fr) auto;
}

.team1-mock-extra-row > span {
  white-space: nowrap;
}

.team1-mock-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text);
  font-weight: 800;
  white-space: nowrap;
}

.team1-mock-check input {
  accent-color: var(--accent);
}

@media (max-width: 980px) {
  .team1-mock-item-card .team1-inline-grid.compact,
  .team1-mock-extra-row,
  .team1-mock-extra-row.revival {
    grid-template-columns: 1fr !important;
  }
  .team1-mock-item-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 560px) {
  .team1-mock-item-mini-grid {
    grid-template-columns: 1fr !important;
  }
}

/* [V4.47] 모의스탯 아이템 UI 보정 */
.team1-mock-save-actions {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-left: auto;
}

.team1-mock-item-card .team1-mock-item-top-row {
  grid-template-columns: minmax(0, 1fr) 112px !important;
  gap: 8px !important;
}

.team1-mock-item-mini-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 6px !important;
}

.team1-mock-item-stat-control {
  min-width: 0 !important;
  padding: 6px !important;
}

.team1-mock-item-stat-head {
  min-height: 22px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 4px !important;
}

.team1-mock-item-stat-head span {
  white-space: nowrap !important;
  font-size: 12px !important;
  line-height: 1 !important;
}

.team1-mock-item-stat-head em {
  white-space: nowrap !important;
  font-size: 10px !important;
  line-height: 1 !important;
  color: var(--accent) !important;
}

.team1-mock-item-stepper.one-step,
.team1-mock-enhance-stepper,
.team1-mock-bonus-stepper {
  grid-template-columns: 28px minmax(32px, 1fr) 28px !important;
  gap: 3px !important;
}

.team1-mock-item-stepper.one-step .team1-mini-btn,
.team1-mock-enhance-stepper .team1-mini-btn,
.team1-mock-bonus-stepper .team1-mini-btn {
  min-height: 28px !important;
  padding: 0 !important;
  font-size: 11px !important;
}

.team1-mock-item-value {
  min-width: 0 !important;
  min-height: 28px !important;
  padding: 0 3px !important;
  color: #68ff9a !important;
  background: rgba(56, 161, 105, .22) !important;
  border-color: rgba(76, 211, 117, .65) !important;
  font-weight: 900 !important;
}

.team1-mock-current-summary {
  color: #68ff9a !important;
  border-color: rgba(76, 211, 117, .65) !important;
  background: rgba(56, 161, 105, .16) !important;
  font-weight: 900 !important;
}

.team1-mock-item-actions {
  align-items: center !important;
}

@media (max-width: 1180px) {
  .team1-mock-item-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 560px) {
  .team1-mock-item-card .team1-mock-item-top-row,
  .team1-mock-item-mini-grid {
    grid-template-columns: 1fr !important;
  }
}

/* [V4.49] 페트 검색 환생/진화 표시 */
.team1-form-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  margin-right: 4px;
}
.team1-form-badge.rebirth {
  border-color: rgba(255, 184, 77, .75);
  background: rgba(255, 184, 77, .14);
  color: #ffb84d;
}
.team1-form-badge.evolve {
  border-color: rgba(89, 196, 255, .75);
  background: rgba(89, 196, 255, .14);
  color: #59c4ff;
}
.team1-lookup-source {
  color: var(--muted);
  font-size: 11px;
  margin-right: 4px;
}

/* V4.58 경기 기록 */
.team1-match-page{display:grid;gap:16px;}
.team1-match-lineup-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.team1-match-lineup-block{border:1px solid rgba(255,255,255,.12);border-radius:14px;padding:12px;background:rgba(255,255,255,.035);}
.team1-match-lineup-block h3,.team1-match-turn-panel h3{margin:0 0 10px;font-size:15px;color:#eaf3ff;}
.team1-match-slot-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;}
.team1-match-turn-panel{border:1px solid rgba(255,255,255,.12);border-radius:14px;padding:12px;background:rgba(255,255,255,.035);}
.team1-match-turn-head,.team1-match-turn-row{display:grid;grid-template-columns:64px repeat(3,minmax(0,1fr));gap:8px;align-items:stretch;}
.team1-match-turn-head{font-size:12px;color:#9fb0c8;margin-bottom:6px;padding:0 4px;}
.team1-match-turn-row{margin-top:6px;}
.team1-turn-no{display:flex;align-items:center;justify-content:center;border:1px solid rgba(255,255,255,.12);border-radius:10px;background:rgba(0,0,0,.18);font-weight:700;color:#dbeafe;}
.team1-textarea.compact{min-height:54px;height:54px;resize:vertical;}
.team1-match-card-list{display:grid;gap:10px;}
.team1-match-card{border:1px solid rgba(255,255,255,.12);border-radius:14px;padding:12px;background:rgba(255,255,255,.04);cursor:pointer;transition:border-color .15s,background .15s;}
.team1-match-card:hover,.team1-match-card.open{border-color:rgba(96,165,250,.55);background:rgba(96,165,250,.08);}
.team1-match-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;}
.team1-match-card-head strong{display:block;color:#f8fafc;}
.team1-match-card-head span{display:block;margin-top:4px;color:#a7b7cf;font-size:13px;}
.team1-match-summary-line{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px;color:#dbeafe;font-size:13px;}
.team1-match-detail{margin-top:12px;border-top:1px solid rgba(255,255,255,.12);padding-top:12px;display:grid;gap:8px;}
.team1-match-detail-line{display:grid;grid-template-columns:120px 1fr;gap:8px;color:#dbeafe;font-size:13px;}
.team1-match-detail-line strong,.team1-match-detail-memo strong{color:#f8fafc;}
.team1-match-detail-memo{border-radius:10px;background:rgba(0,0,0,.16);padding:10px;color:#dbeafe;font-size:13px;}
.team1-match-detail-turns{display:grid;gap:8px;}
.team1-match-detail-turn{border-radius:10px;background:rgba(0,0,0,.16);padding:10px;color:#dbeafe;font-size:13px;display:grid;gap:4px;}
@media (max-width: 1100px){.team1-match-lineup-grid{grid-template-columns:1fr}.team1-match-slot-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.team1-match-turn-head,.team1-match-turn-row{grid-template-columns:1fr}.team1-match-summary-line{grid-template-columns:1fr}.team1-match-detail-line{grid-template-columns:1fr}}

.team1-match-pet-speed-hint{margin-top:4px;font-size:12px;color:#9fb0c8;display:flex;align-items:center;gap:4px;}
