:root{font-family:Inter,system-ui,Arial,sans-serif;color:#fff6dd;background:#0b1017}*{box-sizing:border-box}body{margin:0;min-height:100dvh;background:radial-gradient(ellipse at 50% 0,#40301e,#121822 70%,#090c13)}button,a{font:inherit}button{cursor:pointer;border:1px solid #665943;border-radius:12px;background:linear-gradient(#30333a,#171b25);color:#fff1d4;padding:11px 16px;font-weight:700}button:hover:not(:disabled){filter:brightness(1.2)}button:disabled{opacity:.48;cursor:not-allowed}.gold{background:linear-gradient(165deg,#ffe38b,#e5a92f 65%,#b47717);color:#2e1a04;border-color:#f6c75a;box-shadow:0 4px 12px #0007}.top{height:70px;display:flex;align-items:center;justify-content:space-between;padding:0 25px;border-bottom:1px solid #8d6736;background:#10131be8;gap:12px}.brand{font-family:Georgia,serif;color:#f5c761;font-size:27px;text-decoration:none;font-weight:900;text-shadow:0 2px #543008}.brand b{color:#fff0bd}.top nav{display:flex;gap:8px;align-items:center}.top nav a{color:#f8dfaa;text-decoration:none;padding:9px 10px}.top nav button{padding:8px 13px}#status{font-size:13px;color:#d7c6a4}main{max-width:1600px;margin:auto}.screen{min-height:calc(100dvh - 70px)}.hidden{display:none!important}.hero{min-height:65dvh;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;background:radial-gradient(ellipse at 50% 50%,#68402260,transparent 64%)}.hero-dice{font-size:76px;color:#ffdc81;text-shadow:0 9px 22px #000}.hero h1{font-family:Georgia,serif;font-size:clamp(54px,9vw,110px);color:#f4c463;margin:0;text-shadow:0 6px 0 #643609,0 12px 24px #000}.hero p{letter-spacing:5px;font-weight:800;color:#e9d4a4}.choices{display:flex;gap:15px;flex-wrap:wrap;justify-content:center;margin:25px 12px}.choices button{min-width:190px;padding:20px 24px;font-size:19px}.choices small{display:block;font-size:11px;margin-top:6px;font-weight:500}.lobby-links{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin:18px}.players{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 20px}.player{display:flex;gap:10px;align-items:center;border:1px solid #9c753c;border-radius:14px;background:#171c27;padding:6px 14px;min-width:165px}.player.active{box-shadow:0 0 15px #f9c65988;border-color:#ffd46c}.player small{display:block;font-size:11px;color:#cbbda3}.avatar{width:42px;height:42px;display:grid;place-items:center;background:#66492a;border-radius:10px;font-size:25px}.centerinfo{text-align:center;display:grid;gap:2px;color:#fbd575}.centerinfo span{font-size:12px;color:#d6c4a4}.boardwrap{position:relative;width:min(94vw,1120px);margin:0 auto;aspect-ratio:1200/740;filter:drop-shadow(0 14px 16px #0009)}canvas{width:100%;height:100%;display:block;touch-action:none;cursor:pointer}#diceVisual{position:absolute;top:48%;left:50%;transform:translate(-50%,-50%);display:flex;gap:12px;pointer-events:none}#diceVisual span{display:grid;place-items:center;width:clamp(27px,4vw,52px);height:clamp(27px,4vw,52px);background:#fff6e7;color:#18191a;font-size:clamp(24px,3.8vw,47px);border-radius:9px;box-shadow:3px 5px 8px #0008;transform:rotate(-12deg)}#diceVisual span+span{transform:rotate(13deg)}.controls{display:flex;gap:9px;justify-content:center;flex-wrap:wrap;padding:10px}.tip{text-align:center;color:#d4c4a4;font-size:13px;margin:0 10px 12px}#toast{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);background:#0c342c;border:1px solid #d8ac57;padding:11px 20px;border-radius:15px;display:none;z-index:8;text-align:center}.modal{position:fixed;inset:0;background:#000b;display:grid;place-items:center;z-index:10}.resultcard{background:linear-gradient(#3c2b1b,#10151e);border:2px solid #e3b650;border-radius:22px;text-align:center;padding:35px;box-shadow:0 0 80px #f0c55340}.resultcard #resultIcon{font-size:65px}.resultcard h2{font-size:40px;color:#ffdb6e}.resultcard button{margin:5px}#panel{padding:25px;max-width:850px;margin:auto}#panelContent{background:#171d29;border:1px solid #9d7841;border-radius:18px;padding:22px;margin-top:18px}#panelContent h2{color:#f7ce6b}#rotate{display:none}#rotate div{font-size:60px}@media(max-width:750px){.top{height:52px;padding:0 8px}.brand{font-size:18px}#status{display:none}.top nav{gap:2px}.top nav a{font-size:11px;padding:5px}.top nav button{padding:5px}.screen{min-height:calc(100dvh - 52px)}.players{padding:3px 7px}.player{min-width:0;padding:3px 6px;gap:4px;font-size:11px}.avatar{width:26px;height:26px;font-size:15px}.player small{font-size:8px}.centerinfo{font-size:11px}.centerinfo span{font-size:9px}.boardwrap{width:min(98vw,1120px)}.controls{padding:4px;gap:4px}.controls button{padding:5px 8px;font-size:11px}.tip{font-size:10px}.choices button{min-width:150px}}@media(max-width:750px) and (orientation:portrait){#rotate{position:fixed;inset:0;z-index:30;display:flex;align-items:center;justify-content:center;flex-direction:column;background:#111c1d;text-align:center;padding:24px}#rotate p{color:#e6d0a2}}@media(max-height:520px) and (orientation:landscape){body{overflow:hidden}.top{height:38px}.screen{height:calc(100dvh - 38px);min-height:0;overflow:hidden}.players{height:37px;padding:1px 10px}.avatar{width:24px;height:24px}.player{padding:2px 6px}.boardwrap{height:calc(100dvh - 118px);width:auto;max-width:94vw;aspect-ratio:1200/740}.controls{height:36px;padding:2px}.controls button{padding:3px 8px;font-size:11px}.tip{display:none}.hero{min-height:50dvh}.hero h1{font-size:45px}.hero-dice{font-size:36px}.choices{margin:5px}.choices button{padding:7px 14px;font-size:13px}.lobby-links{margin:5px}.lobby-links button{padding:5px}}

/* v0.1.1: mobile landscape maximized board */
@media (orientation:landscape) and (pointer:coarse){
 html,body{width:100%;height:100%;overflow:hidden}
 .top{height:32px!important;min-height:32px;padding:0 8px;gap:5px}
 .brand{font-size:17px}.top nav{gap:2px}.top nav a{padding:3px 5px;font-size:11px}.top nav button{padding:3px 6px;font-size:11px}#status{display:none}
 main{height:calc(100dvh - 32px);max-width:none}
 #game.screen:not(.hidden){height:calc(100dvh - 32px);min-height:0;display:flex;flex-direction:column;overflow:hidden}
 #game .players{flex:0 0 32px;height:32px;padding:1px 8px}
 #game .player{padding:1px 5px;gap:4px;font-size:11px}#game .avatar{width:23px;height:23px;font-size:14px}
 #game .centerinfo{font-size:11px;gap:0}#game .centerinfo span{font-size:9px}
 #game .boardwrap{flex:1 1 auto;min-height:0;width:auto;height:auto;aspect-ratio:1200/740;max-width:min(99vw,calc((100dvh - 101px)*1200/740));max-height:calc(100dvh - 101px);margin:auto;align-self:center}
 #game .boardwrap canvas{width:100%;height:100%}
 #game .controls{flex:0 0 37px;height:37px;min-height:37px;padding:2px;gap:4px;align-content:center}
 #game .controls button{padding:4px 9px;font-size:11px}#game .tip{display:none}
 #diceVisual span{width:clamp(28px,5dvh,48px);height:clamp(28px,5dvh,48px);font-size:clamp(25px,5dvh,42px)}
}
@media (orientation:landscape) and (pointer:coarse) and (max-height:390px){
 #game .players{flex-basis:28px;height:28px}#game .controls{flex-basis:32px;height:32px;min-height:32px}
 #game .controls button{padding:3px 7px}#game .boardwrap{max-height:calc(100dvh - 92px);max-width:min(99vw,calc((100dvh - 92px)*1200/740))}
}

/* RONİ TAVLA v2.0 - landscape mobile game layout */
@media (orientation:landscape) and (pointer:coarse) {
html,body,#app{height:100dvh;width:100%;overflow:hidden}
.top{position:absolute!important;inset:0 0 auto;z-index:5;height:32px!important;min-height:32px!important;padding:0 7px;background:#11151de8}
.top .brand{font-size:15px}.top nav a{font-size:10px;padding:3px 4px}.top nav button{padding:3px 5px}
main{position:absolute;inset:32px 0 0;height:auto!important;max-width:none}
#game.screen:not(.hidden){display:grid!important;grid-template-columns:minmax(75px,11vw) minmax(0,1fr) minmax(78px,11vw);grid-template-rows:minmax(0,1fr);gap:5px;height:100%!important;min-height:0!important;padding:5px;overflow:hidden;align-items:stretch;background:radial-gradient(ellipse at center,#34291b,#0b1118)}
#game .players{grid-column:1;grid-row:1;display:flex;flex-direction:column;justify-content:space-between;align-items:stretch;height:auto!important;min-height:0;min-width:0;padding:3px;gap:4px;border:1px solid #9d753b;border-radius:10px;background:#151b24}
#game .player{width:100%;min-width:0;display:flex;flex-direction:column;gap:2px;align-items:center;text-align:center;padding:5px 2px;font-size:10px;line-height:1.15;border-radius:8px}
#game .player .avatar{height:24px;width:24px;font-size:14px}#game .player small{font-size:8px;line-height:1.2}
#game .centerinfo{font-size:11px;line-height:1.3;padding:5px 0}#game .centerinfo span{font-size:9px}
#game .boardwrap{grid-column:2;grid-row:1;position:relative;align-self:stretch;justify-self:stretch;flex:none;min-width:0;min-height:0;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;aspect-ratio:auto!important;margin:0!important;filter:drop-shadow(0 4px 8px #000a)}
#game .boardwrap canvas{width:100%!important;height:100%!important;display:block;touch-action:none}
#game .controls{grid-column:3;grid-row:1;display:flex;flex-direction:column;align-items:stretch;justify-content:center;flex-wrap:nowrap;gap:clamp(3px,1.2dvh,8px);height:auto!important;min-height:0!important;flex:none;padding:3px!important;background:#151b24;border:1px solid #9d753b;border-radius:10px;overflow:hidden}
#game .controls button{flex:0 1 auto;width:100%;min-height:0;padding:clamp(4px,1.7dvh,9px) 2px!important;font-size:clamp(9px,1.9dvh,12px)!important;line-height:1.15;border-radius:8px;white-space:normal}
#game .tip{display:none!important}#diceVisual{top:49%;left:50%;gap:6px}#diceVisual span{width:clamp(25px,7dvh,43px);height:clamp(25px,7dvh,43px);font-size:clamp(23px,6dvh,39px)}
#toast{bottom:7px;padding:5px 10px;font-size:11px;max-width:65vw;pointer-events:none}
#lobby.screen:not(.hidden),#panel.screen:not(.hidden){height:100%;min-height:0;overflow:auto}
}
@media (orientation:landscape) and (pointer:coarse) and (max-height:340px){#game.screen:not(.hidden){grid-template-columns:70px minmax(0,1fr) 74px;gap:3px;padding:3px}#game .player .avatar{display:none}#game .controls button{padding:3px 1px!important;font-size:9px!important}#game .player small{display:none}}

/* RONİ Tavla v2.1: büyük toplama düğmesi */
#game .controls .collect-btn{font-size:clamp(15px,2.2vw,21px)!important;font-weight:900;letter-spacing:.025em;min-height:56px;padding:13px 18px!important;border:2px solid #fff0a5;box-shadow:0 0 0 3px #e2ac4330,0 6px 20px #0008;animation:collectPulse 1.9s ease-in-out infinite}
#game .controls .collect-btn.hidden{display:none!important}
@keyframes collectPulse{0%,100%{box-shadow:0 0 0 3px #e2ac4330,0 6px 20px #0008}50%{box-shadow:0 0 0 6px #e2ac4355,0 6px 22px #0009}}
@media (orientation:landscape) and (pointer:coarse){
 #game .controls .collect-btn{font-size:clamp(12px,2.9dvh,18px)!important;line-height:1.2;min-height:clamp(45px,12dvh,72px)!important;padding:7px 3px!important;white-space:normal;overflow-wrap:anywhere}
 #game .controls:has(.collect-btn:not(.hidden)) button:not(.collect-btn){padding:clamp(2px,1dvh,5px) 2px!important;font-size:clamp(9px,1.6dvh,11px)!important}
}
