:root {
  color-scheme: light;
  --ink: #18213b;
  --muted: #7e879d;
  --line: #e8ebf3;
  --paper: #f6f8fc;
  --card: #ffffff;
  --navy: #11182c;
  --navy-soft: #1c2540;
  --violet: #7459f2;
  --violet-deep: #5e45dc;
  --violet-pale: #f0edff;
  --mint: #a8f1d0;
  --mint-deep: #23885c;
  --coral: #fa806f;
  --sky: #55aaf4;
  --shadow: 0 10px 34px rgba(25, 34, 62, .055);
  font-family: "Montserrat", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0;}
body { background: var(--paper); color: var(--ink); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid rgba(116, 89, 242, .35); outline-offset: 3px; }
.is-hidden { display: none !important; }

.language-screen {
  --screen-ink: #f8f9ff;
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; overflow: hidden;
  padding: 30px 18px 64px;
  color: var(--screen-ink);
  background:
    radial-gradient(ellipse at 13% 20%, rgba(107, 83, 235, .23), transparent 34%),
    radial-gradient(ellipse at 91% 85%, rgba(63, 213, 162, .12), transparent 34%),
    #11182d;
}
.language-screen::before { content: ''; position: absolute; inset: 0; opacity: .25; pointer-events: none; background-image: radial-gradient(rgba(255,255,255,.18) 1px, transparent 1px); background-size: 26px 26px; mask-image: linear-gradient(90deg, black, transparent 85%); }
.language-orbit { position: absolute; border: 1px solid rgba(168, 241, 208, .15); border-radius: 50%; pointer-events: none; }
.orbit-one { width: 560px; height: 560px; right: -180px; top: -205px; }
.orbit-two { width: 400px; height: 400px; left: -205px; bottom: -200px; border-color: rgba(139, 120, 255, .23); }
.language-card { z-index: 1; width: min(100%, 500px); padding: 43px 42px 34px; border: 1px solid rgba(255,255,255,.1); border-radius: 28px; background: rgba(23, 31, 55, .82); box-shadow: 0 28px 100px rgba(0,0,0,.25); backdrop-filter: blur(16px); }
.brand-mark { display: flex; align-items: center; justify-content: center; gap: 3px; width: 39px; height: 39px; flex: 0 0 auto; border-radius: 13px; background: linear-gradient(145deg, #b3f8d6, #5be1ac); box-shadow: 0 5px 14px rgba(75, 223, 165, .15); }
.brand-mark span { width: 4px; border-radius: 9px; background: #14223a; transform: rotate(28deg); }
.brand-mark span:nth-child(1) { height: 10px; }
.brand-mark span:nth-child(2) { height: 19px; }
.brand-mark span:nth-child(3) { height: 13px; }
.brand-mark-large { width: 53px; height: 53px; border-radius: 17px; margin-bottom: 27px; }
.brand-mark-large span { width: 5px; }
.brand-mark-large span:nth-child(1) { height: 14px; }
.brand-mark-large span:nth-child(2) { height: 25px; }
.brand-mark-large span:nth-child(3) { height: 17px; }
.eyebrow { margin: 0 0 8px; color: var(--violet); font-size: 10px; font-weight: 700; letter-spacing: .16em; }
.language-card .eyebrow { color: #a9f2d2; }
.language-card h1 { margin: 0; font-size: clamp(29px, 5vw, 38px); letter-spacing: -.045em; line-height: 1.12; }
.language-description { margin: 13px 0 29px; color: #aeb7ce; font-size: 14px; line-height: 1.55; }
.language-options { display: grid; gap: 11px; }
.language-option { display: flex; align-items: center; width: 100%; min-height: 76px; padding: 14px 16px; gap: 13px; text-align: left; border: 1px solid rgba(255,255,255,.11); border-radius: 17px; color: #f8f9ff; background: rgba(255,255,255,.045); transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.language-option:hover { transform: translateY(-2px); border-color: rgba(168,241,208,.55); background: rgba(168,241,208,.085); }
.language-option:active { transform: translateY(0); }
.language-flag { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 13px; color: #b2f4d7; background: rgba(168,241,208,.12); font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.flag-tr { color: #c1b4ff; background: rgba(149,128,255,.14); }
.language-option-copy { display: grid; gap: 4px; flex: 1; }
.language-option-copy strong { font-size: 15px; font-weight: 700; }
.language-option-copy small { color: #aeb7ce; font-size: 12px; }
.language-option-arrow { font-size: 22px; color: #a4efcf; }
.language-footnote { margin: 23px 0 0; color: #8490ad; font-size: 11px; line-height: 1.5; text-align: center; }
.language-bottom { position: absolute; z-index: 1; bottom: 22px; left: 15px; right: 15px; color: #75819e; font-size: 11px; text-align: center; letter-spacing: .02em; }

.app-shell { min-height: 100vh; }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 76px; padding: 0 clamp(18px, 3vw, 45px); gap: 20px; color: #f8f9ff; background: var(--navy); border-bottom: 1px solid rgba(255,255,255,.05); }
.brand-lockup { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-title { font-size: 17px; font-weight: 700; letter-spacing: -.035em; }
.brand-subtitle { margin-top: 3px; color: #8f9ab7; font-size: 11px; }
.topbar-actions { display: flex; align-items: center; gap: 13px; }
.live-pill { display: flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid rgba(255,255,255,.08); border-radius: 999px; color: #9ea8c3; font-size: 9px; font-weight: 700; letter-spacing: .1em; white-space: nowrap; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px rgba(168,241,208,.1); }
.language-switch { display: flex; gap: 3px; padding: 3px; border-radius: 10px; background: rgba(255,255,255,.075); }
.language-switch-button { min-width: 34px; min-height: 29px; border: 0; border-radius: 7px; color: #929db8; background: transparent; font-size: 10px; font-weight: 700; }
.language-switch-button.is-active { color: #102038; background: var(--mint); }
.icon-button { display: grid; place-items: center; width: 35px; height: 35px; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; color: #c4cce0; background: transparent; }
.icon-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-button:hover { color: var(--mint); border-color: rgba(168,241,208,.35); }
.text-button { padding: 8px 10px; border: 0; color: #abb5cc; background: none; font-size: 11px; font-weight: 600; white-space: nowrap; }
.text-button:hover { color: white; }

.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 316px; align-items: start; gap: 22px; max-width: 1800px; margin: 0 auto; padding: 28px clamp(18px, 3vw, 45px) 35px; }
.simulation-column { min-width: 0; }
.simulation-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin: 0 0 18px; }
.simulation-heading h1 { margin: 0; color: var(--ink); font-size: clamp(24px, 2.4vw, 31px); font-weight: 700; letter-spacing: -.045em; line-height: 1.17; }
.simulation-subtitle { max-width: 630px; margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 39px; padding: 0 13px; border: 1px solid #e5e8f1; border-radius: 10px; color: #58627c; background: #fff; box-shadow: 0 2px 7px rgba(20,30,60,.02); font-size: 11px; font-weight: 700; white-space: nowrap; }
.secondary-button:hover { border-color: #c6bfff; color: var(--violet-deep); }
.secondary-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.simulation-card { overflow: hidden; border: 1px solid #e6e9f2; border-radius: 17px; background: var(--card); box-shadow: var(--shadow); }
.tool-toolbar { display: flex; align-items: center; justify-content: space-between; min-height: 63px; padding: 10px 15px; gap: 14px; border-bottom: 1px solid #edf0f6; }
.tool-group { display: flex; align-items: center; gap: 5px; }
.tool-button { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 0 12px; border: 1px solid transparent; border-radius: 9px; color: #7d869e; background: transparent; font-size: 11px; font-weight: 700; white-space: nowrap; }
.tool-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tool-button:hover { background: #f7f6ff; color: var(--violet); }
.tool-button.is-active { color: #5e49d1; border-color: #e5e0ff; background: var(--violet-pale); }
.toolbar-divider { align-self: stretch; width: 1px; margin: 3px 0; background: #edf0f6; }
.add-object-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 37px; padding: 0 12px; border: 1px solid #dbf4e7; border-radius: 9px; color: #27835c; background: #f0fbf5; font-size: 11px; font-weight: 700; white-space: nowrap; }
.add-object-button:hover { border-color: #a4e8c4; background: #e4f9ee; }
.add-object-button > span:first-child { font-size: 17px; line-height: 1; }
.stage-frame { position: relative; height: clamp(380px, 53vh, 650px); min-height: 380px; overflow: hidden; background: #fbfcff; isolation: isolate; }
#sim-canvas { display: block; width: 100%; height: 100%; touch-action: none; outline: none; cursor: default; }
#sim-canvas.cursor-pan { cursor: grab; }
#sim-canvas.cursor-panning { cursor: grabbing; }
#sim-canvas.cursor-force { cursor: crosshair; }
.stage-top-left, .stage-top-right { position: absolute; z-index: 2; top: 16px; display: flex; align-items: flex-start; gap: 8px; pointer-events: none; }
.stage-top-left { left: 16px; flex-wrap: wrap; }
.stage-top-right { right: 15px; align-items: flex-start; }
.stage-chip, .selected-object-chip { display: flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 9px; border: 1px solid rgba(226,230,241,.85); border-radius: 8px; background: rgba(255,255,255,.88); backdrop-filter: blur(8px); box-shadow: 0 3px 12px rgba(22,34,65,.04); font-size: 9px; font-weight: 700; letter-spacing: .045em; white-space: nowrap; }
.stage-chip { color: #5e667e; }
.stage-chip-icon { color: var(--violet); font-size: 12px; }
.selected-object-chip { color: #58637c; font-size: 10px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.selection-dot { width: 6px; height: 6px; border-radius: 50%; background: #7459f2; }
.compass-widget { position: relative; width: 46px; height: 46px; border: 1px solid #e2e7f1; border-radius: 50%; background: rgba(255,255,255,.9); box-shadow: 0 3px 12px rgba(22,34,65,.04); color: #939bb0; font-size: 8px; font-weight: 700; }
.compass-widget span { position: absolute; transform: translate(-50%, -50%); }
.compass-north { top: 9px; left: 50%; color: #ee706f; }
.compass-east { top: 50%; right: 4px; }
.compass-south { bottom: 2px; left: 50%; }
.compass-west { top: 50%; left: 7px; }
.compass-center { width: 5px; height: 5px; top: 50%; left: 50%; border-radius: 50%; background: #8e9bb4; }
.zoom-widget { display: flex; align-items: center; min-height: 34px; padding: 3px; gap: 2px; border: 1px solid #e5e9f2; border-radius: 9px; background: rgba(255,255,255,.92); box-shadow: 0 3px 12px rgba(22,34,65,.04); pointer-events: auto; }
.zoom-widget button { display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 6px; color: #69748d; background: transparent; font-size: 18px; line-height: 1; }
.zoom-widget button:hover { color: var(--violet-deep); background: #f1efff; }
.zoom-widget span { min-width: 37px; color: #69748d; font-size: 9px; font-weight: 700; text-align: center; }
.zoom-widget .zoom-reset { margin-left: 2px; border-left: 1px solid #edf0f6; border-radius: 0 6px 6px 0; }
.zoom-reset svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.stage-tip { position: absolute; z-index: 2; left: 50%; bottom: 17px; display: flex; align-items: center; justify-content: center; gap: 8px; max-width: calc(100% - 30px); padding: 9px 13px; border: 1px solid rgba(226,230,241,.88); border-radius: 10px; color: #69748e; background: rgba(255,255,255,.91); box-shadow: 0 3px 12px rgba(22,34,65,.045); font-size: 10px; line-height: 1.4; text-align: center; transform: translateX(-50%); pointer-events: none; backdrop-filter: blur(8px); }
.stage-tip-icon { color: var(--violet); font-size: 14px; }
.stage-bottom-left { position: absolute; z-index: 2; bottom: 15px; left: 15px; display: flex; gap: 6px; pointer-events: none; }
.coordinate-pill, .grid-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 27px; padding: 0 9px; border: 1px solid rgba(226,230,241,.85); border-radius: 8px; color: #848da3; background: rgba(255,255,255,.87); font-size: 9px; font-weight: 600; white-space: nowrap; }
.grid-pill-dot { width: 5px; height: 5px; border-radius: 50%; background: #78cba2; }
.simulation-statusbar { display: flex; align-items: center; min-height: 57px; padding: 9px 16px; gap: 15px; border-top: 1px solid #edf0f6; }
.simulation-status { display: flex; align-items: center; gap: 7px; color: #6e7890; font-size: 10px; font-weight: 700; white-space: nowrap; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #4ac590; box-shadow: 0 0 0 3px rgba(74,197,144,.11); }
.status-dot.is-paused { background: #e8aa46; box-shadow: 0 0 0 3px rgba(232,170,70,.13); }
.statusbar-hint { display: flex; align-items: center; gap: 6px; color: #9aa2b5; font-size: 9px; white-space: nowrap; }
kbd { padding: 3px 5px; border: 1px solid #e5e8f0; border-bottom-width: 2px; border-radius: 4px; color: #78829a; background: #fafbfe; font-size: 9px; font-weight: 700; }
.status-separator { color: #c4cad8; }
.pause-button { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 94px; min-height: 35px; margin-left: auto; padding: 0 11px; border: 1px solid #e3e6f0; border-radius: 9px; color: #505c76; background: #fff; font-size: 10px; font-weight: 700; white-space: nowrap; }
.pause-button:hover { border-color: #c7bfff; color: var(--violet-deep); }
.pause-button svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.lesson-strip { display: flex; align-items: center; min-height: 83px; margin-top: 15px; padding: 16px 19px; gap: 13px; border: 1px solid #e9e5ff; border-radius: 14px; background: linear-gradient(110deg, #f3f0ff, #faf9ff 75%); }
.lesson-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 auto; border-radius: 12px; color: #7459f2; background: #e9e3ff; }
.lesson-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.lesson-copy { min-width: 0; flex: 1; }
.lesson-copy strong { display: block; color: #51438e; font-size: 12px; }
.lesson-copy p { margin: 5px 0 0; color: #817ba2; font-size: 10px; line-height: 1.5; }
.lesson-tag { padding: 6px 8px; border: 1px solid #e5dfff; border-radius: 6px; color: #9789e5; font-size: 8px; font-weight: 700; letter-spacing: .08em; white-space: nowrap; }

.control-sidebar { display: grid; gap: 14px; min-width: 0; }
.control-card { min-width: 0; padding: 19px 17px 16px; border: 1px solid #e6e9f2; border-radius: 15px; background: #fff; box-shadow: var(--shadow); }
.card-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.card-heading-icon { display: grid; place-items: center; width: 37px; height: 37px; flex: 0 0 auto; border-radius: 11px; }
.card-heading-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.force-heading-icon { color: #7057e7; background: #f0edff; }
.results-heading-icon { color: #239b69; background: #e8f9f0; }
.card-heading h2 { margin: 0; color: #202944; font-size: 14px; font-weight: 700; letter-spacing: -.025em; }
.card-heading p { margin: 4px 0 0; color: #9aa2b5; font-size: 10px; }
.control-field { margin-top: 20px; }
.field-label-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 8px; }
.field-label-row label, .field-label { color: #48536e; font-size: 11px; font-weight: 700; }
.field-step { color: #a0a8ba; font-size: 8px; font-weight: 700; letter-spacing: .1em; }
.select-wrap { position: relative; }
.select-wrap select { width: 100%; min-height: 41px; padding: 0 36px 0 12px; appearance: none; border: 1px solid #e5e8f1; border-radius: 9px; color: #4a5570; background: #fafbfe; font-size: 11px; font-weight: 600; cursor: pointer; }
.select-wrap select:hover { border-color: #d4ccff; }
.select-wrap svg { position: absolute; top: 50%; right: 11px; width: 15px; height: 15px; transform: translateY(-50%); pointer-events: none; fill: none; stroke: #8c95aa; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.direction-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.direction-button { display: flex; align-items: center; gap: 9px; min-height: 43px; padding: 0 11px; border: 1px solid #e7eaf3; border-radius: 9px; color: #737e97; background: #fff; font-size: 11px; font-weight: 600; transition: border-color .15s ease, background .15s ease, color .15s ease; }
.direction-button:hover { border-color: #cfc6ff; background: #faf9ff; color: #6c54e4; }
.direction-button.is-active { border-color: #c9bfff; color: #674fdf; background: #f1eeff; box-shadow: inset 0 0 0 1px rgba(116,89,242,.025); }
.direction-arrow { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; color: #6e59dc; background: #e7e2ff; font-size: 18px; line-height: 1; }
.direction-button.is-active .direction-arrow { color: #fff; background: #795ff0; }
.strength-field { margin-top: 22px; }
.strength-value-row { display: flex; align-items: baseline; gap: 4px; margin-bottom: 8px; }
.strength-value-row strong { color: #242d47; font-size: 30px; letter-spacing: -.04em; line-height: 1; }
.strength-value-row .unit { color: #6e7891; font-size: 12px; font-weight: 700; }
.strength-caption { margin-left: auto; color: #a4abbb; font-size: 10px; }
#power-slider { display: block; width: 100%; height: 6px; margin: 14px 0 10px; border-radius: 99px; appearance: none; background: linear-gradient(90deg, #8b75f5 21%, #ece9fb 21%); accent-color: var(--violet); cursor: pointer; }
#power-slider::-webkit-slider-thumb { width: 18px; height: 18px; appearance: none; border: 3px solid #fff; border-radius: 50%; background: #775df0; box-shadow: 0 1px 5px rgba(61,43,150,.25); }
#power-slider::-moz-range-thumb { width: 13px; height: 13px; border: 3px solid #fff; border-radius: 50%; background: #775df0; box-shadow: 0 1px 5px rgba(61,43,150,.25); }
.range-labels { display: flex; justify-content: space-between; color: #a3aabc; font-size: 9px; }
.primary-button { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 43px; margin-top: 23px; padding: 0 13px; border: 1px solid #7055eb; border-radius: 10px; color: #fff; background: linear-gradient(105deg, #7b60ef, #684de2); box-shadow: 0 5px 12px rgba(102,77,226,.18); font-size: 11px; font-weight: 700; transition: transform .15s ease, box-shadow .15s ease; }
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 7px 17px rgba(102,77,226,.24); }
.primary-button:active { transform: translateY(0); }
.primary-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.button-hotkey { display: grid; place-items: center; width: 23px; height: 23px; margin-left: auto; border: 1px solid rgba(255,255,255,.2); border-radius: 6px; color: #e4dfff; background: rgba(255,255,255,.12); font-size: 13px; }
.clear-forces-button { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; min-height: 36px; margin-top: 7px; border: 1px solid #e7eaf2; border-radius: 9px; color: #737d94; background: #fff; font-size: 10px; font-weight: 700; }
.clear-forces-button:hover { border-color: #ffc8c4; color: #d35f59; background: #fff9f8; }
.clear-forces-button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.control-note { display: flex; gap: 6px; margin: 12px 1px 0; color: #969fb3; font-size: 9px; line-height: 1.55; }
.control-note > span:first-child { flex: 0 0 auto; color: #8c7deb; font-size: 11px; }
.results-card { padding-bottom: 14px; }
.results-heading { margin-bottom: 15px; }
.live-mini { display: flex; align-items: center; gap: 5px; margin-left: auto; color: #4ba57c; font-size: 8px; font-weight: 700; letter-spacing: .08em; }
.live-mini > span:first-child { width: 5px; height: 5px; border-radius: 50%; background: #5fce9a; }
.metrics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.metric-box { min-width: 0; padding: 12px 10px 10px; border: 1px solid #e9ecf4; border-radius: 10px; background: #fcfcff; }
.metric-label { display: block; margin-bottom: 9px; color: #929bb0; font-size: 9px; font-weight: 600; }
.metric-value { display: flex; align-items: baseline; gap: 4px; color: #6d55e8; white-space: nowrap; }
.metric-value strong { font-size: 25px; letter-spacing: -.045em; line-height: 1; }
.metric-value span { color: #9a91d9; font-size: 10px; font-weight: 700; }
.metric-box:nth-child(2) .metric-value { color: #218e61; }
.metric-box:nth-child(2) .metric-value span { color: #76b999; font-size: 8px; }
.metric-subvalue { overflow: hidden; margin-top: 7px; color: #a3aabc; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.force-list-heading { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 9px; color: #606b84; font-size: 10px; font-weight: 700; }
.force-count { display: grid; place-items: center; min-width: 22px; height: 21px; padding: 0 5px; border-radius: 7px; color: #6a54dd; background: #f0edff; font-size: 9px; }
.force-list { display: grid; gap: 6px; max-height: 208px; overflow: auto; }
.force-row { display: flex; align-items: center; gap: 8px; min-height: 39px; padding: 6px 7px; border: 1px solid #eceef5; border-radius: 8px; background: #fff; }
.force-arrow-icon { display: grid; place-items: center; width: 25px; height: 25px; flex: 0 0 auto; border-radius: 7px; color: #6e56de; background: #f0edff; font-size: 16px; }
.force-row-text { flex: 1; min-width: 0; }
.force-row-text strong { display: block; color: #5a6580; font-size: 10px; }
.force-row-text small { display: block; overflow: hidden; margin-top: 2px; color: #a1a9bb; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.force-remove-button { display: grid; place-items: center; width: 24px; height: 24px; flex: 0 0 auto; border: 0; border-radius: 6px; color: #a5adbf; background: transparent; font-size: 16px; }
.force-remove-button:hover { color: #d76660; background: #fff0ee; }
.empty-forces { padding: 13px 10px; border: 1px dashed #e5e8f1; border-radius: 8px; color: #a2aabc; font-size: 10px; text-align: center; }
.science-tip-card { overflow: hidden; padding: 15px 16px 0; border: 1px solid #d9f3e6; border-radius: 14px; background: #f1fcf6; }
.science-tip-header { display: flex; align-items: center; gap: 7px; color: #287c59; font-size: 11px; }
.science-tip-spark { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 7px; color: #23885c; background: #d9f8e8; font-size: 12px; }
.science-tip-card p { margin: 10px 0 13px; color: #739b88; font-size: 10px; line-height: 1.6; }
.science-tip-footer { display: flex; justify-content: space-between; align-items: center; margin: 0 -16px; padding: 10px 16px; border-top: 1px solid #dff4e8; color: #70b38f; background: rgba(225, 250, 236, .6); font-size: 8px; font-weight: 700; letter-spacing: .12em; }
.toast { position: fixed; z-index: 200; right: 22px; bottom: 22px; max-width: min(360px, calc(100vw - 36px)); padding: 12px 15px; border: 1px solid rgba(255,255,255,.11); border-radius: 11px; color: #f7f9ff; background: #202943; box-shadow: 0 10px 30px rgba(12,18,36,.22); font-size: 11px; line-height: 1.5; opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

@media (min-width: 1500px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 350px; }
  .stage-frame { height: min(60vh, 760px); }
  .control-card { padding: 21px 19px 17px; }
}
@media (max-width: 1100px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 290px; gap: 15px; padding-inline: 18px; }
  .topbar { padding-inline: 20px; }
  .tool-toolbar { padding-inline: 10px; gap: 8px; }
  .tool-button { padding-inline: 9px; }
  .control-card { padding-inline: 14px; }
  .stage-frame { height: clamp(360px, 48vh, 570px); min-height: 360px; }
  .lesson-tag { display: none; }
}
@media (max-width: 860px) {
  .workspace { grid-template-columns: minmax(0, 1fr); max-width: 780px; gap: 17px; padding: 22px 16px 30px; }
  .control-sidebar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .force-control-card { grid-row: span 2; }
  .science-tip-card { grid-column: 2; }
  .stage-frame { height: clamp(400px, 57vh, 620px); }
  .simulation-heading h1 { font-size: 27px; }
  .topbar { min-height: 70px; }
}
@media (max-width: 600px) {
  .topbar { min-height: 66px; padding: 0 13px; gap: 8px; }
  .brand-mark { width: 34px; height: 34px; border-radius: 11px; }
  .brand-title { font-size: 15px; }
  .brand-subtitle { max-width: 150px; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-actions { gap: 6px; }
  .live-pill { display: none; }
  .language-switch { padding: 2px; }
  .language-switch-button { min-width: 30px; min-height: 28px; }
  .icon-button { width: 32px; height: 32px; }
  .text-button { display: none; }
  .workspace { padding: 20px 11px 24px; gap: 14px; }
  .simulation-heading { align-items: start; margin-bottom: 13px; gap: 9px; }
  .simulation-heading .eyebrow { font-size: 8px; }
  .simulation-heading h1 { max-width: 330px; font-size: 24px; }
  .simulation-subtitle { max-width: 380px; margin-top: 6px; font-size: 10px; }
  .reset-experiment-button { width: 36px; min-width: 36px; height: 36px; min-height: 36px; overflow: hidden; padding: 0; gap: 0; flex: 0 0 auto; font-size: 0; }
  .reset-experiment-button svg { width: 16px; height: 16px; }
  .simulation-card { border-radius: 13px; }
  .tool-toolbar { min-height: 57px; padding: 8px 7px; gap: 5px; }
  .tool-group { gap: 2px; }
  .tool-button { flex-direction: column; gap: 3px; min-width: 57px; min-height: 43px; padding: 4px 4px; font-size: 8px; }
  .tool-button svg { width: 15px; height: 15px; }
  .toolbar-divider { margin: 5px 0; }
  .add-object-button { min-height: 37px; gap: 4px; padding-inline: 7px; font-size: 9px; }
  .add-object-button > span:first-child { font-size: 15px; }
  .stage-frame { height: clamp(390px, 58vh, 520px); min-height: 390px; }
  .stage-top-left { top: 9px; left: 8px; gap: 4px; }
  .stage-chip { min-height: 25px; padding-inline: 7px; font-size: 8px; }
  .selected-object-chip { min-height: 25px; padding-inline: 7px; font-size: 9px; }
  .stage-top-right { top: 9px; right: 8px; gap: 5px; }
  .compass-widget { width: 36px; height: 36px; font-size: 7px; }
  .compass-north { top: 7px; }
  .compass-east { right: 3px; }
  .compass-south { bottom: 1px; }
  .compass-west { left: 5px; }
  .zoom-widget { min-height: 30px; padding: 2px; gap: 0; }
  .zoom-widget button { width: 23px; height: 24px; font-size: 16px; }
  .zoom-widget span { min-width: 30px; font-size: 8px; }
  .zoom-widget .zoom-reset { display: none; }
  .stage-tip { bottom: 52px; max-width: calc(100% - 18px); padding: 7px 9px; gap: 6px; font-size: 9px; }
  .stage-bottom-left { left: 8px; bottom: 8px; gap: 4px; }
  .coordinate-pill, .grid-pill { min-height: 24px; padding-inline: 7px; font-size: 8px; }
  .simulation-statusbar { min-height: 52px; padding: 8px 9px; gap: 8px; }
  .simulation-status { gap: 5px; font-size: 9px; }
  .statusbar-hint { display: none; }
  .pause-button { min-width: 79px; min-height: 33px; gap: 5px; padding-inline: 8px; font-size: 9px; }
  .lesson-strip { align-items: start; padding: 12px; gap: 10px; }
  .lesson-icon { width: 34px; height: 34px; border-radius: 10px; }
  .lesson-copy strong { font-size: 11px; }
  .lesson-copy p { font-size: 9px; }
  .control-sidebar { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .force-control-card { grid-row: auto; }
  .science-tip-card { grid-column: auto; }
  .control-card { padding: 17px 15px 14px; }
  .card-heading { margin-bottom: 17px; }
  .control-field { margin-top: 17px; }
  .direction-button { min-height: 47px; }
  .primary-button { min-height: 47px; margin-top: 21px; }
  .clear-forces-button { min-height: 41px; }
  .metrics-grid { gap: 9px; }
  .metric-box { padding: 12px; }
  .metric-value strong { font-size: 28px; }
  .force-list { max-height: 260px; }
  .toast { right: 12px; bottom: 12px; }
  .language-card { padding: 32px 22px 27px; border-radius: 23px; }
  .language-card h1 { font-size: 30px; }
  .language-description { font-size: 12px; }
  .language-option { min-height: 72px; padding: 12px; }
}
@media (max-width: 370px) {
  .brand-subtitle { display: none; }
  .tool-button { min-width: 49px; }
  .add-object-button { font-size: 8px; }
  .stage-chip { font-size: 7px; }
  .selected-object-chip { max-width: 125px; overflow: hidden; text-overflow: ellipsis; }
  .compass-widget { display: none; }
  .stage-frame { min-height: 360px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
.language-error:not([hidden]) { margin: 18px 0 0; padding: 10px 12px; border: 1px solid rgba(255, 150, 142, .26); border-radius: 9px; color: #ffc0ba; background: rgba(255, 120, 110, .09); font-size: 11px; line-height: 1.5; }
