.cf-page{--cf-forest:#244c40;--cf-ink:#233c32;--cf-coral:#ce5839;--cf-paper:#fff1d3;--cf-line:#b8ae8d}.cf-heading h1{font-size:clamp(48px,8vw,88px);letter-spacing:-3px}.cf-heading h1>span{color:var(--cf-coral)}.cf-heading p{font-size:20px;line-height:1.35}.cf-eyebrow{display:block;font-size:10px;font-weight:700;letter-spacing:1.6px;color:var(--sea-dark)}.cf-beta{display:flex;gap:12px;align-items:center;margin:0 0 20px;padding:10px 14px;background:var(--paper);border:1px dashed var(--line)}.cf-beta>span{font-size:10px;letter-spacing:1px;font-weight:bold;color:var(--cf-coral)}.cf-beta p{margin:0;font-size:12px;line-height:1.6}.cf-beta a{color:inherit;text-decoration:underline;text-underline-offset:3px}.cf-layout{display:grid;grid-template-columns:minmax(0,820px) minmax(220px,290px);gap:24px;align-items:start}.cf-play-column{min-width:0}.cf-cabinet:has(.cf-overlay:not([hidden])){touch-action:pan-y}.cf-cabinet{background:#233c32;box-shadow:6px 7px 0 #233c3220;overflow:hidden}.cf-toolbar{background:#233c32;display:flex;justify-content:space-between;align-items:center;gap:8px;padding:12px 16px;color:#f9e3b1;border-bottom:1px solid #627564}.cf-stamp{display:flex;gap:8px;align-items:center;font-size:23px;font-weight:bold;letter-spacing:-1px}.cf-stamp small{font-size:8px;letter-spacing:1px;font-weight:400;border-left:1px solid #77806c;padding-left:9px;max-width:75px}.cf-tools{display:flex;gap:5px}.cf-tools button{display:inline-flex;align-items:center;gap:5px;min-height:34px;padding:6px 8px;border:1px solid #7d8a70;background:transparent;color:#f9e3b1;font-size:10px}.cf-tools button:disabled{opacity:.4}.cf-tools .icon{width:14px;height:14px}.cf-hud{display:grid;grid-template-columns:1.5fr 1fr 1fr 1fr;gap:8px;padding:11px 18px;background:#f5e9c8;color:#233c32;border-bottom:3px solid #c4a36f}.cf-hud>div{min-width:0}.cf-hud span{display:block;font-size:9px;letter-spacing:1px;margin-bottom:3px}.cf-hud strong{font-size:25px;line-height:1.1;font-variant-numeric:tabular-nums}.cf-hud>div:last-child strong{color:#a33d2f}.cf-stage{height:clamp(500px,calc(100dvh - 310px),860px);position:relative;display:flex;justify-content:center;align-items:center;background:#203b34;min-height:0;overflow:hidden}.cf-stage>canvas{display:block;width:auto;height:100%;max-width:100%;object-fit:contain;image-rendering:pixelated;touch-action:none;outline-offset:-4px}.cf-stage>canvas:focus-visible{outline:2px solid #ffd27b}.cf-overlay{position:absolute;inset:0;display:grid;place-items:center;padding:16px;background:#16342c65}.cf-overlay[hidden]{display:none}.cf-ticket{width:min(360px,100%);padding:26px 26px 20px;background:#fff0cf;color:#243c32;border:2px solid #263e32;box-shadow:6px 6px 0 #152d2855;text-align:left;max-height:100%;overflow:auto}.cf-ticket h2{font-size:43px;line-height:.98;margin:12px 0 15px;letter-spacing:-1px}.cf-ticket h2 em{font-family:Georgia,serif;color:#b34b32}.cf-ticket p{font-size:12px;line-height:1.6;margin:12px 0}.cf-ticket small{display:block;font-size:10px;line-height:1.6;margin-top:13px;color:#596452}.cf-rule{display:flex;align-items:center;gap:13px;border-block:1px solid #c9b58c;padding:10px 0;margin:16px 0}.cf-rule strong{font-size:44px;line-height:1;font-family:Georgia,serif;color:#244c40}.cf-rule span{font-size:10px;line-height:1.6;letter-spacing:.5px}.cf-primary,.cf-secondary{display:block;width:100%;padding:12px 13px;min-height:44px;font-size:11px;font-weight:bold;letter-spacing:.4px;line-height:1.4;text-align:center;border:1px solid #244c40;text-decoration:none}.cf-primary{background:#244c40;color:#fff0cf;margin-top:10px;box-shadow:2px 3px 0 #173b2c}.cf-secondary{background:transparent;color:inherit;margin-top:10px}.cf-primary:hover{background:#346650}.cf-secondary:hover{background:#244c4010}.cf-primary:disabled,.cf-secondary:disabled{opacity:.5;box-shadow:none}.cf-receipt{padding:14px 0;border-block:1px dashed #b7a17a}.cf-receipt span{display:block;font-size:9px;letter-spacing:1px}.cf-receipt strong{font-size:38px;font-variant-numeric:tabular-nums}.cf-actions{display:grid;grid-template-columns:repeat(6,1fr);gap:5px;padding:11px 13px;background:#233c32}.cf-actions button{min-height:54px;border:1px solid #8c9a7d;color:#fff0cf;background:#2d5142;touch-action:none}.cf-actions b{display:block;font-size:24px;line-height:1.1}.cf-actions span{display:block;margin-top:5px;font-size:8px;letter-spacing:.8px}.cf-actions button:last-child{background:#c35637;border-color:#e78a5b}.cf-actions button:active,.cf-actions button.is-held{background:#54795b;transform:translateY(1px)}.cf-actions button:last-child:active{background:#a33f2a}.cf-actions button:disabled{opacity:.38}.cf-statusbar{display:flex;gap:8px;justify-content:space-between;align-items:center;padding:9px 14px;color:#e9dfbf;background:#1b332d;border-top:1px solid #66725c}.cf-statusbar p{font-size:10px;line-height:1.4;margin:0}.cf-statusbar>span{font-size:8px;letter-spacing:.6px;white-space:nowrap;color:#d5d891}.cf-sidebar{display:grid;gap:20px}.cf-side-ticket{padding:23px;background:var(--paper);border:1px solid var(--line);box-shadow:3px 4px 0 #263e3210}.cf-side-ticket h2,.cf-side-ticket h3{font-size:34px;line-height:1.1;margin:13px 0;font-family:Georgia,serif;letter-spacing:-.5px}.cf-side-ticket h2 em,.cf-side-ticket h3 em{color:var(--sea-dark)}.cf-side-ticket p{font-size:12px;line-height:1.7}.cf-device-best{padding:14px 0;border-block:1px dashed var(--line)}.cf-device-best span{font-size:9px;letter-spacing:.6px;display:block}.cf-device-best strong{display:block;margin-top:5px;font-size:31px;font-variant-numeric:tabular-nums;color:var(--sea-dark)}.cf-side-ticket .cf-fine-print{font-size:10px;color:var(--muted);margin-bottom:0}.cf-guide{padding:28px 0}.cf-guide h2{font-size:36px;line-height:1.1;margin:9px 0 23px}.cf-guide-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:22px}.cf-guide-grid b{font-size:10px;color:var(--sea-dark);letter-spacing:.7px}.cf-guide-grid p{font-size:12px;line-height:1.7}.cf-key-legend{font-size:10px;line-height:2;margin:18px 0 0}.cf-key-legend kbd{font:inherit;font-weight:bold;border:1px solid var(--line);padding:2px 4px;background:var(--paper)}.cf-room-bar{display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px;padding:8px 12px;background:#325443;color:#fff0cf;font-size:10px}.cf-room-bar[hidden]{display:none}.cf-room-bar>span:nth-child(2){flex:1}.cf-room-bar button{padding:5px 7px;min-height:30px;background:transparent;color:inherit;border:1px solid #7f9677;font-size:10px}.cf-room-ticket{width:min(410px,100%);padding:20px}.cf-room-ticket h2{font-size:35px;margin:8px 0 12px}.cf-room-ticket label{display:block;font-size:9px;font-weight:bold;letter-spacing:.8px;margin:12px 0 5px}.cf-room-ticket input,.cf-room-ticket select{display:block;width:100%;min-height:42px;border:1px solid #a79876;border-radius:0;background:#fff8e6;color:#243c32;font:inherit;font-size:15px;padding:8px}.cf-room-ticket input[readonly]{font-size:11px}.cf-room-ticket .cf-room-note{font-size:10px;color:#5a6150;border-top:1px dashed #b5a481;padding-top:11px}.cf-copy-row{display:flex;gap:5px}.cf-copy-row input{min-width:0;flex:1}.cf-copy-row button{border:1px solid #244c40;background:#244c40;color:#fff0cf;padding:5px 9px;font-size:10px}.cf-room-ticket ul{padding:0;list-style:none;margin:12px 0;display:grid;gap:4px}.cf-room-ticket li{display:flex;gap:7px;justify-content:space-between;border-bottom:1px solid #d8c8a2;padding:5px 0;font-size:12px}.cf-room-ticket li>span:last-child{font-size:9px;color:#62745a}.cf-opponents{border:1px solid var(--line);background:var(--paper)}.cf-opponents-heading{padding:18px}.cf-opponents-heading h2{font-size:25px;margin:8px 0 0}.cf-rivals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;padding:0 12px 14px}.cf-rival{display:block;min-width:0;text-align:left;border:1px solid var(--line);background:transparent;color:inherit;padding:7px}.cf-rival[aria-pressed=true]{border:2px solid #c15b38;padding:6px;box-shadow:0 0 0 2px #c15b3825}.cf-rival canvas{display:block;width:100%;height:auto;background:#203c35;image-rendering:pixelated}.cf-rival-name{display:block;font-size:11px;margin:6px 0 3px;overflow-wrap:anywhere}.cf-rival-status{display:block;font-size:9px;line-height:1.4;color:var(--muted)}.cf-rival.out{opacity:.6}#cf-help-dialog{width:min(700px,calc(100% - 28px));max-height:calc(100dvh - 28px);padding:27px;background:var(--paper);color:var(--ink);border:2px solid var(--ink)}#cf-help-dialog::backdrop{background:#152d28bd}#cf-help-dialog h2{font-size:32px;margin:10px 0 18px}#cf-help-dialog p,#cf-help-dialog li{font-size:13px;line-height:1.7}#cf-help-dialog ol{padding-left:22px}.cf-dialog-dismiss{text-align:right;margin:-12px -10px 0}.cf-dialog-dismiss button{width:40px;height:40px;border:1px solid var(--line);background:transparent;color:inherit;font-size:24px}.cf-help-demo{border-block:1px solid var(--line);padding:13px 0}.cf-help-demo canvas{display:block;width:100%;height:auto;image-rendering:pixelated;background:#233c32}.cf-help-demo>p{margin-bottom:0}.cf-piece-gallery{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:20px 0}.cf-piece-gallery figure{margin:0;border:1px solid var(--line);padding:7px;text-align:center}.cf-piece-gallery canvas{display:block;width:100%;height:auto;image-rendering:pixelated}.cf-piece-gallery figcaption{font-size:10px;line-height:1.4;margin-top:5px}.cf-cabinet.is-expanded{position:fixed;inset:0;z-index:1000;width:100%;height:100dvh;display:flex;flex-direction:column;box-shadow:none;border:0;border-radius:0;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}.cf-cabinet.is-expanded .cf-toolbar,.cf-cabinet.is-expanded .cf-hud,.cf-cabinet.is-expanded .cf-actions,.cf-cabinet.is-expanded .cf-statusbar,.cf-cabinet.is-expanded .cf-room-bar{flex-shrink:0}.cf-cabinet.is-expanded .cf-stage{height:auto;flex:1;min-height:0}.cf-cabinet.is-expanded .cf-stage>canvas{width:auto;height:100%;max-width:100%;object-fit:contain}.cf-cabinet.is-expanded .cf-toolbar{padding:6px 10px}.cf-cabinet.is-expanded .cf-hud{padding:6px 12px}.cf-cabinet.is-expanded .cf-hud strong{font-size:21px}.cf-cabinet.is-expanded .cf-actions{padding:6px 10px}.cf-cabinet.is-expanded .cf-statusbar{padding:5px 10px}.cf-cabinet.is-expanded .cf-statusbar p{font-size:9px}.cf-cabinet.is-expanded .cf-actions button{min-height:46px}.cf-cabinet.is-expanded .cf-tools button{min-height:32px}.cf-cabinet.is-expanded .cf-ticket{max-height:100%;padding:18px 22px}.cf-cabinet.is-expanded .cf-room-ticket h2{font-size:27px;margin:5px 0}.cf-cabinet.is-expanded .cf-room-ticket .cf-room-note{font-size:9px;margin:8px 0}.cf-cabinet.is-expanded .cf-room-ticket label{margin-top:7px}.cf-cabinet.is-expanded .cf-room-ticket .cf-primary,.cf-cabinet.is-expanded .cf-room-ticket .cf-secondary{padding:9px;min-height:38px}.cf-cabinet.is-expanded .cf-room-ticket li{padding:3px 0}
@media(max-width:1000px){.cf-layout{grid-template-columns:minmax(0,1fr) 240px;gap:18px}.cf-stamp small{display:none}.cf-tools button{padding:5px 6px}.cf-tools button span{font-size:9px}.cf-toolbar{padding:10px}.cf-side-ticket{padding:18px}}
@media(max-width:760px){.cf-layout{display:block}.cf-sidebar{margin-top:20px;grid-template-columns:repeat(2,minmax(0,1fr))}.cf-opponents{grid-column:1/-1;grid-row:1}.cf-rivals{grid-template-columns:repeat(3,minmax(0,1fr))}.cf-side-ticket h2,.cf-side-ticket h3{font-size:29px}.cf-heading{align-items:end}.cf-heading p{font-size:16px}.cf-guide-grid{gap:16px}.cf-guide-grid p{font-size:11px}.cf-ticket{padding:23px}.cf-tools button span{display:none}.cf-tools button{min-width:35px;min-height:35px;justify-content:center}.cf-stamp small{display:block;max-width:none}.cf-piece-gallery{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:450px){.cf-heading h1{font-size:52px;letter-spacing:-2px}.cf-heading p{font-size:13px}.cf-beta{padding:9px 11px}.cf-beta p{font-size:11px}.cf-stamp small{font-size:7px;max-width:75px}.cf-tools{gap:4px}.cf-tools button{min-width:32px;min-height:32px;padding:4px}.cf-toolbar{padding:8px}.cf-hud{padding:9px 12px}.cf-hud strong{font-size:22px}.cf-hud span{font-size:8px}.cf-overlay{padding:10px}.cf-ticket{padding:20px;max-width:315px}.cf-ticket h2{font-size:36px}.cf-ticket p{font-size:11px}.cf-rule{margin:12px 0;padding:8px 0}.cf-rule strong{font-size:38px}.cf-actions{gap:4px;padding:9px}.cf-actions button{min-height:52px}.cf-actions b{font-size:21px}.cf-actions span{font-size:7px;letter-spacing:0}.cf-statusbar p{font-size:9px}.cf-sidebar{display:block}.cf-sidebar>section+section{margin-top:16px}.cf-guide-grid{display:block}.cf-guide-grid>div+div{margin-top:19px}.cf-guide-grid p{font-size:12px}.cf-rivals{grid-template-columns:repeat(3,minmax(0,1fr))}.cf-piece-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}#cf-help-dialog{padding:20px}.cf-room-ticket{padding:15px}.cf-room-ticket h2{font-size:29px}.cf-room-ticket .cf-room-note{font-size:9px}.cf-room-ticket p{margin:8px 0}.cf-copy-row button{padding:4px 6px}}
@media(max-height:560px){.cf-cabinet.is-expanded .cf-stage{min-height:0}.cf-cabinet.is-expanded .cf-toolbar{padding:4px 9px}.cf-cabinet.is-expanded .cf-hud{padding:4px 10px}.cf-cabinet.is-expanded .cf-hud span{font-size:7px;margin-bottom:2px}.cf-cabinet.is-expanded .cf-hud strong{font-size:17px}.cf-cabinet.is-expanded .cf-actions{padding:4px 8px;gap:4px}.cf-cabinet.is-expanded .cf-actions button{min-height:44px}.cf-cabinet.is-expanded .cf-actions b{font-size:18px}.cf-cabinet.is-expanded .cf-actions span{font-size:7px;margin-top:2px}.cf-cabinet.is-expanded .cf-statusbar{display:none}.cf-cabinet.is-expanded .cf-ticket{padding:13px 17px}.cf-cabinet.is-expanded .cf-ticket h2{font-size:29px;margin:7px 0}.cf-cabinet.is-expanded .cf-ticket p{font-size:10px;line-height:1.4;margin:8px 0}.cf-cabinet.is-expanded .cf-rule{margin:7px 0;padding:6px 0}.cf-cabinet.is-expanded .cf-rule strong{font-size:30px}.cf-cabinet.is-expanded .cf-ticket .cf-primary,.cf-cabinet.is-expanded .cf-ticket .cf-secondary{min-height:35px;padding:8px;font-size:10px;margin-top:7px}.cf-cabinet.is-expanded .cf-ticket small{font-size:9px;margin-top:8px}.cf-cabinet.is-expanded .cf-room-ticket .cf-room-note{display:none}.cf-cabinet.is-expanded .cf-room-ticket input,.cf-cabinet.is-expanded .cf-room-ticket select{min-height:34px;padding:5px;font-size:16px}.cf-cabinet.is-expanded .cf-room-ticket h2{font-size:22px}.cf-cabinet.is-expanded .cf-room-ticket .cf-eyebrow{font-size:8px}.cf-cabinet.is-expanded .cf-room-ticket li{font-size:10px}.cf-cabinet.is-expanded .cf-room-ticket ul{margin:7px 0;gap:0}}
@media(orientation:landscape) and (max-height:560px){.cf-cabinet.is-expanded{display:grid;grid-template-columns:minmax(0,1fr) 104px;grid-template-rows:38px 42px 1fr}.cf-cabinet.is-expanded .cf-toolbar{grid-column:1/-1;grid-row:1}.cf-cabinet.is-expanded .cf-hud{grid-column:1;grid-row:2}.cf-cabinet.is-expanded .cf-stage{grid-column:1;grid-row:3;height:100%}.cf-cabinet.is-expanded .cf-actions{grid-column:2;grid-row:2/4;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,1fr);padding:5px}.cf-cabinet.is-expanded .cf-actions button{min-height:44px}.cf-cabinet.is-expanded .cf-room-bar{position:absolute;z-index:2;top:43px;left:8px;max-width:calc(100% - 116px);background:#233c32}.cf-cabinet.is-expanded .cf-room-bar>span:nth-child(2){display:none}}
@media(prefers-reduced-motion:reduce){.cf-page *{scroll-behavior:auto!important}.cf-actions button:active{transform:none}}

.cf-room-bar button{min-height:44px}.cf-cabinet.is-expanded .cf-room-bar{padding-block:3px}#cf-rival-dialog{width:min(620px,calc(100% - 24px));max-height:calc(100dvh - 24px);padding:20px;background:var(--paper);color:var(--ink);border:2px solid var(--ink);touch-action:pan-y}#cf-rival-dialog::backdrop{background:#152d28bd}#cf-rival-dialog h2{font-size:30px;margin:6px 0 12px}#cf-rival-dialog p{font-size:12px}#cf-rival-dialog .cf-rivals{grid-template-columns:repeat(3,minmax(0,1fr));padding:0}.cf-dialog-dismiss button{min-width:44px;min-height:44px}@media(max-width:380px){#cf-rival-dialog .cf-rivals{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Keep essential game copy legible on small and dark screens. The cream cards
   retain a dark ink regardless of the site theme. */
.cf-beta>span{color:#983820;font-size:12px}
:root[data-theme=dark] .cf-beta>span{color:#ffae88}
.cf-ticket .cf-eyebrow{color:#245447;font-size:12px;letter-spacing:.7px}
.cf-ticket p,.cf-ticket small,.cf-rule span,.cf-room-ticket label,.cf-room-ticket li,
.cf-room-ticket li>span:last-child,.cf-room-ticket .cf-room-note{font-size:12px}
.cf-tools button{min-width:44px;min-height:44px;font-size:12px}
.cf-tools button span,.cf-cabinet.is-expanded .cf-tools button span{font-size:12px}
.cf-cabinet.is-expanded .cf-tools button{min-width:44px;min-height:44px}
.cf-hud span,.cf-cabinet.is-expanded .cf-hud span,.cf-actions span,
.cf-cabinet.is-expanded .cf-actions span,.cf-statusbar p,.cf-cabinet.is-expanded .cf-statusbar p{font-size:12px}
.cf-stamp small{font-size:11px}
.cf-room-bar,.cf-room-bar button,.cf-primary,.cf-secondary{font-size:12px}
.cf-statusbar>span{font-size:12px}
.cf-cabinet.is-expanded .cf-ticket p,.cf-cabinet.is-expanded .cf-ticket small,
.cf-cabinet.is-expanded .cf-room-ticket li,.cf-cabinet.is-expanded .cf-room-ticket .cf-room-note{font-size:12px}
.cf-cabinet.is-expanded .cf-ticket .cf-primary,.cf-cabinet.is-expanded .cf-ticket .cf-secondary,
.cf-cabinet.is-expanded .cf-room-ticket input,.cf-cabinet.is-expanded .cf-room-ticket select{min-height:44px}
#cf-help-dialog{overflow:auto;overscroll-behavior:contain}
#cf-help-dialog p,#cf-help-dialog li{font-size:16px;line-height:1.6}
:root[lang^=zh] #cf-help-dialog p,:root[lang^=zh] #cf-help-dialog li{font-size:18px}
#cf-help-dialog h3{font-size:21px;margin:24px 0 9px}
#cf-help-dialog .cf-eyebrow{color:var(--ink)}
#cf-help-dialog .cf-dialog-dismiss button{width:44px;height:44px}
#cf-help-dialog .cf-help-demo>p{margin:9px 0;font-weight:700}
.cf-help-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:14px;line-height:1.45}
.cf-help-table caption{text-align:left;font-size:14px;font-weight:700;margin-bottom:6px}
.cf-help-table th,.cf-help-table td{border:1px solid var(--line);padding:8px;overflow-wrap:anywhere;text-align:left}
.cf-help-table thead{background:var(--soft)}
.cf-hazard{margin:20px 0;padding:12px;border:1px solid var(--line)}
.cf-hazard-picture{display:grid;place-items:center;min-height:72px;background:#253d34;color:#ffe4ab;font-size:28px;letter-spacing:5px;overflow-wrap:anywhere}
.cf-hazard figcaption{font-size:16px;line-height:1.5;margin-top:9px}
:root[lang^=zh] .cf-hazard figcaption{font-size:18px}
.cf-help-advanced{border-block:1px solid var(--line);padding:14px 0;margin:22px 0}
.cf-help-advanced summary{cursor:pointer;font-size:17px;font-weight:700;min-height:44px;padding:10px 0}
#cf-help-resume[hidden]{display:none}
@media(max-width:450px){
 .cf-toolbar{flex-wrap:wrap}
 .cf-tools{flex-wrap:wrap;justify-content:flex-end}
 .cf-tools button{min-width:44px;min-height:44px;padding:7px}
 .cf-ticket{max-width:min(100%,360px)}
 .cf-hazard-picture{font-size:21px;letter-spacing:2px}
 .cf-help-table{font-size:12px}
 .cf-help-table th,.cf-help-table td{padding:6px 4px}
}
@media(orientation:landscape) and (max-height:560px){
 .cf-cabinet.is-expanded{grid-template-rows:auto auto minmax(0,1fr)}
 .cf-cabinet.is-expanded .cf-toolbar{min-height:48px}
 .cf-cabinet.is-expanded .cf-actions span{font-size:12px}
}
@media(max-height:560px){
 .cf-cabinet.is-expanded .cf-statusbar{display:flex}
 .cf-cabinet.is-expanded .cf-room-ticket .cf-room-note{display:block}
}

/* Help content may scroll on short screens; its text stays readable. */
.cf-side-ticket{min-width:0;overflow-wrap:anywhere}
.cf-side-ticket>*{max-width:100%;min-width:0}
.cf-side-ticket h2,.cf-side-ticket h3{font-size:clamp(22px,3vw,34px)}
.cf-actions button:last-child{background:#a33f2a;color:#fff0cf}
.cf-actions button:last-child:active,.cf-actions button:last-child.is-held{background:#762617;color:#fff0cf}
.cf-eyebrow,.cf-beta>span{font-size:14px}
.cf-actions span,.cf-cabinet.is-expanded .cf-actions span{font-size:14px}
#cf-help-dialog .cf-eyebrow,.cf-piece-gallery figcaption{font-size:16px;line-height:1.5}
:root[lang^=zh] #cf-help-dialog .cf-eyebrow,:root[lang^=zh] .cf-piece-gallery figcaption{font-size:18px}
.cf-help-table,.cf-help-table caption{font-size:16px}
:root[lang^=zh] .cf-help-table,:root[lang^=zh] .cf-help-table caption{font-size:18px}
@media(max-width:450px){.cf-help-table{font-size:16px}.cf-help-table th,.cf-help-table td{padding:8px 5px}}
/* Keep all six controls inside the cabinet on short and narrow screens. */
@media(max-width:450px){
 .cf-cabinet,.cf-stage,.cf-actions{min-width:0}
 .cf-actions,.cf-cabinet.is-expanded .cf-actions{grid-template-columns:repeat(3,minmax(0,1fr));padding:6px;gap:4px}
 .cf-actions button,.cf-cabinet.is-expanded .cf-actions button{min-width:0;min-height:44px;overflow-wrap:anywhere}
 .cf-heading h1{font-size:clamp(24px,12vw,48px);letter-spacing:-1px;overflow-wrap:anywhere}
 .cf-guide h2{font-size:clamp(22px,9vw,36px);overflow-wrap:anywhere}
 #cf-help-dialog{max-width:calc(100vw - 16px);padding:12px;overflow-x:hidden;overflow-wrap:anywhere}
 #cf-help-dialog h2{font-size:clamp(20px,8vw,32px);overflow-wrap:anywhere}
 #cf-help-dialog p,#cf-help-dialog li{font-size:16px;line-height:1.5}
 :root[lang^=zh] #cf-help-dialog p,:root[lang^=zh] #cf-help-dialog li{font-size:18px}
 .cf-dialog-dismiss button{width:44px;height:44px}
 .cf-table-wrap,.cf-help-table{max-width:100%;min-width:0;overflow:visible}
 .cf-help-table,.cf-help-table thead,.cf-help-table tbody,.cf-help-table tr,.cf-help-table th,.cf-help-table td{display:block;width:100%;max-width:100%;box-sizing:border-box;overflow-wrap:anywhere}
 .cf-help-table tr{border-bottom:1px solid var(--line);padding:6px 0}
 .cf-help-table th,.cf-help-table td{text-align:left;padding:2px 0}
 .cf-help-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
}
@media(max-width:220px){.cf-actions,.cf-cabinet.is-expanded .cf-actions{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:220px){
 .cf-heading{display:block}
 .cf-heading p,.cf-ticket h2,.cf-side-ticket h2,.cf-side-ticket h3,.cf-rule span{overflow-wrap:anywhere}
 .cf-ticket h2,.cf-side-ticket h2,.cf-side-ticket h3{font-size:clamp(20px,14vw,29px)}
 .cf-rule{min-width:0}.cf-rule span{min-width:0}
}
@media(orientation:landscape) and (max-height:560px) and (max-width:450px){.cf-cabinet.is-expanded .cf-actions{grid-template-columns:repeat(2,minmax(0,1fr))}}
#cf-help-dialog p,#cf-help-dialog li{font-size:16px;line-height:1.5}
:root[lang^=zh] #cf-help-dialog p,:root[lang^=zh] #cf-help-dialog li{font-size:18px}
.cf-dialog-dismiss button{width:44px;height:44px}

/* A narrow Help dialog uses labelled rows, so table captions and column names
   remain visible even at enlarged text sizes. */
@media(max-width:450px){
 .cf-help-table,.cf-help-table caption,.cf-help-table tbody,.cf-help-table tr,
 .cf-help-table th,.cf-help-table td{display:block;width:100%;max-width:100%;box-sizing:border-box}
 .cf-help-table{table-layout:auto}
 .cf-help-table caption{min-width:0;position:static;overflow:visible;clip-path:none;white-space:normal;text-align:left}
 .cf-help-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .cf-help-table tr{padding:8px 0;border-bottom:1px solid var(--line)}
 .cf-help-table th,.cf-help-table td{display:grid;grid-template-columns:minmax(82px,38%) minmax(0,1fr);gap:8px;border:0;padding:3px 0;overflow-wrap:normal;word-break:normal}
 .cf-help-table th::before,.cf-help-table td::before{font-weight:700;overflow-wrap:normal}
 .cf-control-table th::before{content:'Action'}
 .cf-control-table td:nth-child(2)::before{content:'Keyboard'}
 .cf-control-table td:nth-child(3)::before{content:'On screen'}
 .cf-score-table th::before{content:'Rows cleared'}
 .cf-score-table td:nth-child(2)::before{content:'Base points'}
 .cf-score-table td:nth-child(3)::before{content:'Attack rows'}
 :root[lang^=zh] .cf-control-table th::before{content:'操作'}
 :root[lang^=zh] .cf-control-table td:nth-child(2)::before{content:'鍵盤'}
 :root[lang^=zh] .cf-control-table td:nth-child(3)::before{content:'螢幕按鈕'}
 :root[lang^=zh] .cf-score-table th::before{content:'消除列數'}
 :root[lang^=zh] .cf-score-table td:nth-child(2)::before{content:'基本分數'}
 :root[lang^=zh] .cf-score-table td:nth-child(3)::before{content:'攻擊列數'}
}
@media(max-width:340px){
 .cf-help-table th,.cf-help-table td{grid-template-columns:minmax(0,1fr);overflow-wrap:anywhere}
 :root:has(.cf-page),.cf-page{overflow-x:clip}
}

/* The English labels need more than two 45px landscape columns. */
@media(orientation:landscape) and (max-height:560px) and (min-width:451px) and (max-width:760px){
 .cf-actions{grid-template-columns:repeat(3,minmax(0,1fr))}
 .cf-cabinet.is-expanded{grid-template-columns:minmax(0,1fr) 156px}
 .cf-cabinet.is-expanded .cf-actions{grid-template-columns:minmax(0,1fr);grid-template-rows:repeat(6,minmax(44px,1fr))}
 .cf-cabinet.is-expanded .cf-room-bar{max-width:calc(100% - 168px)}
}

/* Small-screen page labels must remain readable in both languages. */
.cf-hud span,.cf-device-best span,.cf-guide-grid b,.cf-receipt span,
.cf-room-ticket li>span:last-child,.cf-statusbar>span{font-size:14px;line-height:1.35}
.cf-stamp small,.cf-rivals span{font-size:12px;line-height:1.35}
@media(max-width:450px){
 .cf-hud{grid-template-columns:repeat(2,minmax(0,1fr))}
 .cf-hud span,.cf-device-best span,.cf-guide-grid b,.cf-receipt span,
 .cf-room-ticket li>span:last-child,.cf-statusbar>span{font-size:14px}
 .cf-stamp small{font-size:12px}
}
