@charset "UTF-8";
*,
*::before,
*::after {
  box-sizing: border-box;
}

body.bs {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(40% 30% at 85% 4%, rgba(255, 236, 160, 0.9), transparent 70%), linear-gradient(180deg, #bdeeff 0%, #dff7ff 38%, #c5f0f3 70%, #9fe3ea 100%);
  background-attachment: fixed;
  color: #0b2545;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

:where(.bs) :where(h1, h2, h3, p, ul, ol, dl, dd, fieldset) {
  margin: 0;
}
:where(.bs) :where(ul, ol) {
  padding: 0;
  list-style: none;
}
:where(.bs) :where(a) {
  color: inherit;
}
:where(.bs) :where(button) {
  font: inherit;
  color: inherit;
}
:where(.bs) :where(:focus-visible) {
  outline: 3px solid #7048e8;
  outline-offset: 3px;
  border-radius: 8px;
}

.bs-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.bs-only-setup,
.bs-only-join,
.bs-only-gone,
.bs-only-pass,
.bs-only-place,
.bs-only-play {
  display: none !important;
}

.is-setup .bs-only-setup,
.is-join .bs-only-join,
.is-gone .bs-only-gone,
.is-pass .bs-only-pass,
.is-place .bs-only-place,
.is-play .bs-only-play {
  display: block !important;
}

.is-setup .bs-setup.bs-only-setup,
.is-place .bs-place-body {
  display: grid !important;
}

.is-pass .bs-curtain.bs-only-pass {
  display: grid !important;
}

.is-live-mode .bs-only-local {
  display: none;
}

.bs-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px clamp(18px, 5vw, 80px);
}

.bs-brand {
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.bs-bar-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(11, 37, 69, 0.68);
  text-decoration: none;
}
.bs-bar-link:hover {
  color: #0b2545;
}

.bs-eyebrow {
  margin-bottom: 12px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #0d8db5;
}

.bs-title {
  font-family: "Poppins", sans-serif;
  line-height: 0.95;
  letter-spacing: -0.04em;
}
.bs-title span {
  display: block;
}

.bs-title-1 {
  font-weight: 900;
  font-size: clamp(3rem, 8vw, 6rem);
  color: #0b2545;
  text-shadow: 0 6px 0 rgba(255, 255, 255, 0.7);
}

.bs-title-2 {
  margin-top: 6px;
  font-weight: 900;
  font-style: italic;
  font-size: clamp(2rem, 5vw, 3.6rem);
  color: #ff4f7b;
  text-shadow: 3px 3px 0 #fff, 6px 6px 0 rgba(112, 72, 232, 0.25);
}

.bs-lede {
  margin-top: 20px;
  max-width: 540px;
  font-size: 1.05rem;
  color: rgba(11, 37, 69, 0.68);
}
.bs-lede b {
  color: #0b2545;
}

.bs-ink-dare {
  padding: 0 6px;
  border-radius: 6px;
  background: #ffd23f;
  color: #0b2545 !important;
}

.bs-ink-o {
  color: #7048e8 !important;
}

.bs-panel-title {
  font-family: "Poppins", sans-serif;
  font-weight: 800;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.bs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border: 2px solid #0b2545;
  border-radius: 99px;
  background: #fff;
  color: #0b2545;
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 0 #0b2545;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.bs-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #0b2545;
}
.bs-btn:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #0b2545;
}
.bs-btn:disabled {
  opacity: 0.5;
  cursor: default;
}
.bs-btn--go {
  background: #ff4f7b;
  color: #fff;
}
.bs-btn--small {
  padding: 10px 16px;
  font-size: 0.88rem;
}
.bs-btn--wide {
  width: 100%;
}
.bs-btn--ghost {
  border-color: transparent;
  background: none;
  box-shadow: none;
  color: rgba(11, 37, 69, 0.68);
}
.bs-btn--ghost:hover:not(:disabled) {
  box-shadow: none;
}

.bs-text-btn {
  padding: 0;
  border: 0;
  background: none;
  color: #0d8db5;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.bs-form-error {
  min-height: 1.4em;
  margin-top: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #c2183f;
}

.bs-setup {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(16px, 4vw, 48px) clamp(18px, 5vw, 80px) clamp(48px, 7vw, 88px);
}

.bs-form {
  margin-top: 30px;
  max-width: 520px;
}
.bs-form--narrow {
  max-width: 380px;
}

.bs-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0;
  border: 0;
}
.bs-choice legend {
  margin-bottom: 10px;
  padding: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(11, 37, 69, 0.68);
}
.bs-choice label {
  position: relative;
  cursor: pointer;
}
.bs-choice input {
  position: absolute;
  opacity: 0;
}
.bs-choice span {
  display: block;
  height: 100%;
  padding: 14px 16px;
  border: 2px solid rgba(11, 37, 69, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.75);
  font-weight: 800;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.bs-choice small {
  display: block;
  margin-top: 2px;
  font-weight: 500;
  font-size: 0.8rem;
  color: rgba(11, 37, 69, 0.68);
}
.bs-choice input:checked + span {
  border-color: #0b2545;
  background: #fff;
  box-shadow: 0 4px 0 #0b2545;
  transform: translateY(-2px);
}
.bs-choice input:focus-visible + span {
  outline: 3px solid #7048e8;
  outline-offset: 2px;
}

.bs-names {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}
.is-live-mode .bs-names {
  grid-template-columns: 1fr;
}

.bs-field {
  display: block;
}
.bs-field span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(11, 37, 69, 0.68);
}
.bs-field em {
  font-style: normal;
  font-weight: 800;
}
.bs-field--x em {
  color: #ff4f7b;
}
.bs-field--o em {
  color: #7048e8;
}
.bs-field input {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid rgba(11, 37, 69, 0.12);
  border-radius: 14px;
  background: #fff;
  color: #0b2545;
  font: inherit;
  font-weight: 600;
}
.bs-field input::placeholder {
  color: rgba(11, 37, 69, 0.35);
}
.bs-field input:focus {
  outline: none;
  border-color: #0b2545;
}

.bs-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  font-weight: 700;
  cursor: pointer;
}
.bs-toggle input {
  position: absolute;
  opacity: 0;
}
.bs-toggle small {
  display: block;
  font-weight: 500;
  font-size: 0.8rem;
  color: rgba(11, 37, 69, 0.68);
}

.bs-toggle-track {
  position: relative;
  flex: 0 0 auto;
  width: 48px;
  height: 28px;
  border-radius: 99px;
  background: rgba(11, 37, 69, 0.18);
  transition: background 0.2s ease;
}
.bs-toggle-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1);
}
input:checked + .bs-toggle-track {
  background: #1fb8d3;
}
input:checked + .bs-toggle-track::after {
  transform: translateX(20px);
}
input:focus-visible + .bs-toggle-track {
  outline: 3px solid #7048e8;
  outline-offset: 3px;
}

.bs-form .bs-btn--go {
  margin-top: 8px;
}

.bs-hero {
  text-align: center;
}

.bs-hero-frame {
  width: min(440px, 100%);
  margin: 0 auto;
  padding: 14px;
  border-radius: 30px;
  background: repeating-linear-gradient(90deg, rgba(160, 110, 50, 0.16) 0 2px, transparent 2px 46px), linear-gradient(180deg, #f1d39b, #d9b071);
  box-shadow: 0 6px 0 #b68a4c, 0 40px 70px -30px rgba(11, 37, 69, 0.55);
  transform: rotate(-3deg);
}

.bs-hero-sea {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: repeat(6, minmax(0, 1fr));
  aspect-ratio: 1;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px) 0 0/16.6666666667% 16.6666666667%, linear-gradient(90deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px) 0 0/16.6666666667% 16.6666666667%, linear-gradient(180deg, #1fb8d3, #0d8db5);
}
.bs-hero-sea::before {
  content: "";
  position: absolute;
  inset: -20% -20% 0 -20%;
  background: radial-gradient(ellipse 18px 6px at 50% 50%, rgba(255, 255, 255, 0.32) 40%, transparent 70%) 0 0/70px 46px;
  animation: bs-waves 9s linear infinite;
  pointer-events: none;
}

@keyframes bs-waves {
  to {
    transform: translate(70px, 46px);
  }
}
.bs-hero-boat {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  padding: 4%;
  animation: bs-bob 3s ease-in-out infinite;
}
.bs-hero-boat--love {
  grid-area: 2/2/3/6;
}
.bs-hero-boat--drama {
  grid-area: 3/6/6/7;
  animation-delay: -1s;
}
.bs-hero-boat--dare {
  grid-area: 5/2/6/4;
  animation-delay: -2s;
}

.bs-hero-hit {
  grid-area: 2/4/3/5;
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
}
.bs-hero-hit svg {
  width: 64%;
  height: auto;
  fill: #ff2e63;
  stroke: #fff;
  stroke-width: 1.6;
  filter: drop-shadow(0 0 8px rgba(255, 140, 40, 0.9));
}

.bs-hero-miss {
  position: relative;
  z-index: 2;
  margin: 28%;
  border: 3px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
}
.bs-hero-miss--1 {
  grid-area: 4/3/5/4;
}
.bs-hero-miss--2 {
  grid-area: 1/5/2/6;
}
.bs-hero-miss--3 {
  grid-area: 6/5/7/6;
}

.bs-hero-caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}
.bs-hero-caption span {
  padding: 6px 12px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.8);
  font-size: 0.82rem;
  font-weight: 700;
}

.bs-ship.bs-ship--love,
.bs-hero-boat.bs-ship--love,
.bs-chip.bs-ship--love {
  --hull: #ff5d8f;
  --flag: #ffd23f;
}
.bs-ship.bs-ship--drama,
.bs-hero-boat.bs-ship--drama,
.bs-chip.bs-ship--drama {
  --hull: #8b5cf6;
  --flag: #ff5d8f;
}
.bs-ship.bs-ship--cuddle,
.bs-hero-boat.bs-ship--cuddle,
.bs-chip.bs-ship--cuddle {
  --hull: #ff8c42;
  --flag: #ffffff;
}
.bs-ship.bs-ship--snack,
.bs-hero-boat.bs-ship--snack,
.bs-chip.bs-ship--snack {
  --hull: #7bd83b;
  --flag: #ff5d8f;
}
.bs-ship.bs-ship--dare,
.bs-hero-boat.bs-ship--dare,
.bs-chip.bs-ship--dare {
  --hull: #ffd23f;
  --flag: #ff4f7b;
}

.bs-boat {
  display: block;
  overflow: visible;
}

.bs-hull-body {
  fill: var(--hull, #ff4f7b);
  stroke: #0b2545;
  stroke-width: 4;
  stroke-linejoin: round;
}

.bs-hull-stripe {
  fill: rgba(11, 37, 69, 0.22);
}

.bs-hull-cabin {
  fill: #fff;
  stroke: #0b2545;
  stroke-width: 4;
}

.bs-hull-star {
  fill: #ffd23f;
  stroke: #0b2545;
  stroke-width: 1.5;
}

.bs-hull-mast {
  stroke: #0b2545;
  stroke-width: 4;
  stroke-linecap: round;
}

.bs-hull-flag {
  fill: var(--flag, #fff);
  stroke: #0b2545;
  stroke-width: 3;
  stroke-linejoin: round;
}

.bs-hull-port {
  fill: #dff7ff;
  stroke: #0b2545;
  stroke-width: 3.5;
}

.bs-chip {
  display: inline-block;
  flex: 0 0 auto;
  width: 26px;
  height: 12px;
  border: 2px solid #0b2545;
  border-radius: 3px 10px 10px 3px;
  background: var(--hull);
  vertical-align: middle;
}

@keyframes bs-bob {
  0%, 100% {
    transform: translateY(0) rotate(-0.6deg);
  }
  50% {
    transform: translateY(-4%) rotate(0.6deg);
  }
}
.bs-curtain {
  min-height: 70vh;
  place-items: center;
  padding: 24px clamp(18px, 5vw, 80px) 64px;
}

.bs-curtain-card {
  width: min(520px, 100%);
  padding: clamp(28px, 5vw, 48px);
  border: 3px solid #0b2545;
  border-radius: 32px;
  text-align: center;
  background: repeating-linear-gradient(135deg, rgba(31, 184, 211, 0.08) 0 14px, transparent 14px 28px), #fff;
  box-shadow: 0 8px 0 #0b2545;
}
.bs-curtain-card .bs-lede {
  margin: 14px auto 26px;
}

.bs-curtain-anchor {
  margin-bottom: 14px;
  font-size: 3.4rem;
  line-height: 1;
  transform-origin: 50% 10%;
}

.bs-panel {
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(24px, 6vw, 72px) clamp(18px, 5vw, 80px) 72px;
}

.bs-place {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8px clamp(18px, 5vw, 80px) 64px;
}

.bs-invite {
  margin-bottom: 28px;
  padding: 20px;
  border: 2px solid #0b2545;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 5px 0 #0b2545;
}

.bs-invite-title {
  font-family: "Poppins", sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
}

.bs-link-box {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.bs-link-box input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border: 2px solid rgba(11, 37, 69, 0.12);
  border-radius: 12px;
  background: #f3fbff;
  color: #0b2545;
  font: inherit;
  font-size: 0.9rem;
}

.bs-send {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.bs-invite-status {
  margin-top: 14px;
  font-size: 0.9rem;
  color: rgba(11, 37, 69, 0.68);
}

.bs-bob {
  display: inline-block;
  animation: bs-bob-icon 1.6s ease-in-out infinite;
}

@keyframes bs-bob-icon {
  50% {
    transform: translateY(-4px) rotate(12deg);
  }
}
.bs-place-head {
  margin-bottom: 22px;
}
.is-placed .bs-place-head .bs-hint {
  visibility: hidden;
}

.place-x .bs-place-head .bs-panel-title {
  color: #ff4f7b;
}

.place-o .bs-place-head .bs-panel-title {
  color: #7048e8;
}

.bs-hint {
  margin-top: 8px;
  color: rgba(11, 37, 69, 0.68);
}

.bs-place-body {
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
  align-items: start;
  gap: clamp(20px, 4vw, 48px);
}

.bs-dock-list {
  display: grid;
  gap: 8px;
}

.bs-dock-ship {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 2px solid rgba(11, 37, 69, 0.12);
  border-radius: 14px;
  background: #fff;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.bs-dock-ship small {
  margin-left: auto;
  font-weight: 600;
  color: rgba(11, 37, 69, 0.68);
}
.bs-dock-ship.is-selected {
  border-color: #0b2545;
  box-shadow: 0 4px 0 #0b2545;
}
.is-placed .bs-dock-ship {
  cursor: default;
  opacity: 0.6;
}

.bs-dock-actions {
  display: flex;
  gap: 8px;
  margin: 16px 0 6px;
}
.bs-dock-actions .bs-btn {
  flex: 1;
}
.is-placed .bs-dock-actions {
  display: none;
}

.bs-ready-note {
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #e1fbf2;
  color: #0b6b4f;
  font-weight: 700;
}

.bs-sea-frame {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  grid-template-rows: 18px auto;
  gap: 4px;
  padding: 10px 12px 12px 8px;
  border-radius: 26px;
  background: repeating-linear-gradient(90deg, rgba(160, 110, 50, 0.16) 0 2px, transparent 2px 46px), linear-gradient(180deg, #f1d39b, #d9b071);
  box-shadow: 0 6px 0 #b68a4c, 0 30px 50px -30px rgba(11, 37, 69, 0.5);
}

.bs-labels {
  display: grid;
  font-size: 0.7rem;
  font-weight: 800;
  color: rgba(90, 58, 20, 0.75);
  text-align: center;
}
.bs-labels--cols {
  grid-column: 2;
  grid-row: 1;
  grid-template-columns: repeat(8, minmax(0, 1fr));
}
.bs-labels--rows {
  grid-column: 1;
  grid-row: 2;
  grid-template-rows: repeat(8, minmax(0, 1fr));
  align-items: center;
}

.bs-sea {
  position: relative;
  grid-column: 2;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  grid-template-rows: repeat(8, minmax(0, 1fr));
  border-radius: 16px;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(180deg, #1fb8d3, #0d8db5);
  box-shadow: inset 0 0 0 3px rgba(11, 37, 69, 0.25), inset 0 10px 30px rgba(255, 255, 255, 0.25);
}
.bs-sea::before {
  content: "";
  position: absolute;
  inset: -30% -30% 0 -30%;
  z-index: 0;
  background: radial-gradient(ellipse 16px 5px at 50% 50%, rgba(255, 255, 255, 0.32) 40%, transparent 70%) 0 0/64px 42px;
  animation: bs-waves 10s linear infinite;
  pointer-events: none;
}

.bs-sea-size {
  grid-area: 1/1/9/9;
  padding-bottom: 100%;
  pointer-events: none;
}

.bs-cell {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: inset -1px -1px 0 rgba(255, 255, 255, 0.28);
  -webkit-appearance: none;
  appearance: none;
}
.bs-cell.is-fired {
  background: rgba(11, 37, 69, 0.12);
}

button.bs-cell {
  cursor: pointer;
}
button.bs-cell:disabled {
  cursor: default;
}

.bs-ship {
  position: relative;
  z-index: 2;
  display: block;
  padding: 2%;
  pointer-events: none;
}
.bs-ship .bs-boat {
  width: 100%;
  height: 100%;
}
.bs-ship.is-pending {
  visibility: hidden;
}

.bs-sea--place .bs-ship .bs-boat,
.bs-sea--own .bs-ship:not(.is-sunk) .bs-boat {
  animation: bs-bob 3s ease-in-out infinite;
}
.bs-sea--place .bs-ship:nth-child(2n) .bs-boat,
.bs-sea--own .bs-ship:not(.is-sunk):nth-child(2n) .bs-boat {
  animation-delay: -1.2s;
}
.bs-sea--place .bs-ship:nth-child(3n) .bs-boat,
.bs-sea--own .bs-ship:not(.is-sunk):nth-child(3n) .bs-boat {
  animation-delay: -2.1s;
}

.bs-sea--place .bs-ship {
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
}
.bs-sea--place .bs-ship:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -2px;
  border-radius: 12px;
}
.bs-sea--place .bs-ship.is-selected {
  z-index: 3;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 0 0 3px #fff;
}
.bs-sea--place .bs-ship.is-dragging {
  z-index: 4;
  cursor: grabbing;
  filter: drop-shadow(0 12px 10px rgba(11, 37, 69, 0.45));
}
.bs-sea--place .bs-ship.is-dragging .bs-boat {
  animation: none;
  transform: scale(1.06);
}
.bs-sea--place .bs-ship.is-bad {
  background: rgba(255, 46, 99, 0.35);
  box-shadow: inset 0 0 0 3px #ff2e63;
  border-radius: 14px;
}
.bs-sea--place .bs-cell:hover {
  background: rgba(255, 255, 255, 0.12);
}
.is-placed .bs-sea--place .bs-ship {
  cursor: default;
  filter: saturate(0.8);
}

.bs-sea--target .bs-cell:not(:disabled)::after {
  content: "";
  position: absolute;
  inset: 18%;
  border: 3px solid rgba(255, 255, 255, 0);
  border-radius: 50%;
  transition: border-color 0.12s ease, transform 0.12s ease;
}

.my-turn .bs-sea--target {
  cursor: crosshair;
}
.my-turn .bs-sea--target .bs-cell:not(:disabled):hover {
  background: rgba(255, 255, 255, 0.16);
}
.my-turn .bs-sea--target .bs-cell:not(:disabled):hover::after {
  border-color: #fff;
  transform: scale(0.85);
  box-shadow: 0 0 0 2px rgba(255, 79, 123, 0.6);
}

.bs-sea--target .bs-cell.is-aiming {
  background: rgba(255, 79, 123, 0.35);
  animation: bs-aim 0.5s ease-in-out infinite;
}

@keyframes bs-aim {
  50% {
    opacity: 0.5;
  }
}
.bs-sea--target .bs-ship.is-sunk {
  filter: saturate(0.75) brightness(0.9);
  transform: rotate(-6deg) translateY(6%);
}
.bs-sea--target .bs-ship.is-revealed {
  opacity: 0.6;
}

body:not(.my-turn) .bs-board--target .bs-sea {
  filter: saturate(0.8);
}

.bs-sea--own .bs-ship.is-sunk {
  filter: grayscale(0.7) brightness(0.85);
  transform: rotate(5deg) translateY(6%);
}

.bs-mark {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.bs-mark.is-pending {
  visibility: hidden;
}
.bs-mark--hit svg {
  width: 62%;
  height: auto;
  fill: #ff2e63;
  stroke: #fff;
  stroke-width: 1.6;
  filter: drop-shadow(0 0 6px rgba(255, 140, 40, 0.95));
  animation: bs-flame 1.4s ease-in-out infinite alternate;
}
.bs-mark--miss::before {
  content: "";
  width: 30%;
  height: 30%;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
}
.bs-mark.is-splash::after, .bs-mark.is-latest::after {
  content: "";
  position: absolute;
  inset: 20%;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  animation: bs-ripple 1.4s ease-out 2;
  opacity: 0;
}
.bs-mark--hit.is-latest::after {
  border-color: #ffd23f;
}

@keyframes bs-flame {
  to {
    filter: drop-shadow(0 0 12px rgb(255, 90, 40));
    transform: scale(1.06);
  }
}
@keyframes bs-ripple {
  0% {
    transform: scale(0.4);
    opacity: 0.9;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}
.bs-torpedo {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  width: 11%;
  margin: -5.5% 0 0 -5.5%;
  pointer-events: none;
}
.bs-torpedo svg {
  display: block;
  width: 100%;
  height: auto;
  stroke: #fff;
  stroke-width: 1.5;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.9));
}
.bs-torpedo--x svg {
  fill: #ff4f7b;
}
.bs-torpedo--o svg {
  fill: #7048e8;
}

.bs-spark,
.bs-drop {
  position: absolute;
  z-index: 5;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  pointer-events: none;
}

.bs-spark {
  background: radial-gradient(circle, #fff 0 20%, #ffd23f 30%, #ff6b2c 70%);
}

.bs-drop {
  width: 7px;
  height: 10px;
  border-radius: 50% 50% 50% 50%/60% 60% 40% 40%;
  background: #fff;
}

.bs-callout {
  position: absolute;
  z-index: 6;
  padding: 4px 10px;
  border: 3px solid #0b2545;
  border-radius: 12px;
  font-family: "Poppins", sans-serif;
  font-weight: 900;
  font-size: clamp(0.9rem, 2.6vw, 1.3rem);
  line-height: 1.1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transform: translate(-50%, -130%);
  pointer-events: none;
}
@supports (translate: 1px) {
  .bs-callout {
    transform: none;
    translate: -50% -130%;
  }
}
.bs-callout--hit {
  background: #ffd23f;
  color: #0b2545;
}
.bs-callout--sunk {
  background: #ff2e63;
  color: #fff;
}
.bs-callout--miss {
  background: #fff;
  color: #0d8db5;
}
.bs-callout.is-static {
  animation: bs-callout 1.2s ease-out forwards;
}

@keyframes bs-callout {
  0% {
    opacity: 0;
  }
  15%, 70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    margin-top: -30px;
  }
}
.bs-play {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(18px, 5vw, 80px) 56px;
}

.bs-score {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 2px solid #0b2545;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 5px 0 #0b2545;
}

.bs-player {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.bs-player--o {
  align-items: flex-end;
  text-align: right;
}

.bs-player-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  font-family: "Poppins", sans-serif;
  font-weight: 900;
  font-size: 1.15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bs-player--x .bs-player-name {
  color: #ff4f7b;
}
.bs-player--o .bs-player-name {
  color: #7048e8;
}

.bs-player-ships {
  display: flex;
  gap: 4px;
}

.bs-pip {
  width: 16px;
  height: 8px;
  border: 2px solid #0b2545;
  border-radius: 2px 7px 7px 2px;
  background: #1fb8d3;
}
.bs-pip.is-gone {
  background: transparent;
  border-color: rgba(11, 37, 69, 0.25);
}

.bs-dot {
  display: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(11, 37, 69, 0.25);
}
.is-live .bs-dot {
  display: inline-block;
}
.bs-dot.is-online {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
}

.bs-vs {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(11, 37, 69, 0.68);
}

.bs-series {
  font-family: "Poppins", sans-serif;
  font-weight: 900;
  font-size: 1.35rem;
  color: #0b2545;
}

.bs-mute {
  margin-top: 2px;
  padding: 2px 8px;
  border: 0;
  border-radius: 99px;
  background: #eef9fc;
  font-size: 0.95rem;
  line-height: 1.4;
  cursor: pointer;
}

.bs-status {
  min-height: 1.6em;
  margin: 18px 0 4px;
  font-family: "Poppins", sans-serif;
  font-weight: 900;
  font-size: clamp(1.1rem, 2.6vw, 1.45rem);
  text-align: center;
}
.my-turn .bs-status {
  color: #ff4f7b;
}

.bs-log {
  min-height: 1.7em;
  margin: 0 0 18px;
  font-weight: 600;
  text-align: center;
  color: rgba(11, 37, 69, 0.68);
}
.bs-log span {
  display: inline-block;
}

.bs-streak {
  margin-right: 6px;
  padding: 2px 10px;
  border-radius: 99px;
  background: #ff6b2c;
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  animation: bs-pulse 0.9s ease-in-out infinite alternate;
}
.bs-streak.is-theirs {
  background: #7048e8;
}
.bs-streak[hidden] {
  display: none;
}

@keyframes bs-pulse {
  to {
    transform: scale(1.08);
  }
}
.bs-battle {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
  align-items: start;
  gap: clamp(18px, 3.5vw, 44px);
}

.bs-board-label {
  margin: 0 0 8px 6px;
  font-family: "Poppins", sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
}

.bs-tracker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0 0 6px;
}
.bs-tracker li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.8);
  font-size: 0.78rem;
  font-weight: 700;
}
.bs-tracker small {
  color: rgba(11, 37, 69, 0.68);
}
.bs-tracker .is-hit small {
  color: #c2183f;
}
.bs-tracker .is-sunk {
  opacity: 0.55;
}
.bs-tracker .is-sunk span {
  text-decoration: line-through;
}

.bs-emotes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 22px auto 0;
}
.bs-emotes[hidden] {
  display: none;
}

.bs-emotes-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(11, 37, 69, 0.68);
}

.bs-emote {
  width: 44px;
  height: 44px;
  border: 2px solid #0b2545;
  border-radius: 50%;
  background: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 3px 0 #0b2545;
  transition: transform 0.12s ease;
}
.bs-emote:hover {
  transform: translateY(-3px) rotate(-6deg);
}
.bs-emote:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #0b2545;
}

.bs-emote-layer {
  position: fixed;
  inset: auto 0 18% 0;
  z-index: 45;
  height: 0;
  pointer-events: none;
}

.bs-emote-float {
  position: absolute;
  bottom: 0;
  font-size: 3rem;
  line-height: 1;
  filter: drop-shadow(0 6px 8px rgba(11, 37, 69, 0.3));
}
.bs-emote-float.is-mine {
  right: 18%;
}
.bs-emote-float.is-theirs {
  left: 18%;
}

.bs-countdown {
  position: fixed;
  inset: 0;
  z-index: 48;
  display: grid;
  place-items: center;
  background: rgba(11, 37, 69, 0.25);
  pointer-events: none;
}
.bs-countdown[hidden] {
  display: none;
}
.bs-countdown span {
  font-family: "Poppins", sans-serif;
  font-weight: 900;
  font-size: clamp(4rem, 18vw, 9rem);
  line-height: 1;
  color: #fff;
  -webkit-text-stroke: 4px #0b2545;
  text-shadow: 0 8px 0 #0b2545;
}

.bs-banner {
  position: fixed;
  top: 30%;
  left: 50%;
  z-index: 40;
  max-width: calc(100vw - 32px);
  padding: 16px 26px;
  border: 3px solid #0b2545;
  border-radius: 18px;
  background: #ff2e63;
  color: #fff;
  font-family: "Poppins", sans-serif;
  font-weight: 900;
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  text-align: center;
  box-shadow: 0 6px 0 #0b2545;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
@supports (translate: 1px) {
  .bs-banner {
    transform: none;
    translate: -50% 0;
  }
}
.bs-banner.is-shown {
  opacity: 1;
}

.bs-dare,
.bs-end {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(11, 37, 69, 0.55);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}
.bs-dare[hidden],
.bs-end[hidden] {
  display: none;
}

.bs-dare-card,
.bs-end-card {
  width: min(480px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: clamp(26px, 5vw, 40px);
  border: 3px solid #0b2545;
  border-radius: 30px;
  text-align: center;
  box-shadow: 0 8px 0 #0b2545;
}

.bs-dare-card {
  background: radial-gradient(circle at 50% 0, rgba(255, 255, 255, 0.7), transparent 60%), #ffd23f;
}
.bs-dare-card .bs-btn--go {
  margin-top: 24px;
}

.bs-dare-kicker {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 99px;
  background: #0b2545;
  color: #ffd23f;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bs-dare-title {
  margin-top: 16px;
  font-weight: 800;
}

.bs-dare-text {
  margin-top: 10px;
  font-family: "Poppins", sans-serif;
  font-weight: 900;
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.bs-end-card {
  background: radial-gradient(circle at 50% 0, rgba(31, 184, 211, 0.25), transparent 60%), #fff;
}

.bs-end-kicker {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #0d8db5;
}

.bs-end-stamp {
  display: inline-block;
  margin-top: 14px;
  padding: 6px 18px;
  border: 4px solid #ff4f7b;
  border-radius: 14px;
  font-family: "Poppins", sans-serif;
  font-weight: 900;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  line-height: 1.15;
  color: #ff4f7b;
  transform: rotate(-4deg);
}
.is-loss .bs-end-stamp {
  border-color: #7048e8;
  color: #7048e8;
}

.bs-end-line {
  margin-top: 18px;
  font-size: 1.05rem;
  font-weight: 700;
}

.bs-end-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 22px;
}

.bs-end-stat {
  padding: 12px;
  border-radius: 16px;
  background: #eef9fc;
}
.bs-end-stat dt {
  font-family: "Poppins", sans-serif;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bs-end-stat dd {
  font-size: 0.82rem;
  color: rgba(11, 37, 69, 0.68);
}
.bs-end-stat--x dt {
  color: #ff4f7b;
}
.bs-end-stat--o dt {
  color: #7048e8;
}
.bs-end-stat.is-winner {
  box-shadow: inset 0 0 0 3px #ffd23f;
}

.bs-end-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.bs-history-card {
  max-width: 560px;
  margin: 40px auto 0;
  padding: 22px 24px;
  border: 2px solid #0b2545;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 5px 0 #0b2545;
}
.bs-history-card h3 {
  font-family: "Poppins", sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
}

.bs-history {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.bs-history-row {
  font-size: 0.9rem;
  color: rgba(11, 37, 69, 0.68);
}
.bs-history-row b {
  margin-right: 4px;
  color: #0b2545;
}
.bs-history-row--x b {
  color: #ff4f7b;
}
.bs-history-row--o b {
  color: #7048e8;
}

.bs-history-empty {
  margin-top: 8px;
  font-size: 0.9rem;
  color: rgba(11, 37, 69, 0.68);
}

.bs-history-actions {
  display: flex;
  gap: 18px;
  margin-top: 14px;
}

.bs-guide {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 clamp(18px, 5vw, 80px) 40px;
}

.bs-row {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr);
  gap: clamp(16px, 4vw, 56px);
  padding: clamp(32px, 5vw, 56px) 0;
  border-top: 2px dashed rgba(11, 37, 69, 0.15);
}
.bs-row h2 {
  font-family: "Poppins", sans-serif;
  font-weight: 900;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.bs-row p + p,
.bs-row ul + p,
.bs-row p + ul {
  margin-top: 14px;
}
.bs-row p {
  color: rgba(11, 37, 69, 0.68);
}
.bs-row strong {
  color: #0b2545;
}

.bs-fleet-list {
  display: grid;
  gap: 8px;
}

.bs-fleet-item {
  color: rgba(11, 37, 69, 0.68);
}
.bs-fleet-item .bs-chip {
  margin-right: 10px;
}
.bs-fleet-item em {
  padding: 0 4px;
  border-radius: 4px;
  background: #ffd23f;
  font-style: normal;
  font-weight: 700;
  color: #0b2545;
}

.bs-faq details {
  border-bottom: 2px dashed rgba(11, 37, 69, 0.15);
}
.bs-faq summary {
  padding: 16px 0;
  font-weight: 700;
  cursor: pointer;
}
.bs-faq p {
  padding-bottom: 16px;
}

.bs-foot {
  padding: 28px clamp(18px, 5vw, 80px) 40px;
  border-top: 2px dashed rgba(11, 37, 69, 0.15);
  font-size: 0.88rem;
  color: rgba(11, 37, 69, 0.68);
  text-align: center;
}
.bs-foot a {
  color: #0b2545;
}

.bs-foot-meta {
  margin-top: 8px !important;
  font-size: 0.8rem;
}

.bs-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  max-width: calc(100vw - 32px);
  padding: 12px 20px;
  border: 2px solid #0b2545;
  border-radius: 99px;
  background: #fff;
  color: #0b2545;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 0 4px 0 #0b2545;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.bs-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.is-offline .bs-status::after {
  content: " · reconnecting…";
  font-weight: 500;
  color: rgba(11, 37, 69, 0.68);
}

@media (max-width: 860px) {
  .bs-setup.bs-only-setup,
  .bs-place-body {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .bs-hero {
    order: -1;
  }
  .bs-hero-frame {
    width: min(300px, 80%);
  }
  .bs-battle {
    grid-template-columns: minmax(0, 1fr);
  }
  .bs-board--own {
    width: min(360px, 100%);
    margin: 0 auto;
  }
  .bs-row {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 480px) {
  .bs-choice,
  .bs-names {
    grid-template-columns: 1fr;
  }
  .bs-score {
    padding: 12px 14px;
  }
  .bs-player-name {
    font-size: 1rem;
  }
  .bs-pip {
    width: 12px;
    height: 7px;
  }
  .bs-sea-frame {
    grid-template-columns: 14px minmax(0, 1fr);
    grid-template-rows: 14px auto;
    padding: 8px 9px 9px 6px;
    border-radius: 20px;
  }
  .bs-emote {
    width: 40px;
    height: 40px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bs-sea::before,
  .bs-hero-sea::before,
  .bs-hero-boat,
  .bs-boat,
  .bs-bob,
  .bs-streak,
  .bs-mark::after,
  .bs-mark--hit svg {
    animation: none !important;
  }
  .bs-btn,
  .bs-toast,
  .bs-banner {
    transition: none;
  }
}
