/* Game-first interface: short labels, clear action hierarchy, tactile controls. */
.site-header{max-width:620px;height:68px;padding-inline:22px}
.site-header .brand{font-size:23px}
.icon-button{width:44px;height:44px}
main{max-width:620px;padding:0 22px}
.mode-switch{margin:2px auto 16px;gap:4px;border-radius:14px;background:#fff0fa;padding:4px;box-shadow:3px 4px 0 var(--ink)}
.mode-switch button{min-height:40px;padding:7px 22px;border-radius:9px;color:#61476b;font-size:13px;font-weight:800;transition:background .15s,transform .15s}
.mode-switch button.active{background:var(--purple);color:#fff}
.mode-switch button:not(.active):hover{background:#e7d3ff;color:var(--ink)}
.rush-game{padding:27px 18px 8px;border-radius:18px;box-shadow:6px 7px 0 var(--ink)}
.awning{border-radius:15px 15px 0 0}
.rush-heading{margin-bottom:12px;gap:12px}
.rush-heading h1{font-size:12px;color:#5a3e69;line-height:1.4}
#best-label{font-size:12px;font-weight:700;color:#5a3e69}
.rush-score{align-items:baseline;gap:5px}
.rush-score strong{font-size:46px;letter-spacing:-2px}
.rush-score>span{font-size:12px;font-weight:700;color:#5a3e69}
.turn-counter{line-height:1.5;padding-left:12px}
.turn-counter strong{font-size:20px}
#empty-count{font-size:12px;color:#5a3e69;font-weight:700}
.delivery-panel{border-radius:12px;background:#f0e7ff;border-color:#c5a9df;padding:9px 11px;min-height:66px}
.delivery-main>strong{font-size:11px;font-weight:800;color:var(--purple)}
.later-group>span{font-size:10px;font-weight:700;color:#5a3e69}
.rush-rule{align-items:center;margin-top:10px;font-size:11px;color:#5a3e69}
.rush-rule b{color:var(--purple);font-weight:850}
.rush-rule #pace{font-size:10px;padding:3px 7px;border-radius:6px;background:#eee3fa;color:#5a3e69;white-space:nowrap}
.rush-rule #pace.fast{background:#ffe1e9;color:#a41440;font-weight:800}
.rush-game .board-scroll{padding-top:10px}
.rush-lane{border-radius:13px}
.lane-number{font-weight:700}
.rush-bottom{border:0;padding-top:9px;gap:10px}
.rush-bottom .tray-row{gap:9px}
.rush-bottom .tray-row>strong{font-size:12px;color:#5a3e69}
.rush-tools{align-items:center;gap:9px}
.rush-tools button{height:50px;border:2px solid var(--ink);border-radius:12px;box-shadow:3px 4px 0 var(--ink);transition:transform .14s,box-shadow .14s,background .14s;font-size:14px;font-weight:800}
#receive{display:inline-flex;align-items:center;gap:13px;background:var(--purple);color:#fff;padding:9px 17px}
#receive>span:last-child{font-size:22px;line-height:1}
#restart{width:48px;min-width:48px;font-size:25px;background:#eee1ff;padding:5px}
.rush-tools button:hover:not(:disabled){transform:translateY(-2px);box-shadow:3px 6px 0 var(--ink)}
.rush-tools button:active:not(:disabled){transform:translate(2px,3px);box-shadow:1px 1px 0 var(--ink)}
.rush-tools button:disabled{background:#e5dfea!important;color:#7b6b84!important;border-color:#b8aabd;box-shadow:2px 2px 0 #b8aabd}
.rush-game .status{min-height:19px;font-size:11px;line-height:1.6;font-weight:700;color:#513264;margin:11px 0 0}
.play-actions{display:flex;gap:10px;max-width:550px;margin:18px auto 0}
.play-actions button{flex:1;display:flex;align-items:center;justify-content:center;gap:8px;min-height:46px;border:2px solid var(--ink);border-radius:12px;padding:8px 12px;background:#fff0fa;color:var(--ink);font-size:13px;font-weight:800;box-shadow:3px 4px 0 var(--ink);transition:transform .14s,box-shadow .14s}
.play-actions #rooms-open{background:var(--lime);color:var(--ink)}
.play-actions button:hover{transform:translateY(-2px);box-shadow:3px 6px 0 var(--ink)}
.play-actions button:active{transform:translate(2px,3px);box-shadow:1px 1px 0 var(--ink)}
footer{margin:22px auto 28px;gap:20px;color:#513264;font-size:11px}
footer a{display:inline-flex;align-items:center;min-height:44px}
.challenge-banner{background:#fff0fa;border:2px solid var(--purple);border-radius:11px;line-height:1.6;padding:8px 12px;font-size:12px}
dialog{border-radius:18px;border:2px solid var(--ink);padding:27px;box-shadow:6px 7px 0 var(--ink);max-height:calc(100dvh - 32px);overflow-y:auto}
dialog::backdrop{background:#25133988;backdrop-filter:blur(4px)}
dialog h2{font-size:23px;letter-spacing:-.7px}
dialog .primary{display:flex;justify-content:center;align-items:center;gap:14px;min-height:49px;border:2px solid var(--ink);border-radius:12px;background:var(--purple);color:white;font-size:15px;font-weight:800;box-shadow:3px 4px 0 var(--ink);transition:transform .14s,box-shadow .14s}
dialog .primary:hover{background:#4f35fa;transform:translateY(-1px)}
dialog .primary:active{transform:translate(2px,3px);box-shadow:1px 1px 0 var(--ink)}
dialog .secondary{border-radius:11px;min-height:44px;font-weight:750;background:#eee1ff;box-shadow:2px 3px 0 var(--ink)}
.dialog-close[aria-label],.audio-close,.room-close{width:44px;height:44px;right:5px;top:5px;line-height:1}
.quick-rules{padding-left:22px;font-size:14px;line-height:1.8;margin:20px 0}
.quick-rules li{padding-left:4px;margin:10px 0}
.quick-rules strong{color:var(--purple);font-weight:800}
.rule-details{border-top:1px solid #d9c8e4;margin:10px 0 18px;padding-top:12px;color:#5a3e69}
.rule-details summary{cursor:pointer;min-height:36px;font-size:12px;font-weight:750}
.rule-details p{font-size:12px;line-height:1.8}
.keyboard-note{font-size:11px;color:#65516d}
#help-dialog>.primary{width:100%}
.end-dialog{max-width:370px}
.end-dialog [hidden]{display:none!important}
.end-dialog .end-alternatives:not(:has(button:not([hidden]))){display:none}
.end-dialog .room-result{margin:7px 0 0;padding:7px 0 0}
.end-dialog .room-result p{overflow-wrap:anywhere}
.end-loss{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:7px;background:#ffe5ed;border:1px solid #eeb7cb;border-radius:12px;padding:9px;margin:12px 0;color:#84234c;font-size:12px}
.end-loss .incoming-fruit{width:30px;height:30px}.end-loss .parcel{display:flex;align-items:center;gap:4px}.end-loss .parcel-lane{font-size:13px}.end-loss #end-detail{flex-basis:100%;margin:0}
.end-dialog #end-goal{margin:12px 0 8px}.end-dialog .retry-reason{font-size:11px;margin:0 0 8px}.end-dialog #end-record{margin:3px 0 8px}
.end-dialog .end-alternatives{display:flex;align-items:center;gap:8px}.end-dialog .end-alternatives #end-daily{flex:1;min-height:40px;font-size:12px;margin:0}.end-dialog .end-alternatives #new-game{width:auto;margin:0;padding:8px;font-size:12px}
.end-more{font-size:12px;color:#513264;margin-top:12px}.end-more summary{cursor:pointer;padding:8px}.end-more button{min-height:38px}.delivery-ended .delivery-main{flex:1}.delivery-ended #delivery-label{color:#9c2853}.delivery-ended #later-delivery{display:none}
.end-stamp{color:#a31d50;font-size:11px;letter-spacing:2.5px}
.end-dialog h2{margin:14px 0 4px;font-size:22px}
.end-dialog #end-score{font-size:64px;letter-spacing:-3px}
.end-dialog #end-detail{font-size:12px;color:#5a3e69;margin:5px 0}
.end-dialog #end-record{font-size:11px;color:#5a3e69;margin:4px 0 18px}
.end-dialog #new-game{border:0;box-shadow:none;background:transparent;min-height:40px;color:#5a3e69;margin:6px 0 12px;font-size:12px}
.end-dialog #end-goal{padding:7px 10px;font-size:12px;border-radius:9px;background:#edffd0;color:#375200}
.end-dialog .share-actions{border-top:1px solid #decee7;padding-top:16px;gap:9px}
.text-button{min-height:40px}
.room-dialog #room-description{font-size:12px;color:#5a3e69}
.room-dialog .room-note{font-size:11px}
.room-share-actions button,.room-bar button{border-radius:10px;min-height:44px}
@media(max-width:760px){
 .site-header{height:62px;padding:0 15px}.site-header .brand{font-size:21px;gap:9px}.brand-icon{width:35px;height:35px;font-size:24px}
 main{padding:0 12px}.header-right{gap:7px}.icon-button{width:40px;height:40px;font-size:22px}
 .mode-switch{margin:0 auto 13px}.mode-switch button{min-height:36px;padding:6px 20px;font-size:12px}
 .rush-game{padding:25px 11px 7px;border-radius:16px;box-shadow:4px 5px 0 var(--ink)}
 .rush-heading{margin-bottom:10px;gap:8px}.rush-score strong{font-size:38px}.rush-heading h1{font-size:11px}#best-label{font-size:10px}.turn-counter strong{font-size:17px}#empty-count{font-size:10px}
 .delivery-panel{padding:7px 8px;min-height:61px}.delivery-main>strong{font-size:10px}.later-group>span{font-size:9px}
 .rush-rule{font-size:10px;margin-top:8px}.rush-rule #pace{font-size:9px;padding:2px 5px}
 .rush-tools button{height:46px;font-size:13px}#receive{gap:10px;padding:8px 12px}#restart{width:44px;min-width:44px;font-size:24px}
 .rush-bottom{gap:7px;padding-top:7px}.rush-bottom .tray-row{gap:7px}.rush-tools{gap:7px}.rush-bottom .tray-row>strong{font-size:11px}
 .rush-game .status{font-size:10px;margin-top:9px}.play-actions{margin-top:15px;gap:9px}.play-actions button{font-size:12px;min-height:44px}
 footer{margin:17px auto 20px;gap:18px}.end-dialog{padding:24px}.end-dialog #end-score{font-size:58px}
}
@media(max-width:360px){#receive{padding-inline:9px;gap:7px}.rush-tools{gap:6px}.rush-bottom .tray-row{gap:5px}.rush-trays .lane{width:60px}.rush-rule{gap:3px;font-size:9px}}
@media(prefers-reduced-motion:reduce){.mode-switch button,.rush-tools button,.play-actions button,dialog .primary{transition:none}}
.result-image-dialog{width:min(430px,calc(100% - 24px));max-width:none;padding:23px 20px;overscroll-behavior:contain}
.result-image-dialog h2{margin:0 30px 10px 0;font-size:20px}
.image-close{position:absolute;right:3px;top:3px;width:44px;height:44px;background:none;border:0;font-size:27px}
#image-status{font-size:12px;line-height:1.7;min-height:21px;margin:8px 0;color:#513264;overflow-wrap:anywhere}
#result-preview{display:block;width:100%;height:auto;max-height:48dvh;object-fit:contain;border-radius:10px;background:#ff8bd0;touch-action:auto;user-select:auto;-webkit-user-select:auto;-webkit-touch-callout:default}
.image-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:15px}
.image-actions>*{flex:1 1 145px;text-align:center;min-height:48px;padding:10px 12px;margin:0;line-height:1.5;white-space:normal}
#image-hint{font-size:11px;line-height:1.8;color:#5a3e69;margin:14px 0 0}
/* Forecast is strategy; warning appears only for an actual incoming overflow. */
#receive{background:#eee1ff;color:#3922e7;font-size:13px;gap:8px;box-shadow:2px 3px 0 var(--ink)}
#receive.risky{background:#ffe0e9;color:#9c163b;border-color:#a01b47}
.arrival-warning{margin:7px 0 0;padding:5px 8px;border-radius:7px;background:#ffe0e9;color:#9c163b;font-size:11px;font-weight:800}
.rush-lane.overflow-next{outline:2px solid #b91747;outline-offset:1px;border-color:#b91747;background:#ffd5e1}
.overflow-label{position:absolute;top:31px;left:2px;right:2px;z-index:4;text-align:center;border-radius:4px;padding:2px 0;font-size:10px;font-weight:850;line-height:1.4;background:#a01b47;color:white}
.parcel-arriving{outline:2px solid #3922e7;outline-offset:3px;border-radius:5px;background:#dfff91}
.rush-lane.receiving{border-color:#3922e7;box-shadow:inset 0 0 0 2px #3922e755}
.later-group .incoming-fruit,.later-group .incoming-fruit svg{width:26px;height:26px}
.later-group .parcel-lane{min-width:19px;height:19px;font-size:11px}
.later-group>span{font-size:11px}
.crowded #later-delivery{flex-wrap:wrap;gap:7px 12px}
.crowded .later-group{flex:1 1 125px;min-width:0}
.crowded .later-parcels{flex-wrap:wrap;gap:3px}
.end-dialog .share-actions .secondary{box-shadow:none;border-color:#bca6c9;color:#513264;font-size:12px}
@media(max-width:760px){#receive{font-size:12px;gap:7px;padding-inline:10px}.later-group .incoming-fruit,.later-group .incoming-fruit svg{width:24px;height:24px}.later-group .parcel-lane{min-width:17px;height:17px;font-size:10px}.later-group>span{font-size:10px}.arrival-warning{font-size:10px}.overflow-label{font-size:9px}}
@media(max-width:360px){#receive{font-size:11px;padding-inline:8px;gap:5px}#receive>span:last-child{font-size:19px}.crowded .later-group{flex-basis:115px}}
/* Slim timeline: one fixed-height row, including the maximum three arrivals. */
.delivery-panel.forecast-strip{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,2fr);gap:0;padding:6px 7px;min-height:78px;height:78px;border-radius:10px}
.forecast-strip .delivery-main{width:auto;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px}
.forecast-strip .delivery-main>strong{font-size:11px;line-height:15px;color:#3922e7;font-weight:850}
.forecast-strip #next-delivery{display:flex;align-items:center;justify-content:center;gap:3px;min-width:0;max-width:100%;height:44px}
.forecast-strip #later-delivery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;width:auto;min-width:0;height:100%;align-items:center}
.forecast-strip .later-group{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;max-width:100%;height:100%;padding:0 4px;border-left:1px solid #ccb9de}
.forecast-strip .later-group>span{font-size:11px;line-height:15px;font-weight:700;color:#5a3e69;white-space:nowrap}
.forecast-strip .later-parcels{display:flex;align-items:center;justify-content:center;flex-wrap:nowrap;gap:2px;height:44px;min-width:0;max-width:100%}
.forecast-strip .parcel{display:flex;position:relative;align-items:center;justify-content:center;flex:none;gap:3px;min-width:0;line-height:1}
.forecast-strip .incoming-fruit{width:42px;height:42px;padding:0;border:1px solid #bba0ce;background:#fff8fd;border-radius:9px;flex:none}
.forecast-strip .incoming-fruit svg{width:40px;height:40px}
.forecast-strip .parcel-lane{min-width:24px;height:24px;padding:0 3px;font-size:15px;border:1.5px solid #251b2c;border-radius:50%;background:#b9ff00;flex:none;line-height:1}
.forecast-strip .later-group .incoming-fruit{width:28px;height:28px;border:0;background:none}
.forecast-strip .later-group .incoming-fruit svg{width:28px;height:28px}
.forecast-strip .later-group .parcel-lane{min-width:18px;height:18px;padding:0 2px;font-size:11px;border:1px solid #b99dca;background:#fff8fd}
.forecast-strip [data-count="2"] .parcel,.forecast-strip [data-count="3"] .parcel{display:block;width:36px;height:44px}
.forecast-strip [data-count="2"] .incoming-fruit{width:34px;height:34px}
.forecast-strip [data-count="2"] .incoming-fruit svg{width:32px;height:32px}
.forecast-strip [data-count="2"] .parcel-lane,.forecast-strip [data-count="3"] .parcel-lane{position:absolute;right:0;bottom:0;min-width:18px;height:18px;padding:0 2px;font-size:11px;z-index:1}
.forecast-strip [data-count="3"] .parcel{width:28px;height:40px}
.forecast-strip [data-count="3"] .incoming-fruit{width:26px;height:28px}
.forecast-strip [data-count="3"] .incoming-fruit svg{width:25px;height:26px}
.forecast-strip .later-group [data-count="2"] .parcel{width:29px;height:38px}
.forecast-strip .later-group [data-count="2"] .incoming-fruit,.forecast-strip .later-group [data-count="2"] .incoming-fruit svg{width:27px;height:27px}
.forecast-strip .later-group [data-count="2"] .parcel-lane{min-width:16px;height:16px;font-size:10px}
.forecast-strip .later-group [data-count="3"]{gap:1px}
.forecast-strip .later-group [data-count="3"] .parcel{width:21px;height:34px}
.forecast-strip .later-group [data-count="3"] .incoming-fruit,.forecast-strip .later-group [data-count="3"] .incoming-fruit svg{width:20px;height:22px}
.forecast-strip .later-group [data-count="3"] .parcel-lane{min-width:15px;height:15px;font-size:10px}
.forecast-strip .parcel-arriving{outline-offset:1px}
@media(max-width:360px){.delivery-panel.forecast-strip{padding-inline:5px}.forecast-strip .later-group{padding-inline:2px}}
/* Six slots plus their five gaps and fixed label/border allowance. A full or
   selected column must never enlarge the grid's intrinsic row height. */
.rush-board .rush-lane{height:calc(6 * var(--tile) + 66px);min-height:calc(6 * var(--tile) + 66px);max-height:calc(6 * var(--tile) + 66px)}
.opening-guide{position:fixed;inset:0;z-index:50;pointer-events:none;overflow:hidden}
.guide-path{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.guide-path path{fill:none;stroke:#5622d9;stroke-width:3;stroke-dasharray:5 7;opacity:.65;stroke-linecap:round}
.guide-ghost{position:absolute;opacity:.68;will-change:transform;filter:drop-shadow(0 4px 3px #49208c44)}
.guide-ghost .token{width:100%;height:100%;margin:0!important}
.guide-label{position:absolute;transform:translateX(-50%);padding:7px 11px;border:2px solid #4d20c9;border-radius:99px;background:#fffaf5e8;color:#4620b3;font-size:12px;font-weight:850;white-space:nowrap;box-shadow:0 3px 0 #4d20c925}
.token.guide-origin{outline:3px solid #fff7ff;outline-offset:3px;box-shadow:0 0 0 6px #742edf75}
.token.guide-destination{outline:3px dashed #5622d9;outline-offset:4px}
@media(prefers-reduced-motion:reduce){.guide-ghost{will-change:auto}}
#language{max-width:105px;min-height:38px;border:1.5px solid #392254;border-radius:9px;background:#fff8fd;color:#251b2c;font:700 12px system-ui,sans-serif;padding:5px}
.retry-reason{color:#5225ce;font-weight:750;font-size:13px;margin:6px 0 12px}#end-daily{width:100%;min-height:44px}#daily-note{display:block;font-size:11px;color:#654673;margin:5px 0 14px}#daily-note[hidden]{display:none}

/* Keep the primary actions in the first view on short phones, in every locale. */
@media(max-width:760px) and (max-height:740px){
 .end-dialog{padding:14px 16px;max-height:calc(100dvh - 24px);overflow-x:hidden;overscroll-behavior:contain}
 .end-dialog .end-stamp{font-size:10px;line-height:1.2;letter-spacing:2px}
 .end-dialog h2{font-size:19px;line-height:1.3;margin:5px 0 2px}
 .end-dialog #end-score{font-size:44px;line-height:1.1;letter-spacing:-2px;overflow-wrap:anywhere}
 .end-dialog #end-record{font-size:11px;line-height:1.35;margin:3px 0 7px}
 .end-dialog .end-loss{gap:3px 6px;padding:6px;margin:7px 0;font-size:11px}
 .end-dialog .end-loss .incoming-fruit{width:26px;height:26px}
 .end-dialog .end-loss .incoming-fruit svg{width:24px;height:24px}
 .end-dialog #end-detail{font-size:11px;line-height:1.35;margin:0}
 .end-dialog #end-goal{font-size:12px;line-height:1.4;padding:6px 8px;margin:7px 0 6px;overflow-wrap:anywhere;text-wrap:balance}
 .end-dialog .retry-reason{font-size:11px;line-height:1.35;margin:0 0 5px;overflow-wrap:anywhere}
 .end-dialog #retry{min-height:46px;margin:7px 0 9px;padding:9px 10px;font-size:14px;line-height:1.35}
 .end-dialog .end-alternatives{gap:6px}
 .end-dialog .end-alternatives #end-daily{min-width:0;min-height:44px;padding:6px 8px;font-size:12px;line-height:1.3}
 .end-dialog .end-alternatives #new-game{min-height:44px;max-width:36%;padding:5px 6px;font-size:12px;line-height:1.3}
 .end-dialog #daily-note{font-size:10px;line-height:1.3;margin:4px 0 7px}
 .end-dialog .share-actions{margin:7px 0 4px;padding-top:9px;gap:7px}
 .end-dialog .share-actions .secondary,.end-dialog .share-actions .kakao-share{flex:1 1 0;min-width:0;min-height:44px;padding:7px 5px;font-size:12px;line-height:1.25;overflow-wrap:anywhere}
 .end-dialog .end-more{margin-top:4px;line-height:1.3}
 .end-dialog .end-more summary{min-height:36px;padding:9px 4px}
 .end-dialog #share-status{font-size:11px;line-height:1.4;margin:4px 0 0}
 .end-dialog #share-status:empty{display:none}
 .end-dialog .room-result{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;margin-top:5px;padding-top:5px}
 .end-dialog .room-result p{grid-column:1/-1;font-size:11px;line-height:1.35;margin:2px 0 5px;text-wrap:balance}
 .end-dialog .room-result button{width:100%;min-height:44px;font-size:12px;line-height:1.25;padding:6px 8px;margin:0;max-width:100%;overflow-wrap:anywhere}
 .end-dialog .room-result:has(#room-submit-retry[hidden]) #room-result-rank{grid-column:1/-1}
}
html[lang=en] #receive span:first-child{font-size:11px}html[lang=en] .rush-rule{font-size:10px}html[lang=en] .forecast-strip .later-group>span{font-size:9px}

/* Exposed fruit can move; buried fruit keeps its original colour. */
.rush-board .token.movable-run{outline:2px dashed #fff6fb;outline-offset:-4px;touch-action:none;cursor:grab}
.rush-board .token.movable-run.is-picked{outline:3px solid #fff;outline-offset:-3px}
.rush-board .token.guide-origin{outline:3px solid #fff7ff;outline-offset:3px}
.rush-board .token.guide-destination{outline:3px dashed #5622d9;outline-offset:4px}

/* Mobile keeps native touch/keyboard scrolling without a permanent visual rail. */
@media(max-width:760px) and (forced-colors:none){
 html,body,dialog,.room-table-wrap{scrollbar-width:none}
 html::-webkit-scrollbar,body::-webkit-scrollbar,dialog::-webkit-scrollbar,.room-table-wrap::-webkit-scrollbar{display:none;width:0;height:0}
}
