.sketchball-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  color: var(--line-color);
  font-family: 'Roboto', sans-serif;
}

.sketchball-modal.is-open { display: block; }
.sketchball-modal *, .sketchball-modal *::before, .sketchball-modal *::after { box-sizing: border-box; }

.sketchball-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .28);
}

.sketchball-modal__panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 440px);
  max-height: 88vh;
  max-height: 88dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px;
  background: var(--primary-color);
  border: 2px solid var(--line-color);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .28);
  text-align: center;
}

.sketchball-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--line-color);
  border-radius: 10px;
  background: transparent;
  color: var(--line-color);
  cursor: pointer;
  font-size: 1.1rem;
}

.sketchball-modal h2 {
  margin: 4px 40px 10px;
  color: inherit;
  font-size: clamp(1.5rem, 6vw, 2rem);
  line-height: 1.25;
}

.sketchball-modal p {
  margin: 0 0 20px;
  color: inherit;
  font-size: 1rem;
  line-height: 1.5;
}

.sketchball-modal__image {
  display: block;
  width: min(100%, 260px);
  height: auto;
  margin: 0 auto 22px;
  border: 2px solid var(--line-color);
  border-radius: 16px;
}

.sketchball-modal__play {
  width: 100%;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
  padding: 14px 12px;
  border: 2px solid var(--line-color);
  border-radius: 12px;
  background: var(--line-color);
  color: var(--primary-color);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 700;
}

.sketchball-modal p.sketchball-modal__note {
  margin: 16px 0 0;
  font-size: .85rem;
}

.sketchball-modal__close:hover { background: rgba(255, 255, 255, .08); }
.sketchball-modal__play:hover { opacity: .9; }
.sketchball-modal :focus-visible { outline: 2px solid var(--line-color); outline-offset: 4px; }

@media (max-width: 380px), (max-height: 700px) {
  .sketchball-modal__panel { padding: 18px; }
  .sketchball-modal__image { width: min(100%, 200px); }
}
