@charset "UTF-8";
@import url("https://fonts.googleapis.com/css2?family=Mrs+Saint+Delafield&display=swap");
:root {
  --bg:#202022;
  --panel:#2b2b2e;
  --lane:#171718;
  --cell:rgba(0, 0, 0, 0.25);
  --cell-alt:#242427;
  --cell-border:#3a3a3f;
  --txt:#e8e8ea;
  --muted:#a5a6aa;
  --red:#960000;
  --blue:#000596;
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
}

article {
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100%;
}

.wrap {
  flex: 1;
  width: 100%;
  max-width: 1238px;
  margin: 0 auto;
  padding: 32px 24px;
}
@media (max-width: 768px) {
  .wrap {
    padding: 24px;
  }
}

.sec-head {
  align-items: flex-start;
  justify-content: space-between;
  display: flex;
  margin-bottom: 64px;
}
@media (max-width: 768px) {
  .sec-head {
    flex-direction: column;
    gap: 24px;
    margin-bottom: 40px;
  }
}
.sec-head h1 {
  font-size: 40px;
  font-weight: 300;
  letter-spacing: 0.08em;
  margin: 0 0 8px;
}
@media (max-width: 768px) {
  .sec-head h1 {
    font-size: 24px;
  }
}
.sec-head .sub {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
@media (max-width: 540px) {
  .sec-head .sub {
    font-size: 12px;
  }
}

/* コントロール */
.controls {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
@media (min-width: 769px) {
  .controls {
    height: 47px;
  }
}
@media (max-width: 768px) {
  .controls {
    gap: 12px;
    justify-content: space-between;
    width: 100%;
  }
}
.controls .label {
  font-size: 16px;
  font-weight: 700;
}
.controls .rounds {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}

.btn {
  background: var(--cell);
  border: none;
  color: var(--txt);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn.small {
  height: 32px;
  min-width: 32px;
}
.btn.active {
  background: #fff;
  color: #000;
}
.btn.reset {
  margin-left: 16px;
  background: none;
  padding: 0 16px;
  font-weight: 400;
}
@media (max-width: 768px) {
  .btn.reset {
    margin-left: auto;
  }
}

.editable {
  display: inline-block;
  min-width: 64px;
  padding: 2px 6px;
  outline: none;
  border: 1px solid transparent;
}
.editable:focus {
  background: #fff;
  color: #000;
  border-color: #000;
}
@media (max-width: 768px) {
  .editable {
    text-align: center;
  }
}

.judge {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin: 64px 0 0;
}
@media (max-width: 540px) {
  .judge {
    margin-top: 32px;
  }
}
.judge-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 12px;
  font-weight: 600;
  width: fit-content;
  position: relative;
  padding-right: 8px;
}
.judge-inner:after {
  content: "";
  display: block;
  position: absolute;
  width: 100%;
  height: 0.5px;
  bottom: 12px;
  left: 0;
  background-color: #fff;
  opacity: 0.5;
}
.judge-name {
  font-family: "Mrs Saint Delafield", cursive;
  font-size: 32px;
  font-weight: 400;
  letter-spacing: 0.08em;
}
@media (max-width: 768px) {
  .judge-name {
    font-size: 28px;
  }
}

/* ---------- 横長テーブル（デスクトップ/タブレット） ---------- */
.grid {
  width: calc(100% + 8px);
  margin: -4px;
  min-width: 900px;
  border-collapse: separate;
  border-spacing: 4px;
}
.grid th, .grid td {
  text-align: center;
  padding: 0;
  height: 68px;
  min-width: 56px;
}
.grid th {
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  height: auto;
}
.grid th.sticky {
  min-width: 180px;
  width: 200px;
  text-align: left;
  padding: 0 12px;
  background: rgba(0, 0, 0, 0.5);
}
.grid th.sticky.red {
  border-left: 4px solid var(--red);
}
.grid th.sticky.blue {
  border-left: 4px solid var(--blue);
}
.grid .name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 20px;
  font-weight: 700;
}
.grid .corner {
  width: 34px;
  height: 4px;
  border-radius: 2px;
}
.grid td {
  background: var(--cell);
  font-size: 32px;
  font-weight: 400;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.12s ease, box-shadow 0.12s ease;
}
.grid td.total {
  background: #fff;
  font-size: 36px;
  font-weight: 900;
  color: var(--bg);
  width: 110px;
}
.grid td.current-round {
  background: rgba(0, 0, 0, 0.5) !important;
}
.grid td.enabled:hover {
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.8) !important;
}
.grid td.enabled:active {
  background: #46464b !important;
}
.grid td.enabled:hover:empty::after {
  content: "10";
  color: rgba(255, 255, 255, 0.15);
}
.grid td.capped {
  background: rgba(255, 255, 255, 0.06);
  color: transparent;
  pointer-events: none;
  position: relative;
}
.grid td.capped::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to left bottom, transparent calc(50% - 1px), var(--bg) calc(50% - 0.5px), var(--bg) calc(50% + 0.5px), transparent calc(50% + 1px), transparent);
  background-repeat: no-repeat;
}
.grid td.disabled {
  position: relative;
  color: #777;
  cursor: not-allowed;
  pointer-events: none;
  background: #171718;
}
.grid .round-head {
  color: transparent;
  padding-bottom: 4px;
}
.grid .round-head.enabled, .grid .round-head.total {
  color: #fff;
}
.grid .round-head.current-round div {
  background: #ffffff;
  color: var(--bg);
}
.grid .total {
  width: 110px;
}

/* ---------- 縦3ブロック（モバイル） ---------- */
.board {
  width: 100%;
  gap: 0;
}

.col {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 2 1 0;
  min-width: 0;
}
.col .col-header {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  height: 40px;
  background: #2e2e31;
  color: #fff;
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.5);
}
.col .col-header.red {
  border-top: 4px solid var(--red);
}
.col .col-header.blue {
  border-top: 4px solid var(--blue);
}
.col.rounds {
  flex: 1;
}
.col.rounds .col-header {
  background: transparent;
}
.col.rounds .row {
  background: transparent;
  color: #fff;
  font-weight: 700;
}
.col.rounds .row.current {
  background: #fff;
  color: #000;
}
.col.rounds .row.capped {
  display: none;
}
.col .rows {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}
.col .row {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--cell);
  height: 42px;
}
.col .row.total {
  background: #fff;
  color: var(--bg);
  font-weight: 800;
  font-size: 32px;
  height: 56px;
}
.col .row.total .label {
  font-size: 14px;
}
.col .row.enabled.current .cell {
  background: var(--cell);
}
.col .row.enabled .cell:active {
  background: #46464b !important;
}
.col .row.enabled.empty .cell::after {
  content: "10";
  color: rgba(255, 255, 255, 0.22);
}
.col .row.capped {
  display: none;
}
.col .cell {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 400;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.12s ease, box-shadow 0.12s ease;
}

/* 表示切替：デスクトップ/タブレットはテーブル、モバイルは縦 */
@media (min-width: 789px) {
  .is-sp {
    display: none;
  }
}
@media (max-width: 768px) {
  .is-pc {
    display: none;
  }
}
.view-pc {
  display: block;
}

.view-sp {
  display: none;
}

@media (max-width: 768px) {
  .view-pc {
    display: none;
  }
  .view-sp {
    display: flex;
  }
}
/* タッチ環境でのプレースホルダ常時表示（空白セル） */
@media (hover: none) and (pointer: coarse) {
  .row.enabled.empty .cell::after {
    content: "10";
    color: rgba(255, 255, 255, 0.22);
  }
}
/* ===== Effects ===== */
@keyframes fxFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes fxFlashBg {
  0% {
    background: #ffffff;
  }
  100% {
    background: var(--cell);
  } /* PC: td / SP: .cell どちらもベース色に戻す */
}
/* PC（横長テーブル）：td に付与する */
.grid td.fx-fade-in {
  animation: fxFadeIn 0.25s ease both;
}

.grid td.fx-flash {
  animation: fxFlashBg 0.36s ease-out;
}

/* モバイル（3ブロック）：.cell に付与する */
.col .cell.fx-fade-in {
  animation: fxFadeIn 0.25s ease both;
}

.col .cell.fx-flash {
  animation: fxFlashBg 0.36s ease-out;
}

/* ユーザーが低減動作を選択している場合は無効化 */
@media (prefers-reduced-motion: reduce) {
  .fx-fade-in, .fx-flash {
    animation: none !important;
  }
}
footer {
  text-align: center;
  padding: 24px;
}
footer .copy {
  font-size: 10px;
  letter-spacing: 0.08em;
}

/*# sourceMappingURL=style.css.map */
