/* Public-domain SVG texture: https://commons.wikimedia.org/wiki/File:Bubble.svg */
.bubble {
  background:
    radial-gradient(circle at 76% 78%, color-mix(in srgb, var(--bubble) 18%, transparent), transparent 31%),
    radial-gradient(circle at 27% 20%, rgba(255,255,255,.14), transparent 32%),
    radial-gradient(circle at 50% 54%, rgba(247,248,255,.10), rgba(17,15,30,.58) 100%);
  border:2px solid color-mix(in srgb, var(--bubble) 78%, white);
  box-shadow:
    inset 5px 5px 15px rgba(255,255,255,.1),
    inset -9px -9px 20px rgba(9,7,20,.24),
    0 14px 30px rgba(0,0,0,.28),
    0 0 18px color-mix(in srgb, var(--bubble) 66%, transparent),
    0 0 42px color-mix(in srgb, var(--bubble) 30%, transparent);
}
.bubble-skin {
  position:absolute;
  inset:-2%;
  width:104%;
  height:104%;
  object-fit:fill;
  opacity:.56;
  filter:saturate(.58) contrast(1.08);
  mix-blend-mode:screen;
  pointer-events:none;
  user-select:none;
  z-index:0;
}
.bubble::before {
  content:"";
  width:34%;
  height:11%;
  top:10%;
  left:15%;
  background:rgba(255,255,255,.2);
  filter:blur(5px);
  opacity:.62;
  z-index:0;
}
.bubble::after {
  content:"";
  position:absolute;
  inset:2px;
  border-radius:inherit;
  background:conic-gradient(from 215deg, transparent, rgba(210,255,250,.28), rgba(248,172,255,.3), rgba(255,224,151,.25), transparent 43%);
  opacity:.35;
  mix-blend-mode:screen;
  pointer-events:none;
  z-index:0;
}
.bubble h3,.bubble p,.bubble .badge,.bubble-actions { position:relative; z-index:1; }
.bubble h3 { text-shadow:0 1px 5px rgba(0,0,0,.48); }
.bubble .next,.bubble .due {
  color:#fff;
  font-weight:700;
  text-shadow:0 1px 5px rgba(0,0,0,.95),0 0 14px rgba(0,0,0,.68);
}
article.bubble .due.overdue,article.bubble .due.today,article.bubble .due.missing { color:#fff; }
.bubble .license {
  align-self:center;
  margin-bottom:9px;
  padding:4px 10px;
  border:1px solid color-mix(in srgb, var(--bubble) 48%, white);
  border-radius:999px;
  background:rgba(12,11,27,.64);
  color:#fff;
  font-weight:800;
  letter-spacing:.03em;
  text-shadow:0 1px 4px rgba(0,0,0,.9);
  box-shadow:0 3px 10px rgba(0,0,0,.2);
}
.bubble .next { font-weight:600; }
.bubble-actions button,.bubble-actions a { min-height:30px; display:inline-flex; align-items:center; justify-content:center; }

/* Mobile-first reading mode: one roomy bubble at a time. */
@media (max-width: 600px) {
  .app-shell { padding:24px 14px 44px; }
  .hero { gap:18px; margin-bottom:18px; }
  .hero h1 { font-size:43px; }
  .subtitle { font-size:13px; }
  .target-card { min-width:0; padding:15px 17px; }
  .scoreboard { gap:7px; margin-bottom:12px; }
  .score { min-width:0; padding:10px; }
  .score .person { font-size:12px; gap:7px; }
  .score strong { font-size:11px; white-space:nowrap; }
  .avatar { width:21px; height:21px; }
  .tanks { gap:12px; }
  .tank { min-height:0; border-radius:20px; }
  .tank-head { padding:16px 15px 13px; }
  .tank-name { font-size:17px; gap:8px; }
  .count { font-size:9px; }
  .add { min-height:38px; padding:8px 11px; font-size:11px; }
  .bubble-field { padding:20px 10px 18px; gap:14px; justify-content:center; }
  .bubble {
    flex-basis:min(92vw, 356px);
    padding:28px 25px 24px;
    animation-duration:var(--float-speed, 5.5s);
  }
  .bubble h3 { font-size:clamp(17px, 5vw, 21px); margin-bottom:10px; }
  .bubble .license { font-size:12px; margin-bottom:9px; }
  .badge { font-size:9px; padding:4px 8px; margin-bottom:12px; }
  .bubble .next { font-size:11px; min-height:28px; }
  .bubble-actions { gap:8px; margin-top:12px; }
  .bubble-actions button,.bubble-actions a { min-height:36px; padding:7px 12px; font-size:10px; }
  .hall { margin-top:14px; padding:20px 16px; gap:16px; }
  .hall h2 { font-size:29px; }
  .records { gap:16px; }
}

@media (min-width: 601px) and (max-width: 1150px) {
  .tanks { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .tank:last-child { grid-column:1 / -1; }
  .tank:last-child .bubble-field { max-width:50%; }
  .bubble h3 { font-size:15px; }
  .bubble .next { font-size:10px; }
}

@media (max-width: 390px) {
  .scoreboard { flex-direction:column; }
  .bubble { flex-basis:min(94vw, 336px); padding:24px 21px 20px; }
  .bubble h3 { font-size:17px; }
}

@media (prefers-reduced-motion: reduce) {
  .bubble { animation:none; }
}

/* A bubble never becomes too small for its text. It can become a gentle oval
   when an artist has a longer next step or both actions. */
.bubble-field { align-items:flex-start; }
.bubble {
  flex:0 1 var(--bubble-size,252px);
  min-width:min(100%,210px);
  min-height:var(--bubble-size,252px);
  aspect-ratio:auto;
  border-radius:50%;
}
.bubble h3,.bubble .next,.bubble .due { overflow-wrap:anywhere; }
.bubble-actions { flex-wrap:wrap; }

@media (max-width: 600px) {
  .bubble {
    flex-basis:min(92vw,356px);
    min-width:0;
    min-height:min(92vw,356px);
    border-radius:48%;
  }
}

@media (max-width: 390px) {
  .bubble {
    flex-basis:min(94vw,336px);
    min-height:min(94vw,336px);
  }
}

/* A tiny volume change makes the motion feel more like a real soap bubble. */
@keyframes float {
  0%,100% { transform:translate(var(--drift-x,0),0) rotate(-1deg) scale(.985); }
  50% { transform:translate(calc(var(--drift-x,0) * -1),-9px) rotate(1.5deg) scale(1.018); }
}
