:root {
  color-scheme: dark;
  --blue: #375a7f;
  --indigo: #6610f2;
  --purple: #6f42c1;
  --pink: #e83e8c;
  --red: #e74c3c;
  --orange: #fd7e14;
  --yellow: #f39c12;
  --green: #00ffcc;
  --teal: #20c997;
  --cyan: #3498db;
  --black: #000;
  --white: #fff;
  --gray: #888;
  --gray-dark: #303030;
  --gray-100: #f8f9fa;
  --gray-200: #ebebeb;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #888;
  --gray-700: #444;
  --gray-800: #303030;
  --gray-900: #222;
  --primary: #375a7f;
  --secondary: #444;
  --success: #00bc8c;
  --info: #3498db;
  --warning: #f39c12;
  --danger: #e74c3c;
  --light: #adb5bd;
  --dark: #303030;
  --primary-rgb: 55, 90, 127;
  --secondary-rgb: 68, 68, 68;
  --success-rgb: 0, 188, 140;
  --info-rgb: 52, 152, 219;
  --warning-rgb: 243, 156, 18;
  --danger-rgb: 231, 76, 60;
  --light-rgb: 173, 181, 189;
  --dark-rgb: 48, 48, 48;
  --primary-text-emphasis: #162433;
  --secondary-text-emphasis: #1b1b1b;
  --success-text-emphasis: #004b38;
  --info-text-emphasis: #153d58;
  --warning-text-emphasis: #613e07;
  --danger-text-emphasis: #5c1e18;
  --light-text-emphasis: #444;
  --dark-text-emphasis: #444;
  --primary-bg-subtle: #d7dee5;
  --secondary-bg-subtle: #dadada;
  --success-bg-subtle: #ccf2e8;
  --info-bg-subtle: #d6eaf8;
  --warning-bg-subtle: #fdebd0;
  --danger-bg-subtle: #fadbd8;
  --light-bg-subtle: #fcfcfd;
  --dark-bg-subtle: #ced4da;
  --primary-border-subtle: #afbdcc;
  --secondary-border-subtle: #b4b4b4;
  --success-border-subtle: #99e4d1;
  --info-border-subtle: #aed6f1;
  --warning-border-subtle: #fad7a0;
  --danger-border-subtle: #f5b7b1;
  --light-border-subtle: #ebebeb;
  --dark-border-subtle: #adb5bd;
  --white-rgb: 255, 255, 255;
  --black-rgb: 0, 0, 0;
  --font-sans-serif: Lato, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  --font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --font-num: "Playball", "Courier New", monospace;
  --gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
  --body-font-family: var(--font-sans-serif);
  --body-font-size: 1rem;
  --body-font-weight: 400;
  --body-line-height: 1.5;
  --body-color: #fff;
  --body-color-rgb: 255, 255, 255;
  --emphasis-color: #000;
  --emphasis-color-rgb: 0, 0, 0;
  --secondary-color: rgba(255, 255, 255, 0.75);
  --secondary-color-rgb: 255, 255, 255;
  --secondary-bg: #ebebeb;
  --secondary-bg-rgb: 235, 235, 235;
  --tertiary-color: rgba(255, 255, 255, 0.5);
  --tertiary-color-rgb: 255, 255, 255;
  --tertiary-bg: #f8f9fa;
  --tertiary-bg-rgb: 248, 249, 250;
  --link-color: #00bc8c;
  --link-color-rgb: 0, 188, 140;
  --link-decoration: underline;
  --link-hover-color: #009670;
  --link-hover-color-rgb: 0, 150, 112;
  --code-color: #e83e8c;
  --highlight-color: #fff;
  --highlight-bg: #fdebd0;
  --border-width: 1px;
  --border-style: solid;
  --border-color: #dee2e6;
  --border-color-translucent: rgba(0, 0, 0, 0.175);
  --border-radius: 0.375rem;
  --border-radius-sm: 0.25rem;
  --border-radius-lg: 0.5rem;
  --border-radius-xl: 1rem;
  --border-radius-xxl: 2rem;
  --border-radius-2xl: var(--border-radius-xxl);
  --border-radius-pill: 50rem;
  --box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --box-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
  --box-shadow-inset: inset 0 1px 2px rgba(0, 0, 0, 0.075);
  --focus-ring-width: 0.25rem;
  --focus-ring-opacity: 0.25;
  --focus-ring-color: rgba(55, 90, 127, 0.25);
  --form-valid-color: #00bc8c;
  --form-valid-border-color: #00bc8c;
  --form-invalid-color: #e74c3c;
  --form-invalid-border-color: #e74c3c;
  --body-color: #dee2e6;
  --body-color-rgb: 222, 226, 230;
  --body-bg: #222;
  --body-bg-rgb: 34, 34, 34;
  --emphasis-color: #fff;
  --emphasis-color-rgb: 255, 255, 255;
  --secondary-color: rgba(222, 226, 230, 0.75);
  --secondary-color-rgb: 222, 226, 230;
  --secondary-bg: #303030;
  --secondary-bg-rgb: 48, 48, 48;
  --tertiary-color: rgba(222, 226, 230, 0.5);
  --tertiary-color-rgb: 222, 226, 230;
  --tertiary-bg: #292929;
  --tertiary-bg-rgb: 41, 41, 41;
  --primary-text-emphasis: #879cb2;
  --secondary-text-emphasis: #8f8f8f;
  --success-text-emphasis: #66d7ba;
  --info-text-emphasis: #85c1e9;
  --warning-text-emphasis: #f8c471;
  --danger-text-emphasis: #f1948a;
  --light-text-emphasis: #f8f9fa;
  --dark-text-emphasis: #dee2e6;
  --primary-bg-subtle: #0b1219;
  --secondary-bg-subtle: #0e0e0e;
  --success-bg-subtle: #00261c;
  --info-bg-subtle: #0a1e2c;
  --warning-bg-subtle: #311f04;
  --danger-bg-subtle: #2e0f0c;
  --light-bg-subtle: #303030;
  --dark-bg-subtle: #181818;
  --primary-border-subtle: #21364c;
  --secondary-border-subtle: #292929;
  --success-border-subtle: #007154;
  --info-border-subtle: #1f5b83;
  --warning-border-subtle: #925e0b;
  --danger-border-subtle: #8b2e24;
  --light-border-subtle: #444;
  --dark-border-subtle: #303030;
  --heading-color: inherit;
  --link-color: #879cb2;
  --link-hover-color: #9fb0c1;
  --link-color-rgb: 135, 156, 178;
  --link-hover-color-rgb: 159, 176, 193;
  --code-color: #f18bba;
  --highlight-color: #dee2e6;
  --highlight-bg: #613e07;
  --border-color: #444;
  --border-color-translucent: rgba(255, 255, 255, 0.15);
  --form-valid-color: #66d7ba;
  --form-valid-border-color: #66d7ba;
  --form-invalid-color: #f1948a;
  --form-invalid-border-color: #f1948a;
}
.category {
  --list-group-color: #fff;
  --list-group-bg: #303030;
  --list-group-border-color: #444;
  --list-group-border-width: var(--border-width);
  --list-group-border-radius: var(--border-radius);
  --list-group-item-padding-x: 1rem;
  --list-group-item-padding-y: 0.5rem;
  --list-group-action-color: var(--secondary-color);
  --list-group-action-hover-color: #fff;
  --list-group-action-hover-bg: #444;
  --list-group-action-active-color: var(--body-color);
  --list-group-action-active-bg: #222;
  --list-group-disabled-color: var(--secondary-color);
  --list-group-disabled-bg: #303030;
  --list-group-active-color: #fff;
  --list-group-active-bg: #375a7f;
  --list-group-active-border-color: #375a7f;
}
* {
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
}
.app {
  max-width: 1280px;
  margin: 0 auto;
}
.inputArea {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  gap: 16px;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  margin-bottom: 16px;
  padding: 18px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.25);
  -webkit-box-shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
          box-shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
}
.enemyInputBlock {
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: 7em 14px 7em;
  grid-template-columns: 7em 7em;
  gap: 6px 14px;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
}
.enemyInputItem {
  display: contents;
}
.enemyInputItem label {
  -ms-grid-row: 1;
  grid-row: 1;
  color: #cbd5e1;
  text-align: center;
}
.enemyInputItem input {
  -ms-grid-row: 2;
  grid-row: 2;
}
.enemyInputBlock input,
.allyInputRow input {
  padding: 0.45em 0.65em;
  font-size: 1em;
  color: #f8fafc;
  background: #020617;
  border: 1px solid #334155;
  border-radius: 8px;
  outline: none;
}
.enemyInputBlock input,
.allySpeed {
  width: 7em;
  text-align: center;
  font-family: 'Playball', cursive;
  letter-spacing: 1px;
}
.allyName {
  width: 12em;
}
.enemyInputBlock input:focus,
.allyInputRow input:focus {
  border-color: #38bdf8;
  -webkit-box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
          box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}
.resetButton {
  padding: 0.45em 1.5em;
  font-size: 0.9em;
  line-height: 1.2;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid #475569;
  border-radius: 8px;
  cursor: pointer;
}
.resetButton:hover {
  color: #f8fafc;
  background: rgba(51, 65, 85, 0.92);
  border-color: #64748b;
}
.resetButton:focus {
  outline: none;
  border-color: #38bdf8;
  -webkit-box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
          box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}
.allyInputList {
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: 12em 10px 7em 10px 5em;
  grid-template-columns: 12em 7em 5em;
  gap: 8px 10px;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
}
.allyInputHeader,
.allyInputRow {
  display: contents;
}
.allyInputHeader div {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  min-height: 28px;
  padding: 0 0.65em 0.35em;
  color: #cbd5e1;
  text-align: center;
  border-bottom: 1px solid rgba(148, 163, 184, 0.32);
}
.allyInputHeader div.small {
  font-size: 10px;
  line-height: 1;
  color: #94a3b8;
}
.allyDiff {
  padding: 0.45em 0.65em;
  color: #cbd5e1;
  text-align: center;
  background: rgba(15, 23, 42, 0.72);
  border-radius: 8px;
  font-family: 'Playball', cursive;
  letter-spacing: 1px;
}
.note {
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.7;
  color: #94a3b8;
}
.errorMessage {
  color: #fca5a5;
}
.tableWrap {
  --fixedCol1Width: 3.5rem;
  --fixedCol2Width: 4.75ex;
  overflow: auto;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.32);
  -webkit-box-shadow: 0 20px 45px rgba(0, 0, 0, 0.32);
          box-shadow: 0 20px 45px rgba(0, 0, 0, 0.32);
  cursor: -webkit-grab;
  cursor: grab;
}
.tableWrap.isDragging {
  cursor: -webkit-grabbing;
  cursor: grabbing;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
}
table {
  border-collapse: separate;
  border-spacing: 0;
  width: -webkit-max-content;
  width: -moz-max-content;
  width: max-content;
  font-size: 11px;
}
th,
td {
  border-right: 1px solid rgba(148, 163, 184, 0.22);
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  padding: 1px 2px;
  text-align: center;
  white-space: nowrap;
}
td {
  font-family: 'Playball', cursive;
  letter-spacing: 1px;
  width: 4.75ex;
  min-width: 4.75ex;
  max-width: 4.75ex;
  background: rgba(15, 23, 42, 0.78);
}
th {
  z-index: 5;
  position: sticky;
  top: 0;
  width: 4.75ex;
  min-width: 4.75ex;
  max-width: 4.75ex;
  height: auto;
  padding: 3px 2px;
  background: #112b44;
  color: #eff6ff;
  vertical-align: middle;
  font-weight: normal;
  line-height: 1.05;
}
thead tr:first-child th {
  line-height: 1.1;
  font-style: italic;
}
.enemyElapsedHead,
.enemyGroupHead {
  color: #fc3;
}
thead tr:first-child th:nth-child(1),
tbody td:nth-child(1) {
  position: sticky;
  left: 0;
  width: var(--fixedCol1Width);
  min-width: var(--fixedCol1Width);
  max-width: var(--fixedCol1Width);
  z-index: 4;
  font-size: 0.8em;
}
thead tr:first-child th:nth-child(2),
thead tr:nth-child(2) th:nth-child(1),
thead tr:nth-child(3) th:nth-child(1),
tbody td:nth-child(2) {
  position: sticky;
  left: var(--fixedCol1Width);
  width: var(--fixedCol2Width);
  min-width: var(--fixedCol2Width);
  max-width: var(--fixedCol2Width);
  z-index: 4;
}
thead tr:first-child th:nth-child(1),
thead tr:first-child th:nth-child(2),
thead tr:nth-child(2) th:nth-child(1),
thead tr:nth-child(3) th:nth-child(1) {
  z-index: 8;
  background: #112b44;
}
table * {
  text-shadow: 1px 1px 1px #000;
}
.longSoundMark {
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  width: 1em;
  height: 1em;
  line-height: 1;
  white-space: nowrap;
  -webkit-transform: rotate(90deg);
          transform: rotate(90deg);
  -webkit-transform-origin: center;
          transform-origin: center;
  position: relative;
  left: 0.02em;
}
.turnRestHead {
  color: #eff6ff;
}
.allySpeedHead,
.enemySpeedHead {
  line-height: 1.5em;
  font-family: 'Playball', cursive;
  letter-spacing: 1px;
  text-shadow: 1px 1px 1px #000;
}
.allySpeedHead {
  color: rgba(99, 255, 255, 0.99);
}
.enemySpeedHead {
  color: #fc3;
}
tbody td.turnMod1 {
  background: rgba(99, 23, 42, 0.4);
}
tbody td.turnMod2 {
  background: rgba(151, 65, 85, 0.4);
}
tbody td.turnMod0 {
  background: rgba(30, 41, 59, 0.4);
}
tbody td.turnMod1:nth-child(1),
tbody td.turnMod1:nth-child(2) {
  background: #31172a;
}
tbody td.turnMod2:nth-child(1),
tbody td.turnMod2:nth-child(2) {
  background: #45283b;
}
tbody td.turnMod0:nth-child(1),
tbody td.turnMod0:nth-child(2) {
  background: #151e31;
}
tbody tr:hover td {
  background: rgba(71, 85, 105, 0.92);
}
tbody tr:hover td:nth-child(1),
tbody tr:hover td:nth-child(2) {
  background: #475569;
}
.enemyElapsedCell {
  color: rgba(254, 215, 170, 0.7);
  font-size: 0.9em;
}
.enemyCell {
  color: #fbbf24;
}
.allyTurnCell {
  position: relative;
  color: rgba(99, 255, 255, 0.99);
}
.allyTurnCell span {
  font-family: 'Playball', cursive;
  letter-spacing: 1px;
}
.turnCount {
  display: block;
  position: relative;
  z-index: 1;
}
.turnSameMark {
  color: rgba(255, 255, 255, 0.5);
  text-shadow: 1px 1px 1px #000;
}
.turnDelta {
  position: absolute;
  top: -0.3em;
  right: -0.75em;
  z-index: 2;
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  min-width: 1.2em;
  height: 1.2em;
  padding: 2px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.72em;
  line-height: 1;
  letter-spacing: 0;
  color: #fff;
  background: rgba(222, 0, 100, 0.7);
  border-radius: 999px;
  pointer-events: none;
}
.allyRestCell {
  color: rgba(252, 165, 165, 0.42);
  font-size: 0.85em;
}
@media (max-width: 760px) {
  body {
    padding: 14px;
  }
  .enemyInputBlock {
    -ms-grid-columns: 1fr 1fr;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
  .enemyInputBlock input {
    width: 100%;
  }
  .allyInputList {
    -ms-grid-columns: minmax(10em, 1fr) 7em 5em;
    grid-template-columns: minmax(10em, 1fr) 7em 5em;
    width: 100%;
  }
  .allyName,
  .allySpeed {
    width: 100%;
  }
}
@media (max-width: 430px) {
  body {
    padding: 8px;
  }
  h1 {
    margin-bottom: 12px;
    font-size: 18px;
  }
  .inputArea {
    gap: 10px;
    padding: 10px 8px;
  }
  .allyInputList {
    -ms-grid-columns: 8.5em 5px 4.6em 5px 3.8em;
    grid-template-columns: 8.5em 4.6em 3.8em;
    gap: 5px 5px;
    width: auto;
    max-width: 100%;
  }
  .allyInputHeader div {
    min-height: 20px;
    padding: 0 0.25em 0.25em;
    font-size: 11px;
    line-height: 1.1;
  }
  .allyInputHeader div.small {
    font-size: 9px;
  }
  .allyInputRow input,
  .enemyInputBlock input {
    padding: 0.36em 0.4em;
    font-size: 14px;
    border-radius: 6px;
  }
  .allyName {
    width: 8.5em;
  }
  .allySpeed {
    width: 4.6em;
  }
  .allyDiff {
    width: 3.8em;
    padding: 0.36em 0.25em;
    font-size: 14px;
    border-radius: 6px;
  }
  .enemyInputBlock {
    -ms-grid-columns: 6em 8px 6em;
    grid-template-columns: 6em 6em;
    gap: 5px 8px;
    width: auto;
  }
  .enemyInputItem label {
    font-size: 11px;
    line-height: 1.15;
  }
  .enemyInputBlock input {
    width: 6em;
  }
  .resetButton {
    padding: 0.38em 1.2em;
    font-size: 12px;
    border-radius: 6px;
  }
  .note {
    margin-bottom: 8px;
    font-size: 11px;
    line-height: 1.5;
  }
}
@media (max-width: 360px) {
  body {
    padding: 6px;
  }
  .inputArea {
    padding: 8px 5px;
  }
  .allyInputList {
    -ms-grid-columns: 8em 4px 4.1em 4px 3.4em;
    grid-template-columns: 8em 4.1em 3.4em;
    gap: 4px 4px;
  }
  .allyInputHeader div {
    font-size: 10px;
  }
  .allyInputHeader div.small {
    font-size: 8px;
  }
  .allyName {
    width: 8em;
  }
  .allySpeed {
    width: 4.1em;
  }
  .allyDiff {
    width: 3.4em;
  }
  .enemyInputBlock {
    -ms-grid-columns: 5.5em 6px 5.5em;
    grid-template-columns: 5.5em 5.5em;
    gap: 5px 6px;
  }
  .enemyInputBlock input {
    width: 5.5em;
  }
  .enemyInputItem label {
    font-size: 10px;
  }
}
.turnHead {
  color: rgba(99, 255, 255, 0.99);
  font-style: italic;
}
.enemyTurnHead {
  color: #fc3;
}
.note {
  font-size: 0.85em;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 1px 1px 1px #000;
}
