/* Stock TTT dimensions and colours from Metapyziks/terrortown cl_hud.lua,
   cl_wepswitch.lua, cl_targetid.lua and vgui/sb_*.lua. */
:root{font-family:Tahoma,Arial,sans-serif;font-size:14px;color:#fff;background:#222;--role-bg:rgba(100,100,100,.784);--weapon-tip:rgb(55,170,50)}
*{box-sizing:border-box}body{margin:0;overflow:hidden}button,input,select{font:inherit}button{cursor:pointer}[hidden]{display:none!important}
#game{position:fixed;inset:0}#game canvas{display:block;width:100%;height:100%}
.ttt-hud{position:fixed;left:10px;bottom:10px;width:300px;height:74px;border:3px solid #393c39a8;border-radius:3px;background:rgba(0,0,0,.75);box-shadow:0 0 2px #000;pointer-events:none;font-family:'Trebuchet MS',Tahoma,sans-serif;text-shadow:1px 2px 2px #151515;user-select:none}
#role{position:absolute;left:0;top:0;width:100%;height:37px;padding-left:5px;background:var(--role-bg);font-size:30px;line-height:37px;font-weight:900;text-align:left}
#timerMode{position:absolute;right:5px;top:3px;font:700 9px/10px Tahoma,Arial,sans-serif}
#clock{position:absolute;right:5px;top:13px;font-size:22px;font-weight:800;line-height:22px;white-space:nowrap}
.meter{position:absolute;top:39px;height:27px;overflow:hidden;border-radius:1px}
.health-meter{left:0;width:59%;background:rgba(100,25,25,.55)}.ammo-meter{right:0;width:40%;background:rgba(20,20,5,.87)}
.meter-fill{height:100%;width:100%}.health-meter .meter-fill{background:rgba(200,50,50,.94)}.ammo-meter .meter-fill{background:rgb(175,135,0)}
.meter>span{position:absolute;right:8px;top:0;line-height:27px;font-size:22px;font-weight:800;white-space:nowrap}.meter b{font:inherit}
.ttt-hud.spectator{height:40px;width:350px;background:rgba(0,0,0,.78)}.spectator .meter{display:none}.spectator #role{background:none;font-size:27px;height:34px;line-height:34px}.spectator #clock{top:4px;font-size:26px;line-height:29px}

#crosshair{position:fixed;left:50%;top:50%;width:0;height:0;pointer-events:none;color:rgba(0,255,0,.85)}#crosshair i{position:absolute;display:block;background:currentColor}
#crosshair i:nth-child(1){width:7px;height:1px;left:-12px;top:0}#crosshair i:nth-child(2){width:7px;height:1px;left:6px;top:0}#crosshair i:nth-child(3){width:1px;height:7px;top:-12px;left:0}#crosshair i:nth-child(4){width:1px;height:7px;top:6px;left:0}
#targetRing{position:fixed;left:calc(50% - 30px);top:calc(50% - 30px);width:60px;height:60px;border:2px solid rgba(0,0,255,.85);border-radius:50%;pointer-events:none}
#target{position:fixed;left:50%;top:calc(50% + 30px);transform:translateX(-50%);text-align:center;text-shadow:1px 1px #000;pointer-events:none;white-space:nowrap;font-family:Tahoma,Arial,sans-serif}
#targetName{font-size:18px;font-weight:bold;line-height:21px}#targetHealth{font-size:16px;font-weight:900;margin-top:4px}#targetKarma,#targetTag{font-size:14px;margin-top:5px}#targetTag:empty,#targetKarma:empty{display:none}
#notice{position:fixed;right:10px;top:30px;max-width:min(430px,calc(100vw - 20px));padding:10px 13px;border-radius:8px;background:rgba(0,0,10,.8);font:700 18px/1.4 'Trebuchet MS',Tahoma,sans-serif;text-shadow:1px 1px #000;pointer-events:none}#notice:empty{display:none}
#feed{position:fixed;left:10px;bottom:146px;max-width:min(670px,calc(100vw - 20px));font:700 14px/1.4 Tahoma,Arial,sans-serif;text-shadow:1px 1px #000,-1px -1px #000;pointer-events:none}#feed>div{margin-top:3px;animation:chat-fade 12s forwards}@keyframes chat-fade{0%,85%{opacity:1}100%{opacity:0}}
#weaponSelector{position:fixed;right:16px;bottom:24px;width:309px;pointer-events:none;font-family:'Trebuchet MS',Tahoma,sans-serif}
.weapon-choice{height:28px;margin-top:2px;display:flex;align-items:center;gap:12px;background:rgba(20,20,20,.78);border-radius:8px;color:rgba(255,255,255,.4);font-size:18px;text-shadow:1px 1px #000;overflow:hidden;padding-right:7px}.weapon-choice.active{color:#fff;background:rgba(20,20,20,.98)}
.slot{display:flex;align-items:center;justify-content:center;align-self:stretch;width:24px;background:var(--weapon-tip);opacity:.6;font-size:22px}.active .slot{opacity:1}.weapon-ammo{margin-left:auto;font-size:16px}.weapon-choice.empty .weapon-ammo{color:#c81414}
#damage{position:fixed;inset:0;box-shadow:inset 0 0 100px rgba(200,0,0,.65);opacity:0;pointer-events:none}
.menu-backdrop{position:fixed;inset:0;display:grid;place-items:center;background:rgba(0,0,0,.18)}
.derma-window{background:linear-gradient(#666,#555);border:1px solid #151515;border-radius:5px 5px 2px 2px;box-shadow:0 3px 15px #0008;padding:0 5px 5px;font-size:13px;color:#eee}
.derma-title{height:25px;display:flex;align-items:center;justify-content:space-between;padding:0 4px;font:13px Tahoma,Arial,sans-serif;text-shadow:1px 1px #333}
.game-menu{width:470px;max-width:calc(100vw - 20px);max-height:calc(100vh - 20px);overflow:auto}.menu-content{padding:10px 12px 6px;background:#444;border:1px solid #333;display:flow-root}
.menu-logo{float:left;object-fit:contain;margin:-5px 15px -22px 0}.server-info{height:142px;display:flex;flex-direction:column;gap:9px;justify-content:center;font-size:14px}.server-info>b{font-size:20px;font-weight:400}.server-info>span{color:#d0d0d0}
fieldset{border:1px solid #777;border-radius:3px;padding:12px;clear:both;margin:6px 0 10px}legend{padding:0 5px;color:#eee;font-size:13px}label{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:4px 0 9px;font-size:14px}
input,select{height:26px;width:275px;max-width:73%;background:#eee;color:#111;border:1px solid #222;box-shadow:inset 1px 1px 2px #777;padding:3px 6px;border-radius:2px;font-size:13px}
button{border:1px solid #222;border-radius:3px;background:linear-gradient(#e2e2e2,#b8b8b8);color:#111;padding:4px 14px;min-height:25px;font:13px Tahoma,Arial,sans-serif;box-shadow:inset 0 1px #fff7}button:hover{background:linear-gradient(#edf6ff,#c2d5e4)}button:active{background:#aaa;box-shadow:inset 0 1px 3px #555}button:disabled{color:#777;background:#bbb;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:2px solid #94c9fa;outline-offset:2px}
#objective{font-size:14px;line-height:1.4;margin:12px 2px}.menu-actions{display:flex;justify-content:flex-end;gap:8px}#play{min-width:130px}details{margin-top:14px;font-size:13px;line-height:1.5}summary{cursor:pointer;color:#ddd}.menu-footer{border-top:1px solid #666;margin-top:13px;padding-top:7px;display:flex;justify-content:space-between;font-size:12px;color:#bbb}a{color:#b6d8f4}#roundResult{padding:10px;color:#f6df96;text-align:center;font:700 20px 'Trebuchet MS',sans-serif;clear:both}
#scoreboard{position:fixed;inset:0;pointer-events:none;font-family:'Trebuchet MS',Tahoma,sans-serif}
.score-panel{position:absolute;top:min(72px,8vh);left:50%;transform:translateX(-50%);width:max(60vw,640px);max-width:calc(100vw - 20px);padding:181px 8px 8px;max-height:92vh;overflow-y:auto;pointer-events:auto}
.score-background{position:absolute;inset:72px 0 0;border-radius:8px;background:rgba(30,30,30,.922);z-index:-2}.server-bar{position:absolute;top:97px;left:0;right:0;height:32px;border-radius:8px;background:rgb(220,180,0);z-index:-1}.score-logo{position:absolute;top:0;left:5px;width:256px;height:256px;pointer-events:none}
.server-caption{position:absolute;right:8px;top:77px;font:20px/22px Arial,sans-serif}.server-name{position:absolute;right:8px;left:185px;top:99px;height:30px;line-height:30px;font-family:Arial,sans-serif;font-size:24px;color:#000;text-align:right;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.map-info{position:absolute;right:8px;top:132px;font-size:14px;font-weight:700}
.score-head{position:absolute;left:8px;right:8px;top:162px;display:grid;grid-template-columns:1fr repeat(4,50px);font-size:14px;font-weight:700;text-align:center}
.score-group{background:rgba(20,20,20,.59);border-radius:8px;margin-bottom:5px;padding-top:24px;position:relative;overflow:hidden}.score-group-title{position:absolute;top:0;left:0;height:20px;padding:1px 12px;border-radius:8px;font-size:14px;font-weight:700;text-shadow:1px 1px #000;background:rgba(0,200,0,.392)}.score-group.missing .score-group-title{background:rgba(130,190,130,.392)}.score-group.dead .score-group-title{background:rgba(130,170,10,.392)}.score-group.spectators .score-group-title{background:rgba(200,200,0,.392)}
.score-row{display:grid;grid-template-columns:1fr repeat(4,50px);height:24px;margin-bottom:1px;align-items:center;font-size:14px;font-weight:700}.score-row:nth-of-type(even){background:rgba(75,75,75,.392)}.score-row.detective{background:rgba(0,0,255,.118)}.score-row.traitor{background:rgba(255,0,0,.118)}.score-row.self .score-player{color:#eee6ad}
.score-row>span{text-align:center;height:24px;line-height:24px}.score-row>span:nth-child(3),.score-row>span:nth-child(5){background:#0005}.score-player{display:flex;gap:8px;min-width:0;align-items:center}.score-player .avatar{width:24px;height:24px;background:linear-gradient(135deg,#63777e,#273438);border:1px solid #aaa4;flex-shrink:0;text-align:center;color:#ddd;font:12px/22px Tahoma,sans-serif}.score-player .nickname{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.score-tag{font:12px Tahoma;color:#aaa;margin-left:auto;padding-right:12px}.score-footer{display:block;text-align:right;font-size:12px;color:#bbb;margin-top:6px}
.body-search-layer{position:fixed;inset:0;display:grid;place-items:center;background:#0001}.search-window{width:410px;min-height:260px;max-width:calc(100vw - 20px)}.window-close{width:24px;min-height:18px;height:18px;padding:0;background:#944;border-color:#733;color:white;font:bold 16px/15px Arial}
.search-content{padding:8px 3px 4px}.search-tabs{height:70px;display:flex;gap:2px;background:#444;padding:3px}.search-tabs button{width:64px;height:64px;background:linear-gradient(#666,#454545);border:2px solid #888;color:#ddd;font:bold 14px 'Trebuchet MS',sans-serif;padding:0}.search-tabs button[aria-selected="true"]{border-color:#dbb400;background:#4a4a4a;color:#ffdc4f}.search-info{height:88px;margin:12px 8px 8px;padding:8px;background:#323232;display:flex;align-items:center;gap:14px}.search-info legend{font-size:12px}#evidenceBadge{width:50px;flex-shrink:0;text-align:center;font:bold 20px 'Trebuchet MS',sans-serif;color:#e1c45a}#evidenceText{font:13px/1.45 Tahoma,Arial,sans-serif;margin:0}.search-actions{display:flex;justify-content:space-between;align-items:center;padding:0 8px;font-size:12px;color:#ccc}.search-actions button{width:100px}
@media(max-width:650px){.server-caption{font-size:15px}.server-name{font-size:17px}.score-head,.score-row{grid-template-columns:1fr repeat(4,42px);font-size:12px}.score-tag{display:none}.server-info{font-size:12px}#weaponSelector{width:260px}.weapon-choice{font-size:16px}.score-logo{width:220px;height:220px}.score-panel{padding-top:181px}.score-footer{font-size:11px}}
@media(max-width:520px){#weaponSelector{bottom:145px;right:10px}.meter>span{font-size:24px}.menu-logo{width:130px;height:140px}.server-info{height:125px}.score-logo{width:180px;height:180px}.server-name{left:135px}.server-caption{font-size:13px}.map-info{font-size:12px}.score-head,.score-row{grid-template-columns:1fr repeat(4,36px);font-size:11px}.score-player{gap:4px}}
.search-tabs button img{display:block;width:60px;height:60px;object-fit:contain}.search-info{gap:16px}#evidenceBadge{display:block;width:64px;height:64px;object-fit:contain;flex-shrink:0}.score-player .avatar{font-size:9px}

.ttt-hud.melee:not(.spectator){height:74px}

#flashBlind{position:fixed;inset:0;background:#fff;opacity:0;pointer-events:none;z-index:18}
.menu-backdrop,#scoreboard,.body-search-layer{z-index:20}

/* Original TTT DFrame / DPropertySheet round report: 700 by 500. */
.round-report-layer{position:fixed;inset:0;display:grid;place-items:center;pointer-events:none;z-index:30}
.report-window{width:700px;height:500px;max-width:calc(100vw - 24px);max-height:calc(100vh - 24px);display:flex;flex-direction:column;padding:0 14px 7px;pointer-events:auto;background:#666;border:1px solid #3b4040;border-radius:3px;box-shadow:0 2px 12px #0008;font:13px Tahoma,Arial,sans-serif}
.report-window>.derma-title{height:28px;flex-shrink:0;margin:0 -10px;color:#ccc}
.report-x{height:18px;min-height:18px;width:28px;padding:0;border-radius:0;font:bold 16px/15px Arial;color:#555;background:#ddd}
.report-sheet{flex:1;min-height:0;display:flex;flex-direction:column}
.report-tabs{display:flex;align-items:flex-end;height:26px;flex-shrink:0;padding-left:4px;gap:1px}
.report-tabs button{display:flex;align-items:center;gap:4px;min-height:23px;height:23px;padding:3px 7px;border:1px solid #777;border-bottom:0;border-radius:4px 4px 0 0;color:#d4d4d4;background:linear-gradient(#838383,#737373);box-shadow:none;position:relative;font:13px Tahoma,Arial,sans-serif}
.report-tabs button[aria-selected="true"]{height:26px;color:white;background:#999;border-color:#aaa;z-index:1;box-shadow:0 2px #999}
.report-tabs button img{image-rendering:auto;flex-shrink:0}
.report-pages{flex:1;min-height:0;padding:6px;background:#999;border:1px solid #aaa;box-shadow:inset -1px -1px #666}
.report-page{height:100%;overflow:auto;background:#323232;border:1px solid #444;box-shadow:inset 1px 1px #111}
.report-highlights{padding:25px 13px 14px;text-align:center;color:#ddd}
.report-winner{display:inline-block;max-width:100%;white-space:nowrap;padding:5px 12px 7px;background:rgb(190,5,5);border-radius:8px;color:#fff;font:900 clamp(24px,8vw,60px)/1.08 'Trebuchet MS',Arial,sans-serif;letter-spacing:-1.1px;text-shadow:1px 1px 2px #0006}
.report-winner.innocent{background:rgb(5,190,5)}
.report-summary{display:flex;justify-content:space-between;gap:8px;text-align:left;margin:6px 12px 0;font-size:12px;color:#ddd;line-height:16px}.report-summary>span:last-child{text-align:right;white-space:nowrap}
.report-awards{padding:17px 10px 0;display:flex;flex-direction:column;gap:12px}.report-award-title{font:700 13px/16px 'Trebuchet MS',Tahoma,sans-serif;text-transform:uppercase;margin:0 0 2px}.report-award-text{margin:0;font:13px/16px Tahoma,Arial,sans-serif}.report-award-text strong{font-weight:700}.report-no-highlights{font-size:13px;color:#bbb;margin:25px 0}
.report-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;height:33px;flex-shrink:0;padding-top:7px}.report-footer button{min-width:100px;height:25px;padding:3px 9px}.report-footer span{font-size:12px;color:#eee;text-align:center;font-variant-numeric:tabular-nums}
.report-list{background:#eee;box-shadow:none;color:#151515}.report-list table{border-collapse:separate;border-spacing:0;width:100%;font:12px/18px Tahoma,Arial,sans-serif}.report-list th{position:sticky;top:0;background:linear-gradient(#ededed,#c2c2c2);border-right:1px solid #999;border-bottom:1px solid #888;padding:2px 5px;font-weight:400;text-align:left;z-index:1}.report-list td{height:22px;padding:2px 5px;border-bottom:1px solid #ddd;vertical-align:middle}.report-list tbody tr:nth-child(even){background:#e1e1e1}.report-list tbody tr:hover{background:#ccdbea}.report-list img{width:16px;height:16px;vertical-align:middle}.report-events-table th:first-child{width:44px}.report-events-table th:nth-child(2){width:24px}.report-events-table td:first-child{font-variant-numeric:tabular-nums}.report-events-table td:last-child{white-space:normal}.report-scores-table{min-width:610px}.report-scores-table td,.report-scores-table th{text-align:center}.report-scores-table th:first-child{width:22px}.report-scores-table th:nth-child(2){width:125px}.report-scores-table button{font:inherit;border:0;box-shadow:none;background:none;min-height:20px;padding:0;white-space:normal;color:#111}.report-scores-table .report-dead{display:block;width:18px;height:18px;background:#963232;margin:auto}.report-scores-table .report-dead img{width:18px;height:18px}.report-scores-table .report-traitor{color:#9d0000}.report-scores-table .report-detective{color:#15379c}.report-scores-table .report-self{font-weight:bold}
#intermission{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);z-index:21;display:flex;align-items:center;gap:14px;background:rgba(0,0,10,.8);border-radius:8px;padding:9px 12px;white-space:nowrap;font:700 16px 'Trebuchet MS',Tahoma,sans-serif}#intermission button{font-size:12px}#capturePrompt{position:fixed;inset:0;display:grid;place-items:center;pointer-events:none;z-index:22}#capturePlay{pointer-events:auto;padding:12px 22px;font-size:16px;box-shadow:0 2px 18px #0009}
@media(max-width:600px){.report-window{padding:0 8px 7px}.report-highlights{padding:20px 5px 12px}.report-winner{font-size:clamp(20px,7.6vw,44px);letter-spacing:-.6px;padding:6px 8px}.report-summary{flex-direction:column;align-items:center;gap:0;margin:7px 0 0;text-align:center}.report-awards{padding:14px 2px 0;gap:12px}.report-footer button{min-width:78px;font-size:12px}.report-footer span{font-size:11px}#intermission{gap:8px;font-size:13px}}

#performanceStats{position:fixed;right:calc(14px + var(--safe-right,0px));top:calc(14px + var(--safe-top,0px));z-index:12;pointer-events:none;font:14px Tahoma,Arial,sans-serif;color:#fff;text-shadow:0 1px 3px #000;background:#0007;padding:5px 8px;border-radius:3px}.graphics-option{display:flex;align-items:center;gap:12px;margin:14px 0;font:14px Tahoma,Arial,sans-serif}.graphics-option select{background:#363636;color:#eee;border:1px solid #888;padding:8px;min-height:40px}.touch-ui #performanceStats{top:calc(62px + var(--safe-top,0px));font-size:14px}
