/* The combo layer is a small, shell-owned play surface. Native artwork is
   hidden only while the shell carries the scoped combo phase attribute. */
.browser-shell[data-combo-phase] #blob,
.browser-shell[data-combo-phase] #floor-shadow {
  visibility: hidden;
  opacity: 0;
}

.browser-shell .combo-layer {
  opacity: 0;
  pointer-events: none;
  overflow: visible;
  isolation: isolate;
  transition: opacity .22s ease;
}

.browser-shell[data-combo-phase] .combo-layer {
  opacity: 1;
}

.browser-shell .combo-basin,
.browser-shell .combo-rail,
.browser-shell .combo-shadow,
.browser-shell .combo-words,
.browser-shell .combo-actor,
.browser-shell .combo-harp {
  opacity: 0;
  transition: opacity .24s ease, transform .32s cubic-bezier(.22, .8, .28, 1);
}

.browser-shell .combo-layer[data-phase="bowl"] .combo-basin,
.browser-shell .combo-layer[data-phase="bowl"] .combo-shadow,
.browser-shell .combo-layer[data-phase="bowl"] .combo-words,
.browser-shell .combo-layer[data-phase="bowl"] .combo-actor,
.browser-shell .combo-layer[data-phase="rail"] .combo-rail,
.browser-shell .combo-layer[data-phase="rail"] .combo-shadow,
.browser-shell .combo-layer[data-phase="rail"] .combo-words,
.browser-shell .combo-layer[data-phase="rail"] .combo-actor,
.browser-shell .combo-layer[data-phase="harp"] .combo-shadow,
.browser-shell .combo-layer[data-phase="harp"] .combo-words,
.browser-shell .combo-layer[data-phase="harp"] .combo-actor,
.browser-shell .combo-layer[data-phase="harp"] .combo-harp,
.browser-shell .combo-layer[data-phase="finish"] .combo-basin,
.browser-shell .combo-layer[data-phase="finish"] .combo-shadow,
.browser-shell .combo-layer[data-phase="finish"] .combo-words,
.browser-shell .combo-layer[data-phase="finish"] .combo-actor {
  opacity: 1;
}

.browser-shell .combo-basin-fill {
  fill: #f8e8dc;
  stroke: #d6ab9d;
  stroke-width: 3;
  stroke-linejoin: round;
  filter: drop-shadow(0 8px 0 #a86f5b1f);
}

.browser-shell .combo-basin-line {
  fill: none;
  stroke: #d19d8f;
  stroke-width: 2;
  stroke-linecap: round;
  opacity: .75;
}

.browser-shell .combo-rail-line {
  fill: none;
  stroke: #bf8e73;
  stroke-width: 7;
  stroke-linecap: round;
  filter: drop-shadow(0 4px 0 #8b5f501f);
}

.browser-shell .combo-rail-support {
  fill: none;
  stroke: #d4aa8d;
  stroke-width: 5;
  stroke-linecap: round;
}

.browser-shell .combo-shadow {
  pointer-events: none;
  transform-origin: 300px 450px;
}

.browser-shell .combo-harp {
  pointer-events: none;
  transform-box: fill-box;
  transform-origin: 300px 284px;
}

.browser-shell .combo-clothesline {
  fill: #6c5b73;
  stroke: #6c5b73;
  stroke-width: 2;
  stroke-linecap: round;
  filter: drop-shadow(0 4px 0 #8b5f501f);
}

.browser-shell .combo-string {
  fill: none;
  stroke: #d4aa8d;
  stroke-width: 3;
  stroke-linecap: round;
  transform-box: fill-box;
  transform-origin: center top;
  transition: transform .18s ease, opacity .18s ease;
}

.browser-shell .combo-bookmarks {
  opacity: 0;
  transition: opacity .2s ease;
}
.browser-shell .combo-bookmarks[data-visible="true"] { opacity: 1; }
.browser-shell .combo-string[data-tidy="true"] { opacity: .15; }

.browser-shell .combo-bookmark {
  fill: var(--combo-color, #ef91a7);
  stroke: var(--combo-ink, #a85578);
  stroke-width: 2;
  stroke-linejoin: round;
}

.browser-shell .combo-layer[data-phase="rail"] .combo-shadow {
  opacity: .72;
}

.browser-shell .combo-layer[data-phase="harp"] .combo-shadow {
  opacity: .52;
}

.browser-shell .combo-actor {
  transform-origin: 300px 175px;
  filter: drop-shadow(0 8px 0 #7f5b6a22);
}

.browser-shell .combo-actor.combo-material-gum { --combo-color: #ef91a7; --combo-ink: #a85578; }
.browser-shell .combo-actor.combo-material-jelly { --combo-color: #84c8c3; --combo-ink: #277d83; }
.browser-shell .combo-actor.combo-material-spring { --combo-color: #e8b94e; --combo-ink: #aa711d; }
.browser-shell .combo-actor.combo-material-stone { --combo-color: #9388ae; --combo-ink: #5c526d; }

.browser-shell .combo-skin {
  stroke: var(--combo-ink, #b8607b);
}

.browser-shell .combo-layer[data-phase="bowl"] .combo-actor {
  animation: combo-gather .55s ease-out both;
}

.browser-shell .combo-layer[data-phase="finish"] .combo-actor {
  animation: combo-bounce .62s cubic-bezier(.22, .8, .28, 1) both;
}

.browser-shell .combo-words {
  overflow: visible;
}

.browser-shell .combo-word-visual {
  font: 700 21px/1 "Hiragino Maru Gothic ProN", "Arial Rounded MT Bold", sans-serif;
  letter-spacing: .06em;
  paint-order: stroke fill;
  stroke: #fff9f0;
  stroke-width: 5px;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 0 #765a5926);
  transform-box: fill-box;
  transform-origin: center;
}

.browser-shell .combo-word-visual.combo-word-tidy {
  font-size: 17px;
  stroke-width: 4px;
}

.browser-shell .combo-controls {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  opacity: 1;
  visibility: visible;
  transition: opacity .18s ease, visibility .18s ease;
}

.browser-shell .combo-controls[data-phase="idle"],
.browser-shell .combo-controls[data-phase="finish"] {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.browser-shell .combo-next,
.browser-shell .combo-detour,
.browser-shell .combo-letter {
  position: absolute;
  display: grid;
  place-items: center;
  border: 1px solid #c9a496;
  border-radius: 13px;
  color: #674d4f;
  background: #fff9f0e8;
  box-shadow: 0 3px 0 #8c625325, 0 7px 14px #6f4d3f1c;
  cursor: pointer;
  font: 700 11px/1.1 "Hiragino Maru Gothic ProN", "Arial Rounded MT Bold", sans-serif;
  letter-spacing: .04em;
  user-select: none;
  pointer-events: auto;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, opacity .18s ease;
}

.browser-shell .combo-next:hover,
.browser-shell .combo-detour:hover,
.browser-shell .combo-letter:hover {
  background: #fffdf8;
  transform: translateY(-2px) rotate(-1deg);
  box-shadow: 0 5px 0 #8c625325, 0 10px 15px #6f4d3f25;
}

.browser-shell .combo-next:active,
.browser-shell .combo-detour:active,
.browser-shell .combo-letter:active {
  transform: translateY(2px) rotate(1deg);
  box-shadow: 0 1px 0 #8c625325, 0 4px 8px #6f4d3f18;
}

.browser-shell .combo-next:disabled,
.browser-shell .combo-detour:disabled,
.browser-shell .combo-letter:disabled {
  cursor: default;
  opacity: .38;
  pointer-events: none;
}

.browser-shell .combo-next:focus-visible,
.browser-shell .combo-detour:focus-visible,
.browser-shell .combo-letter:focus-visible {
  outline: 3px solid #4f8db8;
  outline-offset: 3px;
}

.browser-shell .combo-next {
  border-color: #b88b80;
  color: #7d4855;
  background: #fff2f0ec;
}

.browser-shell .combo-detour {
  border-color: #a4b5a0;
  color: #4d6d58;
  background: #f2f8edec;
}

.browser-shell .combo-letter {
  border-color: var(--combo-ink, #a85578);
  color: var(--combo-ink, #a85578);
  background: color-mix(in srgb, var(--combo-color, #ef91a7) 28%, #fff9f0);
  font-size: 16px;
  touch-action: none;
}

/* The explicit rule wins over the button display declaration above. */
.browser-shell .combo-letter[hidden] {
  display: none !important;
}

.browser-shell .combo-letter-1 { rotate: -3deg; }
.browser-shell .combo-letter-2 { rotate: 2deg; }
.browser-shell .combo-letter-3 { rotate: -1deg; }

.browser-shell .combo-instruction {
  position: absolute;
  right: 10px;
  bottom: 5px;
  max-width: 62%;
  min-height: 44px;
  display: grid;
  place-items: center end;
  color: #7c6860;
  font: 600 10px/1.25 "Hiragino Maru Gothic ProN", "Arial Rounded MT Bold", sans-serif;
  letter-spacing: .06em;
  pointer-events: none;
  text-align: right;
}

@keyframes combo-gather {
  0% { scale: .96 1.04; }
  55% { scale: 1.03 .96; }
  100% { scale: 1 1; }
}

@keyframes combo-bounce {
  0% { scale: 1 1; }
  42% { scale: .97 1.04; }
  72% { scale: 1.04 .96; }
  100% { scale: 1 1; }
}

.browser-shell .combo-layer[data-reduced-motion="true"] *,
.browser-shell .combo-layer[data-reduced-motion="true"] *::before,
.browser-shell .combo-layer[data-reduced-motion="true"] *::after {
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  scroll-behavior: auto !important;
  transition-duration: .001ms !important;
}

@media (max-width: 420px) {
  .browser-shell .combo-next,
  .browser-shell .combo-detour {
    font-size: 10px;
    letter-spacing: 0;
  }

  .browser-shell .combo-letter {
    font-size: 15px;
    padding: 0 2px;
  }

  .browser-shell .combo-instruction {
    right: 7px;
    bottom: 3px;
    max-width: 58%;
    font-size: 9px;
  }
}
