:root {
  font-family: ui-rounded, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Noto Sans JP', 'Yu Gothic', system-ui, sans-serif;
  color: #242040;
  background: #faf8ff;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  --ink: #292246;
  --muted: #9089a7;
  --pink: #ff3c70;
  --purple: #7658e6;
  --shadow: 0 15px 46px rgba(81,58,145,.12);
}
* { box-sizing: border-box; }
html { min-width: 280px; }
body { margin: 0; min-height: 100svh; background: radial-gradient(ellipse at 0% 0%, #ffe7f0 0, transparent 39%), radial-gradient(ellipse at 98% 85%, #e7e7ff 0, transparent 38%), #faf8ff; }
button { font: inherit; -webkit-tap-highlight-color: transparent; cursor: pointer; }
button:focus-visible { outline: 3px solid #5431f9; outline-offset: 4px; }
button:disabled { cursor: not-allowed; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.app { width: min(100%, 560px); height: 100svh; min-height: 610px; max-height: 1100px; margin: 0 auto; padding: max(14px, env(safe-area-inset-top)) max(15px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(15px, env(safe-area-inset-left)); display: flex; flex-direction: column; gap: 12px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex: 0 0 auto; }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-logo { height: 53px; width: 54px; border-radius: 17px; display: grid; place-items: center; flex: 0 0 auto; background: linear-gradient(140deg, #ff5d7d, #f62652 68%, #e21b52); color: #fff; font-size: 22px; font-weight: 1000; letter-spacing: -.09em; box-shadow: 0 7px 0 #ffbac9, 0 12px 19px #fd487351; transform: rotate(-7deg); }
.brand-logo span { font-size: 13px; vertical-align: 7px; letter-spacing: 0; margin-left: 1px; }
.brand-copy h1 { font-size: clamp(20px, 5.2vw, 26px); margin: 0; font-weight: 1000; letter-spacing: -.065em; line-height: 1.2; white-space: nowrap; }
.brand-copy .bang { color: var(--pink); }
.brand-copy p { font-size: 10.5px; margin: 5px 0 0; font-weight: 750; letter-spacing: .04em; color: #918ba6; }
.sound-btn { width: 44px; height: 44px; color: #746a95; background: #fff; border: 1px solid #eae5f4; border-radius: 16px; box-shadow: 0 3px 0 #e9e4f4; display: grid; place-items: center; flex: 0 0 auto; }
.sound-btn.muted { color: #b3acc5; background: #f7f5fa; }
.mode-tabs { flex: 0 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: #f0edf8; padding: 5px; border-radius: 17px; }
.mode-tab { border: 0; background: transparent; color: #918ba6; height: 39px; border-radius: 13px; font-weight: 900; font-size: 12.5px; white-space: nowrap; }
.mode-tab span { font-size: 16px; vertical-align: -1px; margin-right: 3px; }
.mode-tab.selected { background: #fff; color: #51427d; box-shadow: 0 3px 9px #40307816; }
.hud { display: grid; grid-template-columns: 1fr 1.38fr .95fr; gap: 7px; flex: 0 0 auto; }
.stat { background: #fff; border: 1px solid #ece8f7; border-radius: 16px; min-width: 0; height: 76px; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 5px 13px rgba(55,30,111,.035); }
.stat-label { color: #a5a0b6; font-size: 10px; letter-spacing: .1em; font-weight: 900; margin-bottom: 2px; }
.stat-value { font-size: clamp(23px, 6vw, 31px); font-weight: 1000; letter-spacing: -.06em; font-variant-numeric: tabular-nums; line-height: 1.06; }
.stat-unit { font-size: .67em; }
.time-stat .stat-value { color: #664ade; }
.time-stat.urgent .stat-value { color: #ef315b; animation: danger .55s infinite alternate; }
.score-stat { background: linear-gradient(145deg, #faf3ff, #f7f1ff); border-color: #e9dcff; }
.score-stat .stat-value { color: #6f4bc2; }
.combo-stat .stat-value { color: #f04d81; }
.combo-x { font-size: 15px; margin-left: 2px; color: #ffa4bf; }
.charge-row { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; padding: 0 3px; }
.charge-caption { color: #8e83a9; font-size: 10px; font-weight: 800; white-space: nowrap; }
.charge-caption strong { color: #ed4973; }
.charge-spark { color: #fa9b38; font-size: 15px; vertical-align: -1px; }
.charge-track { height: 9px; background: #ede8fa; border-radius: 99px; overflow: hidden; flex: 1; box-shadow: inset 0 1px 3px #8a73a321; }
.charge-fill { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, #ff8799, #ff2f7c, #ffbd53); border-radius: inherit; transition: width .22s ease-out; box-shadow: 0 0 15px #ff4874; }
.arena { position: relative; isolation: isolate; min-height: 280px; flex: 1 1 auto; background: radial-gradient(circle at 50% 27%, #fff 0%, #fff 27%, #fafaff 75%, #f6f2ff 100%); border: 2px solid #eee9ff; box-shadow: var(--shadow), inset 0 2px 8px #fff; border-radius: 29px; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.arena::before { content: ''; position: absolute; inset: 0; opacity: .28; background-image: radial-gradient(#ddd6f8 1.2px, transparent 1.2px); background-size: 22px 22px; mask-image: linear-gradient(to bottom, transparent 5%, black 65%); pointer-events: none; }
.arena-blur { position: absolute; pointer-events: none; filter: blur(1px); border-radius: 50%; }
.blur-one { width: 250px; height: 250px; top: -115px; right: -112px; background: radial-gradient(circle, #ffe8edb8 0, #ffe9f100 72%); }
.blur-two { width: 265px; height: 265px; bottom: -133px; left: -123px; background: radial-gradient(circle, #e5dbffc4 0, transparent 72%); }
.board-meta { position: absolute; z-index: 4; pointer-events: none; top: 15px; left: 16px; right: 16px; display: flex; justify-content: space-between; align-items: center; }
.level-tag { background: #f0ebff; color: #8062c7; border: 1px solid #e8dfff; padding: 6px 10px; font-weight: 950; font-size: 10px; letter-spacing: .11em; border-radius: 8px; }
.clear-count { color: #aaa0c3; font-weight: 950; font-size: 10px; letter-spacing: .06em; }
.tile-layer { position: absolute; inset: 0; z-index: 2; }
.tile { width: var(--size); height: var(--size); position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%) rotate(var(--rotate, 0deg)); display: grid; place-items: center; border: 0; background: transparent; padding: 0; opacity: 1; transition: opacity .2s ease-out, filter .2s; will-change: transform; touch-action: none; }
.tile-inner { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 24%; font-size: calc(var(--size) * .41); line-height: 1; background: var(--tile-bg); box-shadow: 0 7px 0 var(--tile-edge), 0 12px 16px #58507720, inset 0 2px 1px #ffffff8a; position: relative; overflow: hidden; }
.tile-inner::before { content: ''; position: absolute; width: 120%; height: 65%; top: -45%; border-radius: 50%; background: #fff5; }
.tile-icon { z-index: 1; filter: drop-shadow(0 2px 0 #ffffff70); }
.notif { position: absolute; z-index: 3; top: -11px; right: -12px; background: linear-gradient(155deg, #ff6b79, #fc2850 66%, #e90b49); border: 3px solid #fff; color: #fff; border-radius: 99px; min-width: 32px; height: 31px; padding: 0 6px; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 0 #d81c4950, 0 8px 14px #f6275f45; font-size: 13px; font-weight: 1000; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.notif.large { min-width: 42px; height: 32px; font-size: 12px; }
.tile.appear { animation: tile-appear .38s both cubic-bezier(.16,1.4,.42,1); animation-delay: var(--delay, 0ms); }
.tile.popped { pointer-events: none !important; animation: tile-pop .26s forwards cubic-bezier(.25,.85,.36,1); }
.tile.popped.pop-suck { animation: tile-suck .30s forwards cubic-bezier(.55,.04,.78,.32); }
.tile.popped.pop-shatter { animation: tile-shatter .29s forwards cubic-bezier(.35,.4,.68,.91); }
.arena:not(.active) .tile { pointer-events: none; }
.tile:focus-visible .tile-inner { outline: 4px solid #7658e6; outline-offset: 5px; }
#fxCanvas { position: absolute; z-index: 5; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.banner { position: absolute; z-index: 8; pointer-events: none; left: 50%; top: 47%; transform: translate(-50%,-50%) scale(.6) rotate(-5deg); opacity: 0; font-size: clamp(35px, 9vw, 61px); font-weight: 1000; letter-spacing: -.07em; white-space: nowrap; color: #fff; -webkit-text-stroke: 2px #f54283; paint-order: stroke fill; text-shadow: 0 6px 0 #ed4a83, 0 11px 15px #e850a17a; }
.banner.active { animation: banner-pop .82s both cubic-bezier(.16,1.1,.35,1); }
.overlay-shine { position: absolute; z-index: 6; pointer-events: none; inset: 0; opacity: 0; background: #fff; }
.overlay-shine.flash { animation: arena-flash .55s ease-out; }
.arena.impact { animation: impact .26s ease-out; }
.arena.on-fire { border-color: #ffb9c9; box-shadow: var(--shadow), 0 0 31px #ffb4c166; }
.float-score { position: absolute; z-index: 7; font-weight: 1000; font-size: 18px; pointer-events: none; letter-spacing: -.05em; color: #ff4b76; text-shadow: 0 2px 0 #fff, 0 4px 5px #fff; animation: float-score .66s ease-out forwards; white-space: nowrap; }
.float-score.gold { color: #eeb338; font-size: 23px; }
.stage-panel { position: absolute; z-index: 10; left: 50%; width: min(88%, 320px); transform: translateX(-50%); text-align: center; background: #fffffff2; border: 1.5px solid #fff; box-shadow: 0 16px 48px #70609a33, 0 0 0 1px #e9e0f3; border-radius: 25px; backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); }
.start-panel { bottom: 23px; padding: 21px 18px 18px; }
.panel-eyebrow { color: #b29bcd; font-size: 10px; font-weight: 1000; letter-spacing: .19em; }
.start-panel h2, .result-panel h2 { margin: 9px 0 3px; color: #342745; font-size: 27px; font-weight: 1000; letter-spacing: -.06em; }
.start-panel h2 span { color: var(--pink); }
.start-panel p { margin: 5px 0 15px; color: #897c9d; font-size: 12px; font-weight: 800; }
.primary-btn { width: 100%; min-height: 49px; background: linear-gradient(125deg, #ff567c, #ff2f64); border: 0; border-radius: 14px; color: white; font-size: 16px; font-weight: 1000; box-shadow: 0 6px 0 #d82b53, 0 10px 19px #ff538451; transition: transform .13s, box-shadow .13s; }
.primary-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #d82b53; }
.primary-btn span { padding-left: 8px; font-size: 18px; }
.panel-foot { display: block; margin-top: 13px; color: #aca2bd; font-size: 10px; font-weight: 750; }
.result-panel { top: 50%; bottom: auto; transform: translate(-50%,-50%); padding: 17px 20px 19px; width: min(92%, 350px); max-height: 97%; overflow-y: auto; scrollbar-width: thin; }
.result-emoji { font-size: 36px; line-height: 1.25; }
.result-panel h2 { font-size: 22px; margin: 1px 0 7px; }
.result-score { font-size: clamp(35px, 10vw, 50px); font-weight: 1000; letter-spacing: -.06em; color: #f44571; line-height: 1; font-variant-numeric: tabular-nums; }
.result-score-label { font-size: 9px; letter-spacing: .22em; color: #bca8bf; font-weight: 1000; margin-top: 2px; }
.new-record { margin: 7px auto -2px; display: inline-block; padding: 5px 10px; color: #9c5b00; background: #fff2cb; border-radius: 30px; font-size: 11px; font-weight: 1000; }
.result-grid { margin: 13px 0 12px; display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; }
.result-grid > div { background: #f9f4ff; padding: 10px 3px 8px; border-radius: 12px; }
.result-grid span { display: block; color: #a69ab4; font-size: 9px; font-weight: 850; }
.result-grid strong { font-variant-numeric: tabular-nums; display: block; margin-top: 3px; font-size: 20px; font-weight: 1000; color: #634cb8; }
.result-actions { display: grid; gap: 8px; }
.result-actions .primary-btn { min-height: 43px; font-size: 15px; }
.share-btn { background: #282338; color: #fff; border: none; border-radius: 12px; height: 40px; font-weight: 950; font-size: 13px; }
.image-btn { background: #f7f3fc; color: #72668e; border: 1px solid #ece2fa; border-radius: 12px; height: 36px; font-weight: 900; font-size: 12px; }
.footer { flex: 0 0 auto; padding: 0 4px; min-height: 48px; }
.tip { font-size: 11px; font-weight: 850; color: #9388af; text-align: center; padding-bottom: 8px; }
.footer-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.best-label { font-size: 12px; font-weight: 1000; color: #b58d60; }
.best-label strong { color: #7761b0; margin-left: 5px; letter-spacing: .015em; font-variant-numeric: tabular-nums; }
.footer-note { color: #ada5bf; font-size: 10px; font-weight: 800; }
.end-btn { color: #8e72aa; background: #f3edf9; border: 1px solid #e5d8f4; border-radius: 11px; font-size: 11px; font-weight: 900; padding: 8px 10px; }
@keyframes tile-appear { from { opacity: 0; transform: translate(-50%,-50%) scale(.22) rotate(-30deg); } 70% { opacity: 1; } to { transform: translate(-50%,-50%) scale(1) rotate(var(--rotate)); } }
@keyframes tile-pop { 0% { transform: translate(-50%,-50%) scale(1) rotate(var(--rotate)); opacity: 1; filter: brightness(1); } 30% { transform: translate(-50%,-50%) scale(1.24) rotate(7deg); opacity: 1; filter: brightness(1.22); } 100% { transform: translate(-50%,-50%) scale(.05) rotate(-35deg); opacity: 0; filter: brightness(1.5); } }
@keyframes tile-suck { 0% { opacity: 1; transform: translate(-50%,-50%) scale(1) rotate(var(--rotate)); filter: blur(0); } 45% { transform: translate(-50%,-50%) scale(1.15) rotate(0); filter: blur(1px); } 100% { opacity: 0; transform: translate(-50%,-50%) scale(0) rotate(55deg); filter: blur(5px); } }
@keyframes tile-shatter { 0% { opacity: 1; transform: translate(-50%,-50%) scale(1) rotate(var(--rotate)); filter: contrast(1); } 27% { transform: translate(-50%,-50%) scale(1.33) rotate(14deg); filter: contrast(2); } 100% { opacity: 0; transform: translate(-50%,-50%) scale(.15) rotate(-75deg); filter: blur(4px); } }
@keyframes float-score { from { opacity: 0; transform: translate(-50%,-5px) scale(.65); } 23% { opacity: 1; transform: translate(-50%,-21px) scale(1.25); } to { opacity: 0; transform: translate(-50%,-62px) scale(1); } }
@keyframes banner-pop { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.25) rotate(-14deg); } 18% { opacity: 1; transform: translate(-50%,-50%) scale(1.14) rotate(3deg); } 32%,58% { opacity: 1; transform: translate(-50%,-50%) scale(1) rotate(-3deg); } 100% { opacity: 0; transform: translate(-50%,-77%) scale(1.12) rotate(2deg); } }
@keyframes arena-flash { from { opacity: .76; } to { opacity: 0; } }
@keyframes danger { to { transform: scale(1.08); } }
@keyframes impact { 0%,100% { transform: translate(0); } 15% { transform: translate(-3px,2px); } 30% { transform: translate(4px,-2px); } 50% { transform: translate(-2px,1px); } 70% { transform: translate(2px,1px); } }
@media (max-height: 750px) { .app { gap: 9px; } .stat { height: 66px; } .brand-logo { height: 47px; width: 48px; border-radius: 15px; font-size: 20px; } .brand-copy p { margin-top: 1px; } .mode-tab { height: 35px; } .footer { min-height: 42px; } .start-panel { bottom: 12px; padding-top: 14px; } .start-panel h2 { font-size: 23px; } .result-panel { padding-top: 11px; padding-bottom: 12px; } .result-emoji { font-size: 26px; } .result-grid { margin: 8px 0; } }
@media (max-width: 345px) { .app { padding-left: 10px; padding-right: 10px; } .brand-copy p { font-size: 9px; } .brand-copy h1 { font-size: 19px; } .brand-logo { width: 45px; height: 45px; } .mode-tab { font-size: 11px; } .stat { height: 65px; } .charge-caption { font-size: 9px; } }
@media (min-width: 850px) { .app { padding-top: 22px; padding-bottom: 20px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* v1.2: endless-first dopamine edition. Distinct, high-contrast arcade feedback. */
:root { --ink:#21183d; --muted:#78648e; --pink:#ff245f; --purple:#7038ef; --shadow:0 18px 54px rgba(115,32,178,.20); }
body { background:radial-gradient(ellipse at 5% 0%,#ffe0ed,transparent 43%),radial-gradient(ellipse at 92% 84%,#e4d4ff,transparent 43%),#fff5fb; }
.app { width:min(100%,620px); }
.brand-logo { background:linear-gradient(145deg,#ff4d7f,#ff1054 65%,#d50052);box-shadow:0 7px 0 #ffabc6,0 12px 22px #fa245f75; }
.mode-tabs { background:#e8dffa;border:2px solid #e5d8fa; }
.mode-tab { position:relative;color:#76668f; }
.mode-tab.selected { color:#fff;background:linear-gradient(120deg,#7536f3,#b13bfc);box-shadow:0 4px 14px #8e36f955; }
.mode-recommend { display:inline-block;vertical-align:middle;padding:3px 5px;border-radius:5px;background:#ffec63;color:#542362;font-size:9px;font-weight:1000;margin-left:3px; }
.stat { border:2px solid #eadffd; }
.score-stat { background:linear-gradient(135deg,#fff1a9,#fff6eb 70%,#ffe7f4);border-color:#f8d661;box-shadow:0 5px 18px #ffb53b24; }
.score-stat .stat-value { color:#ec2475; }
.combo-stat { background:linear-gradient(145deg,#fff1f6,#ffe8fa); }
.combo-stat .stat-value { color:#fb285a; }
.arena { background:radial-gradient(circle at 50% 28%,#fff 0%,#fff 16%,#fff4fc 68%,#f6efff 100%);border-color:#ebd9ff; }
.arena.fever { border-color:#ff75ab;box-shadow:var(--shadow),0 0 26px #fc70ae50; }
.banner { font-size:clamp(29px,7.5vw,53px);color:#fff;-webkit-text-stroke:3px #f7267b;text-shadow:0 5px 0 #9c20de,0 10px 17px #e850a1b9;max-width:98%; }
.charge-caption { color:#6147a1;font-weight:1000; }
.charge-caption strong { color:#ff2465; }
.charge-fill { background:linear-gradient(90deg,#ffce2b,#ff375e 65%,#a536ff); }
.start-panel { width:min(91%,370px);padding:24px 17px 21px;border:2px solid #ffe1f5; }
.start-panel h2 { font-size:clamp(21px,5.3vw,29px);line-height:1.25; }
.start-panel p { line-height:1.5; }
.panel-eyebrow { color:#8d43ed;font-size:11px; }
.primary-btn {background:linear-gradient(110deg,#ff2856,#ff267d 58%,#d730eb);box-shadow:0 6px 0 #bb1765,0 11px 21px #fa368677;}
.end-btn { background:#3e245e;color:#fff;border-color:#3e245e;min-height:37px;font-size:12px; }
.result-panel { width:min(94%,390px);max-height:calc(100% - 18px);padding:clamp(12px,2.7vh,22px) clamp(14px,3.6vw,25px) 19px;border:2px solid #f8d3f4;overscroll-behavior:contain; }
.result-emoji { font-size:clamp(24px,5vw,34px); }
.result-panel h2 { font-size:clamp(19px,4.7vw,24px);line-height:1.25;margin:4px 0 10px; }
.result-score { font-size:clamp(38px,9vw,53px);line-height:1.18;margin:5px auto 6px;overflow-wrap:anywhere; }
.result-score-label { display:block;line-height:1.5; margin:2px 0 8px;letter-spacing:.16em; }
.new-record { display:block;width:max-content;max-width:100%;margin:5px auto 3px;line-height:1.45; }
.result-grid { margin:12px 0; }
.result-grid > div { padding:9px 3px 8px;min-width:0; }
.result-grid span { font-size:9px;line-height:1.35; }
.result-actions { gap:9px; }
.result-actions > button {min-height:42px;height:auto;padding:11px 10px;line-height:1.25;}
.result-actions .primary-btn {min-height:47px;}
@media (max-height:720px) {
 .app { gap:8px;padding-top:max(7px,env(safe-area-inset-top));padding-bottom:max(7px,env(safe-area-inset-bottom)); }
 .result-panel { padding:10px 12px 12px;max-height:calc(100% - 10px); }
 .result-grid {margin:7px 0;}
 .result-grid > div {padding:6px 3px;}
 .result-emoji {font-size:23px;}
 .result-actions {gap:6px;}
 .result-actions > button {min-height:37px;padding:8px;}
}
@media (max-width:390px) {
 .mode-tab {font-size:10.5px;}
 .mode-recommend {font-size:8px;padding:2px 3px;}
 .stat-value {font-size:clamp(20px,6vw,29px);}
 .result-panel {width:96%;}
}
@media (prefers-reduced-motion:reduce) {
 .arena.fever {box-shadow:var(--shadow);}
 .time-stat.urgent .stat-value {animation:none;}
}

/* Allow swiping through results on short mobile viewports even though the game board disables panning. */
.result-panel { touch-action:pan-y; -webkit-overflow-scrolling:touch; }
@media(max-width:345px){.mode-recommend{display:none}}

/* 99+ jackpot notification: visually and mechanically distinct from regular badges. */
.tile.jackpot-tile { z-index: 4; }
.tile.jackpot-tile .tile-inner {
  background:linear-gradient(155deg,#ffcf39,#ff5d5d 52%,#e91c81);
  box-shadow:0 0 0 3px #ffcf46,0 0 20px #ff3b8188,0 8px 0 #b90b55,0 13px 20px #e71b5577;
}
.tile.jackpot-tile .tile-icon { color:#fff!important;font-weight:1000;filter:drop-shadow(0 2px 3px #a5187c); }
.tile.jackpot-tile .notif.large {
  background:linear-gradient(125deg,#f31d56,#bf18ed);
  border-color:#fffacb;
  min-width:46px;height:35px;font-size:14px;
  box-shadow:0 0 0 3px #f8c72c,0 6px 13px #ee237e88;
}
.tile.jackpot-tile:not(.popped) .notif.large { animation:jackpot-breathe 1.2s ease-in-out infinite alternate; }
.tile.jackpot-tile:not(.popped) .tile-inner::after {
  content:'BOMB';position:absolute;bottom:3px;left:50%;transform:translateX(-50%);
  color:#fff;letter-spacing:.07em;font-size:clamp(7px,2vw,10px);font-weight:1000;
  text-shadow:0 1px 3px #8a1a58;
}
@keyframes jackpot-breathe {to{transform:scale(1.13);filter:brightness(1.18)}}
.float-score.jackpot-score {color:#ffe84a;font-size:clamp(23px,7vw,38px);
  -webkit-text-stroke:1px #e42872;paint-order:stroke fill;
  text-shadow:0 3px #fb3978,0 7px 14px #b70d8277;}
.result-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;}
.result-grid .jackpot-result {background:linear-gradient(120deg,#fff4cc,#ffe4f0);
  border:1px solid #ffc35d;}
.result-grid .jackpot-result strong {color:#ec3168;}
@media(max-height:720px){.result-grid>div{padding:5px 3px;}.result-grid strong{font-size:18px;}}
@media(prefers-reduced-motion:reduce){
  .tile.jackpot-tile:not(.popped) .notif.large{animation:none;}
}

/* Earned jackpot tiles evolve in place. */
.tile.jackpot-tile.evolving {animation:jackpot-evolve .46s cubic-bezier(.12,1.55,.34,1) both;}
@keyframes jackpot-evolve {
  0%{transform:translate(-50%,-50%) scale(.8) rotate(-12deg);filter:brightness(2);}
  50%{transform:translate(-50%,-50%) scale(1.35) rotate(8deg);filter:brightness(1.8);}
  100%{transform:translate(-50%,-50%) scale(1) rotate(var(--rotate));filter:brightness(1);}
}
@media(prefers-reduced-motion:reduce) {.tile.jackpot-tile.evolving{animation:none;}}

/* World-wide counters: the same idea as the dolphin community total. */
.global-clear-counter {
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  flex:0 0 auto;min-height:55px;padding:9px 13px;
  border:2px solid #ffb8d4;border-radius:15px;
  background:linear-gradient(110deg,#fff1f6 0%,#ffdcf0 57%,#f0e7ff 100%);
  box-shadow:0 5px 15px #ff458526;
}
.global-counter-copy{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;min-width:0}
.global-counter-caption{font-size:11px;color:#803a76;font-weight:950;white-space:nowrap}
.global-counter-total{font-size:clamp(21px,5.4vw,30px);font-weight:1000;color:#e9236e;
  letter-spacing:-.06em;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.global-counter-total::after{content:' 件';font-size:11px;letter-spacing:0;color:#995681}
.global-counter-side{display:flex;flex-direction:column;gap:3px;align-items:end;flex-shrink:0}
.global-counter-today{font-size:11px;font-weight:950;color:#5d388f;white-space:nowrap}
.global-counter-today strong{font-size:15px;font-variant-numeric:tabular-nums;color:#9f35d8}
.global-counter-status{font-size:9px;letter-spacing:.04em;color:#9850a2;font-weight:800;white-space:nowrap}
.global-counter-status.offline{color:#a86c70}
@media(max-width:390px){
  .global-clear-counter{padding:7px 10px;gap:7px;min-height:48px}
  .global-counter-copy{gap:3px}
  .global-counter-caption{font-size:9px}
  .global-counter-total{font-size:clamp(18px,5vw,24px)}
  .global-counter-today{font-size:10px}
  .global-counter-status{font-size:8px}
}
@media(max-height:750px){
  .app{min-height:570px;gap:8px}
  .arena{min-height:255px}
  .global-clear-counter{min-height:43px;padding-top:5px;padding-bottom:5px}
}

/* Sponsored placement: always below the game, never a fixed overlay. */
.amazon-promo[hidden] {display:none!important}
.amazon-promo {
  width:min(calc(100% - 30px),620px);
  margin:18px auto max(28px,env(safe-area-inset-bottom));
  padding:12px;
  background:linear-gradient(135deg,#ffffff,#fff6fb);
  border:1px solid #eddbea;
  border-radius:17px;
  box-shadow:0 8px 22px rgba(71,34,88,.08);
}
.amazon-ad-label {
  display:inline-block;
  padding:4px 9px;
  border-radius:6px;
  background:#f9e8ee;
  color:#735065;
  font-weight:900;
  letter-spacing:.04em;
  font-size:10px;
  margin-bottom:8px;
}
.amazon-banner a {display:block;border-radius:9px;overflow:hidden;outline-offset:3px}
.amazon-banner picture, .amazon-banner img {display:block;width:100%;height:auto}
.amazon-disclosure {margin:9px 0 0;color:#79647c;font-size:10px;line-height:1.6}
@media (max-width:390px) {
  .amazon-promo {width:calc(100% - 20px);padding:9px;margin-top:12px}
  .amazon-disclosure {font-size:9px}
}

/* Mobile dense-board edition: play surface comes before secondary information. */
@media (max-width:480px) {
  .app {
    height:auto;
    min-height:100svh;
    max-height:none;
    gap:10px;
    padding-top:max(10px,env(safe-area-inset-top));
    padding-bottom:12px;
    overflow:visible;
  }
  .topbar {order:0;}
  .arena {
    order:1;
    flex:0 0 auto;
    height:clamp(390px,70svh,660px);
    min-height:390px;
    border-radius:23px;
  }
  .mode-tabs {order:2;}
  .hud {order:3;}
  .global-clear-counter {order:4;}
  .charge-row {order:5;}
  .footer {order:6;}
  .tile-inner {
    border-radius:20%;
    box-shadow:0 4px 0 var(--tile-edge),0 7px 10px #58507720,inset 0 1px 1px #ffffff8a;
  }
  .notif {
    top:-7px;right:-8px;min-width:26px;height:25px;
    padding:0 4px;border-width:2px;font-size:11px;
    box-shadow:0 3px 0 #d81c4950,0 5px 8px #f6275f45;
  }
  .notif.large {min-width:33px;height:26px;font-size:10px;}
  .arena .tile.jackpot-tile .notif.large {
    min-width:34px;height:27px;font-size:10px;
    box-shadow:0 0 0 2px #f8c72c,0 4px 9px #ee237e88;
  }
  .arena .tile.jackpot-tile:not(.popped) .tile-inner::after {font-size:7px;bottom:2px;}
  .board-meta {top:10px;left:11px;right:11px;}
  .level-tag {font-size:9px;padding:5px 7px;}
  .clear-count {font-size:9px;}
  .start-panel {bottom:14px;}
  .result-panel {max-height:calc(100% - 14px);}
  .stat {height:63px;}
  .brand-logo {width:48px;height:48px;border-radius:15px;}
  .brand-copy h1 {font-size:clamp(19px,5.8vw,23px);}
  .brand-copy p {font-size:9px;}
}
@media (max-width:480px) and (max-height:620px) {
  .arena {height:clamp(365px,68svh,500px);min-height:365px;}
  .app {gap:8px;}
}

/* Rare 999 secret trophy: dark amethyst and gold, unlike ordinary 99+. */
.tile.secret-999-tile{z-index:7!important;}
.tile.secret-999-tile .tile-inner{
  background:linear-gradient(145deg,#160c38,#5c27c9 46%,#d931eb 90%);
  box-shadow:0 0 0 3px #f7d152,0 0 24px #e8ac42,0 8px 0 #582d96,0 13px 25px #ab3ae4!important;
}
.tile.secret-999-tile .tile-icon{color:#fff7b5!important;filter:drop-shadow(0 0 6px #fff6bc);}
.tile.secret-999-tile .notif.large{
  min-width:40px;height:30px;background:linear-gradient(110deg,#ffce3d,#ff8a00);
  border:2px solid #fff6aa;color:#471459;font-size:13px;font-weight:1000;
  box-shadow:0 0 0 3px #ffdc5270,0 3px 13px #e5963e8f;
}
.tile.secret-999-tile:not(.popped) .notif.large{animation:jackpot-breathe .8s ease-in-out infinite alternate;}
.tile.secret-999-tile.evolving{animation:jackpot-evolve .5s cubic-bezier(.12,1.55,.34,1) both;}
.secret-999-award{padding:8px 9px;margin:7px auto;background:linear-gradient(105deg,#fdeca8,#fae3ff);
 border-radius:9px;color:#79218f;font-size:12px;font-weight:1000;text-align:center;}
.secret-999-award[hidden]{display:none!important}
@media(prefers-reduced-motion:reduce){
  .tile.secret-999-tile:not(.popped) .notif.large,
  .tile.secret-999-tile.evolving{animation:none}
}
@media(max-width:480px){
 .tile.secret-999-tile .notif.large{min-width:36px;height:26px;font-size:11px;}
}

.secret-trophy{display:inline-block;width:max-content;margin-top:3px;padding:3px 7px;
 font-size:10px;line-height:1.35;font-weight:900;border:1px solid #ebcd72;
 background:linear-gradient(110deg,#fff8cd,#f1d6ff);border-radius:8px;color:#6b318c;}
.secret-trophy[hidden]{display:none!important}
