:root {
  --bg: #0d1520;
  --panel: rgba(14, 22, 34, 0.92);
  --panel2: rgba(22, 33, 50, 0.95);
  --line: rgba(255, 255, 255, 0.09);
  --line2: rgba(255, 255, 255, 0.16);
  --text: #eef3f8;
  --muted: #9fb0c3;
  --red: #e5383b;
  --red2: #ff5a5f;
  --yellow: #f4c430;
  --green: #3fbf6f;
  --blue: #3d8bfd;
  --teal: #2ec4b6;
  --orange: #ff9f43;
  --purple: #a78bfa;
  --radius: 14px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  --font: 'Rubik', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; -webkit-font-smoothing: antialiased; user-select: none; }
button, input, select { font-family: inherit; font-size: inherit; color: inherit; }
#app { position: fixed; inset: 0; }
#world { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
#ui { position: absolute; inset: 0; pointer-events: none; }
#ui > * { pointer-events: auto; }
.hidden { display: none !important; }

/* ---------- loading ---------- */
#loading { position: fixed; inset: 0; background: radial-gradient(circle at 50% 40%, #182a40, #070c13 70%); display: flex; align-items: center; justify-content: center; z-index: 100; transition: opacity .6s; }
#loading.done { opacity: 0; pointer-events: none; }
.load-box { text-align: center; }
.logo-mark { width: 74px; height: 74px; margin: 0 auto 14px; border-radius: 20px; background: var(--red); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 40px rgba(229,56,59,.55); }
.logo-mark span { font-size: 58px; font-weight: 800; color: #fff; line-height: 1; margin-top: -6px; }
.load-title { font-size: 34px; font-weight: 800; letter-spacing: 6px; }
.ecg-line svg { width: 300px; height: 60px; }
.ecg-line path { fill: none; stroke: var(--teal); stroke-width: 3; stroke-dasharray: 420; stroke-dashoffset: 420; animation: ecgdraw 1.6s linear infinite; filter: drop-shadow(0 0 6px var(--teal)); }
@keyframes ecgdraw { to { stroke-dashoffset: 0; } }
#loadText { color: var(--muted); }

/* ---------- generic ---------- */
.btn { border: 0; border-radius: 11px; padding: 11px 18px; font-weight: 600; cursor: pointer; background: #24364f; color: var(--text); transition: transform .08s, background .15s, box-shadow .15s; display: inline-flex; align-items: center; gap: 8px; justify-content: center; }
.btn:hover { background: #2f4566; }
.btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(180deg, #ff5257, #d42a2e); box-shadow: 0 6px 18px rgba(229,56,59,.35); }
.btn.primary:hover { background: linear-gradient(180deg, #ff6a6e, #e0393d); }
.btn.teal { background: linear-gradient(180deg, #34d3c4, #1fa497); color: #04211e; }
.btn.ghost { background: transparent; border: 1px solid var(--line2); }
.btn.small { padding: 7px 11px; font-size: 13px; border-radius: 9px; }
.btn.tiny { padding: 4px 9px; font-size: 12px; border-radius: 8px; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.input { background: rgba(255,255,255,.06); border: 1px solid var(--line2); border-radius: 11px; padding: 11px 14px; outline: none; width: 100%; user-select: text; }
.input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(46,196,182,.2); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(10px); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgba(255,255,255,.08); }
.tri-kirmizi { background: var(--red) !important; color: #fff; }
.tri-sari { background: var(--yellow) !important; color: #2a2100; }
.tri-yesil { background: var(--green) !important; color: #032010; }
.tri-poli { background: #8fb3d9 !important; color: #0b1a2a; }
.muted { color: var(--muted); }
.kbd { display: inline-block; min-width: 22px; padding: 1px 6px; border-radius: 6px; background: #e9eef5; color: #101820; font-weight: 700; font-size: 12px; text-align: center; box-shadow: 0 2px 0 #9aa7b5; margin: 0 2px; }
.scroll { overflow-y: auto; }
.scroll::-webkit-scrollbar { width: 8px; }
.scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 8px; }

/* ---------- menu ---------- */
.screen { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at 30% 20%, rgba(28,52,82,.75), rgba(5,10,16,.92) 70%); }
.menu-wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 26px; width: min(1060px, 94vw); align-items: stretch; }
.hero { padding: 34px; display: flex; flex-direction: column; justify-content: center; }
.hero h1 { font-size: 64px; margin: 6px 0 0; letter-spacing: 3px; font-weight: 800; line-height: 1; }
.hero h1 b { color: var(--red2); }
.hero .sub { font-size: 20px; color: var(--teal); font-weight: 600; letter-spacing: 6px; margin-top: 6px; }
.hero p { color: var(--muted); line-height: 1.6; max-width: 480px; }
.hero .roles-mini { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.menu-card { padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.menu-card h3 { margin: 0 0 4px; font-size: 18px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.sep { height: 1px; background: var(--line); margin: 4px 0; }
.howto { font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.howto b { color: var(--text); }

/* ---------- lobby ---------- */
.lobby { width: min(1180px, 96vw); max-height: 94vh; padding: 26px; display: flex; flex-direction: column; gap: 18px; }
.lobby-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.room-code { font-family: var(--mono); font-size: 34px; letter-spacing: 8px; font-weight: 700; color: var(--yellow); background: rgba(244,196,48,.08); border: 1px dashed rgba(244,196,48,.4); padding: 4px 16px; border-radius: 12px; cursor: pointer; }
.role-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.role-card { border-radius: 14px; padding: 16px; background: rgba(255,255,255,.04); border: 2px solid var(--line); cursor: pointer; transition: all .15s; display: flex; flex-direction: column; gap: 8px; position: relative; min-height: 220px; }
.role-card:hover { border-color: var(--line2); transform: translateY(-2px); }
.role-card.mine { border-color: var(--teal); background: rgba(46,196,182,.08); }
.role-card .ricon { font-size: 34px; }
.role-card .rname { font-size: 19px; font-weight: 700; }
.role-card .rtitle { font-size: 12px; color: var(--teal); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.role-card .rdesc { font-size: 12.5px; color: var(--muted); line-height: 1.45; flex: 1; }
.role-card .who { display: flex; gap: 6px; flex-wrap: wrap; min-height: 26px; }
.chip { padding: 3px 9px; border-radius: 8px; font-size: 12px; font-weight: 600; color: #0b1118; }
.lobby-bottom { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; }
.lobby-box { padding: 14px 16px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.seg { display: inline-flex; border-radius: 10px; overflow: hidden; border: 1px solid var(--line2); }
.seg button { border: 0; background: transparent; padding: 7px 14px; cursor: pointer; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--teal); color: #04211e; }
.seg button:disabled { cursor: default; }
.chatbox { height: 120px; font-size: 13px; display: flex; flex-direction: column; gap: 3px; }

/* ---------- intro ---------- */
.intro { width: min(820px, 92vw); padding: 36px 40px; text-align: left; }
.intro h2 { margin: 0 0 18px; font-size: 30px; }
.intro .lines p { font-size: 18px; line-height: 1.6; margin: 0 0 12px; opacity: 0; transform: translateY(6px); transition: all .6s; }
.intro .lines p.show { opacity: 1; transform: none; }

/* ---------- HUD ---------- */
.topbar { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; align-items: stretch; pointer-events: none; }
.tb { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 5px 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 64px; box-shadow: var(--shadow); }
.tb.gear { pointer-events: auto; cursor: pointer; font-size: 20px; min-width: 44px; }
.tb.gear:hover { border-color: var(--teal); }
.tb.extra { font-weight: 700; font-size: 13px; color: #ffd166; white-space: nowrap; }
.tb .k { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 1.2px; font-weight: 600; }
.tb .v { font-size: 17px; font-weight: 700; font-family: var(--mono); white-space: nowrap; }
.tb.role { flex-direction: row; gap: 10px; }
.tb.role .ri { font-size: 24px; }
.tb.role .rn { font-weight: 700; font-size: 15px; text-align: left; }
.tb.role .rs { font-size: 11px; color: var(--muted); }
.hearts { letter-spacing: 2px; }

.tracker { position: absolute; top: 12px; right: 12px; width: 220px; display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 200px); overflow-y: auto; padding-right: 2px; pointer-events: auto; }
.pcard { background: var(--panel); border: 1px solid var(--line); border-left: 5px solid #556; border-radius: 10px; padding: 6px 9px; cursor: pointer; transition: transform .1s, border-color .15s; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.pcard:hover { transform: translateX(-3px); border-color: var(--line2); }
.pcard.kirmizi { border-left-color: var(--red); }
.pcard.sari { border-left-color: var(--yellow); }
.pcard.yesil { border-left-color: var(--green); }
.pcard.crit { animation: critpulse 1s infinite; }
.pcard.arrest { background: rgba(110,16,22,.92); animation: critpulse 1.6s infinite; }
.pcard.leaving { opacity: .55; }
.pcard .icons { margin: 0 0 0 auto; font-size: 13px; flex-wrap: nowrap; white-space: nowrap; }
.pcard .bar { margin-top: 5px; height: 5px; }
@keyframes critpulse { 50% { box-shadow: 0 0 0 3px rgba(229,56,59,.6), 0 6px 20px rgba(0,0,0,.35); } }
.pcard .top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.pcard .nm { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard .bedno { font-size: 11px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.pcard .st { font-size: 11.5px; color: var(--muted); margin-top: 3px; display: flex; gap: 6px; flex-wrap: wrap; }
.bar { height: 7px; border-radius: 6px; background: rgba(255,255,255,.1); overflow: hidden; margin-top: 6px; }
.bar > i { display: block; height: 100%; border-radius: 6px; background: var(--green); transition: width .3s, background .3s; }
.icons { display: flex; gap: 4px; margin-top: 5px; flex-wrap: wrap; }
.ic { font-size: 11px; padding: 1px 6px; border-radius: 6px; background: rgba(255,255,255,.09); font-weight: 600; }
.ic.me { background: var(--teal); color: #04211e; }
.ic.warn { background: var(--orange); color: #2b1600; }
.ic.ok { background: var(--green); color: #032010; }

.prompt { position: absolute; bottom: 92px; left: 50%; transform: translateX(-50%); background: var(--panel); border: 1px solid var(--line2); border-radius: 12px; padding: 9px 16px; font-weight: 600; box-shadow: var(--shadow); white-space: nowrap; pointer-events: none; }
.holdbox { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 9px 14px; box-shadow: var(--shadow); pointer-events: none; }
.holdbox .hi { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; background: rgba(255,255,255,.07); }
.holdbox .keys { font-size: 12px; color: var(--muted); }
.hintbox { position: absolute; left: 50%; transform: translateX(-50%); bottom: 172px; width: min(460px, 90vw); z-index: 6; display: flex; gap: 12px; padding: 12px 14px; background: linear-gradient(135deg, rgba(20,70,66,.95), rgba(14,30,44,.95)); border: 1px solid rgba(46,196,182,.45); border-radius: 14px; box-shadow: var(--shadow); animation: slidein .4s; }
.hintbox .av { width: 46px; height: 46px; border-radius: 50%; background: #e9f7f5; color: #0b4f49; display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }
.hintbox .who { font-weight: 700; color: var(--teal); font-size: 13px; }
.hintbox .tx { font-size: 13.5px; line-height: 1.45; }
.hintbox .x { position: absolute; top: 6px; right: 10px; cursor: pointer; color: var(--muted); }
@keyframes slidein { from { opacity: 0; } }
.toasts { position: absolute; top: 74px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; width: 640px; }
.toast { background: var(--panel); border: 1px solid var(--line2); border-radius: 11px; padding: 6px 12px; font-size: 13px; font-weight: 500; box-shadow: var(--shadow); animation: toastin .3s; max-width: 640px; text-align: center; }
.toast.good { border-color: rgba(63,191,111,.6); background: rgba(16,50,30,.94); }
.toast.warn { border-color: rgba(255,159,67,.6); background: rgba(60,36,10,.94); }
.toast.danger { border-color: rgba(229,56,59,.7); background: rgba(70,12,16,.95); }
@keyframes toastin { from { transform: translateY(-10px); opacity: 0; } }
.banner { position: absolute; top: 30%; left: 50%; transform: translate(-50%, -50%); font-size: 28px; font-weight: 800; text-align: center; padding: 14px 28px; background: rgba(120,14,18,.92); border: 2px solid var(--red2); border-radius: 16px; box-shadow: 0 0 60px rgba(229,56,59,.5); animation: bannerin .5s; pointer-events: none; max-width: 80vw; }
.banner.blue { background: rgba(16,40,110,.94); border-color: #6ea8ff; box-shadow: 0 0 60px rgba(61,139,253,.5); }
.banner.green { background: rgba(14,80,40,.94); border-color: var(--green); box-shadow: 0 0 60px rgba(63,191,111,.5); }
@keyframes bannerin { from { transform: translate(-50%, -50%) scale(.7); opacity: 0; } }
/* KOD MAVİ: göz yormayan, yavaş ve hafif kenar ışığı + tıklanabilir rozet */
.codeblue { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 90px 12px rgba(50,100,255,.28); animation: cbglow 2.4s ease-in-out infinite; }
@keyframes cbglow { 50% { box-shadow: inset 0 0 110px 18px rgba(50,100,255,.42); } }
@keyframes cbflash { 50% { opacity: .55; } }
.cb-badge { position: absolute; top: 64px; left: 50%; transform: translateX(-50%); background: rgba(20,44,120,.95); border: 1px solid #6ea8ff; color: #fff; font-weight: 800; padding: 6px 14px; border-radius: 10px; cursor: pointer; pointer-events: auto; z-index: 5; box-shadow: var(--shadow); }
body.calm .codeblue, body.calm .pcard.crit, body.calm .pcard.arrest, body.calm .clearwarn { animation: none !important; }
body.calm .codeblue { box-shadow: inset 0 0 70px 8px rgba(50,100,255,.25); }
.clearwarn { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 56px; font-weight: 900; color: #fff; background: rgba(255,200,0,.18); text-shadow: 0 0 30px #000; pointer-events: none; animation: cbflash .4s infinite; z-index: 50; }
.chat { position: absolute; left: 12px; bottom: 12px; width: 380px; pointer-events: none; }
.chat .log { display: flex; flex-direction: column; gap: 2px; font-size: 13px; margin-bottom: 6px; text-shadow: 0 1px 3px #000; max-height: 120px; overflow: hidden; justify-content: flex-end; }
.chat .log div { background: rgba(0,0,0,.35); padding: 2px 8px; border-radius: 6px; align-self: flex-start; }
.chat input { pointer-events: auto; }
.keyhelp { position: absolute; right: 12px; bottom: 12px; font-size: 11.5px; color: var(--muted); text-align: right; line-height: 1.8; pointer-events: none; max-width: 46vw; background: rgba(0,0,0,.25); padding: 6px 10px; border-radius: 10px; }
.radioreport { position: absolute; top: 84px; right: 244px; width: 330px; padding: 12px 14px; background: rgba(60,20,10,.94); border: 1px solid var(--orange); border-radius: 12px; font-size: 13px; line-height: 1.45; box-shadow: var(--shadow); animation: slidein .4s; }
.radioreport b { color: var(--orange); }

/* world labels */
.wl { position: absolute; transform: translate(-50%, -100%); white-space: nowrap; pointer-events: none; text-align: center; }
.wl .nm { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 7px; background: rgba(10,16,24,.78); display: inline-block; }
.wl .pb { width: 58px; height: 5px; border-radius: 4px; background: rgba(0,0,0,.55); margin: 3px auto 0; overflow: hidden; border: 1px solid rgba(255,255,255,.2); }
.wl .pb i { display: block; height: 100%; background: var(--green); }
.wl .ics { font-size: 13px; margin-top: 1px; text-shadow: 0 1px 3px #000; }
.wl .bubble { background: #fff; color: #17202a; font-size: 12px; font-weight: 500; padding: 5px 9px; border-radius: 11px; max-width: 210px; width: max-content; line-height: 1.35; white-space: normal; margin-bottom: 4px; box-shadow: 0 4px 14px rgba(0,0,0,.4); position: relative; display: inline-block; text-align: left; }
.wl .bubble:after { content: ''; position: absolute; bottom: -7px; left: 50%; margin-left: -7px; border: 7px solid transparent; border-top-color: #fff; border-bottom: 0; }
.wl.player .nm { border: 2px solid; }
.wl.score { font-size: 18px; font-weight: 800; text-shadow: 0 2px 6px #000; animation: floatup 1.6s forwards; }
@keyframes floatup { to { transform: translate(-50%, -260%); opacity: 0; } }
.wl.station .nm { background: rgba(255,255,255,.8); color: #12202e; font-size: 10px; letter-spacing: .4px; }
.wl.npc .nm { background: rgba(60,40,6,.9); border: 1px solid #ffd166; color: #fff; }
.wl.npc .kbd { padding: 0 4px; font-size: 10px; }
.wl.ping { font-size: 26px; animation: pingb 1.2s 3; }
@keyframes pingb { 50% { transform: translate(-50%, -130%); } }
.wl .ring { width: 90px; height: 6px; background: rgba(0,0,0,.6); border-radius: 4px; overflow: hidden; }
.wl .ring i { display: block; height: 100%; background: var(--teal); }

/* ---------- patient panel ---------- */
.ppanel { position: absolute; left: 12px; top: 12px; bottom: 12px; width: 500px; display: flex; flex-direction: column; overflow: hidden; animation: slidein .25s; }
.pp-head { padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.pp-head .t1 { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pp-head .nm { font-size: 19px; font-weight: 700; }
.pp-head .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.pp-close { cursor: pointer; font-size: 22px; color: var(--muted); padding: 0 4px; }
.vitals { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 10px; }
.vital { background: #070c12; border-radius: 9px; padding: 5px 6px; text-align: center; border: 1px solid #1d2a38; }
.vital .k { font-size: 10px; color: #7f93a8; font-weight: 600; }
.vital .v { font-family: var(--mono); font-size: 17px; font-weight: 700; }
.vital.hr .v { color: #4cff8a; } .vital.bp .v { color: #ff6b6b; font-size: 14px; } .vital.spo2 .v { color: #5ad8ff; } .vital.rr .v { color: #ffd34c; } .vital.t .v { color: #f0f0f0; } .vital.rh .v { color: #c7a6ff; font-size: 13px; }
.tabs { display: flex; gap: 4px; padding: 8px 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tab { padding: 8px 12px; border-radius: 9px 9px 0 0; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); position: relative; }
.tab.on { background: rgba(255,255,255,.07); color: var(--text); }
.tab .dot { position: absolute; top: 5px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--red2); }
.pp-body { flex: 1; overflow-y: auto; padding: 12px 14px 16px; }
.sec-t { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); margin: 12px 0 7px; }
.sec-t:first-child { margin-top: 0; }
.task { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 11px; background: rgba(255,255,255,.04); border: 1px solid var(--line); margin-bottom: 6px; }
.task.mine { border-color: rgba(46,196,182,.5); background: rgba(46,196,182,.07); }
.task.done { opacity: .55; }
.task .ti { font-size: 19px; width: 26px; text-align: center; }
.task .tl { flex: 1; min-width: 0; }
.task .tn { font-weight: 600; font-size: 13.5px; }
.task .tm { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.task .tm.bad { color: #ffb38a; }
.q-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.qbtn { text-align: left; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid var(--line); cursor: pointer; font-size: 12.5px; font-weight: 500; }
.qbtn:hover { border-color: var(--teal); }
.qbtn.asked { opacity: .45; }
.qa { margin-bottom: 8px; }
.qa .q { font-size: 12px; color: var(--teal); font-weight: 600; }
.qa .a { font-size: 13.5px; background: rgba(255,255,255,.06); padding: 7px 10px; border-radius: 10px; margin-top: 3px; line-height: 1.45; }
.finding { padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.05); margin-bottom: 6px; font-size: 13px; line-height: 1.45; }
.finding b { color: var(--teal); display: block; font-size: 12px; margin-bottom: 2px; }
.chk { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 9px; cursor: pointer; font-size: 13px; }
.chk:hover { background: rgba(255,255,255,.05); }
.chk input { width: 17px; height: 17px; accent-color: var(--teal); }
.chk.dis { opacity: .5; cursor: default; }
.result { border: 1px solid var(--line); border-radius: 11px; padding: 9px 10px; margin-bottom: 8px; background: rgba(255,255,255,.03); }
.result .rt { font-weight: 700; font-size: 13px; display: flex; justify-content: space-between; }
.result table { width: 100%; border-collapse: collapse; margin-top: 5px; font-size: 13px; }
.result td { padding: 3px 4px; border-bottom: 1px solid var(--line); }
.result td.v { font-family: var(--mono); font-weight: 700; text-align: right; }
.result td.u { color: var(--muted); font-size: 11.5px; width: 60px; }
.result img, .result canvas { width: 100%; border-radius: 8px; margin-top: 6px; display: block; background: #000; cursor: zoom-in; }
.dx-list { max-height: 300px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.dx-item { padding: 7px 9px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.dx-item:hover { background: rgba(255,255,255,.06); }
.dx-item.sel { background: var(--teal); color: #04211e; font-weight: 600; }
.dx-grp { font-size: 11px; color: var(--muted); font-weight: 700; padding: 6px 9px 2px; text-transform: uppercase; }
.dispo { display: flex; flex-direction: column; gap: 6px; }
.acls { border: 2px solid var(--red); border-radius: 12px; padding: 10px 12px; background: rgba(90,10,14,.5); margin-bottom: 10px; }
.acls .big { font-size: 22px; font-weight: 800; color: #ff8a8a; }
.oxbar { height: 10px; border-radius: 6px; background: rgba(0,0,0,.4); overflow: hidden; margin: 6px 0; }
.oxbar i { display: block; height: 100%; background: linear-gradient(90deg, #ff3b3b, #ffd34c, #4cff8a); }
.tray { display: flex; gap: 6px; flex-wrap: wrap; }
.tray .it { padding: 5px 9px; border-radius: 9px; background: rgba(255,255,255,.07); font-size: 12.5px; display: flex; gap: 6px; align-items: center; }

/* ---------- station menus ---------- */
.modal-back { position: absolute; inset: 0; background: rgba(3,7,12,.7); display: flex; align-items: center; justify-content: center; animation: fadein .15s; }
@keyframes fadein { from { opacity: 0; } }
.modal { width: min(820px, 94vw); max-height: 88vh; background: rgba(12,19,28,.97); display: flex; flex-direction: column; overflow: hidden; }
.modal-h { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.modal-h h3 { margin: 0; font-size: 20px; }
.modal-b { padding: 14px 18px 18px; overflow-y: auto; }
.item-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.item-card { padding: 11px 12px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line); cursor: pointer; display: flex; gap: 10px; align-items: center; transition: all .12s; }
.item-card:hover { border-color: var(--teal); transform: translateY(-1px); }
.item-card .sw { width: 30px; height: 40px; border-radius: 7px; flex-shrink: 0; border: 2px solid rgba(255,255,255,.3); }
.item-card .in { font-weight: 700; font-size: 13.5px; }
.item-card .il { font-size: 11.5px; color: var(--muted); line-height: 1.3; margin-top: 2px; }
.item-card.need { border-color: rgba(255,159,67,.8); box-shadow: 0 0 0 1px rgba(255,159,67,.5); }
.need-tag { font-size: 10px; background: var(--orange); color: #2b1600; padding: 1px 6px; border-radius: 6px; font-weight: 700; margin-left: 4px; }
.draw { display: grid; grid-template-columns: 1fr 1.2fr; gap: 20px; align-items: center; }
.draw .amp { text-align: center; }
.syringe-ui { position: relative; height: 90px; margin: 10px 0; }
.syringe-ui svg { width: 100%; height: 100%; }
.volread { font-family: var(--mono); font-size: 34px; font-weight: 700; text-align: center; }

/* ---------- guide ---------- */
.guide { position: absolute; inset: 24px 24px 24px 24px; background: rgba(11,18,27,.985); display: grid; grid-template-columns: 250px 1fr; overflow: hidden; }
.guide .side { border-right: 1px solid var(--line); padding: 14px; overflow-y: auto; background: rgba(0,0,0,.18); }
.guide .side .gi { padding: 8px 10px; border-radius: 9px; cursor: pointer; font-size: 13.5px; font-weight: 500; margin-bottom: 2px; }
.guide .side .gi:hover { background: rgba(255,255,255,.05); }
.guide .side .gi.on { background: var(--teal); color: #04211e; font-weight: 700; }
.guide .side .gh { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; margin: 12px 0 6px 4px; }
.guide .main { padding: 22px 28px; overflow-y: auto; font-size: 14.5px; line-height: 1.6; user-select: text; }
.guide .main h2 { margin: 0 0 6px; font-size: 26px; }
.guide .main h3 { margin: 18px 0 6px; color: var(--teal); font-size: 16px; }
.guide .main .box { border-radius: 12px; padding: 12px 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line); margin: 10px 0; }
.guide .main .warn { background: rgba(229,56,59,.1); border-color: rgba(229,56,59,.45); }
.guide .main table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.guide .main th, .guide .main td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.guide .main th { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.guide .main canvas { width: 100%; max-width: 620px; border-radius: 10px; display: block; margin: 8px 0; }
.guide .main ol, .guide .main ul { padding-left: 22px; }
.guide .search { margin-bottom: 10px; }
.olink { color: var(--teal); cursor: pointer; text-decoration: underline; }

/* ---------- minigame ---------- */
.mg { position: absolute; inset: 0; background: #0a1018; z-index: 20; }
.mg canvas.stage { position: absolute; inset: 0; width: 100%; height: 100%; }
.mg-top { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: 92%; }
.mg-title { font-size: 15px; font-weight: 700; padding: 6px 14px; border-radius: 10px; background: rgba(0,0,0,.55); }
.mg-steps { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.mg-steps span { font-size: 12px; padding: 4px 10px; border-radius: 8px; background: rgba(0,0,0,.45); color: var(--muted); font-weight: 600; }
.mg-steps span.on { background: var(--teal); color: #04211e; }
.mg-steps span.ok { background: rgba(63,191,111,.85); color: #032010; }
.mg-instr { font-size: 22px; font-weight: 700; text-align: center; text-shadow: 0 2px 10px #000; padding: 8px 18px; background: rgba(0,0,0,.4); border-radius: 12px; max-width: 900px; }
.mg-sub { font-size: 14px; color: #cfe2f2; text-shadow: 0 1px 6px #000; text-align: center; max-width: 820px; }
.mg-bottom { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.mg-close { position: absolute; top: 14px; right: 16px; }
.mg-fb { position: absolute; top: 46%; left: 50%; transform: translate(-50%, -50%); font-size: 30px; font-weight: 800; text-shadow: 0 2px 14px #000; pointer-events: none; animation: fbpop 1.1s forwards; text-align: center; }
.mg-fb.good { color: #6dff9e; } .mg-fb.bad { color: #ff7070; } .mg-fb.info { color: #fff; }
@keyframes fbpop { 0% { transform: translate(-50%, -50%) scale(.6); opacity: 0; } 15% { transform: translate(-50%, -50%) scale(1.08); opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -70%); } }
.meter { width: 420px; height: 20px; background: rgba(0,0,0,.55); border-radius: 10px; overflow: hidden; position: relative; border: 1px solid rgba(255,255,255,.2); }
.meter i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--teal); }
.meter .zone { position: absolute; top: 0; bottom: 0; background: rgba(63,191,111,.35); border-left: 2px solid #4cff8a; border-right: 2px solid #4cff8a; }
.meter .needle { position: absolute; top: -3px; bottom: -3px; width: 4px; background: #fff; border-radius: 2px; box-shadow: 0 0 8px #fff; }
.mg-panel { background: rgba(10,16,24,.88); border: 1px solid var(--line2); border-radius: 14px; padding: 12px 16px; }
.dial { width: 220px; height: 120px; }
.mg-choices { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; max-width: 900px; }
.mg-choices .btn { min-width: 150px; }
.tubes { display: flex; gap: 14px; }
.tube { width: 42px; height: 120px; border-radius: 8px 8px 20px 20px; border: 2px solid rgba(255,255,255,.5); background: rgba(255,255,255,.08); position: relative; cursor: pointer; overflow: hidden; }
.tube .cap { position: absolute; top: 0; left: 0; right: 0; height: 26px; }
.tube .fill { position: absolute; bottom: 0; left: 0; right: 0; background: #a3121a; transition: height .6s; }
.tube .lbl { position: absolute; bottom: -22px; font-size: 10px; width: 80px; left: -19px; text-align: center; color: var(--muted); }
.chips { display: flex; gap: 10px; }
.echip { padding: 8px 12px; border-radius: 10px; font-weight: 700; cursor: pointer; border: 3px solid transparent; font-size: 13px; }
.echip.sel { border-color: #fff; transform: scale(1.06); }
.echip.used { opacity: .25; pointer-events: none; }
.defib-panel { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; width: 760px; }
.defib-screen { background: #000; border-radius: 10px; border: 3px solid #333; padding: 8px; }
.defib-screen canvas { width: 100%; height: 150px; display: block; }
.defib-btns { display: flex; flex-direction: column; gap: 8px; }
.energy { display: flex; gap: 6px; }
.energy button { flex: 1; }
.energy button.on { background: var(--yellow); color: #2a2100; }
.shockbtn { background: linear-gradient(180deg, #ff5257, #b3161a); font-size: 22px; padding: 16px; }
.shockbtn.armed { animation: armpulse .5s infinite; }
@keyframes armpulse { 50% { box-shadow: 0 0 0 6px rgba(255,80,80,.5); } }
.cpr-hud { display: grid; grid-template-columns: repeat(4, auto); gap: 18px; align-items: center; }
.cpr-hud .big { font-family: var(--mono); font-size: 40px; font-weight: 800; text-align: center; }
.cpr-hud .lab { font-size: 11px; color: var(--muted); text-transform: uppercase; text-align: center; letter-spacing: 1px; }
.ecgstrip { background: #fff8f0; border-radius: 8px; }

/* ---------- end ---------- */
.end { width: min(1000px, 95vw); max-height: 92vh; padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.stars { font-size: 46px; letter-spacing: 8px; }
.stars .off { opacity: .2; }
.end table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.end td, .end th { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.end th { color: var(--muted); font-size: 11.5px; text-transform: uppercase; }
.end .ok { color: var(--green); font-weight: 700; } .end .bad { color: var(--red2); font-weight: 700; }

.disconnected { position: absolute; inset: 0; background: rgba(0,0,0,.75); display: flex; align-items: center; justify-content: center; z-index: 90; }
@media (max-width: 1100px) {
  .ppanel { width: 430px; }
  .tracker { width: 230px; }
  .role-grid { grid-template-columns: repeat(2, 1fr); }
  .menu-wrap { grid-template-columns: 1fr; }
  .hero h1 { font-size: 44px; }
}

/* ---------- yeni: sadeleştirilmiş arayüz ---------- */
.gl { color: #8fb3c9; font-weight: 400; font-size: .92em; }
.badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.badge { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 7px; background: rgba(255,255,255,.08); }
.badge.ok { background: rgba(63,191,111,.18); color: #8ff0b4; }
.badge.bad { background: rgba(229,56,59,.25); color: #ffb3b3; }
.badge.q { background: rgba(255,159,67,.18); color: #ffd1a6; }
.badge.rx { background: rgba(90,169,255,.2); color: #bfe0ff; }
.warnline { color: #ffcf8a !important; margin-top: 6px; font-weight: 600; }
.story { font-size: 13px; color: #c6d3df; background: rgba(255,255,255,.04); border-radius: 10px; padding: 8px 10px; line-height: 1.45; }
.story .cq { font-style: italic; margin-top: 4px; color: #fff; }
.rxbox { border-left: 4px solid #5aa9ff; }
.okline { border-left: 4px solid #3fbf6f; }
.sugg { border-left: 4px solid #57c785; background: rgba(87,199,133,.1); }
.proto { background: rgba(46,196,182,.08); border: 1px solid rgba(46,196,182,.35); border-radius: 11px; padding: 9px 10px; margin-bottom: 8px; }
.orders-now { margin: 6px 0; }
.ord { font-size: 12.5px; padding: 4px 8px; border-radius: 8px; background: rgba(255,255,255,.04); margin-bottom: 4px; display: flex; justify-content: space-between; gap: 8px; }
.xbtn { cursor: pointer; color: #ff9a9a; font-weight: 800; padding: 0 6px; border-radius: 6px; }
.xbtn:hover { background: rgba(229,56,59,.25); }
.dx-item .dn { font-weight: 600; }
.dx-item .dh { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.sticky-act { position: sticky; bottom: -16px; background: rgba(14,22,34,.98); padding: 8px 0 4px; margin-top: 6px; }
details { margin: 8px 0; border: 1px solid var(--line); border-radius: 10px; padding: 4px 8px; background: rgba(255,255,255,.02); }
details > summary { cursor: pointer; font-weight: 700; font-size: 13px; padding: 5px 2px; color: var(--text); list-style: none; }
details > summary::before { content: '▸ '; color: var(--teal); }
details[open] > summary::before { content: '▾ '; }
.init { margin-top: 10px; background: rgba(90,169,255,.06); border: 1px solid rgba(90,169,255,.25); border-radius: 11px; padding: 8px 10px; }
.init .sec-t { margin-top: 0; color: #9ccaff; }
.init-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tip { font-size: 12px; margin-top: 6px; line-height: 1.45; }
.task.care { border-color: rgba(255,209,102,.5); background: rgba(255,209,102,.08); }
.qbtn.hl { border-color: rgba(255,159,67,.7); }
.chk.allergic { background: rgba(229,56,59,.12); }
.bad { color: #ff9a9a; }
.coach { position: absolute; right: 12px; bottom: 54px; width: 320px; padding: 12px 14px; z-index: 7; border: 1px solid rgba(255,209,102,.5); background: rgba(30,26,12,.96); }
.coach .ch { display: flex; justify-content: space-between; font-weight: 800; color: #ffd166; }
.coach .cbar { height: 5px; background: rgba(255,255,255,.1); border-radius: 4px; margin: 7px 0; overflow: hidden; }
.coach .cbar i { display: block; height: 100%; background: #ffd166; transition: width .4s; }
.coach .ct { font-size: 13.5px; line-height: 1.5; }
.hud:has(.coach) .tracker { max-height: calc(100vh - 360px); }
.chapter-card { position: absolute; top: 18%; left: 50%; transform: translateX(-50%); text-align: center; pointer-events: none; animation: bannerin .5s; background: rgba(10,18,28,.92); border: 1px solid var(--line2); border-radius: 16px; padding: 14px 26px; max-width: min(560px, 90vw); box-shadow: var(--shadow); }
.chapter-card .cn { font-size: 34px; font-weight: 900; letter-spacing: 3px; }
.chapter-card .cs { color: var(--muted); font-size: 13px; }
.chapter-card .cu { margin-top: 10px; font-size: 14px; line-height: 1.5; text-align: left; background: rgba(255,209,102,.1); border-left: 4px solid #ffd166; padding: 8px 12px; border-radius: 8px; }
.chapter-card .cu b { color: #ffd166; display: block; margin-bottom: 2px; }
.streak-pop { position: absolute; top: 26%; left: 50%; transform: translateX(-50%); font-size: 30px; font-weight: 900; color: #ffb347; text-shadow: 0 3px 12px #000; pointer-events: none; animation: floatup2 1.8s forwards; }
@keyframes floatup2 { to { transform: translate(-50%, -60px); opacity: 0; } }
.settings { position: absolute; top: 64px; left: 50%; transform: translateX(-50%); width: min(440px, 92vw); padding: 14px 16px; z-index: 20; pointer-events: auto; }
.settings .seg { flex-wrap: wrap; }
.holdbox.empty { opacity: .6; padding: 5px 10px; }
.holdbox.empty .hi { width: 26px; height: 26px; font-size: 15px; }
.tut-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.tut-card { border: 1px solid var(--line2); background: rgba(255,255,255,.04); border-radius: 11px; padding: 8px 4px; cursor: pointer; color: var(--text); font-family: inherit; }
.tut-card:hover { border-color: #ffd166; }
.tut-card .ti { font-size: 22px; }
.tut-card .tn { font-weight: 700; font-size: 13px; }
.tut-card .ts { font-size: 11px; color: var(--muted); }
.tut-card.done { border-color: rgba(63,191,111,.6); }
.tut-card.done .ts { color: #8ff0b4; }
.tut-gate { background: rgba(255,209,102,.08); border: 1px solid rgba(255,209,102,.45); border-radius: 12px; padding: 10px 12px; margin: 8px 0; }
.tut-gate h3 { margin-top: 0; color: #ffd166; }
.diffdesc { font-size: 12.5px; color: #cfe0ee; margin-top: 8px; }
.howbox { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 8px; }
.howbox .hb { background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 11px; padding: 9px; font-size: 12.5px; line-height: 1.45; }
.howbox .hb b { display: block; color: var(--teal); margin-bottom: 4px; }
.screen.dim { background: rgba(4,8,14,.55); }
.chbreak { width: min(620px, 92vw); padding: 24px 28px; }
.chbreak .cbh { font-size: 26px; font-weight: 900; text-align: center; }
.bign { font-size: 28px; font-weight: 800; font-family: var(--mono); }
.box { border-radius: 12px; padding: 10px 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line); margin: 10px 0; }
.box.good { border-color: rgba(63,191,111,.6); background: rgba(16,50,30,.6); }
.box.unlock { border-color: rgba(255,209,102,.6); background: rgba(60,48,10,.5); }
.box.unlock b { color: #ffd166; display: block; margin-bottom: 4px; }
@media (max-width: 1100px) { .howbox { grid-template-columns: 1fr 1fr; } .ppanel { width: 430px; } }
@media (prefers-reduced-motion: reduce) { .codeblue, .pcard.crit, .pcard.arrest { animation: none !important; } }
body.poweroff #world { filter: brightness(.5) saturate(.6); transition: filter .6s; }
#world { transition: filter .6s; }

/* ---------- triyaj formu ---------- */
.tri-wrap { display: grid; grid-template-columns: 1.25fr 1fr; gap: 14px; align-items: start; }
.tri-paper { background: #f7f3e8; color: #1d2430; border-radius: 10px; padding: 12px 14px; box-shadow: inset 0 0 0 1px #d8cfb8; font-size: 13.5px; }
.tri-paper .gl { color: #5b6b7a; }
.tri-head { display: flex; justify-content: space-between; gap: 8px; border-bottom: 2px solid #1d2430; padding-bottom: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.tri-head b { letter-spacing: .5px; }
.tri-row { display: grid; grid-template-columns: 130px 1fr auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px dashed #c9bfa5; }
.tri-row .tl { font-weight: 700; font-size: 12.5px; color: #4a5563; }
.tri-row .tv { font-family: 'Caveat', 'Segoe Print', cursive; font-size: 17px; color: #1f3a8a; }
.tri-row.ok .tv { font-weight: 700; }
.tri-row .tick { color: #1f8a4c; font-weight: 900; }
.tri-row .btn.tiny { padding: 4px 9px; font-size: 12px; }
.tri-story { margin-top: 8px; font-size: 12.5px; color: #3a4452; font-style: italic; }
.tri-work { background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 10px; padding: 10px; min-height: 180px; text-align: center; }
.tri-work canvas { max-width: 100%; border-radius: 8px; display: block; margin: 6px auto; }
.tri-work .meter { height: 8px; background: rgba(255,255,255,.12); border-radius: 5px; overflow: hidden; }
.tri-work .meter i { display: block; height: 100%; width: 0; background: var(--teal); }
@media (max-width: 900px) { .tri-wrap { grid-template-columns: 1fr; } }

/* ---------- güvenlik, emote ---------- */
.threat-btn { position: absolute; top: 110px; left: 50%; transform: translateX(-50%); z-index: 9; pointer-events: auto; background: #d62828; color: #fff; border: 3px solid #ffd6d6; font-size: 20px; font-weight: 900; padding: 12px 26px; border-radius: 14px; cursor: pointer; box-shadow: 0 0 30px rgba(214,40,40,.7); animation: threatpulse 1.2s ease-in-out infinite; }
.threat-btn:hover { background: #ef3b3b; }
@keyframes threatpulse { 50% { transform: translateX(-50%) scale(1.05); } }
body.calm .threat-btn { animation: none; }
.wl .emo { font-size: 30px; line-height: 1; margin-bottom: 2px; text-shadow: 0 2px 6px #000; animation: emopop .35s; }
@keyframes emopop { from { transform: scale(.4); opacity: 0; } }
.glink { cursor: pointer; opacity: .8; font-size: 13px; }
.glink:hover { opacity: 1; }
.tri-work .meter { width: 100%; position: relative; height: 8px; }
.lang-sel { background: rgba(255,255,255,.06); color: var(--text); border: 1px solid var(--line2); border-radius: 8px; padding: 5px 8px; font: inherit; font-size: 13px; }
.lang-sel option { background: #101a26; }
