.match3-dialog{color:#ead9b6;background:#181720;border:2px solid #a77d50;border-top:5px solid #d9af71;border-radius:8px;box-shadow:0 0 0 5px #17131a,0 22px 85px #000c;font:13px/1.45 ui-monospace,SFMono-Regular,Consolas,monospace;max-height:calc(100dvh - 20px);overflow:auto;padding:0}
.match3-dialog::backdrop{background:#08090edb}
#match3-game::backdrop{background-color:#080b12;background-image:linear-gradient(#06081042,#0608105c),url('assets/v19/match3_stage_background.png');background-position:center;background-size:cover;background-repeat:no-repeat;image-rendering:pixelated}
#match3-game{box-sizing:border-box;width:min(620px,calc(100vw - 12px));max-height:calc(100dvh - 12px);position:relative;border:1px solid #795d49;border-top:3px solid #bd8e5c;border-radius:5px;box-shadow:0 0 0 3px #121118,0 18px 60px #000b}
#match3-game *{box-sizing:border-box}
.match3-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 19px;border-bottom:2px solid #755638;background:linear-gradient(180deg,#36303a,#25222c)}
.match3-heading,.match3-head-actions{display:flex;align-items:center;gap:12px}
.match3-head h1,.match3-head h2{margin:0;font-size:21px;line-height:1.2;letter-spacing:.08em}
.match3-game-head{min-height:56px;padding:5px 15px;border-bottom:1px solid #6c5341;background:linear-gradient(90deg,#24212a,#302630 50%,#24212a)}
.match3-game-head .match3-heading{gap:9px}
.match3-game-head .match3-heading::before{content:'✦';color:#c69965;font-size:17px;line-height:1}
.match3-game-head h1{font-size:18px;letter-spacing:.04em;color:#f1d7af}
.match3-game-head .match3-head-actions{gap:7px}
.match3-game-head .match3-head-actions button{min-height:44px;padding:7px 10px}
#match3-game .match3-icon-button{min-width:44px;min-height:44px;padding:6px 9px!important}
.match3-dialog button{font:inherit;cursor:pointer}
.match3-dialog button:disabled{opacity:.5;cursor:default}
.match3-dialog button:focus-visible,.match3-dialog input:focus-visible{outline:2px solid #e4ba79;outline-offset:3px}
.match3-head-actions button,.match3-icon-button,.match3-message-actions button,.match3-hunter button,.match3-secondary{border:1px solid #957349;border-bottom-color:#59422f;background:#322b35;color:#f2dfbd;border-radius:4px;padding:8px 12px;box-shadow:inset 0 1px #e6c08326,0 2px 0 #100e14}
.match3-head-actions button:hover,.match3-message-actions button:hover,.match3-hunter button:hover,.match3-secondary:hover{background:#463641}
.match3-icon-button{font-size:22px!important;line-height:1;padding:4px 10px!important;min-width:36px}
.match3-game-content{padding:12px 14px 10px;background:#151922}
.match3-stats{display:grid;grid-template-columns:1fr 1fr;column-gap:9px;row-gap:7px;max-width:532px;margin:0 auto 9px}
.match3-stats>.match3-score,.match3-stats>.match3-moves,.match3-progress-group,.match3-personal,.match3-instruction{border:1px solid #7c6650;border-radius:4px;background:linear-gradient(145deg,#2a3442,#1a2130 72%);box-shadow:inset 0 1px #eac38436,inset 0 -2px #070f1caa,0 3px 8px #0005}
.match3-stats>.match3-score,.match3-stats>.match3-moves{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;min-height:44px;padding:0 12px}
.match3-progress-group{grid-column:1/-1;padding:8px 12px 10px;min-height:64px}
.match3-stats span,.match3-progress-caption,.match3-personal span{color:#c8bba7;font-size:12px}
.match3-stats strong{font-size:19px;line-height:1;color:#f3d59e;font-variant-numeric:tabular-nums}
.match3-progress-caption{display:flex;justify-content:space-between;gap:10px;margin-bottom:7px}
.match3-progress{height:23px;padding:3px;border:1px solid #b09063;border-radius:3px;background:#101824;box-shadow:inset 0 2px 5px #000b,0 1px #d8b98542;overflow:hidden}
#match3-progress-fill{height:100%;width:0;border-radius:1px;background:linear-gradient(180deg,#efbd80 0 22%,#cb795e 22% 73%,#894a57 100%);box-shadow:0 0 9px #d88869a3;transition:width .35s ease}
.match3-board-stage{position:relative;width:min(100%,532px,calc(100dvh - 305px));margin-inline:auto}
.match3-board{--columns:8;display:grid;grid-template-columns:repeat(var(--columns),minmax(0,1fr));gap:3px;width:100%;aspect-ratio:1;margin-inline:auto;padding:7px;background:linear-gradient(135deg,#96643b,#17202b 13%,#17202b 87%,#96643b);border:2px solid #ce9b5d;box-shadow:inset 0 0 0 2px #0c1520,inset 0 0 22px #0009,0 5px 12px #0008;border-radius:5px;touch-action:none;user-select:none;overflow:hidden}
.match3-combo{--combo-light:#f9be75;--combo-soft:#b86a507d;position:absolute;top:43%;left:50%;z-index:8;width:min(78%,320px);height:120px;pointer-events:none;isolation:isolate;transform:translate(-50%,-50%)}
.match3-combo[hidden]{display:none}
.match3-combo img{position:relative;z-index:1;display:block;width:100%;height:100%;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(0 8px 5px #03060cbb)}
.match3-combo-aura{position:absolute;z-index:0;inset:-30% -25%;background:radial-gradient(ellipse,var(--combo-soft) 0 19%,transparent 68%);mix-blend-mode:screen}
.match3-combo-aura::before,.match3-combo-aura::after{content:'';position:absolute;inset:9% 15%;border-radius:50%}
.match3-combo-aura::before{border:3px solid var(--combo-light);box-shadow:0 0 0 3px #ffffff18,inset 0 0 12px var(--combo-light)}
.match3-combo-aura::after{background:repeating-conic-gradient(from 12deg,var(--combo-light) 0 5deg,transparent 5deg 30deg);mask:radial-gradient(ellipse,transparent 0 32%,#000 50%,transparent 69%)}
.match3-combo-aura span{position:absolute;inset:20% 22%;border:1px solid #fff3c7;border-radius:50%;transform:scale(.6)}
.match3-combo[data-level="3"]{--combo-light:#aa8cff;--combo-soft:#5b4ecb8c}
.match3-combo[data-level="4"]{--combo-light:#ffb76d;--combo-soft:#b84f448c}
.match3-combo[data-level="5"]{--combo-light:#6fe9d1;--combo-soft:#259a9c8c}
.match3-combo[data-level="6"]{--combo-light:#ffc877;--combo-soft:#b64a5b8c}
.match3-combo[data-level="7"]{--combo-light:#73aaff;--combo-soft:#395fc88c}
.match3-combo[data-level="8"]{--combo-light:#ffde8b;--combo-soft:#bb446f99}
.match3-combo.is-active{animation:match3-combo-pop .98s cubic-bezier(.18,.78,.28,1) both}
.match3-combo.is-active .match3-combo-aura{animation:match3-combo-light .98s ease-out both}
.match3-combo.is-active .match3-combo-aura::before{animation:match3-combo-ring .78s ease-out both}
.match3-combo.is-active .match3-combo-aura::after{animation:match3-combo-rays .98s ease-out both}
@keyframes match3-combo-pop{0%{opacity:0;transform:translate(-50%,-34%) scale(.58)}19%{opacity:1;transform:translate(-50%,-51%) scale(1.13)}35%{transform:translate(-50%,-50%) scale(.96)}53%{transform:translate(-50%,-50%) scale(1.03)}75%{opacity:1}100%{opacity:0;transform:translate(-50%,-61%) scale(1.08)}}
@keyframes match3-combo-light{0%{opacity:0;transform:scale(.35)}24%{opacity:1;transform:scale(1.04)}100%{opacity:0;transform:scale(1.4)}}
@keyframes match3-combo-ring{0%{opacity:0;transform:scale(.35)}25%{opacity:1}100%{opacity:0;transform:scale(1.65)}}
@keyframes match3-combo-rays{0%{opacity:0;transform:rotate(-24deg) scale(.5)}28%{opacity:.85}100%{opacity:0;transform:rotate(32deg) scale(1.28)}}
.match3-tile{position:relative;display:grid;place-items:center;min-width:0;min-height:0;padding:0;border:1px solid #6e5b49;border-bottom-color:#342e33;border-radius:4px;background:linear-gradient(145deg,#2a3442,#1a2130 72%);box-shadow:inset 0 1px #eac38443,inset 0 -2px #070f1caa;aspect-ratio:1;touch-action:none;will-change:transform}
.match3-tile:nth-child(even){background:linear-gradient(145deg,#293142,#171e2c 72%)}
.match3-tile:hover{filter:brightness(1.18)}
.match3-tile[aria-selected="true"]{z-index:2;border-color:#f9d393;box-shadow:0 0 0 2px #e4b86d,0 0 17px #f4ca88a0,inset 0 0 10px #f4c38466}
.match3-tile img{display:block;width:100%;height:100%;object-fit:contain;image-rendering:pixelated;pointer-events:none;filter:drop-shadow(0 3px 2px #03060bbb) saturate(1.07)}
.match3-tile.is-clearing{animation:match3-clear .2s ease-in forwards}
.match3-tile.is-entering img{animation:match3-drop .3s ease-out both}
@keyframes match3-clear{to{transform:scale(.35);opacity:0;filter:brightness(2)}}
@keyframes match3-drop{from{transform:translateY(-22px) scale(.8);opacity:.3}to{transform:translateY(0) scale(1);opacity:1}}
.match3-status{display:grid;place-items:center;box-sizing:border-box;width:max-content;min-width:124px;height:42px;margin:4px auto 0;padding:0 17px;border:11px solid transparent;opacity:0;text-align:center;color:#ffe3a3;font-weight:700;text-shadow:0 2px #431c20;pointer-events:none}
.match3-status:not(:empty){border-image:url('assets/v21/points_toast.png') 27% 12% 27% 12% fill / 11px 14px;opacity:1}
.match3-status.is-burst{animation:match3-burst .45s ease-out}
#match3-retry-move{display:block;min-height:44px;margin:7px auto 0}
#match3-retry-move[hidden]{display:none}
@keyframes match3-burst{from{transform:translateY(8px);opacity:.35}to{transform:translateY(0);opacity:1}}
.match3-game-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;max-width:532px;margin:4px auto 0}
.match3-instruction{font-size:11px;line-height:1.35;color:#d2bba0;margin:0;max-width:370px;min-height:35px;padding:8px 11px}
.match3-personal{display:flex;align-items:center;gap:7px;margin-left:auto;white-space:nowrap;min-height:35px;padding:7px 11px}
.match3-personal strong{font-size:15px;font-variant-numeric:tabular-nums;color:#f0cf95}
.match3-primary{background:linear-gradient(#af6355,#71404d)!important;border-color:#d6a46d!important;color:#ffebbf!important;font-weight:700!important}
.match3-primary:hover{filter:brightness(1.12)}
#match3-new{width:auto;min-height:44px;padding:6px 11px;margin:0;border-radius:4px;border:1px solid #c99a65}
#match3-new[hidden]{display:none}
.match3-message{width:min(560px,calc(100vw - 24px));padding:30px;text-align:center}
.match3-message-top{font-size:23px;letter-spacing:9px;color:#e7c181;border-bottom:1px solid #8e6b4b;margin:-5px 0 22px;padding-bottom:12px}
.match3-message h2{font-size:22px;line-height:1.24;margin:0 0 17px;color:#f6ddb2}
.match3-message p{margin:11px 0;color:#d2c2aa;font-size:13px;line-height:1.6}
.match3-message b{color:#ffde9c}
.match3-message-actions{display:flex;justify-content:center;gap:11px;margin-top:24px;flex-wrap:wrap}
.match3-message-actions button{min-width:165px;padding:11px 16px}
#match3-success-status{color:#d8a78b}
.match3-hunter{width:min(670px,calc(100vw - 24px));padding:12px;display:grid;grid-template-columns:230px 1fr;gap:19px;align-items:center}
.match3-hunter:not([open]){display:none}
.match3-hunter-portrait{border:2px solid #826344;background:#0f1118;height:260px;overflow:hidden}
.match3-hunter-portrait img{width:100%;height:100%;object-fit:cover;image-rendering:pixelated}
.match3-hunter-copy{padding:8px 10px 8px 0}
.match3-hunter-copy h2{font-size:19px;color:#efcf98;margin:0 0 15px}
.match3-hunter-copy p{font-size:16px;line-height:1.65;color:#ede0c7;margin:0 0 23px}
.match3-hunter-copy button{min-width:110px}
.match3-ranking{width:min(660px,calc(100vw - 24px));padding-bottom:15px}
.match3-ranking>.match3-head{margin-bottom:14px}
.match3-search-label{display:block;font-size:11px;color:#cbb79a;margin:0 18px 5px}
#match3-search{display:block;margin:0 18px 15px;width:calc(100% - 36px);border:1px solid #96744e;border-radius:4px;background:#100f17;color:#efdfc2;padding:11px 12px;font:inherit}
.match3-ranking-columns,.match3-ranking-list li{display:grid;grid-template-columns:62px minmax(0,1fr) 95px;gap:12px;align-items:center;padding:9px 18px}
.match3-ranking-columns{font-size:10px;color:#b49b78;border-top:1px solid #644d3b;border-bottom:1px solid #644d3b}
.match3-ranking-columns span:last-child,.match3-ranking-list li span:last-child{text-align:right}
.match3-ranking-list{list-style:none;max-height:min(55dvh,470px);overflow-y:auto;margin:0;padding:0}
.match3-ranking-list li{border-bottom:1px solid #5c473b77;font-variant-numeric:tabular-nums}
.match3-ranking-list li:nth-child(2n){background:#ffffff08}
.match3-ranking-list strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}
.match3-ranking>p{margin:11px 18px;color:#c6ac8e;font-size:11px}
#match3-more{display:block;margin:8px auto 0;min-width:150px}
#match3-more[hidden]{display:none}
.match3-analytics{width:min(850px,calc(100vw - 24px))}
.match3-analytics-content{padding:18px}
.match3-analytics-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:14px}
.match3-analytics-summary>div{display:flex;flex-direction:column;gap:4px;border:1px solid #795d42;padding:11px 13px;background:#2a252e}
.match3-analytics-summary span{font-size:10px;color:#c6ad8b}.match3-analytics-summary strong{font-size:21px;color:#f1d69d}
.match3-analytics-note{font-size:11px;color:#ccb999;margin:0 0 13px}
.match3-analytics-actions{display:flex;gap:10px;justify-content:flex-end}
.match3-analytics-actions button{border:1px solid #96754e;background:#352c35;border-radius:4px;color:#f0dfc1;padding:9px 12px}
#match3-analytics-status{font-size:11px;color:#dcb989;min-height:16px}
.match3-analytics-table-wrap{max-height:50dvh;overflow:auto;border:1px solid #5d493a}
.match3-analytics table{border-collapse:collapse;width:100%;font-size:11px}
.match3-analytics th,.match3-analytics td{padding:9px;text-align:right;border-bottom:1px solid #5c493b;white-space:nowrap}
.match3-analytics th:nth-child(2),.match3-analytics td:nth-child(2){text-align:left}
.match3-analytics th{position:sticky;top:0;background:#332a34;color:#d7b988}
.match3-analytics tr:nth-child(2n){background:#ffffff09}
@media(max-width:740px){.match3-game-content{padding:10px}.match3-board{gap:2px;padding:5px}.match3-analytics-summary{grid-template-columns:repeat(2,1fr)}}
@media(max-aspect-ratio:3/4){#match3-game::backdrop{background-image:linear-gradient(#0608103b,#06081052),url('assets/v19/match3_stage_background_mobile.png')}}
@media(max-width:450px){
  #match3-game{width:calc(100vw - 8px);max-height:calc(100dvh - 8px)}
  .match3-head{padding:10px}
  .match3-head h1{font-size:17px}
  .match3-head-actions{gap:5px}
  .match3-head-actions button{font-size:11px;padding:6px 8px}
  .match3-game-head{min-height:52px;padding:4px 9px}
  .match3-game-head h1{font-size:18px}
  .match3-game-head .match3-heading::before{font-size:14px}
  .match3-game-head .match3-head-actions button{min-height:44px;padding:6px 8px}
  .match3-game-content{padding:8px}
  .match3-stats{column-gap:5px;row-gap:5px;margin-bottom:7px}
  .match3-stats>.match3-score,.match3-stats>.match3-moves{min-height:38px;padding-inline:7px}
  .match3-stats span,.match3-progress-caption{font-size:11px}
  .match3-stats strong{font-size:17px}
  .match3-progress-group{padding:6px 8px 8px;min-height:56px}
  .match3-progress-caption{margin-bottom:5px}
  .match3-progress{height:21px}
  .match3-board-stage{width:min(100%,calc(100dvh - 260px))}
  .match3-board{gap:1px;padding:3px;border-width:2px;border-radius:4px}
  .match3-combo{width:min(84%,258px);height:100px}
  .match3-tile{border-radius:3px}
  .match3-tile img{width:100%;height:100%}
  .match3-game-foot{margin-top:4px;min-height:31px}
  .match3-instruction{display:none}
  .match3-personal span{font-size:11px}
  .match3-personal strong{font-size:14px}
  #match3-new{padding:6px 8px;font-size:11px}
  .match3-message{padding:20px}
  .match3-message h2{font-size:19px}
  .match3-message-actions button{width:100%}
  .match3-hunter{grid-template-columns:1fr;padding:12px}
  .match3-hunter-portrait{height:180px}
  .match3-hunter-copy{padding:0 5px 5px}
  .match3-hunter-copy p{font-size:14px}
  .match3-ranking-columns,.match3-ranking-list li{grid-template-columns:49px minmax(0,1fr) 75px;padding-inline:11px;gap:5px}
}
@media(prefers-reduced-motion:reduce){.match3-tile.is-clearing,.match3-tile.is-entering img,.match3-status.is-burst,.match3-combo.is-active,.match3-combo.is-active .match3-combo-aura,.match3-combo.is-active .match3-combo-aura::before,.match3-combo.is-active .match3-combo-aura::after{animation:none}#match3-progress-fill{transition:none}}

/* Match effects live in the tile only while its server-confirmed cascade clears. */
.match3-tile.is-clearing{z-index:3;animation:none;filter:none}
.match3-tile.is-clearing img{animation:match3-piece-vanish .34s cubic-bezier(.2,.7,.28,1) forwards}
.match3-break{position:absolute;inset:0;z-index:4;pointer-events:none;overflow:visible}
.match3-break>span{position:absolute;top:50%;left:50%;opacity:0}
@keyframes match3-piece-vanish{0%{opacity:1;transform:scale(1)}33%{opacity:1;transform:scale(1.13)}100%{opacity:0;transform:scale(.35)}}
@keyframes match3-break-fly{0%{opacity:0;transform:translate(-50%,-50%) scale(.35) rotate(0)}18%{opacity:1}65%{opacity:1}100%{opacity:0;transform:translate(calc(-50% + var(--dx)),calc(-50% + var(--dy))) scale(.84) rotate(var(--turn))}}

.match3-break--ticket>span{width:25%;height:33%;background:linear-gradient(135deg,#ffdd9e 0 31%,#e95844 32% 72%,#873145 73%);border:1px solid #ffd796;clip-path:polygon(0 0,78% 0,100% 25%,85% 62%,100% 100%,12% 100%,0 70%,10% 35%);box-shadow:0 0 5px #e8674f;animation:match3-break-fly .36s ease-out forwards}
.match3-break--ticket>span:nth-child(1){--dx:-22px;--dy:-19px;--turn:-62deg}
.match3-break--ticket>span:nth-child(2){--dx:21px;--dy:-13px;--turn:52deg;animation-delay:25ms}
.match3-break--ticket>span:nth-child(3){--dx:3px;--dy:23px;--turn:115deg;animation-delay:40ms}

.match3-break--mask>span{width:27%;height:36%;background:linear-gradient(125deg,#c995ff 0 31%,#7544cb 32% 68%,#302c77 69%);border:1px solid #b8aaff;clip-path:polygon(50% 0,100% 34%,78% 100%,25% 68%,0 24%);filter:drop-shadow(0 0 4px #9975ee);animation:match3-break-fly .36s ease-out forwards}
.match3-break--mask>span:nth-child(1){--dx:-23px;--dy:-18px;--turn:-88deg}
.match3-break--mask>span:nth-child(2){--dx:20px;--dy:-22px;--turn:68deg;animation-delay:15ms}
.match3-break--mask>span:nth-child(3){--dx:-15px;--dy:19px;--turn:119deg;animation-delay:25ms}
.match3-break--mask>span:nth-child(4){--dx:24px;--dy:18px;--turn:-54deg;animation-delay:35ms}

.match3-break--gear>span{width:28%;height:7%;border-radius:1px;background:linear-gradient(90deg,#fff0bd,#ffc968 55%,#d96d40);box-shadow:0 0 5px #ffb655,0 0 9px #ef854f;transform-origin:0 50%;animation:match3-break-spark .36s ease-out forwards}
.match3-break--gear>span:nth-child(1){--dx:-22px;--dy:-15px;--angle:-145deg}
.match3-break--gear>span:nth-child(2){--dx:21px;--dy:-17px;--angle:-32deg;animation-delay:18ms}
.match3-break--gear>span:nth-child(3){--dx:-17px;--dy:21px;--angle:142deg;animation-delay:32ms}
.match3-break--gear>span:nth-child(4){--dx:21px;--dy:20px;--angle:35deg;animation-delay:43ms}
@keyframes match3-break-spark{0%{opacity:0;transform:translate(-50%,-50%) rotate(var(--angle)) scaleX(.2)}16%{opacity:1}63%{opacity:1}100%{opacity:0;transform:translate(calc(-50% + var(--dx)),calc(-50% + var(--dy))) rotate(var(--angle)) scaleX(1.2)}}

.match3-break--clock>span{width:34%;height:34%;border:2px solid #9fd8df;border-radius:50%;box-shadow:0 0 5px #83e6f0,inset 0 0 5px #83e6f0;animation:match3-break-ripple .37s ease-out forwards}
.match3-break--clock>span:nth-child(2){border-color:#edc789;box-shadow:0 0 4px #edc789;animation-delay:75ms}
@keyframes match3-break-ripple{0%{opacity:0;transform:translate(-50%,-50%) scale(.25)}22%{opacity:.95}100%{opacity:0;transform:translate(-50%,-50%) scale(2.35)}}

.match3-break--bulb::before{content:'';position:absolute;inset:12%;border-radius:50%;background:radial-gradient(circle,#faffdc 0,#ffe993 18%,#44d6bc 45%,transparent 72%);mix-blend-mode:screen;animation:match3-break-flash .35s ease-out forwards}
.match3-break--bulb>span{width:6%;height:29%;border-radius:2px;background:linear-gradient(#fff7d3,#ffc762 65%,transparent);box-shadow:0 0 5px #ffe18c;transform-origin:50% 100%;animation:match3-break-ray .35s ease-out forwards}
.match3-break--bulb>span:nth-child(1){--angle:0deg}
.match3-break--bulb>span:nth-child(2){--angle:72deg;animation-delay:12ms}
.match3-break--bulb>span:nth-child(3){--angle:144deg;animation-delay:24ms}
.match3-break--bulb>span:nth-child(4){--angle:216deg;animation-delay:36ms}
.match3-break--bulb>span:nth-child(5){--angle:288deg;animation-delay:48ms}
@keyframes match3-break-flash{0%{opacity:0;transform:scale(.3)}26%{opacity:1;transform:scale(1.2)}100%{opacity:0;transform:scale(1.7)}}
@keyframes match3-break-ray{0%{opacity:0;transform:translate(-50%,-100%) rotate(var(--angle)) translateY(0) scaleY(.2)}20%{opacity:1}100%{opacity:0;transform:translate(-50%,-100%) rotate(var(--angle)) translateY(-90%) scaleY(1.2)}}
@media(prefers-reduced-motion:reduce){.match3-tile.is-clearing img,.match3-break>span,.match3-break--bulb::before{animation:none}}
