@charset "UTF-8";
.main-menu-form, .remote-entry, .waiting-room {
  margin: 0 auto 3rem;
  padding-top: 3rem;
  max-width: 400px;
}
.main-menu-form label, .remote-entry label, .waiting-room label {
  color: white;
  font-size: 1.6rem;
}
.main-menu-form input, .remote-entry input, .waiting-room input {
  margin: 1rem 2rem;
  font-size: 1.6rem;
  border-radius: 0.6rem;
  border: none;
  background-color: white;
}
.main-menu-form input:not([type=checkbox]), .remote-entry input:not([type=checkbox]), .waiting-room input:not([type=checkbox]) {
  display: block;
  margin: 1rem auto;
  padding: 0.4rem 0.6rem;
  width: 18rem;
}
.main-menu-form input[type=submit], .main-menu-form button.remote-choice-host, .main-menu-form button.remote-choice-join, .main-menu-form button.remote-host-submit, .main-menu-form button.remote-code-submit, .main-menu-form button.remote-join-submit, .remote-entry input[type=submit], .remote-entry button.remote-choice-host, .remote-entry button.remote-choice-join, .remote-entry button.remote-host-submit, .remote-entry button.remote-code-submit, .remote-entry button.remote-join-submit, .waiting-room input[type=submit], .waiting-room button.remote-choice-host, .waiting-room button.remote-choice-join, .waiting-room button.remote-host-submit, .waiting-room button.remote-code-submit, .waiting-room button.remote-join-submit {
  font-weight: 700;
  color: #777;
  width: 12rem;
  border: none;
  border-bottom: 0.4rem solid #777;
  background-color: white;
  font-size: 1.6rem;
  cursor: pointer;
}
.main-menu-form input[type=submit]:hover, .main-menu-form button.remote-choice-host:hover, .main-menu-form button.remote-choice-join:hover, .main-menu-form button.remote-host-submit:hover, .main-menu-form button.remote-code-submit:hover, .main-menu-form button.remote-join-submit:hover, .remote-entry input[type=submit]:hover, .remote-entry button.remote-choice-host:hover, .remote-entry button.remote-choice-join:hover, .remote-entry button.remote-host-submit:hover, .remote-entry button.remote-code-submit:hover, .remote-entry button.remote-join-submit:hover, .waiting-room input[type=submit]:hover, .waiting-room button.remote-choice-host:hover, .waiting-room button.remote-choice-join:hover, .waiting-room button.remote-host-submit:hover, .waiting-room button.remote-code-submit:hover, .waiting-room button.remote-join-submit:hover {
  color: green;
  border-bottom: 0.4rem solid green;
}
.main-menu-form .form-group, .main-menu-form .human-group, .main-menu-form .first-group, .remote-entry .form-group, .remote-entry .human-group, .remote-entry .first-group, .waiting-room .form-group, .waiting-room .human-group, .waiting-room .first-group {
  width: 50%;
  display: inline-block;
  margin: 1rem auto;
}
.main-menu-form .form-group label, .main-menu-form .human-group label, .main-menu-form .first-group label, .remote-entry .form-group label, .remote-entry .human-group label, .remote-entry .first-group label, .waiting-room .form-group label, .waiting-room .human-group label, .waiting-room .first-group label {
  display: block;
}

.final-scores input {
  margin: 1rem 2rem;
  font-size: 1.6rem;
  border-radius: 0.6rem;
  border: none;
  background-color: white;
  font-weight: 700;
  color: #777;
  width: 12rem;
  border-bottom: 0.4rem solid #777;
}
.final-scores input:hover {
  color: green;
  border-bottom: 0.4rem solid green;
}
.final-scores .score-cards {
  display: block;
  padding: 3rem 2rem;
  margin: 0 auto;
}
.final-scores .score-cards .score-card {
  display: inline-block;
  margin: 1rem;
  color: white;
  font-size: 1.6rem;
}

.tagline {
  color: #c9d1e8;
  font-size: clamp(1.5rem, 3vw, 2rem);
  max-width: 60rem;
  margin: 1.5rem auto 0;
  padding: 0 2rem;
}

.version-line {
  color: #9aa4bd;
  font-size: 1.3rem;
  margin: 0.75rem auto 0;
}
.version-line a {
  color: inherit;
  text-decoration: underline;
}

.presets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr));
  gap: 2rem;
  max-width: 90rem;
  margin: 2rem auto 3rem;
  padding: 3rem 2rem 0;
}
.presets button {
  font-size: 1.8rem;
  font-weight: 700;
  min-height: 9rem;
  padding: 1.5rem 2rem;
  border: 0.1rem solid #3a4770;
  border-radius: 0.8rem;
  background-color: rgba(16, 23, 44, 0.88);
  color: #e8ecf8;
  cursor: pointer;
}
.presets button:hover, .presets button:focus-visible {
  border-color: #ff8a3d;
  box-shadow: 0 0 1.2rem rgba(255, 138, 61, 0.35);
}

.main-menu-form h2, .remote-entry h2, .waiting-room h2 {
  color: white;
  text-align: center;
}
.main-menu-form .lobby-back, .main-menu-form .remote-back, .main-menu-form .remote-sub-back, .main-menu-form .waiting-room-leave, .remote-entry .lobby-back, .remote-entry .remote-back, .remote-entry .remote-sub-back, .remote-entry .waiting-room-leave, .waiting-room .lobby-back, .waiting-room .remote-back, .waiting-room .remote-sub-back, .waiting-room .waiting-room-leave {
  float: left;
  font-size: 1.4rem;
  margin: 0 0 1rem;
  padding: 0.4rem 1.2rem;
  border: none;
  border-radius: 0.4rem;
  background-color: white;
  color: #333;
  cursor: pointer;
}
.main-menu-form .lobby-back:hover, .main-menu-form .remote-back:hover, .main-menu-form .remote-sub-back:hover, .main-menu-form .waiting-room-leave:hover, .remote-entry .lobby-back:hover, .remote-entry .remote-back:hover, .remote-entry .remote-sub-back:hover, .remote-entry .waiting-room-leave:hover, .waiting-room .lobby-back:hover, .waiting-room .remote-back:hover, .waiting-room .remote-sub-back:hover, .waiting-room .waiting-room-leave:hover {
  color: green;
}

.waiting-room {
  text-align: center;
}
.waiting-room .waiting-room-name, .waiting-room .waiting-room-code {
  color: white;
  font-size: 1.8rem;
  font-weight: 700;
  clear: both;
}
.waiting-room .waiting-room-players {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}
.waiting-room .waiting-room-players li {
  color: white;
  font-size: 1.6rem;
  margin: 0.5rem 0;
}
.waiting-room .waiting-room-status {
  color: #f4a742;
  font-size: 1.4rem;
  min-height: 1.4rem;
}
.waiting-room .waiting-room-status a {
  color: inherit;
  text-decoration: underline;
}

.remote-entry .remote-choice-status, .remote-entry .remote-host-status, .remote-entry .remote-code-status, .remote-entry .remote-join-status {
  color: #f4a742;
  font-size: 1.4rem;
  text-align: center;
  min-height: 1.4rem;
}
.remote-entry .remote-choice-status a, .remote-entry .remote-host-status a, .remote-entry .remote-code-status a, .remote-entry .remote-join-status a {
  color: inherit;
  text-decoration: underline;
}
.remote-entry .remote-join-message {
  color: white;
  font-size: 1.6rem;
  text-align: center;
}

body.has-player-bar {
  box-sizing: border-box;
  padding-bottom: 8rem;
}

.player-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 900;
  padding: 0.6rem 0.8rem calc(0.6rem + env(safe-area-inset-bottom));
  background-color: rgba(7, 11, 22, 0.96);
  border-top: 0.1rem solid #3a4770;
}
.player-bar[hidden] {
  display: none;
}
.player-bar ul {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 90rem;
  display: flex;
  gap: 0.6rem;
  justify-content: center;
}
.player-bar ul li {
  flex: 1 1 0;
  min-width: 0;
  max-width: 18rem;
}
.player-bar .player-bar-entry {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  box-sizing: border-box;
  width: 100%;
  min-height: 4.4rem;
  padding: 0.4rem 0.6rem;
  border: 0.2rem solid #3a4770;
  border-left: 0.6rem solid var(--player-colour, #3a4770);
  border-radius: 0.6rem;
  background-color: #10172c;
  color: #e8ecf8;
  font: inherit;
  font-size: 1.4rem;
  line-height: 1.3;
  text-align: left;
}
.player-bar button.player-bar-entry {
  cursor: pointer;
}
.player-bar button.player-bar-entry:hover, .player-bar button.player-bar-entry:focus-visible {
  border-color: #ff8a3d;
  border-left-color: var(--player-colour, #ff8a3d);
}
.player-bar button.player-bar-entry[aria-pressed=true] {
  border-color: #e8ecf8;
  border-left-color: var(--player-colour, #e8ecf8);
  background-color: #1c2747;
}
.player-bar .player-bar-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  color: var(--player-colour, #e8ecf8);
}
.player-bar .player-bar-status {
  color: #c9d1e8;
}
.player-bar .player-bar-turn {
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #ff8a3d;
}
.player-bar .is-out {
  opacity: 0.55;
}
.player-bar .is-out .player-bar-status {
  text-decoration: line-through;
}

.player-bar .is-own .player-bar-name::after {
  content: " ▸";
}

@media (max-width: 759px), (max-height: 500px) {
  body.has-player-bar main.game > .boards > .player.role-own {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 899;
    box-sizing: border-box;
    width: min(92vw, 36rem);
    max-width: none;
    margin: 0;
    padding: 1.5rem 1rem 9rem;
    overflow-y: auto;
    border-radius: 0 0.8rem 0.8rem 0;
    background-color: rgba(12, 17, 33, 0.98);
    transform: translateX(-105%);
    visibility: hidden;
    transition: transform 250ms ease, visibility 0s linear 250ms;
  }
  body.has-player-bar main.game > .boards > .player.role-own .matrix .layer .row .column {
    height: 2.6rem;
    width: 2.6rem;
  }
  body.has-player-bar main.game > .boards > .player.role-own .player-stats {
    font-size: 1.4rem;
  }
  body.has-player-bar.own-board-open main.game > .boards > .player.role-own {
    transform: none;
    visibility: visible;
    transition: transform 250ms ease;
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.55);
  }
}
@media (prefers-reduced-motion: reduce) {
  body.has-player-bar main.game > .boards > .player.role-own {
    transition: none !important;
  }
}
@media (min-width: 760px) and (min-height: 501px) {
  body.has-own-board main.game > .boards {
    padding-left: 30rem;
  }
  body.has-own-board main.game > .boards > .player.role-own {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    max-height: calc(100vh - 10.5rem);
    z-index: 100;
    box-sizing: border-box;
    width: 26rem;
    max-width: none;
    padding: 1.5rem 1rem;
    overflow-y: auto;
    background-color: rgba(12, 17, 33, 0.98);
  }
  body.has-own-board main.game > .boards > .player.role-own .matrix .layer .row .column {
    height: 2.2rem;
    width: 2.2rem;
  }
  body.has-own-board main.game > .boards > .player.role-own .player-stats {
    font-size: 1.3rem;
  }
}
body.has-player-bar main.game .player-controls, body.has-player-bar main.game > .ships-control {
  display: none;
}

.player-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.player-bar ul {
  flex: 1 1 auto;
  min-width: 0;
}
.player-bar .player-bar-menu {
  flex: 0 0 auto;
  min-width: 4.4rem;
  min-height: 4.4rem;
  border: 0.2rem solid #3a4770;
  border-radius: 0.6rem;
  background-color: #10172c;
  color: #e8ecf8;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}
.player-bar .player-bar-menu:hover, .player-bar .player-bar-menu:focus-visible, .player-bar .player-bar-menu[aria-expanded=true] {
  border-color: #ff8a3d;
}
.player-bar .player-bar-panel {
  position: absolute;
  right: 0.8rem;
  bottom: calc(100% + 0.6rem);
  box-sizing: border-box;
  width: min(32rem, 100vw - 1.6rem);
  padding: 1.2rem 1.4rem;
  border: 0.2rem solid #3a4770;
  border-radius: 0.8rem;
  background-color: #10172c;
  color: #e8ecf8;
  text-align: left;
  box-shadow: 0 0.6rem 2rem rgba(0, 0, 0, 0.6);
}
.player-bar .player-bar-panel[hidden] {
  display: none;
}
.player-bar .player-bar-panel h2 {
  margin: 0 0 0.8rem;
  text-align: center;
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9aa4bd;
}
.player-bar .player-bar-control {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4.4rem;
  font-size: 1.6rem;
  cursor: pointer;
}
.player-bar .player-bar-control input {
  width: 2.2rem;
  height: 2.2rem;
  margin: 0;
}
.player-bar .player-bar-none {
  margin: 0;
  font-size: 1.4rem;
  color: #9aa4bd;
}

.player-bar .player-bar-panel h2 + .player-bar-controls + h2 {
  margin-top: 1.4rem;
}
.player-bar .player-bar-panel .player-bar-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.player-bar .player-bar-panel .player-bar-actions[hidden] {
  display: none;
}
.player-bar .player-bar-panel .player-bar-action {
  min-height: 4.4rem;
  padding: 0.6rem 1.2rem;
  border: 0.2rem solid #3a4770;
  border-radius: 0.6rem;
  background-color: #1c2747;
  color: #e8ecf8;
  font: inherit;
  font-size: 1.6rem;
  text-align: left;
  cursor: pointer;
}
.player-bar .player-bar-panel .player-bar-action:hover, .player-bar .player-bar-panel .player-bar-action:focus-visible {
  border-color: #ff8a3d;
}
.player-bar .player-bar-panel .player-bar-action.is-confirm {
  border-color: #ff8a3d;
  background-color: #ff8a3d;
  color: #10172c;
  font-weight: 700;
}
.player-bar .player-bar-panel .player-bar-confirm {
  margin: 0 0 0.4rem;
  font-size: 1.5rem;
}

.turn-banner {
  position: fixed;
  top: 0.8rem;
  left: 50%;
  z-index: 900;
  transform: translateX(-50%);
  display: flex;
  align-items: baseline;
  gap: 1rem;
  box-sizing: border-box;
  max-width: calc(100vw - 1.6rem);
  padding: 0.7rem 1.6rem;
  border: 0.2rem solid #3a4770;
  border-left: 0.8rem solid var(--player-colour, #3a4770);
  border-radius: 0.8rem;
  background-color: rgba(16, 23, 44, 0.96);
  box-shadow: 0 0.4rem 1.6rem rgba(0, 0, 0, 0.5);
  color: #e8ecf8;
  font-size: 1.7rem;
  font-weight: 700;
  white-space: nowrap;
}
.turn-banner[hidden] {
  display: none;
}
.turn-banner.is-new {
  animation: turn-banner-in 450ms ease-out;
}
.turn-banner .turn-banner-text {
  overflow: hidden;
  text-overflow: ellipsis;
}
.turn-banner .turn-banner-countdown {
  font-variant-numeric: tabular-nums;
  color: #ff8a3d;
}
.turn-banner .turn-banner-countdown[hidden] {
  display: none;
}

@keyframes turn-banner-in {
  from {
    transform: translate(-50%, -150%);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .turn-banner.is-new {
    animation: none;
  }
}
body.has-turn-banner main.game > .boards {
  padding-top: 6.5rem;
}

@media (min-width: 760px) and (min-height: 501px) {
  body.has-turn-banner.has-own-board main.game > .boards > .player.role-own {
    top: 6.5rem;
    max-height: calc(100vh - 15.5rem);
  }
}
.player-bar .player-bar-alert {
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
}
.player-bar .player-bar-alert:empty {
  display: none;
}
.player-bar .player-bar-entry.was-hit {
  border-color: #ff8a3d;
  animation: player-bar-hit 600ms ease-out 2;
}
.player-bar .player-bar-entry.was-hit .player-bar-alert {
  color: #ff8a3d;
}
.player-bar .player-bar-entry.was-missed .player-bar-alert {
  color: #9aa4bd;
}
.player-bar .player-bar-entry.is-own.was-hit {
  background-color: #4a2410;
}

@keyframes player-bar-hit {
  50% {
    box-shadow: 0 0 1.2rem 0.4rem rgba(255, 138, 61, 0.65);
  }
}
@media (prefers-reduced-motion: reduce) {
  .player-bar .player-bar-entry.was-hit {
    animation: none;
  }
}
@media (max-height: 500px) and (min-width: 600px) {
  .matrix .layer .row .column {
    height: clamp(1.6rem, (100vh - 19rem) / 10, 3.5rem);
    height: clamp(1.6rem, (100dvh - 19rem) / 10, 3.5rem);
    width: clamp(1.6rem, (100vh - 19rem) / 10, 3.5rem);
    width: clamp(1.6rem, (100dvh - 19rem) / 10, 3.5rem);
  }
  .turn-banner {
    left: 0.8rem;
    transform: none;
    max-width: calc(50vw - 18rem);
    white-space: normal;
  }
  body.has-turn-banner main.game > .boards {
    padding-top: 1rem;
  }
  body.has-player-bar main.game > .boards > .player.role-own {
    padding-top: 1rem;
  }
  body.has-player-bar main.game > .boards > .player.role-own .matrix .layer .row .column {
    height: clamp(1.6rem, (100vh - 19rem) / 10, 3.5rem);
    height: clamp(1.6rem, (100dvh - 19rem) / 10, 3.5rem);
    width: clamp(1.6rem, (100vh - 19rem) / 10, 3.5rem);
    width: clamp(1.6rem, (100dvh - 19rem) / 10, 3.5rem);
  }
  body.own-board-open .turn-banner {
    visibility: hidden;
  }
}
@keyframes turn-banner-in-side {
  from {
    transform: translateY(-150%);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
@media (max-height: 500px) and (min-width: 600px) and (prefers-reduced-motion: no-preference) {
  .turn-banner.is-new {
    animation-name: turn-banner-in-side;
  }
}
@media (max-width: 759px), (max-height: 500px) {
  .main-menu-form input:not([type=checkbox]), .main-menu-form select, .main-menu-form button, .remote-entry input:not([type=checkbox]), .remote-entry select, .remote-entry button, .waiting-room input:not([type=checkbox]), .waiting-room select, .waiting-room button, .final-scores input:not([type=checkbox]), .final-scores select, .final-scores button {
    min-height: 4.8rem;
    font-size: 1.8rem;
  }
  .main-menu-form input:not([type=checkbox]):not([type=submit]), .remote-entry input:not([type=checkbox]):not([type=submit]), .waiting-room input:not([type=checkbox]):not([type=submit]), .final-scores input:not([type=checkbox]):not([type=submit]) {
    width: min(24rem, 90%);
    padding: 0.6rem 1rem;
    box-sizing: border-box;
  }
  .main-menu-form select, .remote-entry select, .waiting-room select, .final-scores select {
    padding: 0.6rem 1rem;
    border-radius: 0.6rem;
  }
  .main-menu-form input[type=checkbox], .remote-entry input[type=checkbox], .waiting-room input[type=checkbox], .final-scores input[type=checkbox] {
    width: 2.4rem;
    height: 2.4rem;
  }
  .main-menu-form input[type=submit], .main-menu-form button.remote-choice-host, .main-menu-form button.remote-choice-join, .main-menu-form button.remote-host-submit, .main-menu-form button.remote-code-submit, .main-menu-form button.remote-join-submit, .remote-entry input[type=submit], .remote-entry button.remote-choice-host, .remote-entry button.remote-choice-join, .remote-entry button.remote-host-submit, .remote-entry button.remote-code-submit, .remote-entry button.remote-join-submit, .waiting-room input[type=submit], .waiting-room button.remote-choice-host, .waiting-room button.remote-choice-join, .waiting-room button.remote-host-submit, .waiting-room button.remote-code-submit, .waiting-room button.remote-join-submit, .final-scores input[type=submit], .final-scores button.remote-choice-host, .final-scores button.remote-choice-join, .final-scores button.remote-host-submit, .final-scores button.remote-code-submit, .final-scores button.remote-join-submit {
    width: min(28rem, 90%);
  }
  .main-menu-form .lobby-back, .main-menu-form .remote-back, .main-menu-form .remote-sub-back, .main-menu-form .waiting-room-leave, .remote-entry .lobby-back, .remote-entry .remote-back, .remote-entry .remote-sub-back, .remote-entry .waiting-room-leave, .waiting-room .lobby-back, .waiting-room .remote-back, .waiting-room .remote-sub-back, .waiting-room .waiting-room-leave, .final-scores .lobby-back, .final-scores .remote-back, .final-scores .remote-sub-back, .final-scores .waiting-room-leave {
    float: none;
    display: block;
    min-height: 4.4rem;
    padding: 0.8rem 1.8rem;
    font-size: 1.6rem;
  }
  .main-menu-form .form-group:has(select), .remote-entry .form-group:has(select), .waiting-room .form-group:has(select), .final-scores .form-group:has(select) {
    width: 100%;
  }
  .main-menu-form select, .remote-entry select, .waiting-room select, .final-scores select {
    width: min(38rem, 92%);
  }
  body.own-board-open .turn-banner {
    visibility: hidden;
  }
  .placement {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
    padding: 1.2rem;
  }
  .placement p, .placement .placement-name {
    flex: 1 1 100%;
  }
  .placement p {
    margin: 0;
  }
  .placement .placement-name {
    max-width: none;
    margin: 0;
    min-height: 4.8rem;
  }
  .placement button {
    flex: 1 1 14rem;
    min-width: 0;
    min-height: 5.2rem;
    margin: 0;
    font-size: 2rem;
  }
}
@media (max-width: 759px) and (min-height: 501px) {
  main.game > .boards {
    padding-left: 0.8rem;
    padding-right: 0.8rem;
  }
  main.game > .boards > .player {
    padding: 0.2rem;
  }
  main.game > .boards > .player:not(.role-own) .matrix .layer .row .column {
    height: clamp(1.6rem, min((100vw - 4rem) / 10, (100vh - 22rem) / 10), 6rem);
    height: clamp(1.6rem, min((100vw - 4rem) / 10, (100dvh - 22rem) / 10), 6rem);
    width: clamp(1.6rem, min((100vw - 4rem) / 10, (100vh - 22rem) / 10), 6rem);
    width: clamp(1.6rem, min((100vw - 4rem) / 10, (100dvh - 22rem) / 10), 6rem);
  }
  body.has-player-bar main.game > .boards > .player.role-own .matrix .layer .row .column {
    height: clamp(2.6rem, (min(92vw, 36rem) - 4rem) / 10, 3.4rem);
    width: clamp(2.6rem, (min(92vw, 36rem) - 4rem) / 10, 3.4rem);
  }
}