.machine-sign.game-compact-toolbar { justify-content: space-between !important; gap: 6px; padding: 0 8px !important; }
#collectionCount { white-space: nowrap; }
.prize-series { display: flex; gap: 4px; }
.prize-series button { min-height: 44px; padding: 4px 10px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: #82536e; font-size: 11px; }
.prize-series button[aria-pressed="true"] { background: #fffaf8; border-color: #dcb9cb; font-weight: 700; }
.plush[data-rare="true"]::before { display: none; }
.plush[data-rare="true"] img { inset: 0; width: 100%; height: 100%; object-fit: contain; border: 0; border-radius: 0; background: transparent; }
.plush[data-rare="true"]::after { content: 'RARE'; top: auto; bottom: -6px; color: #856019; background: #fff3c9; border: 1px solid #dbbc71; border-radius: 5px; font-size: 8px; line-height: 12px; font-weight: 800; }

.grip-hint { min-height: 18px; margin: -7px 0 7px; text-align: center; color: #82536e; font-size: 11px; }
.aim[data-grip="secure"] { border-color: #4b987f; background: #b7ebd566; box-shadow: 0 0 12px #94d8bf88; }
.aim[data-grip="carry"] { border-color: #b28a42; background: #f5dca566; }
.aim[data-grip="lift"] { border-style: dashed; border-color: #b67b89; background: #efc0d533; }
.prize[data-dropped="true"] { filter: drop-shadow(0 5px 2px #5f426a40); }

/* The carried plush center meets the floor sprite at clawY + 27px. */
.cargo { top: 12px; left: -1.5px; }

/* The cabinet stays above the collection; controls sit together below the glass. */
:root { background: #f8f5fc; color: #4b3e60; }
body { background: radial-gradient(ellipse at 50% 0, #e8e0f8 0, transparent 65%); }
.crane-shell { padding: 6px 8px max(20px, env(safe-area-inset-bottom)); }
.machine { border: 3px solid #d4c4e7; border-radius: 20px; background: #faf7ff; box-shadow: 0 9px 24px -16px #74518d80, inset 0 0 0 1px #fff; }
.machine-sign.game-compact-toolbar { background: #f3ecfb; padding: 2px 7px !important; letter-spacing: 0; }
.prize-series { gap: 2px; }
.prize-series button { color: #756386; border-radius: 12px; }
.prize-series button[aria-pressed="true"] { color: #674589; border-color: #e3d5ef; box-shadow: 0 2px 4px #62417c0d; }
.machine-sign span:last-child { background: #fff; color: #74528f; border: 1px solid #e8dff1; }
.stage { margin: 0 4px; border-color: #dfd2ed; border-radius: 12px; background: radial-gradient(ellipse at 50% 0, #fff 0, transparent 75%), repeating-linear-gradient(90deg, #ffffff55 0 1px, transparent 1px 40px), linear-gradient(#efe9fb 0%, #e9e3f3 75%, #dcd0e9); }
.depth-guide { position: absolute; left: 0; right: 0; height: 60px; background: #fff7; border-block: 1px solid #b8a1cf55; pointer-events: none; z-index: 0; }
.depth-guide::after { content: ''; position: absolute; inset: auto 10px 4px; border-bottom: 1px dashed #ac91c766; }
.plush::before, .plush::after { display: none; }
.plush img { inset: 0; width: 100%; height: 100%; object-fit: contain; border: 0; border-radius: 0; background: transparent; }
.plush[data-rare="true"]::after { display: block; }
.plush[data-figure="true"]::after { content: 'あたり'; color: #735013; background: #ffedb0; border-color: #c99b38; }
.prize[data-figure="true"] { filter: drop-shadow(0 0 4px #e2b75299); }
.win-token .plush[data-figure="true"] { width: 75px; height: 90px; }
.prize { transition: opacity .16s, filter .16s; }
.prize[data-active-row="false"] { opacity: .58; }
.prize[data-target="true"] { opacity: 1; filter: drop-shadow(0 0 3px #fff) drop-shadow(0 0 5px #a076c5); }
.aim { width: 53px; height: 19px; border-color: #a48ab9; }
.chute { width: 60px; left: calc(11% - 30px); bottom: 7px; padding: 8px 0; background: #aa94c5; border-color: #f6efff; color: #fff; font-size: 12px; }
.chute span { font-size: 9px; letter-spacing: .12em; }
.controls { display: grid; grid-template-columns: minmax(0, 1fr) 82px; grid-template-rows: auto 44px 44px; gap: 5px 10px; padding: 9px 11px 12px; background: linear-gradient(#faf7ff, #f0e8f8); }
.aim-status { grid-column: 1 / -1; min-width: 0; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; grid-template-rows: auto auto; align-items: center; gap: 2px 8px; min-height: 44px; }
.aim-status strong { grid-column: 2; grid-row: 1; color: #5f466e; font-size: 12px; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; }
.grip-hint { grid-column: 2 / -1; grid-row: 2; min-height: 0; margin: 0; color: #87728e; font-size: 10px; text-align: left; line-height: 1.4; }
.depth-buttons { grid-column: 1; grid-row: 3; gap: 2px; padding: 0; margin: 0; border: 0; border-radius: 12px; background: #e7ddef; }
.depth-buttons button { min-height: 44px; font-size: 11px; color: #867293; }
.depth-buttons button[aria-pressed="true"] { color: #6c4687; border-color: #ddcbe9; background: #fff; }
.grab { grid-column: 2; grid-row: 2 / 4; min-height: 0; width: 82px; height: 82px; align-self: center; flex-direction: column; gap: 4px; padding: 8px; border: 4px solid #fff9; border-radius: 50%; background: linear-gradient(145deg, #c994bf, #a86ba1); box-shadow: 0 4px 0 #925b8c, 0 5px 12px #9b6b9e33; font-size: 12px; letter-spacing: .05em; }
.grab svg { width: 28px; height: 28px; }
.result { padding: 8px 8px 4px; min-height: 36px; }
.result strong { font-size: 12px; }
.result-text { font-size: 11px; line-height: 1.5; }
.collection { margin: 8px 3px 0; }
.section-heading h2 { margin-bottom: 6px; }
.shelf { min-height: 92px; padding-top: 8px; border-radius: 16px 16px 8px 8px; }
.shelf-slot { padding-bottom: 10px; }
.collection-album { margin-top: 12px; border: 1px solid #e3d8ed; border-radius: 14px; background: #fff9; overflow: hidden; }
.collection-album summary { display: flex; justify-content: space-between; align-items: center; min-height: 44px; padding: 10px 14px; color: #715785; cursor: pointer; list-style: none; font-size: 12px; font-weight: 700; }
.collection-album summary::-webkit-details-marker { display: none; }
.collection-album[open] summary span { transform: rotate(45deg); }
.catalog { padding: 0 8px 10px; margin-top: 0; }
.catalog button { border-radius: 12px; padding-block: 7px; background: #fff; }
@media (max-width: 350px) { .crane-shell { padding-inline: 5px; }.controls { padding-inline: 8px; gap: 5px 6px; grid-template-columns: minmax(0, 1fr) 76px; }.grab { width: 76px; height: 76px; } }
.result:has(#resultTitle:empty):has(#resultText:empty) { display: none; }

.stage { touch-action: none; }
.touch-hint { position: absolute; right: 10px; top: 37px; color: #88739a; font-size: 9px; pointer-events: none; }
.depth-labels { position: absolute; inset: 86px auto auto 3px; display: grid; grid-auto-rows: 54px; color: #8b739b; font-size: 8px; z-index: 7; pointer-events: none; }
.depth-labels span { writing-mode: vertical-rl; letter-spacing: .06em; }
.machine[data-phase="grab"] .grab, .machine[data-phase="carry"] .grab, .machine[data-phase="drop"] .grab { opacity: 1; background: #a991bc; box-shadow: 0 2px 0 #8a739c; }
.machine:not([data-phase="ready"]) .touch-hint { visibility: hidden; }
.result-plush:empty { display: none; }
.result[data-outcome] { display: grid; grid-template-columns: 52px minmax(0, 1fr); grid-template-rows: auto auto; gap: 2px 8px; align-items: center; margin: 8px 3px 0; padding: 8px 12px; border: 1px solid #e2d4ed; border-radius: 14px; background: #fff9; text-align: left; }
.result[data-outcome="win"] { border-color: #ddc4dc; background: linear-gradient(115deg, #fff5fb, #fffcf4); }
.result[data-outcome] .result-plush { grid-column: 1; grid-row: 1 / 3; }
.result[data-outcome] strong { grid-column: 2; align-self: end; }
.result[data-outcome] .result-text { grid-column: 2; align-self: start; margin: 0; }
.result-plush .plush { width: 46px; height: 56px; }
.result[data-outcome] > .game-ranking-open { grid-column: 1 / -1; justify-self: stretch; width: 100%; min-height: 40px; margin: 4px 0 0; }

/* Named cards and collection filters keep a large album easy to scan. */
.collection-album summary { gap: 8px; }
.collection-album[open] summary span { transform: none; }
.collection-album[open] summary .album-toggle { transform: rotate(45deg); }
.catalog-progress { margin-left: auto; color: #977fa5; font-size: 11px; font-weight: 500; }
.album-toggle { font-size: 17px; }
.catalog-filters { display: flex; gap: 4px; padding: 0 8px; }
.catalog-filters button { flex: 1; min-width: 0; min-height: 44px; padding: 7px 3px; border: 1px solid transparent; border-radius: 11px; background: #f0eaf6; color: #897392; font-size: 11px; }
.catalog-filters button[aria-pressed="true"] { color: #694980; background: #fff; border-color: #d9c8e7; font-weight: 700; }
.catalog-tip, .catalog-empty { margin: 8px 12px 12px; color: #967fa1; font-size: 10px; line-height: 1.6; }
.catalog { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.catalog button[hidden] { display: none; }
.catalog .cast-name { display: block; width: 100%; min-height: 27px; font-size: 10px; line-height: 1.35; white-space: normal; overflow-wrap: anywhere; }
.catalog button:disabled { background: #f5f1f8; color: #9a8aa5; }
.catalog .count { font-size: 10px; }
.catalog button[aria-pressed="true"] { border-color: #b795cf; background: #f4e9fa; }
.shelf { gap: 10px; }
button.shelf-slot { position: relative; min-width: 0; border: 0; border-radius: 12px; background: transparent; color: #866a8c; cursor: pointer; }
button.shelf-slot::after { content: '×'; position: absolute; right: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: #fff9; color: #967b9c; font-size: 14px; line-height: 20px; }
.shelf-slot .shelf-name { display: block; max-width: 100%; font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 350px) { .catalog { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Keep the prize identity beside the aiming controls, even for long costume names. */
.aim-preview { grid-column: 1; grid-row: 1 / 3; display: grid; place-items: center; width: 38px; height: 44px; border: 1px solid #e0d2eb; border-radius: 10px; background: #fff9; }
.aim-preview:empty::after { content: '◎'; color: #b29ac2; font-size: 22px; }
.aim-preview .plush { width: 33px; height: 39px; }
.aim-preview .plush::after { display: none; }
.aim-owned { grid-column: 3; grid-row: 1; white-space: nowrap; padding: 3px 6px; border-radius: 7px; background: #e9e0f1; color: #77528d; font-size: 10px; font-weight: 700; }
.aim-owned[hidden] { display: none; }
.aim-owned[data-new="true"] { background: #fff0d7; color: #986319; }
.grip-hint::before { content: '●'; margin-right: 5px; color: #bba5c8; font-size: 8px; }
.aim-status[data-grip="secure"] .grip-hint { color: #407d64; }
.aim-status[data-grip="secure"] .grip-hint::before { color: #529b7c; }
.aim-status[data-grip="carry"] .grip-hint { color: #977333; }
.aim-status[data-grip="carry"] .grip-hint::before { color: #b88d40; }
.aim-status[data-grip="lift"] .grip-hint { color: #a6657b; }
.aim-status[data-grip="lift"] .grip-hint::before { color: #bc7a91; }
.grab[data-grip="secure"]:not(:disabled) { border-color: #ddf3e8; }

/* Left-hand analog lever and right-hand catch button. */
.controls { grid-template-columns: minmax(0, 1fr) 90px; grid-template-rows: auto 112px; gap: 8px 12px; padding-bottom: 12px; }
.lever-panel { grid-column: 1; grid-row: 2; min-width: 0; display: flex; align-items: center; gap: 10px; }
.lever { position: relative; flex: 0 0 112px; width: 112px; height: 112px; border: 1px solid #d5c5e2; border-radius: 50%; background: radial-gradient(circle, #d7c7e4 0 24%, #eee5f5 25% 55%, #fff9 56%); box-shadow: inset 0 3px 8px #8966991f, 0 2px 0 #d6c7e3; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.lever::before, .lever::after { content: ''; position: absolute; pointer-events: none; background: #c8b2d840; }
.lever::before { left: 50%; top: 16px; bottom: 16px; width: 1px; }
.lever::after { top: 50%; left: 16px; right: 16px; height: 1px; }
.lever-knob { position: absolute; left: calc(50% - 21px); top: calc(50% - 21px); width: 42px; height: 42px; border: 2px solid #fff9; border-radius: 50%; background: radial-gradient(circle at 35% 25%, #e6c8ed, #b784c0 65%, #a06dae); box-shadow: 0 5px 0 #9561a1, 0 7px 9px #78518040; z-index: 2; pointer-events: none; }
.lever[aria-pressed="false"] .lever-knob { transition: transform .12s ease-out; }
.lever-direction { position: absolute; color: #a58ab7; font-size: 14px; line-height: 16px; pointer-events: none; }
.lever-up { top: 4px; left: calc(50% - 7px); }.lever-down { bottom: 4px; left: calc(50% - 7px); }.lever-left { left: 4px; top: calc(50% - 8px); }.lever-right { right: 4px; top: calc(50% - 8px); }
.lever-panel .depth-buttons { display: flex; flex: 1; flex-direction: column; gap: 2px; padding: 2px; background: #e7ddef; }
.lever-panel .depth-buttons button { min-height: 32px; padding: 3px 2px; font-size: 10px; }
.grab { grid-column: 2; grid-row: 2; justify-self: center; width: 90px; height: 90px; }
@media (max-width: 350px) { .controls { grid-template-columns: minmax(0, 1fr) 80px; gap: 8px; }.lever-panel { gap: 5px; }.lever { flex-basis: 104px; width: 104px; height: 104px; }.grab { width: 80px; height: 80px; } }
.controls #position { width: 1px; height: 1px; }
