/* =========================================================
   KeyKey — beyaz & mavi tema
   ========================================================= */
:root {
  color-scheme: light;
  --bg: #f5f8ff;
  --bg-2: #eef4ff;
  --surface: #ffffff;
  --surface-2: #f8fbff;
  --ink: #0b1b3a;
  --ink-2: #26375a;
  --muted: #5d6b88;
  --line: #e3eaf6;
  --line-2: #cfdaf0;
  --blue: #2563eb;
  --blue-600: #1d4ed8;
  --blue-700: #1e40af;
  --blue-50: #eff5ff;
  --blue-100: #dbe8ff;
  --blue-200: #bcd3ff;
  --sky: #0ea5e9;
  --ok: #047857; --ok-bg: #e5f7ef;
  --warn: #b45309; --warn-bg: #fff4e0;
  --bad: #dc2626; --bad-bg: #fdecec;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 40, 90, .06);
  --shadow: 0 1px 2px rgba(16, 40, 90, .05), 0 10px 30px -12px rgba(16, 40, 90, .14);
  --shadow-lg: 0 24px 60px -20px rgba(16, 40, 90, .35);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body.modal-open { overflow: hidden; }
h1, h2, h3, h4, h5 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--blue); text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .container { padding: 0 16px; } }

.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
.icon-xl { width: 44px; height: 44px; color: var(--blue); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.center { text-align: center; justify-content: center; }
.mt { margin-top: 12px; }
.grow { flex: 1 1 auto; min-width: 0; }
.spacer { flex: 1 1 auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--blue); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Düğmeler ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: 10px; border: 1px solid var(--blue); background: var(--blue); color: #fff;
  font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .05s;
  box-shadow: 0 1px 2px rgba(37, 99, 235, .25);
}
.btn:hover { background: var(--blue-600); border-color: var(--blue-600); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: var(--surface); color: var(--blue-700); border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { background: var(--blue-50); border-color: var(--blue-200); }
.btn-ghost.active { background: var(--blue-100); border-color: var(--blue-200); }
.btn-danger { background: var(--bad); border-color: var(--bad); }
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 9px; gap: 6px; }
.btn-xs { padding: 3px 8px; font-size: 12px; border-radius: 7px; }
.btn-lg { padding: 12px 20px; font-size: 15px; border-radius: 12px; }

.chip-btn {
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); border-radius: 999px;
  padding: 4px 11px; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.chip-btn:hover { border-color: var(--blue-200); background: var(--blue-50); color: var(--blue-700); }

/* ---------- Form ---------- */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 500; }
.field-inline { flex-direction: row; align-items: center; gap: 8px; }
.field > span { white-space: nowrap; }
.select, .input {
  border: 1px solid var(--line-2); background: var(--surface); border-radius: 9px; padding: 7px 10px;
  font-size: 13.5px; color: var(--ink); min-width: 0; max-width: 100%;
}
.select { padding-right: 28px; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235d6b88' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; }
.select-sm { padding: 4px 24px 4px 8px; font-size: 12.5px; border-radius: 7px; background-position: right 6px center; }
.select:focus, .input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-100); }
.range { accent-color: var(--blue); }
.range.wide { width: 100%; }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; user-select: none; }
.check input { accent-color: var(--blue); width: 16px; height: 16px; }
.color { width: 36px; height: 30px; border: 1px solid var(--line-2); border-radius: 8px; padding: 2px; background: #fff; cursor: pointer; }

.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row.wrap, .gap-sm.wrap { flex-wrap: wrap; }
.gap-sm { gap: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40; height: var(--header-h);
  background: rgba(255, 255, 255, .86); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.brand-mark svg { width: 32px; height: 32px; display: block; }
.brand-mark rect:first-child { fill: var(--blue); }
.brand-mark .cap { fill: #fff; }
.brand-mark .k { stroke: var(--blue); stroke-width: 2; stroke-linecap: round; fill: none; }
.brand-text { font-weight: 800; font-size: 19px; letter-spacing: -0.02em; }
.brand-text b { color: var(--blue); }
.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav a { color: var(--ink-2); font-weight: 500; font-size: 14px; padding: 7px 12px; border-radius: 8px; }
.nav a:hover { background: var(--blue-50); color: var(--blue-700); }
.nav a.active { color: var(--blue-700); background: var(--blue-50); }
.live-pill {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--ok);
  background: var(--ok-bg); padding: 5px 11px; border-radius: 999px;
}
.lang-switch { display: inline-flex; padding: 3px; gap: 2px; background: #eaf0fa; border-radius: 10px; flex: none; }
.lang-switch button { border: 0; background: transparent; padding: 5px 9px; border-radius: 8px; font-size: 12.5px; font-weight: 700; color: var(--muted); cursor: pointer; letter-spacing: .02em; }
.lang-switch button:hover { color: var(--blue-700); }
.lang-switch button.active { background: #fff; color: var(--blue-700); box-shadow: var(--shadow-sm); }
@media (max-width: 560px) { .live-pill { display: none; } .lang-switch { margin-left: auto; } .header-inner { gap: 12px; } }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.dot.live { background: #10b981; box-shadow: 0 0 0 0 rgba(16, 185, 129, .5); animation: ping 2s infinite; }
.dot.wait { background: #cbd5e1; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .45); } 70% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); } 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } }
@media (max-width: 720px) { .nav { display: none; } }

/* ---------- Üst yarı: cihazlar ---------- */
.devices-section {
  padding: 48px 0 56px;
  background:
    radial-gradient(1200px 420px at 85% -10%, rgba(37, 99, 235, .13), transparent 60%),
    radial-gradient(800px 380px at 0% 0%, rgba(14, 165, 233, .10), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}
.hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 40px; align-items: center; margin-bottom: 40px; }
.eyebrow { display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); margin-bottom: 12px; }
.hero h1 { font-size: clamp(30px, 4.4vw, 48px); font-weight: 800; letter-spacing: -0.03em; }
.hl { color: var(--blue); background: linear-gradient(180deg, transparent 62%, var(--blue-100) 62%); padding: 0 2px; }
.lead { font-size: 17px; color: var(--ink-2); margin-top: 16px; max-width: 640px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sum-item {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 2px;
}
.sum-item .icon { color: var(--blue); width: 20px; height: 20px; margin-bottom: 6px; }
.sum-item b { font-size: 26px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.sum-item span { font-size: 12.5px; color: var(--muted); }
.sum-item:first-child { background: var(--blue); border-color: var(--blue); color: #fff; }
.sum-item:first-child .icon, .sum-item:first-child span { color: rgba(255, 255, 255, .85); }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; gap: 28px; } }
@media (max-width: 420px) { .hero-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.grid-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.grid-head h2 { font-size: 22px; font-weight: 700; }
.device-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.device-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow-sm); min-width: 0;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.device-card:hover { border-color: var(--blue-200); box-shadow: var(--shadow); transform: translateY(-2px); }
.device-card.live { border-top: 3px solid var(--blue); padding-top: 16px; }
.device-card.wait { background: var(--surface-2); }
.device-card.is-placeholder { border-style: dashed; border-color: var(--line-2); grid-column: span 2; }
@media (max-width: 600px) { .device-card.is-placeholder { grid-column: auto; } }
.device-card.pulse { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-100), var(--shadow); }
.dc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.dc-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-50); color: var(--blue); }
.dc-icon .icon { width: 22px; height: 22px; }
.wait .dc-icon { background: #eef2f8; color: #7b8aa6; }
.dc-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.live .dc-status { color: var(--ok); }
.dc-name { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-type { font-size: 12.5px; color: var(--blue-700); font-weight: 600; }
.dc-meta { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--ink-2); }
.dc-meta li { overflow: hidden; text-overflow: ellipsis; }
.dc-live { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding: 7px 10px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; }
.dc-live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #cbd5e1; flex: none; }
.dc-live.active { background: var(--blue-50); border-color: var(--blue-200); }
.dc-live.active::before { background: var(--blue); }
.dc-live.active .dc-live-txt { color: var(--blue-700); font-weight: 600; }
.dc-actions { margin-top: auto; padding-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }

.hint-row { margin-top: 20px; }
.hint { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.hint .icon { color: var(--blue); margin-top: 2px; }

/* ---------- Alt yarı: test kataloğu ---------- */
.tests-section { padding: 72px 0 40px; }
.section-intro { max-width: 820px; margin-bottom: 40px; }
.section-intro h2, .faq-section h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; letter-spacing: -0.025em; }
.quick-tests { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.quick {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px 7px 10px; border-radius: 999px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--ink-2);
}
.quick .icon { color: var(--blue); }
.quick:hover { border-color: var(--blue-200); background: var(--blue-50); color: var(--blue-700); }

.cat { margin-bottom: 48px; }
.cat-head { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 24px; align-items: baseline; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.cat-head h3 { font-size: 20px; font-weight: 700; }
.cat-head p { color: var(--muted); font-size: 14.5px; }
@media (max-width: 760px) { .cat-head { grid-template-columns: 1fr; gap: 6px; } }
.test-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: 16px; }
.test-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-sm); transition: border-color .2s, box-shadow .2s;
}
.test-card:hover { border-color: var(--blue-200); box-shadow: var(--shadow); }
.tc-head { display: flex; gap: 14px; align-items: flex-start; }
.tc-icon { width: 46px; height: 46px; border-radius: 13px; background: linear-gradient(135deg, var(--blue), var(--sky)); color: #fff; display: grid; place-items: center; flex: none; }
.tc-icon .icon { width: 24px; height: 24px; }
.tc-head h4 { font-size: 17px; font-weight: 700; }
.tc-short { color: var(--blue-700); font-size: 13.5px; font-weight: 500; margin-top: 3px; }
.tc-about { color: var(--ink-2); font-size: 14.5px; }
.tc-cols { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; }
@media (max-width: 560px) { .tc-cols { grid-template-columns: 1fr; } }
.tc-cols h5 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.tc-checks, .tc-devices { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.tc-checks li { display: flex; gap: 8px; align-items: flex-start; }
.tc-checks .icon { color: var(--blue); margin-top: 3px; width: 15px; height: 15px; stroke-width: 2.5; }
.tc-devices li { padding: 6px 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; color: var(--ink-2); }
.tc-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.support { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.support.ok { color: var(--ok); }
.support.no { color: var(--warn); }

.device-cloud { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; margin-top: 8px; }
.device-cloud h3 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.cloud { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cloud li { padding: 6px 12px; border-radius: 999px; background: var(--blue-50); color: var(--blue-700); font-size: 13px; font-weight: 500; }

/* ---------- SSS ---------- */
.faq-section { padding: 56px 0 72px; background: linear-gradient(180deg, var(--bg) 0%, #fff 100%); border-top: 1px solid var(--line); }
.faq-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 40px; align-items: start; }
@media (max-width: 900px) { .faq-layout { grid-template-columns: 1fr; } }
.faq { margin-top: 24px; display: flex; flex-direction: column; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; }
.faq details[open] { border-color: var(--blue-200); box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; padding: 15px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--blue); font-weight: 700; font-size: 18px; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq details p { padding: 0 0 16px; color: var(--ink-2); font-size: 14.5px; }
.support-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; position: sticky; top: calc(var(--header-h) + 16px); box-shadow: var(--shadow-sm); }
.support-box h3 { font-size: 17px; margin-bottom: 14px; }
.support-list { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.support-list li { display: flex; gap: 10px; align-items: center; }
.support-list .icon { width: 20px; height: 20px; padding: 3px; border-radius: 6px; stroke-width: 2.6; }
.support-list .ok .icon { background: var(--ok-bg); color: var(--ok); }
.support-list .no .icon { background: #f1f5f9; color: #94a3b8; }
.support-list .no span { color: var(--muted); }

.site-footer { border-top: 1px solid var(--line); background: #fff; padding: 28px 0; }
.footer-inner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; justify-content: space-between; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: stretch; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15, 30, 65, .38); backdrop-filter: blur(3px); opacity: 0; transition: opacity .2s; }
.modal-panel {
  position: relative; width: 100%; max-width: 1280px; background: var(--bg); border-radius: 20px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; overflow: hidden; transform: translateY(14px) scale(.99); opacity: 0; transition: transform .22s, opacity .22s;
}
.modal.open .modal-backdrop { opacity: 1; }
.modal.open .modal-panel { transform: none; opacity: 1; }
.modal-head { display: flex; align-items: center; gap: 14px; padding: 16px 22px; background: #fff; border-bottom: 1px solid var(--line); }
.modal-icon { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, var(--blue), var(--sky)); color: #fff; display: grid; place-items: center; flex: none; }
.modal-icon .icon { width: 22px; height: 22px; }
.modal-titles { min-width: 0; flex: 1; }
.modal-title { font-size: 18px; font-weight: 700; }
.modal-sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.modal-switch .select { max-width: 240px; }
@media (max-width: 760px) { .modal-switch { display: none; } }
.modal-body { flex: 1; overflow: auto; padding: 20px 22px 28px; display: flex; flex-direction: column; gap: 16px; overscroll-behavior: contain; }
.modal-body > div:not([class]) { display: flex; flex-direction: column; gap: 16px; }
.modal-body > *, .modal-body > div:not([class]) > *, section[data-tab] > *, [data-role="live"] > * { flex-shrink: 0; }
@media (max-width: 640px) {
  .modal { padding: 0; }
  .modal-panel { border-radius: 0; }
  .modal-head { padding: 12px 16px; }
  .modal-body { padding: 16px; }
  .modal-sub { display: none; }
}

/* ---------- Test bileşenleri ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: var(--shadow-sm); min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-head .panel-title { margin-bottom: 0; }
.panel-title { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.mini-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 8px; }
.section-mini { font-size: 15px; font-weight: 700; margin-top: 4px; }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .cols-2 { grid-template-columns: 1fr; } }
.empty { color: var(--muted); padding: 20px; text-align: center; background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: 12px; }

.note { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; background: var(--blue-50); border: 1px solid var(--blue-100); color: var(--ink-2); font-size: 13.5px; }
.note > .icon { color: var(--blue); margin-top: 2px; }
.note-soft { background: var(--surface); border-color: var(--line); }
.note-warn { background: var(--warn-bg); border-color: #fde3b0; }
.note-warn > .icon { color: var(--warn); }
.tag-blue { background: var(--blue); color: #fff; padding: 0 6px; border-radius: 4px; font-weight: 600; }
.tag-soft { background: var(--blue-100); color: var(--blue-700); padding: 0 6px; border-radius: 4px; font-weight: 600; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #eef2f8; color: var(--muted); white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }

.kbd { display: inline-block; font-family: var(--mono); font-size: 12px; padding: 2px 7px; margin: 2px 3px 2px 0; border-radius: 6px; background: var(--surface); border: 1px solid var(--line-2); border-bottom-width: 2px; color: var(--ink-2); }
.kbd.tested { background: var(--blue-50); border-color: var(--blue-200); color: var(--blue-700); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.stat-grid.tight { gap: 8px; }
.stat-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.panel .stat { background: var(--surface-2); }
.stat > span { font-size: 11.5px; color: var(--muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat > b { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat > b.bad, b.bad { color: var(--bad); }
.stat > b.ok, b.ok { color: var(--ok); }
.stat > b.warn, b.warn { color: var(--warn); }
.progress { height: 6px; border-radius: 99px; background: var(--blue-100); overflow: hidden; margin-top: 4px; }
.progress.big { height: 12px; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--sky)); border-radius: inherit; transition: width .12s; }
.big-number { display: flex; align-items: baseline; gap: 8px; }
.big-number b { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--blue-700); line-height: 1.1; }
.big-number span { color: var(--muted); font-weight: 600; }
.big-number.center { justify-content: center; }

.kv { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.kv th, .kv td { text-align: left; padding: 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.kv th { color: var(--muted); font-weight: 500; width: 44%; padding-right: 12px; }
.kv td { font-family: var(--mono); font-size: 12.5px; word-break: break-word; }
.kv tr:last-child th, .kv tr:last-child td { border-bottom: none; }

.log { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow: auto; font-size: 12.5px; display: flex; flex-direction: column; }
.log li { padding: 5px 8px; border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.log li:first-child { background: var(--blue-50); border-radius: 6px; }
.log-dir { font-weight: 700; width: 14px; text-align: center; color: var(--muted); }
.log-dir.dn { color: var(--blue); }
.log-dir.up { color: #94a3b8; }

.seg { display: inline-flex; padding: 3px; background: #eaf0fa; border-radius: 10px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button:hover { color: var(--blue-700); }
.seg button.active { background: #fff; color: var(--blue-700); box-shadow: var(--shadow-sm); }

.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted); }
.legend span::before { content: ''; display: inline-block; width: 10px; height: 3px; border-radius: 2px; background: var(--c); margin-right: 6px; vertical-align: middle; }
canvas.spark { width: 100%; height: 70px; display: block; margin: 8px 0; }
canvas.chart { width: 100%; height: 180px; display: block; background: var(--surface-2); border-radius: 10px; }
.plain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; }

.toast-host { position: fixed; z-index: 200; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 13.5px; box-shadow: var(--shadow-lg); animation: toastIn .2s ease-out; transition: opacity .4s, transform .4s; }
.toast-warn { background: #7c2d12; }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Ham eksenler/düğmeler ---------- */
.raw-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 22px; }
@media (max-width: 860px) { .raw-grid { grid-template-columns: 1fr; } }
.axes-list { display: flex; flex-direction: column; gap: 6px; }
.axis-row { display: grid; grid-template-columns: 62px minmax(0, 1fr) 66px 60px; gap: 10px; align-items: center; font-size: 12.5px; }
.axis-name { color: var(--muted); font-weight: 600; }
.axis-val { text-align: right; }
.axis-noise { color: var(--muted); text-align: right; font-size: 11.5px; }
.axis-row.noisy .axis-noise { color: var(--warn); font-weight: 600; }
.axis-row.out .axis-fill { background: #94a3b8; }
.axis-bar { position: relative; height: 12px; background: var(--blue-50); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.axis-bar.wide { height: 16px; }
.axis-center { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--blue-200); }
.axis-fill { position: absolute; top: 0; bottom: 0; left: 50%; width: 0; background: linear-gradient(90deg, var(--blue), var(--sky)); }
.btn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 6px; }
.btn-cell { position: relative; height: 38px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface-2); overflow: hidden; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.btn-cell i { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: var(--blue-200); }
.btn-cell span { position: relative; }
.btn-cell.seen { border-color: var(--blue-200); color: var(--blue-700); background: var(--blue-50); }
.btn-cell.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-cell.on i { background: transparent; }

.pad-picker { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pad-picker .select { min-width: 220px; max-width: min(520px, 100%); }
.pad-picker .field { flex: 1 1 300px; min-width: 0; }
.pad-picker .field .select { flex: 1; }
.pad-meta { font-size: 12.5px; font-family: var(--mono); }

/* ---------- Klavye ---------- */
.kb-scroller { overflow-x: auto; padding-bottom: 4px; }
.kb-board {
  position: relative; width: calc(100% - 24px); min-width: 720px; aspect-ratio: 22.5 / 6.25;
  background: linear-gradient(180deg, #f8fbff, #eef3fc); border: 12px solid #e9eff9; border-radius: 18px;
  box-shadow: inset 0 1px 0 #fff, var(--shadow-sm); box-sizing: content-box;
}
.kb-key { position: absolute; padding: .14em; user-select: none; }
.kb-key > span {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; text-align: center;
  padding: 0 .2em; border-radius: .5em; background: #fff; border: 1px solid var(--line-2); border-bottom-width: .28em;
  color: var(--ink-2); font-weight: 600; line-height: 1.1; white-space: nowrap; overflow: hidden;
  transition: background .08s, transform .08s, border-color .08s;
}
.kb-key.tested > span { background: var(--blue-100); border-color: var(--blue-200); color: var(--blue-700); }
.kb-key.down > span { background: var(--blue); border-color: var(--blue-700); color: #fff; transform: translateY(.1em); border-bottom-width: .14em; }
.kb-key.chatter > span { box-shadow: 0 0 0 2px var(--bad); }
.kb-key.iso > span { clip-path: polygon(0 0, 100% 0, 100% 100%, 17% 100%, 17% 50%, 0 50%); align-items: flex-start; padding-top: .9em; }
.kb-board.no-np .np { display: none; }
.kb-extras { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 13px; }
.kb-extras[hidden] { display: none; }
.pressed-now { margin-top: 12px; min-height: 30px; }

/* ---------- Fare ---------- */
.mouse-top { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 16px; }
@media (max-width: 760px) { .mouse-top { grid-template-columns: 1fr; } }
.mouse-visual { display: grid; place-items: center; }
.mouse-svg { width: 100%; max-width: 190px; height: auto; }
.m-body { fill: #fff; stroke: var(--line-2); stroke-width: 2; }
.m-btn { fill: var(--surface-2); stroke: var(--line-2); stroke-width: 1.5; transition: fill .08s; }
.m-btn.seen { fill: var(--blue-100); }
.m-btn.on { fill: var(--blue); stroke: var(--blue-700); }
.m-wheel { fill: #e9eff9; }
.m-arrow { fill: #c3cfe6; transition: fill .1s; }
.m-arrow.on { fill: var(--blue); }
.m-label { font-size: 12px; fill: var(--muted); font-family: var(--font); font-weight: 600; }
.mouse-pad { position: relative; height: 280px; border-radius: 12px; background: repeating-linear-gradient(0deg, transparent 0 31px, #eef3fb 31px 32px), repeating-linear-gradient(90deg, transparent 0 31px, #eef3fb 31px 32px), var(--surface-2); border: 1px dashed var(--blue-200); cursor: crosshair; overflow: hidden; user-select: none; touch-action: none; }
.mouse-pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pad-hint { position: absolute; inset: 0; display: grid; place-items: center; color: var(--blue-200); font-weight: 700; font-size: 18px; pointer-events: none; text-align: center; padding: 16px; }
.dpi-box { margin: 12px 0; padding: 14px; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--line-2); text-align: center; }
.dpi-box .big-number { justify-content: center; }
.dpi-box.active { border-color: var(--blue); background: var(--blue-50); }

/* ---------- Kumanda ---------- */
.gp-top { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 900px) { .gp-top { grid-template-columns: 1fr; } }
.gp-visual { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gp-svg { width: 100%; max-width: 560px; height: auto; }
.gp-body { fill: #fff; stroke: var(--line-2); stroke-width: 2.5; filter: drop-shadow(0 8px 16px rgba(16, 40, 90, .08)); }
.gp-b { fill: var(--surface-2); stroke: var(--line-2); stroke-width: 1.8; transition: fill .06s; }
.gp-b.seen { fill: var(--blue-100); stroke: var(--blue-200); }
.gp-b.on { fill: var(--blue); stroke: var(--blue-700); }
.gp-trig { fill: var(--surface-2); stroke: var(--line-2); stroke-width: 1.8; }
.gp-trig-fill { fill: var(--blue); opacity: .85; }
.gp-tl { font: 700 13px var(--font); fill: var(--ink-2); text-anchor: middle; pointer-events: none; }
.gp-fl { font: 700 16px var(--font); fill: var(--ink-2); text-anchor: middle; pointer-events: none; }
.gp-well { fill: #eef3fb; stroke: var(--line); stroke-width: 1.5; }
.gp-cap { fill: #fff; }
.gp-cap-dot { fill: var(--blue-200); pointer-events: none; }
.stick-panel .stick-wrap { aspect-ratio: 1; max-width: 300px; margin: 0 auto 12px; }
.stick-wrap canvas, .xy-wrap canvas { width: 100%; height: 100%; display: block; }

/* ---------- Direksiyon ---------- */
.wheel-top { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 900px) { .wheel-top { grid-template-columns: 1fr; } }
.wheel-stage { display: grid; place-items: center; padding: 8px 0; }
.wheel-svg { width: min(100%, 300px); height: auto; }
.wh-guide { fill: none; stroke: var(--line); stroke-width: 1.5; stroke-dasharray: 3 6; }
.wh-rim { fill: none; stroke: #1e2b48; stroke-width: 24; }
.wh-rim-in { fill: none; stroke: #33456b; stroke-width: 4; transform-origin: center; }
.wh-mark { fill: var(--blue); }
.wh-spoke { fill: #2b3a5c; }
.wh-hub { fill: #1e2b48; stroke: #33456b; stroke-width: 3; }
.wh-logo { font: 800 22px var(--font); fill: #fff; letter-spacing: -0.03em; }
.pedals { display: flex; justify-content: space-around; gap: 12px; flex-wrap: wrap; }
.pedal { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 92px; }
.pedal-val { font-size: 18px; font-weight: 700; color: var(--pc); }
.pedal-track { position: relative; width: 46px; height: 190px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); overflow: hidden; }
.pedal-track.tall { height: 220px; }
.pedal-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: var(--pc, var(--blue)); opacity: .9; }
.pedal-peak { position: absolute; left: 0; right: 0; height: 2px; background: var(--ink); opacity: .5; bottom: 0; }
.pedal-name { font-weight: 700; font-size: 14px; }
.pedal-raw { font-size: 11px; }

/* ---------- Joystick ---------- */
.js-top { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 900px) { .js-top { grid-template-columns: 1fr; } }
.xy-wrap { aspect-ratio: 1; max-width: 380px; margin: 0 auto 12px; }
.js-side { display: flex; flex-direction: column; gap: 22px; }
.js-row { display: flex; gap: 20px; justify-content: space-around; flex-wrap: wrap; }
.throttle, .hat-box { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hat { position: relative; width: 150px; height: 150px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line-2); }
.hat-dir { position: absolute; left: 50%; top: 50%; width: 32px; height: 32px; margin: -16px; display: grid; place-items: center; border-radius: 50%; font-weight: 700; color: var(--muted);
  transform: rotate(var(--a)) translateY(-52px) rotate(calc(-1 * var(--a))); background: #fff; border: 1px solid var(--line); }
.hat-dir.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.hat-center { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); background: #fff; border: 1px solid var(--line); }
.hat-center.on { color: var(--blue); border-color: var(--blue-200); }

/* ---------- Ses ---------- */
.audio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 16px; }
.hp-stage { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 16px 0 18px; }
.hp-band { color: var(--blue-200); }
.hp-band .icon { width: 56px; height: 56px; }
.hp-ear { width: 74px; height: 74px; border-radius: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--surface-2); border: 2px solid var(--line-2); transition: all .15s; }
.hp-ear span { font-weight: 800; font-size: 20px; color: var(--ink-2); }
.hp-ear[data-ear="R"] span::after { content: ''; }
.hp-ear small { font-size: 11px; color: var(--muted); }
.hp-ear.playing { background: var(--blue); border-color: var(--blue); transform: scale(1.06); box-shadow: 0 0 0 6px var(--blue-100); }
.hp-ear.playing span, .hp-ear.playing small { color: #fff; }
.spk-room { position: relative; height: 230px; border-radius: 14px; background: radial-gradient(circle at 50% 55%, #fff 0 22%, var(--surface-2) 23%); border: 1px solid var(--line); }
.spk-room .room-tv { position: absolute; left: 50%; top: 28%; width: 30px; height: 30px; margin-left: -15px; color: var(--blue-200); }
.spk { position: absolute; transform: translate(-50%, -50%); width: 70px; padding: 6px 4px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.spk b { font-size: 13px; color: var(--blue-700); }
.spk small { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.spk:hover { border-color: var(--blue-200); background: var(--blue-50); }
.spk.playing { background: var(--blue); border-color: var(--blue); box-shadow: 0 0 0 5px var(--blue-100); }
.spk.playing b, .spk.playing small { color: #fff; }
.sweep-track { position: relative; height: 12px; border-radius: 99px; background: var(--blue-50); border: 1px solid var(--line); margin: 14px 0 26px; }
.sweep-track i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--sky)); }
.sweep-track span { position: absolute; top: 16px; transform: translateX(-50%); font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.sweep-track span:first-of-type { transform: none; }
.sweep-track span:last-of-type { transform: translateX(-100%); }
.btn.active { background: var(--blue-700); }

/* ---------- Mikrofon ---------- */
.mic-empty, .cam-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 40px 20px; }
.mic-empty h3, .cam-empty h3 { font-size: 18px; }
.mic-empty p, .cam-empty p { max-width: 440px; }
.mic-top { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 860px) { .mic-top { grid-template-columns: 1fr; } }
[data-role="live"]:not([hidden]) { display: flex; flex-direction: column; gap: 16px; }
.meters { display: flex; flex-direction: column; gap: 8px; }
.meter { display: flex; align-items: center; gap: 10px; }
.meter-l { width: 16px; font-weight: 700; color: var(--muted); font-size: 12px; }
.meter-track { position: relative; flex: 1; height: 22px; border-radius: 8px; overflow: hidden; background: linear-gradient(90deg, #e7f6ee 0 70%, #fff6e0 70% 90%, #fdecec 90%); border: 1px solid var(--line); }
.meter-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, #2563eb, #0ea5e9); }
.meter-peak { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--ink); left: 0; }
.meter-scale { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); padding-left: 26px; margin-top: 4px; font-family: var(--mono); }
.audio-el { width: 100%; margin-top: 12px; }

/* ---------- Kamera ---------- */
.cam-layout { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 960px) { .cam-layout { grid-template-columns: 1fr; } }
.cam-stage { position: relative; padding: 0; overflow: hidden; background: #0f1b33; min-height: 300px; display: grid; place-items: center; }
.cam-stage .cam-empty { color: #c7d4ee; }
.cam-stage .cam-empty .muted { color: #8fa2c6; }
.cam-stage video { width: 100%; height: 100%; max-height: 70vh; object-fit: contain; display: block; background: #000; }
.cam-stage video.mirror { transform: scaleX(-1); }
.cam-stage:fullscreen video { max-height: 100vh; }
.cam-stage.show-grid::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent calc(33.33% - .5px), rgba(255,255,255,.5) calc(33.33% - .5px) calc(33.33% + .5px), transparent calc(33.33% + .5px) calc(66.66% - .5px), rgba(255,255,255,.5) calc(66.66% - .5px) calc(66.66% + .5px), transparent calc(66.66% + .5px)),
              linear-gradient(0deg, transparent calc(33.33% - .5px), rgba(255,255,255,.5) calc(33.33% - .5px) calc(33.33% + .5px), transparent calc(33.33% + .5px) calc(66.66% - .5px), rgba(255,255,255,.5) calc(66.66% - .5px) calc(66.66% + .5px), transparent calc(66.66% + .5px)); }
.cam-hud { position: absolute; top: 12px; left: 12px; display: flex; gap: 8px; }
.cam-hud span { background: rgba(255, 255, 255, .92); color: var(--blue-700); font: 600 12.5px var(--mono); padding: 4px 9px; border-radius: 7px; }
.cam-tools { position: absolute; bottom: 12px; left: 12px; right: 12px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.caps { display: flex; flex-direction: column; gap: 4px; }
.cap { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.cap span { color: var(--muted); }
.cap b { font-family: var(--mono); font-weight: 500; text-align: right; word-break: break-word; }
.snaps { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.snap { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #fff; color: var(--ink-2); }
.snap span { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px; font-size: 12px; }
.snap:hover { border-color: var(--blue-200); }

/* ---------- MIDI ---------- */
.midi-ports { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.port { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; font-size: 13px; cursor: default; max-width: 100%; }
button.port { cursor: pointer; }
.port .icon { color: var(--blue); }
.port small { color: var(--muted); }
.port b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.port.ok { border-color: var(--blue-200); background: var(--blue-50); }
.port.out .icon { color: var(--sky); }
.piano-scroller { overflow-x: auto; padding-bottom: 4px; }
.piano { position: relative; height: 130px; min-width: 900px; user-select: none; }
.pk { position: absolute; top: 0; box-sizing: border-box; }
.pk.white { height: 100%; background: #fff; border: 1px solid var(--line-2); border-radius: 0 0 6px 6px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 5px; }
.pk.white span { font-size: 9.5px; color: var(--muted); font-weight: 600; }
.pk.black { height: 62%; background: #1e2b48; border-radius: 0 0 4px 4px; z-index: 2; border: 1px solid #0f1b33; }
.pk.seen.white { background: #f4f8ff; }
.pk.on { background: rgba(37, 99, 235, var(--v, 1)) !important; border-color: var(--blue-700) !important; }
.pk.on span { color: #fff; }
.midi-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; }
@media (max-width: 860px) { .midi-grid { grid-template-columns: 1fr; } }
.cc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cc { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--surface-2); display: flex; flex-direction: column; gap: 4px; }
.cc-head { display: flex; justify-content: space-between; gap: 6px; font-size: 12.5px; }
.cc-head span { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-val { font-size: 12px; color: var(--ink-2); }
.cc.flash { animation: ccflash .5s ease-out; }
@keyframes ccflash { from { border-color: var(--blue); background: var(--blue-50); } }

/* ---------- Dokunmatik & kalem ---------- */
.touch-pad, .pen-pad { position: relative; height: min(62vh, 560px); min-height: 320px; border-radius: 14px; background: #fff; border: 1px solid var(--line-2); overflow: hidden; touch-action: none; user-select: none; }
.touch-pad canvas, .pen-pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.touch-pad:fullscreen { border-radius: 0; height: 100vh; }
.touch-exit { position: absolute; top: 12px; right: 12px; display: none; z-index: 2; }
.touch-pad:fullscreen .touch-exit { display: inline-flex; }
.pen-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; }
@media (max-width: 960px) { .pen-layout { grid-template-columns: 1fr; } }
.pen-pad { background: #fff repeating-linear-gradient(0deg, transparent 0 39px, #f0f4fb 39px 40px); cursor: crosshair; }
.tilt-viz { height: 120px; display: grid; place-items: center; perspective: 400px; margin: 12px 0; background: var(--surface-2); border-radius: 10px; }
.tilt-pen { width: 10px; height: 90px; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, var(--blue) 0 75%, var(--ink) 75%); transform-style: preserve-3d; transition: transform .05s; }

/* ---------- Ekran ---------- */
.display-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 16px; }
@media (max-width: 860px) { .display-top { grid-template-columns: 1fr; } }
.refresh-panel { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.refresh-panel .big-number b { font-size: 56px; }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tile { text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: #fff; cursor: pointer; box-shadow: var(--shadow-sm); transition: border-color .15s, transform .15s; }
.tile:hover { border-color: var(--blue-200); transform: translateY(-2px); }
.tile b { font-size: 15px; }
.tile small { color: var(--muted); font-size: 12.5px; }
.tile-swatch { height: 70px; border-radius: 10px; margin-bottom: 8px; }
.sw-dead { background: linear-gradient(90deg, #000 0 20%, #fff 20% 40%, #f00 40% 60%, #0f0 60% 80%, #00f 80%); border: 1px solid var(--line); }
.sw-grad { background: linear-gradient(90deg, #000, #fff); }
.sw-motion { background: #dbe8ff radial-gradient(circle at 30% 50%, #1d4ed8 0 14px, transparent 15px); position: relative; }
.sw-sharp { background: repeating-linear-gradient(90deg, #000 0 1px, #fff 1px 2px); }
.fs-overlay { position: fixed; inset: 0; z-index: 1000; background: #000; cursor: pointer; outline: none; }
.fs-hint { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); color: #fff; background: rgba(0, 0, 0, .55); padding: 10px 16px; border-radius: 10px; font-size: 14px; transition: opacity .6s; max-width: calc(100vw - 32px); text-align: center; z-index: 3; pointer-events: none; }
.fs-hint.on-light { background: rgba(255, 255, 255, .8); color: var(--ink); }
.fs-hint.hide { opacity: 0; }
.fs-grads { position: absolute; inset: 0; display: grid; grid-template-rows: repeat(4, 1fr) .7fr .7fr; }
.fs-grads .steps { display: flex; }
.fs-grads .steps i { flex: 1; }
.fs-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.fs-info { position: absolute; top: 16px; left: 16px; font: 600 14px var(--mono); color: var(--ink); background: rgba(255, 255, 255, .85); padding: 6px 10px; border-radius: 8px; }
.fs-sharp { position: absolute; inset: 0; background: #fff; display: grid; grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 1fr auto; gap: 24px; padding: 40px; }
.fs-sharp .lines.h1 { background: repeating-linear-gradient(0deg, #000 0 1px, #fff 1px 2px); }
.fs-sharp .lines.v1 { background: repeating-linear-gradient(90deg, #000 0 1px, #fff 1px 2px); }
.fs-sharp .checker { background: repeating-conic-gradient(#000 0 25%, #fff 0 50%) 0 0 / 2px 2px; }
.fs-sharp .txt { grid-column: 1 / -1; color: #000; font-family: var(--font); }
.fs-sharp .txt p { margin: 6px 0; }

/* ---------- Sensörler ---------- */
.sensor-top { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .sensor-top { grid-template-columns: 1fr; } }
.phone-stage { height: 220px; display: grid; place-items: center; perspective: 700px; }
.phone3d { width: 100px; height: 190px; border-radius: 18px; background: linear-gradient(160deg, #1e2b48, #33456b); padding: 8px; transform: rotateX(20deg); transform-style: preserve-3d; transition: transform .08s linear; box-shadow: 0 20px 40px -10px rgba(16, 40, 90, .45); }
.phone-screen { width: 100%; height: 100%; border-radius: 12px; background: linear-gradient(160deg, var(--blue), var(--sky)); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 14px; }
.battery { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.battery-body { position: relative; width: 120px; height: 48px; border: 3px solid var(--ink-2); border-radius: 9px; padding: 3px; }
.battery-body::after { content: ''; position: absolute; right: -9px; top: 13px; width: 5px; height: 16px; border-radius: 0 3px 3px 0; background: var(--ink-2); }
.battery-body i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #10b981, #34d399); }
.battery-body i.low { background: linear-gradient(90deg, #ef4444, #f97316); }
.battery b { font-size: 26px; font-weight: 800; }

/* ---------- HID & seri ---------- */
.hid-list { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.reports { display: flex; flex-direction: column; gap: 12px; }
.report { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--surface-2); }
.report-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: 13px; }
.bytes { display: flex; flex-wrap: wrap; gap: 4px; }
.byte { display: flex; flex-direction: column; align-items: center; min-width: 34px; padding: 3px 4px; border-radius: 6px; background: #fff; border: 1px solid var(--line); font-family: var(--mono); transition: background .15s; }
.byte small { font-size: 9px; color: var(--muted); }
.byte b { font-size: 13px; font-weight: 600; }
.byte.chg { background: var(--blue); border-color: var(--blue); color: #fff; }
.byte.chg small { color: rgba(255, 255, 255, .8); }
.serial-out { margin: 0; height: 320px; overflow: auto; background: #0f1b33; color: #cfe0ff; border-radius: 12px; padding: 14px; font: 12.5px/1.5 var(--mono); white-space: pre-wrap; word-break: break-all; }
section[data-tab]:not([hidden]) { display: flex; flex-direction: column; gap: 14px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
