#traffic { width: min(1130px,calc(100% - 36px)); max-width: 1130px; font: 14px/1.5 'Segoe UI',Arial,Helvetica,sans-serif; text-align: left; margin: 35px auto 30px; border: 1px solid #d4b47b59; border-radius: 18px; padding: clamp(18px,3vw,30px); background: #24192e; color: #fff0d5; }
#traffic .traffic-heading { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
#traffic .traffic-heading h2 { font: 500 clamp(23px,3vw,30px)/1.2 'Segoe UI',Arial,Helvetica,sans-serif; letter-spacing: -.8px; margin: 0; }
#traffic .traffic-heading p:last-child { margin: 9px 0 0; font-size: 12px; color: #c5b6ca; line-height: 1.6; }
#traffic .traffic-live { padding: 7px 10px; border: 1px solid #d4b47b59; border-radius: 20px; color: #d6a4df; background: #302036; font-size: 10px; white-space: nowrap; }
#traffic .traffic-summary { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 20px; margin: 26px 0; }
#traffic .traffic-summary>div { border-left: 2px solid #d4b47b33; padding-left: 14px; min-width: 0; }
#traffic .traffic-summary span { display: block; font-size: 11px; color: #c5b6ca; }
#traffic .traffic-summary strong { display: block; margin: 6px 0 5px; font: 600 35px/1.15 'Segoe UI',Arial,Helvetica,sans-serif; letter-spacing: -1px; }
#traffic .traffic-summary small { display: block; font-size: 10px; line-height: 1.5; color: #c5b6ca; }
#traffic .traffic-updated time { display: block; margin: 10px 0 8px; font-size: 12px; line-height: 1.6; }
#traffic .traffic-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 0; border-top: 1px solid #d4b47b33; }
#traffic button { border: 1px solid #d4b47b66; border-radius: 7px; color: #fff0d5; background: #302036; padding: 8px 11px; font-size: 11px; }
#traffic button:hover:not(:disabled) { background: #48304d; }
#traffic button:disabled { opacity: .55; }
#traffic .traffic-ranges { display: flex; gap: 4px; margin-right: auto; }
#traffic .traffic-ranges button[aria-pressed="true"] { color: #17101f; background: #e6c587; border-color: #e6c587; }
#traffic .traffic-toolbar label { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #c5b6ca; }
#traffic .traffic-toolbar input { max-width: 150px; min-height: 33px; border: 1px solid #d4b47b66; border-radius: 7px; padding: 5px 8px; font-size: 11px; background: #17101f; color: #fff0d5; }
#traffic .traffic-window { display: flex; align-items: center; gap: 8px; }
#traffic .traffic-window p { margin: 0; flex: 1; text-align: center; font-size: 12px; color: #c5b6ca; }
#traffic .traffic-window button { white-space: nowrap; }
#traffic .traffic-instruction { font-size: 10px; line-height: 1.6; color: #c5b6ca; margin: 18px 0 8px; }
#traffic .traffic-chart { display: grid; grid-template-columns: 35px minmax(0,1fr); gap: 7px; }
#traffic .traffic-axis { display: flex; flex-direction: column; justify-content: space-between; text-align: right; height: 174px; padding: 5px 0 0; font-size: 10px; color: #c5b6ca; }
#traffic .traffic-scroll { min-width: 0; overflow-x: auto; padding: 4px 4px 9px; scrollbar-color: #9b729f #17101f; }
#traffic .traffic-bars { display: grid; grid-template-columns: repeat(var(--traffic-days,7),minmax(44px,1fr)); min-width: calc(var(--traffic-days,7)*49px - 5px); column-gap: 5px; padding-top: 6px; background: repeating-linear-gradient(to top,transparent 0,transparent 38px,#d4b47b26 39px,transparent 40px); background-size: 100% 160px; background-position: top 10px left; background-repeat: no-repeat; }
#traffic .traffic-bars .traffic-bar { display: grid; grid-template-rows: 160px 27px; padding: 0; border: 0; border-radius: 5px; background: transparent; min-width: 0; color: #c5b6ca; opacity: 1; }
#traffic .traffic-bars .traffic-bar:hover:not(:disabled),#traffic .traffic-bars .traffic-bar[aria-pressed="true"] { background: #ffffff0e; }
#traffic .traffic-bar-track { height: 160px; display: flex; justify-content: center; align-items: end; position: relative; }
#traffic .traffic-bar-fill { height: var(--traffic-height,0%); min-height: 3px; width: min(62%,52px); border-radius: 5px 5px 1px 1px; background: #d6a4df; border: 1px solid #b885c2; }
#traffic .traffic-bar[aria-pressed="true"] .traffic-bar-fill { background: #e6c587; border-color: #cfb073; }
#traffic .traffic-bar[data-zero="true"] .traffic-bar-fill { background: #302036; border-color: #d6a4df; }
#traffic .traffic-bar[data-unrecorded="true"] .traffic-bar-fill { background: #594160; border-color: #594160; }
#traffic .traffic-bar-value { position: absolute; bottom: calc(var(--traffic-height,0%) + 5px); font-size: 10px; line-height: 1; color: #fff0d5; }
#traffic .traffic-bar-label { align-self: center; font-size: 9px; white-space: nowrap; }
#traffic .traffic-selection { margin: 14px 0 0; padding: 13px 15px; background: #302036; border: 1px solid #d4b47b59; border-radius: 9px; display: flex; justify-content: space-between; align-items: center; gap: 18px; }
#traffic .traffic-selection strong { display: block; font-size: 12px; font-weight: 600; }
#traffic .traffic-selection span { display: block; margin-top: 4px; font-size: 10px; color: #c5b6ca; line-height: 1.6; }
#traffic .traffic-selection p { margin: 0; font-size: 15px; font-weight: 600; white-space: nowrap; }
#traffic .traffic-note,#traffic .traffic-status,#traffic .traffic-empty,#traffic .traffic-explanation { font-size: 10px; line-height: 1.7; color: #c5b6ca; }
#traffic .traffic-empty { padding: 24px 10px; text-align: center; }
#traffic .traffic-status:empty { display: none; }
#traffic .traffic-status { color: #e6c587; }
#traffic .traffic-note { margin: 16px 0 8px; }
#traffic .traffic-explanation summary { cursor: pointer; color: #d6a4df; padding: 4px 0; }
#traffic .traffic-explanation p { max-width: 800px; }
@media(max-width:650px) { #traffic .traffic-heading { flex-direction: column; gap: 12px; } #traffic .traffic-summary { grid-template-columns: 1fr 1fr; gap: 18px; } #traffic .traffic-updated { grid-column: 1/-1; } #traffic .traffic-updated time { margin: 5px 0; } #traffic .traffic-window { flex-wrap: wrap; } #traffic .traffic-window p { order: -1; flex-basis: 100%; text-align: left; margin-bottom: 4px; } #traffic .traffic-window #traffic-next { margin-left: auto; } #traffic .traffic-toolbar { gap: 10px; } #traffic .traffic-ranges { width: 100%; } }
@media(max-width:380px) { #traffic .traffic-toolbar label { flex-direction: column; align-items: start; gap: 4px; } #traffic .traffic-selection { flex-direction: column; align-items: start; gap: 8px; } }

#traffic,#traffic *{box-sizing:border-box}#traffic [hidden]{display:none!important}#traffic button{font-family:inherit;cursor:pointer}#traffic button:disabled{cursor:default}#traffic button:focus-visible,#traffic input:focus-visible{outline:3px solid #d6a4df;outline-offset:3px}#traffic .traffic-eyebrow{font-size:10px;letter-spacing:.15em;color:#e6c587;margin:0 0 10px;text-transform:uppercase;font-weight:700}#traffic .traffic-explanation p{font-size:11px;line-height:1.8}#traffic{flex:none;align-self:center;overflow:visible}

#traffic button{min-height:44px;min-width:44px;line-height:1.4;touch-action:manipulation}
#traffic .traffic-bars .traffic-bar{min-width:44px}
#traffic .traffic-toolbar input{min-height:44px;font-family:inherit}
#traffic .traffic-explanation summary{min-height:44px;padding-block:12px}
#traffic summary:focus-visible{outline:3px solid #ffda87;outline-offset:3px}
#traffic .traffic-heading h2{font-family:Georgia,'Times New Roman',serif;letter-spacing:-.5px}
#traffic .traffic-live,#traffic .traffic-explanation summary{color:#e6c587}
#traffic{margin-bottom:max(90px,calc(env(safe-area-inset-bottom,0px) + 60px));box-shadow:inset 0 1px #ffe8bd0f,0 15px 40px #0003;color-scheme:dark}
#traffic .traffic-scroll{overscroll-behavior-x:contain}

/* The full game viewport stays intact; the statistics scroll naturally below it. */
html.has-visitor-stats,body.has-visitor-stats{height:auto;min-height:100dvh;overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:auto}
body[data-game-page].has-visitor-stats>.app-shell{flex:none;height:100dvh}

/* Leave the avatar's right-hand dock clear of chart and date controls. */
body.viewing-visitor-stats #traffic{padding-right:max(118px,calc(env(safe-area-inset-right,0px) + 118px));margin-bottom:max(166px,calc(env(safe-area-inset-bottom,0px) + 166px))}
body.viewing-visitor-stats .qb-avatar-launcher{width:100px;height:144px;min-height:44px;padding:0;bottom:max(9px,env(safe-area-inset-bottom,0px));right:max(9px,env(safe-area-inset-right,0px))}
body.viewing-visitor-stats .qb-avatar-launcher canvas{width:96px;height:144px}
body.viewing-visitor-stats .qb-avatar-launcher span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
/* More specificity keeps the game phone pan-arrow offset from moving this dock. */
body[data-game-page].viewing-visitor-stats .qb-avatar-launcher{right:max(9px,env(safe-area-inset-right,0px))}
@media(max-width:620px){body.viewing-visitor-stats #traffic{padding-right:max(98px,calc(env(safe-area-inset-right,0px) + 98px));margin-bottom:max(138px,calc(env(safe-area-inset-bottom,0px) + 138px))}body.viewing-visitor-stats .qb-avatar-launcher{width:80px;height:114px}body.viewing-visitor-stats .qb-avatar-launcher canvas{width:76px;height:114px}}
