/* The sheet has one scroll owner per page and one home for each control. */
#phone-tactics-dialog {
  height: min(620px, 94cqh);
  max-height: 94cqh;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid #60789a;
  background: #11203a;
  color: #f4eddd;
}
#phone-tactics-dialog .tactics-sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex: none;
  padding: 13px 15px;
  background: #162946;
  border-bottom: 1px solid #526a8b;
}
#phone-tactics-dialog .tactics-sheet-header h2 {
  font-size: var(--ui-heading, 20px);
  line-height: 1.15;
  margin: 3px 0 0;
  font-weight: 700;
  letter-spacing: -0.025em;
}
#phone-tactics-dialog .tactics-sheet-header > .game-button {
  width: auto;
  min-width: 62px;
  min-height: 44px;
  padding: 8px 12px;
  font-size: var(--type-body);
  background: #254376;
  border: 1px solid #748db1;
  color: #f4eddd;
}
.tactics-match-score {
  display: flex;
  align-items: baseline;
  gap: 9px;
  font-size: var(--type-title);
  font-weight: 800;
  line-height: 1;
  color: #f0d38a;
  font-variant-numeric: tabular-nums;
}
.tactics-match-score > span {
  font-size: var(--type-caption);
  font-weight: 600;
  color: #b7c8de;
}
#phone-tactics-dialog .phone-tactics-body {
  display: flex;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: #11203a;
}
.match-tactics-pages {
  flex: 1;
  height: 100%;
  width: 100%;
  min-height: 0;
}
.match-tactics-pages > .page-tab-label {
  min-height: 44px;
  font-size: var(--type-caption);
  line-height: 1.2;
  border-color: #496080;
  background: #182d4d;
  color: #bdcce0;
  padding: 8px 4px;
}
.match-tactics-pages > .page-tab-input:checked + .page-tab-label {
  background: #2b4c86;
  color: #f5d58e;
  border-color: #a7a6a1;
  box-shadow: inset 0 -3px #e4c577;
}
.match-tactics-pages > .page-tabs-panels > .page-panel {
  padding: 14px;
  scroll-padding: 12px;
  background: #11203a;
}
.tactics-block {
  margin: 0 0 17px;
  min-width: 0;
}
.tactics-block:last-child {
  margin-bottom: 0;
}
.tactics-block > header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 9px;
}
.tactics-block > header h3 {
  font-size: var(--ui-section-heading, 16px);
  font-weight: 700;
  line-height: 1.2;
  color: #f0e9d9;
  margin: 0;
}
.tactics-block > header > span {
  font-size: var(--type-caption);
  line-height: 1.3;
  color: #a8bdd6;
  text-align: right;
}
.tactics-plan-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
#phone-tactics-dialog .tactics-plan-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 100px;
  padding: 12px 6px;
  border-radius: 3px;
  white-space: normal;
  text-align: center;
  overflow-wrap: normal;
  word-break: normal;
}
.tactics-plan-choice > strong {
  font-size: var(--type-caption);
  line-height: 1.35;
  font-weight: 700;
  white-space: normal;
}
.tactics-plan-choice > small {
  font-size: var(--type-caption);
  line-height: 1.3;
  color: #b4c8e1;
  white-space: normal;
}
#phone-tactics-dialog .tactics-choice {
  border: 1px solid #637da1;
  background: #213b66;
  color: #e7edf5;
  box-shadow: none;
  text-transform: none;
  min-width: 0;
  white-space: normal;
}
#phone-tactics-dialog .tactics-choice[aria-pressed='true'] {
  background: #2c4d87;
  border-color: #e3c981;
  color: #ffe4a1;
  box-shadow: inset 0 -3px #dfc478;
}
#phone-tactics-dialog .tactics-choice:disabled {
  background: #233147;
  border-color: #4f617c;
  color: #8499b4;
  opacity: 1;
}
.tactics-segment {
  display: grid;
  grid-template-columns: repeat(var(--choice-count, 3), minmax(0, 1fr));
  gap: 6px;
}
#phone-tactics-dialog .tactics-segment > .game-button {
  min-width: 0;
  min-height: 48px;
  padding: 9px 5px;
  font-size: var(--type-caption);
  line-height: 1.2;
}
.tactics-field-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
#phone-tactics-dialog .tactics-field-choices > .game-button {
  min-height: 75px;
  padding: 10px 7px;
  font-size: var(--type-caption);
  line-height: 1.35;
}
#phone-tactics-dialog .tactics-reset {
  width: 100%;
  min-height: 44px;
  margin-top: 10px;
  padding: 9px 12px;
  background: #1c3458;
  border: 1px solid #607ba1;
  color: #d7e2f1;
  font-size: var(--type-caption);
}
#phone-tactics-dialog .tactics-control-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 70px;
  padding: 12px;
  margin: 0 0 9px;
  background: #1b345b;
  border: 1px solid #637da1;
  color: #e9eef5;
  text-align: left;
  white-space: normal;
}
.tactics-control-card > span {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.tactics-control-card strong {
  font-size: var(--type-body);
  line-height: 1.2;
  font-weight: 700;
}
.tactics-control-card small {
  display: block;
  font-size: var(--type-caption);
  line-height: 1.3;
  color: #b1c5df;
  white-space: normal;
  overflow-wrap: anywhere;
}
.tactics-control-card > svg {
  flex: none;
  color: #f0d38a;
}
#phone-tactics-dialog .tactics-control-card:disabled {
  background: #233147;
  border-color: #4f617c;
  color: #91a4bd;
  opacity: 1;
}
.tactics-impact > .impact-player-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px;
  min-height: 64px;
  margin: 0;
  background: #1b345b;
  border: 1px solid #637da1;
  color: #e9eef5;
  text-align: left;
}
.tactics-impact .impact-player-entry strong {
  font-size: var(--type-body);
  line-height: 1.2;
}
.tactics-impact .impact-player-entry small {
  display: none;
}
.tactics-impact .impact-player-entry > span:last-child {
  font-size: var(--type-caption);
  color: #f0d38a;
}
.tactics-target-list {
  display: grid;
  gap: 5px;
}
.tactics-target-list > label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 53px;
  padding: 8px 10px;
  background: #192f50;
  border: 1px solid #496487;
  font-size: var(--type-caption);
  cursor: pointer;
}
.tactics-target-list input {
  appearance: auto;
  flex: none;
  width: 20px;
  height: 20px;
  min-height: 0;
  accent-color: #e3c879;
}
.tactics-target-list > label > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.tactics-target-list strong {
  font-size: var(--type-caption);
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.tactics-target-list small {
  font-size: var(--type-caption);
  color: #a8bdd6;
  line-height: 1.3;
}
#phone-tactics-dialog .tactics-batting-pair {
  display: grid;
  gap: 12px;
}
#phone-tactics-dialog .batting-manager {
  padding: 11px;
  background: #182d4d;
  border: 1px solid #496487;
  margin: 0;
}
#phone-tactics-dialog .batting-manager-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
#phone-tactics-dialog .batting-manager-header > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}
#phone-tactics-dialog .batting-manager-header strong {
  font-size: var(--type-body);
  line-height: 1.2;
  overflow-wrap: anywhere;
}
#phone-tactics-dialog .batting-manager-header small {
  font-size: var(--type-caption);
  color: #b1c5df;
}
#phone-tactics-dialog .batting-manager .batter-identity {
  display: none;
}
#phone-tactics-dialog .batting-intent {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  margin: 10px 0 0;
}
#phone-tactics-dialog .batting-intent > .game-button {
  font-size: var(--type-caption);
  line-height: 1.2;
  white-space: normal;
  min-width: 0;
  min-height: 44px;
  padding: 5px 2px;
  background: #213b66;
  border: 1px solid #637da1;
  color: #e7edf5;
}
#phone-tactics-dialog .batting-intent > [aria-pressed='true'] {
  background: #2c4d87;
  color: #ffe4a1;
  border-color: #e3c981;
}
#phone-tactics-dialog .tactics-playback .playback-controls {
  display: grid;
  gap: 10px;
  padding: 0;
  border: 0;
  margin: 0;
  background: none;
  position: static;
  width: 100%;
  max-width: none;
}
#phone-tactics-dialog .tactics-playback .match-speed {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0;
}
.tactics-playback .match-speed > span {
  font-size: var(--type-caption);
  color: #b7c8de;
}
.tactics-playback .match-speed > div {
  display: grid;
  grid-template-columns: repeat(3, 48px);
  gap: 5px;
}
#phone-tactics-dialog .tactics-playback .game-button {
  min-height: 44px;
  padding: 8px;
  background: #213b66;
  border: 1px solid #637da1;
  color: #e7edf5;
  font-size: var(--type-caption);
  min-width: 0;
}
#phone-tactics-dialog .tactics-playback [aria-pressed='true'] {
  background: #2c4d87;
  color: #ffe4a1;
  border-color: #e3c981;
}
#phone-tactics-dialog .tactics-playback [data-action='sim'] {
  width: 100%;
}
@container game (max-width:380px) {
  .match-tactics-pages > .page-tabs-panels > .page-panel {
    padding: 12px;
  }
  .tactics-plan-choices,
  .tactics-field-choices {
    gap: 5px;
  }
  #phone-tactics-dialog .tactics-plan-choice {
    padding-inline: 5px;
    min-height: 104px;
  }
  .tactics-plan-choice > strong {
    font-size: var(--type-caption);
  }
  #phone-tactics-dialog .tactics-field-choices > .game-button {
    padding-inline: 5px;
    font-size: var(--type-caption);
  }
}
@media (max-height: 460px) {
  #phone-tactics-dialog {
    height: 94cqh;
    max-height: 94cqh;
  }
  .match-tactics-pages > .page-tabs-panels > .page-panel {
    padding: 10px 14px;
  }
  #phone-tactics-dialog .tactics-plan-choice {
    min-height: 82px;
  }
  #phone-tactics-dialog .tactics-sheet-header {
    padding: 8px 13px;
  }
  #phone-tactics-dialog .tactics-sheet-header h2 {
    font-size: var(--type-name);
  }
  .tactics-match-score {
    font-size: var(--type-name);
  }
}
