:root {
  --blue: #1667d9;
  --header-blue: #0089eb;
  --red: #ff0707;
  --line: #d3d3d3;
  --text: #202226;
  --pale-yellow: #fff2a6;
  --disabled: #dcdcdc;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  width: 100vw;
  min-height: 850px;
  overflow-x: hidden;
  font-family: "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro",
    "メイリオ", Meiryo, sans-serif;
  color: #222;
  background: #3f3f3f;
}

.race-tool {
  position: fixed;
  left: 12px;
  top: 12px;
  bottom: auto;
  z-index: 20;
  width: 260px;
  max-height: calc(100vh - 24px);
  display: flex;
  flex-direction: column;
  border: 1px solid #cfcfcf;
  border-radius: 8px;
  background: #fff;
  color: #222;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  font-size: 13px;
  line-height: 1.45;
}

.race-tool summary {
  padding: 9px 12px;
  color: var(--blue);
  font-weight: 700;
  cursor: pointer;
}

.race-tool-form {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
  overflow-y: auto;
}

.race-tool label {
  display: grid;
  gap: 3px;
}

.race-tool input,
.race-tool select,
.race-tool button {
  width: 100%;
  min-height: 32px;
  border: 1px solid #bfc7d1;
  border-radius: 4px;
  padding: 4px 8px;
  background: #fff;
  color: #222;
  font-size: 13px;
}

.time-select {
  display: flex;
  align-items: center;
  gap: 4px;
}

.time-select select {
  flex: 1;
  min-width: 0;
  width: auto;
}

.time-sep {
  font-weight: 700;
  color: #555;
}

.battery-range {
  display: flex;
  align-items: center;
  gap: 8px;
}

.battery-range input[type="range"] {
  flex: 1;
  min-height: 0;
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
}

.battery-range input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: #bfc7d1;
  border-radius: 2px;
}

.battery-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--blue);
  margin-top: -6px;
  cursor: pointer;
}

.battery-range input[type="range"]::-moz-range-track {
  height: 4px;
  background: #bfc7d1;
  border-radius: 2px;
}

.battery-range input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 50%;
  background: var(--blue);
  cursor: pointer;
}

#batteryValue {
  flex-shrink: 0;
  width: 36px;
  font-size: 12px;
  color: #555;
  text-align: right;
}

.race-tool button {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.race-tool button:disabled {
  border-color: #bcbcbc;
  background: #dcdcdc;
  color: #777;
  cursor: wait;
}

.race-tool-status {
  min-height: 18px;
  margin: 0;
  color: #555;
}

.race-tool-status.is-error {
  color: #c30000;
}

.page {
  width: 775px;
  min-height: 1700px;
  position: absolute;
  top: 0;
  left: 50%;
  margin-left: -387.5px;
  transform: scale(0.5);
  transform-origin: top center;
  overflow: hidden;
  background: #565656;
}

.x {
  width: 43px;
  height: 43px;
  margin: 0 auto 4px;
  position: relative;
}

.x::before,
.x::after {
  content: "";
  position: absolute;
  left: 20px;
  top: -2px;
  width: 4px;
  height: 49px;
  background: currentColor;
  transform: rotate(45deg);
}

.x::after {
  transform: rotate(-45deg);
}

.overlay {
  position: absolute;
  inset: 0;
  background: url('bg.png') top center / 100% auto no-repeat;
  padding-top: 110px;
}

.iphone-status {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 93px;
  padding: 0 56px;
  background-color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  font-size: 30px;
  font-weight: 600;
  color: #fff;
}

.iphone-status .icons {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.battery-svg {
  flex-shrink: 0;
}

.battery-fill {
  transition: width 0.2s;
}

.modal {
  width: 738px;
  height: 1380.954px;
  margin: 0 auto 50px;
  background: #fff;
  border-radius: 20.8px;
  overflow-y: auto;
  box-shadow: 0 24px 30px 0 #00000040;
}

.modal-header {
  position: relative;
  height: 104px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 4px solid var(--blue);
}

.modal-title {
  margin: 0;
  color: var(--blue);
  font-size: 37.44px;
  font-weight: 700;
  line-height: 54.9244px;
}

.modal-close {
  position: absolute;
  right: 0;
  top: 0;
  width: 104px;
  height: 103.984px;
  border: 0;
  padding: 62.4px 20.8px 20.8px;
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-size: 20.8px;
  line-height: 20.8px;
  text-align: center;
}

.modal-close .x {
  position: absolute;
  top: 20.8px;
  left: 50%;
  width: 31.6222px;
  height: 31.6222px;
  margin: 0 0 0 -15.8111px;
}

.modal-close .x::before,
.modal-close .x::after {
  left: 14px;
  top: -5px;
  width: 4px;
  height: 42px;
}

.inner {
  padding: 0 20.8px;
}

.hit-message {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 91.5px;
  margin: 20.8px 0;
  color: var(--blue);
  font-size: 31.2px;
  font-weight: 700;
  line-height: 45.7704px;
  text-align: center;
}

.hit-message span {
  display: block;
}

.confetti {
  display: block;
  width: 104.88px;
  height: 82.88px;
  flex: 0 0 auto;
  margin: 0 12.48px 0 -72.8px;
}

.top-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 33px;
  align-items: start;
  height: 124.78px;
  margin: 0 31px;
}

button,
input {
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.nav-btn {
  width: 100%;
  height: 83.18px;
  border: 2px solid var(--blue);
  border-radius: 10.4px;
  background: #fff;
  color: var(--blue);
  font-size: 31px;
  font-weight: 400;
}

.race-title {
  height: 72.8px;
  display: grid;
  place-items: center;
  background: var(--header-blue);
  color: #fff;
  font-size: 31.2px;
  font-weight: 700;
}

.players {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 20.8px;
}

.player {
  height: 86.32px;
  display: grid;
  grid-template-columns: 41.6px 1fr;
  align-items: center;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: #fff;
  font-size: 29.12px;
  font-weight: 700;
}

.player:nth-child(3n) {
  border-right: 0;
}

.lane {
  width: 41.6px;
  height: 86.32px;
  display: grid;
  place-items: center;
  font-size: 29.12px;
  font-weight: 700;
  color: #222;
}

.lane-1 { background: #f2f2f2; color: #222; }
.lane-2 { background: #333333; color: #fff; }
.lane-3 { background: #f26161; color: #fff; }
.lane-4 { background: #498ef5; color: #fff; }
.lane-5 { background: #fae34b; color: #222; }
.lane-6 { background: #2db36b; color: #fff; }

.player {
  position: relative;
}

.player input {
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  padding: 1px 10px 0 10px;
  color: #242424;
  background: transparent;
  font-size: 29.12px;
  font-weight: 700;
  text-align: center;
}

.player[data-gender="female"]::before {
  content: "";
  position: absolute;
  left: 46px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 24px;
  background-image: url('heart.svg');
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  z-index: 10;
  pointer-events: none;
}

.total {
  display: grid;
  grid-template-columns: 1fr auto;
  row-gap: 10px;
  align-items: baseline;
  height: 145.312px;
  margin: 20.8px 0;
  padding: 20.8px;
  background: var(--pale-yellow);
  font-size: 27.04px;
  line-height: 1.25;
}

.total dt,
.total dd {
  margin: 0;
}

.total dd {
  text-align: right;
  font-size: 35.36px;
  font-weight: 700;
  white-space: nowrap;
}

.amount-field {
  display: inline-block;
  width: 240px;
  max-width: calc(100% - 1em);
  border: 0;
  padding: 0;
  color: var(--red);
  background: transparent;
  font-size: 35.36px;
  font-weight: 700;
  line-height: 1;
  text-align: right;
}

.yen,
.unit {
  font-size: 35.36px;
  font-weight: 400;
  color: #191919;
}

.breakdown {
  height: 179.234px;
  margin: 0;
  border: 2px solid var(--line);
  padding: 10.4px 20.8px 14.56px;
}

.breakdown-grid {
  display: block;
  font-size: 0;
}

.breakdown-grid dt,
.breakdown-grid dd {
  margin: 0;
}

.breakdown-grid dt {
  display: inline-block;
  width: 50%;
  height: 49.9062px;
  padding: 4.16px 10.4px 0;
  font-size: 27.04px;
  font-weight: 400;
  line-height: 39.6676px;
  vertical-align: top;
}

.breakdown-grid dd {
  display: inline-block;
  width: 50%;
  height: 49.9062px;
  padding: 0 10.4px;
  text-align: right;
  font-size: 35.36px;
  font-weight: 400;
  line-height: 51.8732px;
  vertical-align: baseline;
  white-space: nowrap;
}

.highlight {
  background: var(--pale-yellow);
}

.breakdown-grid .highlight-value {
  background: var(--pale-yellow);
  color: var(--red);
  font-size: 35.36px;
}

.small-amount {
  width: calc(100% - 1em);
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  text-align: right;
}

.refund-breakdown {
  width: calc(100% - 1em);
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--red);
  font-size: inherit;
  line-height: 51.8732px;
  text-align: right;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20.8px;
}

nav[aria-label="ページ送り"] {
  height: 241.266px;
  padding: 20.8px 0;
}

.pager-btn,
.page-number {
  border: 0;
  border-radius: 10.4px;
  height: 89px;
  display: grid;
  place-items: center;
  font-size: 31.2px;
  font-weight: 700;
}

.pager-btn {
  width: 135px;
  background: var(--disabled);
  color: #b1b1b1;
  position: relative;
}

.pager-btn.prev {
  background-image: url("arrow_pager_prev_disabled.830c1b25a21a7c2bc657a05987489e88.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 30px;
}

.pager-btn.next {
  background-image: url("arrow_pager_next_disabled.35a4c9f5655df3208fef0867202bf0e6.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 30px;
}

.page-number {
  width: 90px;
  background: var(--blue);
  color: #fff;
}

.jump {
  display: grid;
  grid-template-columns: 135px 61px 139px;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 20.8px;
}

.jump input {
  height: 89px;
  border: 2px solid var(--blue);
  border-radius: 10.4px;
  padding: 0 12px;
  font-size: 32px;
  text-align: right;
}

.jump span {
  color: var(--blue);
  font-size: 29.12px;
  font-weight: 500;
}

.jump button {
  height: 92px;
  border: 0;
  border-radius: 10.4px;
  background: var(--disabled);
  color: #b8b8b8;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.22);
  font-size: 27.04px;
  font-weight: 700;
}

.footer-btn {
  width: 241px;
  height: 83.18px;
  display: block;
  margin: 20.8px auto 58.24px;
  border: 2px solid var(--blue);
  border-radius: 10.4px;
  background: #fff;
  color: var(--blue);
  font-size: 31.2px;
}

@media (min-width: 776px) {
  body {
    display: flex;
    justify-content: center;
  }
}


/* 1レース目/2レース目入力欄 */
.race-block-label {
  margin-top: 4px;
  padding: 7px 8px;
  border-radius: 5px;
  background: #eef5ff;
  color: #155eb8;
  font-weight: 700;
}
.race-block-label span {
  margin-left: 4px;
  color: #65717f;
  font-size: 11px;
  font-weight: 400;
}
#purchaseAmountTool[readonly] {
  background: #f4f6f8;
  font-weight: 700;
}
