.bingo-page {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 48px 16px 32px;
}

.bingo-intro {
  text-align: center;
  margin-bottom: 24px;
}

.bingo-eyebrow {
  margin: 0 0 8px;
  color: #0877ff;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bingo-intro h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 3.5rem);
  letter-spacing: -0.04em;
}

.bingo-intro p:last-child,
.bingo-note {
  color: #526079;
}

.bingo-card {
  padding: 12px;
  border: 1px solid #d9e5f5;
  border-radius: 18px;
  background: #f7fbff;
  box-shadow: 0 16px 40px rgba(6, 20, 43, 0.1);
}

.bingo-headers,
.bingo-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.bingo-headers {
  margin-bottom: 8px;
}

.bingo-header {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 2px;
  color: #06142b;
  text-align: center;
}

.bingo-header-letter {
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  font-weight: 900;
  line-height: 1;
}

.bingo-header-topic {
  max-width: 100%;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.bingo-square {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 92px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 6px;
  padding: 10px;
  border: 1px solid #cddbf0;
  border-radius: 12px;
  color: #06142b;
  background: #fff;
  font: inherit;
  line-height: 1.25;
  text-align: left;
}

button.bingo-square {
  cursor: pointer;
}

button.bingo-square:hover {
  border-color: #0877ff;
  background: #eef7ff;
}

.bingo-square-number {
  color: #0877ff;
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1;
}

.bingo-square-scenario {
  display: -webkit-box;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.76rem;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.bingo-square-detail {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: #526079;
  stroke-width: 1.75;
}

.bingo-square-free {
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #0877ff;
  font-weight: 900;
  text-align: center;
}

.bingo-square:focus-visible,
.text-modal button:focus-visible {
  outline: 3px solid #ff2d2d;
  outline-offset: 2px;
}

.bingo-note {
  margin: 18px 0 0;
  text-align: center;
}

.text-modal {
  width: min(90vw, 480px);
  padding: 0;
  border: 0;
  border-radius: 16px;
  color: #06142b;
  box-shadow: 0 24px 80px rgba(6, 20, 43, 0.3);
}

.text-modal::backdrop {
  background: rgba(6, 20, 43, 0.58);
}

.text-modal-body {
  padding: 24px;
}

.text-modal-body p {
  margin: 0 0 20px;
  font-size: 1.05rem;
  line-height: 1.5;
}

.text-modal button {
  border: 0;
  border-radius: 8px;
  padding: 10px 18px;
  color: #fff;
  background: #0877ff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 480px) and (min-width: 320px) {
  .bingo-page {
    padding: 28px 6px 24px;
  }

  .bingo-card {
    padding: 6px;
    border-radius: 12px;
  }

  .bingo-headers,
  .bingo-grid {
    gap: 4px;
  }

  .bingo-square {
    min-height: 78px;
    gap: 4px;
    padding: 5px 4px;
    border-radius: 8px;
  }

  .bingo-header {
    gap: 3px;
    padding: 5px 1px;
  }

  .bingo-header-letter {
    font-size: 1.1rem;
  }

  .bingo-header-topic {
    font-size: 0.5rem;
  }

  .bingo-square-number {
    font-size: 0.72rem;
  }

  .bingo-square-scenario {
    font-size: 0.57rem;
    line-height: 1.2;
  }

  .bingo-square-detail {
    right: 4px;
    bottom: 4px;
    width: 11px;
    height: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bingo-square,
  .text-modal {
    scroll-behavior: auto;
  }
}
