* {
  box-sizing: border-box;
}

html {
  min-width: 280px;
  background: #eef3fb;
}

body {
  margin: 0;
  color: #17233c;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 203, 77, .22), transparent 24rem),
    radial-gradient(circle at 88% 28%, rgba(47, 111, 237, .13), transparent 28rem),
    #eef3fb;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

button,
input,
select {
  font: inherit;
}

button,
label,
select {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button,
select,
input[type="radio"] {
  cursor: pointer;
}

button:disabled,
select:disabled,
input:disabled {
  cursor: not-allowed;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: .5rem;
  left: .5rem;
  padding: .7rem 1rem;
  color: #fff;
  background: #17233c;
  border-radius: .65rem;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.game-app {
  width: 100%;
  min-height: 100vh;
  padding-bottom: 3rem;
}

.game-header {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
}

.brand-mark {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  min-width: 7.25rem;
  height: 2.75rem;
  padding: .35rem .55rem;
  border: 1px solid rgba(23, 35, 60, .12);
  border-radius: 2rem;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 8px 24px rgba(23, 35, 60, .08);
}

.brand-disc {
  display: inline-block;
  width: 1.45rem;
  height: 1.45rem;
  margin: 0 .08rem;
  border: 3px solid rgba(23, 35, 60, .18);
  border-radius: 50%;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .08);
}

.brand-disc-red {
  background: #e43d4f;
}

.brand-disc-yellow {
  background: #ffd447;
}

.language-control {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
}

.language-control label {
  margin-right: .6rem;
  color: #46536a;
  font-weight: 700;
}

.language-control select {
  min-height: 44px;
  padding: .55rem 2rem .55rem .75rem;
  color: #17233c;
  border: 1px solid #cbd5e1;
  border-radius: .7rem;
  background: #fff;
}

.game-main {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.intro-panel {
  padding: 3.2rem 0 2.25rem;
  text-align: center;
}

.eyebrow,
.section-number,
.status-label {
  margin: 0 0 .45rem;
  color: #2459be;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1 {
  margin: 0;
  color: #17233c;
  font-size: 3.4rem;
  line-height: 1.05;
  letter-spacing: -.045em;
}

h2 {
  margin: 0;
  color: #17233c;
  font-size: 1.6rem;
  line-height: 1.2;
  letter-spacing: -.02em;
}

h3 {
  margin: 0 0 .45rem;
  font-size: 1.05rem;
}

.game-intro {
  max-width: 42rem;
  margin: 1rem auto 0;
  color: #46536a;
  font-size: 1.12rem;
}

.setup-panel,
.play-panel,
.rules-panel {
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  border: 1px solid #d7e0ed;
  border-radius: 1.35rem;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 18px 45px rgba(23, 35, 60, .08);
}

.section-heading,
.play-topbar {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: flex-start;
  align-items: flex-start;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  margin-bottom: 1.35rem;
}

.setup-note {
  max-width: 26rem;
  margin: .2rem 0 0 1.5rem;
  color: #5b687c;
  text-align: right;
}

.setup-fields {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  margin: -.45rem;
}

.choice-group {
  -webkit-flex: 1 1 18rem;
  flex: 1 1 18rem;
  min-width: 0;
  margin: .45rem;
  padding: 1rem;
  border: 1px solid #dce3ee;
  border-radius: 1rem;
  background: #f8faff;
}

.choice-group legend {
  padding: 0 .25rem;
  color: #263551;
  font-weight: 800;
}

.choice-group.is-disabled {
  opacity: .55;
}

.segmented-control {
  display: -webkit-flex;
  display: flex;
  width: 100%;
  margin-top: .25rem;
}

.segment {
  position: relative;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  -webkit-flex: 1 1 0;
  flex: 1 1 0;
  min-width: 0;
  min-height: 48px;
  margin-right: .45rem;
  padding: .55rem .65rem;
  color: #344258;
  border: 1px solid #cbd5e1;
  border-radius: .75rem;
  background: #fff;
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.segment:last-child {
  margin-right: 0;
}

.segment input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: .01;
}

.segment.is-selected {
  color: #163d8f;
  border-color: #2f6fed;
  background: #eaf1ff;
  box-shadow: inset 0 0 0 1px #2f6fed;
}

.segment.is-disabled {
  cursor: not-allowed;
}

.field-help {
  min-height: 2.7rem;
  margin: .65rem 0 0;
  color: #5b687c;
  font-size: .88rem;
}

.primary-button,
.secondary-button,
.text-button,
.column-button {
  min-height: 44px;
  border-radius: .75rem;
  font-weight: 800;
}

.primary-button {
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  min-width: 11rem;
  margin-top: 1.2rem;
  padding: .72rem 1.1rem;
  color: #fff;
  border: 1px solid #2459be;
  background: #2f6fed;
  box-shadow: 0 8px 18px rgba(47, 111, 237, .25);
}

.primary-button:hover {
  background: #2459be;
}

.button-icon {
  margin-right: .55rem;
}

.round-actions {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  margin-left: 1rem;
}

.secondary-button {
  padding: .6rem .9rem;
  color: #24416f;
  border: 1px solid #b8c6da;
  background: #fff;
}

.secondary-button span:first-child {
  margin-right: .35rem;
}

.text-button {
  margin-left: .5rem;
  padding: .55rem .65rem;
  color: #2459be;
  border: 1px solid transparent;
  background: transparent;
}

.secondary-button:hover,
.text-button:hover {
  background: #edf3ff;
}

.scoreboard {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  max-width: 38rem;
  margin: 0 auto 1rem;
  padding: .8rem;
  border: 1px solid #dce3ee;
  border-radius: 1rem;
  background: #f8faff;
}

.score-card {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-flex: 1 1 0;
  flex: 1 1 0;
  min-width: 0;
}

.player-two-score {
  -webkit-justify-content: flex-end;
  justify-content: flex-end;
}

.score-disc {
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
  width: 1.5rem;
  height: 1.5rem;
  margin-right: .55rem;
  border: 2px solid rgba(23, 35, 60, .2);
  border-radius: 50%;
}

.red-disc {
  background: #e43d4f;
}

.yellow-disc {
  background: #ffd447;
}

.score-name {
  overflow: hidden;
  color: #344258;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-value {
  margin-left: .65rem;
  color: #17233c;
  font-size: 1.6rem;
}

.score-divider {
  margin: 0 1rem;
  color: #8793a5;
}

.status-box {
  max-width: 42rem;
  min-height: 6.8rem;
  margin: 0 auto 1rem;
  padding: .8rem 1rem;
  border-left: 4px solid #2f6fed;
  border-radius: .8rem;
  background: #eef4ff;
  text-align: center;
}

.status-label {
  margin-bottom: .2rem;
}

.game-status,
.result-status {
  margin: 0;
}

.game-status {
  color: #233756;
  font-size: 1.08rem;
  font-weight: 800;
}

.result-status {
  min-height: 1.55rem;
  color: #8a321e;
  font-weight: 800;
}

.board-wrap {
  width: 100%;
  max-width: 650px;
  margin: 0 auto;
}

.column-controls {
  display: -webkit-flex;
  display: flex;
  width: 100%;
  padding: 0 .45rem;
}

.column-button {
  display: block;
  -webkit-flex: 1 1 0;
  flex: 1 1 0;
  min-width: 0;
  margin: 0 .16rem .4rem;
  padding: .35rem .1rem;
  color: #17408d;
  border: 1px solid #aabbd6;
  background: #fff;
  font-size: 1rem;
  line-height: 1;
}

.column-button:hover,
.column-button:active {
  color: #fff;
  background: #2f6fed;
}

.column-button:disabled {
  color: #8a96a8;
  border-color: #d5dce6;
  background: #eef1f5;
  opacity: .68;
}

.column-arrow {
  display: block;
  margin-bottom: .1rem;
  font-size: 1.1rem;
}

.column-number {
  display: block;
  font-size: .74rem;
  font-weight: 800;
}

.board-frame {
  width: 100%;
  padding: .65rem;
  border: .28rem solid #163f91;
  border-radius: 1.25rem;
  background: #2f6fed;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, .14),
    0 16px 28px rgba(28, 65, 139, .22);
}

.board-grid {
  width: 100%;
}

.board-row {
  display: -webkit-flex;
  display: flex;
  width: 100%;
}

.board-cell {
  position: relative;
  width: 14.2857%;
  height: 0;
  padding-top: 14.2857%;
}

.disc {
  position: absolute;
  top: 7%;
  right: 7%;
  bottom: 7%;
  left: 7%;
  border: 3px solid #143778;
  border-radius: 50%;
  background: #edf2fa;
  box-shadow:
    inset 0 4px 8px rgba(23, 35, 60, .18),
    0 2px 0 rgba(255, 255, 255, .2);
}

.disc.player-one {
  border-color: #9d1f32;
  background: #e43d4f;
  box-shadow: inset 0 -6px 0 rgba(113, 15, 32, .18);
}

.disc.player-two {
  border-color: #b98200;
  background: #ffd447;
  box-shadow: inset 0 -6px 0 rgba(160, 107, 0, .16);
}

.disc.player-two:before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32%;
  height: 32%;
  border: 2px solid rgba(91, 61, 0, .58);
  border-radius: 50%;
  content: "";
  transform: translate(-50%, -50%);
}

.disc.last-move:after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 26%;
  height: 26%;
  border: 2px solid #17233c;
  border-radius: 50%;
  content: "";
  transform: translate(-50%, -50%);
}

.disc.winning-disc {
  border-color: #fff;
  box-shadow: 0 0 0 4px #805300, inset 0 -6px 0 rgba(0, 0, 0, .14);
}

.board-hint {
  max-width: 42rem;
  margin: .9rem auto 0;
  color: #5b687c;
  text-align: center;
}

.history-panel {
  max-width: 42rem;
  margin: 1.35rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid #dce3ee;
}

.move-history {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  margin: .5rem -.2rem 0;
  padding: 0;
  list-style: none;
}

.move-history li {
  margin: .2rem;
  padding: .36rem .55rem;
  color: #344258;
  border: 1px solid #d5deeb;
  border-radius: 2rem;
  background: #f8faff;
  font-size: .83rem;
}

.move-history .empty-history {
  border-style: dashed;
  color: #667386;
}

.rules-panel {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: stretch;
  align-items: stretch;
}

.rules-copy {
  -webkit-flex: 1 1 60%;
  flex: 1 1 60%;
  min-width: 0;
  padding-right: 2rem;
}

.rules-copy p,
.rules-copy li,
.strategy-card p {
  color: #4b586c;
}

.rules-copy ol {
  margin: .8rem 0 0;
  padding-left: 1.35rem;
}

.rules-copy li {
  margin-bottom: .35rem;
}

.strategy-card {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-flex: 1 1 40%;
  flex: 1 1 40%;
  min-width: 0;
  padding: 1.15rem;
  border-radius: 1rem;
  background: #fff5d6;
}

.strategy-icon {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
  width: 3.2rem;
  height: 3.2rem;
  margin-right: 1rem;
  color: #fff;
  border-radius: 50%;
  background: #805300;
  font-size: 1.45rem;
  font-weight: 900;
}

.strategy-card p {
  margin: 0;
}

.is-hidden {
  display: none !important;
}

a:focus,
button:focus,
select:focus,
input:focus + span,
[tabindex="-1"]:focus {
  outline: 3px solid #805300;
  outline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible + span,
[tabindex="-1"]:focus-visible {
  outline: 3px solid #805300;
  outline-offset: 3px;
}

@media (max-width: 760px) {
  .intro-panel {
    padding-top: 2rem;
  }

  h1 {
    font-size: 2.65rem;
  }

  .section-heading,
  .play-topbar,
  .rules-panel {
    display: block;
  }

  .setup-note {
    max-width: none;
    margin: .65rem 0 0;
    text-align: left;
  }

  .round-actions {
    margin: .9rem 0 0;
  }

  .rules-copy {
    padding-right: 0;
  }

  .strategy-card {
    margin-top: 1.2rem;
  }
}

@media (max-width: 560px) {
  .game-header,
  .game-main {
    padding-right: .8rem;
    padding-left: .8rem;
  }

  .game-header {
    padding-top: .75rem;
    padding-bottom: .75rem;
  }

  .brand-mark {
    min-width: 0;
    padding-right: .4rem;
    padding-left: .4rem;
  }

  .brand-disc {
    width: 1.15rem;
    height: 1.15rem;
    border-width: 2px;
  }

  .language-control label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .intro-panel {
    padding-bottom: 1.4rem;
  }

  h1 {
    font-size: 2.2rem;
  }

  .game-intro {
    font-size: 1rem;
  }

  .setup-panel,
  .play-panel,
  .rules-panel {
    padding: 1rem;
    border-radius: 1rem;
  }

  .setup-fields {
    display: block;
    margin: 0;
  }

  .choice-group {
    width: 100%;
    margin: 0 0 .85rem;
  }

  .primary-button {
    width: 100%;
  }

  .round-actions {
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
  }

  .secondary-button,
  .text-button {
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
  }

  .scoreboard {
    padding: .65rem;
  }

  .score-disc {
    width: 1.2rem;
    height: 1.2rem;
    margin-right: .35rem;
  }

  .score-name {
    font-size: .84rem;
  }

  .score-value {
    margin-left: .35rem;
    font-size: 1.25rem;
  }

  .score-divider {
    margin: 0 .45rem;
  }

  .board-frame {
    padding: .35rem;
    border-width: .2rem;
    border-radius: .85rem;
  }

  .column-controls {
    padding: 0 .05rem;
  }

  .column-button {
    margin-right: .08rem;
    margin-left: .08rem;
  }

  .disc {
    border-width: 2px;
  }

  .move-history li {
    font-size: .78rem;
  }
}

@media (max-width: 420px) {
  .play-panel {
    margin-right: -.8rem;
    margin-left: -.8rem;
    padding-right: .25rem;
    padding-left: .25rem;
    border-right-width: 0;
    border-left-width: 0;
    border-radius: 0;
  }

  .play-topbar,
  .scoreboard,
  .status-box,
  .board-hint,
  .history-panel {
    margin-right: .5rem;
    margin-left: .5rem;
  }

  .column-button {
    margin-right: 0;
    margin-left: 0;
    border-radius: .45rem;
  }
}

@media (max-width: 360px) {
  h1 {
    font-size: 1.95rem;
  }

  h2 {
    font-size: 1.35rem;
  }

  .three-options {
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
  }

  .three-options .segment {
    -webkit-flex-basis: 100%;
    flex-basis: 100%;
    margin: 0 0 .4rem;
  }

  .column-number {
    font-size: .68rem;
  }

  .strategy-card {
    display: block;
  }

  .strategy-icon {
    margin: 0 0 .75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
