/* Game profiles follow the landscape game; the shared SDK keeps its own layout. */
.driver-profile{--dp-w:min(850px,calc(100dvw - 16px));--dp-h:min(430px,calc(100dvh - 16px));position:fixed;inset:auto;left:50%;top:50%;margin:0;padding:8px;box-sizing:border-box;width:var(--dp-w);height:var(--dp-h);max-width:none;max-height:none;transform:translate(-50%,-50%);color:#f5f6ef;background:#233d50 url('../assets/rally-20261109/tile-slate.png') repeat;background-size:72px;border:9px solid transparent;border-image:url('../assets/rally-20261109/plate-rim.png') 32 stretch;border-radius:15px;box-shadow:0 12px 45px #000b;font:14px/1.3 Arial,sans-serif;overflow:hidden;overscroll-behavior:contain;}
.driver-profile[open]{display:grid;grid-template-columns:106px minmax(0,1fr);grid-template-rows:30px 30px auto minmax(0,1fr);grid-template-areas:'head head' 'hero tabs' 'hero status' 'hero content';gap:6px 10px;}
.driver-profile::backdrop{background:#06121dd9;}
.driver-profile button{font:700 12px Arial,sans-serif;cursor:pointer;touch-action:manipulation;}
.driver-profile button:focus-visible,.dp-content:focus-visible,.dp-rail:focus-visible{outline:3px solid #fff2a6;outline-offset:-3px;}
.dp-head{grid-area:head;display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;}
.dp-head h2{margin:0;font:900 19px/1.1 Arial,sans-serif;color:#ffdd85;text-shadow:0 2px #102433;}
.dp-close{width:30px;height:30px;flex-shrink:0;padding:0;border:4px solid transparent;border-image:url('../assets/rally-20261109/plate-red.png') 32 stretch;border-radius:7px;background:#d85740 url('../assets/rally-20261109/tile-red.png');background-size:72px;color:#fff;font-size:24px!important;line-height:20px;}
.dp-hero{grid-area:hero;display:flex;flex-direction:column;align-items:flex-start;gap:10px;min-height:0;padding:8px;background:#102a3ac9;border:2px solid #486476;border-radius:9px;overflow:auto;scrollbar-width:thin;}
.dp-identity{display:flex;flex-direction:column;align-items:flex-start;gap:6px;width:100%;min-width:0;}
.dp-avatar{display:block;width:58px;height:58px;box-sizing:border-box;flex-shrink:0;padding:0;border:3px solid #ffda80;border-radius:12px;overflow:hidden;background:#213e53;color:#fff;}
.dp-avatar img{width:100%;height:100%;object-fit:cover;display:block;}
.dp-name{display:block;max-width:100%;color:#fff;font-size:14px;line-height:1.15;overflow-wrap:anywhere;}
.dp-badge{margin:0;color:#bce2ed;font-size:12px;line-height:1.45;}
.dp-status{grid-area:status;margin:0;color:#ffdd85;font-size:11px;min-width:0;line-height:1.2;}
.dp-status:empty,.dp-status span:empty{display:none;}
.dp-tabs{grid-area:tabs;display:flex;gap:5px;min-width:0;}
.dp-tabs button,.dp-retry{min-width:0;min-height:30px;padding:3px 7px;border:4px solid transparent;border-image:url('../assets/rally-20261109/plate-blue.png') 32 stretch;border-radius:7px;background:#345a73 url('../assets/rally-20261109/tile-blue.png');background-size:72px;color:#e7f4fa;}
.dp-tabs button{flex:1;white-space:nowrap;}
.dp-tabs button[aria-selected=true]{background:#efbb55 url('../assets/rally-20261109/tile-amber.png');background-size:72px;border-image-source:url('../assets/rally-20261109/plate-amber.png');color:#172e3d;}
.dp-content{grid-area:content;min-height:0;min-width:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-y;padding:1px 4px 3px 1px;scrollbar-width:thin;}
.dp-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;}
.dp-stat{display:flex;flex-direction:column;justify-content:center;gap:2px;min-height:50px;box-sizing:border-box;padding:5px;background:#173246;border:2px solid #436477;border-radius:8px;text-align:center;}
.dp-stat strong{font-size:21px;line-height:1.1;color:#e1f5f8;overflow-wrap:anywhere;}.dp-stat span{font-size:11px;color:#c3d8df;}.dp-stat.dp-gold strong{color:#ffda80;}
.dp-details{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) auto;gap:0 9px;margin:7px 0 0;}
.dp-details dt,.dp-details dd{margin:0;padding:6px 0;border-bottom:1px solid #65829466;font-size:12px;line-height:1.25;}.dp-details dt{color:#ccdee8;}.dp-details dd{font-weight:700;text-align:right;color:#fff;}
.dp-note{font-size:10px;color:#abc6d5;line-height:1.3;margin:6px 0 2px;}.dp-empty{padding:12px;color:#d2e5ee;}.dp-intro{margin:0 0 6px;color:#bde4ee;font-size:12px;flex-shrink:0;}
.dp-view-ach,.dp-view-records{display:flex;flex-direction:column;overflow:hidden;}
.dp-rail{display:grid;grid-auto-flow:column;grid-auto-columns:180px;grid-template-rows:minmax(0,1fr);gap:8px;min-height:0;min-width:0;flex:1;overflow-x:auto;overflow-y:hidden;overscroll-behavior:contain;scrollbar-width:thin;padding:2px 2px 6px;touch-action:none;user-select:none;}
.dp-ach,.dp-track{display:flex;flex-direction:column;gap:7px;min-width:0;min-height:0;box-sizing:border-box;padding:10px;border:2px solid #456274;border-radius:9px;background:#173246;overflow:auto;scrollbar-width:thin;}
.dp-ach b,.dp-track b{font-size:14px;line-height:1.2;}.dp-ach.is-done{border-color:#72ae7c;}.dp-ach-state{font-size:11px;color:#bdd0db;}.is-done .dp-ach-state{color:#abecb0;}.dp-ach progress{width:100%;height:10px;min-height:10px;margin-top:auto;accent-color:#efc968;}.dp-ach small,.dp-track small{font-size:12px;color:#c7e2ea;}.dp-track-stars{color:#ffda80;font-size:21px;letter-spacing:3px;}.dp-status .dp-retry{margin-left:6px;min-height:24px;padding:0 5px;font-size:11px;}
@media (orientation:portrait){.driver-profile{--dp-w:min(850px,calc(100dvh - 16px));--dp-h:min(430px,calc(100dvw - 16px));transform:translate(-50%,-50%) rotate(90deg);}}
/* Compact online HUD and full-row buttons; the portrait has no separate action. */
.rally-ui #app #ov-online>.online-panel{padding:8px 10px;gap:6px;}
.rally-ui #ov-online .panel-title{font-size:22px;line-height:1.1;}
.rally-ui #ov-online .online-caption{font-size:12px;line-height:1.1;}
.online-entry{min-width:0;}
.rally-ui #app #online-grid .online-card{width:100%;min-height:58px;height:100%;box-sizing:border-box;padding:6px 8px;text-align:left;font:inherit;color:inherit;}
.rally-ui #app #online-grid button.online-card{cursor:pointer;appearance:none;}
.rally-ui #app #online-grid button.online-card:focus-visible{outline:3px solid #ffdf86;outline-offset:-3px;}
.rally-ui #online-grid .online-player{gap:3px;}

.dp-avatar,.rally-ui #online-grid .lb-avatar{touch-action:none;}
