/* Shared MathViz visual language. Lesson geometry, data colors and equation sizes
   belong to each activity; these rules style the surrounding interface only. */
.mv-experience {
  --mv-font: "Noto Kufi Arabic", "Segoe UI", Tahoma, sans-serif;
  --mv-ink: #163654;
  --mv-blue: #075bb5;
  --mv-blue-soft: #eaf3ff;
  --mv-border: #526f8c;
  --mv-panel: #ffffff;
  --mv-gold: #855000;
  --mv-gold-soft: #fff2cd;
  --mv-radius: 10px;
  font-family: var(--mv-font);
  color: var(--mv-ink);
}
.skill-layout { padding: 8px; }
.skill-shell { padding: 10px; border-radius: 14px; box-shadow: 0 4px 18px #1636540d; }
.mv-experience .mv-workspace-content { background-color: white !important; }
.mv-experience .mv-workspace-content,.mv-experience .mv-canvas-host { overflow-anchor: none; }
.mv-experience header { margin-block: 0 6px !important; padding-block: 0 !important; }
.mv-experience h1 {
  font-family: var(--mv-font) !important;
  font-size: clamp(18px, 2vw, 22px) !important;
  font-weight: 700 !important;
  line-height: 1.55 !important;
  color: var(--mv-ink) !important;
  text-align: center !important;
  margin: 0 0 5px !important;
  padding: 0 !important;
}
.mv-experience .mv-ui-row { gap: 6px !important; margin-block: 5px !important; }
.mv-experience .mv-ui-row > label { font-family: var(--mv-font); font-size: 13px; line-height: 1.5; }
.mv-experience button.mv-ui-button,
.mv-experience .mv-play,
.mv-experience .mv-options-button {
  font-family: var(--mv-font) !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
  font-weight: 700 !important;
  padding: 6px 10px !important;
  min-height: 36px;
  max-width: 100%;
  white-space: normal;
  border: 2px solid var(--mv-blue) !important;
  border-radius: var(--mv-radius) !important;
  color: var(--mv-blue) !important;
  background: var(--mv-blue-soft) !important;
  box-shadow: 0 2px 0 #075bb526 !important;
}
.mv-experience button.mv-ui-button:is(.mv-ui-primary,[aria-pressed=true],[aria-selected=true]),
.mv-experience .mv-play {
  color: white !important;
  background: var(--mv-blue) !important;
  border-color: var(--mv-blue) !important;
}
.mv-experience button.mv-ui-button:is([data-mv-teacher],[data-mv-pan]),
.mv-experience .mv-options-button {
  color: var(--mv-gold) !important;
  border-color: #aa730c !important;
  background: var(--mv-gold-soft) !important;
}
.mv-experience button.mv-ui-button[data-mv-pan][aria-pressed=true] { background: #855000 !important; color: white !important; }
.mv-experience button.mv-ui-button:disabled,
.mv-experience button.mv-ui-button[aria-disabled=true],
.mv-experience .mv-play:disabled {
  color: #637184 !important;
  background: #edf0f4 !important;
  border-color: #adb8c5 !important;
  border-style: dashed !important;
  box-shadow: none !important;
}
.mv-experience :is(button,summary,input,select,textarea):focus-visible {
  outline: 3px solid #b56300 !important;
  outline-offset: 3px !important;
}
.mv-experience .mv-ui-row :is(select,input:not([type=range]):not([type=checkbox]):not([type=radio]):not([type=color])),
.mv-experience .mv-teacher-dialog :is(select,textarea) {
  border: 1px solid var(--mv-border) !important;
  border-radius: 8px !important;
  background-color: white !important;
  color: var(--mv-ink) !important;
  min-height: 36px;
  padding: 5px 8px;
  max-width: 100%;
}
.mv-experience select { font-family: var(--mv-font) !important; }
.mv-experience input:is([type=checkbox],[type=radio],[type=range]) { accent-color: var(--mv-blue); }
.mv-experience .mv-ui-board {
  border: 1px solid var(--mv-border) !important;
  border-radius: 14px !important;
  background: var(--mv-panel) !important;
  box-shadow: 0 2px 8px #1636540a !important;
}
.mv-experience .mv-ui-question {
  border: 2px solid #ba7c11 !important;
  border-inline-start-width: 5px !important;
  border-radius: var(--mv-radius) !important;
  background: var(--mv-gold-soft) !important;
  color: #754500;
  padding: 8px;
}
.mv-experience details > summary,
.mv-experience .mv-teacher-dialog details > summary {
  font-family: var(--mv-font) !important;
  color: var(--mv-gold) !important;
  background: var(--mv-gold-soft) !important;
  border-color: #aa730c !important;
  border-radius: var(--mv-radius) !important;
  box-shadow: none !important;
}
.mv-experience .mv-workspace-tools { background: var(--mv-panel); border-color: var(--mv-border); border-radius: var(--mv-radius); }
.mv-experience .mv-teacher-dialog { font-family: var(--mv-font); color: var(--mv-ink); border-color: var(--mv-border); border-radius: 14px; }
.mv-experience .mv-teacher-dialog-bar { color: var(--mv-ink); background: white; border-bottom: 1px solid var(--mv-border); }
.mv-experience .mv-teacher-dialog label { background: var(--mv-panel); border-radius: 8px; }
/* Projected lessons need visible boundaries, not pale shadows alone. */
.mv-experience .mv-ui-board { border-width: 2px !important; }
.mv-experience .mv-workspace-tools { border: 2px solid var(--mv-border); }
.mv-experience .mv-teacher-dialog label { border: 1px solid #71869a; }
.mv-experience .mv-ui-row select { border-color: #526f8c !important; }
@media (pointer: coarse) {
  .mv-experience button.mv-ui-button,.mv-experience .mv-play,.mv-experience .mv-ui-row select { min-height: 44px !important; }
}
@media (max-width: 480px) {
  .skill-layout,.skill-layout.mathviz-layout--wide { padding: 4px; }
  .skill-shell { padding: 6px; }
  .mv-experience .mv-ui-row { gap: 4px !important; }
  .mv-experience button.mv-ui-button { font-size: 12px !important; padding: 5px 7px !important; }
  .mv-experience .mv-workspace-tools button { font-size: 11px !important; padding: 4px 5px !important; }
}

/* Small zoom tools; presentation mode uses only the essential icon dock. */
.mv-experience .mv-workspace-tools{width:max-content;max-width:100%;margin:0 auto 2px;padding:1px;gap:1px;border:0;background:transparent}
.mv-experience .mv-workspace-tools button.mv-ui-button{width:28px!important;min-width:28px!important;height:28px!important;min-height:28px!important;padding:0!important;border-width:1px!important;border-radius:4px!important;font-size:13px!important;line-height:1!important}
.mv-experience .mv-workspace-tools button[data-mv-fit]{width:40px!important;min-width:40px!important}
.mv-workspace-tools output{font-size:11px;min-width:0}
html.mv-focus-open{overflow:hidden!important}
.mv-experience.mv-focus{position:fixed!important;inset:0!important;z-index:2147483000;background:#fff!important;width:100vw!important;height:100dvh!important;max-width:none!important;margin:0!important;padding:0!important;box-sizing:border-box;overflow:hidden!important;border:0!important;border-radius:0!important}
.mv-focus .mv-workspace-tools,.mv-focus .mv-teacher-footer{display:none!important}
.mv-focus .mv-workspace-viewport,.mv-focus .mv-workspace-viewport.mv-scaled{height:calc(100dvh - 38px)!important;max-height:calc(100dvh - 38px)!important;overflow:auto!important;border:0!important;border-radius:0!important}
.mv-focus .mv-workspace-content{padding:0!important}
.mv-focus .mv-workspace-content :is(header,details,form,.mv-secondary,.mv-toolbar,.mv-lesson-actions,.mv-ui-row,.decimal-place,.decimal-modes,.decimal-units,.dr-related){display:none!important}
.mv-focus .mv-workspace-content svg.mv-focus-graphic{width:100%!important;max-width:100%!important;height:auto!important;max-height:none!important;min-height:0!important;margin:0 auto!important}
.mv-focus-dock{position:absolute;bottom:0;inset-inline:0;height:36px;display:flex;align-items:center;justify-content:center;gap:3px;background:#fff;z-index:100}
.mv-focus-dock[hidden]{display:none!important}
.mv-experience .mv-focus-dock button{display:grid;place-items:center;min-width:30px!important;width:30px!important;min-height:30px!important;height:30px!important;padding:0!important;font:800 19px/1 system-ui!important;border:1px solid #075bb5!important;border-radius:4px!important;background:#eaf3ff;color:#075bb5}
.mv-experience .mv-focus-dock button:disabled{opacity:.35;cursor:default}
.mv-experience .mv-focus-dock .mv-focus-size{position:absolute;right:4px;display:flex;align-items:center;gap:3px}
