*,
::before,
::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  background: #0a0f1e;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

button {
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  text-align: left;
  cursor: pointer;
}

svg {
  display: block;
}

::-webkit-scrollbar {
  display: none;
}

.Logo {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  padding: 0 24px;
}
.Logo-Text {
  color: var(--color-font);
  font-family: "Quicksand", BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "BIZ UDGothic", meiryo, sans-serif;
  font-size: 18px;
  font-weight: 400;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.95), 0 1px 3px rgba(0, 0, 0, 0.9);
  cursor: pointer;
  user-select: none;
}

.ApplicationMenu {
  position: fixed;
  top: 56px;
  left: 0;
  bottom: 0;
  z-index: 9999;
  display: none;
  flex-direction: column;
  width: 300px;
  background: var(--color-panel-background);
  border-radius: 0 12px 0 0;
  box-shadow: 0 0 3px 1px var(--color-panel-background);
  overflow-y: scroll;
  overscroll-behavior-y: none;
  scrollbar-width: none;
}
.ApplicationMenu[data-open] {
  display: flex;
}
.ApplicationMenu-Section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 0;
}
.ApplicationMenu-Link {
  padding: 0 24px;
}
.ApplicationMenu-Link-Name {
  display: block;
  font-size: 15px;
  line-height: 23px;
  color: var(--color-font);
  text-decoration: none;
}
.ApplicationMenu-Link-Description {
  font-size: 12px;
  line-height: 20px;
  color: var(--color-muted);
}

.PanelControl {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 56px;
  padding: 0 32px;
}
.PanelControl-Item {
  display: flex;
  align-items: center;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 21px;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.95), 0 1px 3px rgba(0, 0, 0, 0.9);
  cursor: pointer;
  user-select: none;
}
.PanelControl-Item[data-open] {
  color: var(--color-font);
}

.Panel {
  position: absolute;
  width: max-content;
  background: var(--color-panel-background);
  border-radius: 12px;
  box-shadow: 0 0 3px 1px var(--color-panel-background);
  overflow: hidden;
}
.Panel[data-hidden] {
  display: none;
}
.Panel[data-edge-left] {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}
.Panel[data-edge-right] {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.Panel[data-edge-top] {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
.Panel[data-edge-bottom] {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.Panel-Header {
  height: 32px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.Panel-Header:active {
  cursor: grabbing;
}
.Panel-CloseIcon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  color: var(--color-muted);
  cursor: pointer;
}
.Panel-CloseIcon:hover {
  color: var(--color-font);
}
.Panel-Header:hover .Panel-CloseIcon {
  visibility: visible;
}
.Panel-Title {
  display: flex;
  align-items: center;
  height: 32px;
  background: var(--color-panel-header-background);
  font-size: 11px;
  line-height: 1.5;
  color: var(--color-font);
  border-bottom-right-radius: 12px;
}
.Panel-Title[data-end] {
  padding: 0 16px;
}
.Panel-Main {
  padding: 0;
}

.PanelGroup {
  display: flex;
  flex-direction: column;
}
.PanelGroup-Header {
  display: flex;
  align-items: center;
  height: 30px;
  padding: 8px 16px 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--color-muted);
  user-select: none;
}

.SelectList {
  display: flex;
  flex-direction: column;
  padding: 6px 0;
}
.SelectList-Item {
  display: flex;
  align-items: center;
  min-width: 200px;
  padding: 6px 10px;
  margin: 2px 8px;
  border-radius: 2px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-font);
  cursor: pointer;
  user-select: none;
}
.SelectList-Item[data-current] {
  background: var(--color-selected);
}

.RightLabelGrid {
  display: grid;
  grid-template-columns: max-content 1fr;
  padding: 8px 12px;
}
.RightLabelGrid-Row {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: 1/-1;
  align-items: center;
  height: 36px;
  column-gap: 16px;
}
.RightLabelGrid-Row[data-clickable] {
  cursor: pointer;
}
.RightLabelGrid-Row-Label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-muted);
  padding: 0 4px;
}

.Readout-Value {
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-font);
  user-select: none;
}

.FieldValue {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 8px;
}
.FieldValue-Unit {
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-muted);
  user-select: none;
}

.RoundNumberInput {
  display: flex;
  height: 24px;
  background: var(--color-selected);
  border-radius: 12px;
  overflow: hidden;
}
.RoundNumberInput-Previous, .RoundNumberInput-Next {
  flex-shrink: 0;
  width: 12px;
  cursor: pointer;
}
.RoundNumberInput-Input {
  flex-shrink: 0;
  width: calc(4ch + 16px);
  background: transparent;
  color: var(--color-font);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}
.RoundNumberInput-Input:focus {
  outline: none;
}

.CheckInput {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  width: 18px;
  height: 18px;
  color: var(--color-font);
  border: 1px solid var(--color-field-border);
  border-radius: 2px;
  cursor: pointer;
}
.CheckInput svg {
  visibility: hidden;
}
.CheckInput[data-checked] svg {
  visibility: visible;
}

.PlayControl {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 16px;
}
.PlayControl-Item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  color: var(--color-font);
  border-radius: 2px;
  cursor: pointer;
  user-select: none;
}

.OptionInput {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 12px;
  border-radius: 2px;
  background: var(--color-selected);
  cursor: pointer;
  user-select: none;
}
.OptionInput[data-open] {
  border-radius: 2px 0 0 2px;
}
.OptionInput-Value {
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-font);
}
.OptionInput .ActionList {
  display: none;
}

.OptionModal {
  position: fixed;
  z-index: 40;
  display: none;
  width: max-content;
  border-radius: 0 2px 2px 2px;
  background: var(--color-panel-background);
  box-shadow: 0 0 3px 1px var(--color-panel-background);
  overflow-y: scroll;
  overscroll-behavior-y: none;
  scrollbar-width: none;
}
.OptionModal[data-open] {
  display: block;
}

.ActionList {
  display: flex;
  flex-direction: column;
  padding: 8px 6px;
}

.ActionItem {
  display: flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-font);
  border-radius: 2px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.ActionItem[data-selected] {
  background: var(--color-selected);
}

.EquationPanel {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 112px);
}
.EquationPanel .Panel-Header {
  flex-shrink: 0;
}
.EquationPanel .Panel-Main {
  flex: 1;
  min-height: 0;
  overflow-y: scroll;
  overscroll-behavior-y: none;
  scrollbar-width: none;
}

.EquationList {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 300px;
  padding: 12px 18px 16px;
}

.EquationItem {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.EquationItem-Name {
  font-size: 11px;
  line-height: 1.5;
  color: var(--color-muted);
}
.EquationItem-Formula {
  overflow-x: auto;
  overscroll-behavior-x: none;
  scrollbar-width: none;
  color: var(--color-font);
  font-size: 15px;
}
.EquationItem-Formula::-webkit-scrollbar {
  display: none;
}
.EquationItem-Note {
  font-size: 12px;
  line-height: 20px;
  color: var(--color-font);
}

.ElectricSymbol {
  color: var(--color-electric);
}

.MagneticSymbol {
  color: var(--color-magnetic);
}

.ScenePanel .Panel-Main {
  padding: 0;
}

.GraphPanel .Panel-Main {
  width: 300px;
  padding: 12px 16px 14px;
}

.FieldGraph-Legend {
  display: flex;
  gap: 16px;
  padding-bottom: 8px;
  font-size: 12px;
  line-height: 1.5;
}
.FieldGraph-Legend-Item[data-field=electric] {
  color: var(--color-electric);
}
.FieldGraph-Legend-Item[data-field=magnetic] {
  color: var(--color-magnetic);
}

.FieldGraph-Stage {
  height: 148px;
}

.FieldGraph {
  display: block;
  width: 100%;
  height: 100%;
}

.FieldGraph-Note {
  padding-top: 10px;
  font-size: 12px;
  line-height: 20px;
  color: var(--color-muted);
}

.DragHint {
  position: fixed;
  left: 20px;
  bottom: 14px;
  pointer-events: none;
  font-size: 11px;
  line-height: 1.5;
  color: var(--color-muted);
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.95), 0 1px 3px rgba(0, 0, 0, 0.9);
  user-select: none;
}

.UsagePanel {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 112px);
}
.UsagePanel .Panel-Header {
  flex-shrink: 0;
}
.UsagePanel .Panel-Main {
  flex: 1;
  min-height: 0;
  overflow-y: scroll;
  overscroll-behavior-y: none;
  scrollbar-width: none;
}

.Panel-Text {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 300px;
  padding: 16px 18px;
}
.Panel-Text h1 {
  color: var(--color-font);
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
}
.Panel-Text p {
  color: var(--color-font);
  font-size: 13px;
  line-height: 21px;
}

html[data-article],
html[data-article] body {
  height: auto;
  overflow: visible;
}

.LecturePage {
  min-height: 100vh;
  color: var(--color-font);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}
.LecturePage::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9998;
  height: 56px;
  background: #0a0f1e;
}
.LecturePage-Main {
  width: 760px;
  max-width: 100%;
  margin: 0 auto;
  padding: 56px 24px 96px;
}

.LectureDocument {
  display: flex;
  flex-direction: column;
}
.LectureDocument-Title {
  padding: 8px 0 24px;
  font-size: 26px;
  line-height: 40px;
  font-weight: 500;
  text-align: center;
}
.LectureDocument-Scene {
  padding-bottom: 40px;
}
.LectureDocument-Heading {
  padding: 16px 0 10px;
  font-size: 20px;
  line-height: 32px;
  font-weight: 500;
}
.LectureDocument-Text {
  padding-bottom: 14px;
  font-size: 16px;
  line-height: 32px;
}
.LectureDocument-Text .katex {
  font-size: 1.05em;
}

.LectureFigure {
  display: block;
  width: 100%;
  height: 400px;
}

.LectureLink {
  display: flex;
  flex-direction: column;
  padding-top: 16px;
}
.LectureLink-Title {
  padding: 4px 8px 10px;
  font-size: 12px;
  line-height: 19px;
  color: var(--color-muted);
}
.LectureLink-Title[data-second] {
  padding-top: 18px;
}
.LectureLink-Item {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 2px;
  font-size: 13px;
  line-height: 21px;
  color: var(--color-font);
  text-decoration: none;
}
.LectureLink-Item:hover {
  background: var(--color-selected);
}
.LectureLink-Item[data-active] {
  color: var(--color-muted);
}

:root {
  --color-font: #e7ecf5;
  --color-muted: #8fa0bc;
  --color-panel-background: #101728;
  --color-panel-header-background: #0d1322;
  --color-selected: #1b2438;
  --color-field-border: #233049;
  --color-electric: #3ddc72;
  --color-magnetic: #6fb4ff;
}

.ElectromagneticWave {
  position: fixed;
  inset: 0;
  overflow: hidden;
  color: var(--color-font);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}

.Canvas {
  display: block;
  touch-action: none;
  cursor: grab;
}
.Canvas:active {
  cursor: grabbing;
}