/* Phone layout only. Original style.css and desktop rules remain intact. */
.phone-only{display:none}
@media(max-width:700px),(max-width:950px) and (max-height:500px) and (pointer:coarse){
 html{scroll-padding:8px}body{min-height:100svh}header{padding:6px max(8px,env(safe-area-inset-right)) 6px max(8px,env(safe-area-inset-left));gap:6px;flex-wrap:wrap;align-items:center}
 .brand small{display:none}.brand strong{font-size:24px}nav{max-width:none;gap:4px;align-items:center;margin-left:auto}nav button,nav a{min-height:44px;font-size:12px;padding:9px 10px}
 .phone-only{display:inline-block}nav #new,nav #rules,nav #settings{display:none}header.phone-menu-open nav{flex-wrap:wrap}header.phone-menu-open nav #new,header.phone-menu-open nav #rules,header.phone-menu-open nav #settings{display:block}
 main{padding:6px max(8px,env(safe-area-inset-right)) 8px max(8px,env(safe-area-inset-left))}footer{display:none}
 #welcome{gap:8px}.intro{padding:0 6px}.intro .eyebrow,.intro p{display:none}.intro h1{font-size:28px;letter-spacing:-.5px;margin:6px 0}.panel{padding:12px}h2{font-size:23px;margin:4px 0 10px}input,select{font-size:16px}.formrow{gap:8px}
 #table{position:relative}.scorebar{gap:8px;margin:0 0 4px}.score{display:grid;grid-template-columns:10px minmax(0,1fr) auto;gap:4px;flex:1;min-width:0;font-size:13px;line-height:1.2}.score>div{overflow-wrap:anywhere}.score strong{font-size:28px}.score>small{grid-column:3;text-align:right;font-size:10px}.score small{font-size:9px}.score .dot{width:9px;height:9px}
 #boardToggle{margin:0 0 5px;padding:5px 10px;font-size:12px;min-height:44px}#board{display:none;margin:0 0 6px;border-radius:16px;overflow-x:auto;padding:4px;overscroll-behavior-x:contain}#board.phone-expanded{display:block}#board svg{width:850px;max-width:none;max-height:none}#boardHelp{font-size:12px;margin:0 0 6px;color:var(--muted)}
 .felt{padding:8px;border-radius:12px;min-width:0}.tabletop{float:none;width:auto;display:grid;grid-template-columns:minmax(0,1fr) 48px minmax(0,1fr);gap:6px;align-items:start}.tabletop>div{min-width:0}.tabletop .eyebrow{font-size:10px;letter-spacing:.4px;line-height:1.2;display:block;overflow-wrap:anywhere}.crib{text-align:right}.crib .cards{justify-content:flex-end}.backs{margin-top:3px}.backs .card{width:27px;height:36px;margin-left:-15px;border-width:2px}.tabletop .starter>.eyebrow{white-space:nowrap;font-size:9px}.tabletop .starter .card{width:44px;height:60px;font-size:19px;padding:3px;margin-top:3px}.tabletop .starter .pip{font-size:23px}.tabletop .starter .corner{font-size:10px;bottom:3px;right:3px}
 .cards{min-height:36px}.pegzone{width:auto;min-height:68px;margin:5px 0;gap:6px;padding-bottom:4px}.total{width:54px}.total strong{font-size:34px}.total small{font-size:8px;letter-spacing:.3px}.total>span{font-size:10px}#played{flex:1;min-width:0;gap:3px;min-height:54px;display:grid;grid-template-columns:repeat(8,minmax(0,1fr))}#played .card{width:100%;max-width:44px;height:52px;font-size:16px;padding:3px}#played .pip{font-size:20px;line-height:1.1}#played .corner{font-size:9px;bottom:3px;right:2px}
 #status{clear:none;font-size:14px;line-height:1.3;min-height:19px;margin:4px 0}#handLabel{margin:4px 0 8px;font-size:11px;letter-spacing:.5px}.hand{display:flex;gap:4px;min-height:92px;padding:5px 0 2px;align-items:center}.hand .card{flex:0 1 62px;min-width:0;width:calc((100% - 20px)/6);height:86px;font-size:24px;padding:4px;border-radius:6px}.hand .pip{font-size:30px;line-height:1.1}.hand .corner{font-size:12px;bottom:4px;right:4px}.hand .card.selected,.hand .card.highlight{transform:translateY(-5px);outline:2px solid var(--gold);outline-offset:-2px;box-shadow:0 0 0 2px var(--gold)}button.card:hover{transform:none}.hand .card.selected:hover{transform:translateY(-5px)}.card.playable{border-bottom:5px solid var(--gold)}.card.unplayable{opacity:.5;border-style:dashed}
 .actions{margin-top:4px;gap:6px}.actions button{min-height:44px;font-size:14px;padding:8px 12px}.actions .primary{flex:1;max-width:340px}#feedback{font-size:12px;line-height:1.25;margin:4px 0 0;min-height:0}#feedback:empty{display:none}#phoneSelection{display:block;min-height:16px;color:var(--gold);font-size:12px;line-height:1.25;margin-top:3px}
 #phoneSelection:empty{display:none}.connection{font-size:12px;gap:6px;margin:3px 0;flex-wrap:wrap}.connection button{min-height:44px;padding:7px 9px}.history{margin:3px 0}.history summary{min-height:44px;padding:10px 0;font-size:13px}.history[open]{max-height:45dvh;overflow:auto}.history select{min-height:44px}
 #table[data-phone-phase=over] #hand,#table[data-phone-phase=over] #handLabel,#table[data-phone-phase=count] #hand,#table[data-phone-phase=count] #handLabel,#table[data-phone-phase=next] #hand,#table[data-phone-phase=next] #handLabel{display:none}
 #countPanel{margin:6px 0;padding:8px;max-height:min(30dvh,210px);overflow:auto;scroll-padding:14px}#countTitle{font-size:20px;margin:0 0 8px}#countCards{gap:5px;margin-top:8px;padding-top:6px;justify-content:center}#countCards .card{width:calc((100% - 20px)/5);max-width:54px;height:74px;font-size:21px}#countCards .pip{font-size:26px;line-height:1.1}#countCards .card.highlight{transform:translateY(-4px);box-shadow:0 0 0 2px var(--gold)}#breakdown{gap:5px;margin-top:8px;font-size:14px;align-items:center}#breakdown button{min-height:44px;padding:7px 9px;font-size:13px}#practiceArea{gap:6px;align-items:center}#practiceArea label{margin:4px 0}#practiceArea button{min-height:44px}#guess{max-width:80px}
 dialog{padding:14px;max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow:auto;width:calc(100% - 20px);scroll-padding:60px}dialog .close{position:sticky;top:0;z-index:2;background:#18372e;min-width:44px;min-height:44px}dialog h2{padding-right:44px}dialog p{font-size:14px}#privacy button{width:100%}
}
@media(max-width:950px) and (max-height:500px) and (pointer:coarse){
 header{padding-top:2px;padding-bottom:2px}main{padding-top:3px}.scorebar{padding-right:110px;max-width:630px}#boardToggle{position:absolute;right:0;top:0}.felt{display:grid;grid-template-columns:minmax(150px,.8fr) minmax(0,1.6fr);column-gap:12px;padding:6px 10px}.tabletop{grid-column:1;grid-row:1/4}.pegzone{grid-column:1;grid-row:4/8;align-self:start;margin:2px 0}#status,#handLabel,#hand,#actions,#feedback,#phoneSelection,#countPanel{grid-column:2}#status{grid-row:1}#handLabel{grid-row:2;margin:0}#hand{grid-row:3;min-height:88px}#actions{grid-row:5}#feedback{grid-row:6}#phoneSelection{grid-row:4}#countPanel{grid-row:3/5;max-height:39dvh;margin:4px 0}.tabletop .starter .card{height:55px}.history{margin:0}#played{grid-template-columns:repeat(4,minmax(0,1fr))}#played .card{height:40px;font-size:13px}#played .pip{font-size:17px}#played .corner{font-size:8px}.total strong{font-size:28px}
}
