#ub-binary-drop-game,
    #ub-binary-drop-game * {
      box-sizing: border-box;
    }

    #ub-binary-drop-game {
      --ubbdg-text: #31313d;
      --ubbdg-sub: #78788a;
      --ubbdg-line: rgba(104, 92, 164, 0.22);
      --ubbdg-panel: rgba(255, 255, 255, 0.84);
      --ubbdg-pink: #ff83b7;
      --ubbdg-purple: #9a86ff;
      --ubbdg-cyan: #76dbe8;
      --ubbdg-danger: #ff6688;
      --ubbdg-ok: #58c9b9;
      --ubbdg-shadow: 0 16px 42px rgba(77, 65, 125, 0.10);

      width: min(100%, 760px);
      max-width: 100%;
      margin: clamp(10px, 2.5vh, 24px) auto;
      color: var(--ubbdg-text);
      font-family:
        -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Kaku Gothic ProN",
        "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
      font-weight: 400;
      line-height: 1.5;
      -webkit-text-size-adjust: 100%;
      isolation: isolate;
      background: transparent;
    }

    #ub-binary-drop-game button {
      font: inherit;
      color: inherit;
      -webkit-tap-highlight-color: transparent;
    }

    #ub-binary-drop-game .ubbdg-shell {
      position: relative;
      overflow: hidden;
      border: 1px solid var(--ubbdg-line);
      border-radius: 24px;
      background: transparent;
      box-shadow: var(--ubbdg-shadow);
    }

    #ub-binary-drop-game .ubbdg-head {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 12px;
      align-items: end;
      padding: clamp(10px, 2.2vh, 20px) clamp(10px, 2.6vw, 20px) clamp(8px, 1.8vh, 14px);
    }

    #ub-binary-drop-game .ubbdg-kicker {
      margin: 0;
      color: var(--ubbdg-sub);
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.14em;
      text-transform: uppercase;
    }

    #ub-binary-drop-game .ubbdg-title {
      margin: 0;
      font-size: clamp(20px, 4vw, 31px);
      font-weight: 500;
      letter-spacing: 0.02em;
    }

    #ub-binary-drop-game .ubbdg-score {
      display: grid;
      grid-template-columns: repeat(2, minmax(58px, auto));
      gap: 14px;
      align-items: center;
      text-align: center;
    }

    #ub-binary-drop-game .ubbdg-stat {
      min-width: 58px;
      text-align: center;
    }

    #ub-binary-drop-game .ubbdg-stat-label {
      display: block;
      color: var(--ubbdg-sub);
      font-size: 10px;
      letter-spacing: 0.08em;
    }

    #ub-binary-drop-game .ubbdg-stat-value {
      display: block;
      margin-top: 2px;
      font-size: clamp(15px, 2.8vw, 19px);
      font-weight: 500;
      font-variant-numeric: tabular-nums;
      text-align: center;
    }

    #ub-binary-drop-game .ubbdg-miss-value {
      display: inline-flex;
      align-items: baseline;
      justify-content: center;
      gap: .38em;
      white-space: nowrap;
    }

    #ub-binary-drop-game .ubbdg-field {
      position: relative;
      height: clamp(240px, min(62vw, 52dvh), 520px);
      margin: 0 14px;
      overflow: hidden;
      border: 1px solid rgba(104, 92, 164, 0.16);
      border-radius: 18px;
      background:
        linear-gradient(rgba(255,255,255,0.72), rgba(255,255,255,0.72)),
        repeating-linear-gradient(
          0deg,
          transparent 0,
          transparent 39px,
          rgba(120, 105, 180, 0.045) 40px
        );
      touch-action: manipulation;
    }

    #ub-binary-drop-game .ubbdg-guide {
      position: absolute;
      left: 4%;
      right: 4%;
      top: 78%;
      height: 1px;
      background: linear-gradient(
        90deg,
        transparent,
        rgba(154,134,255,0.72) 15%,
        rgba(255,131,183,0.72) 50%,
        rgba(118,219,232,0.72) 85%,
        transparent
      );
      pointer-events: none;
    }


    #ub-binary-drop-game .ubbdg-number {
      position: absolute;
      left: 50%;
      top: 16px;
      width: clamp(44px, 13vw, 82px);
      max-width: calc(100% - 24px);
      aspect-ratio: 1;
      display: grid;
      place-items: center;
      border: 1.5px solid rgba(108, 92, 170, 0.42);
      border-radius: 50%;
      background: rgba(255,255,255,0.78);
      box-shadow: 0 10px 28px rgba(82, 69, 130, 0.09);
      transform: translate3d(-50%, 0, 0);
      font-size: clamp(16px, 4.6vw, 30px);
      font-weight: 500;
      font-variant-numeric: tabular-nums;
      user-select: none;
      will-change: transform;
      z-index: 3;
    }

    #ub-binary-drop-game .ubbdg-number::before {
      content: "";
      position: absolute;
      inset: -5px;
      border: 1px solid rgba(255,131,183,0.18);
      border-radius: inherit;
      pointer-events: none;
    }

    #ub-binary-drop-game .ubbdg-center-message {
      position: absolute;
      inset: 0;
      display: grid;
      place-items: center;
      padding: 24px;
      text-align: center;
      pointer-events: none;
      z-index: 4;
    }

    #ub-binary-drop-game .ubbdg-message-card {
      display: grid;
      justify-items: center;
      gap: 12px;
      min-width: min(220px, 70%);
      padding: 12px;
      transition: opacity .18s ease, transform .18s ease;
    }

    #ub-binary-drop-game .ubbdg-message-main {
      margin: 0;
      font-size: clamp(24px, 6vw, 42px);
      font-weight: 400;
      letter-spacing: .08em;
      font-variant-numeric: tabular-nums;
      white-space: pre-line;
    }


    #ub-binary-drop-game .ubbdg-message-main.is-ready {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: clamp(92px, 22vw, 126px);
      min-height: clamp(42px, 9vw, 54px);
      padding: 7px 13px;
      border: 1px solid rgba(104, 92, 164, 0.28);
      border-radius: 12px;
      background: rgba(255,255,255,0.56);
      font-size: clamp(14px, 3.2vw, 19px);
      font-weight: 650;
      line-height: 1;
      letter-spacing: .055em;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35);
    }

    #ub-binary-drop-game .ubbdg-message-main.is-finish {
      font-size: clamp(12px, 2.6vw, 16px);
      line-height: 1.2;
      letter-spacing: .04em;
      white-space: nowrap;
    }

    #ub-binary-drop-game .ubbdg-wrong-answer {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: clamp(118px, 24vw, 168px);
      min-height: clamp(44px, 9vw, 56px);
      padding: 6px 16px;
      border: 1.5px solid rgba(108, 92, 170, 0.42);
      border-radius: 999px;
      background: rgba(255,255,255,0.78);
      box-shadow: 0 7px 20px rgba(82, 69, 130, 0.06);
      font-size: clamp(14px, 3vw, 18px);
      font-weight: 500;
      font-variant-numeric: tabular-nums;
      line-height: 1;
      white-space: nowrap;
    }

    #ub-binary-drop-game .ubbdg-correct-message {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: .35em;
      margin: 0;
      font-size: 0;
      font-weight: 500;
      letter-spacing: .04em;
    }

    #ub-binary-drop-game .ubbdg-correct-message[hidden] {
      display: none !important;
    }

    #ub-binary-drop-game .ubbdg-bell {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: clamp(38px, 8vw, 48px);
      height: clamp(42px, 9vw, 52px);
      transform-origin: 50% 12%;
      filter: drop-shadow(0 5px 10px rgba(82, 69, 130, 0.06));
    }

    #ub-binary-drop-game .ubbdg-bell-svg {
      display: block;
      width: 100%;
      height: 100%;
      overflow: visible;
    }

    #ub-binary-drop-game .ubbdg-bell-body {
      fill: rgba(154, 134, 255, 0.055);
      stroke: rgba(104, 92, 164, 0.46);
      stroke-width: 1.8;
      stroke-linecap: round;
      stroke-linejoin: round;
      vector-effect: non-scaling-stroke;
    }

    #ub-binary-drop-game .ubbdg-bell-handle,
    #ub-binary-drop-game .ubbdg-bell-rim,
    #ub-binary-drop-game .ubbdg-bell-clapper {
      fill: none;
      stroke: rgba(104, 92, 164, 0.46);
      stroke-width: 1.8;
      stroke-linecap: round;
      stroke-linejoin: round;
      vector-effect: non-scaling-stroke;
    }

    #ub-binary-drop-game .ubbdg-bell.is-ringing {
      animation: ubbdg-bell-ring .48s ease-out 1;
    }

    #ub-binary-drop-game .ubbdg-bell.is-ringing .ubbdg-bell-clapper {
      animation: ubbdg-bell-clapper .48s ease-out 1;
      transform-origin: 24px 45px;
    }

    @keyframes ubbdg-bell-ring {
      0%, 100% { transform: rotate(0deg); }
      20% { transform: rotate(6deg); }
      40% { transform: rotate(-5deg); }
      60% { transform: rotate(3deg); }
      80% { transform: rotate(-1.5deg); }
    }

    @keyframes ubbdg-bell-clapper {
      0%, 100% { transform: rotate(0deg); }
      30% { transform: rotate(7deg); }
      60% { transform: rotate(-7deg); }
    }

    #ub-binary-drop-game .ubbdg-message-card.is-hidden {
      opacity: 0;
      transform: scale(.98);
    }

    #ub-binary-drop-game .ubbdg-message-card .ubbdg-start {
      pointer-events: auto;
    }

    #ub-binary-drop-game .ubbdg-flash {
      position: absolute;
      inset: 0;
      opacity: 0;
      pointer-events: none;
      transition: opacity .12s ease;
      z-index: 1;
    }

    #ub-binary-drop-game .ubbdg-flash.is-ok {
      background: rgba(88, 201, 185, 0.12);
      opacity: 1;
    }

    #ub-binary-drop-game .ubbdg-flash.is-ng {
      background: rgba(255, 102, 136, 0.11);
      opacity: 1;
    }

    #ub-binary-drop-game .ubbdg-pause-row {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 14px;
      padding: 9px 14px 0;
      flex-wrap: wrap;
    }

    #ub-binary-drop-game .ubbdg-pause {
      min-width: 92px;
      min-height: 32px;
      padding: 5px 14px;
      border: 1px solid rgba(104, 92, 164, 0.28);
      border-radius: 999px;
      background: rgba(154, 134, 255, 0.04);
      color: var(--ubbdg-sub);
      cursor: pointer;
      font-size: 10px;
      font-weight: 600;
      letter-spacing: .10em;
      transition: transform .08s ease, border-color .15s ease, background .15s ease, opacity .15s ease;
    }

    #ub-binary-drop-game .ubbdg-pause:hover:not(:disabled) {
      border-color: rgba(154, 134, 255, 0.60);
      background: rgba(154, 134, 255, 0.075);
    }

    #ub-binary-drop-game .ubbdg-pause:active:not(:disabled) {
      transform: scale(.97);
    }

    #ub-binary-drop-game .ubbdg-pause:disabled {
      cursor: default;
      opacity: .34;
    }

    #ub-binary-drop-game .ubbdg-pause:focus-visible {
      outline: 2px solid rgba(90, 82, 170, 0.68);
      outline-offset: 2px;
    }

    #ub-binary-drop-game .ubbdg-sound {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      color: var(--ubbdg-sub);
      font-size: 10px;
      font-weight: 600;
      letter-spacing: .08em;
      white-space: nowrap;
    }

    #ub-binary-drop-game .ubbdg-sound-toggle {
      position: relative;
      width: 38px;
      height: 20px;
      padding: 0;
      border: 1px solid rgba(104, 92, 164, 0.28);
      border-radius: 999px;
      background: transparent;
      cursor: pointer;
      transition: transform .08s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
    }

    #ub-binary-drop-game .ubbdg-sound-toggle[aria-pressed="true"] {
      border-color: rgba(154,134,255,0.62);
      background: linear-gradient(
        135deg,
        rgba(255,131,183,0.10),
        rgba(118,219,232,0.12)
      );
      box-shadow: inset 0 0 0 1px rgba(255,255,255,0.5);
    }

    #ub-binary-drop-game .ubbdg-sound-knob {
      position: absolute;
      top: 3px;
      left: 3px;
      width: 12px;
      height: 12px;
      border: 1px solid rgba(104, 92, 164, 0.28);
      border-radius: 50%;
      background: rgba(255,255,255,0.92);
      transition: transform .16s ease, border-color .15s ease;
    }

    #ub-binary-drop-game .ubbdg-sound-toggle[aria-pressed="true"] .ubbdg-sound-knob {
      transform: translateX(18px);
      border-color: rgba(154,134,255,0.62);
    }

    #ub-binary-drop-game .ubbdg-sound-toggle:hover {
      border-color: rgba(154,134,255,0.62);
    }

    #ub-binary-drop-game .ubbdg-sound-toggle:active {
      transform: scale(.96);
    }

    #ub-binary-drop-game .ubbdg-sound-toggle:focus-visible {
      outline: 2px solid rgba(90, 82, 170, 0.68);
      outline-offset: 2px;
    }

    #ub-binary-drop-game .ubbdg-controls {
      padding: clamp(10px, 2vh, 17px) clamp(9px, 2vw, 14px) clamp(12px, 2.4vh, 20px);
    }

    #ub-binary-drop-game .ubbdg-bits,
    #ub-binary-drop-game .ubbdg-bit-guide {
      display: grid;
      grid-template-columns: repeat(8, minmax(0, 1fr));
      gap: clamp(4px, 1vw, 8px);
    }

    #ub-binary-drop-game .ubbdg-bit-wrap {
      min-width: 0;
      text-align: center;
    }

    #ub-binary-drop-game .ubbdg-bit-guide {
      margin-top: 6px;
      color: var(--ubbdg-sub);
      text-align: center;
      font-size: clamp(8px, 1.9vw, 11px);
      font-variant-numeric: tabular-nums;
      line-height: 1.2;
      user-select: none;
    }


    #ub-binary-drop-game .ubbdg-bit {
      width: 100%;
      min-width: 0;
      min-height: clamp(38px, 7vh, 48px);
      padding: 7px 2px;
      border: 1px solid rgba(104, 92, 164, 0.28);
      border-radius: 12px;
      background: rgba(255,255,255,0.56);
      cursor: pointer;
      font-size: clamp(18px, 4.2vw, 26px);
      font-weight: 500;
      line-height: 1;
      transition:
        transform .08s ease,
        border-color .15s ease,
        background .15s ease,
        box-shadow .15s ease;
      user-select: none;
    }

    #ub-binary-drop-game .ubbdg-bit:hover {
      border-color: rgba(154,134,255,0.62);
    }

    #ub-binary-drop-game .ubbdg-bit:active {
      transform: scale(.96);
    }

    #ub-binary-drop-game .ubbdg-bit[aria-pressed="true"] {
      border-color: rgba(154,134,255,0.62);
      background:
        linear-gradient(135deg, rgba(255,131,183,0.10), rgba(118,219,232,0.12));
      box-shadow: inset 0 0 0 1px rgba(255,255,255,0.5);
    }

    #ub-binary-drop-game .ubbdg-bit:focus-visible,
    #ub-binary-drop-game .ubbdg-start:focus-visible {
      outline: 2px solid rgba(90, 82, 170, 0.68);
      outline-offset: 2px;
    }


    #ub-binary-drop-game .ubbdg-start {
      min-width: clamp(108px, 28vw, 150px);
      min-height: clamp(40px, 7vh, 46px);
      padding: 9px 18px;
      border: 1px solid rgba(104, 92, 164, 0.34);
      border-radius: 999px;
      background: rgba(255,255,255,0.54);
      cursor: pointer;
      font-size: 13px;
      letter-spacing: .08em;
      transition: transform .08s ease, border-color .15s ease, background .15s ease;
    }

    #ub-binary-drop-game .ubbdg-start:hover {
      border-color: rgba(255,131,183,0.68);
      background: rgba(255,255,255,0.82);
    }

    #ub-binary-drop-game .ubbdg-start:active {
      transform: scale(.98);
    }

    #ub-binary-drop-game .ubbdg-note {
      margin: 10px 3px 0;
      color: var(--ubbdg-sub);
      font-size: 10px;
      text-align: center;
    }

    #ub-binary-drop-game .ubbdg-description {
      margin: 9px 8px 0;
      color: var(--ubbdg-sub);
      font-size: 10px;
      line-height: 1.55;
      text-align: center;
    }

    @media (max-width: 560px) {
      #ub-binary-drop-game {
        margin: 16px auto;
      }

      #ub-binary-drop-game .ubbdg-shell {
        border-radius: 18px;
      }

      #ub-binary-drop-game .ubbdg-head {
        grid-template-columns: 1fr;
        align-items: start;
        padding: 16px 14px 11px;
      }

      #ub-binary-drop-game .ubbdg-score {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        text-align: center;
      }

      #ub-binary-drop-game .ubbdg-stat {
        min-width: 0;
      }

      #ub-binary-drop-game .ubbdg-field {
        margin: 0 9px;
        border-radius: 14px;
      }

      #ub-binary-drop-game .ubbdg-pause-row {
        padding: 8px 9px 0;
      }

      #ub-binary-drop-game .ubbdg-controls {
        padding: 14px 9px 16px;
      }

      #ub-binary-drop-game .ubbdg-bits {
        gap: 4px;
      }

      #ub-binary-drop-game .ubbdg-bit {
        min-height: 46px;
        border-radius: 9px;
      }

      #ub-binary-drop-game .ubbdg-start {
        width: auto;
      }
    }

    @media (max-height: 460px) {
      #ub-binary-drop-game .ubbdg-message-card {
        padding: 7px 10px;
      }

      #ub-binary-drop-game .ubbdg-message-main.is-ready {
        min-width: 88px;
        min-height: 38px;
        padding: 6px 11px;
        font-size: 13px;
      }

      #ub-binary-drop-game .ubbdg-message-main.is-finish {
        font-size: 12px;
        line-height: 1.2;
      }

      #ub-binary-drop-game .ubbdg-start {
        min-height: 36px;
        padding: 6px 14px;
      }

      #ub-binary-drop-game .ubbdg-pause {
        min-height: 28px;
        padding: 4px 12px;
      }
    }

    @media (orientation: landscape) and (max-height: 560px) {
      #ub-binary-drop-game .ubbdg-field {
        height: clamp(220px, 48dvh, 300px);
      }

      #ub-binary-drop-game .ubbdg-head {
        padding-top: 12px;
      }

      #ub-binary-drop-game .ubbdg-pause-row {
        padding-top: 6px;
      }

      #ub-binary-drop-game .ubbdg-controls {
        padding-top: 8px;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      #ub-binary-drop-game *,
      #ub-binary-drop-game *::before,
      #ub-binary-drop-game *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
      }
    }
