/* 2026-10-25: readable, balanced mobile layouts. Shared by all three games. */
:root{--fs-xs:11px;--fs-s:13px;--fs-m:14px;--fs-l:18px;--fs-xl:24px;--lh:1.6}
body{letter-spacing:.015em;word-break:keep-all;overflow-wrap:normal;line-break:strict}
button,input{letter-spacing:inherit}button{touch-action:manipulation}
#view{scrollbar-width:thin;scroll-padding:16px;padding-bottom:20px}
#view :is(h2,h3,p,small,b,strong,span,button,li){min-width:0}
h2,h3,.pname,.mhead b,.journey-goal,.bigbtn b{text-wrap:balance;line-height:1.5}
p,li,.pdesc,.btext p,.sctext,.quote{text-wrap:pretty;line-height:1.75}
wbr{word-break:normal}
.btn{min-height:44px;padding:11px 16px;line-height:1.5;border-radius:13px}
.btn.small{min-height:40px;padding:8px 12px;line-height:1.45}
.btn:focus-visible,.tab:focus-visible{outline:3px solid #ffcf51;outline-offset:2px}
#top{gap:8px;padding: max(8px,env(safe-area-inset-top)) 12px 10px;border-bottom:1px solid #ffffff20}
.toprow{min-height:34px;gap:10px}#top .who{font-size:13px;line-height:1.5;text-wrap:balance}
#top .login{min-height:34px;padding:5px 14px;font-size:12px;max-width:38%}
.resrow{gap:7px}#top .res{min-height:50px;padding:6px;gap:5px;border:1px solid #ffffff0c;border-radius:13px}
#top .res .ico{width:18px;height:18px}#top .res .rv{gap:2px}
#top .res .rv b{font-size:13px;letter-spacing:0;line-height:1.25;font-variant-numeric:tabular-nums}
#top .res .rv small{font-size:10px;line-height:1.35}#top .res em.plus{width:18px;height:18px;font-size:13px}
#nav{padding:6px 5px max(7px,env(safe-area-inset-bottom));gap:3px;border-top:1px solid #ffffff26;box-shadow:0 -5px 20px #0000000a}
#nav .tab{flex:1 1 0;min-width:0;min-height:62px;padding:6px 1px;gap:4px;border-radius:12px;line-height:1.1}
#nav .tab>span{font-size:clamp(10px,2.65vw,12px);white-space:nowrap;letter-spacing:0;line-height:1.4}
#nav .tab i{font-size:22px;line-height:1.1}#nav .tab.on{background:#ffffff1d;box-shadow:inset 0 0 0 1px #ffffff24}
#nav .dot{top:0;right:4px;font-size:10px;min-width:16px;height:16px;animation:none}
.journey-panel{margin:12px!important;padding:12px!important;border:1px solid #e4c986!important;border-left:4px solid var(--pri2)!important;background:var(--panel)!important;border-radius:14px!important;box-shadow:0 3px 12px #00000008!important}
.journey-label{font-size:10px!important;letter-spacing:.1em}.journey-goal{font-size:14px!important;line-height:1.55!important}
.journey-actions{display:grid!important;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:8px!important;margin-top:10px!important}
.journey-actions .btn{font-size:12px!important;min-height:44px!important;padding:8px 7px!important;line-height:1.5!important}
.shead{margin:20px 14px 10px;font-size:15px;line-height:1.5;letter-spacing:.025em}
.cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:10px 12px}
.card{border-radius:13px;border-width:2px}.card .cname{font-size:12px;line-height:1.5;padding:17px 4px 5px;letter-spacing:0}
.card .cstar{bottom:25px}.card .crar{font-size:12px}.card .clv{top:24px;font-size:10px}
.slots{gap:6px;padding:12px}.slots .card .cname{font-size:10px;padding:14px 1px 3px}.slots .card .cstar{bottom:18px;font-size:8px}
.slots6{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 10px;padding:16px 12px 12px}
.slots6 .slot .rl{top:-9px;font-size:11px;padding:1px 10px;white-space:nowrap}
.teamhead,.workhead{padding:14px 12px 4px;gap:12px;flex-wrap:wrap;line-height:1.5}
.teamhead .btn,.workhead .btn{margin-left:auto}.setinfo{padding:8px 12px;line-height:1.8;text-wrap:balance}
.btabs{padding:4px 12px 12px;gap:8px;scrollbar-width:thin;scroll-snap-type:x proximity}
.btab{min-height:44px;padding:10px 14px;line-height:1.5;font-size:13px;white-space:nowrap;border:1px solid #0000000a;scroll-snap-align:start}
.banner{display:flex;flex-direction:column;margin:0 12px;border-radius:20px;min-height:0;box-shadow:0 5px 18px #00000012}
.banner .btext{position:relative;inset:auto;order:0;width:100%;padding:18px 18px 14px;min-height:0;background:linear-gradient(180deg,#00000045,#00000015);border-radius:0}
.btext h2{font-size:20px;line-height:1.45;margin:4px 0 8px;max-width:none}.btext p{font-size:13px;line-height:1.8;margin:7px 0;max-width:none}
.banner .bpick{position:relative;inset:auto;order:1;width:100%;height:190px;overflow:hidden}
.banner .bpick img{width:33.33%;height:100%;bottom:0;max-width:none;object-fit:contain;object-position:50% 100%}.banner .bpick .bp0{left:33.33%;right:auto;height:100%}.banner .bpick .bp1{left:0;right:auto;height:92%}.banner .bpick .bp2{left:66.66%;right:auto;height:92%}.rates{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}.rates .rt{font-size:11px;padding:3px 8px;white-space:nowrap}
.gbtns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:14px 12px 10px}
.gbtn{min-width:0;min-height:94px;width:100%;padding:12px 7px;border-radius:16px;line-height:1.5;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px}
.gbtn b{font-size:18px}.gbtn small{font-size:13px;line-height:1.45}.gbtn em{font-size:11px;margin:0;white-space:normal;line-height:1.5}.gbtn.ticket,.gbtn.free{grid-column:1/-1;min-height:78px}
.pity{margin:4px 12px 12px;padding:10px 12px;border-radius:12px;font-size:12px;line-height:1.65}
.plist{gap:12px;padding:0 12px}.plist.gems{grid-template-columns:repeat(2,minmax(0,1fr))}
.prod{padding:16px;border:1px solid #00000009;border-radius:18px;gap:8px;box-shadow:0 4px 14px #00000008}
.prod .pname{font-size:15px;line-height:1.55;min-height:0}.prod .pdesc{font-size:13px;line-height:1.8}
.prod.k-gems .pname{font-size:12px;min-height:36px;display:grid;place-items:center;text-align:center}.gemstack b{font-size:24px;line-height:1.3}
.prod .btn.price{min-height:44px;padding:10px 8px;font-variant-numeric:tabular-nums;white-space:nowrap}
.prod.trade{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 12px}.prod.trade .pname{grid-column:1}.prod.trade .pdesc{grid-column:1;font-size:12px}.prod.trade>.btn{grid-column:2;grid-row:1/3;white-space:nowrap;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:76px}.prod.trade>.btn .ico{width:18px;height:18px;flex:0 0 18px}
.menu{gap:10px;padding:0 12px 12px}.mrow{display:grid;grid-template-columns:32px minmax(0,1fr) auto;gap:12px;min-height:70px;padding:14px;border:1px solid #00000008;border-radius:16px;box-shadow:0 3px 12px #00000006}
.mrow>i{font-size:23px;text-align:center}.mrow>span{gap:4px}.mrow b{font-size:14px;line-height:1.5}.mrow small{font-size:12px;line-height:1.5}.mrow .dot{grid-column:3}
.bigbtn{grid-template-columns:minmax(0,1fr) auto;gap:5px 10px;padding:14px 16px;min-height:82px;border-radius:18px}
.bigbtn b{font-size:18px;line-height:1.5}.bigbtn small{font-size:12px;line-height:1.6}.bigbtn>span{white-space:nowrap;align-self:center}
.floor{height:auto;min-height:54px;gap:10px;padding:9px 12px;font-size:13px}.floor .fno{flex:0 0 34px}.floor .froom{min-width:0;line-height:1.5;padding-right:38px}
.buildbox{margin:4px 12px 12px;padding:14px;grid-template-columns:minmax(0,1fr) auto;gap:8px 12px}.buildbox small{font-size:12px;line-height:1.7}.buildbox b{line-height:1.6}
.upgrades,.ups{gap:8px;padding:12px}.upbtn{min-width:0;min-height:110px;padding:12px 5px;gap:5px;border-radius:16px;display:flex;flex-direction:column;align-items:center;justify-content:center}
.upbtn b{font-size:14px;line-height:1.4}.upbtn small{white-space:normal;font-size:11px;line-height:1.5;text-wrap:balance;min-height:34px}.upbtn span{font-size:14px;white-space:nowrap}
.acts{gap:8px;padding:12px}.act{min-width:0;min-height:105px;padding:12px 5px;gap:4px}.act b{font-size:14px}.act small{white-space:normal;font-size:11px;line-height:1.6;min-height:32px}.act em{white-space:nowrap}
.road .chips{gap:5px}.road .chips span{min-width:0}.road .chips small{font-size:10px;line-height:1.4;min-height:28px;text-align:center;text-wrap:balance}
.stats3{gap:4px;font-size:12px;line-height:1.6}.preview small{font-size:11px;white-space:nowrap}.hhud{padding:12px;gap:12px}
.side .sidebtn{width:52px;min-height:42px;padding:4px 0;line-height:1.3}.side .sidebtn i{font-size:18px}.side .sidebtn span{font-size:10px;letter-spacing:-.02em;white-space:nowrap}
.modal{border-radius:20px;max-height:calc(100dvh - 28px)}.mhead{padding:14px 16px;gap:12px}.mhead b{font-size:17px;line-height:1.5;flex:1;min-width:0}.mhead .x{flex:0 0 34px}
.mbody{padding:16px;line-height:1.75;overflow-x:hidden}.mfoot{padding:12px 16px 16px;gap:10px}.mfoot .btn{min-width:0;flex:1 1 120px;line-height:1.5}
.mis{grid-template-columns:minmax(0,1fr) auto;gap:8px 10px;padding:12px 0}.mis .mtext{grid-column:1;gap:5px}.mis .mnum{grid-column:1;grid-row:2;justify-self:start}.mis>.btn{grid-column:2;grid-row:1/3;white-space:nowrap}
.contents li{line-height:1.65;gap:10px}.ctable td{line-height:1.7;padding:7px 4px}.ctable td:last-child{white-space:nowrap;font-variant-numeric:tabular-nums}
.scbox{padding:14px 16px 24px}.sctext{font-size:15px;line-height:1.9;text-wrap:pretty}.ptbub span,.ptbubble span{font-size:14px;line-height:1.7}
.vg-caption>strong{font-size:17px;line-height:1.5;text-wrap:balance}.vg-instruction{font-size:14px;line-height:1.6;text-wrap:balance}.vg-action{font-size:15px;line-height:1.5}.vg-stop{font-size:11px;line-height:1.5}
@media(min-width:460px){.plist.gems{grid-template-columns:repeat(3,minmax(0,1fr))}.banner .bpick{height:220px}}
@media(max-width:350px){#top{padding-left:8px;padding-right:8px}.resrow{gap:4px}#top .res{gap:3px;padding:5px 4px}#top .res .rv b{font-size:12px}#top .res .ico{width:15px;height:15px}#top .res em.plus{width:15px;height:15px;font-size:11px}#nav .tab>span{font-size:10px}.journey-actions{grid-template-columns:1fr!important}.journey-actions .btn{min-height:40px!important}.banner .btext{padding:14px}.btext h2{font-size:18px}.cards{gap:7px;padding:8px}.upbtn b,.act b{font-size:12px}}

/* Phrase-based wrapping. One copy-text remains one flex item in buttons. */
.copy-text{min-width:0;max-width:100%;white-space:normal;line-height:inherit;font-size:inherit;letter-spacing:inherit}
.copy-word{display:inline-block!important;max-width:100%;white-space:nowrap;vertical-align:baseline;font:inherit!important;letter-spacing:inherit!important;line-height:inherit!important;padding:0!important;margin:0!important;min-height:0!important;min-width:0!important;color:inherit;background:none!important;border:0!important;box-shadow:none!important}
/* Readable sentences and balanced short labels have different rhythm. */
.btext p,.pdesc,.mbody p,.sctext,.quote{line-height:1.85;text-wrap:pretty;letter-spacing:.025em}
.btn,.btab,.pname,.shead,.journey-goal,.vg-caption,.vg-instruction{text-wrap:balance}
.btn .copy-text{display:block;text-align:inherit}
.prod .pdesc{max-width:38em}.prod .contents{margin:4px 0 8px}
.contents li{display:flex;justify-content:space-between;align-items:baseline;flex-wrap:wrap;row-gap:3px}
.contents li>.copy-text{flex:1 1 auto}
.mfoot{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr))}
.mhead b{padding-right:4px}.mbody>p:first-child{margin-top:0}
.gbtn b,.gbtn small,.bigbtn b,.upbtn b,.act b{width:100%;text-align:center}
.bigbtn b{text-align:left}
.testnote{padding:14px 18px;line-height:1.8;text-align:center}
.side .sidebtn .dot{right:0}
@media(max-width:390px){.plist:not(.gems){grid-template-columns:minmax(0,1fr)}.prod{padding:18px}.prod .pname{font-size:16px}.prod .pdesc{font-size:13px}.btext h2{font-size:19px}.upbtn small,.act small{font-size:11px}}
