:root {
  --bg: #040814; --panel: rgba(9, 16, 34, 0.86); --panel2: #0c1630; --line: #17325a; --line2: #1e3f6e; --text: #e6efff; --mute: #7d8db0;
  --cyan: #22d3ee; --blue: #3b82f6; --ok: #22c55e; --green: #34d399; --warn: #f59e0b; --bad: #ef4444; --violet: #a855f7;
  --mono: ui-monospace, 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace;
  --sans: 'Rajdhani', 'Exo 2', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; color: var(--text); font: 14px/1.35 ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif; }
body { background: radial-gradient(1100px 700px at 50% 35%, #0b1f45 0%, transparent 65%), radial-gradient(800px 500px at 0% 100%, #1a0b3a 0%, transparent 60%), var(--bg); }
button { font: inherit; color: inherit; cursor: pointer; }
h2, h3 { margin: 0; font-weight: 700; }
small { color: var(--mute); }

#app { height: 100vh; display: grid; grid-template-columns: 270px minmax(0, 1fr) 300px; grid-template-rows: 78px minmax(0, 1fr) 76px; gap: 12px; padding: 0 14px 12px; }

.panel { background: linear-gradient(180deg, rgba(12, 22, 46, .9), rgba(7, 13, 28, .92)); border: 1px solid var(--line); border-radius: 12px; box-shadow: inset 0 1px 0 rgba(120, 180, 255, .06), 0 0 24px -12px rgba(34, 211, 238, .25); }
.panel h2 { font-size: 13px; letter-spacing: 1.5px; color: #dbe7ff; padding: 12px 14px 8px; display: flex; justify-content: space-between; align-items: baseline; }
.panel h2 span { color: var(--cyan); font-family: var(--mono); font-size: 12px; letter-spacing: 0; font-weight: 600; }

#top { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding-top: 6px; }
.logo { width: 256px; display: flex; flex-direction: column; justify-content: center; padding: 6px 18px; height: 70px; background: linear-gradient(100deg, rgba(10, 20, 44, .95), rgba(10, 20, 44, .5)); border: 1px solid var(--line); border-radius: 0 0 14px 0; clip-path: polygon(0 0, 100% 0, 92% 100%, 0 100%); }
.logo b { font: italic 900 40px/1 var(--sans); letter-spacing: 3px; background: linear-gradient(90deg, #67e8f9, #60a5fa 45%, #c084fc); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 10px rgba(96, 165, 250, .55)); }
.logo small { font-size: 9.5px; letter-spacing: 3px; color: #8fb4ff; margin-top: 4px; }
.kpibar { display: flex; height: 60px; background: linear-gradient(180deg, rgba(12, 24, 52, .95), rgba(8, 16, 36, .9)); border: 1px solid var(--line2); clip-path: polygon(3% 0, 100% 0, 97% 100%, 0 100%); padding: 0 40px; box-shadow: 0 0 30px -10px rgba(59, 130, 246, .5); }
.k { display: flex; align-items: center; gap: 12px; padding: 0 26px; border-right: 1px solid var(--line); }
.k:last-child { border-right: 0; }
.k b { display: block; font: 700 20px/1.1 var(--mono); }
.k small { font-size: 11px; }
.k .kic { width: 34px; height: 34px; font-size: 22px; }
.cash .dollar { font: 800 30px/1 var(--mono); color: var(--green); text-shadow: 0 0 12px rgba(52, 211, 153, .6); }
.cash b { color: var(--green); font-size: 26px; text-shadow: 0 0 14px rgba(52, 211, 153, .45); }
.cash .trend { color: var(--green); font-size: 22px; font-weight: 800; }
.cash.neg .dollar, .cash.neg b, .cash.neg .trend { color: var(--bad); text-shadow: 0 0 12px rgba(239, 68, 68, .5); }
.dayctl { margin-left: auto; display: flex; align-items: center; height: 60px; background: linear-gradient(180deg, rgba(12, 24, 52, .95), rgba(8, 16, 36, .9)); border: 1px solid var(--line2); clip-path: polygon(6% 0, 100% 0, 100% 100%, 0 100%); padding: 0 12px 0 34px; gap: 14px; }
.day { display: flex; align-items: center; gap: 12px; padding-right: 14px; border-right: 1px solid var(--line); }
.day b { display: block; font: 700 17px/1.15 var(--sans); color: #93c5fd; letter-spacing: 1px; }
.day b + b { color: var(--text); font-family: var(--mono); font-size: 16px; }
.day .kic { width: 34px; height: 34px; font-size: 24px; }
.ctl { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: rgba(4, 10, 24, .6); }
.ctl button { position: relative; width: 38px; height: 32px; border: 0; border-radius: 7px; background: transparent; color: #60a5fa; font-size: 15px; }
.ctl button.on { background: rgba(59, 130, 246, .2); color: #93c5fd; box-shadow: inset 0 0 10px rgba(59, 130, 246, .35); }
.ctl button small { position: absolute; right: 2px; bottom: 0; font: 700 8px var(--mono); color: #93c5fd; }
.burger { width: 40px; height: 40px; border: 0; background: transparent; color: #60a5fa; font-size: 22px; }

#left { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.sitesp { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#siteList { flex: 1; overflow-y: auto; padding: 0 8px; }
.srow { width: 100%; display: grid; grid-template-columns: 34px 1fr auto; grid-template-rows: auto auto; align-items: center; column-gap: 10px; padding: 6px 6px; background: transparent; border: 0; border-bottom: 1px solid rgba(23, 50, 90, .6); border-radius: 8px; text-align: left; }
.srow:hover { background: rgba(34, 211, 238, .05); }
.srow.on { background: linear-gradient(90deg, color-mix(in srgb, var(--c) 18%, transparent), transparent); box-shadow: inset 2px 0 0 var(--c); }
.srow .sic { grid-row: span 2; width: 32px; height: 32px; font-size: 18px; }
.srow .sn { display: flex; flex-direction: column; min-width: 0; }
.srow .sn b { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srow .sn small { font: 11px var(--mono); color: #8ea2c8; }
.srow .sv { grid-column: 2; font: 11px var(--mono); color: var(--green); }
.srow .sp { grid-column: 3; grid-row: 1 / span 2; }
.srow.bad .sn b { color: #fca5a5; }
.srow.warn .sn b { color: #fcd34d; }
.deploy { margin: 8px; padding: 8px; border: 1px dashed #2a4b7a; border-radius: 9px; background: transparent; color: #7dd3fc; font-size: 12.5px; }
.deploy:hover { background: rgba(34, 211, 238, .08); border-color: var(--cyan); }

.cycle { padding-bottom: 6px; }
.cy { position: relative; height: 92px; margin: 2px 22px 0; }
.cyline { position: absolute; left: 0; right: 0; top: 34px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, #facc15, #f59e0b 45%, #22d3ee 70%, #6366f1); opacity: .35; }
.cyline i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #facc15, #f59e0b 45%, #22d3ee 70%, #6366f1); border-radius: 2px; }
.cyline em { position: absolute; top: -5px; width: 13px; height: 13px; margin-left: -6px; border-radius: 50%; background: #fff; box-shadow: 0 0 12px #67e8f9; }
.cs { position: absolute; top: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; width: 54px; text-align: center; }
.cs .pic { width: 24px; height: 24px; font-size: 16px; }
.cs b { font: 600 11px var(--mono); margin-top: 18px; }
.cs small { font-size: 10px; line-height: 1.1; }
.cs.peak b, .cs.peak small { color: #fbbf24; }
.cs.peak .pic { width: 30px; height: 30px; margin-top: -3px; filter: drop-shadow(0 0 8px #f59e0b); }

.pitch { position: relative; height: 128px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(180deg, #0a1027, #1d0d36); flex: none; }
.pitch p { position: relative; z-index: 1; margin: 0; padding: 12px 14px; font-size: 11.5px; color: #c7d2fe; line-height: 1.45; text-shadow: 0 1px 6px #000; }
.pitch b { color: #fbbf24; }
.pitch img { position: absolute; inset: auto 0 0 0; width: 100%; height: 100%; object-fit: cover; object-position: bottom; opacity: .8; }

#center { display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: 0; }
#stage { position: relative; flex: 1; min-height: 0; border-radius: 14px; overflow: hidden; }
#net { position: absolute; inset: 0; display: block; cursor: grab; touch-action: none; }
#buymode { position: absolute; top: 10px; left: 10px; display: flex; background: rgba(6, 12, 28, .85); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; z-index: 2; }
#buymode[hidden] { display: none; }
#buymode button { background: transparent; border: 0; padding: 6px 10px; font: 11px var(--mono); color: var(--mute); }
#buymode button.on { background: var(--cyan); color: #04111a; font-weight: 700; }

#drawer { position: absolute; top: 8px; right: 8px; bottom: 8px; width: min(430px, 60%); z-index: 3; display: flex; flex-direction: column; background: rgba(7, 13, 30, .95); border: 1px solid var(--line2); border-radius: 12px; box-shadow: 0 20px 60px -10px #000, 0 0 30px -12px var(--cyan); backdrop-filter: blur(8px); }
#drawer[hidden] { display: none; }
#drawer header { display: flex; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--line); }
#drawer header h2 { flex: 1; font-size: 12.5px; letter-spacing: 1.5px; text-transform: uppercase; color: #bfdbfe; }
.x { background: transparent; border: 0; color: var(--mute); font-size: 15px; }
.x:hover { color: var(--text); }
#view { flex: 1; overflow-y: auto; padding: 12px; }
.viewhead h2 { display: none; }
.viewhead p, .lead { margin: 0 0 12px; color: var(--mute); font-size: 12.5px; }
.viewhead b { color: #c4b5fd; font-family: var(--mono); }
h3.sub { margin: 16px 0 8px; font-size: 12px; color: var(--mute); text-transform: uppercase; letter-spacing: 1px; }

#lower { height: 168px; flex: none; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 12px; }
.rdp, .hire { display: flex; flex-direction: column; min-width: 0; }
#rdRow { flex: 1; display: flex; gap: 6px; overflow-x: auto; padding: 0 12px; align-items: flex-start; }
.hex { flex: none; width: 64px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 2px 0; background: transparent; border: 0; border-radius: 8px; text-align: center; opacity: .55; }
.hex .hic { width: 44px; height: 44px; font-size: 22px; }
.hex span { font-size: 10.5px; line-height: 1.1; color: #93c5fd; }
.hex small { font: 9px var(--mono); }
.hex.can { opacity: 1; animation: glow 1.6s ease-in-out infinite; }
.hex.max { opacity: 1; }
.hex.max small { color: var(--green); }
.hex:hover { background: rgba(59, 130, 246, .08); opacity: 1; }
.hex.locked { opacity: .35; font-size: 20px; padding-top: 10px; }
@keyframes glow { 50% { filter: drop-shadow(0 0 8px rgba(34, 211, 238, .8)); } }
.prog { position: relative; margin: 6px 14px 12px; height: 5px; border-radius: 3px; background: rgba(59, 130, 246, .15); }
.prog i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: linear-gradient(90deg, #22d3ee, #3b82f6); box-shadow: 0 0 8px #22d3ee; }
.prog span { position: absolute; right: 0; top: -17px; font: 11px var(--mono); color: #7dd3fc; }
#hireRow { flex: 1; display: flex; gap: 8px; overflow-x: auto; padding: 0 12px 12px; }
.hcard { flex: none; width: 92px; display: flex; flex-direction: column; align-items: stretch; gap: 3px; padding: 5px; background: rgba(12, 24, 52, .7); border: 1px solid var(--line); border-radius: 9px; }
.hcard .por { width: 100%; height: 58px; border-radius: 6px; overflow: hidden; background: radial-gradient(circle at 50% 30%, #1e3a8a, #0b1530); font-size: 26px; }
.hcard .por img { object-fit: cover; object-position: top; }
.hcard b { font-size: 11px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm { display: flex; align-items: center; justify-content: space-between; gap: 2px; }
.hm small { font: 9.5px var(--mono); color: var(--green); }
.plus { width: 20px; height: 20px; padding: 0; border-radius: 50%; border: 1px solid #3b5a8a; background: transparent; font-size: 12px; line-height: 1; }
.plus:not(:disabled):hover { border-color: var(--cyan); color: var(--cyan); }
.hcard.more { justify-content: center; align-items: center; border-style: dashed; background: transparent; color: #7dd3fc; }
.hcard.more span { font-size: 24px; }

#right { display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow-y: auto; }
#feed { display: flex; flex-direction: column; gap: 8px; }
.nf { position: relative; display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 10px; border: 1px solid; background: rgba(8, 14, 30, .9); overflow: hidden; }
.nf .nic { width: 30px; height: 30px; font-size: 20px; }
.nf b { display: block; font-size: 12.5px; letter-spacing: .3px; }
.nf p { margin: 2px 0 0; font-size: 11.5px; color: #c3cde3; line-height: 1.3; }
.nf time { font: 11px var(--mono); color: #c3cde3; }
.nf.live { cursor: pointer; }
.nf.alert { border-color: #b91c1c; background: linear-gradient(90deg, rgba(127, 29, 29, .55), rgba(30, 10, 20, .85)); box-shadow: 0 0 18px -6px rgba(239, 68, 68, .7); }
.nf.alert b { color: #fca5a5; }
.nf.peak { border-color: #b45309; background: linear-gradient(90deg, rgba(120, 53, 15, .5), rgba(26, 16, 8, .85)); }
.nf.peak b { color: #fcd34d; }
.nf.info { border-color: #1d4ed8; background: linear-gradient(90deg, rgba(30, 58, 138, .45), rgba(8, 14, 34, .85)); }
.nf.info b { color: #93c5fd; }
.nf.done { border-color: #15803d; background: linear-gradient(90deg, rgba(20, 83, 45, .5), rgba(8, 22, 16, .85)); }
.nf.done b { color: #86efac; }
.fix { align-self: end; padding: 3px 9px; border-radius: 6px; border: 1px solid #ef4444; background: rgba(239, 68, 68, .12); color: #fca5a5; font: 700 10.5px var(--mono); white-space: nowrap; }
.fix:hover { background: rgba(239, 68, 68, .3); }
.nf.peak .fix { border-color: #f59e0b; color: #fcd34d; background: rgba(245, 158, 11, .12); }
.nfp { position: absolute; left: 0; bottom: 0; height: 2px; background: currentColor; color: #f87171; }
.nf.peak .nfp { color: #fbbf24; }

.overview { padding-bottom: 8px; }
.ov { display: grid; grid-template-columns: 30px 1fr auto; grid-template-rows: auto 8px; column-gap: 10px; align-items: center; padding: 5px 14px; }
.ov .ovi { grid-row: span 2; width: 28px; height: 28px; font-size: 17px; }
.ov span { font-size: 12px; color: #dbe7ff; }
.ov b { font: 600 12px var(--mono); }
.ovb { grid-column: 2 / span 2; height: 5px; border-radius: 3px; background: rgba(148, 163, 184, .14); overflow: hidden; }
.ovb i { display: block; height: 100%; border-radius: 3px; transition: width .3s; }
.ovb i.c { background: linear-gradient(90deg, #06b6d4, #22d3ee); box-shadow: 0 0 6px #22d3ee; }
.ovb i.b { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.ovb i.g { background: linear-gradient(90deg, #10b981, #34d399); }

.zoomp { position: relative; overflow: hidden; padding-bottom: 10px; flex: none; }
.zbar { display: flex; align-items: center; gap: 10px; margin: 0 14px 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(4, 10, 24, .5); }
#zdots { flex: 1; }
.zbtn { display: flex; flex-direction: column; gap: 2px; }
.zbtn button { width: 26px; height: 22px; border: 1px solid var(--line); border-radius: 5px; background: transparent; color: #93c5fd; font-size: 13px; line-height: 1; padding: 0; }
.zbtn button:hover { border-color: var(--cyan); }
.zlist { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 4px; padding: 0 14px; }
.zl { display: flex; align-items: center; gap: 8px; background: transparent; border: 0; padding: 2px 0; font-size: 12.5px; color: #9fb0d0; text-align: left; width: max-content; }
.zl i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid #3b5a8a; }
.zl.on { color: var(--green); }
.zl.on i { border-color: var(--green); background: var(--green); box-shadow: 0 0 8px var(--green); }
.zd { position: relative; display: flex; justify-content: space-between; align-items: center; height: 20px; }
.zd::before { content: ''; position: absolute; left: 6px; right: 6px; top: 50%; border-top: 1px dashed #2d4e7d; }
.zd i { position: relative; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid #3b5a8a; background: #07102a; }
.zd i.past { border-color: #0e7490; }
.zd i.on { border-color: var(--green); background: var(--green); box-shadow: 0 0 10px var(--green); }
.zlist { margin-top: 0; }
.wmap { position: absolute; right: 6px; bottom: 6px; width: 62%; opacity: .7; pointer-events: none; }

#bottom { grid-column: 1 / -1; display: flex; gap: 10px; align-items: stretch; }
.seg { flex: 1; display: flex; align-items: center; gap: 12px; padding: 0 22px; min-width: 0; background: linear-gradient(180deg, rgba(12, 24, 52, .95), rgba(8, 16, 36, .92)); border: 1px solid var(--line2); clip-path: polygon(4% 0, 100% 0, 96% 100%, 0 100%); text-align: left; }
.seg:first-child { clip-path: polygon(0 0, 100% 0, 96% 100%, 0 100%); }
.seg:hover, .seg.on { background: linear-gradient(180deg, rgba(20, 40, 84, .95), rgba(10, 22, 48, .95)); }
.seg .kic { width: 36px; height: 36px; font-size: 24px; flex: none; }
.seg .lbl { font: 700 12.5px/1.2 var(--sans); letter-spacing: 1px; color: #bfdbfe; display: flex; flex-direction: column; }
.seg .lbl small { font: 500 10.5px ui-sans-serif, system-ui, sans-serif; letter-spacing: 0; }
.seg > b { margin-left: auto; font: 600 13px var(--mono); color: #7dd3fc; }
.seg.evo { flex: 1.6; }
.rank { padding: 3px 7px; border: 1px solid #3b82f6; border-radius: 6px; font: 800 17px var(--mono); color: #bfdbfe; box-shadow: 0 0 10px -2px #3b82f6; }
.evobar { flex: 1; height: 5px; border-radius: 3px; background: rgba(59, 130, 246, .15); overflow: hidden; }
.evobar i { display: block; height: 100%; background: linear-gradient(90deg, #22d3ee, #3b82f6); box-shadow: 0 0 6px #22d3ee; }
.seg.ipo .lbl b { color: var(--green); font: 600 12px var(--mono); }
.seg.ipo .kic { margin-left: auto; }
.sq { width: 58px; flex: none; display: grid; place-items: center; background: linear-gradient(180deg, rgba(12, 24, 52, .95), rgba(8, 16, 36, .92)); border: 1px solid var(--line2); border-radius: 10px; }
.sq .kic { width: 30px; height: 30px; font-size: 20px; }
.sq.help { font-size: 18px; font-weight: 800; color: var(--green); }
.sq.help::before { content: ''; }

button:not(.seg):not(.sq):not(.srow):not(.hex):not(.plus):not(.hcard):not(.zl):not(.fix):not(.x):not(.burger):not(.deploy):not(#angel):not([data-a="mode"]):not(.ctl button):not(.zbtn button) { background: linear-gradient(180deg, #13244a, #0e1a36); border: 1px solid #24406e; border-radius: 9px; padding: 7px 11px; transition: border-color .15s; }
#view button:hover:not(:disabled) { border-color: var(--cyan); }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: .42; cursor: not-allowed; }
#view button small { display: block; font-size: 10.5px; font-family: var(--mono); }
button.danger { border-color: #7f1d1d !important; background: linear-gradient(180deg, #3b1218, #2a0d12) !important; animation: pulse 1.2s infinite; }
button.toggle { border-color: #4c3a8a !important; }
.ghost { background: transparent !important; border: 1px solid var(--line) !important; border-radius: 8px; color: var(--mute); padding: 6px 10px; }
.ghost:hover:not(:disabled) { color: var(--text); border-color: var(--mute) !important; }
@keyframes pulse { 50% { box-shadow: 0 0 0 3px rgba(239, 68, 68, .15); } }

.sites { display: flex; flex-direction: column; gap: 12px; }
.site { background: var(--panel2); border: 1px solid var(--line); border-top: 2px solid var(--c); border-radius: 12px; padding: 12px; }
.site header { display: flex; align-items: center; gap: 10px; }
.site .ttl { flex: 1; min-width: 0; }
.site h3 { font-family: var(--mono); font-size: 14px; color: var(--c); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site .ttl small { font-size: 11px; }
.pill { font: 800 10px var(--mono); padding: 3px 8px; border-radius: 5px; letter-spacing: .5px; }
.pill.ok { background: rgba(34, 197, 94, .14); color: var(--ok); }
.pill.warn { background: #d97706; color: #fff; }
.pill.bad { background: #b91c1c; color: #fff; animation: pulse 1s infinite; }
.pill.hot { background: rgba(168, 85, 247, .25); color: #d8b4fe; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 10px 0 8px; }
.kpi { background: #081024; border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; }
.kpi small { display: block; font-size: 9.5px; text-transform: uppercase; letter-spacing: .8px; }
.kpi b { font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.kpi b.ok { color: var(--ok); } .kpi b.warn { color: var(--warn); } .kpi b.bad { color: var(--bad); }
.meter { position: relative; height: 18px; background: #060c1e; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; margin-bottom: 5px; }
.meter i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #10b981, #22d3ee); opacity: .45; transition: width .25s; }
.meter i.warn { background: var(--warn); } .meter i.bad { background: var(--bad); opacity: .55; }
.meter.rep i { background: var(--c); opacity: .3; }
.meter span { position: relative; display: block; padding: 0 8px; font: 10.5px/18px var(--mono); }
.tiers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 10px 0; }
.tier { background: #081024; border: 1px solid var(--line); border-radius: 9px; padding: 7px; display: flex; flex-direction: column; gap: 2px; }
.tier .tt { display: flex; gap: 6px; align-items: center; }
.tier .tt > div { display: flex; flex-direction: column; min-width: 0; }
.tier .tt b { font-family: var(--mono); color: var(--cyan); font-size: 11px; }
.tier .tt span { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tier .tc { font-family: var(--mono); font-size: 16px; }
.tier .tc em { font-style: normal; font-size: 11px; color: var(--bad); }
.tb { display: flex; gap: 4px; margin-top: 4px; }
.tb button:first-child { flex: 1; font-family: var(--mono); font-size: 11px; padding: 5px 6px !important; }
.tb .ghost { padding: 4px 9px; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.actions button { text-align: left; font-size: 12.5px; }
.hint { margin: 8px 0 0; font-size: 12px; color: var(--warn); }
.hint:empty { display: none; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.card { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 5px; }
.card .big { font-size: 24px; }
.card h3 { font-size: 13px; }
.card p { margin: 0; color: var(--mute); font-size: 12px; flex: 1; }
.card button { margin-top: 4px; font-size: 12px; }
.card.type { border-top: 2px solid var(--c); }
.card.type h3 { color: var(--c); }
.card.done { opacity: .55; }
.card.locked { opacity: .45; border-style: dashed; }
.count { font-family: var(--mono); color: var(--cyan); margin-left: 4px; }
.specs { list-style: none; padding: 0; margin: 4px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; font-size: 11px; color: var(--mute); }
.specs b { display: block; color: var(--text); font-family: var(--mono); }
.pips { display: flex; gap: 3px; }
.pips i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.pips i.on { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.ipo { display: grid; grid-template-columns: 1fr; gap: 8px; }
.ipo .huge { font-family: var(--mono); font-size: 24px; color: var(--green); }
.ipo .hl { border-color: var(--green); box-shadow: 0 0 30px -14px var(--green); }
.perks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.perk { background: var(--panel2); border: 1px dashed var(--line); border-radius: 9px; padding: 8px; display: flex; flex-direction: column; opacity: .55; font-size: 12px; }
.perk.on { opacity: 1; border-style: solid; border-color: var(--green); }
.perk b { font-family: var(--mono); color: var(--green); font-size: 11px; }
.achs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ach { display: grid; grid-template-columns: 26px 1fr; background: var(--panel2); border: 1px solid var(--line); border-radius: 9px; padding: 8px; opacity: .45; font-size: 12px; }
.ach span { grid-row: span 2; font-size: 17px; }
.ach.on { opacity: 1; border-color: #a16207; }
.tbl { display: block; overflow-x: auto; width: 100%; border-collapse: collapse; background: var(--panel2); border-radius: 10px; font-size: 12px; }
.tbl th, .tbl td { padding: 6px 8px; text-align: right; border-bottom: 1px solid var(--line); font-family: var(--mono); white-space: nowrap; }
.tbl th { color: var(--mute); font-weight: 500; font-size: 10px; text-transform: uppercase; font-family: inherit; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.statgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 12px; }
.statgrid div { background: var(--panel2); border: 1px solid var(--line); border-radius: 9px; padding: 6px 10px; }
.statgrid small { display: block; font-size: 10.5px; }
.statgrid b { font-family: var(--mono); font-size: 13px; }
.logview { font: 11.5px/1.5 var(--mono); }
.logview p { margin: 0 0 5px; color: #b7c3dc; }
.logview time { color: #4b5b7c; margin-right: 6px; }
.logview .good { color: var(--green); } .logview .bad { color: #f87171; } .logview .warn { color: var(--warn); }

.pic { display: inline-grid; place-items: center; }
.pic img { width: 100%; height: 100%; object-fit: contain; }
.site .ico.pic { width: 44px; height: 44px; font-size: 20px; }
.tier .pic.srv { width: 34px; height: 34px; flex: none; font-size: 16px; }
.card .big .pic { width: 60px; height: 60px; font-size: 26px; }
.card .big .pic.portrait img { border-radius: 10px; }

#angel { position: fixed; z-index: 40; display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--warn); background: linear-gradient(135deg, #3d2f07, #6b4f0a); color: #fff7d6; font-size: 26px; box-shadow: 0 0 30px rgba(245, 158, 11, .6); animation: bob 1.6s ease-in-out infinite; }
#angel span { font-size: 12px; text-align: left; }
#angel .pic { width: 46px; height: 46px; }
#angel[hidden] { display: none; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-2deg); } }

#modal { position: fixed; inset: 0; z-index: 50; background: rgba(2, 5, 12, .7); display: grid; place-items: center; backdrop-filter: blur(3px); }
#modal[hidden] { display: none; }
#modal .box { width: min(500px, 92vw); background: #0a1328; border: 1px solid var(--line2); border-radius: 16px; padding: 20px; box-shadow: 0 0 40px -10px var(--cyan); }
#modal h3 { color: #bfdbfe; }
#modal p { color: var(--mute); }
#modal textarea { width: 100%; height: 120px; background: #050a18; color: var(--text); border: 1px solid var(--line); border-radius: 8px; font: 11px var(--mono); padding: 8px; }
#modal .actions { justify-content: flex-end; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #1e3a64; border-radius: 3px; }

@media (max-width: 1380px) {
  #app { grid-template-columns: 240px minmax(0, 1fr) 270px; }
  .k { padding: 0 16px; }
  .logo { width: 220px; }
  .logo b { font-size: 34px; }
  .seg { padding: 0 14px; }
  .seg .lbl small { display: none; }
}
@media (max-width: 1150px) {
  #app { grid-template-columns: 220px minmax(0, 1fr); }
  #right { display: none; }
  .kpibar .k:nth-child(3), .pitch { display: none; }
}
@media (max-width: 800px) {
  html, body { overflow: auto; }
  #app { height: auto; grid-template-columns: 1fr; grid-template-rows: auto; }
  #top { flex-wrap: wrap; }
  .logo, .dayctl { width: auto; }
  #stage { height: 60vh; flex: none; }
  #lower { height: auto; grid-template-columns: 1fr; }
  #bottom { flex-wrap: wrap; }
  .seg { flex: 1 1 45%; height: 56px; }
}

#quest { padding: 0 0 12px; flex: none; border-color: #1d4ed8; box-shadow: 0 0 22px -10px #3b82f6; }
#quest .qt { padding: 0 14px; }
#quest .qt b { display: block; font-size: 13.5px; color: #e0f2fe; }
#quest .qt p { margin: 3px 0 8px; font-size: 11.5px; color: #9fb0d0; }
#quest .qbar { margin: 0 14px; height: 6px; border-radius: 3px; background: rgba(59, 130, 246, .15); overflow: hidden; }
#quest .qbar i { display: block; height: 100%; background: linear-gradient(90deg, #22d3ee, #3b82f6); box-shadow: 0 0 6px #22d3ee; transition: width .3s; }
#quest .qf { display: flex; align-items: center; gap: 8px; padding: 8px 14px 0; font: 11px var(--mono); color: #7dd3fc; }
#quest .qf .rw { color: var(--green); margin-right: auto; }
#quest .claim { padding: 5px 12px !important; border-color: var(--green) !important; color: #bbf7d0; animation: glow 1.4s infinite; }
#quest .skip { padding: 4px 8px !important; font-size: 11px; }
#quest.done { border-color: var(--green); box-shadow: 0 0 26px -8px var(--green); }
.k.streak b { color: #fbbf24; }
.k.streak.hot b { text-shadow: 0 0 12px rgba(251, 191, 36, .6); }
.sla { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 8px; }
.sla button { padding: 5px 4px !important; font-size: 11px; text-align: center !important; }
.sla button.on { border-color: var(--green) !important; background: rgba(34, 197, 94, .14) !important; color: #bbf7d0; }
.slah { display: flex; justify-content: space-between; margin-top: 10px; font-size: 11px; color: var(--mute); }
.slah b { font-family: var(--mono); }
.slah b.ok { color: var(--green); } .slah b.ko { color: var(--bad); }
