/* Hardware controls need their own ink: their dark surroundings use pale text. */
button{color:var(--ink)}
.top-actions button,.console-foot button,.touch-controls button{
 color:#203448;background:#f8f8f0;text-shadow:none;letter-spacing:normal;
 font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
 font-size:16px;font-weight:650;line-height:1.25;min-height:44px;padding:8px 12px;
}
.masthead{flex-wrap:wrap;gap:8px}.top-actions{flex-wrap:wrap;gap:6px}
.top-actions button{white-space:nowrap}.console-foot{gap:8px}
.console-foot #touch-toggle,.console-foot #menu-button{font-size:16px;min-height:44px}
.touch-controls .dpad button,.touch-controls #back-button,.touch-controls #interact-button{font-size:20px;text-align:center}
.touch-controls #run-button{font-size:14px;padding:6px 3px}
.journey-strip button,footer button{font-family:system-ui,-apple-system,sans-serif;font-size:14px;line-height:1.3;min-height:40px}
.touch-help{font-family:system-ui,-apple-system,sans-serif;line-height:1.4}
.app:has(.is-landscape) .masthead{height:auto;min-height:44px;margin-bottom:6px}
.app:has(.is-landscape) .masthead button{font-size:16px;min-height:44px}
.studio-credit{color:#f8f8f0;text-align:center;padding:16px}
.studio-credit p{font-size:clamp(20px,5cqw,40px);line-height:1.25;margin:0 0 8px;letter-spacing:.04em}
.studio-credit span{font-size:clamp(16px,3.4cqw,28px);line-height:1.25}
/* Keep a generous tap target without the former full-width selection slab. */
#press-start{left:50%;right:auto;transform:translateX(-50%);width:max-content;max-width:90%;height:auto;min-height:44px;bottom:6%;padding:4px 12px;font-size:clamp(14px,2.5cqw,24px);line-height:1;letter-spacing:1px}
.overlay[data-kind=title] #press-start.control-selected{background:transparent!important;box-shadow:none;outline:0;color:#fff8dd}
.overlay[data-kind=title] #press-start:focus-visible{outline:2px solid #fff8dd;outline-offset:0}
.bag-pockets{display:flex;gap:8px;margin:0 0 12px}.bag-pockets button{flex:1;text-align:center;min-height:40px}
.overlay .item-icon{display:inline-block;width:32px;height:32px;max-width:none;object-fit:contain;image-rendering:pixelated;vertical-align:middle;margin:0 8px 2px 0;pointer-events:none;flex-shrink:0}.overlay .item-icon.large{width:64px;height:64px}.item-heading{display:flex;align-items:center;gap:8px;min-height:64px;margin:0 0 12px}.item-heading .item-icon{margin:0}.overlay-header .item-icon{vertical-align:middle}.admin-item-preview{margin-bottom:8px}
.bag-pockets [aria-pressed=true]{background:#d8e8f8;border-bottom:4px solid #5078a0}
.overlay .shop-tabs{margin:0 0 12px}.shop-tabs button{min-height:44px;text-align:center}.shop-tabs [aria-pressed=true]{opacity:1;background:#d8e8f8;border-bottom:4px solid #5078a0}
.overlay[data-kind=shop-sell-quantity] .quantity-controls{flex-wrap:wrap}.overlay[data-kind=shop-sell-quantity] .item-use-button{min-height:44px;min-width:120px;text-align:center}.overlay[data-kind=shop-sell-quantity] #sale-preview{min-height:2.3em;line-height:1.25}
.quantity-controls{display:flex;align-items:center;gap:8px;margin:8px 0 10px}
.quantity-controls button{min-width:44px;min-height:44px;text-align:center;flex-shrink:0}
.quantity-controls input{width:4em!important;max-width:40%;min-height:44px;text-align:center}
.overlay[data-kind=item-use] .item-use-button{min-height:44px;min-width:120px;text-align:center}
.overlay[data-kind=item-use] #item-preview{min-height:2.3em}
.overlay .item-result{background:#d8e8d0;border-left:4px solid #487058;padding:8px;color:#203848;line-height:1.3}
.overlay[data-kind=item-use] .foot-actions,.overlay[data-kind=tm-party] .foot-actions{margin-top:12px}
.overlay[data-kind=tm-shop] .row{align-items:flex-start}
.overlay[data-kind=tm-shop] .row p{margin:4px 0}
@media(max-width:480px){
 .masthead{justify-content:center}.top-actions{justify-content:center;width:100%}
 .console-foot{justify-content:space-between}.console-foot #touch-toggle{flex:1}
 .quantity-controls{gap:5px}.quantity-controls button{padding:6px 9px}
 .overlay[data-kind=item-use] p,.overlay[data-kind=tm-party] p{line-height:1.25}
 .overlay[data-kind=tm-shop] .row{gap:6px}.overlay[data-kind=tm-shop] .row button{min-height:40px}
}
/* The Poké Mart keeps category controls visible and buying controls unambiguous. */
.shop-tabs{position:sticky;top:0;z-index:2;background:var(--panel,#f5edd9);padding:8px 0;gap:6px;flex-wrap:wrap}
.shop-tabs button[aria-pressed="true"]{background:#21645d;color:#fff;border-color:#16473f}
.mart-stock-row{align-items:center;gap:14px}
.mart-stock-row>div:first-child{flex:1;min-width:0}
.mart-stock-row small{display:inline-block;line-height:1.45;margin-top:4px}
.mart-buy-actions{display:flex;flex-direction:column;flex-shrink:0;gap:6px}
.mart-buy-actions button{min-width:72px}
/* Cloud saving fits the game's existing lower screen and touch controls. */
.cloud-panel,.cloud-phone{font-size:14px;line-height:1.45}
.cloud-status{padding:10px 12px;background:#e1eee7;border-left:4px solid #21645d;border-radius:3px}
.cloud-conflict{background:#fff0cb;border-color:#ac751b}
.cloud-account{font-weight:700}
.cloud-saves{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;margin:12px 0}
.cloud-card{padding:12px;border:1px solid #98afa0;border-radius:5px;background:#fffdf4;min-width:0;overflow-wrap:anywhere}
.cloud-card h3{font-size:12px;letter-spacing:.08em;margin:0 0 8px;color:#386457}
.cloud-card p{margin:5px 0}.cloud-card small{font-size:11px;color:#526459}
.cloud-note{font-size:12px;color:#526459}
.cloud-panel .foot-actions{display:flex;flex-wrap:wrap;gap:8px}
.cloud-panel .foot-actions button{min-height:42px;white-space:normal}
.cloud-phone label{display:block;font-weight:700;margin:12px 0 5px}
.cloud-phone input{display:block;width:100%;box-sizing:border-box;min-height:46px;font-size:18px;padding:9px;border:2px solid #426f61;border-radius:4px;background:#fffdf4;color:#172c24}
.cloud-phone input#phone-code{letter-spacing:.2em;font-size:25px;max-width:240px}
#phone-error,#code-error{min-height:1.4em;color:#853628}
#phone-captcha{margin:12px 0}
@media(max-width:420px){.cloud-saves{grid-template-columns:1fr}.cloud-panel .foot-actions button{flex:1 1 100%}}
