:root {
  --bg: #0d0605;
  --rust: #8a3f18;
  --bronze: #c2823f;
  --brass: #e0b060;
  --bone: #eadcb8;
  --bone-dim: #a8987a;
  --blood: #a10f08;
  --ember: #ff6a1a;
  --sky: #7a2a66;
  --panel: rgba(22, 11, 8, 0.82);
  --line: rgba(194, 130, 63, 0.35);
  --f-title: 'Pirata One', 'Georgia', serif;
  --f-num: 'Teko', 'Impact', sans-serif;
  --f-ui: 'Silkscreen', 'Courier New', monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--bone); font-family: var(--f-ui); }
button { font: inherit; cursor: pointer; }

#game { position: fixed; inset: 0; width: 100vw; height: 100vh; image-rendering: pixelated; image-rendering: crisp-edges; display: block; }

#flash, #quadTint, #lowHealth { position: fixed; inset: 0; pointer-events: none; opacity: 0; }
#flash { mix-blend-mode: screen; }
#quadTint { background: radial-gradient(ellipse at center, rgba(60, 90, 255, 0.2), rgba(40, 60, 255, 0.8)); mix-blend-mode: screen; transition: opacity .2s; }
#lowHealth { background: radial-gradient(ellipse at center, transparent 45%, rgba(150, 0, 0, 0.85) 100%); }

/* ---------------- HUD ---------------- */
#hud { position: fixed; inset: 0; pointer-events: none; }
#hud.hidden { display: none; }
#topbar { position: absolute; top: 14px; left: 0; right: 0; display: flex; justify-content: space-between; padding: 0 22px; }
#topbar .tb { display: flex; flex-direction: column; align-items: flex-start; text-shadow: 0 2px 0 #000; }
#topbar .tb small { font-size: 11px; color: var(--bone-dim); letter-spacing: 2px; text-transform: uppercase; }
#topbar .tb span { font-family: var(--f-num); font-size: 44px; line-height: .9; font-weight: 600; color: var(--brass); }
#topbar .tb.score { align-items: flex-end; }
#topbar .tb:nth-child(2) { position: absolute; left: 50%; transform: translateX(-50%); align-items: center; }

#cross { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; transform: translate(-50%, -50%); }
#cross { --ch: #ffe0a0; }
#cross i { position: absolute; background: var(--ch); box-shadow: 0 0 0 1px rgba(0,0,0,.6); }
#cross.hit { animation: hitmark .14s ease-out; }
#cross.hit i { background: #ff5030; }
@keyframes hitmark { 0% { transform: translate(-50%, -50%) scale(1.5); } 100% { transform: translate(-50%, -50%) scale(1); } }
#cross i:nth-child(1) { left: 10px; top: 0; width: 2px; height: 6px; }
#cross i:nth-child(2) { left: 10px; bottom: 0; width: 2px; height: 6px; }
#cross i:nth-child(3) { top: 10px; left: 0; width: 6px; height: 2px; }
#cross i:nth-child(4) { top: 10px; right: 0; width: 6px; height: 2px; }

#dmgDirs { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.dmgdir { position: absolute; left: -70px; top: -150px; width: 140px; height: 300px; transform-origin: 70px 150px; }
.dmgdir::before { content: ''; position: absolute; left: 30px; top: 0; width: 80px; height: 18px; background: linear-gradient(180deg, rgba(255,30,10,.95), rgba(255,0,0,0)); clip-path: polygon(0 0, 100% 0, 75% 100%, 25% 100%); }

#msg { position: absolute; left: 0; right: 0; top: 30%; text-align: center; font-size: 16px; letter-spacing: 1px; color: var(--bone); text-shadow: 0 2px 0 #000, 0 0 12px #000; opacity: 0; }
#msg.big { font-family: var(--f-title); font-size: 46px; letter-spacing: 2px; color: var(--brass); }
#msg.show { animation: msgIn 1.8s ease-out forwards; }
#msg.big.show { animation-duration: 2.6s; }
@keyframes msgIn { 0% { opacity: 0; transform: translateY(8px); } 8% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; } }

#combo { position: absolute; right: 6%; top: 42%; font-family: var(--f-num); font-weight: 700; font-size: clamp(26px, 4.6vw, 54px); white-space: nowrap; color: var(--ember); text-shadow: 0 3px 0 #2a0800; opacity: 0; transform: rotate(-6deg); }
#combo.show { animation: combo 1.4s ease-out forwards; }
@keyframes combo { 0% { opacity: 0; transform: rotate(-6deg) scale(1.8); } 12% { opacity: 1; transform: rotate(-6deg) scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: rotate(-6deg) translateY(-20px); } }

#banner { position: absolute; left: 0; right: 0; top: 20%; text-align: center; opacity: 0; }
#banner.show { animation: banner 2.8s ease-out forwards; }
#bannerTitle { font-family: var(--f-title); font-size: clamp(48px, 9vw, 120px); line-height: 1; color: var(--bone);
  background: linear-gradient(180deg, #ffe2a0 0%, #e08a30 45%, #7a2a0c 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 0 #1a0400) drop-shadow(0 0 24px rgba(255, 90, 20, .35)); }
#bannerSub { font-size: 15px; letter-spacing: 4px; text-transform: uppercase; color: var(--bone-dim); margin-top: 6px; text-shadow: 0 2px 0 #000; }
@keyframes banner { 0% { opacity: 0; transform: scale(1.25); letter-spacing: 12px; } 12% { opacity: 1; transform: scale(1); letter-spacing: 0; } 80% { opacity: 1; } 100% { opacity: 0; } }

#quadTimer { position: absolute; right: 24px; bottom: 120px; font-family: var(--f-num); font-size: 40px; color: #9ab0ff; text-shadow: 0 0 14px #3050ff, 0 2px 0 #000; display: none; }
#quadTimer.show { display: block; }
#quadTimer::before { content: '4× '; font-size: 24px; }

#bottom { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; }
#slots { display: flex; gap: 4px; margin-bottom: 4px; }
.slot { display: none; align-items: center; gap: 6px; padding: 3px 9px 2px; background: rgba(15, 7, 5, .75); border: 1px solid #3a2414; font-size: 12px; color: var(--bone-dim); }
.slot.owned { display: flex; }
.slot b { color: var(--bronze); }
.slot.active { border-color: var(--brass); color: var(--bone); background: rgba(70, 30, 10, .85); }
.slot .ico { width: 14px; height: 14px; }

#statusbar { width: min(860px, 100vw); height: 74px; display: grid; grid-template-columns: 1fr 74px 1fr 1fr; align-items: center;
  background-color: #3a2416; background-size: 100% 100%; image-rendering: pixelated;
  border-top: 3px solid #1a0c06; box-shadow: inset 0 2px 0 rgba(255, 210, 150, .2), 0 -4px 20px rgba(0,0,0,.6); }
#statusbar .cell { display: flex; align-items: center; justify-content: center; gap: 10px; height: 100%; }
#statusbar .face { background: rgba(0,0,0,.4); border-left: 2px solid #1a0c06; border-right: 2px solid #1a0c06; }
#face { width: 64px; height: 64px; image-rendering: pixelated; }
.num { font-family: var(--f-num); font-weight: 700; font-size: 66px; line-height: 1; padding-top: 8px; color: #e0a040;
  background: linear-gradient(180deg, #ffd890 0%, #e09030 50%, #8a3a0a 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(2px 3px 0 #1a0800); min-width: 2.2ch; text-align: left; }
.num.low { background: linear-gradient(180deg, #ff9080 0%, #e02010 55%, #6a0400 100%); -webkit-background-clip: text; background-clip: text; animation: blink .5s steps(2) infinite; }
@keyframes blink { 50% { opacity: .55; } }

.ico { display: inline-block; width: 34px; height: 34px; background-size: contain; background-repeat: no-repeat; background-position: center; image-rendering: pixelated; }
.ico-armor { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath d='M3 2h3v1h4V2h3v2h1v6h-1v2h-2v1H5v-1H3v-2H2V4h1z' fill='%23c89a38'/%3E%3Cpath d='M6 3h4v2H6z' fill='%231a0c06'/%3E%3Cpath d='M4 6h8v1H4zM5 9h6v1H5z' fill='%237a5a18'/%3E%3C/svg%3E"); }
.ico-shells { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath d='M2 3h3v8H2zM6 3h3v8H6zM10 3h3v8h-3z' fill='%23b82418'/%3E%3Cpath d='M2 11h3v3H2zM6 11h3v3H6zM10 11h3v3h-3z' fill='%23d8a838'/%3E%3Cpath d='M3 3h1v8H3zM7 3h1v8H7zM11 3h1v8h-1z' fill='%23e84a30'/%3E%3C/svg%3E"); }
.ico-nails { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath d='M2 2h3v1h-1v11H3V3H2zM6 2h3v1H8v11H7V3H6zM10 2h3v1h-1v11h-1V3h-1z' fill='%23a8b0b8'/%3E%3C/svg%3E"); }
.ico-rockets { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath d='M3 4h2v9H3zM10 4h2v9h-2z' fill='%238a929a'/%3E%3Cpath d='M3 2h2v2H3zM10 2h2v2h-2z' fill='%23c82010'/%3E%3Cpath d='M2 12h4v2H2zM9 12h4v2H9z' fill='%23505860'/%3E%3C/svg%3E"); }
.ico-cells { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath d='M3 3h10v10H3z' fill='%23303840'/%3E%3Cpath d='M5 5h6v6H5z' fill='%2370a8ff'/%3E%3Cpath d='M7 1h2v14H7z' fill='%23a8d0ff'/%3E%3C/svg%3E"); }

/* ---------------- Schermen ---------------- */
.screen { position: fixed; inset: 0; display: none; }
.screen.show { display: flex; }
#loading .fatal { text-align: center; max-width: 520px; line-height: 1.7; color: var(--bone); }
#loading { align-items: center; justify-content: center; background: var(--bg); font-size: 14px; letter-spacing: 3px; color: var(--bone-dim); z-index: 50; }

#menu { background: radial-gradient(ellipse at 30% 40%, rgba(13,6,5,.2) 0%, rgba(13,6,5,.78) 70%), linear-gradient(90deg, rgba(10,4,3,.92) 0%, rgba(10,4,3,.35) 60%, rgba(10,4,3,.75) 100%); overflow-y: auto; }
#menu .wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding: 48px 40px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr); gap: 48px; align-items: start; min-height: 100%; }
.brand { margin-bottom: 26px; }
.sigil { width: 64px; height: 64px; color: var(--ember); filter: drop-shadow(0 0 10px rgba(255, 106, 26, .55)); }
.brand h1 { font-family: var(--f-title); font-weight: 400; font-size: clamp(64px, 10vw, 148px); line-height: .85; margin: 8px 0 14px;
  background: linear-gradient(180deg, #ffe7b0 0%, #e8a050 35%, #b0501a 62%, #4a1406 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 5px 0 #1a0400) drop-shadow(0 0 40px rgba(255, 80, 20, .25)); }
.brand .tag { max-width: 560px; font-size: 13px; line-height: 1.7; color: var(--bone-dim); margin: 0; }
h2 { font-family: var(--f-ui); font-weight: 400; font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: var(--bronze); margin: 26px 0 12px; }

.diffs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.diff { text-align: left; padding: 14px 14px 12px; background: var(--panel); border: 1px solid #3a2414; color: var(--bone); position: relative; transition: border-color .15s, transform .15s, background .15s; }
.diff:hover { border-color: var(--bronze); transform: translateY(-2px); }
.diff.sel { border-color: var(--ember); background: linear-gradient(180deg, rgba(120, 40, 10, .7), rgba(30, 10, 6, .9)); box-shadow: 0 0 0 1px var(--ember) inset; }
.diff .name { font-family: var(--f-title); font-size: 28px; line-height: 1; display: block; }
.diff .desc { font-size: 10px; line-height: 1.5; color: var(--bone-dim); display: block; margin-top: 6px; min-height: 30px; }
.maps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.map .tag { display: block; margin-top: 8px; font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--bronze); }
.map-cathedral.sel { border-color: #ff5a4a; background: linear-gradient(180deg, rgba(110, 16, 20, .75), rgba(26, 6, 8, .9)); box-shadow: 0 0 0 1px #ff5a4a inset; }
.map-foundry.sel { border-color: #9ae04a; background: linear-gradient(180deg, rgba(50, 80, 14, .75), rgba(12, 18, 6, .9)); box-shadow: 0 0 0 1px #9ae04a inset; }
.map-orbital.sel { border-color: #b08aff; background: linear-gradient(180deg, rgba(50, 30, 110, .75), rgba(10, 8, 26, .9)); box-shadow: 0 0 0 1px #b08aff inset; }
.map .desc { min-height: 0; }
.map-ship.sel { border-color: #4ad8ff; background: linear-gradient(180deg, rgba(20, 70, 110, .7), rgba(6, 14, 26, .9)); box-shadow: 0 0 0 1px #4ad8ff inset; }
.diff .skulls { margin-top: 8px; display: flex; gap: 3px; }
.diff .skulls i { width: 12px; height: 12px; background: #3a2414; clip-path: polygon(20% 0, 80% 0, 100% 30%, 100% 65%, 80% 65%, 80% 100%, 20% 100%, 20% 65%, 0 65%, 0 30%); }
.diff .skulls i.on { background: var(--ember); }

button.big { margin-top: 26px; padding: 18px 36px 14px; font-family: var(--f-title); font-size: 34px; line-height: 1; color: #1a0802;
  background: linear-gradient(180deg, #ffd27a, #e07a28 55%, #9a3a0c); border: none; box-shadow: 0 4px 0 #4a1404, 0 0 30px rgba(255, 106, 26, .3); transition: transform .1s, filter .15s; }
button.big:hover { filter: brightness(1.12); transform: translateY(-1px); }
button.big:active { transform: translateY(3px); box-shadow: 0 1px 0 #4a1404; }
.best { font-size: 12px; color: var(--bone-dim); margin-top: 16px; }
.best b { color: var(--brass); font-family: var(--f-num); font-size: 26px; font-weight: 600; vertical-align: -3px; margin-left: 4px; }

.panel { background: var(--panel); border: 1px solid #3a2414; padding: 4px 22px 18px; margin-bottom: 18px; }
.row { display: grid; grid-template-columns: 1fr 1.2fr 44px; align-items: center; gap: 12px; padding: 7px 0; font-size: 12px; }
.row output { text-align: right; color: var(--brass); font-family: var(--f-num); font-size: 22px; }
.row.check { grid-template-columns: 1fr auto; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; background: #2a160c; border: 1px solid #4a2a14; outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 18px; background: var(--bronze); border: 2px solid #2a0e04; cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 12px; height: 16px; background: var(--bronze); border: 2px solid #2a0e04; border-radius: 0; cursor: pointer; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--ember); }
.keys ul { list-style: none; margin: 0; padding: 0; }
.keys li { display: flex; align-items: center; gap: 5px; padding: 5px 0; font-size: 11px; color: var(--bone-dim); }
.keys li span { margin-left: 8px; }
kbd { font-family: var(--f-ui); font-size: 10px; padding: 3px 6px; background: #2a160c; border: 1px solid #5a3418; border-bottom-width: 3px; color: var(--bone); }
.tip { font-size: 10px; line-height: 1.6; color: var(--bronze); margin: 12px 0 0; }

#pause, #dead { align-items: center; justify-content: center; background: rgba(10, 4, 3, .7); backdrop-filter: blur(2px); }
#dead { background: radial-gradient(ellipse at center, rgba(60, 0, 0, .55), rgba(8, 0, 0, .92)); }
.box { width: min(560px, 92vw); text-align: center; }
.box h1 { font-family: var(--f-title); font-weight: 400; font-size: clamp(54px, 8vw, 96px); margin: 0 0 12px; line-height: 1;
  background: linear-gradient(180deg, #ffe0a8, #d06a24 55%, #6a1a06); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 4px 0 #1a0400); }
#dead .box h1 { background: linear-gradient(180deg, #ff9a80, #c01008 55%, #4a0000); -webkit-background-clip: text; background-clip: text; }
#pauseSettings .panel { text-align: left; }
.btns { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.btns button:not(.big) { background: none; border: 1px solid #5a3418; color: var(--bone-dim); padding: 10px 22px; font-size: 12px; letter-spacing: 2px; }
.btns button:not(.big):hover { color: var(--bone); border-color: var(--bronze); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0; }
.stats div { background: var(--panel); border: 1px solid #3a2414; padding: 12px 6px 6px; }
.stats small { display: block; font-size: 10px; letter-spacing: 2px; color: var(--bone-dim); text-transform: uppercase; }
.stats b { font-family: var(--f-num); font-size: 48px; font-weight: 600; color: var(--brass); line-height: 1.1; }
.record { font-size: 13px; color: var(--brass); min-height: 18px; }

/* ---------------- LAN multiplayer ---------------- */
.mp { margin-top: 30px; padding-top: 4px; border-top: 1px solid #3a2414; max-width: 760px; }
.mp-note { font-size: 11px; line-height: 1.7; color: var(--bone-dim); margin: 0; }
.mp-warn { font-size: 11px; color: #ff8a6a; margin: 10px 0 0; }
.mp-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.mp-name { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--bone-dim); }
.mp-name input { font: inherit; font-size: 13px; color: var(--bone); background: #1a0c08; border: 1px solid #5a3418; padding: 6px 8px; width: 170px; outline: none; }
.mp-name input:focus { border-color: var(--bronze); }
.mp-online { font-size: 10px; color: var(--bronze); letter-spacing: 1px; }
.mp-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.mode { text-align: left; padding: 10px 12px; background: var(--panel); border: 1px solid #3a2414; color: var(--bone); }
.mode b { display: block; font-family: var(--f-title); font-weight: 400; font-size: 22px; }
.mode span { font-size: 10px; color: var(--bone-dim); }
.mode.sel { border-color: var(--ember); box-shadow: 0 0 0 1px var(--ember) inset; }
.mp-btn { font-family: var(--f-title); font-size: 22px; padding: 9px 20px 7px; margin-right: 10px; color: #1a0802; background: linear-gradient(180deg, #ffd27a, #e07a28 55%, #9a3a0c); border: none; box-shadow: 0 3px 0 #4a1404; }
.mp-btn.ghost { background: none; color: var(--bone-dim); border: 1px solid #5a3418; box-shadow: none; font-family: var(--f-ui); font-size: 11px; padding: 10px 16px; }
.mp-hint { font-size: 10px; color: var(--bone-dim); margin: 0 0 10px; }
.mp-game { background: var(--panel); border: 1px solid #3a2414; padding: 12px 14px; margin-bottom: 12px; font-size: 11px; color: var(--bone-dim); }
.mp-game b { font-family: var(--f-title); font-weight: 400; font-size: 22px; color: var(--bone); }
.mp-game em { font-style: normal; color: var(--ember); margin-left: 8px; }
.mp-members { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mp-members span { padding: 3px 8px; background: #2a160c; border: 1px solid #4a2a14; color: var(--bone); }
.mp-members span.host::before { content: '★ '; color: var(--brass); }
.mp-code { font-family: var(--f-ui); font-size: 11px; color: var(--ember); border: 1px solid #5a3418; padding: 2px 6px; margin-left: 8px; letter-spacing: 2px; }
.mp-list-h { font-family: var(--f-ui); font-weight: 400; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--bronze); margin: 18px 0 8px; }
.mp-list { display: flex; flex-direction: column; gap: 6px; }
.mp-gamerow { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--panel); border: 1px solid #3a2414; padding: 8px 12px; font-size: 11px; color: var(--bone-dim); }
.mp-gamerow b { font-family: var(--f-title); font-weight: 400; font-size: 19px; color: var(--bone); }
.mp-gamerow small { display: block; font-size: 10px; margin-top: 2px; }
.mp-btn.small { font-size: 17px; padding: 6px 14px 5px; margin: 0; }
.mp-full { font-size: 10px; color: #ff8a6a; letter-spacing: 1px; }
.mp-addr { font-size: 11px; color: var(--bone-dim); margin: 14px 0 0; }
.mp-addr b { color: var(--brass); font-family: var(--f-ui); }

#scoreboard { position: absolute; left: 50%; top: 22%; transform: translateX(-50%); min-width: 360px; display: none; background: rgba(12, 5, 3, .88); border: 1px solid #5a3418; padding: 14px 18px; }
#scoreboard.show { display: block; }
table.sb { width: 100%; border-collapse: collapse; font-size: 13px; }
table.sb th { text-align: left; font-size: 10px; letter-spacing: 2px; color: var(--bronze); font-weight: 400; padding: 4px 8px; border-bottom: 1px solid #3a2414; text-transform: uppercase; }
table.sb td { padding: 6px 8px; color: var(--bone); border-bottom: 1px solid rgba(90, 52, 24, .35); }
table.sb td:not(:first-child), table.sb th:not(:first-child) { text-align: right; font-family: var(--f-num); font-size: 22px; }
table.sb tr.me td { color: var(--brass); }
#dScores { margin: 8px auto 14px; max-width: 420px; }

/* ---------------- Dradenkruisstijlen ---------------- */
.ch-dot i, .ch-circle i, .ch-chevron i { display: none; }
.ch-dot::after, .ch-circle::after, .ch-star::after { content: ''; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; background: var(--ch); box-shadow: 0 0 0 1px rgba(0,0,0,.6); }
.ch-circle::before { content: ''; position: absolute; inset: 2px; border: 2px solid var(--ch); border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.5), inset 0 0 0 1px rgba(0,0,0,.5); }
.ch-chevron::after { content: ''; position: absolute; left: 50%; top: 55%; width: 10px; height: 10px; margin-left: -5px; border-left: 2px solid var(--ch); border-top: 2px solid var(--ch); transform: rotate(45deg); filter: drop-shadow(0 0 1px #000); }
.ch-brackets i:nth-child(1), .ch-brackets i:nth-child(2) { display: none; }
.ch-brackets i:nth-child(3), .ch-brackets i:nth-child(4) { top: 3px; width: 5px; height: 16px; background: none; box-shadow: none; border: 2px solid var(--ch); }
.ch-brackets i:nth-child(3) { left: 0; border-right: 0; }
.ch-brackets i:nth-child(4) { right: 0; border-left: 0; }
.ch-star { rotate: 45deg; }
#cross.hit { --ch: #ff5030; }

/* ---------------- Profielkaart in het menu ---------------- */
.pcard { display: flex; align-items: center; gap: 16px; width: 100%; max-width: 760px; margin: 0 0 6px; padding: 12px 16px; text-align: left;
  background: var(--panel); border: 1px solid #3a2414; color: var(--bone); transition: border-color .15s, transform .15s; }
.pcard:hover { border-color: var(--bronze); transform: translateY(-2px); }
.pc-lvl { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 62px; height: 62px; flex: none;
  background: linear-gradient(180deg, #5a1e08, #200a04); border: 2px solid var(--bronze); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.pc-lvl small { font-size: 8px; letter-spacing: 2px; color: var(--bone-dim); }
.pc-lvl b { font-family: var(--f-num); font-weight: 600; font-size: 32px; line-height: .9; color: var(--brass); }
.pc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pc-top { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; color: var(--bone-dim); }
.pc-top b { font-family: var(--f-title); font-weight: 400; font-size: 24px; line-height: 1; color: var(--bone); }
.pc-sub { font-size: 10px; color: var(--bronze); }
.pc-pts, .pc-open { flex: none; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; padding: 8px 10px; border: 1px solid #5a3418; color: var(--bone-dim); }
.pc-pts { color: #1a0802; background: linear-gradient(180deg, #ffd27a, #e07a28); border-color: transparent; animation: ptsPulse 1.4s ease-in-out infinite; }
@keyframes ptsPulse { 50% { box-shadow: 0 0 18px rgba(255, 140, 40, .65); } }
.xpbar { display: block; height: 8px; background: #1a0c06; border: 1px solid #4a2a14; overflow: hidden; }
.xpbar i { display: block; height: 100%; background: linear-gradient(90deg, #9a3a0c, #e07a28, #ffd27a); box-shadow: 0 0 10px rgba(255, 140, 40, .5); }
.xpbar.big { height: 12px; }

/* ---------------- Profielscherm ---------------- */
#profile { z-index: 20; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 32px 16px;
  background: radial-gradient(ellipse at 50% 15%, rgba(58, 18, 6, .985), rgba(8, 3, 2, .99) 70%); }
.pbox { width: min(1100px, 100%); }
.prof-head { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; padding: 18px 22px; background: var(--panel); border: 1px solid #3a2414; }
.ph-lvl { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 96px; height: 104px;
  background: linear-gradient(180deg, #6a2408, #1a0804); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.ph-lvl small { font-size: 9px; letter-spacing: 2px; color: var(--bone-dim); text-transform: uppercase; }
.ph-lvl b { font-family: var(--f-num); font-weight: 600; font-size: 54px; line-height: .9; color: var(--brass); }
.ph-main h1 { font-family: var(--f-title); font-weight: 400; font-size: clamp(36px, 5vw, 60px); line-height: 1; margin: 0 0 10px;
  background: linear-gradient(180deg, #ffe0a8, #d06a24 55%, #6a1a06); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.ph-xp { font-size: 10px; color: var(--bone-dim); margin: 6px 0 0; }
.ph-stats { display: grid; grid-template-columns: repeat(2, minmax(84px, 1fr)); gap: 6px 16px; }
.ph-stats small { display: block; font-size: 9px; letter-spacing: 1.5px; color: var(--bone-dim); text-transform: uppercase; }
.ph-stats b { font-family: var(--f-num); font-weight: 600; font-size: 28px; line-height: 1; color: var(--brass); }
.ptabs { display: flex; gap: 6px; margin: 18px 0 14px; }
.ptabs button { flex: 1; padding: 12px 10px 10px; background: var(--panel); border: 1px solid #3a2414; color: var(--bone-dim); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; }
.ptabs button.on { color: var(--bone); border-color: var(--ember); box-shadow: 0 0 0 1px var(--ember) inset; background: linear-gradient(180deg, rgba(120, 40, 10, .6), rgba(30, 10, 6, .9)); }
.ptabs em { font-style: normal; color: #1a0802; background: var(--brass); padding: 0 6px; margin-left: 6px; }
.ptabs em:empty { display: none; }
.pbody h3 { font-family: var(--f-ui); font-weight: 400; font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--bronze); margin: 20px 0 10px; }
.pbody h3 span { letter-spacing: 0; text-transform: none; color: var(--bone-dim); font-size: 10px; margin-left: 8px; }
.pf-pts { font-size: 12px; color: var(--bone-dim); margin: 0 0 12px; }
.pf-pts b { font-family: var(--f-num); font-size: 30px; color: var(--brass); vertical-align: -4px; margin-right: 4px; }
.pf-note { font-size: 10px; line-height: 1.6; color: var(--bone-dim); margin: 16px 0 0; }
button.link { background: none; border: none; padding: 0; margin-left: 10px; color: var(--ember); font-size: inherit; text-decoration: underline; text-underline-offset: 3px; }
.skills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.skill { display: flex; flex-direction: column; padding: 14px; background: var(--panel); border: 1px solid #3a2414; }
.skill.has { border-color: #6a3a18; }
.skill.maxed { border-color: var(--bronze); background: linear-gradient(180deg, rgba(90, 40, 10, .55), rgba(22, 10, 6, .9)); }
.sk-top { display: flex; justify-content: space-between; align-items: center; }
.sk-top b { font-family: var(--f-title); font-weight: 400; font-size: 24px; }
.pips { display: flex; gap: 4px; }
.pips i { width: 12px; height: 12px; background: #2a160c; border: 1px solid #5a3418; transform: rotate(45deg); }
.pips i.on { background: var(--ember); border-color: #ffb070; box-shadow: 0 0 8px rgba(255, 106, 26, .6); }
.sk-now { font-size: 11px; color: var(--bone); margin: 10px 0 2px; min-height: 16px; }
.sk-next { font-size: 10px; color: var(--bone-dim); margin: 0 0 12px; flex: 1; }
.sk-btn { align-self: flex-start; padding: 8px 14px 7px; font-family: var(--f-title); font-size: 18px; color: #1a0802; background: linear-gradient(180deg, #ffd27a, #e07a28 55%, #9a3a0c); border: none; box-shadow: 0 3px 0 #4a1404; }
.sk-btn:disabled { background: #2a160c; color: var(--bone-dim); box-shadow: none; cursor: default; }
.arsenal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.weap { padding: 14px; background: var(--panel); border: 1px solid #3a2414; }
.weap.locked { opacity: .75; border-style: dashed; }
.wp-top { display: flex; align-items: center; gap: 10px; }
.wp-top b { font-family: var(--f-title); font-weight: 400; font-size: 24px; flex: 1; }
.wp-top .ico { width: 22px; height: 22px; }
.weap p { font-size: 11px; line-height: 1.6; color: var(--bone-dim); margin: 8px 0 10px; }
.wp-state { display: block; font-size: 10px; color: var(--bronze); margin-top: 6px; }
.wp-state.ok { color: #9ae04a; margin-top: 0; }
.sws { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.sw { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px; min-width: 108px; background: var(--panel); border: 1px solid #3a2414; color: var(--bone); font-size: 10px; }
.sw:hover:not(:disabled) { border-color: var(--bronze); }
.sw.on { border-color: var(--ember); box-shadow: 0 0 0 1px var(--ember) inset; }
.sw:disabled { opacity: .45; cursor: default; }
.sw small { font-size: 9px; color: var(--bone-dim); min-height: 11px; }
.fin-chip { width: 64px; height: 26px; border: 1px solid #000; box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
.sw.dot { min-width: 0; width: 40px; height: 40px; padding: 0; justify-content: center; background: var(--c); border: 2px solid #1a0c06; }
.sw.dot.small { width: 30px; height: 30px; }
.sw.dot.on { border-color: #fff; box-shadow: 0 0 0 2px var(--ember); }
.sw.dot small { color: #fff; font-size: 10px; text-shadow: 0 1px 2px #000; }
.xprev { position: relative; display: block; width: 22px; height: 22px; margin: 4px; }
.xprev i { position: absolute; background: var(--ch); box-shadow: 0 0 0 1px rgba(0,0,0,.6); }
.xprev i:nth-child(1) { left: 10px; top: 0; width: 2px; height: 6px; }
.xprev i:nth-child(2) { left: 10px; bottom: 0; width: 2px; height: 6px; }
.xprev i:nth-child(3) { top: 10px; left: 0; width: 6px; height: 2px; }
.xprev i:nth-child(4) { top: 10px; right: 0; width: 6px; height: 2px; }
.xprev.ch-brackets i:nth-child(3), .xprev.ch-brackets i:nth-child(4) { top: 3px; width: 5px; height: 16px; background: none; box-shadow: none; border: 2px solid var(--ch); }
.xprev.ch-brackets i:nth-child(3) { border-right: 0; }
.xprev.ch-brackets i:nth-child(4) { border-left: 0; }
.pfoot { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 10px; }
.pfoot p { font-size: 10px; color: var(--bone-dim); }
.dxp { font-size: 12px; color: var(--bone-dim); margin: -4px 0 16px; min-height: 16px; }
.dxp b { color: var(--brass); font-family: var(--f-num); font-size: 24px; font-weight: 600; vertical-align: -3px; }
.dxp .xpbar { width: min(320px, 80%); margin: 8px auto 0; }

@media (max-width: 900px) {
  .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .arsenal { grid-template-columns: 1fr; }
  .prof-head { grid-template-columns: auto 1fr; }
  .ph-stats { grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #menu .wrap { grid-template-columns: 1fr; padding: 28px 16px; }
  .diffs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .num { font-size: 48px; }
}
@media (max-width: 560px) {
  .skills { grid-template-columns: 1fr; }
  .ph-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pcard { gap: 10px; }
  .pc-pts, .pc-open { display: none; }
}

/* kill bevestigd: het kruis draait tot een rode X */
#cross.kill { animation: killmark .32s ease-out; }
#cross.kill.big { animation-duration: .45s; }
#cross.kill i { background: #ff2a10; box-shadow: 0 0 0 1px rgba(0,0,0,.7), 0 0 6px rgba(255, 60, 20, .9); }
@keyframes killmark { 0% { transform: translate(-50%, -50%) rotate(45deg) scale(2.1); } 60% { transform: translate(-50%, -50%) rotate(45deg) scale(1.15); } 100% { transform: translate(-50%, -50%) rotate(45deg) scale(1); } }
#cross.kill.big i { background: #ffd040; }

/* punten die opzweven bij een kill */
#killPops { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
#killPops span { position: absolute; left: 0; top: 14px; transform: translateX(-50%); white-space: nowrap; font-family: var(--f-num); font-weight: 700; font-size: 22px;
  color: var(--bone); text-shadow: 0 2px 0 #000, 0 0 8px rgba(0,0,0,.8); animation: killpop .9s ease-out forwards; }
#killPops span.big { font-size: 30px; color: var(--brass); }
@keyframes killpop { 0% { opacity: 0; transform: translate(-50%, 0) scale(1.6); } 15% { opacity: 1; transform: translate(calc(-50% + var(--dx) * .3), -8px) scale(1); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), -60px) scale(.9); } }

/* Kiln Focus: warm, ontkleurd beeld en een meter boven de wapenslots */
#focusTint { position: fixed; inset: 0; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: radial-gradient(ellipse at center, rgba(255, 150, 40, 0) 40%, rgba(255, 110, 20, .34) 100%); }
#focusTint.on { opacity: 1; }
#game.focus { filter: saturate(.45) contrast(1.12) sepia(.18); }
#focusMeter { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--bone); opacity: .75; }
#focusMeter.hidden { display: none; }
#focusMeter b { display: block; width: 120px; height: 6px; background: rgba(0,0,0,.6); border: 1px solid #3a2010; }
#focusMeter b i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #a04010, #ff9a30); }
#focusMeter.ready { opacity: 1; }
#focusMeter.ready b i { animation: focusReady 1.2s ease-in-out infinite; }
#focusMeter.active { opacity: 1; color: #ffb050; }
@keyframes focusReady { 50% { box-shadow: 0 0 10px rgba(255, 150, 40, .9); } }
