:root {
  color-scheme: dark;
  --bg: #050b14;
  --panel: rgba(10, 20, 35, .88);
  --panel-2: rgba(13, 27, 46, .94);
  --line: rgba(150, 190, 230, .14);
  --text: #edf7ff;
  --muted: #7990a8;
  --blue: #20c8ff;
  --blue-soft: #0b6d91;
  --red: #ff456d;
  --red-soft: #8d2842;
  --green: #53f3b0;
  --yellow: #ffd36a;
}

/* ─── Agar esintili açık arayüz ─────────────────────────────────────────── */
:root {
  color-scheme: light;
  --bg: #eef2f5;
  --panel: rgba(255,255,255,.94);
  --panel-2: rgba(255,255,255,.98);
  --line: rgba(73,92,108,.16);
  --text: #25313a;
  --muted: #748491;
  --blue: #3b82f6;
  --blue-soft: #b7d2ff;
  --red: #ff5d8f;
  --red-soft: #ffc1d4;
  --green: #20b98b;
  --yellow: #f4b942;
}

html, body {
  background: #edf2f5;
  color: var(--text);
}
body::before {
  opacity: .7;
  background-image:
    linear-gradient(rgba(94,112,126,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94,112,126,.07) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: none;
}
.app-shell { padding: 10px 14px 14px; }
.topbar { color: #2c3942; }
.brand-mark, .menu-logo {
  color: #fff;
  border: 0;
  background: conic-gradient(from 210deg, #3b82f6, #20c9c3, #feca57, #ff6b8b, #a55eea, #3b82f6);
  box-shadow: 0 8px 22px rgba(63,93,122,.18), inset 0 1px 2px rgba(255,255,255,.5);
}
.brand h1 span, .menu-modal h2 span, .result-modal h2 span { color: #3b82f6; }
.brand p, .eyebrow { color: #7b8b97; }
.icon-button, .small-button, .modal-close {
  border-color: rgba(73,92,108,.16);
  background: rgba(255,255,255,.82);
  color: #647581;
  box-shadow: 0 4px 14px rgba(46,65,78,.07);
}
.icon-button:hover, .small-button:hover, .modal-close:hover {
  border-color: rgba(59,130,246,.36);
  color: #3b82f6;
}

.game-layout {
  position: relative;
  display: block;
}
.arena-card {
  width: 100%;
  height: 100%;
  border-color: rgba(73,92,108,.16);
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 18px 55px rgba(49,67,80,.13);
}
.hud {
  border-bottom-color: rgba(73,92,108,.13);
  background: rgba(255,255,255,.94);
}
.turn-panel { border-color: rgba(73,92,108,.12); }
.health-line, .timer-track { background: rgba(79,96,109,.13); }
.health-chip .health-label, .turn-panel span { color: #788894; }
.canvas-wrap { background: #f4f7fa; }

/* PC'de yer kaplamayan soyut formül küresi */
.control-card {
  position: absolute;
  z-index: 18;
  top: 16px;
  right: 16px;
  width: 68px;
  height: 68px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 50%;
  background:
    radial-gradient(circle at 33% 25%, rgba(255,255,255,.9), transparent 21%),
    conic-gradient(from 190deg, #3b82f6, #20c9c3, #feca57, #ff6b8b, #a55eea, #3b82f6);
  box-shadow: 0 12px 35px rgba(58,82,101,.22);
  scrollbar-color: rgba(89,108,122,.25) transparent;
  transition: width .25s ease, height .25s ease, border-radius .25s ease,
    background .2s ease, box-shadow .2s ease;
}
.control-card:hover,
.control-card.is-open {
  width: min(380px, calc(100% - 32px));
  height: calc(100% - 32px);
  border-radius: 22px;
  border-color: rgba(73,92,108,.18);
  background: rgba(255,255,255,.96);
  box-shadow: 0 22px 65px rgba(43,61,74,.2);
}
.toolbox-toggle {
  position: absolute;
  z-index: 2;
  top: 8px;
  right: 8px;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  color: #fff;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.5);
}
.toolbox-toggle span { font-size: 28px; line-height: .7; }
.toolbox-toggle small {
  display: none;
  color: #647581;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .12em;
}
.control-card:hover .toolbox-toggle,
.control-card.is-open .toolbox-toggle {
  background: conic-gradient(from 190deg, #3b82f6, #20c9c3, #feca57, #ff6b8b, #a55eea, #3b82f6);
}
.toolbox-content {
  height: 100%;
  padding: 70px 12px 12px;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transform: translateX(10px);
  transition: opacity .14s ease, transform .2s ease;
}
.control-card:hover .toolbox-content,
.control-card.is-open .toolbox-content {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.panel-tabs {
  border-color: rgba(73,92,108,.14);
  background: #f1f4f6;
}
.panel-tabs button { color: #80909c; }
.panel-tabs button:hover { color: #34434d; }
.panel-tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #20c9c3);
  box-shadow: 0 5px 16px rgba(59,130,246,.18);
}
.control-title strong { color: #293740; }
.control-title span, .section-label { color: #83929e; }
.equation-box {
  border-color: rgba(59,130,246,.26);
  background: #f4f7fa;
  box-shadow: inset 0 1px 2px rgba(51,68,80,.05);
}
#equationInput { color: #263640; }
.function-grid button,
.combo-card,
.guide-list article,
.flash-quick button,
.history-chip {
  border-color: rgba(73,92,108,.14);
  background: #f5f7f9;
  color: #526570;
}
.function-grid button:hover,
.combo-card:hover,
.flash-quick button:hover,
.history-chip:hover {
  border-color: rgba(59,130,246,.32);
  background: #edf5ff;
  color: #263640;
}
.formula-lesson {
  border-left-color: #3b82f6;
  background: #eef5ff;
}
.formula-lesson p, .panel-intro, .combo-card small, .guide-list p, .flash-note { color: #748590; }
.combo-card code, .examples code { color: #2478d7; }
.fire-button, .start-button {
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #20c9c3);
  box-shadow: 0 9px 24px rgba(59,130,246,.2);
}
.fire-button:hover, .start-button:hover { box-shadow: 0 12px 30px rgba(59,130,246,.27); }
.axis-legend, .coordinate-hud, .projectile-hud {
  border-color: rgba(73,92,108,.15);
  background: rgba(255,255,255,.86);
  color: #556873;
  box-shadow: 0 5px 18px rgba(49,67,80,.09);
}
.coordinate-hud strong { color: #2c3b45; }
.coordinate-hud span, .coordinate-hud small, .projectile-hud span, .projectile-hud small { color: #778894; }
.toast {
  border-color: rgba(73,92,108,.16);
  background: rgba(255,255,255,.94);
  color: #33434d;
  box-shadow: 0 7px 22px rgba(45,61,73,.13);
}
.thinking { background: rgba(255,255,255,.25); }
.thinking b { color: #d83d71; }

.overlay {
  background: rgba(229,235,239,.78);
  backdrop-filter: blur(12px);
}
.menu-modal, .help-modal, .result-modal, .name-modal, .lobby-modal {
  border-color: rgba(73,92,108,.16);
  background:
    radial-gradient(circle at 50% 0, rgba(59,130,246,.08), transparent 42%),
    rgba(255,255,255,.98);
  box-shadow: 0 35px 100px rgba(49,67,80,.2);
  color: #283640;
}
.menu-copy, .help-steps p, .result-modal > p:not(.eyebrow) { color: #70818d; }
.mode-card, .difficulty-row {
  border-color: rgba(73,92,108,.13);
  background: #f3f6f8;
  color: #34434d;
}
.mode-card:hover, .mode-card.selected,
.mode-online:hover, .mode-online.selected {
  border-color: rgba(59,130,246,.38);
  background: #eaf3ff;
  box-shadow: inset 0 0 18px rgba(59,130,246,.05);
}
.mode-card small { color: #7b8b97; }
.difficulty-row button { color: #758692; }
.difficulty-row button.selected {
  border-color: rgba(59,130,246,.25);
  background: #fff;
  color: #2674cd;
}
.continue-button {
  border-color: rgba(73,92,108,.18);
  color: #60727e;
}
.name-input, .flash-input {
  border-color: rgba(59,130,246,.28);
  background: #f4f7fa;
  color: #263640;
}
.flash-messages { border-color: rgba(73,92,108,.14); background: #f3f6f8; }
.flash-message.agent { background: #eaf3ff; color: #536a78; }
.flash-message.user { background: #e9faf4; color: #3d6658; }
.mini-plot { border-color: rgba(73,92,108,.14); background: #f6f8fa; }
kbd { border-color: rgba(73,92,108,.18); background: #f0f3f5; color: #6e7f8a; }

@media (max-width: 760px) {
  .game-layout { display: block; }
}

@media (orientation: landscape) and (max-height: 520px) {
  .control-card,
  .control-card:hover,
  .control-card.is-open {
    width: auto;
    height: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .toolbox-toggle { display: none; }
  .toolbox-content {
    display: contents;
    padding: 0;
    overflow: visible;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
  .hud {
    border-color: rgba(73,92,108,.15);
    background: rgba(255,255,255,.88);
  }
  .panel-tabs {
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(8px);
  }
  .side-panel[data-panel-content="shot"] .equation-box {
    border-color: rgba(73,92,108,.16);
    background: rgba(255,255,255,.94);
  }
  .mobile-equation-display { color: #273640; }
  .side-panel:not([data-panel-content="shot"]).active {
    border-color: rgba(73,92,108,.16);
    background: rgba(255,255,255,.95);
  }
  .lpad button:not(.lpad-arrow),
  .lpad-arrow,
  .lpad-pop,
  .lpad-pop button,
  .rpad button {
    border-color: rgba(73,92,108,.18);
    background: rgba(255,255,255,.9);
    color: #526570;
    box-shadow: 0 4px 12px rgba(46,65,78,.08);
  }
  .lpad button:not(.lpad-arrow) { color: #148c70; }
  .lpad-pop button[data-insert="+"],
  .lpad-pop button[data-insert="-"],
  .lpad-pop button[data-insert="*"],
  .lpad-pop button[data-insert="/"],
  .lpad-pop button[data-insert="^"],
  .lpad-pop button[data-insert="("],
  .lpad-pop button[data-insert=")"] { color: #d58b00; }
  .rpad button span { color: #2478d7; }
  .coordinate-hud { background: rgba(255,255,255,.86); }
  .rotate-overlay {
    background:
      radial-gradient(circle at 50% 40%, rgba(59,130,246,.12), transparent 38%),
      #f4f7fa;
    color: #263640;
  }
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 10%, rgba(26, 112, 158, .18), transparent 30%),
    radial-gradient(circle at 80% 90%, rgba(143, 33, 83, .13), transparent 33%),
    var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
}

button, input { font: inherit; }
button { color: inherit; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(circle, black 15%, transparent 80%);
}

.app-shell {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 12px 16px 16px;
}

.topbar {
  height: 64px;
  flex: 0 0 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5px 9px;
}

.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark, .menu-logo {
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--blue);
  border: 1px solid rgba(32, 200, 255, .45);
  background: linear-gradient(145deg, rgba(32,200,255,.16), rgba(32,200,255,.025));
  box-shadow: 0 0 28px rgba(32, 200, 255, .12), inset 0 0 18px rgba(32,200,255,.08);
}
.brand-mark { width: 44px; height: 44px; font-size: 31px; line-height: 1; }
.brand h1 { margin: 0; font-size: 18px; letter-spacing: .11em; font-weight: 900; }
.brand h1 span { color: var(--blue); }
.brand p { margin: 2px 0 0; color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }

.top-actions { display: flex; gap: 7px; }
.icon-button, .small-button, .modal-close {
  border: 1px solid var(--line);
  background: rgba(12, 25, 42, .72);
  cursor: pointer;
  transition: .18s ease;
}
.icon-button { width: 38px; height: 38px; border-radius: 10px; font-size: 18px; }
.icon-button:hover, .small-button:hover, .modal-close:hover { border-color: rgba(32,200,255,.5); color: var(--blue); transform: translateY(-1px); }

.game-layout {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 12px;
}

.arena-card, .control-card {
  min-height: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .24);
  overflow: hidden;
}

.arena-card { display: flex; flex-direction: column; }
.hud {
  height: 73px;
  flex: 0 0 73px;
  display: grid;
  grid-template-columns: 1fr 170px 1fr;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(19, 36, 57, .9), rgba(9, 19, 33, .75));
}

.team-panel { padding: 11px 18px; }
.team-red { text-align: right; }
.team-heading { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .1em; }
.team-red .team-heading { justify-content: flex-end; }
.team-dot { width: 8px; height: 8px; border-radius: 50%; }
.team-blue .team-dot { background: var(--blue); box-shadow: 0 0 12px var(--blue); }
.team-red .team-dot { background: var(--red); box-shadow: 0 0 12px var(--red); }
.unit-health { display: flex; gap: 7px; margin-top: 9px; }
.team-red .unit-health { justify-content: flex-end; }
.health-chip { width: 74px; }
.health-chip .health-label { display: flex; justify-content: space-between; color: var(--muted); font-size: 8px; margin-bottom: 3px; }
.health-line { height: 4px; border-radius: 8px; overflow: hidden; background: rgba(255,255,255,.08); }
.health-line i { display: block; height: 100%; transition: width .35s ease; }
.team-blue .health-line i { background: var(--blue); box-shadow: 0 0 7px var(--blue); }
.team-red .health-line i { background: var(--red); box-shadow: 0 0 7px var(--red); }
.health-chip.dead { opacity: .28; filter: grayscale(1); }

.turn-panel {
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.turn-panel span { color: var(--muted); font-size: 8px; letter-spacing: .16em; }
.turn-panel strong { margin: 3px 0 7px; font-size: 12px; letter-spacing: .08em; }
.timer-track { width: 112px; height: 3px; background: rgba(255,255,255,.08); overflow: hidden; border-radius: 4px; }
.timer-track div { height: 100%; width: 100%; background: var(--blue); transition: width .2s linear, background .2s; }

.canvas-wrap { position: relative; flex: 1; min-height: 0; background: #07111f; }
#gameCanvas { position: absolute; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
#gameCanvas:active { cursor: grabbing; }

.toast {
  position: absolute;
  left: 50%;
  top: 18px;
  transform: translate(-50%, -14px);
  padding: 9px 16px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(4, 12, 22, .9);
  color: #dbeaff;
  font-size: 11px;
  letter-spacing: .04em;
  opacity: 0;
  pointer-events: none;
  transition: .25s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { color: #ffd2dc; border-color: rgba(255,69,109,.4); }

.thinking {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  background: rgba(5, 11, 20, .18);
  pointer-events: none;
}
.thinking span { width: 6px; height: 6px; border-radius: 50%; background: var(--red); animation: pulse 1s infinite alternate; }
.thinking span:nth-child(2) { animation-delay: .2s; }
.thinking span:nth-child(3) { animation-delay: .4s; }
.thinking b { margin-left: 7px; font-size: 9px; letter-spacing: .12em; color: #ffc4d1; }

.control-card {
  padding: 12px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(32,200,255,.25) transparent;
}
.panel-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-bottom: 12px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(3, 10, 18, .65);
}
.panel-tabs button {
  min-width: 0;
  padding: 8px 3px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #60788e;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .08em;
  cursor: pointer;
}
.panel-tabs button:hover { color: #cceeff; }
.panel-tabs button.active {
  color: #03141d;
  background: linear-gradient(135deg, #20c8ff, #53f3b0);
  box-shadow: 0 5px 18px rgba(32,200,255,.13);
}
.side-panel { display: none; min-height: 0; }
.side-panel.active { display: block; animation: panel-in .2s ease; }
@keyframes panel-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.control-title { display: flex; justify-content: space-between; align-items: center; }
.control-title > div { display: flex; flex-direction: column; }
.control-title span, .section-label { color: var(--muted); font-size: 8px; letter-spacing: .15em; font-weight: 700; }
.control-title strong { margin-top: 3px; font-size: 17px; font-family: Consolas, monospace; color: #dff7ff; }
.small-button { padding: 6px 9px; border-radius: 7px; color: var(--muted); font-size: 8px; letter-spacing: .08em; }

.equation-box {
  margin-top: 13px;
  height: 50px;
  flex: 0 0 50px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(32, 200, 255, .28);
  border-radius: 10px;
  background: rgba(3, 11, 20, .85);
  box-shadow: inset 0 0 24px rgba(32,200,255,.035);
  overflow: hidden;
}
.equation-box:focus-within { border-color: rgba(32, 200, 255, .8); box-shadow: 0 0 0 3px rgba(32,200,255,.08); }
.equation-prefix { padding-left: 12px; color: var(--blue); font: bold 15px Consolas, monospace; }
#equationInput {
  min-width: 0;
  flex: 1;
  height: 100%;
  padding: 0 7px;
  border: 0;
  outline: 0;
  background: transparent;
  color: white;
  font: 14px Consolas, monospace;
}
.mobile-equation-display { display: none; }
.equation-status { width: 34px; text-align: center; font-size: 14px; }
.equation-status.valid { color: var(--green); }
.equation-status.invalid { color: var(--red); }
.error-message { height: 27px; padding: 7px 2px 0; color: var(--muted); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.error-message.invalid { color: #ff8da7; }

.function-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.function-grid button {
  height: 31px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(17, 34, 54, .72);
  color: #aac1d8;
  cursor: pointer;
  font: 11px Consolas, monospace;
}
.function-grid button:hover { color: white; border-color: rgba(32,200,255,.42); background: rgba(20, 70, 92, .36); }

.formula-lesson {
  margin: -4px 0 11px;
  padding: 9px 10px;
  border-left: 2px solid var(--blue);
  border-radius: 0 8px 8px 0;
  background: rgba(32, 200, 255, .045);
}
.formula-lesson span { color: var(--blue); font-size: 7px; letter-spacing: .13em; font-weight: 800; }
.formula-lesson p { margin: 4px 0 0; color: #8ea9be; font-size: 9px; line-height: 1.45; }

.fire-button, .start-button {
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #16afe4, #26e2c1);
  color: #031018;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(24, 195, 218, .18);
  transition: .18s ease;
}
.fire-button {
  min-height: 52px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}
.fire-button:hover, .start-button:hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 13px 38px rgba(24,195,218,.28); }
.fire-button:active, .start-button:active { transform: translateY(0); }
.fire-button:disabled { opacity: .3; filter: grayscale(1); cursor: not-allowed; transform: none; }
.fire-icon { font-size: 22px; transform: rotate(-18deg); }
.fire-button strong { display: block; font-size: 13px; letter-spacing: .12em; }
.fire-button small { display: block; opacity: .6; font-size: 7px; margin-top: 1px; }

.examples { margin-top: 16px; }
.examples .section-label { margin-bottom: 6px; }
.examples button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 8px;
  margin-top: 4px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #91a7bd;
  font-size: 9px;
  cursor: pointer;
  text-align: left;
}
.examples button:hover { border-color: var(--line); background: rgba(255,255,255,.025); color: white; }
.examples code { color: #5ebfdd; font: 8px Consolas, monospace; }
.keyboard-hint { margin-top: auto; padding-top: 14px; display: flex; gap: 9px; justify-content: center; color: #52687d; font-size: 7px; }
kbd { padding: 2px 4px; border: 1px solid rgba(255,255,255,.13); border-radius: 3px; background: rgba(255,255,255,.04); font: inherit; color: #8198ad; }

.axis-legend {
  position: absolute;
  left: 14px;
  bottom: 13px;
  display: flex;
  gap: 12px;
  padding: 6px 9px;
  border: 1px solid rgba(110,170,205,.14);
  border-radius: 7px;
  background: rgba(3,10,18,.62);
  pointer-events: none;
  font: 8px Consolas, monospace;
}
.axis-x { color: var(--blue); }
.axis-y { color: var(--green); }
.coordinate-hud {
  position: absolute;
  right: 14px;
  top: 14px;
  min-width: 162px;
  padding: 8px 10px;
  border: 1px solid rgba(32,200,255,.18);
  border-radius: 9px;
  background: rgba(3, 10, 18, .72);
  backdrop-filter: blur(6px);
  pointer-events: none;
}
.coordinate-hud span { display: block; color: #647d92; font-size: 7px; letter-spacing: .15em; }
.coordinate-hud strong { display: block; margin: 3px 0; color: #dbf6ff; font: 11px Consolas, monospace; }
.coordinate-hud small { display: block; color: #4d667a; font-size: 7px; }
.projectile-hud {
  position: absolute;
  left: 50%;
  top: 14px;
  width: 190px;
  transform: translateX(-50%);
  padding: 8px 10px;
  border: 1px solid rgba(255,211,106,.28);
  border-radius: 9px;
  background: rgba(3,10,18,.82);
  backdrop-filter: blur(7px);
  pointer-events: none;
  box-shadow: 0 0 24px rgba(255,211,106,.06);
}
.projectile-hud > div:first-child { display: flex; align-items: center; justify-content: space-between; }
.projectile-hud span { color: #71879a; font-size: 7px; letter-spacing: .12em; }
.projectile-hud strong { color: #fff0a6; font: 10px Consolas, monospace; }
.projectile-hud small { display: block; margin-top: 4px; color: #7d91a3; font-size: 7px; text-align: right; letter-spacing: .1em; }
.energy-track { height: 5px; margin-top: 6px; overflow: hidden; border-radius: 5px; background: rgba(255,255,255,.08); }
.energy-track i { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, #ff456d, #ffd36a, #53f3b0); transition: width .12s linear; }

.panel-intro {
  margin: 9px 0 12px;
  color: #7890a5;
  font-size: 9px;
  line-height: 1.5;
}
.panel-intro b { color: var(--yellow); }
.combo-list { display: grid; gap: 6px; }
.combo-card {
  position: relative;
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  grid-template-areas: "badge title" "formula formula" "desc desc";
  gap: 3px 8px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(4, 13, 23, .58);
  text-align: left;
  cursor: pointer;
  transition: .16s ease;
}
.combo-card:hover {
  transform: translateX(-2px);
  border-color: rgba(32,200,255,.45);
  background: rgba(12, 48, 66, .32);
}
.combo-card strong { grid-area: title; align-self: center; font-size: 10px; }
.combo-card code { grid-area: formula; margin-top: 3px; color: #7bdcf5; font: 9px Consolas, monospace; overflow-wrap: anywhere; }
.combo-card small { grid-area: desc; color: #687f93; font-size: 8px; line-height: 1.35; }
.combo-badge {
  grid-area: badge;
  display: inline-block;
  width: fit-content;
  padding: 3px 6px;
  border-radius: 4px;
  color: #07131b;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .08em;
}
.combo-badge.sonic { background: #c57cff; }
.combo-badge.cut { background: #ffd36a; }
.combo-badge.arc { background: #53f3b0; }
.combo-badge.wave { background: #20c8ff; }
.combo-badge.ricochet { background: #ff7595; }
.combo-badge.root { background: #99b8ff; }

.guide-list { display: grid; gap: 7px; margin-top: 11px; }
.guide-list article {
  display: flex;
  gap: 9px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(4,13,23,.5);
}
.guide-list article > b {
  flex: 0 0 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(32,200,255,.3);
  border-radius: 6px;
  color: var(--blue);
  font-size: 8px;
}
.guide-list strong { display: block; font-size: 9px; }
.guide-list p { margin: 3px 0 0; color: #71899d; font-size: 8px; line-height: 1.45; }
.guide-list code { color: #72d9f5; font: 8px Consolas, monospace; }
.guide-action, .apply-formula {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(32,200,255,.32);
  border-radius: 8px;
  background: rgba(32,200,255,.07);
  color: #aeefff;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .1em;
  cursor: pointer;
}
.guide-action:hover, .apply-formula:hover { background: rgba(32,200,255,.14); }

.flash-head { display: flex; align-items: center; gap: 9px; }
.flash-orb {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,211,106,.34);
  border-radius: 11px;
  background: rgba(255,211,106,.08);
  color: var(--yellow);
  box-shadow: 0 0 22px rgba(255,211,106,.08);
}
.flash-head > div:nth-child(2) { display: flex; flex-direction: column; }
.flash-head span { color: #6b8296; font-size: 7px; letter-spacing: .13em; }
.flash-head strong { margin-top: 2px; font-size: 15px; color: #fff3c2; }
.flash-head i {
  margin-left: auto;
  padding: 4px 6px;
  border: 1px solid rgba(83,243,176,.25);
  border-radius: 5px;
  color: var(--green);
  font-size: 6px;
  font-style: normal;
  letter-spacing: .1em;
}
.flash-head i.offline { color: var(--yellow); border-color: rgba(255,211,106,.25); }
.flash-messages {
  height: 235px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(2,8,15,.66);
}
.flash-message {
  width: fit-content;
  max-width: 92%;
  margin-bottom: 7px;
  padding: 8px 9px;
  border-radius: 9px;
  font-size: 9px;
  line-height: 1.48;
  white-space: pre-wrap;
}
.flash-message.agent { background: rgba(32,200,255,.08); color: #a8c9db; border-bottom-left-radius: 2px; }
.flash-message.user { margin-left: auto; background: rgba(83,243,176,.1); color: #c6f8e1; border-bottom-right-radius: 2px; }
.flash-message.loading { color: #7691a5; animation: pulse 1s infinite alternate; }
.flash-message code { color: #77def7; font: 9px Consolas, monospace; }
.flash-quick { display: flex; gap: 4px; margin: 7px 0; }
.flash-quick button {
  flex: 1;
  padding: 6px 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: #718a9e;
  font-size: 6px;
  cursor: pointer;
}
.flash-quick button:hover { border-color: rgba(255,211,106,.3); color: #fff2c2; }
.flash-input {
  display: block;
  padding: 7px;
  border: 1px solid rgba(255,211,106,.18);
  border-radius: 9px;
  background: rgba(3,10,18,.74);
}
.flash-input textarea {
  width: 100%;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: white;
  font-size: 9px;
  line-height: 1.4;
}
.flash-input button {
  display: block;
  margin-left: auto;
  padding: 6px 10px;
  border: 0;
  border-radius: 6px;
  background: var(--yellow);
  color: #151107;
  font-size: 7px;
  font-weight: 900;
  cursor: pointer;
}
.flash-input button:disabled { opacity: .4; cursor: wait; }
.flash-note { margin: 7px 1px 0; color: #4b6174; font-size: 7px; }

.overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 7, 13, .82);
  backdrop-filter: blur(15px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s;
}
.overlay.visible { opacity: 1; visibility: visible; }
.menu-modal, .help-modal, .result-modal {
  position: relative;
  width: min(570px, 96vw);
  max-height: 94vh;
  overflow-y: auto;
  border: 1px solid rgba(126, 178, 218, .18);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 0, rgba(29, 136, 180, .15), transparent 42%),
    linear-gradient(160deg, rgba(13, 27, 46, .98), rgba(5, 12, 22, .99));
  box-shadow: 0 40px 130px rgba(0,0,0,.55), inset 0 1px rgba(255,255,255,.04);
}
.menu-modal { padding: 28px 38px 23px; text-align: center; }
.menu-logo { width: 55px; height: 55px; margin: 0 auto 13px; font-size: 39px; }
.eyebrow { margin: 0 0 8px; color: #7390aa; font-size: 8px; letter-spacing: .22em; font-weight: 800; }
.menu-modal h2 { margin: 0; font-size: clamp(36px, 6vw, 54px); letter-spacing: -.045em; line-height: .83; font-weight: 950; }
.menu-modal h2 span, .result-modal h2 span { color: var(--blue); }
.menu-copy { width: min(390px, 100%); margin: 18px auto; color: #8ba1b6; font-size: 11px; line-height: 1.55; }
.mode-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.mode-card {
  padding: 14px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(4,13,23,.62);
  cursor: pointer;
  text-align: left;
  transition: .18s ease;
}
.mode-card:hover, .mode-card.selected { border-color: rgba(32,200,255,.56); background: rgba(17,79,101,.2); }
.mode-card.selected { box-shadow: inset 0 0 18px rgba(32,200,255,.06); }
.mode-icon { display: block; margin-bottom: 8px; color: var(--blue); font-size: 20px; }
.mode-card strong { display: block; font-size: 9px; letter-spacing: .05em; }
.mode-card small { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; }
.difficulty-row { margin: 11px 0; padding: 8px; display: flex; align-items: center; gap: 6px; border-radius: 10px; background: rgba(3,10,19,.55); }
.difficulty-row span { margin-right: auto; padding-left: 3px; color: var(--muted); font-size: 8px; letter-spacing: .12em; }
.difficulty-row button {
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #647a90;
  font-size: 8px;
  cursor: pointer;
}
.difficulty-row button.selected { border-color: rgba(32,200,255,.3); background: rgba(32,200,255,.09); color: #bfeeff; }
.start-button { width: 100%; padding: 13px; font-weight: 900; font-size: 11px; letter-spacing: .12em; }
.start-button span { margin-left: 8px; }
.continue-button {
  width: 100%;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  color: #9db2c5;
  cursor: pointer;
  font-size: 9px;
  letter-spacing: .1em;
}
.continue-button:hover { border-color: rgba(32,200,255,.4); color: white; }
.version { margin: 13px 0 0; color: #3e5367; font-size: 7px; }

.help-modal { padding: 30px; }
.modal-close { position: absolute; right: 15px; top: 15px; width: 34px; height: 34px; border-radius: 9px; font-size: 20px; }
.help-modal h2 { margin: 0 0 20px; font-size: 28px; }
.help-visual { display: grid; grid-template-columns: 1.05fr .95fr; gap: 20px; }
.axis-demo {
  position: relative;
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background-image: linear-gradient(rgba(70,140,180,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(70,140,180,.08) 1px, transparent 1px);
  background-size: 25px 25px;
  overflow: hidden;
}
.axis-demo::after { content: ""; position: absolute; left: 0; right: 0; bottom: 28px; height: 1px; background: rgba(255,255,255,.15); }
.axis-demo svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.axis-demo path { fill: none; stroke: var(--blue); stroke-width: 3; stroke-dasharray: 6 5; filter: drop-shadow(0 0 5px var(--blue)); }
.demo-shot, .demo-target { position: absolute; z-index: 2; bottom: 21px; width: 14px; height: 14px; border-radius: 50%; }
.demo-shot { left: 31px; background: var(--blue); box-shadow: 0 0 12px var(--blue); }
.demo-target { right: 28px; background: var(--red); box-shadow: 0 0 12px var(--red); }
.help-steps { display: flex; flex-direction: column; gap: 10px; }
.help-steps div { display: flex; gap: 10px; }
.help-steps b { flex: 0 0 25px; height: 25px; display: grid; place-items: center; border: 1px solid rgba(32,200,255,.35); border-radius: 7px; color: var(--blue); font-size: 10px; }
.help-steps p { margin: 1px 0; color: #8fa6ba; font-size: 10px; line-height: 1.5; }
.help-steps strong { color: white; }
.supported { margin: 18px 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.supported strong { margin-right: auto; font-size: 9px; letter-spacing: .08em; }
.supported code { padding: 4px 6px; border-radius: 5px; background: rgba(32,200,255,.07); color: #81d8f2; font-size: 8px; }

.result-modal { padding: 35px; text-align: center; width: min(430px, 95vw); }
.result-icon { width: 76px; height: 76px; margin: 0 auto 17px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255,211,106,.4); background: rgba(255,211,106,.08); color: var(--yellow); font-size: 38px; box-shadow: 0 0 35px rgba(255,211,106,.08); }
.result-modal h2 { margin: 0; font-size: 28px; }
.result-modal > p:not(.eyebrow) { color: var(--muted); font-size: 10px; margin: 10px 0 20px; }

/* ─── Online mode card ─── */
.mode-online .mode-icon { color: var(--green); }
.mode-online:hover, .mode-online.selected { border-color: rgba(83,243,176,.5); background: rgba(18,90,62,.2); }
.mode-online.selected { box-shadow: inset 0 0 18px rgba(83,243,176,.06); }

/* ─── Online player info ─── */
.online-player-info { margin: 8px 0 0; color: #53f3b0; font-size: 9px; letter-spacing: .08em; }

/* ─── Lifetime stats ─── */
.lifetime-stats { color: #4d7f99; font-size: 9px; margin: -8px 0 16px; }

/* ─── Name modal ─── */
.name-modal {
  position: relative;
  width: min(440px, 94vw);
  padding: 34px 42px 28px;
  text-align: center;
  border: 1px solid rgba(126,178,218,.18);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 0, rgba(29,136,180,.15), transparent 42%),
    linear-gradient(160deg, rgba(13,27,46,.98), rgba(5,12,22,.99));
  box-shadow: 0 40px 130px rgba(0,0,0,.55);
}
.name-modal h2 { margin: 0; font-size: 42px; letter-spacing: -.04em; font-weight: 950; }
.name-input {
  display: block;
  width: 100%;
  margin: 18px 0 14px;
  padding: 14px 16px;
  border: 1px solid rgba(32,200,255,.35);
  border-radius: 10px;
  background: rgba(3,11,20,.85);
  color: white;
  font-size: 18px;
  text-align: center;
  outline: none;
  letter-spacing: .06em;
}
.name-input:focus { border-color: rgba(32,200,255,.8); box-shadow: 0 0 0 3px rgba(32,200,255,.07); }

/* ─── Giriş bilgi sayfası ───────────────────────────────────────────────── */
.entry-info-button {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(59,130,246,.3);
  border-radius: 50%;
  background: rgba(236,245,255,.92);
  color: #2478d7;
  font: 900 16px/1 Georgia, serif;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(43,61,74,.1);
}
.entry-info-button:hover { color: #fff; background: #2478d7; transform: scale(1.06); }
.info-overlay { z-index: 45; padding: 14px; }
.info-modal {
  position: relative;
  width: min(760px, 97vw);
  max-height: 94vh;
  padding: 30px;
  overflow-y: auto;
  border: 1px solid rgba(73,92,108,.18);
  border-radius: 25px;
  background:
    radial-gradient(circle at 85% 0, rgba(32,201,195,.16), transparent 27%),
    radial-gradient(circle at 5% 10%, rgba(59,130,246,.15), transparent 32%),
    rgba(255,255,255,.98);
  color: #2e3c46;
  box-shadow: 0 30px 90px rgba(25,42,54,.28);
}
.info-modal h2 { max-width: 620px; margin: 0; font-size: clamp(25px, 4vw, 42px); line-height: 1; letter-spacing: -.045em; }
.info-lead { max-width: 635px; margin: 12px 0 18px; color: #637580; font-size: 13px; line-height: 1.55; }
.info-concept-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.info-card { display: flex; gap: 8px; min-height: 82px; padding: 10px; border: 1px solid rgba(73,92,108,.14); border-radius: 13px; background: rgba(255,255,255,.78); }
.info-card > b { flex: 0 0 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; font: 900 14px/1 Consolas, monospace; }
.info-card strong { display: block; margin-top: 1px; font-size: 10px; }
.info-card p { margin: 4px 0 0; color: #70818c; font-size: 9px; line-height: 1.4; }
.info-card code, .step-code { color: #2478d7; font-family: Consolas, monospace; }
.info-card-blue > b { color: #fff; background: #3b82f6; }
.info-card-pink > b { color: #fff; background: #ff5d8f; }
.info-card-green > b { color: #fff; background: #20b98b; }
.info-section { margin-top: 12px; padding: 13px; border: 1px solid rgba(73,92,108,.14); border-radius: 16px; background: rgba(246,249,251,.92); }
.info-section-head { display: flex; align-items: center; gap: 8px; }
.info-section-head > span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; background: #e7efff; color: #2478d7; font: 900 8px/1 Consolas, monospace; }
.info-section-head strong { display: block; font: 900 10px/1.1 Consolas, monospace; letter-spacing: .06em; }
.info-section-head small { display: block; margin-top: 3px; color: #7a8b95; font-size: 9px; }
.step-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 6px; margin: 12px 0 9px; }
.step-flow > div { min-height: 82px; padding: 9px; border: 1px solid rgba(124,92,255,.18); border-radius: 11px; background: #fff; }
.step-flow i { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: #7c5cff; color: #fff; font: 900 9px/1 Consolas, monospace; font-style: normal; }
.step-flow strong { display: block; margin-top: 7px; color: #5842aa; font: 900 10px/1 Consolas, monospace; }
.step-flow small { display: block; margin-top: 5px; color: #71828d; font-size: 8px; line-height: 1.35; }
.step-flow > em { color: #7c5cff; font: 900 16px/1 sans-serif; font-style: normal; }
.step-plain { margin: 0; color: #566873; font-size: 10px; line-height: 1.45; }
.step-plain b { color: #5842aa; }
.step-code { display: block; margin-top: 8px; padding: 7px 8px; overflow-x: auto; border-radius: 8px; background: #eef2ff; font-size: 9px; white-space: nowrap; }
.info-feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; margin-top: 10px; }
.info-feature-grid article { padding: 9px; border-radius: 10px; background: #fff; }
.info-feature-grid b { color: #168665; font: 900 10px/1 Consolas, monospace; }
.info-feature-grid p { margin: 5px 0 0; color: #6c7e89; font-size: 9px; line-height: 1.45; }
.info-feature-grid strong { color: #3e535f; }
.function-language {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 8px;
  overflow-x: auto;
  border-radius: 10px;
  background: #fff;
  color: #657883;
  font-size: 8px;
  line-height: 1.3;
  white-space: nowrap;
}
.function-language strong { color: #2478d7; font: 900 8px/1 Consolas, monospace; }
.function-language span { padding: 4px 6px; border-radius: 6px; background: #f3f7fa; }
.function-language i { color: #2478d7; font-style: normal; font-weight: 900; }
.function-atlas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 7px; }
.function-atlas article {
  min-width: 0;
  padding: 8px;
  border-radius: 9px;
  background: hsl(var(--fn-hue) 75% 52% / .08);
  box-shadow: inset 0 -2px 0 hsl(var(--fn-hue) 72% 48% / .46);
}
.function-atlas b { color: hsl(var(--fn-hue) 58% 38%); font: 900 9px/1 Consolas, monospace; }
.function-atlas p { margin: 5px 0 0; color: #687b86; font-size: 8px; line-height: 1.4; }
.function-atlas strong { color: #3e535f; }
.info-button-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px; margin-top: 10px; }
.info-button-list p { display: flex; align-items: flex-start; gap: 6px; margin: 0; padding: 7px; border-radius: 8px; background: #fff; color: #71828c; font-size: 8px; line-height: 1.4; }
.info-button-list kbd { flex: 0 0 auto; padding: 3px 4px; border: 1px solid rgba(36,120,215,.2); border-radius: 5px; background: #edf5ff; color: #2478d7; font: 900 8px/1 Consolas, monospace; }
.info-footer { margin: 13px 0; color: #526570; font-size: 10px; line-height: 1.45; }
.info-modal .start-button { margin-top: 0; }

/* ─── Lobby modal ─── */
.lobby-modal {
  position: relative;
  width: min(420px, 94vw);
  padding: 34px 42px 28px;
  text-align: center;
  border: 1px solid rgba(83,243,176,.2);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 0, rgba(18,90,62,.22), transparent 45%),
    linear-gradient(160deg, rgba(10,26,20,.98), rgba(5,12,22,.99));
  box-shadow: 0 40px 130px rgba(0,0,0,.55);
}
.lobby-modal h2 { margin: 0; font-size: 38px; letter-spacing: -.04em; font-weight: 950; }
.lobby-modal .menu-logo { color: var(--green); border-color: rgba(83,243,176,.4); }
.lobby-dots { display: flex; gap: 7px; justify-content: center; margin: 16px 0; }
.lobby-dots span {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--green);
  animation: pulse 1s infinite alternate;
}
.lobby-dots span:nth-child(2) { animation-delay: .25s; }
.lobby-dots span:nth-child(3) { animation-delay: .5s; }
.lobby-player-line { color: var(--green); font-size: 10px; letter-spacing: .07em; margin: 8px 0; min-height: 18px; }

/* ─── Formula history ─── */
.history-section { margin: 8px 0 6px; }
.history-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
  min-height: 0;
}
.history-chip {
  padding: 4px 8px;
  border: 1px solid rgba(32,200,255,.22);
  border-radius: 5px;
  background: rgba(3,11,20,.7);
  color: #7bdcf5;
  font: 8px Consolas, monospace;
  cursor: pointer;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: .14s ease;
}
.history-chip:hover { border-color: rgba(32,200,255,.6); color: #d6f7ff; background: rgba(12,48,66,.32); }

/* ─── Mini plotter ─── */
.mini-plot {
  display: block;
  width: 100%;
  height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(3,10,18,.7);
  margin: 6px 0 10px;
}

/* ─── 3 Can sistemi ─── */
.lives-row { display: flex; gap: 4px; margin-top: 4px; }
.life-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
  transition: background .25s, box-shadow .25s;
}
.team-blue .life-dot.full { background: var(--blue); border-color: var(--blue); box-shadow: 0 0 6px var(--blue); }
.team-red  .life-dot.full { background: var(--red);  border-color: var(--red);  box-shadow: 0 0 6px var(--red);  }
.health-chip.dead .life-dot { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.1); box-shadow: none; }

/* ─── Timer infinite ─── */
.timer-infinite { letter-spacing: .1em; font-size: 9px; color: var(--blue); }

/* ─── Mobil kenar formül kumandaları ─── */
.mobile-pad { display: none; }

.hidden { display: none !important; }
.rotate-overlay { display: none; }
@keyframes pulse { from { opacity: .25; transform: translateY(2px); } to { opacity: 1; transform: translateY(-2px); } }
@keyframes formula-caret-blink { 0%, 48% { opacity: 1; } 49%, 100% { opacity: .18; } }

@media (max-width: 980px) {
  .game-layout { grid-template-columns: minmax(0, 1fr) 260px; }
  .control-card { padding: 12px; }
  .health-chip { width: 56px; }
  .team-panel { padding-left: 10px; padding-right: 10px; }
}

@media (max-width: 760px) {
  html, body { overflow: auto; }
  .app-shell { min-height: 100%; height: auto; }
  .game-layout { grid-template-columns: 1fr; }
  .arena-card { min-height: 310px; }
  .hud { height: 58px; flex-basis: 58px; grid-template-columns: 1fr 100px 1fr; }
  .team-panel { padding: 7px 8px; }
  .team-heading { font-size: 8px; }
  .health-chip { width: 38px; }
  .health-chip .health-label { font-size: 6px; }
  .turn-panel strong { font-size: 9px; }
  .turn-panel .timer-track { width: 72px; }
  .canvas-wrap { min-height: 220px; aspect-ratio: 16 / 9; }
  .control-card { overflow: visible; }
  .topbar { height: 54px; flex-basis: 54px; }
  .brand p { display: none; }
  .brand h1 { font-size: 14px; }
  .brand-mark { width: 36px; height: 36px; font-size: 25px; }
  .coordinate-hud { right: 7px; top: 7px; min-width: 128px; padding: 6px 7px; }
  .coordinate-hud small { display: none; }
  .projectile-hud { top: 7px; left: 8px; width: 145px; transform: none; padding: 6px 7px; }
  .axis-legend { left: 7px; bottom: 7px; }
  .panel-tabs { position: sticky; top: 0; z-index: 4; background: #07111e; }
  .panel-tabs button, .fire-button, .guide-action, .apply-formula { min-height: 44px; }
  .equation-box { height: 58px; flex-basis: 58px; }
  #equationInput { font-size: 16px; }
  .function-grid button { min-height: 42px; }
  .combo-card { min-height: 78px; }
  .flash-input textarea { font-size: 16px; }
  .flash-input button { min-height: 42px; }
  .keyboard-hint { margin-top: 15px; }
  .help-visual { grid-template-columns: 1fr; }
}

@media (orientation: portrait) and (max-width: 760px) {
  .rotate-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 34px;
    background:
      radial-gradient(circle at 50% 40%, rgba(32,200,255,.14), transparent 38%),
      #050b14;
    text-align: center;
  }
  .rotate-phone {
    width: 92px;
    height: 54px;
    display: grid;
    place-items: center;
    margin-bottom: 24px;
    border: 2px solid rgba(32,200,255,.6);
    border-radius: 14px;
    color: var(--blue);
    font-size: 36px;
    box-shadow: 0 0 30px rgba(32,200,255,.12);
    animation: rotate-device 1.8s ease-in-out infinite;
  }
  .rotate-overlay strong { font-size: 18px; letter-spacing: .13em; }
  .rotate-overlay p { max-width: 280px; color: #738ba0; font-size: 12px; line-height: 1.55; }
}
@keyframes rotate-device {
  0%, 20% { transform: rotate(90deg); }
  70%, 100% { transform: rotate(0); }
}

@media (max-width: 430px) {
  .app-shell { padding: 6px; }
  .top-actions { gap: 3px; }
  .icon-button { width: 34px; height: 34px; }
  .game-layout { gap: 7px; }
  .arena-card, .control-card { border-radius: 12px; }
  .control-card { padding: 8px; }
}

@media (orientation: landscape) and (max-height: 520px) {
  html, body { overflow: hidden; }
  .app-shell { height: 100%; min-height: 0; padding: 0; }
  .game-layout { position: relative; display: block; min-height: 0; }
  .arena-card { position: absolute; inset: 0; min-height: 0; border: 0; border-radius: 0; }
  .canvas-wrap { min-height: 0; aspect-ratio: auto; }
  .control-card {
    position: absolute;
    inset: 0;
    z-index: 8;
    display: block;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    pointer-events: none;
  }
  .topbar { display: none; }
  .hud {
    position: absolute;
    z-index: 5;
    top: 6px;
    left: 50%;
    width: min(55vw, 520px);
    height: 48px;
    transform: translateX(-50%);
    border: 1px solid rgba(125,176,212,.15);
    border-radius: 10px;
    background: rgba(4,12,21,.74);
    backdrop-filter: blur(8px);
  }
  .canvas-wrap { height: 100%; }
  .panel-tabs {
    position: absolute;
    z-index: 12;
    top: 8px;
    left: 8px;
    width: 258px;
    margin: 0;
    pointer-events: auto;
    background: rgba(3,10,18,.82);
    backdrop-filter: blur(8px);
  }
  .side-panel { pointer-events: auto; }
  .side-panel[data-panel-content="shot"].active {
    position: absolute;
    inset: 0;
    display: block;
    pointer-events: none;
  }
  .side-panel[data-panel-content="shot"] .control-title,
  .side-panel[data-panel-content="shot"] .error-message,
  .side-panel[data-panel-content="shot"] .formula-lesson { display: none; }
  .side-panel[data-panel-content="shot"] .equation-box {
    position: absolute;
    z-index: 12;
    left: 50%;
    bottom: 10px;
    width: min(48vw, 520px);
    height: 48px;
    margin: 0;
    transform: translateX(-50%);
    pointer-events: auto;
    background: rgba(2,9,16,.9);
    backdrop-filter: blur(8px);
  }
  .side-panel[data-panel-content="shot"] #equationInput {
    display: none;
  }
  .mobile-equation-display {
    min-width: 0;
    height: 100%;
    flex: 1;
    display: block;
    padding: 0 7px;
    overflow-x: auto;
    overflow-y: hidden;
    color: #fff;
    font: 14px/48px Consolas, monospace;
    white-space: pre;
    scrollbar-width: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-equation-display::-webkit-scrollbar { display: none; }
  .mobile-formula-char {
    display: inline-block;
    min-width: .6em;
    text-align: center;
  }
  .mobile-formula-caret {
    display: inline-block;
    width: 2px;
    height: 20px;
    margin: 0 -1px;
    vertical-align: middle;
    border-radius: 2px;
    background: var(--blue);
    box-shadow: 0 0 7px rgba(32,200,255,.8);
    animation: formula-caret-blink .85s steps(1) infinite;
  }
  .side-panel[data-panel-content="shot"] .function-grid {
    position: absolute;
    z-index: 11;
    left: 8px;
    bottom: 8px;
    width: 248px;
    grid-template-columns: repeat(6, 1fr);
    pointer-events: auto;
  }
  .side-panel[data-panel-content="shot"] .function-grid button {
    min-height: 31px;
    height: 31px;
    background: rgba(4,15,25,.84);
    backdrop-filter: blur(6px);
  }
  .side-panel[data-panel-content="shot"] .fire-button {
    position: absolute;
    z-index: 12;
    right: 12px;
    bottom: 10px;
    width: 150px;
    min-height: 48px;
    pointer-events: auto;
  }
  .side-panel:not([data-panel-content="shot"]).active {
    position: absolute;
    z-index: 10;
    top: 57px;
    right: 8px;
    bottom: 8px;
    width: min(350px, 43vw);
    padding: 12px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(4,13,23,.92);
    backdrop-filter: blur(12px);
  }
  .keyboard-hint { display: none; }
  .history-section, .mini-plot { display: none; }
  .side-panel[data-panel-content="shot"] .function-grid { display: none !important; }
  .mobile-pad { display: block; }

  /* ── Sol ana şerit ─────────────────────────────── */
  .lpad {
    position: absolute;
    left: 6px;
    top: 58px;
    bottom: 68px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    z-index: 11;
    pointer-events: auto;
  }
  .lpad button:not(.lpad-arrow) {
    width: 44px;
    height: 38px;
    border: 1px solid rgba(83,243,176,.3);
    border-radius: 8px;
    background: rgba(3,12,22,.9);
    backdrop-filter: blur(8px);
    color: #6df5c0;
    font: bold 10px Consolas, monospace;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background .08s, transform .08s;
  }
  .lpad button:not(.lpad-arrow):active {
    background: rgba(83,243,176,.16);
    color: #fff;
    transform: scale(.9);
  }
  .lpad-arrow {
    width: 44px;
    height: 20px;
    border: 1px solid rgba(32,200,255,.18);
    border-radius: 5px;
    background: rgba(3,10,20,.78);
    backdrop-filter: blur(6px);
    color: rgba(32,200,255,.5);
    font-size: 9px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: .15s;
  }
  .lpad-arrow.active {
    color: var(--blue);
    border-color: rgba(32,200,255,.55);
    background: rgba(32,200,255,.12);
  }
  .lpad-arrow:active { transform: scale(.88); }

  /* ── Pop-out sekmeler ──────────────────────────── */
  .lpad-pop {
    position: absolute;
    left: 56px;
    top: 58px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    width: 196px;
    padding: 7px;
    background: rgba(4,12,22,.97);
    border: 1px solid rgba(32,200,255,.22);
    border-radius: 11px;
    box-shadow: 0 8px 32px rgba(0,0,0,.45);
    opacity: 0;
    pointer-events: none;
    transform: translateX(-6px) scale(.95);
    transform-origin: left top;
    transition: opacity .18s ease, transform .18s ease;
    z-index: 15;
  }
  .lpad-pop-bot {
    top: auto;
    bottom: 68px;
    transform-origin: left bottom;
  }
  .lpad-pop.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0) scale(1);
  }
  .lpad-pop button {
    width: 44px;
    height: 34px;
    border: 1px solid rgba(32,200,255,.18);
    border-radius: 7px;
    background: rgba(6,18,32,.88);
    color: #9dd8f5;
    font: bold 10px Consolas, monospace;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background .08s;
  }
  .lpad-pop button:active { background: rgba(32,200,255,.2); color: #fff; transform: scale(.9); }
  .lpad-pop button[data-insert="+"],
  .lpad-pop button[data-insert="-"],
  .lpad-pop button[data-insert="*"],
  .lpad-pop button[data-insert="/"],
  .lpad-pop button[data-insert="^"],
  .lpad-pop button[data-insert="("],
  .lpad-pop button[data-insert=")"] { color: #ffd36a; border-color: rgba(255,211,106,.22); }
  .lpad-pop button[data-insert="abs("],
  .lpad-pop button[data-insert="sqrt("],
  .lpad-pop button[data-insert="step("],
  .lpad-pop button[data-insert="pulse("],
  .lpad-pop button[data-insert="saw("],
  .lpad-pop button[data-insert="tri("] { color: #6df5c0; border-color: rgba(83,243,176,.2); font-size: 9px; }
  .lpad-pop button[data-insert="x"],
  .lpad-pop button[data-insert="pi"],
  .lpad-pop button[data-insert="e"] { color: #ff9bd0; border-color: rgba(255,155,208,.22); }

  /* ── Sağ 2/4/6/8 formül yön kumandası ──────────── */
  .rpad {
    position: absolute;
    right: 6px;
    top: 58px;
    bottom: 68px;
    width: 116px;
    display: grid;
    grid-template-columns: repeat(3, 34px);
    grid-template-rows: repeat(4, 34px);
    place-content: center;
    gap: 4px;
    z-index: 11;
    pointer-events: auto;
  }
  .rpad button {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(32,200,255,.28);
    border-radius: 9px;
    background: rgba(3,12,22,.9);
    backdrop-filter: blur(8px);
    color: #9dd8f5;
    font: bold 12px Consolas, monospace;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background .08s, transform .08s;
  }
  .rpad button span { margin-left: 2px; color: var(--blue); font-size: 9px; }
  .rpad-up { grid-column: 2; grid-row: 1; }
  .rpad-left { grid-column: 1; grid-row: 2; }
  .rpad-right { grid-column: 3; grid-row: 2; }
  .rpad-down { grid-column: 2; grid-row: 3; }
  .rpad button:active { background: rgba(32,200,255,.2); color: #fff; transform: scale(.9); }
  .rpad .rpad-edit {
    width: auto;
    height: 30px;
    grid-row: 4;
    grid-column: 1 / span 2;
    border-color: rgba(255,105,138,.3);
    color: #ff8ba5;
    font-size: 13px;
  }
  .rpad .rpad-clear {
    width: 34px;
    grid-column: 3;
    color: #ffd36a;
    border-color: rgba(255,211,106,.28);
  }
  .formula-lesson { display: none; }
  .health-chip { width: 44px; }
  .life-dot { width: 7px; height: 7px; }
  .coordinate-hud {
    top: 62px;
    right: 126px;
    min-width: 0;
    padding: 6px 9px;
  }
  .coordinate-hud span,
  .coordinate-hud small,
  .projectile-hud,
  .axis-legend { display: none !important; }
  .coordinate-hud strong { margin: 0; font-size: 10px; }
  .toast { top: 64px; }
  .thinking { z-index: 6; }
  .overlay { z-index: 30; }
  .menu-modal {
    width: min(680px, 96vw);
    max-height: 96vh;
    padding: 12px 24px;
  }
  .menu-logo { width: 36px; height: 36px; margin-bottom: 5px; font-size: 26px; }
  .menu-modal .eyebrow { margin-bottom: 4px; }
  .menu-modal h2 { font-size: 29px; line-height: .88; }
  .menu-copy { margin: 7px auto; font-size: 9px; }
  .mode-card { padding: 8px 10px; }
  .mode-icon { display: inline; margin: 0 7px 0 0; font-size: 14px; }
  .mode-card strong { display: inline; }
  .mode-card small { margin-left: 22px; }
  .difficulty-row { margin: 6px 0; padding: 5px; }
  .start-button { padding: 10px; }
  .menu-modal .version { display: none; }
  .help-modal { max-height: 96vh; padding: 18px; }
  .help-modal h2 { margin-bottom: 8px; font-size: 20px; }
}

/* Açık tema son katmanı: eski koyu kuralların üzerinde kalır. */
html, body { background: #edf2f5; color: var(--text); }
body::before {
  opacity: .7;
  background-image:
    linear-gradient(rgba(94,112,126,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94,112,126,.07) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: none;
}
.brand-mark, .menu-logo {
  color: #fff;
  border: 0;
  background: conic-gradient(from 210deg, #3b82f6, #20c9c3, #feca57, #ff6b8b, #a55eea, #3b82f6);
  box-shadow: 0 8px 22px rgba(63,93,122,.18), inset 0 1px 2px rgba(255,255,255,.5);
}
.brand h1 span, .menu-modal h2 span, .result-modal h2 span { color: #3b82f6; }
.icon-button, .small-button, .modal-close {
  border-color: rgba(73,92,108,.16);
  background: rgba(255,255,255,.88);
  color: #647581;
}
.game-layout { position: relative; display: block; }
.arena-card {
  width: 100%;
  height: 100%;
  border-color: rgba(73,92,108,.16);
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 18px 55px rgba(49,67,80,.13);
}
.hud {
  border-bottom-color: rgba(73,92,108,.13);
  background: rgba(255,255,255,.94);
}
.turn-panel { border-color: rgba(73,92,108,.12); }
.health-line, .timer-track { background: rgba(79,96,109,.13); }
.canvas-wrap { background: #f4f7fa; }

.control-card {
  position: absolute;
  z-index: 18;
  top: 16px;
  right: 16px;
  width: 68px;
  height: 68px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 50%;
  background:
    radial-gradient(circle at 33% 25%, rgba(255,255,255,.9), transparent 21%),
    conic-gradient(from 190deg, #3b82f6, #20c9c3, #feca57, #ff6b8b, #a55eea, #3b82f6);
  box-shadow: 0 12px 35px rgba(58,82,101,.22);
  transition: width .25s ease, height .25s ease, border-radius .25s ease,
    background .2s ease, box-shadow .2s ease;
}
.control-card:hover,
.control-card.is-open {
  width: min(380px, calc(100% - 32px));
  height: calc(100% - 32px);
  padding: 0;
  border-radius: 22px;
  border-color: rgba(73,92,108,.18);
  background: rgba(255,255,255,.97);
  box-shadow: 0 22px 65px rgba(43,61,74,.2);
}
.toolbox-toggle {
  position: absolute;
  z-index: 2;
  top: 8px;
  right: 8px;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  color: #fff;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.5);
}
.toolbox-toggle span { font-size: 28px; line-height: .7; }
.toolbox-toggle small { display: none; }
.control-card:hover .toolbox-toggle,
.control-card.is-open .toolbox-toggle {
  background: conic-gradient(from 190deg, #3b82f6, #20c9c3, #feca57, #ff6b8b, #a55eea, #3b82f6);
}
.toolbox-content {
  height: 100%;
  padding: 70px 12px 12px;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transform: translateX(10px);
  transition: opacity .14s ease, transform .2s ease;
}
.control-card:hover .toolbox-content,
.control-card.is-open .toolbox-content {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}
.panel-tabs { border-color: rgba(73,92,108,.14); background: #f1f4f6; }
.panel-tabs button { color: #80909c; }
.panel-tabs button:hover { color: #34434d; }
.panel-tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #20c9c3);
}
.control-title strong { color: #293740; }
.equation-box { border-color: rgba(59,130,246,.26); background: #f4f7fa; }
#equationInput { color: #263640; }
.function-grid button, .combo-card, .guide-list article, .flash-quick button, .history-chip {
  border-color: rgba(73,92,108,.14);
  background: #f5f7f9;
  color: #526570;
}
.formula-lesson { border-left-color: #3b82f6; background: #eef5ff; }
.formula-lesson p, .panel-intro, .combo-card small, .guide-list p, .flash-note { color: #748590; }
.combo-card code, .examples code { color: #2478d7; }
.fire-button, .start-button {
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #20c9c3);
}
.axis-legend, .coordinate-hud, .projectile-hud {
  border-color: rgba(73,92,108,.15);
  background: rgba(255,255,255,.88);
  color: #556873;
}
.coordinate-hud strong { color: #2c3b45; }
.toast { border-color: rgba(73,92,108,.16); background: rgba(255,255,255,.94); color: #33434d; }
.thinking { background: rgba(255,255,255,.25); }
.overlay { background: rgba(229,235,239,.78); }
.menu-modal, .help-modal, .result-modal, .name-modal, .lobby-modal {
  border-color: rgba(73,92,108,.16);
  background:
    radial-gradient(circle at 50% 0, rgba(59,130,246,.08), transparent 42%),
    rgba(255,255,255,.98);
  box-shadow: 0 35px 100px rgba(49,67,80,.2);
  color: #283640;
}
.menu-copy, .help-steps p, .result-modal > p:not(.eyebrow) { color: #70818d; }
.mode-card, .difficulty-row { border-color: rgba(73,92,108,.13); background: #f3f6f8; color: #34434d; }
.mode-card:hover, .mode-card.selected, .mode-online:hover, .mode-online.selected {
  border-color: rgba(59,130,246,.38);
  background: #eaf3ff;
}
.difficulty-row button.selected { background: #fff; color: #2674cd; }
.name-input, .flash-input { background: #f4f7fa; color: #263640; }
.flash-messages { background: #f3f6f8; }
.flash-message.agent { background: #eaf3ff; color: #536a78; }
.flash-message.user { background: #e9faf4; color: #3d6658; }
.mini-plot { background: #f6f8fa; }

@media (orientation: landscape) and (max-height: 520px) {
  .control-card,
  .control-card:hover,
  .control-card.is-open {
    width: auto;
    height: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .toolbox-toggle { display: none; }
  .toolbox-content {
    display: contents;
    padding: 0;
    overflow: visible;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
  .hud, .panel-tabs { background: rgba(255,255,255,.9); }
  .side-panel[data-panel-content="shot"] .equation-box,
  .side-panel:not([data-panel-content="shot"]).active { background: rgba(255,255,255,.95); }
  .mobile-equation-display { color: #273640; }
  .lpad button:not(.lpad-arrow), .lpad-arrow, .lpad-pop, .lpad-pop button, .rpad button {
    border-color: rgba(73,92,108,.18);
    background: rgba(255,255,255,.92);
    color: #526570;
    box-shadow: 0 4px 12px rgba(46,65,78,.08);
  }
  .lpad button:not(.lpad-arrow) { color: #148c70; }
  .rpad button span { color: #2478d7; }
}

/* ─── Kalıcı formül çubuğu + dört kenar kumandası ──────────────────────── */
.edge-controls {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: block;
  pointer-events: none;
}
.edge-side {
  position: absolute;
  top: 50%;
  display: flex;
  flex-direction: column;
  gap: 7px;
  transform: translateY(-50%);
  pointer-events: auto;
}
.edge-left { left: 10px; }
.edge-right { right: 10px; }
.edge-side button,
.drawer-handle,
.drawer-menu button,
.formula-edit-controls button {
  border: 1px solid rgba(69,88,102,.17);
  background: rgba(255,255,255,.64);
  color: #40525e;
  box-shadow: 0 5px 16px rgba(43,61,74,.1);
  backdrop-filter: blur(8px);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.edge-side button {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  font: 800 16px Consolas, monospace;
  opacity: .72;
  transition: opacity .15s, transform .1s, background .15s;
}
.edge-side button:hover,
.edge-side button:active {
  opacity: 1;
  background: rgba(255,255,255,.94);
  transform: scale(1.06);
}
.edge-left button { color: #d07b00; }
.edge-right button { color: #2478d7; }

.function-drawer {
  position: absolute;
  left: 50%;
  display: flex;
  align-items: center;
  pointer-events: auto;
  transform: translateX(-50%);
}
.function-drawer-top {
  top: 8px;
  flex-direction: column;
}
.function-drawer-bottom {
  bottom: 76px;
  flex-direction: column-reverse;
}
.drawer-handle {
  min-width: 82px;
  height: 27px;
  padding: 0 12px;
  border-radius: 999px;
  color: #60737f;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .13em;
  opacity: .72;
}
.drawer-handle span { margin-left: 4px; color: #3b82f6; }
.drawer-menu {
  display: flex;
  gap: 5px;
  padding: 6px;
  border: 1px solid rgba(69,88,102,.14);
  border-radius: 13px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 10px 28px rgba(43,61,74,.14);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.function-drawer-top .drawer-menu {
  width: min(760px, calc(100vw - 120px));
  flex-wrap: nowrap;
  justify-content: flex-start;
  overflow-x: auto;
  scrollbar-width: none;
  margin-top: 5px;
  transform: translateY(-6px) scale(.97);
}
.function-drawer-top .drawer-menu::-webkit-scrollbar { display: none; }
.function-drawer-bottom .drawer-menu {
  margin-bottom: 5px;
  transform: translateY(6px) scale(.97);
}
.function-drawer.open .drawer-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.function-drawer.open .drawer-handle { opacity: 1; background: rgba(255,255,255,.95); }
.drawer-menu button {
  min-width: 44px;
  height: 33px;
  padding: 0 8px;
  border-radius: 9px;
  font: 800 10px Consolas, monospace;
}
.function-drawer-top .drawer-menu button { color: #9a54d4; }
.function-drawer-bottom .drawer-menu button { color: #148c70; }
.function-drawer-bottom .root-sin-scroll {
  min-width: 66px;
  display: grid;
  grid-template-columns: 31px 1fr;
  align-items: center;
  gap: 4px;
  padding: 2px 5px;
  overflow: hidden;
  cursor: ns-resize;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.root-sin-scroll b { font: 900 9px/1 Consolas, monospace; white-space: nowrap; }
.root-sin-scroll i {
  width: 18px;
  height: 27px;
  border-radius: 6px;
  background:
    linear-gradient(to bottom, rgba(255,255,255,.96), transparent 30%, transparent 70%, rgba(255,255,255,.96)),
    repeating-linear-gradient(to bottom, #53a58d 0 2px, transparent 2px 7px);
  background-position: 0 0, 0 var(--wheel-shift, 0px);
  box-shadow: inset 0 0 0 1px rgba(0,167,142,.12);
}
.root-sin-scroll.active i,
.root-sin-scroll.dragging i {
  background:
    linear-gradient(to bottom, rgba(0,167,142,.96), transparent 30%, transparent 70%, rgba(0,167,142,.96)),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.94) 0 2px, transparent 2px 7px);
  background-position: 0 0, 0 var(--wheel-shift, 0px);
}

.formula-dock {
  position: absolute;
  z-index: 14;
  left: 50%;
  bottom: 12px;
  width: min(880px, calc(100% - 210px));
  min-height: 52px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 82px auto 132px;
  gap: 7px;
  align-items: stretch;
  transform: translateX(-50%);
  pointer-events: auto;
}
.formula-stage-tabs {
  position: absolute;
  z-index: 5;
  left: 0;
  bottom: calc(100% + 5px);
  max-width: 44%;
  height: 27px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  overflow-y: hidden;
  pointer-events: none;
  scrollbar-width: none;
  white-space: nowrap;
}
.formula-stage-tabs::-webkit-scrollbar { display: none; }
.formula-stage-tabs:empty { display: none; }
.formula-stage-tab {
  flex: 0 0 auto;
  min-width: 42px;
  height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(66,84,96,.16);
  border-radius: 8px;
  background: rgba(255,255,255,.92);
  color: #586a75;
  box-shadow: 0 4px 12px rgba(43,61,74,.1);
  backdrop-filter: blur(8px);
  font: 900 8px/1 Consolas, monospace;
  pointer-events: auto;
  cursor: pointer;
  touch-action: manipulation;
}
.formula-stage-tab.stage-root { color: #278a64; }
.formula-stage-tab.stage-step {
  color: #123f85;
  box-shadow: inset 0 -2px 0 rgba(18,63,133,.34), 0 4px 12px rgba(43,61,74,.1);
}
.formula-stage-tab.stage-function {
  color: hsl(var(--tab-hue) 58% 36%);
  background: hsl(var(--tab-hue) 78% var(--tab-tone) / .12);
  box-shadow: inset 0 -2px 0 hsl(var(--tab-hue) 72% var(--tab-tone) / .72), 0 4px 12px rgba(43,61,74,.08);
}
.formula-stage-tab.active {
  border-color: #3b82f6;
  background: #3b82f6;
  color: #fff;
  box-shadow: 0 5px 14px rgba(59,130,246,.3);
}
body.has-formula-stages .formula-origin-key { display: none; }
.formula-symbols-popover {
  position: absolute;
  left: 50%;
  bottom: 60px;
  width: min(690px, calc(100vw - 130px));
  display: flex;
  gap: 4px;
  padding: 6px;
  overflow-x: auto;
  border: 1px solid rgba(69,88,102,.15);
  border-radius: 13px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 10px 28px rgba(43,61,74,.14);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 7px) scale(.98);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  scrollbar-width: none;
}
.formula-symbols-popover::-webkit-scrollbar { display: none; }
.formula-symbols-popover.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}
.formula-symbols-popover button {
  flex: 0 0 34px;
  height: 31px;
  padding: 0;
  border: 1px solid rgba(69,88,102,.15);
  border-radius: 8px;
  background: #f5f7f9;
  color: #445762;
  font: 800 11px Consolas, monospace;
  cursor: pointer;
}
.formula-confirm-button {
  width: 82px;
  border: 1px solid rgba(32,185,139,.25);
  border-radius: 10px;
  background: rgba(236,253,247,.94);
  color: #168665;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .06em;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(43,61,74,.09);
}
.formula-confirm-button.confirmed { background: #20b98b; color: #fff; }
.formula-confirm-button.rejected { background: #ff6b8b; color: #fff; }
.formula-dock .equation-box {
  height: 52px;
  margin: 0;
  border-color: rgba(69,88,102,.17);
  background: rgba(255,255,255,.92);
  box-shadow: 0 8px 24px rgba(43,61,74,.14);
  backdrop-filter: blur(10px);
}
.formula-edit-controls {
  display: grid;
  grid-template-columns: repeat(4, 30px);
  gap: 4px;
}
.formula-edit-controls button {
  width: 30px;
  min-height: 24px;
  padding: 0;
  border-radius: 8px;
  color: #5b6e7a;
  font: 800 12px Consolas, monospace;
}
.formula-edit-controls button:hover { background: #fff; color: #2478d7; }
.formula-dock .fire-button {
  width: 132px;
  min-height: 52px;
}

@media (orientation: landscape) and (max-height: 520px) {
  .edge-side { gap: 5px; }
  .edge-left { left: 7px; }
  .edge-right { right: 7px; }
  .edge-side button {
    width: 37px;
    height: 34px;
    border-radius: 9px;
    background: rgba(255,255,255,.74);
    font-size: 14px;
  }
  .function-drawer-top { top: 57px; }
  .function-drawer-bottom { bottom: 104px; }
  .drawer-handle { height: 22px; min-width: 68px; font-size: 7px; }
  .drawer-menu { gap: 3px; padding: 4px; }
  .function-drawer-top .drawer-menu {
    width: min(700px, calc(100vw - 104px));
  }
  .drawer-menu button { min-width: 38px; height: 29px; padding: 0 5px; font-size: 9px; }
  .formula-dock {
    bottom: 7px;
    width: min(700px, calc(100% - 120px));
    min-height: 48px;
    grid-template-columns: minmax(150px, 1fr) 72px auto 126px;
    gap: 5px;
  }
  .formula-dock .equation-box { height: 48px; }
  .formula-dock #equationInput { display: none; }
  .formula-dock .mobile-equation-display {
    min-width: 0;
    height: 100%;
    flex: 1;
    display: block;
    padding: 0 7px;
    overflow-x: auto;
    overflow-y: hidden;
    color: #273640;
    font: 14px/48px Consolas, monospace;
    white-space: pre;
    scrollbar-width: none;
    touch-action: manipulation;
  }
  .formula-edit-controls {
    grid-template-columns: repeat(4, 26px);
    gap: 3px;
  }
  .formula-edit-controls button { width: 26px; min-height: 22px; }
  .formula-confirm-button { width: 72px; font-size: 7px; }
  .formula-symbols-popover {
    bottom: 55px;
    width: min(650px, calc(100vw - 110px));
    padding: 4px;
  }
  .formula-symbols-popover button { flex-basis: 31px; height: 28px; }
  .formula-dock .fire-button { width: 126px; min-height: 48px; }
  .side-panel[data-panel-content="shot"].active {
    position: static;
    inset: auto;
    pointer-events: auto;
  }
}

/* ─── ÇERÇEVESIZ TASARIM — her zaman aktif ─────────────────────────────── */
html, body { overflow: hidden; height: 100%; }
.app-shell { height: 100% !important; padding: 0 !important; }
.topbar { display: none !important; }
.game-layout { position: relative !important; display: block !important; height: 100% !important; min-height: 0 !important; }
.control-card { display: none !important; }
.arena-card {
  position: absolute !important;
  inset: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.canvas-wrap {
  position: absolute !important;
  inset: 0 !important;
  aspect-ratio: auto !important;
  min-height: 0 !important;
  flex: 1;
}
.hud {
  position: absolute !important;
  z-index: 6;
  top: 8px;
  left: 50%;
  width: min(84vw, 760px);
  height: auto !important;
  min-height: 50px;
  flex: none !important;
  transform: translateX(-50%);
  border: 1px solid rgba(125,176,212,.18) !important;
  border-radius: 10px !important;
  background: rgba(4,12,21,.82) !important;
  backdrop-filter: blur(10px);
  display: grid !important;
  grid-template-columns: 1fr auto auto !important;
  align-items: center;
  padding: 6px 10px !important;
  gap: 10px;
}
.all-units {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.hud-actions {
  display: flex;
  gap: 4px;
  align-items: center;
}
.hud-actions .icon-button {
  width: 30px;
  height: 30px;
  font-size: 14px;
  border-radius: 8px;
}
.turn-panel {
  border: 0 !important;
  background: transparent !important;
  padding: 2px 10px;
  text-align: center;
}
.health-chip { width: auto; min-width: 26px; }
.health-chip .health-label { justify-content: center; margin-bottom: 2px; }
.life-dot.full {
  background: var(--unit-color, var(--blue)) !important;
  border-color: var(--unit-color, var(--blue)) !important;
  box-shadow: 0 0 5px var(--unit-color, var(--blue)) !important;
}

/* ─── Zoom butonları ─── */
.zoom-controls {
  position: absolute;
  z-index: 14;
  right: 10px;
  bottom: 76px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: auto;
}
.zoom-btn {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(125,176,212,.22);
  border-radius: 9px;
  background: rgba(4,12,21,.78);
  color: #c8dce8;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  transition: background .14s, color .14s;
  line-height: 1;
}
.zoom-btn:hover { background: rgba(32,200,255,.2); color: #fff; }
.zoom-btn:active { background: rgba(32,200,255,.35); }

/* ─── Parametre slider paneli ─── */
.param-slider-panel {
  position: absolute;
  z-index: 14;
  left: 50%;
  bottom: 80px;
  transform: translateX(-50%);
  display: none;
  flex-direction: column;
  gap: 5px;
  background: rgba(4,12,21,.88);
  border: 1px solid rgba(125,176,212,.2);
  border-radius: 12px;
  padding: 8px 14px;
  backdrop-filter: blur(10px);
  min-width: 200px;
  max-width: min(500px, 80vw);
  pointer-events: auto;
}
.param-slider-panel:not(:empty) { display: flex; }
.param-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex: 0 0 auto;
  touch-action: none;
}
.param-panel-grip {
  color: #536276;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
}
.param-panel-toggle {
  width: 24px;
  height: 24px;
  border: 1px solid rgba(105,124,150,.24);
  border-radius: 9px;
  background: rgba(255,255,255,.88);
  color: #536276;
  font-weight: 900;
}
.param-panel-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.param-slider-panel.collapsed {
  width: auto;
  min-width: 0;
  padding: 5px 6px;
}
.param-slider-panel.collapsed .param-panel-body { display: none; }
.param-row {
  display: grid;
  grid-template-columns: 20px 1fr 36px;
  align-items: center;
  gap: 8px;
}
.param-name {
  color: #53f3b0;
  font: 800 12px Consolas, monospace;
  text-align: center;
}
.param-value {
  color: #c8dce8;
  font: 700 10px Consolas, monospace;
  text-align: right;
  min-width: 32px;
}
.param-slider-input {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background: rgba(125,176,212,.2);
  outline: none;
  cursor: pointer;
}
.param-slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #53f3b0;
  border: 2px solid rgba(4,12,21,.8);
  cursor: pointer;
}
.param-slider-input::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #53f3b0;
  border: 2px solid rgba(4,12,21,.8);
  cursor: pointer;
}

/* ─── Akıllı x/y ve ⌫ büyük butonlar ─── */
.quick-variable-btn {
  background: rgba(83,243,176,.12) !important;
  color: #53f3b0 !important;
  border-color: rgba(83,243,176,.3) !important;
  font: 800 13px Consolas, monospace !important;
  min-width: 32px;
}
.quick-variable-btn:hover,
.quick-variable-btn.is-pressing { background: rgba(83,243,176,.25) !important; }
.smart-variable-button {
  user-select: none;
  -webkit-user-select: none;
  touch-action: none !important;
}
.quick-del-btn {
  background: rgba(255,93,143,.1) !important;
  color: #ff5d8f !important;
  border-color: rgba(255,93,143,.25) !important;
  min-width: 32px;
}
.quick-del-btn:hover { background: rgba(255,93,143,.22) !important; }

/* ─── x/y basılı tutma kaydırma skalası ─── */
.variable-gesture-menu {
  position: fixed;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px;
  border: 1px solid rgba(69,88,102,.18);
  border-radius: 13px;
  background: rgba(255,255,255,.97);
  box-shadow: 0 13px 34px rgba(43,61,74,.2);
  backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 8px) scale(.96);
  transition: opacity .14s ease, transform .14s ease, visibility .14s;
}
.variable-gesture-menu.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}
.variable-gesture-menu > span {
  padding: 0 5px;
  color: #60727e;
  font: 800 9px/1 Consolas, monospace;
  white-space: nowrap;
  text-transform: uppercase;
}
.variable-gesture-menu button {
  width: 38px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(69,88,102,.16);
  border-radius: 9px;
  background: #f3f7f8;
  color: #2478d7;
  font: 900 12px Consolas, monospace;
  cursor: pointer;
  touch-action: none;
}
.variable-gesture-menu button:hover,
.variable-gesture-menu button.selected {
  border-color: rgba(32,185,139,.45);
  background: #dff9ef;
  color: #168665;
  transform: translateY(-2px);
}

/* ─── Eğri modu düğmesi (HUD) ─── */
.curve-mode-btn {
  width: auto !important;
  min-width: 0;
  padding: 0 9px !important;
  font: 800 10px/1 Consolas, monospace !important;
  letter-spacing: .04em;
  white-space: nowrap;
  color: #cfe8ff;
}
.curve-mode-btn.plane {
  background: rgba(32,185,139,.18) !important;
  border-color: rgba(32,185,139,.5) !important;
  color: #6df3c0 !important;
}
.assist-btn {
  width: auto !important;
  min-width: 0;
  padding: 0 9px !important;
  font: 800 10px/1 Consolas, monospace !important;
  letter-spacing: .04em;
  white-space: nowrap;
  color: #cfe8ff;
}
.assist-btn.active {
  background: rgba(255,143,67,.22) !important;
  border-color: rgba(255,143,67,.6) !important;
  color: #ffb37a !important;
  box-shadow: 0 0 10px rgba(255,143,67,.35);
}
/* İpucu/uzun toast metni sarsın, taşmasın */
.toast {
  max-width: min(560px, 88vw);
  white-space: normal;
  text-align: center;
  line-height: 1.4;
}
/* Düzlem modunda atıcıya-göre etiketler yanıltıcı; gizle */
body.plane-mode .axis-legend,
body.plane-mode .coordinate-hud small { display: none !important; }

/* ─── Değişken paneli (x y a b) ─── */
.var-toggle-btn {
  width: auto !important;
  padding: 0 6px !important;
  font: 800 10px Consolas, monospace !important;
  color: #2478d7 !important;
  background: rgba(36,120,215,.1) !important;
  border: 1px solid rgba(36,120,215,.3) !important;
  white-space: nowrap;
}
.var-toggle-btn.open { background: rgba(36,120,215,.25) !important; }
.variable-panel {
  position: absolute;
  left: 50%;
  bottom: 60px;
  display: flex;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(69,88,102,.16);
  border-radius: 13px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 12px 30px rgba(43,61,74,.18);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 7px) scale(.98);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 16;
}
.variable-panel.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}
.vp-group { display: flex; flex-direction: column; gap: 6px; }
.vp-label {
  font: 800 8px Consolas, monospace;
  letter-spacing: .06em;
  color: #8094a3;
  text-transform: uppercase;
}
.vp-row { display: flex; gap: 5px; }
.variable-panel button {
  width: 38px;
  height: 36px;
  padding: 0;
  border-radius: 9px;
  border: 1px solid rgba(69,88,102,.18);
  font: 900 15px Consolas, monospace;
  cursor: pointer;
  touch-action: none;
}
.variable-panel .vp-axis { background: #eafaf3; color: #168665; border-color: rgba(32,185,139,.4); }
.variable-panel .vp-axis:hover, .variable-panel .vp-axis.is-pressing { background: #d6f6e9; }
.variable-panel .vp-param { background: #eef4fb; color: #2478d7; border-color: rgba(36,120,215,.35); }
.variable-panel .vp-param:hover { background: #ddeafa; }

/* ═══ ARAYÜZ SADELEŞTİRME (v50) ═══ */
/* İstenmeyen butonları gizle: müzik, tam ekran, tekrar eden x/y/C */
#soundButton, #fullscreenButton,
#insertXBtn, #insertYBtn, #mobileClear { display: none !important; }

/* Üst bar/tablo YOK — öğeler köşelerde tek tek serbest yüzer, hiçbir kapsayıcıya bağlı değil */
.hud {
  position: absolute !important;
  inset: 0 !important;
  width: auto !important;
  height: auto !important;
  transform: none !important;
  display: block !important;
  border: 0 !important;
  background: transparent !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  gap: 0 !important;
  pointer-events: none;            /* tüm boş alan haritaya tıklanır */
}
.all-units {
  position: absolute; top: 10px; left: 12px;
  pointer-events: auto;
  background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important;
  filter: drop-shadow(0 1px 2px rgba(20,30,40,.35));
}
.turn-panel {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  pointer-events: auto;
  background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important;
  text-shadow: 0 1px 4px rgba(255,255,255,.9), 0 0 2px rgba(255,255,255,.9);
}
.hud-actions {
  position: absolute; top: 10px; right: 12px;
  display: flex; gap: 7px; pointer-events: auto;
}
.hud-actions .icon-button {
  width: 34px !important; height: 34px !important; font-size: 15px;
  background: rgba(255,255,255,.82) !important;
  border: 1px solid rgba(73,92,108,.16) !important;
  box-shadow: 0 4px 14px rgba(43,61,74,.16);
  backdrop-filter: blur(8px);
}

/* "ÖZEL" çekmecesi en tepeyi kaplamasın (HUD'ın altına insin) */
.function-drawer-top { top: 58px !important; }

/* Alt düzenleme satırı: tekrarlar gitti, DELETE büyük */
.formula-edit-controls {
  display: flex !important;
  grid-template-columns: none !important;
  flex-wrap: wrap;
  gap: 5px !important;
  align-items: center;
}
.formula-edit-controls button { width: auto !important; min-width: 36px; padding: 0 9px !important; min-height: 34px; }
#mobileBackspace { min-width: 72px !important; font-size: 22px !important; font-weight: 900; }

/* ATEŞLE denklemi doğrular ve atışı başlatır. */
.formula-dock { grid-template-columns: minmax(160px, 1fr) auto minmax(180px, auto) 132px !important; }
.formula-edit-controls { min-width: 0; }
.formula-dock .fire-button {
  display: flex !important;
  width: 132px !important;
  min-width: 132px;
  min-height: 52px;
}
.formula-confirm-button {
  width: auto !important;
  min-width: 104px;
  font-size: 12px !important;
  letter-spacing: .06em;
  background: linear-gradient(135deg, #3b82f6, #20c8ff) !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: 0 8px 22px rgba(36,120,215,.32) !important;
}
.formula-confirm-button.rejected { background: #ff6b8b !important; }

/* ═══ KOLAY MOD + GÜÇLER (v54) ═══ */
.easy-btn {
  width: auto !important; padding: 0 9px !important;
  font: 800 10px/1 Consolas, monospace !important; white-space: nowrap; color: #cfe8ff;
}
.easy-btn.active {
  background: rgba(124,92,255,.28) !important;
  border-color: rgba(124,92,255,.6) !important;
  color: #cabfff !important; box-shadow: 0 0 10px rgba(124,92,255,.4);
}
.power-bar {
  position: absolute; z-index: 15; left: 50%; bottom: 74px; transform: translateX(-50%);
  display: none; gap: 8px; align-items: center;
  padding: 7px 11px; border-radius: 15px;
  background: rgba(10,16,26,.84); border: 1px solid rgba(125,176,212,.28);
  backdrop-filter: blur(10px); box-shadow: 0 12px 30px rgba(20,30,45,.32);
}
body.easy-mode #powerBar { display: flex; }
.power-bar .power-hint { font: 800 8px Consolas, monospace; letter-spacing: .08em; color: #8fb6d8; }
.power-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  width: 56px; height: 54px; border-radius: 13px; cursor: pointer;
  border: 1px solid rgba(125,176,212,.3); background: rgba(255,255,255,.94);
  font-size: 21px; color: #2a3b46; touch-action: none;
}
.power-btn small { font: 800 8px Consolas, monospace; color: #5b6e7a; letter-spacing: .03em; }
.power-btn:hover, .power-btn:active {
  background: #eaf3ff; border-color: rgba(36,120,215,.55); transform: translateY(-2px);
}

/* Kolay modda hardcore fonksiyon arayüzünü gizle (sade kalsın) */
body.easy-mode .function-drawer,
body.easy-mode .edge-side,
body.easy-mode #variablePanelToggle,
body.easy-mode #formulaSymbolsToggle,
body.easy-mode #formulaSymbolsPopover,
body.easy-mode #variablePanel { display: none !important; }

/* ═══ GÖRSEL FONKSİYON + STEP + SONSUZ SİNÜS TEKERİ (v62) ════════════ */
.edge-controls { z-index: 20; }
.formula-dock { z-index: 22; }
.step-builder-button.active {
  color: #fff !important;
  border-color: #7c5cff !important;
  background: linear-gradient(135deg, #7c5cff, #a55eea) !important;
  box-shadow: 0 7px 18px rgba(124,92,255,.3) !important;
}
body.step-pick-mode #gameCanvas,
body.visual-function-pick-mode #gameCanvas { cursor: crosshair !important; }
.function-drawer .drawer-menu button.curve-placement-active {
  color: #fff;
  border-color: #00a78e;
  background: #00a78e;
  box-shadow: 0 0 0 3px rgba(0,167,142,.14);
}
body.visual-function-pick-mode .step-builder-panel {
  border-color: rgba(0,167,142,.38);
  box-shadow: 0 12px 32px rgba(0,167,142,.17);
}
body.visual-function-pick-mode #stepBuilderEyebrow { color: #008d78; }
.sin-tuner-button.active {
  color: #fff !important;
  border-color: #00a78e !important;
  background: linear-gradient(135deg, #00a78e, #25c79f) !important;
  box-shadow: 0 7px 18px rgba(0,167,142,.28) !important;
}

.sin-tuner-panel {
  position: absolute;
  z-index: 24;
  left: 50%;
  bottom: 106px;
  width: 70px;
  height: 130px;
  display: grid;
  grid-template-columns: 1fr 22px;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid rgba(0,167,142,.24);
  border-radius: 15px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 12px 30px rgba(32,70,67,.16);
  backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 8px) scale(.97);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
.sin-tuner-panel.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}
.sin-wheel {
  position: relative;
  height: 118px;
  display: grid;
  place-items: center;
  padding: 3px;
  overflow: hidden;
  border: 1px solid rgba(0,167,142,.18);
  border-radius: 10px;
  background: #eef9f6;
  color: #31554f;
  cursor: ns-resize;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.sin-wheel i {
  width: 34px;
  height: 104px;
  border-radius: 7px;
  background:
    linear-gradient(to bottom, rgba(238,249,246,.98), transparent 30%, transparent 70%, rgba(238,249,246,.98)),
    repeating-linear-gradient(to bottom, #6b9f94 0 2px, transparent 2px 7px);
  background-position: 0 0, 0 var(--wheel-shift, 0px);
  box-shadow: inset 0 0 0 1px rgba(0,167,142,.12);
}
.sin-wheel.dragging {
  color: #fff;
  border-color: #00a78e;
  background: #00a78e;
  box-shadow: 0 0 0 3px rgba(0,167,142,.12);
}
.sin-wheel.dragging i {
  background:
    linear-gradient(to bottom, rgba(0,167,142,.95), transparent 30%, transparent 70%, rgba(0,167,142,.95)),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.9) 0 2px, transparent 2px 7px);
  background-position: 0 0, 0 var(--wheel-shift, 0px);
}
.sin-tuner-close {
  width: 22px;
  height: 36px;
  padding: 0;
  border-radius: 8px;
  color: #7b8b95;
  font-size: 15px;
}
body.sin-tuning #gameCanvas { cursor: ns-resize; }

.step-builder-panel {
  position: absolute;
  z-index: 19;
  top: 101px;
  left: 50%;
  width: min(980px, calc(100% - 150px));
  min-height: 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  padding: 8px 42px 8px 38px;
  border: 1px solid rgba(124,92,255,.24);
  border-radius: 16px;
  background: rgba(255,255,255,.94);
  color: #34434d;
  box-shadow: 0 12px 32px rgba(43,61,74,.16);
  backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -7px) scale(.98);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.step-builder-panel.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}
.step-builder-copy {
  min-width: 170px;
  flex: 1 1 auto;
  overflow: hidden;
}
.step-builder-copy span {
  display: block;
  color: #7c5cff;
  font: 900 8px/1 Consolas, monospace;
  letter-spacing: .12em;
}
.step-builder-copy strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #2f3d47;
  font: 900 12px/1.1 Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.step-builder-copy small {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: #71828d;
  font: 700 8px/1.2 system-ui, sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.step-builder-actions {
  display: flex;
  flex: 1 1 430px;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}
.step-builder-actions > span {
  align-self: center;
  margin-right: 2px;
  color: #7c5cff;
  font: 900 8px/1 Consolas, monospace;
  letter-spacing: .08em;
  white-space: nowrap;
}
.step-scroll-control {
  position: relative;
  width: 66px;
  height: 31px;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 3px;
  padding: 2px 4px;
  overflow: hidden;
  border: 1px solid rgba(124,92,255,.22);
  border-radius: 10px;
  background: #f7f5ff;
  color: #6551c4;
  cursor: ns-resize;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.step-scroll-control[hidden],
.step-builder-actions[hidden],
.step-after-editor[hidden],
.step-builder-undo[hidden] { display: none !important; }
.step-scroll-control b { font: 900 9px/1 Consolas, monospace; white-space: nowrap; }
.step-scroll-control i {
  width: 16px;
  height: 25px;
  border-radius: 5px;
  background:
    linear-gradient(to bottom, rgba(247,245,255,.98), transparent 30%, transparent 70%, rgba(247,245,255,.98)),
    repeating-linear-gradient(to bottom, #8e7ae6 0 2px, transparent 2px 7px);
  background-position: 0 0, 0 var(--wheel-shift, 0px);
}
.step-scroll-control.active,
.step-scroll-control.dragging {
  color: #fff;
  border-color: #7c5cff;
  background: #7c5cff;
  box-shadow: 0 0 0 3px rgba(124,92,255,.13);
}
.alias-scroll-control {
  min-width: 64px !important;
  color: #9a5b00 !important;
  border-color: rgba(210,132,0,.28) !important;
  background: rgba(255,247,225,.94) !important;
}
.alias-scroll-control.dragging {
  color: #fff !important;
  border-color: #d78700 !important;
  background: linear-gradient(135deg, #e59a16, #f0b43e) !important;
}
.step-scroll-control.active i,
.step-scroll-control.dragging i {
  background:
    linear-gradient(to bottom, rgba(124,92,255,.98), transparent 30%, transparent 70%, rgba(124,92,255,.98)),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.92) 0 2px, transparent 2px 7px);
  background-position: 0 0, 0 var(--wheel-shift, 0px);
}
.step-builder-actions button,
.step-builder-undo,
.step-builder-close {
  height: 31px;
  border: 1px solid rgba(89,107,120,.16);
  border-radius: 9px;
  background: #f5f7f9;
  color: #4a5d69;
  font: 900 9px/1 Consolas, monospace;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.step-builder-actions button { min-width: 45px; padding: 0 8px; }
.step-builder-actions button:hover,
.step-builder-actions button:active { color: #fff; border-color: #7c5cff; background: #7c5cff; }
.step-builder-actions .step-scroll-control {
  min-width: 0;
  width: 66px;
  height: 31px;
  padding: 2px 4px;
  border-color: rgba(124,92,255,.22);
  border-radius: 10px;
  background: #f7f5ff;
  color: #6551c4;
  touch-action: none;
}
.step-builder-actions .step-scroll-control:hover,
.step-builder-actions .step-scroll-control:active { color: #fff; border-color: #7c5cff; background: #7c5cff; }
.step-builder-undo { flex: 0 0 32px; width: 32px; color: #d07b00; font-size: 15px; }
.step-builder-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  color: #7b8b95;
  font-size: 16px;
}
.mobile-formula-char.step-replace {
  border-radius: 4px;
  background: rgba(124,92,255,.18);
  color: #653ed0;
  box-shadow: inset 0 -2px 0 #7c5cff;
}
.mobile-formula-char.step-after-code {
  background: rgba(36,120,215,.08);
  box-shadow: inset 0 -2px 0 rgba(36,120,215,.5);
}
.mobile-formula-char.step-gate-code {
  border-radius: 3px;
  background: rgba(124,92,255,.16);
  color: #653ed0;
  box-shadow: inset 0 -2px 0 rgba(124,92,255,.62);
}
.step-after-editor {
  flex: 1 1 240px;
  min-width: 190px;
  overflow: hidden;
  padding: 5px 8px;
  border: 1px solid rgba(36,120,215,.18);
  border-radius: 10px;
  background: rgba(238,246,255,.9);
}
.step-after-editor span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #2478d7;
  font: 900 7px/1 Consolas, monospace;
  letter-spacing: .1em;
}
.step-after-editor b { color: #71828d; letter-spacing: 0; }
.step-after-code-button {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 0;
  overflow-x: auto;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #2f3d47;
  font: 800 11px/1.25 Consolas, monospace;
  text-align: left;
  white-space: nowrap;
  scrollbar-width: none;
  cursor: text;
}
.step-after-code-button:hover,
.step-after-code-button:focus-visible {
  outline: 0;
  background: rgba(36,120,215,.1);
  box-shadow: 0 0 0 2px rgba(36,120,215,.16);
}
.step-after-code-button::-webkit-scrollbar { display: none; }

@media (orientation: landscape) and (max-height: 520px) {
  .formula-dock {
    grid-template-columns: minmax(135px, 1fr) auto minmax(170px, auto) 112px !important;
  }
  .formula-dock .fire-button {
    width: 112px !important;
    min-width: 112px;
    min-height: 48px;
  }
  .step-builder-panel {
    top: 91px;
    width: min(920px, calc(100% - 108px));
    min-height: 40px;
    gap: 6px;
    padding: 6px 38px 6px 9px;
    border-radius: 13px;
  }
  .step-builder-copy { min-width: 138px; }
  .step-builder-copy strong { margin-top: 2px; font-size: 10px; }
  .step-builder-copy small { margin-top: 2px; font-size: 7px; }
  .step-builder-actions { gap: 3px; }
  .step-builder-actions button { min-width: 39px; height: 28px; padding: 0 5px; font-size: 8px; }
  .step-builder-undo { width: 29px; height: 28px; }
  .step-builder-close { top: 6px; right: 6px; width: 26px; height: 26px; }
  .step-after-editor { min-width: 160px; padding: 4px 6px; }
  .step-after-code-button { margin-top: 2px; font-size: 9px; }
  .sin-tuner-panel { bottom: 63px; width: 58px; height: 102px; grid-template-columns: 1fr 18px; }
  .sin-wheel { height: 91px; }
  .sin-wheel i { height: 78px; width: 25px; }
  .info-modal { width: min(900px, 97vw); max-height: 96vh; padding: 18px 22px; }
  .info-modal h2 { font-size: 22px; }
  .info-lead { margin: 7px 0 10px; font-size: 10px; }
  .info-card { min-height: 62px; padding: 7px; }
  .step-flow > div { min-height: 62px; padding: 7px; }
  .info-section { margin-top: 8px; padding: 9px; }
  .info-feature-grid, .info-button-list { margin-top: 7px; }
  .info-footer { margin: 8px 0; }
}

/* Formül köken haritası: renkli metin hem PC'de hem telefonda aynı renderer'dan gelir. */
.equation-box {
  position: relative;
}
.equation-box #equationInput {
  position: absolute !important;
  z-index: -1;
  left: 38px;
  width: 1px;
  height: 1px;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}
.equation-box .mobile-equation-display {
  min-width: 0;
  height: 100%;
  flex: 1;
  display: block;
  padding: 0 7px;
  overflow-x: auto;
  overflow-y: hidden;
  color: #1f2a32;
  font: 14px/52px Consolas, monospace;
  white-space: pre;
  scrollbar-width: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.equation-box .mobile-equation-display::-webkit-scrollbar { display: none; }
.equation-box .mobile-formula-char {
  display: inline-block;
  min-width: .6em;
  text-align: center;
}
.mobile-formula-char.formula-origin-manual { color: #172127; }
.mobile-formula-char.formula-origin-auto {
  color: #42ad72;
  font-weight: 800;
}
.mobile-formula-char.formula-origin-step {
  color: #123f85;
  font-weight: 900;
}
.mobile-formula-char.formula-origin-preset {
  color: #8655c9;
  font-weight: 800;
}
.mobile-formula-char.step-after-code {
  background: rgba(18,63,133,.045);
  box-shadow: inset 0 -2px 0 rgba(18,63,133,.24);
}
.mobile-formula-char.step-gate-code {
  background: rgba(18,63,133,.1);
  color: #123f85;
  box-shadow: inset 0 -2px 0 rgba(18,63,133,.48);
}
.mobile-formula-char.function-effect {
  border-radius: 2px;
  background: hsl(var(--function-hue) 78% var(--function-tone) / .12);
  box-shadow: inset 0 -2px 0 hsl(var(--function-hue) 72% var(--function-tone) / .7);
}
.mobile-formula-char.function-effect.step-after-code {
  background:
    linear-gradient(hsl(var(--function-hue) 78% var(--function-tone) / .12), hsl(var(--function-hue) 78% var(--function-tone) / .12)),
    rgba(18,63,133,.045);
}
.mobile-formula-char.function-effect.step-gate-code {
  background:
    linear-gradient(hsl(var(--function-hue) 78% var(--function-tone) / .16), hsl(var(--function-hue) 78% var(--function-tone) / .16)),
    rgba(18,63,133,.1);
  box-shadow: inset 0 -2px 0 hsl(var(--function-hue) 72% var(--function-tone) / .8);
}
.formula-origin-key {
  position: absolute;
  z-index: 3;
  left: 8px;
  bottom: calc(100% + 3px);
  display: flex;
  gap: 7px;
  padding: 3px 6px;
  border: 1px solid rgba(64,84,96,.1);
  border-radius: 7px;
  background: rgba(255,255,255,.86);
  box-shadow: 0 3px 10px rgba(43,61,74,.08);
  backdrop-filter: blur(6px);
  pointer-events: none;
}
.formula-origin-key span {
  font: 900 7px/1 Consolas, monospace;
  letter-spacing: .05em;
}
.formula-origin-key .origin-auto { color: #42ad72; }
.formula-origin-key .origin-manual { color: #172127; }
.formula-origin-key .origin-step { color: #123f85; }
.formula-origin-key .origin-preset { color: #8655c9; }

/* ═══ KOMPAKT, TAŞINABİLİR DENKLEM TEZGAHI (v74) ═══════════════════════ */
#formulaDock {
  position: absolute;
  z-index: 30;
  left: 50%;
  bottom: 8px;
  width: min(620px, calc(100% - 82px));
  min-height: 0;
  padding: 5px;
  display: grid;
  grid-template-columns: 18px minmax(170px, 1fr) auto 102px !important;
  grid-template-rows: 23px 42px;
  grid-template-areas:
    "drag stages coefficients collapse"
    "drag equation edits fire";
  gap: 4px;
  align-items: stretch;
  border: 1px solid rgba(73,92,108,.16);
  border-radius: 13px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 10px 28px rgba(43,61,74,.16);
  backdrop-filter: blur(12px);
  transform: translateX(-50%);
  pointer-events: auto;
  transition: box-shadow .15s ease;
}
#formulaDock.dragging { box-shadow: 0 16px 38px rgba(43,61,74,.25); }
.formula-dock-collapse {
  grid-area: collapse;
  justify-self: end;
  align-self: center;
  width: 22px;
  min-width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: rgba(75,96,110,.08);
  color: #647783;
  font: 900 14px/1 system-ui, sans-serif;
}
#formulaDock.collapsed {
  width: 62px;
  grid-template-columns: 24px 26px !important;
  grid-template-rows: 34px;
  grid-template-areas: "drag collapse";
  padding: 4px;
}
#formulaDock.collapsed > :not(.formula-dock-drag):not(.formula-dock-collapse) { display: none !important; }
#formulaDock.collapsed .formula-dock-drag { width: 24px; min-width: 24px; }

/* Tüm oyun içi araçlar aynı serbest pencere dilini kullanır. */
[data-floating-panel].floating-positioned {
  position: fixed !important;
  right: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  transform: none !important;
  z-index: 70;
}
[data-floating-panel].floating-dragging {
  transition: none !important;
  box-shadow: 0 18px 44px rgba(34,52,66,.24) !important;
  cursor: grabbing;
}
[data-floating-handle] { touch-action: none; user-select: none; -webkit-user-select: none; }
.floating-corner-handle {
  position: absolute;
  z-index: 3;
  top: 5px;
  left: 5px;
  width: 24px;
  min-width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: rgba(124,92,255,.1);
  color: #7054d5;
  cursor: grab;
}
.floating-panel-bar {
  position: sticky;
  left: 0;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 3px;
  border-right: 1px solid rgba(69,88,102,.12);
  color: #71828d;
  font: 900 7px/1 system-ui, sans-serif;
  letter-spacing: .08em;
}
.floating-panel-bar button {
  flex: 0 0 24px !important;
  width: 24px !important;
  height: 24px !important;
  border-radius: 7px !important;
}
.formula-dock-drag {
  grid-area: drag;
  width: 18px;
  min-width: 18px;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: rgba(75,96,110,.08);
  color: #778995;
  font: 900 14px/1 sans-serif;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.formula-dock-drag:active { cursor: grabbing; background: rgba(59,130,246,.14); color: #2478d7; }
#formulaDock .formula-stage-tabs {
  grid-area: stages;
  position: static;
  inset: auto;
  max-width: none;
  width: 100%;
  height: 23px;
  min-width: 0;
  gap: 3px;
  pointer-events: auto;
}
#formulaDock .formula-stage-tab {
  height: 22px;
  min-width: 34px;
  padding: 0 6px;
  border-radius: 7px;
  box-shadow: none;
  font-size: 7px;
}
.coefficient-scrolls {
  grid-area: coefficients;
  min-width: 0;
  height: 23px;
  display: flex;
  justify-content: flex-end;
  gap: 3px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.coefficient-scrolls::-webkit-scrollbar { display: none; }
.coefficient-scrolls[hidden] { display: none; }
.coefficient-scroll {
  flex: 0 0 auto;
  height: 22px;
  min-width: 40px;
  padding: 0 6px;
  overflow: hidden;
  border: 1px solid rgba(0,167,142,.18);
  border-radius: 7px;
  background:
    repeating-linear-gradient(to bottom, transparent 0 5px, rgba(0,167,142,.055) 5px 6px),
    rgba(238,251,247,.92);
  background-position: 0 var(--wheel-shift, 0px), 0 0;
  color: #217c69;
  font: 900 8px/1 Consolas, monospace;
  white-space: nowrap;
  cursor: ns-resize;
  touch-action: none;
  user-select: none;
}
.coefficient-scroll.dragging { color: #fff; border-color: #00a78e; background-color: #00a78e; }
#formulaDock .equation-box {
  grid-area: equation;
  width: auto;
  min-width: 0;
  height: 42px;
  margin: 0;
  border-radius: 9px;
  box-shadow: none;
  background: rgba(248,250,251,.92);
}
#formulaDock .equation-box .mobile-equation-display {
  height: 42px;
  padding: 0 5px;
  font-size: 12px;
  line-height: 42px;
}
#formulaDock .equation-prefix { padding-left: 8px; font-size: 13px; }
#formulaDock .equation-status { width: 22px; font-size: 12px; }
#formulaDock .formula-edit-controls {
  grid-area: edits;
  min-width: 0;
  display: flex !important;
  flex-wrap: nowrap;
  gap: 3px !important;
  align-items: stretch;
  overflow-x: auto;
  scrollbar-width: none;
}
#formulaDock .formula-edit-controls::-webkit-scrollbar { display: none; }
#formulaDock .formula-edit-controls button,
#formulaDock #mobileBackspace {
  flex: 0 0 28px;
  width: 28px !important;
  min-width: 28px !important;
  min-height: 42px;
  height: 42px;
  padding: 0 !important;
  border-radius: 8px;
  font-size: 11px !important;
}
#formulaDock #mobileBackspace { font-size: 17px !important; }
#formulaDock .fire-button {
  grid-area: fire;
  width: 102px !important;
  min-width: 102px;
  min-height: 42px;
  height: 42px;
  border-radius: 9px;
}
#formulaDock .fire-button strong { font-size: 12px; }
#formulaDock .fire-button small { display: none; }
#formulaDock .formula-symbols-popover {
  left: 50%;
  bottom: calc(100% + 5px);
  width: min(560px, calc(100vw - 90px));
}
@media (orientation: landscape) and (max-height: 520px) {
  #formulaDock {
    bottom: 5px;
    width: min(590px, calc(100% - 68px));
    grid-template-columns: 18px minmax(135px, 1fr) minmax(132px, auto) 88px !important;
    grid-template-rows: 21px 38px;
    padding: 4px;
  }
  #formulaDock .formula-stage-tabs,
  #formulaDock .coefficient-scrolls { height: 21px; }
  #formulaDock .formula-stage-tab,
  #formulaDock .coefficient-scroll { height: 20px; }
  #formulaDock .equation-box,
  #formulaDock .equation-box .mobile-equation-display,
  #formulaDock .formula-edit-controls button,
  #formulaDock #mobileBackspace,
  #formulaDock .fire-button { height: 38px; min-height: 38px; }
  #formulaDock .equation-box .mobile-equation-display { line-height: 38px; }
  #formulaDock .fire-button { width: 88px !important; min-width: 88px; }
}
